mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembler code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. Defining such a macro was necessary in the early days of the kernel, since GCC only started providing __ASSEMBLER__ since version 3.0 in 2000 (see https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=f8f769ea4e69 ). However, having two macros can be very confusing nowadays for the developers when switching between userspace and kernelspace coding, or when dealing with uapi headers that should use __ASSEMBLER__ instead. So let's now standardize on the __ASSEMBLER__ macro that is provided by the compilers. This is almost a completely mechanical patch (done with a simple "sed -i" statement), with just one comment tweaked manually in arch/mips/include/asm/cpu.h (that was missing some underscores). Cc: Thomas Bogendoerfer <[email protected]> Cc: [email protected] Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Maciej W. Rozycki <[email protected]> Signed-off-by: Thomas Huth <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
44 lines
798 B
C
44 lines
798 B
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2014, Imagination Technologies Ltd.
|
|
*
|
|
* EVA functions for generic code
|
|
*/
|
|
|
|
#ifndef _ASM_EVA_H
|
|
#define _ASM_EVA_H
|
|
|
|
#include <kernel-entry-init.h>
|
|
|
|
#ifdef __ASSEMBLER__
|
|
|
|
#ifdef CONFIG_EVA
|
|
|
|
/*
|
|
* EVA early init code
|
|
*
|
|
* Platforms must define their own 'platform_eva_init' macro in
|
|
* their kernel-entry-init.h header. This macro usually does the
|
|
* platform specific configuration of the segmentation registers,
|
|
* and it is normally called from assembly code.
|
|
*
|
|
*/
|
|
|
|
.macro eva_init
|
|
platform_eva_init
|
|
.endm
|
|
|
|
#else
|
|
|
|
.macro eva_init
|
|
.endm
|
|
|
|
#endif /* CONFIG_EVA */
|
|
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif
|