mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-19 04:22:35 -05:00
While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize on the __ASSEMBLER__ macro that is provided by the compilers now. This originally was a completely mechanical patch (done with a simple "sed -i" statement), with some manual fixups during rebasing of the patch later. Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexandre Ghiti <alex@ghiti.fr> Cc: linux-riscv@lists.infradead.org Signed-off-by: Thomas Huth <thuth@redhat.com> Link: https://lore.kernel.org/r/20250606070952.498274-3-thuth@redhat.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
28 lines
610 B
C
28 lines
610 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2021 by Rivos Inc.
|
|
*/
|
|
#ifndef __ASM_CPU_OPS_SBI_H
|
|
#define __ASM_CPU_OPS_SBI_H
|
|
|
|
#ifndef __ASSEMBLER__
|
|
#include <linux/init.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/threads.h>
|
|
|
|
extern const struct cpu_operations cpu_ops_sbi;
|
|
|
|
/**
|
|
* struct sbi_hart_boot_data - Hart specific boot used during booting and
|
|
* cpu hotplug.
|
|
* @task_ptr: A pointer to the hart specific tp
|
|
* @stack_ptr: A pointer to the hart specific sp
|
|
*/
|
|
struct sbi_hart_boot_data {
|
|
void *task_ptr;
|
|
void *stack_ptr;
|
|
};
|
|
#endif
|
|
|
|
#endif /* ifndef __ASM_CPU_OPS_SBI_H */
|