treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
Subsystems (90)
John Paul Adrian Glaubitz
maintainerRe: [PATCH 34/41] sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
In reply to Thomas HuthHi Thomas,
Quoted 1,743 lines · Thomas Huth
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 is a completely mechanical patch (done with a simple "sed -i" statement).
Cc "David S. Miller" <[email protected]>Cc Andreas Larsson <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- arch/sparc/include/asm/adi_64.h | 4 +- arch/sparc/include/asm/auxio.h | 4 +- arch/sparc/include/asm/auxio_32.h | 4 +- arch/sparc/include/asm/auxio_64.h | 4 +- arch/sparc/include/asm/cacheflush_64.h | 4 +- arch/sparc/include/asm/cpudata.h | 4 +- arch/sparc/include/asm/cpudata_64.h | 4 +- arch/sparc/include/asm/delay_64.h | 4 +- arch/sparc/include/asm/ftrace.h | 2 +- arch/sparc/include/asm/hvtramp.h | 2 +- arch/sparc/include/asm/hypervisor.h | 92 ++++++++++++------------- arch/sparc/include/asm/irqflags_32.h | 4 +- arch/sparc/include/asm/irqflags_64.h | 4 +- arch/sparc/include/asm/jump_label.h | 4 +- arch/sparc/include/asm/kdebug_32.h | 4 +- arch/sparc/include/asm/leon.h | 8 +-- arch/sparc/include/asm/leon_amba.h | 6 +- arch/sparc/include/asm/mman.h | 4 +- arch/sparc/include/asm/mmu_64.h | 4 +- arch/sparc/include/asm/mmu_context_32.h | 4 +- arch/sparc/include/asm/mmu_context_64.h | 4 +- arch/sparc/include/asm/mxcc.h | 4 +- arch/sparc/include/asm/obio.h | 4 +- arch/sparc/include/asm/openprom.h | 4 +- arch/sparc/include/asm/page_32.h | 8 +-- arch/sparc/include/asm/page_64.h | 8 +-- arch/sparc/include/asm/pcic.h | 2 +- arch/sparc/include/asm/pgtable_32.h | 4 +- arch/sparc/include/asm/pgtable_64.h | 8 +-- arch/sparc/include/asm/pgtsrmmu.h | 6 +- arch/sparc/include/asm/processor_64.h | 10 +-- arch/sparc/include/asm/psr.h | 4 +- arch/sparc/include/asm/ptrace.h | 12 ++-- arch/sparc/include/asm/ross.h | 4 +- arch/sparc/include/asm/sbi.h | 4 +- arch/sparc/include/asm/sigcontext.h | 4 +- arch/sparc/include/asm/signal.h | 6 +- arch/sparc/include/asm/smp_32.h | 8 +-- arch/sparc/include/asm/smp_64.h | 8 +-- arch/sparc/include/asm/spinlock_32.h | 4 +- arch/sparc/include/asm/spinlock_64.h | 4 +- arch/sparc/include/asm/spitfire.h | 4 +- arch/sparc/include/asm/starfire.h | 2 +- arch/sparc/include/asm/thread_info_32.h | 4 +- arch/sparc/include/asm/thread_info_64.h | 12 ++-- arch/sparc/include/asm/trap_block.h | 4 +- arch/sparc/include/asm/traps.h | 4 +- arch/sparc/include/asm/tsb.h | 2 +- arch/sparc/include/asm/ttable.h | 2 +- arch/sparc/include/asm/turbosparc.h | 4 +- arch/sparc/include/asm/upa.h | 4 +- arch/sparc/include/asm/vaddrs.h | 2 +- arch/sparc/include/asm/viking.h | 4 +- arch/sparc/include/asm/visasm.h | 2 +- drivers/char/hw_random/n2rng.h | 4 +- 55 files changed, 172 insertions(+), 172 deletions(-)arch/sparc/include/asm/adi_64.h +2
-2@@ -9,7 +9,7 @@#include <linux/types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct adi_caps { __u64 blksz;@@ -41,6 +41,6 @@ static inline unsigned long adi_nbits(void)return adi_state.caps.nbits; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* !(__ASM_SPARC64_ADI_H) */ arch/sparc/include/asm/auxio.h +2
-2@@ -2,11 +2,11 @@#ifndef ___ASM_SPARC_AUXIO_H#define ___ASM_SPARC_AUXIO_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void __iomem *auxio_register; -#endif /* ifndef __ASSEMBLY__ */ +#endif /* ifndef __ASSEMBLER__ */ #if defined(__sparc__) && defined(__arch64__)#include <asm/auxio_64.h> arch/sparc/include/asm/auxio_32.h +2
-2@@ -29,7 +29,7 @@#define AUXIO_FLPY_EJCT 0x02/* Eject floppy disk. Write only. */ #define AUXIO_LED 0x01/* On if set, off if unset. Read/Write */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * NOTE: these routines are implementation dependent-- @@ -75,7 +75,7 @@ do { \ } \ } while (0) -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ /* AUXIO2 (Power Off Control) */ arch/sparc/include/asm/auxio_64.h +2
-2@@ -74,7 +74,7 @@#define AUXIO_PCIO_CPWR_OFF 0x02/* Courtesy Power Off */ #define AUXIO_PCIO_SPWR_OFF 0x01/* System Power Off */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define AUXIO_LTE_ON 1#define AUXIO_LTE_OFF 0@@ -94,6 +94,6 @@ void auxio_set_lte(int on);*/ void auxio_set_led (int on); -#endif /* ifndef __ASSEMBLY__ */ +#endif /* ifndef __ASSEMBLER__ */ #endif /* !(_SPARC64_AUXIO_H) */ arch/sparc/include/asm/cacheflush_64.h +2
-2@@ -4,7 +4,7 @@#include <asm/page.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/mm.h> @@ -78,6 +78,6 @@ void flush_ptrace_access(struct vm_area_struct *, struct page *,#define flush_cache_vmap_early (start, end) do { } while (0)#define flush_cache_vunmap (start, end) do { } while (0) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _SPARC64_CACHEFLUSH_H */ arch/sparc/include/asm/cpudata.h +2
-2@@ -2,14 +2,14 @@#ifndef ___ASM_SPARC_CPUDATA_H#define ___ASM_SPARC_CPUDATA_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/threads.h> #include <linux/percpu.h> extern const struct seq_operations cpuinfo_op; -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #if defined(__sparc__) && defined(__arch64__)#include <asm/cpudata_64.h> arch/sparc/include/asm/cpudata_64.h +2
-2@@ -7,7 +7,7 @@ #ifndef _SPARC64_CPUDATA_H #define _SPARC64_CPUDATA_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ typedef struct { /* Dcache line 1 */@@ -35,7 +35,7 @@ DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data);#define cpu_data (__cpu) per_cpu(__cpu_data, (__cpu))#define local_cpu_data () (*this_cpu_ptr(&__cpu_data)) -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #include <asm/trap_block.h> arch/sparc/include/asm/delay_64.h +2
-2@@ -7,12 +7,12 @@#ifndef _SPARC64_DELAY_H#define _SPARC64_DELAY_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void __delay (unsigned long loops);void udelay (unsigned long usecs);#define mdelay (n) udelay((n) * 1000) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _SPARC64_DELAY_H */ arch/sparc/include/asm/ftrace.h +1
-1@@ -6,7 +6,7 @@#define MCOUNT_ADDR ((unsigned long)(_mcount))#define MCOUNT_INSN_SIZE 4/* sizeof mcount call */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void _mcount (void );#endif arch/sparc/include/asm/hvtramp.h +1
-1@@ -2,7 +2,7 @@#ifndef _SPARC64_HVTRAP_H#define _SPARC64_HVTRAP_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> arch/sparc/include/asm/hypervisor.h +46
-46@@ -102,7 +102,7 @@*/ #define HV_FAST_MACH_EXIT 0x00 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void sun4v_mach_exit (unsigned long exit_code);#endif @@ -131,7 +131,7 @@ void sun4v_mach_exit(unsigned long exit_code);*/ #define HV_FAST_MACH_DESC 0x01 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_mach_desc (unsigned long buffer_pa,unsigned long buf_len,unsigned long *real_buf_len);@@ -152,7 +152,7 @@ unsigned long sun4v_mach_desc(unsigned long buffer_pa,*/ #define HV_FAST_MACH_SIR 0x02 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void sun4v_mach_sir (void );#endif @@ -208,7 +208,7 @@ void sun4v_mach_sir(void);*/ #define HV_FAST_MACH_SET_WATCHDOG 0x05 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_mach_set_watchdog (unsigned long timeout,unsigned long *orig_timeout);#endif @@ -254,7 +254,7 @@ unsigned long sun4v_mach_set_watchdog(unsigned long timeout,*/ #define HV_FAST_CPU_START 0x10 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ unsigned long sun4v_cpu_start(unsigned long cpuid, unsigned long pc, unsigned long rtba,@@ -282,7 +282,7 @@ unsigned long sun4v_cpu_start(unsigned long cpuid,*/ #define HV_FAST_CPU_STOP 0x11 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_cpu_stop (unsigned long cpuid);#endif @@ -299,7 +299,7 @@ unsigned long sun4v_cpu_stop(unsigned long cpuid);*/ #define HV_FAST_CPU_YIELD 0x12 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_cpu_yield (void );#endif @@ -317,7 +317,7 @@ unsigned long sun4v_cpu_yield(void);*/ #define HV_FAST_CPU_POKE 0x13 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_cpu_poke (unsigned long cpuid);#endif @@ -363,7 +363,7 @@ unsigned long sun4v_cpu_poke(unsigned long cpuid);#define HV_CPU_QUEUE_RES_ERROR 0x3e#define HV_CPU_QUEUE_NONRES_ERROR 0x3f -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_cpu_qconf (unsigned long type,unsigned long queue_paddr,unsigned long num_queue_entries);@@ -416,7 +416,7 @@ unsigned long sun4v_cpu_qconf(unsigned long type,*/ #define HV_FAST_CPU_MONDO_SEND 0x42 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_cpu_mondo_send (unsigned long cpu_count,unsigned long cpu_list_pa,unsigned long mondo_block_pa);@@ -449,7 +449,7 @@ unsigned long sun4v_cpu_mondo_send(unsigned long cpu_count,#define HV_CPU_STATE_RUNNING 0x02#define HV_CPU_STATE_ERROR 0x03 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__long sun4v_cpu_state (unsigned long cpuid);#endif @@ -485,7 +485,7 @@ long sun4v_cpu_state(unsigned long cpuid);* * Layout of a TSB description for mmu_tsb_ctx{,non}0() calls. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct hv_tsb_descr { unsigned short pgsz_idx; unsigned short assoc;@@ -536,7 +536,7 @@ struct hv_tsb_descr {* The fault status block is a multiple of 64-bytes and must be aligned * on a 64-byte boundary. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct hv_fault_status { unsigned long i_fault_type; unsigned long i_fault_addr;@@ -651,7 +651,7 @@ struct hv_fault_status {*/ #define HV_FAST_MMU_TSB_CTX0 0x20 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_mmu_tsb_ctx0 (unsigned long num_descriptions,unsigned long tsb_desc_ra);#endif @@ -736,7 +736,7 @@ unsigned long sun4v_mmu_tsb_ctx0(unsigned long num_descriptions,*/ #define HV_FAST_MMU_DEMAP_ALL 0x24 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void sun4v_mmu_demap_all (void );#endif @@ -766,7 +766,7 @@ void sun4v_mmu_demap_all(void);*/ #define HV_FAST_MMU_MAP_PERM_ADDR 0x25 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ unsigned long sun4v_mmu_map_perm_addr(unsigned long vaddr, unsigned long set_to_zero, unsigned long tte,@@ -990,7 +990,7 @@ unsigned long sun4v_mmu_map_perm_addr(unsigned long vaddr,*/ #define HV_CCB_SUBMIT 0x34 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ unsigned long sun4v_ccb_submit(unsigned long ccb_buf, unsigned long len, unsigned long flags,@@ -1035,7 +1035,7 @@ unsigned long sun4v_ccb_submit(unsigned long ccb_buf,*/ #define HV_CCB_INFO 0x35 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_ccb_info (unsigned long ca,void *info_arr);#endif @@ -1069,7 +1069,7 @@ unsigned long sun4v_ccb_info(unsigned long ca,*/ #define HV_CCB_KILL 0x36 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_ccb_kill (unsigned long ca,void *kill_status);#endif @@ -1104,7 +1104,7 @@ unsigned long sun4v_ccb_kill(unsigned long ca,*/ #define HV_FAST_TOD_GET 0x50 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_tod_get (unsigned long *time);#endif @@ -1121,7 +1121,7 @@ unsigned long sun4v_tod_get(unsigned long *time);*/ #define HV_FAST_TOD_SET 0x51 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_tod_set (unsigned long time);#endif @@ -1197,7 +1197,7 @@ unsigned long sun4v_tod_set(unsigned long time);*/ #define HV_FAST_CONS_WRITE 0x63 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__long sun4v_con_getchar (long *status);long sun4v_con_putchar (long c); long sun4v_con_read(unsigned long buffer,@@ -1239,7 +1239,7 @@ unsigned long sun4v_con_write(unsigned long buffer,#define HV_SOFT_STATE_NORMAL 0x01#define HV_SOFT_STATE_TRANSITION 0x02 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_mach_set_soft_state (unsigned long soft_state,unsigned long msg_string_ra);#endif @@ -1318,7 +1318,7 @@ unsigned long sun4v_mach_set_soft_state(unsigned long soft_state,*/ #define HV_FAST_SVC_CLRSTATUS 0x84 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ unsigned long sun4v_svc_send(unsigned long svc_id, unsigned long buffer, unsigned long buffer_size,@@ -1348,7 +1348,7 @@ unsigned long sun4v_svc_clrstatus(unsigned long svc_id,* start (offset 0) of the trap trace buffer, and is described as * follows: */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct hv_trap_trace_control { unsigned long head_offset; unsigned long tail_offset;@@ -1367,7 +1367,7 @@ struct hv_trap_trace_control {* * Each trap trace buffer entry is laid out as follows: */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct hv_trap_trace_entry { unsigned char type; /* Hypervisor or guest entry? */ unsigned char hpstate; /* Hyper-privileged state */@@ -1617,7 +1617,7 @@ struct hv_trap_trace_entry {*/ #define HV_FAST_INTR_DEVINO2SYSINO 0xa0 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_devino_to_sysino (unsigned long devhandle,unsigned long devino);#endif @@ -1635,7 +1635,7 @@ unsigned long sun4v_devino_to_sysino(unsigned long devhandle,*/ #define HV_FAST_INTR_GETENABLED 0xa1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_intr_getenabled (unsigned long sysino);#endif @@ -1651,7 +1651,7 @@ unsigned long sun4v_intr_getenabled(unsigned long sysino);*/ #define HV_FAST_INTR_SETENABLED 0xa2 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_intr_setenabled (unsigned long sysino,unsigned long intr_enabled);#endif @@ -1668,7 +1668,7 @@ unsigned long sun4v_intr_setenabled(unsigned long sysino,*/ #define HV_FAST_INTR_GETSTATE 0xa3 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_intr_getstate (unsigned long sysino);#endif @@ -1688,7 +1688,7 @@ unsigned long sun4v_intr_getstate(unsigned long sysino);*/ #define HV_FAST_INTR_SETSTATE 0xa4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_intr_setstate (unsigned long sysino,unsigned long intr_state);#endif @@ -1706,7 +1706,7 @@ unsigned long sun4v_intr_setstate(unsigned long sysino, unsigned long intr_state*/ #define HV_FAST_INTR_GETTARGET 0xa5 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_intr_gettarget (unsigned long sysino);#endif @@ -1723,7 +1723,7 @@ unsigned long sun4v_intr_gettarget(unsigned long sysino);*/ #define HV_FAST_INTR_SETTARGET 0xa6 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_intr_settarget (unsigned long sysino,unsigned long cpuid);#endif @@ -1807,7 +1807,7 @@ unsigned long sun4v_intr_settarget(unsigned long sysino, unsigned long cpuid);*/ #define HV_FAST_VINTR_SET_TARGET 0xae -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_vintr_get_cookie (unsigned long dev_handle,unsigned long dev_ino,unsigned long *cookie);@@ -3047,7 +3047,7 @@ unsigned long sun4v_vintr_set_target(unsigned long dev_handle,#define LDC_MTE_SZ64K 0x0000000000000001/* 64K page */ #define LDC_MTE_SZ8K 0x0000000000000000/* 8K page */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct ldc_mtable_entry { unsigned long mte; unsigned long cookie;@@ -3130,7 +3130,7 @@ struct ldc_mtable_entry {*/ #define HV_FAST_LDC_REVOKE 0xef -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_ldc_tx_qconf (unsigned long channel,unsigned long ra,unsigned long num_entries);@@ -3230,7 +3230,7 @@ unsigned long sun4v_ldc_revoke(unsigned long channel,#define HV_FAST_N2_GET_PERFREG 0x104#define HV_FAST_N2_SET_PERFREG 0x105 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_niagara_getperf (unsigned long reg,unsigned long *val); unsigned long sun4v_niagara_setperf(unsigned long reg,@@ -3247,7 +3247,7 @@ unsigned long sun4v_niagara2_setperf(unsigned long reg,* a buffer where these statistics can be collected. It is continually * updated once configured. The layout is as follows: */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct hv_mmu_statistics { unsigned long immu_tsb_hits_ctx0_8k_tte; unsigned long immu_tsb_ticks_ctx0_8k_tte;@@ -3332,7 +3332,7 @@ struct hv_mmu_statistics {*/ #define HV_FAST_MMUSTAT_INFO 0x103 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_mmustat_conf (unsigned long ra,unsigned long *orig_ra);unsigned long sun4v_mmustat_info (unsigned long *ra);#endif @@ -3343,7 +3343,7 @@ unsigned long sun4v_mmustat_info(unsigned long *ra);#define HV_NCS_QCONF 0x01#define HV_NCS_QTAIL_UPDATE 0x02 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct hv_ncs_queue_entry { /* MAU Control Register */ unsigned long mau_control;@@ -3422,7 +3422,7 @@ struct hv_ncs_qtail_update_arg {*/ #define HV_FAST_NCS_REQUEST 0x110 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_ncs_request (unsigned long request,unsigned long arg_ra,unsigned long arg_size);@@ -3433,7 +3433,7 @@ unsigned long sun4v_ncs_request(unsigned long request,#define HV_FAST_REBOOT_DATA_SET 0x172 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_reboot_data_set (unsigned long ra,unsigned long len);#endif @@ -3441,7 +3441,7 @@ unsigned long sun4v_reboot_data_set(unsigned long ra,#define HV_FAST_VT_GET_PERFREG 0x184#define HV_FAST_VT_SET_PERFREG 0x185 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_vt_get_perfreg (unsigned long reg_num,unsigned long *reg_val); unsigned long sun4v_vt_set_perfreg(unsigned long reg_num,@@ -3451,7 +3451,7 @@ unsigned long sun4v_vt_set_perfreg(unsigned long reg_num,#define HV_FAST_T5_GET_PERFREG 0x1a8#define HV_FAST_T5_SET_PERFREG 0x1a9 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_t5_get_perfreg (unsigned long reg_num,unsigned long *reg_val); unsigned long sun4v_t5_set_perfreg(unsigned long reg_num,@@ -3462,7 +3462,7 @@ unsigned long sun4v_t5_set_perfreg(unsigned long reg_num,#define HV_FAST_M7_GET_PERFREG 0x43#define HV_FAST_M7_SET_PERFREG 0x44 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_m7_get_perfreg (unsigned long reg_num,unsigned long *reg_val); unsigned long sun4v_m7_set_perfreg(unsigned long reg_num,@@ -3506,7 +3506,7 @@ unsigned long sun4v_m7_set_perfreg(unsigned long reg_num,#define HV_GRP_T5_CPU 0x0211#define HV_GRP_DIAG 0x0300 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__unsigned long sun4v_get_version (unsigned long group,unsigned long *major,unsigned long *minor);arch/sparc/include/asm/irqflags_32.h +2
-2@@ -11,7 +11,7 @@#ifndef _ASM_IRQFLAGS_H#define _ASM_IRQFLAGS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/psr.h> @@ -43,6 +43,6 @@ static inline notrace bool arch_irqs_disabled(void)return arch_irqs_disabled_flags (arch_local_save_flags ()); } -#endif /* (__ASSEMBLY__) */ +#endif /* (__ASSEMBLER__) */ #endif /* !(_ASM_IRQFLAGS_H) */ arch/sparc/include/asm/irqflags_64.h +2
-2@@ -13,7 +13,7 @@#include <asm/pil.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline notrace unsigned long arch_local_save_flags (void ) {@@ -93,6 +93,6 @@ static inline notrace unsigned long arch_local_irq_save(void)return flags; } -#endif /* (__ASSEMBLY__) */ +#endif /* (__ASSEMBLER__) */ #endif /* !(_ASM_IRQFLAGS_H) */ arch/sparc/include/asm/jump_label.h +2
-2@@ -2,7 +2,7 @@#ifndef _ASM_SPARC_JUMP_LABEL_H#define _ASM_SPARC_JUMP_LABEL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> @@ -48,5 +48,5 @@ struct jump_entry {jump_label_t key; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif arch/sparc/include/asm/kdebug_32.h +2
-2@@ -19,7 +19,7 @@#define DEBUG_BP_TRAP 126 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* The debug vector is passed in %o1 at boot time. It is a pointer to * a structure in the debuggers address space. Here is its format. */ @@ -64,7 +64,7 @@ enum die_val { DIE_OOPS, }; -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ /* Some nice offset defines for assembler code. */ #define KDEBUG_ENTRY_OFF 0x0arch/sparc/include/asm/leon.h +4
-4@@ -59,7 +59,7 @@#define ASI_LEON3_SYSCTRL_CFG_SNOOPING (1 << 27)#define ASI_LEON3_SYSCTRL_CFG_SSIZE (c) (1 << ((c >> 20) & 0xf)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* do a physical address bypass write, i.e. for 0x80000000 */ static inline void leon_store_reg (unsigned long paddr,unsigned long value)@@ -132,7 +132,7 @@ static inline int sparc_leon3_cpuid(void) return sparc_leon3_asr17() >> 28; } -#endif /*!__ASSEMBLY__*/ +#endif /*!__ASSEMBLER__*/ #ifdef CONFIG_SMP # define LEON3_IRQ_IPI_DEFAULT 13@@ -194,7 +194,7 @@ static inline int sparc_leon3_cpuid(void)#define LEON2_CCR_DSETS_MASK 0x03000000UL#define LEON2_CFG_SSIZE_MASK 0x00007000UL -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct vm_area_struct ;unsigned long leon_swprobe (unsigned long vaddr,unsigned long *paddr);@@ -247,7 +247,7 @@ extern int leon_ipi_irq;#endif /* CONFIG_SMP */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* macros used in leon_mm.c */ #define PFN (x) ((x) >> PAGE_SHIFT)arch/sparc/include/asm/leon_amba.h +3
-3@@ -8,7 +8,7 @@ #ifndef LEON_AMBA_H_INCLUDE #define LEON_AMBA_H_INCLUDE -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct amba_prom_registers { unsigned int phys_addr; /* The physical address of this register */@@ -89,7 +89,7 @@ struct amba_prom_registers {#define LEON3_GPTIMER_CONFIG_NRTIMERS (c) ((c)->config & 0x7)#define LEON3_GPTIMER_CTRL_ISPENDING (r) (((r)&LEON3_GPTIMER_CTRL_PENDING) ? 1 : 0) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct leon3_irqctrl_regs_map { u32 ilevel;@@ -189,7 +189,7 @@ extern int leon_debug_irqout;extern unsigned long leon3_gptimer_irq;extern unsigned int sparc_leon_eirq; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define LEON3_IO_AREA 0xfff00000#define LEON3_CONF_AREA 0xff000arch/sparc/include/asm/mman.h +2
-2@@ -4,7 +4,7 @@#include <uapi/asm/mman.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define arch_mmap_check (addr,len,flags) sparc_mmap_check(addr,len)int sparc_mmap_check (unsigned long addr,unsigned long len);@@ -87,5 +87,5 @@ static inline bool arch_validate_flags(unsigned long vm_flags) }#endif /* CONFIG_SPARC64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __SPARC_MMAN_H__ */ arch/sparc/include/asm/mmu_64.h +2
-2@@ -59,7 +59,7 @@#define CTX_HWBITS (__ctx) ((__ctx.sparc64_ctx_val) & CTX_HW_MASK)#define CTX_NRBITS (__ctx) ((__ctx.sparc64_ctx_val) & CTX_NR_MASK) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define TSB_ENTRY_ALIGNMENT 16@@ -117,7 +117,7 @@ typedef struct { spinlock_t tag_lock; } mm_context_t; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define TSB_CONFIG_TSB 0x00#define TSB_CONFIG_RSS_LIMIT 0x08arch/sparc/include/asm/mmu_context_32.h +2
-2@@ -2,7 +2,7 @@#ifndef __SPARC_MMU_CONTEXT_H#define __SPARC_MMU_CONTEXT_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm-generic/mm_hooks.h> @@ -29,6 +29,6 @@ void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm,#include <asm-generic/mmu_context.h> -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(__SPARC_MMU_CONTEXT_H) */ arch/sparc/include/asm/mmu_context_64.h +2
-2@@ -4,7 +4,7 @@/* Derived heavily from Linus's Alpha/AXP ASN code... */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/spinlock.h> #include <linux/mm_types.h> @@ -193,6 +193,6 @@ static inline unsigned long mm_untag_mask(struct mm_struct *mm)#include <asm-generic/mmu_context.h> -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(__SPARC64_MMU_CONTEXT_H) */ arch/sparc/include/asm/mxcc.h +2
-2@@ -84,7 +84,7 @@* MID: The moduleID of the cpu your read this from. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline void mxcc_set_stream_src (unsigned long *paddr) {@@ -133,6 +133,6 @@ static inline void mxcc_set_creg(unsigned long mxcc_control) "i" (ASI_M_MXCC)); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* !(_SPARC_MXCC_H) */ arch/sparc/include/asm/obio.h +2
-2@@ -97,7 +97,7 @@#define CC_EREG 0x1F00E00/* Error code register */ #define CC_CID 0x1F00F04/* Component ID */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline int bw_get_intr_mask (int sbus_level) {@@ -221,6 +221,6 @@ static inline void cc_set_igen(unsigned int gen) "i" (ASI_M_MXCC)); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* !(_SPARC_OBIO_H) */ arch/sparc/include/asm/openprom.h +2
-2@@ -11,7 +11,7 @@/* Empirical constants... */ #define LINUX_OPPROM_MAGIC 0x10010407 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/of.h> /* V0 prom device operations. */ @@ -275,6 +275,6 @@ struct linux_prom_pci_intmask {unsigned int interrupt; }; -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(__SPARC_OPENPROM_H) */ arch/sparc/include/asm/page_32.h +4
-4@@ -13,7 +13,7 @@#include <vdso/page.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define clear_page (page) memset((void *)(page), 0, PAGE_SIZE)#define copy_page (to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE)@@ -108,14 +108,14 @@ typedef pte_t *pgtable_t;#define TASK_UNMAPPED_BASE 0x50000000 -#else /* !(__ASSEMBLY__) */ +#else /* !(__ASSEMBLER__) */ #define __pgprot (x) (x) -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #define PAGE_OFFSET 0xf0000000 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned long phys_base;extern unsigned long pfn_base;#endif arch/sparc/include/asm/page_64.h +4
-4@@ -30,7 +30,7 @@#define HUGE_MAX_HSTATE 5#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#if defined(CONFIG_HUGETLB_PAGE ) || defined(CONFIG_TRANSPARENT_HUGEPAGE )struct pt_regs ;@@ -128,7 +128,7 @@ extern unsigned long sparc64_va_hole_bottom;extern unsigned long PAGE_OFFSET ; -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ /* The maximum number of physical memory address bits we support. The * largest value we can support is whatever "KPGD_SHIFT + KPTE_BITS" @@ -139,7 +139,7 @@ extern unsigned long PAGE_OFFSET;#define ILOG2_4MB 22#define ILOG2_256MB 28 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __pa (x) ((unsigned long)(x) - PAGE_OFFSET)#define __va (x) ((void *)((unsigned long) (x) + PAGE_OFFSET))@@ -153,7 +153,7 @@ extern unsigned long PAGE_OFFSET;#define virt_to_phys __pa#define phys_to_virt __va -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #include <asm-generic/getorder.h> arch/sparc/include/asm/pcic.h +1
-1@@ -8,7 +8,7 @@#ifndef __SPARC_PCIC_H#define __SPARC_PCIC_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <linux/smp.h> arch/sparc/include/asm/pgtable_32.h +2
-2@@ -21,7 +21,7 @@#define PGDIR_MASK (~(PGDIR_SIZE-1))#define PGDIR_ALIGN (__addr) (((__addr) + ~PGDIR_MASK) & PGDIR_MASK) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm-generic/pgtable-nopud.h> #include <linux/spinlock.h> @@ -428,7 +428,7 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, __changed; \ }) -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #define VMALLOC_START _AC(0xfe600000,UL)#define VMALLOC_END _AC(0xffc00000,UL)arch/sparc/include/asm/pgtable_64.h +4
-4@@ -79,7 +79,7 @@#error PMD_SHIFT must equal HPAGE_SHIFT for transparent huge pages.#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned long VMALLOC_END ;@@ -106,7 +106,7 @@ bool kern_addr_valid(unsigned long addr);pr_err ("%s:%d: bad pgd %p(%016lx) seen at (%pS)\n" , \ __FILE__, __LINE__, &(e), pgd_val(e), __builtin_return_address(0)) -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ /* PTE bits which are the same in SUN4U and SUN4V format. */ #define _PAGE_VALID _AC(0x8000000000000000,UL)/* Valid TTE */ @@ -191,7 +191,7 @@ bool kern_addr_valid(unsigned long addr);/* We borrow bit 20 to store the exclusive marker in swap PTEs. */ #define _PAGE_SWP_EXCLUSIVE _AC(0x0000000000100000, UL) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__pte_t mk_pte_io (unsigned long ,pgprot_t ,int ,unsigned long );@@ -1181,6 +1181,6 @@ extern unsigned long pte_leaf_size(pte_t pte);#endif /* CONFIG_HUGETLB_PAGE */ -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(_SPARC64_PGTABLE_H) */ arch/sparc/include/asm/pgtsrmmu.h +3
-3@@ -10,7 +10,7 @@#include <asm/page.h> -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#include <asm/thread_info.h> /* TI_UWINMASK for WINDOW_FLUSH */ #endif @@ -97,7 +97,7 @@ bne 99b; \ restore %g0, %g0, %g0; -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned long last_valid_pfn;/* This makes sense. Honest it does - Anton */ @@ -136,6 +136,6 @@ srmmu_get_pte (unsigned long addr)return entry; } -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(_SPARC_PGTSRMMU_H) */ arch/sparc/include/asm/processor_64.h +5
-5@@ -21,7 +21,7 @@* XXX No longer using virtual page tables, kill this upper limit... */ #define VA_BITS 44 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define VPTE_SIZE (1UL << (VA_BITS - PAGE_SHIFT + 3))#else #define VPTE_SIZE (1 << (VA_BITS - PAGE_SHIFT + 3))@@ -45,7 +45,7 @@#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* The Sparc processor specific thread struct. */ /* XXX This should die, everything can go into thread_info now. */ @@ -62,7 +62,7 @@ struct thread_struct {#endif }; -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #ifndef CONFIG_DEBUG_SPINLOCK #define INIT_THREAD { \@@ -75,7 +75,7 @@ struct thread_struct { }#endif /* !(CONFIG_DEBUG_SPINLOCK) */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/fpumacro.h> @@ -242,6 +242,6 @@ static inline void prefetchw(const void *x)int do_mathemu (struct pt_regs *regs,struct fpustate *f,bool illegal_insn_trap); -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(__ASM_SPARC64_PROCESSOR_H) */ arch/sparc/include/asm/psr.h +2
-2@@ -14,7 +14,7 @@#include <uapi/asm/psr.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Get the %psr register. */ static inline unsigned int get_psr (void ) {@@ -63,6 +63,6 @@ static inline unsigned int get_fsr(void)return fsr; } -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(__LINUX_SPARC_PSR_H) */ arch/sparc/include/asm/ptrace.h +6
-6@@ -5,7 +5,7 @@#include <uapi/asm/ptrace.h> #if defined(__sparc__) && defined(__arch64__) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler.h> #include <linux/threads.h> @@ -113,10 +113,10 @@ static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) {return regs->u_regs[UREG_I6 ]; } -#else /* __ASSEMBLY__ */ -#endif /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ +#endif /* __ASSEMBLER__ */ #else /* (defined(__sparc__) && defined(__arch64__)) */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/switch_to.h> static inline bool pt_regs_is_syscall (struct pt_regs *regs)@@ -144,8 +144,8 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)#define instruction_pointer (regs) ((regs)->pc)#define user_stack_pointer (regs) ((regs)->u_regs[UREG_FP])unsigned long profile_pc (struct pt_regs *); -#else /* (!__ASSEMBLY__) */ -#endif /* (!__ASSEMBLY__) */ +#else /* (!__ASSEMBLER__) */ +#endif /* (!__ASSEMBLER__) */ #endif /* (defined(__sparc__) && defined(__arch64__)) */ #define STACK_BIAS 2047arch/sparc/include/asm/ross.h +2
-2@@ -95,7 +95,7 @@#define HYPERSPARC_ICCR_FTD 0x00000002#define HYPERSPARC_ICCR_ICE 0x00000001 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline unsigned int get_ross_icr (void ) {@@ -187,6 +187,6 @@ static inline void hyper_flush_cache_page(unsigned long page) } } -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(_SPARC_ROSS_H) */ arch/sparc/include/asm/sbi.h +2
-2@@ -64,7 +64,7 @@ struct sbi_regs {*/ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline int acquire_sbi (int devid,int mask) {@@ -111,6 +111,6 @@ static inline void set_sbi_ctl(int devid, int cfgno, int cfg) "i" (ASI_M_CTL)); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* !(_SPARC_SBI_H) */ arch/sparc/include/asm/sigcontext.h +2
-2@@ -5,7 +5,7 @@#include <asm/ptrace.h> #include <uapi/asm/sigcontext.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __SUNOS_MAXWIN 31@@ -104,6 +104,6 @@ typedef struct {#endif /* (CONFIG_SPARC64) */ -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(__SPARC_SIGCONTEXT_H) */ arch/sparc/include/asm/signal.h +3
-3@@ -2,16 +2,16 @@#ifndef __SPARC_SIGNAL_H#define __SPARC_SIGNAL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/personality.h> #include <linux/types.h> #endif #include <uapi/asm/signal.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __ARCH_HAS_KA_RESTORER#define __ARCH_HAS_SA_RESTORER -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(__SPARC_SIGNAL_H) */ arch/sparc/include/asm/smp_32.h +4
-4@@ -10,15 +10,15 @@#include <linux/threads.h> #include <asm/head.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cpumask.h> -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #ifdef CONFIG_SMP -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/ptrace.h> #include <asm/asi.h> @@ -105,7 +105,7 @@ int hard_smp_processor_id(void);void smp_setup_cpu_possible_map (void ); -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ /* Sparc specific messages. */ #define MSG_CROSS_CALL 0x0005/* run func on cpus */ arch/sparc/include/asm/smp_64.h +4
-4@@ -12,16 +12,16 @@#include <asm/starfire.h> #include <asm/spitfire.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cpumask.h> #include <linux/cache.h> -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #ifdef CONFIG_SMP -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Private routines/data @@ -68,7 +68,7 @@ int __cpu_disable(void);void __cpu_die (unsigned int cpu);#endif -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #else arch/sparc/include/asm/spinlock_32.h +2
-2@@ -7,7 +7,7 @@#ifndef __SPARC_SPINLOCK_H#define __SPARC_SPINLOCK_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/psr.h> #include <asm/barrier.h> @@ -183,6 +183,6 @@ static inline int __arch_read_trylock(arch_rwlock_t *rw) res; \ }) -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* __SPARC_SPINLOCK_H */ arch/sparc/include/asm/spinlock_64.h +2
-2@@ -7,13 +7,13 @@#ifndef __SPARC64_SPINLOCK_H#define __SPARC64_SPINLOCK_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/processor.h> #include <asm/barrier.h> #include <asm/qspinlock.h> #include <asm/qrwlock.h> -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(__SPARC64_SPINLOCK_H) */ arch/sparc/include/asm/spitfire.h +2
-2@@ -68,7 +68,7 @@#define CPU_ID_M8 ('8')#define CPU_ID_SONOMA1 ('N') -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__enum ultra_tlb_layout { spitfire = 0,@@ -363,6 +363,6 @@ static inline void cheetah_put_itlb_data(int entry, unsigned long data) "i" (ASI_ITLB_DATA_ACCESS)); } -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* CONFIG_SPARC64 */ #endif /* !(_SPARC64_SPITFIRE_H) */ arch/sparc/include/asm/starfire.h +1
-1@@ -8,7 +8,7 @@#ifndef _SPARC64_STARFIRE_H#define _SPARC64_STARFIRE_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern int this_is_starfire;arch/sparc/include/asm/thread_info_32.h +2
-2@@ -14,7 +14,7 @@#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/ptrace.h> #include <asm/page.h> @@ -72,7 +72,7 @@ register struct thread_info *current_thread_info_reg asm("g6");*/ #define THREAD_SIZE_ORDER 1 -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* Size of kernel stack for each process */ #define THREAD_SIZE (2 * PAGE_SIZE)arch/sparc/include/asm/thread_info_64.h +6
-6@@ -26,7 +26,7 @@#include <asm/page.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/ptrace.h> #include <asm/types.h> @@ -64,7 +64,7 @@ struct thread_info { __attribute__ ((aligned(64))); }; -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ /* offsets into the thread_info struct for assembly code access */ #define TI_TASK 0x00000000@@ -110,7 +110,7 @@ struct thread_info {/* * macros/functions for gaining access to the thread information structure */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define INIT_THREAD_INFO (tsk) \ { \@@ -150,7 +150,7 @@ extern struct thread_info *current_thread_info(void);#define set_thread_fpdepth (val) (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_FPDEPTH] = (val))#define get_thread_wsaved () (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_WSAVED])#define set_thread_wsaved (val) (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_WSAVED] = (val)) -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ /* * Thread information flags, only 16 bits are available as we encode @@ -228,14 +228,14 @@ extern struct thread_info *current_thread_info(void);* Note that there are only 8 bits available. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define thread32_stack_is_64bit (__SP) (((__SP) & 0x1) != 0)#define test_thread_64bit_stack (__SP) \ ((test_thread_flag(TIF_32BIT) && !thread32_stack_is_64bit(__SP)) ? \ false : true) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __KERNEL__ */ arch/sparc/include/asm/trap_block.h +2
-2@@ -7,7 +7,7 @@#include <asm/hypervisor.h> #include <asm/asi.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Trap handling code needs to get at a few critical values upon * trap entry and to process TSB misses. These cannot be in the @@ -91,7 +91,7 @@ extern struct sun4v_2insn_patch_entry __sun_m7_2insn_patch, __sun_m7_2insn_patch_end; -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #define TRAP_PER_CPU_THREAD 0x00#define TRAP_PER_CPU_PGD_PADDR 0x08arch/sparc/include/asm/traps.h +2
-2@@ -9,7 +9,7 @@#include <uapi/asm/traps.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ /* This is for V8 compliant Sparc CPUS */ struct tt_entry { unsigned long inst_one;@@ -21,5 +21,5 @@ struct tt_entry {/* We set this to _start in system setup. */ extern struct tt_entry *sparc_ttable; -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* !(_SPARC_TRAPS_H) */ arch/sparc/include/asm/tsb.h +1
-1@@ -59,7 +59,7 @@* The kernel TSB is locked into the TLB by virtue of being in the * kernel image, so we don't play these games for swapper_tsb access. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct tsb_ldquad_phys_patch_entry { unsigned int addr; unsigned int sun4u_insn;arch/sparc/include/asm/ttable.h +1
-1@@ -5,7 +5,7 @@#include <asm/utrap.h> #include <asm/pil.h> -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#include <asm/thread_info.h> #endif arch/sparc/include/asm/turbosparc.h +2
-2@@ -57,7 +57,7 @@#define TURBOSPARC_WTENABLE 0x00000020/* Write thru for dcache */ #define TURBOSPARC_SNENABLE 0x40000000/* DVMA snoop enable */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Bits [13:5] select one of 512 instruction cache tags */ static inline void turbosparc_inv_insn_tag (unsigned long addr)@@ -121,6 +121,6 @@ static inline unsigned long turbosparc_get_ccreg(void)return regval; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* !(_SPARC_TURBOSPARC_H) */ arch/sparc/include/asm/upa.h +2
-2@@ -24,7 +24,7 @@#define UPA_PORTID_ID 0x000000000000ffff/* Module Identification bits */ /* UPA I/O space accessors */ -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) && !defined(__ASSEMBLER__)static inline unsigned char _upa_readb (unsigned long addr) {unsigned char ret;@@ -105,6 +105,6 @@ static inline void _upa_writeq(unsigned long q, unsigned long addr)#define upa_writew (__w, __addr) (_upa_writew((__w), (unsigned long)(__addr)))#define upa_writel (__l, __addr) (_upa_writel((__l), (unsigned long)(__addr)))#define upa_writeq (__q, __addr) (_upa_writeq((__q), (unsigned long)(__addr))) -#endif /* __KERNEL__ && !__ASSEMBLY__ */ +#endif /* __KERNEL__ && !__ASSEMBLER__ */ #endif /* !(_SPARC64_UPA_H) */ arch/sparc/include/asm/vaddrs.h +1
-1@@ -31,7 +31,7 @@*/ #define SRMMU_NOCACHE_ALCRATIO 64/* 256 pages per 64MB of system RAM */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/kmap_size.h> enum fixed_addresses {arch/sparc/include/asm/viking.h +2
-2@@ -110,7 +110,7 @@#define VIKING_PTAG_DIRTY 0x00010000/* Block has been modified */ #define VIKING_PTAG_SHARED 0x00000100/* Shared with some other cache */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline void viking_flush_icache (void ) {@@ -250,6 +250,6 @@ static inline unsigned long viking_hwprobe(unsigned long vaddr)return val; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* !(_SPARC_VIKING_H) */ arch/sparc/include/asm/visasm.h +1
-1@@ -45,7 +45,7 @@#define VISExitHalfFast \ wr %o5, 0, %fprs; -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline void save_and_clear_fpu (void ) { __asm__ __volatile__ ( " rd %%fprs, %%o5\n"drivers/char/hw_random/n2rng.h +1
-1@@ -48,7 +48,7 @@#define HV_RNG_NUM_CONTROL 4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned long sun4v_rng_get_diag_ctl (void ); extern unsigned long sun4v_rng_ctl_read_v1(unsigned long ctl_regs_ra, unsigned long *state,
drivers/char/hw_random/n2rng.h struct n2rng { · line 152
Quoted 7 lines
drivers/char/hw_random/n2rng.h +1
-1@@ -147,6 +147,6 @@ struct n2rng {#define N2RNG_BUSY_LIMIT 100#define N2RNG_HCHECK_LIMIT 100 -#endif /* !(__ASSEMBLY__) */ +#endif /* !(__ASSEMBLER__) */ #endif /* _N2RNG_H */
This causes the kernel build to fail:
CC [M] drivers/gpu/drm/nouveau/nv04_fence.o CC [M] drivers/gpu/drm/nouveau/nv10_fence.o CC [M] drivers/gpu/drm/nouveau/nv17_fence.o CC [M] drivers/gpu/drm/nouveau/nv50_fence.o CC [M] drivers/gpu/drm/nouveau/nv84_fence.o CC [M] drivers/gpu/drm/nouveau/nvc0_fence.o LD [M] drivers/gpu/drm/nouveau/nouveau.o AR drivers/gpu/built-in.a AR drivers/built-in.a
make: *** [Makefile:2026: .] Error 2
glaubitz@node54:/data/home/glaubitz/linux> make
CALL scripts/checksyscalls.sh
<stdin>:1519:2: warning: #warning syscall clone3 not implemented [-Wcpp]
AS arch/sparc/kernel/head_64.o./arch/sparc/include/uapi/asm/ptrace.h: Assembler messages:./arch/sparc/include/uapi/asm/ptrace.h:22: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/ptrace.h:23: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:24: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:25: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:26: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:27: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:40: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:41: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/ptrace.h:43: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/ptrace.h:44: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:45: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:46: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:47: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:48: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:49: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/ptrace.h:52: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/ptrace.h:53: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:54: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:55: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/ptrace.h:58: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/ptrace.h:59: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:60: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:61: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/ptrace.h:64: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/ptrace.h:65: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:66: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:67: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/ptrace.h:68: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:69: Error: Unknown opcode: char' ./arch/sparc/include/uapi/asm/ptrace.h:70: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:71: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:72: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/ptrace.h:75: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/ptrace.h:76: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:77: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:78: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:79: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:80: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:81: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:82: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:83: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/ptrace.h:85: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/ptrace.h:86: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:87: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:88: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/ptrace.h:89: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/ptrace.h:90: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/signal.h:110: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/signal.h:112: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/signal.h:113: Error: Unknown opcode: unsigned' ./arch/sparc/include/uapi/asm/signal.h:114: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/signal.h:117: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/signal.h:119: Error: Unknown opcode: char' ./arch/sparc/include/uapi/asm/signal.h:120: Error: Unknown opcode: int' ./arch/sparc/include/uapi/asm/signal.h:121: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/posix_types.h:14: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/posix_types.h:15: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/posix_types.h:19: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/posix_types.h:22: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/posix_types.h:23: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/posix_types.h:26: Error: Unknown opcode: struct' ./arch/sparc/include/uapi/asm/posix_types.h:27: Error: Unknown opcode: __kernel_long_t tv_sec' ./arch/sparc/include/uapi/asm/posix_types.h:28: Error: Unknown opcode: __kernel_suseconds_t tv_usec' ./arch/sparc/include/uapi/asm/posix_types.h:29: Error: junk at end of line, first unrecognized character is }' ./include/uapi/asm-generic/posix_types.h:20: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:24: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:28: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:32: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:36: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:37: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:45: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:49: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:50: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:59: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:72: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:73: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:74: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:79: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:80: Error: Unknown opcode: int' ./include/uapi/asm-generic/posix_types.h:81: Error: junk at end of line, first unrecognized character is }' ./include/uapi/asm-generic/posix_types.h:87: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:88: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:89: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:93: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:94: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:95: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:96: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:97: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:98: Error: Unknown opcode: typedef' ./include/uapi/asm-generic/posix_types.h:99: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/signal.h:172: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/signal.h:173: Error: Unknown opcode: void' ./arch/sparc/include/uapi/asm/signal.h:174: Error: Unknown opcode: int' ./arch/sparc/include/uapi/asm/signal.h:175: Error: Unknown opcode: __kernel_size_t ss_size' ./arch/sparc/include/uapi/asm/signal.h:176: Error: junk at end of line, first unrecognized character is }' ./arch/sparc/include/uapi/asm/utrap.h:48: Error: Unknown opcode: typedef' ./arch/sparc/include/uapi/asm/utrap.h:49: Error: Unknown opcode: `typedef' arch/sparc/kernel/head_64.S:709: Error: found '(', expected: ')' arch/sparc/kernel/head_64.S:709: Error: Illegal operandsarch/sparc/kernel/etrap_64.S:41: Error: Illegal operandsarch/sparc/kernel/etrap_64.S:48: Error: found '(', expected: ')' arch/sparc/kernel/etrap_64.S:48: Error: Expression inside %hi could not be parsed arch/sparc/kernel/etrap_64.S:50: Error: found '(', expected: ')' arch/sparc/kernel/etrap_64.S:50: Error: Expression inside %lo could not be parsed arch/sparc/kernel/etrap_64.S:57: Error: Illegal operandsarch/sparc/kernel/etrap_64.S:59: Error: Illegal operandsarch/sparc/kernel/etrap_64.S:61: Error: Illegal operandsarch/sparc/kernel/etrap_64.S:63: Error: Illegal operandsarch/sparc/kernel/etrap_64.S:66: Error: Illegal operandsarch/sparc/kernel/etrap_64.S:144: Error: found '(', expected: ')' arch/sparc/kernel/etrap_64.S:144: Error: Illegal operandsarch/sparc/kernel/etrap_64.S:145: Error: found '(', expected: ')'
(...)arch/sparc/kernel/ttable_64.S:243: Error: Illegal operandsarch/sparc/kernel/ttable_64.S:243: Error: found '(', expected: ')' arch/sparc/kernel/ttable_64.S:243: Error: Illegal operandsarch/sparc/kernel/ttable_64.S:243: Error: found '(', expected: ')' arch/sparc/kernel/ttable_64.S:243: Error: Illegal operandsarch/sparc/kernel/etrap_64.S:48: Error: can't resolve L0 - sizeof arch/sparc/kernel/etrap_64.S:50: Error: can't resolve L0 - sizeof
make[3]: *** [scripts/Makefile.build:374: arch/sparc/kernel/head_64.o] Error 1
make[2]: *** [scripts/Makefile.build:494: arch/sparc/kernel] Error 2
make[1]: *** [scripts/Makefile.build:494: arch/sparc] Error 2
make: *** [Makefile:2026: .] Error 2
Adrian
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Re: [PATCH 34/41] sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
Quoted 13 lines · John Paul Adrian Glaubitz
Hi Thomas,
Quoted 10 lines · Thomas Huth
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 is a completely mechanical patch (done with a simple "sed -i" statement).
...
Quoted 11 lines
This causes the kernel build to fail:
CC [M] drivers/gpu/drm/nouveau/nv04_fence.o CC [M] drivers/gpu/drm/nouveau/nv10_fence.o CC [M] drivers/gpu/drm/nouveau/nv17_fence.o CC [M] drivers/gpu/drm/nouveau/nv50_fence.o CC [M] drivers/gpu/drm/nouveau/nv84_fence.o CC [M] drivers/gpu/drm/nouveau/nvc0_fence.o LD [M] drivers/gpu/drm/nouveau/nouveau.o AR drivers/gpu/built-in.a AR drivers/built-in.a
Quoted 8 lines
make: *** [Makefile:2026: .] Error 2 glaubitz@node54:/data/home/glaubitz/linux> make
CALLscripts/checksyscalls.sh
<stdin>:1519:2: warning: #warning syscall clone3 not implemented [-Wcpp]
ASarch/sparc/kernel/head_64.o./arch/sparc/include/uapi/asm/ptrace.h: Assembler messages:./arch/sparc/include/uapi/asm/ptrace.h:22: Error: Unknown opcode:struct' ./arch/sparc/include/uapi/asm/ptrace.h:23: Error: Unknown opcode:unsigned'
[...]
D'oh! I guess it's because sparc is using "asflags-y := -ansi" in it's Makefiles ? -ansi seems to change the behavior of the compiler so that __ASSEMBLER__ does not get defined anymore :-(
Do you know why sparc uses "-ansi" for the assembler files? I just tried to install the latest sparc64-linux-gnu-gcc on Fedora 42, and when I try to compile the kernel with that one, I even get earlier errors related to that flag:
AS arch/sparc/kernel/head_64.o
In file included from ./include/linux/atomic.h:80,
from ./include/asm-generic/bitops/lock.h:5,
from ./arch/sparc/include/asm/bitops_64.h:52,
from ./arch/sparc/include/asm/bitops.h:5,
from ./include/linux/bitops.h:67,
from ./include/linux/log2.h:12,
from ./include/asm-generic/getorder.h:8,
from ./arch/sparc/include/asm/page_64.h:158,
from ./arch/sparc/include/asm/page.h:6,
from ./arch/sparc/include/asm/pgtable_64.h:23,
from ./arch/sparc/include/asm/pgtable.h:5,
from ./include/linux/pgtable.h:6,
from arch/sparc/kernel/head_64.S:16:
./include/linux/atomic/atomic-arch-fallback.h:1:1: error: C++ style comments are not allowed in ISO C90
1 | // SPDX-License-Identifier: GPL-2.0
| ^
./include/linux/atomic/atomic-arch-fallback.h:1:1: note: (this will be reported only once per input file)
In file included from ./include/linux/atomic.h:81:
./include/linux/atomic/atomic-long.h:1:1: error: C++ style comments are not allowed in ISO C90
1 | // SPDX-License-Identifier: GPL-2.0
| ^
./include/linux/atomic/atomic-long.h:1:1: note: (this will be reported only once per input file)
In file included from ./include/linux/atomic.h:82:
./include/linux/atomic/atomic-instrumented.h:1:1: error: C++ style comments are not allowed in ISO C90
1 | // SPDX-License-Identifier: GPL-2.0
| ^etc.
So using -ansi in the kernel sources nowadays sounds wrong to me ... could it be removed?
Thomas
Arnd Bergmann
maintainerRe: [PATCH 34/41] sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
Quoted 5 lines · Thomas Huth
On 03/08/2025 15.33, John Paul Adrian Glaubitz wrote:
So using -ansi in the kernel sources nowadays sounds wrong to me ... could it be removed?
Probably: I see that sparc changed '-traditional' cpp flag to the '-ansi' gcc flag in linux-2.1.88, while the others were still using -traditional but just dropped it later.
Most likely the idea at the time was to just no longer use pre-ansi preprocessing rather than to exclude gnu extensions.
Arnd
Re: [PATCH 34/41] sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
Quoted 7 lines · On Mon, 04 Aug 2025 10:00:27 +0200 "Arnd Bergmann" <[email protected]> wrote:
Quoted 5 lines · Thomas Huth
On 03/08/2025 15.33, John Paul Adrian Glaubitz wrote:
So using -ansi in the kernel sources nowadays sounds wrong to me ... could it be removed?
Quoted 6 lines
Probably: I see that sparc changed '-traditional' cpp flag to the '-ansi' gcc flag in linux-2.1.88, while the others were still using -traditional but just dropped it later.
Most likely the idea at the time was to just no longer use pre-ansi preprocessing rather than to exclude gnu extensions.
You also get a change to the integer promotion rules.
K&R C is signedness preserving (so unsigned char -> unsigned int) whereas ANSI C is value preserving (so unsigned char -> signed int). Unless, of course 'char' and 'int' are the same size.
David
Quoted 3 lines
Arnd
Re: [PATCH 34/41] sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
In reply to John Paul Adrian GlaubitzQuoted 10 lines · John Paul Adrian Glaubitz
Hi Thomas,
Quoted 7 lines · Thomas Huth
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.
...
Quoted 11 lines
This causes the kernel build to fail:
CC [M] drivers/gpu/drm/nouveau/nv04_fence.o CC [M] drivers/gpu/drm/nouveau/nv10_fence.o CC [M] drivers/gpu/drm/nouveau/nv17_fence.o CC [M] drivers/gpu/drm/nouveau/nv50_fence.o CC [M] drivers/gpu/drm/nouveau/nv84_fence.o CC [M] drivers/gpu/drm/nouveau/nvc0_fence.o LD [M] drivers/gpu/drm/nouveau/nouveau.o AR drivers/gpu/built-in.a AR drivers/built-in.a
Quoted 7 lines
make: *** [Makefile:2026: .] Error 2 glaubitz@node54:/data/home/glaubitz/linux> make
CALLscripts/checksyscalls.sh
<stdin>:1519:2: warning: #warning syscall clone3 not implemented [-Wcpp]
ASarch/sparc/kernel/head_64.o./arch/sparc/include/uapi/asm/ptrace.h: Assembler messages:./arch/sparc/include/uapi/asm/ptrace.h:22: Error: Unknown opcode: `struct'
Hi Adrian,
could you please give it another try, after applying this patch first:
https://lore.kernel.org/lkml/[email protected]/
Thanks,
Thomas
Re: [PATCH 34/41] sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
In reply to Thomas HuthQuoted 8 lines · Thomas Huth
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.
Quoted 7 lines
This is a completely mechanical patch (done with a simple "sed -i" statement).
Cc "David S. Miller" <[email protected]>Cc Andreas Larsson <[email protected]>Signed-off-by Thomas Huth <[email protected]>
Picking this up to my for-next.
Thanks,
Andreas
PATCH 35/41 um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers
In reply to Thomas HuthWhile 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, so let's standardize on the __ASSEMBLER__ macro that is provided by the compilers now.
This is a completely mechanical patch (done with a simple "sed -i" statement).
--- arch/um/include/asm/cpufeature.h | 4 ++-- arch/um/include/asm/current.h | 4 ++-- arch/um/include/asm/page.h | 4 ++-- arch/um/include/asm/ptrace-generic.h | 2 +- arch/um/include/asm/thread_info.h | 2 +- arch/um/include/shared/as-layout.h | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-)
arch/um/include/asm/cpufeature.h +2 -2
@@ -4,7 +4,7 @@#include <asm/processor.h> -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) && !defined(__ASSEMBLER__)#include <asm/asm.h> #include <linux/bitops.h>
@@ -137,5 +137,5 @@ static __always_inline bool _static_cpu_has(u16 bit)#define CPU_FEATURE_TYPEVAL boot_cpu_data.x86_vendor, boot_cpu_data.x86, \ boot_cpu_data.x86_model -#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ +#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */ #endif /* _ASM_UM_CPUFEATURE_H */
arch/um/include/asm/current.h +2 -2
@@ -5,7 +5,7 @@#include <linux/compiler.h> #include <linux/threads.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct task_struct ;extern struct task_struct *cpu_tasks[NR_CPUS ];
@@ -18,6 +18,6 @@ static __always_inline struct task_struct *get_current(void)#define current get_current() -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_CURRENT_H */
arch/um/include/asm/page.h +2 -2
@@ -11,7 +11,7 @@#include <vdso/page.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct page ;
@@ -94,7 +94,7 @@ extern unsigned long uml_physmem;#include <asm-generic/memory_model.h> #include <asm-generic/getorder.h> -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #ifdef CONFIG_X86_32 #define __HAVE_ARCH_GATE_AREA 1
arch/um/include/asm/ptrace-generic.h +1 -1
@@ -6,7 +6,7 @@#ifndef __UM_PTRACE_GENERIC_H#define __UM_PTRACE_GENERIC_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <sysdep/ptrace.h>
arch/um/include/asm/thread_info.h +1 -1
@@ -9,7 +9,7 @@#define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/types.h> #include <asm/page.h>
arch/um/include/shared/as-layout.h +1 -1
@@ -26,7 +26,7 @@#define STUB_DATA_PAGES 2/* must be a power of two */ #define STUB_END (STUB_DATA + STUB_DATA_PAGES * UM_KERN_PAGE_SIZE) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <sysdep/ptrace.h>
Signature · 1 line
2.48.1
Johannes Berg
maintainerRe: [PATCH 35/41] um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers
Quoted 10 lines · Thomas Huth
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, so let's standardize on the__ASSEMBLER__macro that is provided by the compilers now.This is a completely mechanical patch (done with a simple "sed -i" statement).
Looks fine, I guess - I'll assume that since it's part of a larger series you'll merge it elsewhere.
johannes
Re: [PATCH 35/41] um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers
In reply to Thomas HuthQuoted 118 lines · Thomas Huth
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, so let's standardize on the__ASSEMBLER__macro that is provided by the compilers now.This is a completely mechanical patch (done with a simple "sed -i" statement).
Cc Richard Weinberger <[email protected]>Cc Anton Ivanov <[email protected]>Cc Johannes Berg <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- arch/um/include/asm/cpufeature.h | 4 ++-- arch/um/include/asm/current.h | 4 ++-- arch/um/include/asm/page.h | 4 ++-- arch/um/include/asm/ptrace-generic.h | 2 +- arch/um/include/asm/thread_info.h | 2 +- arch/um/include/shared/as-layout.h | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-)arch/um/include/asm/cpufeature.h +2
-2@@ -4,7 +4,7 @@#include <asm/processor.h> -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) && !defined(__ASSEMBLER__)#include <asm/asm.h> #include <linux/bitops.h> @@ -137,5 +137,5 @@ static __always_inline bool _static_cpu_has(u16 bit)#define CPU_FEATURE_TYPEVAL boot_cpu_data.x86_vendor, boot_cpu_data.x86, \ boot_cpu_data.x86_model -#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ +#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */ #endif /* _ASM_UM_CPUFEATURE_H */ arch/um/include/asm/current.h +2
-2@@ -5,7 +5,7 @@#include <linux/compiler.h> #include <linux/threads.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct task_struct ;extern struct task_struct *cpu_tasks[NR_CPUS ];@@ -18,6 +18,6 @@ static __always_inline struct task_struct *get_current(void)#define current get_current() -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_CURRENT_H */ arch/um/include/asm/page.h +2
-2@@ -11,7 +11,7 @@#include <vdso/page.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct page ;@@ -94,7 +94,7 @@ extern unsigned long uml_physmem;#include <asm-generic/memory_model.h> #include <asm-generic/getorder.h> -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #ifdef CONFIG_X86_32 #define __HAVE_ARCH_GATE_AREA 1arch/um/include/asm/ptrace-generic.h +1
-1@@ -6,7 +6,7 @@#ifndef __UM_PTRACE_GENERIC_H#define __UM_PTRACE_GENERIC_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <sysdep/ptrace.h> arch/um/include/asm/thread_info.h +1
-1@@ -9,7 +9,7 @@#define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/types.h> #include <asm/page.h> arch/um/include/shared/as-layout.h +0
-0
arch/um/include/shared/as-layout.h line 32
Quoted 8 lines
arch/um/include/shared/as-layout.h +1
-1@@ -26,7 +26,7 @@#define STUB_DATA_PAGES 2/* must be a power of two */ #define STUB_END (STUB_DATA + STUB_DATA_PAGES * UM_KERN_PAGE_SIZE) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <sysdep/ptrace.h>
Friendly ping!
Richard, Anton, Johannes, could you maybe pick this patch up via your "um" tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).
Thanks,
Thomas
PATCH 36/41 x86: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
In reply to Thomas Huth__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.
--- arch/x86/include/uapi/asm/bootparam.h | 4 ++-- arch/x86/include/uapi/asm/e820.h | 4 ++-- arch/x86/include/uapi/asm/ldt.h | 4 ++-- arch/x86/include/uapi/asm/msr.h | 4 ++-- arch/x86/include/uapi/asm/ptrace-abi.h | 6 +++--- arch/x86/include/uapi/asm/ptrace.h | 4 ++-- arch/x86/include/uapi/asm/setup_data.h | 4 ++-- arch/x86/include/uapi/asm/signal.h | 8 ++++---- 8 files changed, 19 insertions(+), 19 deletions(-)
arch/x86/include/uapi/asm/bootparam.h +2 -2
@@ -26,7 +26,7 @@#define XLF_5LEVEL_ENABLED (1<<6)#define XLF_MEM_ENCRYPTION (1<<7) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <linux/screen_info.h>
@@ -210,6 +210,6 @@ enum x86_hardware_subarch { X86_NR_SUBARCHS, }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_BOOTPARAM_H */
arch/x86/include/uapi/asm/e820.h +2 -2
@@ -54,7 +54,7 @@*/ #define E820_RESERVED_KERN 128 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <linux/types.h> struct e820entry { __u64 addr; /* start of memory segment */
@@ -76,7 +76,7 @@ struct e820map {#define BIOS_ROM_BASE 0xffe00000#define BIOS_ROM_END 0xffffffff -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI_ASM_X86_E820_H */
arch/x86/include/uapi/asm/ldt.h +2 -2
@@ -12,7 +12,7 @@/* The size of each LDT entry. */ #define LDT_ENTRY_SIZE 8 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS * not to the default values if you still want to do syscalls. This
@@ -44,5 +44,5 @@ struct user_desc {#define MODIFY_LDT_CONTENTS_STACK 1#define MODIFY_LDT_CONTENTS_CODE 2 -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_LDT_H */
arch/x86/include/uapi/asm/msr.h +2 -2
@@ -2,7 +2,7 @@#ifndef _UAPI_ASM_X86_MSR_H#define _UAPI_ASM_X86_MSR_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <linux/ioctl.h>
@@ -10,5 +10,5 @@#define X86_IOC_RDMSR_REGS _IOWR('c', 0xA0, __u32[8])#define X86_IOC_WRMSR_REGS _IOWR('c', 0xA1, __u32[8]) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI_ASM_X86_MSR_H */
arch/x86/include/uapi/asm/ptrace-abi.h +3 -3
@@ -25,7 +25,7 @@#else /* __i386__ */ -#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS) +#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)/* * C ABI says these regs are callee-preserved. They aren't saved on kernel entry * unless syscall needs a complete, fully filled "struct pt_regs".
@@ -57,7 +57,7 @@#define EFLAGS 144#define RSP 152#define SS 160 -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* top of stack page */ #define FRAME_SIZE 168
@@ -87,7 +87,7 @@#define PTRACE_SINGLEBLOCK 33/* resume execution until next branch */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #endif
arch/x86/include/uapi/asm/ptrace.h +2 -2
@@ -7,7 +7,7 @@#include <asm/processor-flags.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef __i386__/* this struct defines the way the registers are stored on the
@@ -81,6 +81,6 @@ struct pt_regs { -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _UAPI_ASM_X86_PTRACE_H */
arch/x86/include/uapi/asm/setup_data.h +2 -2
@@ -18,7 +18,7 @@#define SETUP_INDIRECT (1<<31)#define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -78,6 +78,6 @@ struct ima_setup_data {__u64 size; } __attribute__((packed)); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI_ASM_X86_SETUP_DATA_H */
arch/x86/include/uapi/asm/signal.h +4 -4
@@ -2,7 +2,7 @@#ifndef _UAPI_ASM_X86_SIGNAL_H#define _UAPI_ASM_X86_SIGNAL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <linux/compiler.h>
@@ -16,7 +16,7 @@ struct siginfo;typedef unsigned long sigset_t ;#endif /* __KERNEL__ */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define SIGHUP 1
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;#include <asm-generic/signal-defs.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__# ifndef __KERNEL__
@@ -106,6 +106,6 @@ typedef struct sigaltstack {__kernel_size_t ss_size; } stack_t; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI_ASM_X86_SIGNAL_H */
Signature · 1 line
2.48.1
PATCH 37/41 x86: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
In reply to Thomas HuthWhile 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 is mostly a mechanical patch (done with a simple "sed -i" statement), with some manual tweaks in arch/x86/include/asm/frame.h, arch/x86/include/asm/hw_irq.h and arch/x86/include/asm/setup.h that mentioned this macro in comments with some missing underscores.
--- arch/x86/boot/boot.h | 4 ++-- arch/x86/entry/vdso/extable.h | 2 +- arch/x86/include/asm/alternative.h | 6 +++--- arch/x86/include/asm/asm.h | 10 +++++----- arch/x86/include/asm/boot.h | 2 +- arch/x86/include/asm/cpufeature.h | 4 ++-- arch/x86/include/asm/cpumask.h | 4 ++-- arch/x86/include/asm/current.h | 4 ++-- arch/x86/include/asm/desc_defs.h | 4 ++-- arch/x86/include/asm/dwarf2.h | 2 +- arch/x86/include/asm/fixmap.h | 4 ++-- arch/x86/include/asm/frame.h | 10 +++++----- arch/x86/include/asm/fred.h | 4 ++-- arch/x86/include/asm/fsgsbase.h | 4 ++-- arch/x86/include/asm/ftrace.h | 8 ++++---- arch/x86/include/asm/hw_irq.h | 4 ++-- arch/x86/include/asm/ibt.h | 12 ++++++------ arch/x86/include/asm/idtentry.h | 6 +++--- arch/x86/include/asm/inst.h | 2 +- arch/x86/include/asm/irqflags.h | 10 +++++----- arch/x86/include/asm/jump_label.h | 4 ++-- arch/x86/include/asm/kasan.h | 2 +- arch/x86/include/asm/kexec.h | 4 ++-- arch/x86/include/asm/linkage.h | 6 +++--- arch/x86/include/asm/mem_encrypt.h | 4 ++-- arch/x86/include/asm/msr.h | 4 ++-- arch/x86/include/asm/nops.h | 2 +- arch/x86/include/asm/nospec-branch.h | 6 +++--- arch/x86/include/asm/orc_types.h | 4 ++-- arch/x86/include/asm/page.h | 4 ++-- arch/x86/include/asm/page_32.h | 4 ++-- arch/x86/include/asm/page_32_types.h | 4 ++-- arch/x86/include/asm/page_64.h | 4 ++-- arch/x86/include/asm/page_64_types.h | 2 +- arch/x86/include/asm/page_types.h | 4 ++-- arch/x86/include/asm/paravirt.h | 14 +++++++------- arch/x86/include/asm/paravirt_types.h | 4 ++-- arch/x86/include/asm/percpu.h | 6 +++--- arch/x86/include/asm/pgtable-2level_types.h | 4 ++-- arch/x86/include/asm/pgtable-3level_types.h | 4 ++-- arch/x86/include/asm/pgtable-invert.h | 4 ++-- arch/x86/include/asm/pgtable.h | 12 ++++++------ arch/x86/include/asm/pgtable_32.h | 4 ++-- arch/x86/include/asm/pgtable_32_areas.h | 2 +- arch/x86/include/asm/pgtable_64.h | 6 +++--- arch/x86/include/asm/pgtable_64_types.h | 4 ++-- arch/x86/include/asm/pgtable_types.h | 10 +++++----- arch/x86/include/asm/prom.h | 4 ++-- arch/x86/include/asm/pti.h | 4 ++-- arch/x86/include/asm/ptrace.h | 4 ++-- arch/x86/include/asm/purgatory.h | 4 ++-- arch/x86/include/asm/pvclock-abi.h | 4 ++-- arch/x86/include/asm/realmode.h | 4 ++-- arch/x86/include/asm/segment.h | 8 ++++---- arch/x86/include/asm/setup.h | 6 +++--- arch/x86/include/asm/setup_data.h | 4 ++-- arch/x86/include/asm/shared/tdx.h | 4 ++-- arch/x86/include/asm/shstk.h | 4 ++-- arch/x86/include/asm/signal.h | 8 ++++---- arch/x86/include/asm/smap.h | 6 +++--- arch/x86/include/asm/smp.h | 4 ++-- arch/x86/include/asm/tdx.h | 4 ++-- arch/x86/include/asm/thread_info.h | 12 ++++++------ arch/x86/include/asm/unwind_hints.h | 4 ++-- arch/x86/include/asm/vdso/getrandom.h | 4 ++-- arch/x86/include/asm/vdso/gettimeofday.h | 4 ++-- arch/x86/include/asm/vdso/processor.h | 4 ++-- arch/x86/include/asm/vdso/vsyscall.h | 4 ++-- arch/x86/include/asm/xen/interface.h | 10 +++++----- arch/x86/include/asm/xen/interface_32.h | 4 ++-- arch/x86/include/asm/xen/interface_64.h | 4 ++-- arch/x86/math-emu/control_w.h | 2 +- arch/x86/math-emu/exception.h | 6 +++--- arch/x86/math-emu/fpu_emu.h | 6 +++--- arch/x86/math-emu/status_w.h | 6 +++--- arch/x86/realmode/rm/realmode.h | 4 ++-- arch/x86/realmode/rm/wakeup.h | 2 +- tools/arch/x86/include/asm/asm.h | 8 ++++---- tools/arch/x86/include/asm/nops.h | 2 +- tools/arch/x86/include/asm/orc_types.h | 4 ++-- tools/arch/x86/include/asm/pvclock-abi.h | 4 ++-- 81 files changed, 202 insertions(+), 202 deletions(-)
arch/x86/boot/boot.h +2 -2
@@ -16,7 +16,7 @@#define STACK_SIZE 1024/* Minimum number of bytes for stack */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stdarg.h> #include <linux/types.h>
@@ -327,6 +327,6 @@ void probe_cards(int unsafe);/* video-vesa.c */ void vesa_store_edid (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* BOOT_BOOT_H */
arch/x86/entry/vdso/extable.h +1 -1
@@ -7,7 +7,7 @@* vDSO uses a dedicated handler the addresses are relative to the overall * exception table, not each individual entry. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _ASM_VDSO_EXTABLE_HANDLE (from, to) \ ASM_VDSO_EXTABLE_HANDLE from to
arch/x86/include/asm/alternative.h +3 -3
@@ -15,7 +15,7 @@#define ALT_DIRECT_CALL (feature) ((ALT_FLAG_DIRECT_CALL << ALT_FLAGS_SHIFT) | (feature))#define ALT_CALL_ALWAYS ALT_DIRECT_CALL(X86_FEATURE_ALWAYS) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stddef.h>
@@ -286,7 +286,7 @@ static inline int alternatives_text_reserved(void *start, void *end)void BUG_func (void );void nop_func (void ); -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_SMP .macro LOCK_PREFIX
@@ -369,6 +369,6 @@ void nop_func(void); ALTERNATIVE_2 oldinstr, newinstr_no, X86_FEATURE_ALWAYS, \ newinstr_yes, ft_flags -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_ALTERNATIVE_H */
arch/x86/include/asm/asm.h +5 -5
@@ -2,7 +2,7 @@#ifndef _ASM_X86_ASM_H#define _ASM_X86_ASM_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define __ASM_FORM (x, ...) x,## __VA_ARGS__# define __ASM_FORM_RAW (x, ...) x,## __VA_ARGS__# define __ASM_FORM_COMMA (x, ...) x,## __VA_ARGS__,
@@ -113,7 +113,7 @@#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #ifndef __pic__ static __always_inline __pure void *rip_rel_ptr(void *p) {
@@ -144,7 +144,7 @@ static __always_inline __pure void *rip_rel_ptr(void *p)# include <asm/extable_fixup_types.h> /* Exception table entry */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define _ASM_EXTABLE_TYPE (from, to, type) \ .pushsection "__ex_table","a" ; \
@@ -164,7 +164,7 @@ static __always_inline __pure void *rip_rel_ptr(void *p)# define _ASM_NOKPROBE (entry)# endif -#else /* ! __ASSEMBLY__ */ +#else /* ! __ASSEMBLER__ */ # define DEFINE_EXTABLE_TYPE_REG \ ".macro extable_type_reg type:req reg:req\n" \
@@ -221,7 +221,7 @@ static __always_inline __pure void *rip_rel_ptr(void *p)*/ registerunsigned long current_stack_pointer asm (_ASM_SP );#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define _ASM_EXTABLE (from, to) \ _ASM_EXTABLE_TYPE(from, to, EX_TYPE_DEFAULT)
arch/x86/include/asm/boot.h +1 -1
@@ -74,7 +74,7 @@# define BOOT_STACK_SIZE 0x1000#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned int output_len;extern const unsigned long kernel_text_size;extern const unsigned long kernel_total_size;
arch/x86/include/asm/cpufeature.h +2 -2
@@ -4,7 +4,7 @@#include <asm/processor.h> -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) && !defined(__ASSEMBLER__)#include <asm/asm.h> #include <linux/bitops.h>
@@ -208,5 +208,5 @@ static __always_inline bool _static_cpu_has(u16 bit)#define CPU_FEATURE_TYPEVAL boot_cpu_data.x86_vendor, boot_cpu_data.x86, \ boot_cpu_data.x86_model -#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ +#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */ #endif /* _ASM_X86_CPUFEATURE_H */
arch/x86/include/asm/cpumask.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_CPUMASK_H#define _ASM_X86_CPUMASK_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cpumask.h> extern void setup_cpu_local_masks (void );
@@ -34,5 +34,5 @@ static __always_inline void arch_cpumask_clear_cpu(int cpu, struct cpumask *dstp#define arch_cpu_is_offline (cpu) unlikely(!arch_cpu_online(cpu)) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_CPUMASK_H */
arch/x86/include/asm/current.h +2 -2
@@ -5,7 +5,7 @@#include <linux/build_bug.h> #include <linux/compiler.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cache.h> #include <asm/percpu.h>
@@ -51,6 +51,6 @@ static __always_inline struct task_struct *get_current(void)#define current get_current() -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_CURRENT_H */
arch/x86/include/asm/desc_defs.h +2 -2
@@ -58,7 +58,7 @@#define DESC_USER (_DESC_DPL(3)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -166,7 +166,7 @@ struct desc_ptr {unsigned long address; } __attribute__((packed)) ; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* Boot IDT definitions */ #define BOOT_IDT_ENTRIES 32
arch/x86/include/asm/dwarf2.h +1 -1
@@ -2,7 +2,7 @@#ifndef _ASM_X86_DWARF2_H#define _ASM_X86_DWARF2_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#warning "asm/dwarf2.h should be only included in pure assembly files"#endif
arch/x86/include/asm/fixmap.h +2 -2
@@ -31,7 +31,7 @@/* fixmap starts downwards from the 507th entry in level2_fixmap_pgt */ #define FIXMAP_PMD_TOP 507 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/kernel.h> #include <asm/apicdef.h> #include <asm/page.h>
@@ -196,5 +196,5 @@ void __init *early_memremap_decrypted_wp(resource_size_t phys_addr,void __early_set_fixmap (enum fixed_addresses idx,phys_addr_t phys,pgprot_t flags); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_FIXMAP_H */
arch/x86/include/asm/frame.h +5 -5
@@ -11,7 +11,7 @@#ifdef CONFIG_FRAME_POINTER -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro FRAME_BEGIN push %_ASM_BP
@@ -51,7 +51,7 @@ .endm#endif /* CONFIG_X86_64 */ -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ #define FRAME_BEGIN \ "push %" _ASM_BP "\n" \
@@ -82,18 +82,18 @@ static inline unsigned long encode_frame_pointer(struct pt_regs *regs)#endif /* CONFIG_X86_64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define FRAME_OFFSET __ASM_SEL(4, 8)#else /* !CONFIG_FRAME_POINTER */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro ENCODE_FRAME_POINTER ptregs_offset=0 .endm -#else /* !__ASSEMBLY */ +#else /* !__ASSEMBLER__ */ #define ENCODE_FRAME_POINTER
arch/x86/include/asm/fred.h +2 -2
@@ -32,7 +32,7 @@#define FRED_CONFIG_INT_STKLVL (l) (_AT(unsigned long, l) << 9)#define FRED_CONFIG_ENTRYPOINT (p) _AT(unsigned long, (p)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_X86_FRED #include <linux/kernel.h>
@@ -113,6 +113,6 @@ static inline void fred_entry_from_kvm(unsigned int type, unsigned int vector) {static inline void fred_sync_rsp0 (unsigned long rsp0) { }static inline void fred_update_rsp0 (void ) { }#endif /* CONFIG_X86_FRED */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* ASM_X86_FRED_H */
arch/x86/include/asm/fsgsbase.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_FSGSBASE_H#define _ASM_FSGSBASE_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_X86_64
@@ -80,6 +80,6 @@ extern unsigned long x86_fsgsbase_read_task(struct task_struct *task,#endif /* CONFIG_X86_64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_FSGSBASE_H */
arch/x86/include/asm/ftrace.h +4 -4
@@ -22,7 +22,7 @@#define ARCH_SUPPORTS_FTRACE_OPS 1#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void __fentry__ (void );static inline unsigned long ftrace_call_adjust (unsigned long addr)
@@ -118,11 +118,11 @@ struct dyn_arch_ftrace { };#endif /* CONFIG_DYNAMIC_FTRACE */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_FUNCTION_TRACER */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void prepare_ftrace_return (unsigned long ip,unsigned long *parent,unsigned long frame_pointer);
@@ -166,6 +166,6 @@ static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs) }#endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_IA32_EMULATION */ #endif /* !COMPILE_OFFSETS */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_FTRACE_H */
arch/x86/include/asm/hw_irq.h +2 -2
@@ -16,7 +16,7 @@#include <asm/irq_vectors.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/percpu.h> #include <linux/profile.h>
@@ -128,6 +128,6 @@ extern char spurious_entries_start[];typedef struct irq_desc *vector_irq_t [NR_VECTORS ];DECLARE_PER_CPU (vector_irq_t, vector_irq); -#endif /* !ASSEMBLY_ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_HW_IRQ_H */
arch/x86/include/asm/ibt.h +6 -6
@@ -21,7 +21,7 @@#define HAS_KERNEL_IBT 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_X86_64 #define ASM_ENDBR "endbr64\n\t"
@@ -77,7 +77,7 @@ static inline bool is_endbr(u32 val) extern __noendbr u64 ibt_save(bool disable); extern __noendbr void ibt_restore(u64 save); -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_X86_64 #define ENDBR endbr64
@@ -85,13 +85,13 @@ extern __noendbr void ibt_restore(u64 save);#define ENDBR endbr32#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #else /* !IBT */ #define HAS_KERNEL_IBT 0 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define ASM_ENDBR #define IBT_NOSEAL (name)
@@ -103,11 +103,11 @@ static inline bool is_endbr(u32 val) { return false; }static inline u64 ibt_save (bool disable) {return 0 ; }static inline void ibt_restore (u64 save) { } -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #define ENDBR -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_X86_KERNEL_IBT */
arch/x86/include/asm/idtentry.h +3 -3
@@ -7,7 +7,7 @@#define IDT_ALIGN (8 * (1 + HAS_KERNEL_IBT)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/entry-common.h> #include <linux/hardirq.h>
@@ -474,7 +474,7 @@ static inline void fred_install_sysvec(unsigned int vector, const idtentry_t fun idt_install_sysvec(vector, asm_##function); \ } -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ /* * The ASM variants for DECLARE_IDTENTRY*() which emit the ASM entry stubs.
@@ -579,7 +579,7 @@ SYM_CODE_START(spurious_entries_start) SYM_CODE_END(spurious_entries_start)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * The actual entry points. Note that DECLARE_IDTENTRY*() serves two
arch/x86/include/asm/inst.h +1 -1
@@ -6,7 +6,7 @@#ifndef X86_ASM_INST_H #define X86_ASM_INST_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define REG_NUM_INVALID 100
arch/x86/include/asm/irqflags.h +5 -5
@@ -4,7 +4,7 @@#include <asm/processor-flags.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/nospec-branch.h>
@@ -79,7 +79,7 @@ static __always_inline void native_local_irq_restore(unsigned long flags)#ifdef CONFIG_PARAVIRT_XXL #include <asm/paravirt.h> #else -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> static __always_inline unsigned long arch_local_save_flags (void )
@@ -133,10 +133,10 @@ static __always_inline unsigned long arch_local_irq_save(void)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_PARAVIRT_XXL */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ static __always_inline int arch_irqs_disabled_flags(unsigned long flags) {return !(flags &X86_EFLAGS_IF );
@@ -154,6 +154,6 @@ static __always_inline void arch_local_irq_restore(unsigned long flags)if (!arch_irqs_disabled_flags (flags))arch_local_irq_enable (); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif
arch/x86/include/asm/jump_label.h +2 -2
@@ -7,7 +7,7 @@#include <asm/asm.h> #include <asm/nops.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stringify.h> #include <linux/types.h>
@@ -55,6 +55,6 @@ static __always_inline bool arch_static_branch_jump(struct static_key * const keextern int arch_jump_entry_size (struct jump_entry *entry); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/x86/include/asm/kasan.h +1 -1
@@ -23,7 +23,7 @@ (1ULL << (__VIRTUAL_MASK_SHIFT - \ KASAN_SHADOW_SCALE_SHIFT))) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_KASAN void __init kasan_early_init (void );
arch/x86/include/asm/kexec.h +2 -2
@@ -13,7 +13,7 @@# define KEXEC_CONTROL_PAGE_SIZE 4096# define KEXEC_CONTROL_CODE_MAX_SIZE 2048 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/string.h> #include <linux/kernel.h>
@@ -225,6 +225,6 @@ unsigned int arch_crash_get_elfcorehdr_size(void);#define crash_get_elfcorehdr_size arch_crash_get_elfcorehdr_size#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_KEXEC_H */
arch/x86/include/asm/linkage.h +3 -3
@@ -38,7 +38,7 @@#define ASM_FUNC_ALIGN __stringify(__FUNC_ALIGN)#define SYM_F_ALIGN __FUNC_ALIGN -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#if defined(CONFIG_MITIGATION_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define RET jmp __x86_return_thunk
@@ -50,7 +50,7 @@#endif #endif /* CONFIG_MITIGATION_RETPOLINE */ -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #if defined(CONFIG_MITIGATION_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define ASM_RET "jmp __x86_return_thunk\n\t"
@@ -62,7 +62,7 @@#endif #endif /* CONFIG_MITIGATION_RETPOLINE */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * Depending on -fpatchable-function-entry=N,N usage (CONFIG_CALL_PADDING) the
arch/x86/include/asm/mem_encrypt.h +2 -2
@@ -10,7 +10,7 @@#ifndef __X86_MEM_ENCRYPT_H__#define __X86_MEM_ENCRYPT_H__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/init.h> #include <linux/cc_platform.h>
@@ -114,6 +114,6 @@ void add_encrypt_protection_map(void);extern char __start_bss_decrypted[], __end_bss_decrypted[], __start_bss_decrypted_unused[]; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __X86_MEM_ENCRYPT_H__ */
arch/x86/include/asm/msr.h +2 -2
@@ -4,7 +4,7 @@#include "msr-index.h" -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/asm.h> #include <asm/errno.h>
@@ -397,5 +397,5 @@ static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])return wrmsr_safe_regs (regs); }#endif /* CONFIG_SMP */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_MSR_H */
arch/x86/include/asm/nops.h +1 -1
@@ -82,7 +82,7 @@#define ASM_NOP7 _ASM_BYTES(BYTES_NOP7)#define ASM_NOP8 _ASM_BYTES(BYTES_NOP8) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern const unsigned char *const x86_nops[];#endif
arch/x86/include/asm/nospec-branch.h +3 -3
@@ -177,7 +177,7 @@ add $(BITS_PER_LONG/8), %_ASM_SP; \ lfence; -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__/* * (ab)use RETPOLINE_SAFE on RET to annotate away 'bare' RET instructions
@@ -335,7 +335,7 @@#define CLEAR_BRANCH_HISTORY_VMEXIT #endif -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ typedef u8 retpoline_thunk_t [RETPOLINE_THUNK_SIZE ];extern retpoline_thunk_t __x86_indirect_thunk_array[];
@@ -602,6 +602,6 @@ static __always_inline void mds_idle_clear_cpu_buffers(void)mds_clear_cpu_buffers (); } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_NOSPEC_BRANCH_H_ */
arch/x86/include/asm/orc_types.h +2 -2
@@ -45,7 +45,7 @@#define ORC_TYPE_REGS 3#define ORC_TYPE_REGS_PARTIAL 4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/byteorder.h> /*
@@ -73,6 +73,6 @@ struct orc_entry {#endif } __packed; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ORC_TYPES_H */
arch/x86/include/asm/page.h +2 -2
@@ -14,7 +14,7 @@#include <asm/page_32.h> #endif /* CONFIG_X86_64 */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct page ;
@@ -84,7 +84,7 @@ static __always_inline u64 __is_canonical_address(u64 vaddr, u8 vaddr_bits) return __canonical_address(vaddr, vaddr_bits) == vaddr; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #include <asm-generic/memory_model.h> #include <asm-generic/getorder.h>
arch/x86/include/asm/page_32.h +2 -2
@@ -4,7 +4,7 @@#include <asm/page_32_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __phys_addr_nodebug (x) ((x) - PAGE_OFFSET)#ifdef CONFIG_DEBUG_VIRTUAL
@@ -26,6 +26,6 @@ static inline void copy_page(void *to, void *from) {memcpy (to, from,PAGE_SIZE ); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PAGE_32_H */
arch/x86/include/asm/page_32_types.h +2 -2
@@ -63,7 +63,7 @@*/ #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This much address space is reserved for vmalloc() and iomap()
@@ -75,6 +75,6 @@ extern int sysctl_legacy_va_layout;extern void find_low_pfn_range (void );extern void setup_bootmem_allocator (void ); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PAGE_32_DEFS_H */
arch/x86/include/asm/page_64.h +2 -2
@@ -4,7 +4,7 @@#include <asm/page_64_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/cpufeatures.h> #include <asm/alternative.h>
@@ -94,7 +94,7 @@ static __always_inline unsigned long task_size_max(void) }#endif /* CONFIG_X86_5LEVEL */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_X86_VSYSCALL_EMULATION # define __HAVE_ARCH_GATE_AREA 1
arch/x86/include/asm/page_64_types.h +1 -1
@@ -2,7 +2,7 @@#ifndef _ASM_X86_PAGE_64_DEFS_H#define _ASM_X86_PAGE_64_DEFS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/kaslr.h> #endif
arch/x86/include/asm/page_types.h +2 -2
@@ -43,7 +43,7 @@#define IOREMAP_MAX_ORDER (PMD_SHIFT)#endif /* CONFIG_X86_64 */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_DYNAMIC_PHYSICAL_MASK extern phys_addr_t physical_mask;
@@ -66,6 +66,6 @@ bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn);extern void initmem_init (void ); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PAGE_DEFS_H */
arch/x86/include/asm/paravirt.h +7 -7
@@ -6,7 +6,7 @@#include <asm/paravirt_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct mm_struct ;#endif
@@ -15,7 +15,7 @@ struct mm_struct;#include <asm/asm.h> #include <asm/nospec-branch.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/bug.h> #include <linux/types.h> #include <linux/cpumask.h>
@@ -720,7 +720,7 @@ static __always_inline unsigned long arch_local_irq_save(void)extern void default_banner (void );void native_pv_lock_init (void )__init ; -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_X86_64 #ifdef CONFIG_PARAVIRT_XXL
@@ -740,18 +740,18 @@ void native_pv_lock_init(void) __init;#endif /* CONFIG_PARAVIRT_XXL */ #endif /* CONFIG_X86_64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #else /* CONFIG_PARAVIRT */ # define default_banner x86_init_noop -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline void native_pv_lock_init (void ) { }#endif #endif /* !CONFIG_PARAVIRT */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #ifndef CONFIG_PARAVIRT_XXL static inline void paravirt_enter_mmap(struct mm_struct *mm) {
@@ -769,5 +769,5 @@ static inline void paravirt_set_cap(void) { }#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PARAVIRT_H */
arch/x86/include/asm/paravirt_types.h +2 -2
@@ -4,7 +4,7 @@#ifdef CONFIG_PARAVIRT -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/desc_defs.h>
@@ -519,7 +519,7 @@ unsigned long pv_native_read_cr2(void);#define paravirt_nop ((void *)nop_func) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define ALT_NOT_XEN ALT_NOT(X86_FEATURE_XENPV)
arch/x86/include/asm/percpu.h +3 -3
@@ -10,7 +10,7 @@# define __percpu_rel#endif -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#ifdef CONFIG_SMP # define __percpu %__percpu_seg:
@@ -26,7 +26,7 @@# define INIT_PER_CPU_VAR (var) var#endif -#else /* !__ASSEMBLY__: */ +#else /* !__ASSEMBLER__: */ #include <linux/build_bug.h> #include <linux/stringify.h>
@@ -619,7 +619,7 @@ do { \/* We can use this directly for local CPU (faster). */ DECLARE_PER_CPU_READ_MOSTLY(unsigned long, this_cpu_off); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_SMP
arch/x86/include/asm/pgtable-2level_types.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_PGTABLE_2LEVEL_DEFS_H#define _ASM_X86_PGTABLE_2LEVEL_DEFS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> typedef unsigned long pteval_t ;
@@ -16,7 +16,7 @@ typedef union {pteval_t pte; pteval_t pte_low; } pte_t; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define SHARED_KERNEL_PMD 0
arch/x86/include/asm/pgtable-3level_types.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H#define _ASM_X86_PGTABLE_3LEVEL_DEFS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> typedef u64 pteval_t ;
@@ -25,7 +25,7 @@ typedef union { };pmdval_t pmd; } pmd_t; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define SHARED_KERNEL_PMD (!static_cpu_has(X86_FEATURE_PTI))
arch/x86/include/asm/pgtable-invert.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_PGTABLE_INVERT_H#define _ASM_PGTABLE_INVERT_H 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * A clear pte value is special, and doesn't get inverted.
@@ -36,6 +36,6 @@ static inline u64 flip_protnone_guard(u64 oldval, u64 val, u64 mask)return val; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/x86/include/asm/pgtable.h +6 -6
@@ -15,7 +15,7 @@ cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS))) \ : (prot)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/spinlock.h> #include <asm/x86_init.h> #include <asm/pkru.h>
@@ -973,7 +973,7 @@ static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd) }#endif /* CONFIG_MITIGATION_PAGE_TABLE_ISOLATION */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #ifdef CONFIG_X86_32
@@ -982,7 +982,7 @@ static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)# include <asm/pgtable_64.h> #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/mm_types.h> #include <linux/mmdebug.h> #include <linux/log2.h>
@@ -1233,12 +1233,12 @@ static inline int pgd_none(pgd_t pgd) }#endif /* CONFIG_PGTABLE_LEVELS > 4 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET)#define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern int direct_gbpages;void init_mem_mapping (void );
@@ -1812,6 +1812,6 @@ bool arch_is_platform_page(u64 paddr);WARN_ON_ONCE (pgd_present (*pgdp) && !pgd_same (*pgdp, pgd)); \set_pgd (pgdp, pgd); \ }) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PGTABLE_H */
arch/x86/include/asm/pgtable_32.h +2 -2
@@ -13,7 +13,7 @@* This file contains the functions and defines necessary to modify and use * the i386 page table tree. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/processor.h> #include <linux/threads.h> #include <asm/paravirt.h>
@@ -45,7 +45,7 @@ do { \flush_tlb_one_kernel ((vaddr)); \ } while (0) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * This is used to calculate the .brk reservation for initial pagetables.
arch/x86/include/asm/pgtable_32_areas.h +1 -1
@@ -13,7 +13,7 @@*/ #define VMALLOC_OFFSET (8 * 1024 * 1024) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern bool __vmalloc_start_set;/* set once high_memory is set */ #endif
arch/x86/include/asm/pgtable_64.h +3 -3
@@ -5,7 +5,7 @@#include <linux/const.h> #include <asm/pgtable_64_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This file contains the functions and defines necessary to modify and use
@@ -270,7 +270,7 @@ static inline bool gup_fast_permitted(unsigned long start, unsigned long end)#include <asm/pgtable-invert.h> -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #define l4_index (x) (((x) >> 39) & 511)#define pud_index (x) (((x) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
@@ -291,5 +291,5 @@ L3_START_KERNEL = pud_index(__START_KERNEL_map) i = i +1 ; \ .endr -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PGTABLE_64_H */
arch/x86/include/asm/pgtable_64_types.h +2 -2
@@ -4,7 +4,7 @@#include <asm/sparsemem.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/kaslr.h>
@@ -44,7 +44,7 @@ static inline bool pgtable_l5_enabled(void)extern unsigned int pgdir_shift;extern unsigned int ptrs_per_p4d; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define SHARED_KERNEL_PMD 0
arch/x86/include/asm/pgtable_types.h +5 -5
@@ -164,7 +164,7 @@* to have the WB mode at index 0 (all bits clear). This is the default * right now and likely would break too much if changed. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__enum page_cache_mode { _PAGE_CACHE_MODE_WB =0 , _PAGE_CACHE_MODE_WC = 1,
@@ -239,7 +239,7 @@ enum page_cache_mode {#define __PAGE_KERNEL_IO_NOCACHE __PAGE_KERNEL_NOCACHE -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __PAGE_KERNEL_ENC (__PAGE_KERNEL | _ENC)#define __PAGE_KERNEL_ENC_WP (__PAGE_KERNEL_WP | _ENC)
@@ -262,7 +262,7 @@ enum page_cache_mode {#define PAGE_KERNEL_IO __pgprot_mask(__PAGE_KERNEL_IO)#define PAGE_KERNEL_IO_NOCACHE __pgprot_mask(__PAGE_KERNEL_IO_NOCACHE) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * early identity mapping pte attrib macros.
@@ -281,7 +281,7 @@ enum page_cache_mode {# include <asm/pgtable_64_types.h> #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -580,6 +580,6 @@ extern int __init kernel_map_pages_in_pgd(pgd_t *pgd, u64 pfn, unsigned long page_flags);extern int __init kernel_unmap_pages_in_pgd (pgd_t *pgd,unsigned long address,unsigned long numpages); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PGTABLE_DEFS_H */
arch/x86/include/asm/prom.h +2 -2
@@ -8,7 +8,7 @@#ifndef _ASM_X86_PROM_H#define _ASM_X86_PROM_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/of.h> #include <linux/types.h>
@@ -33,5 +33,5 @@ static inline void x86_flattree_get_config(void) { }extern char cmd_line[COMMAND_LINE_SIZE ]; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/x86/include/asm/pti.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PTI_H#define _ASM_X86_PTI_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION extern void pti_init (void );
@@ -11,5 +11,5 @@ extern void pti_finalize(void);static inline void pti_check_boottime_disable (void ) { }#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PTI_H */
arch/x86/include/asm/ptrace.h +2 -2
@@ -6,7 +6,7 @@#include <asm/page_types.h> #include <uapi/asm/ptrace.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef __i386__ struct pt_regs {
@@ -469,5 +469,5 @@ extern int do_set_thread_area(struct task_struct *p, int idx,# define do_set_thread_area_64 (p, s, t) (0)#endif -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PTRACE_H */
arch/x86/include/asm/purgatory.h +2 -2
@@ -2,10 +2,10 @@#ifndef _ASM_X86_PURGATORY_H#define _ASM_X86_PURGATORY_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/purgatory.h> extern void purgatory (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_PURGATORY_H */
arch/x86/include/asm/pvclock-abi.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PVCLOCK_ABI_H#define _ASM_X86_PVCLOCK_ABI_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * These structs MUST NOT be changed.
@@ -44,5 +44,5 @@ struct pvclock_wall_clock {#define PVCLOCK_GUEST_STOPPED (1 << 1)/* PVCLOCK_COUNTS_FROM_ZERO broke ABI and can't be used anymore. */ #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PVCLOCK_ABI_H */
arch/x86/include/asm/realmode.h +2 -2
@@ -9,7 +9,7 @@#define TH_FLAGS_SME_ACTIVE_BIT 0#define TH_FLAGS_SME_ACTIVE BIT(TH_FLAGS_SME_ACTIVE_BIT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/io.h>
@@ -95,6 +95,6 @@ void reserve_real_mode(void);void load_trampoline_pgtable (void );void init_real_mode (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ARCH_X86_REALMODE_H */
arch/x86/include/asm/segment.h +4 -4
@@ -233,7 +233,7 @@#define VDSO_CPUNODE_BITS 12#define VDSO_CPUNODE_MASK 0xfff -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Helper functions to store/load CPU and node numbers */
@@ -265,7 +265,7 @@ static inline void vdso_read_cpunode(unsigned *cpu, unsigned *node) *node = (p >> VDSO_CPUNODE_BITS); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef __KERNEL__
@@ -286,7 +286,7 @@ static inline void vdso_read_cpunode(unsigned *cpu, unsigned *node)*/ #define XEN_EARLY_IDT_HANDLER_SIZE (8 + ENDBR_INSN_SIZE) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern const char early_idt_handler_array[NUM_EXCEPTION_VECTORS ][EARLY_IDT_HANDLER_SIZE ];extern void early_ignore_irq (void );
@@ -350,7 +350,7 @@ static inline void __loadsegment_fs(unsigned short value)#define savesegment (seg, value) \ asm("mov %%" #seg ",%0":"=r" (value) : : "memory") -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __KERNEL__ */ #endif /* _ASM_X86_SEGMENT_H */
arch/x86/include/asm/setup.h +3 -3
@@ -27,7 +27,7 @@#define OLD_CL_ADDRESS 0x020/* Relative to real mode data */ #define NEW_CL_POINTER 0x228/* Relative to real mode data */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cache.h> #include <asm/bootparam.h>
@@ -141,7 +141,7 @@ extern bool builtin_cmdline_added __ro_after_init;#define builtin_cmdline_added 0#endif -#else /* __ASSEMBLY */ +#else /* __ASSEMBLER__ */ .macro __RESERVE_BRK name, size .pushsection .bss..brk, "aw"
@@ -153,6 +153,6 @@ SYM_DATA_END(__brk_\name)#define RESERVE_BRK (name, size) __RESERVE_BRK name, size -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SETUP_H */
arch/x86/include/asm/setup_data.h +2 -2
@@ -4,7 +4,7 @@#include <uapi/asm/setup_data.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct pci_setup_rom { struct setup_data data;
@@ -27,6 +27,6 @@ struct efi_setup_data {u64 reserved[8 ]; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SETUP_DATA_H */
arch/x86/include/asm/shared/tdx.h +2 -2
@@ -106,7 +106,7 @@#define TDX_PS_1G 2#define TDX_PS_NR (TDX_PS_1G + 1) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler_attributes.h>
@@ -177,5 +177,5 @@ static __always_inline u64 hcall_func(u64 exit_reason)return exit_reason; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_SHARED_TDX_H */
arch/x86/include/asm/shstk.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_SHSTK_H#define _ASM_X86_SHSTK_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> struct task_struct ;
@@ -37,6 +37,6 @@ static inline int shstk_update_last_frame(unsigned long val) { return 0; }static inline bool shstk_is_enabled (void ) {return false; }#endif /* CONFIG_X86_USER_SHADOW_STACK */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SHSTK_H */
arch/x86/include/asm/signal.h +4 -4
@@ -2,7 +2,7 @@#ifndef _ASM_X86_SIGNAL_H#define _ASM_X86_SIGNAL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/linkage.h> /* Most things should be clean enough to redefine this at will, if care
@@ -28,9 +28,9 @@ typedef struct {#define SA_IA32_ABI 0x02000000u#define SA_X32_ABI 0x01000000u -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #include <uapi/asm/signal.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __ARCH_HAS_SA_RESTORER
@@ -101,5 +101,5 @@ struct pt_regs;#endif /* !__i386__ */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SIGNAL_H */
arch/x86/include/asm/smap.h +3 -3
@@ -13,7 +13,7 @@#include <asm/cpufeatures.h> #include <asm/alternative.h> -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define ASM_CLAC \ ALTERNATIVE "", "clac", X86_FEATURE_SMAP
@@ -21,7 +21,7 @@#define ASM_STAC \ ALTERNATIVE "", "stac", X86_FEATURE_SMAP -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ static __always_inline void clac(void) {
@@ -61,6 +61,6 @@ static __always_inline void smap_restore(unsigned long flags)#define ASM_STAC \ ALTERNATIVE("", "stac", X86_FEATURE_SMAP) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SMAP_H */
arch/x86/include/asm/smp.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_SMP_H#define _ASM_X86_SMP_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cpumask.h> #include <asm/cpumask.h>
@@ -175,7 +175,7 @@ extern void nmi_selftest(void);extern unsigned int smpboot_control;extern unsigned long apic_mmio_base; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* Control bits for startup_64 */ #define STARTUP_READ_APICID 0x80000000
arch/x86/include/asm/tdx.h +2 -2
@@ -30,7 +30,7 @@#define TDX_SUCCESS 0ULL#define TDX_RND_NO_ENTROPY 0x8000020300000000ULL -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <uapi/asm/mce.h>
@@ -126,5 +126,5 @@ static inline int tdx_enable(void) { return -ENODEV; }static inline const char *tdx_dump_mce_info (struct mce *m) {return NULL ; }#endif /* CONFIG_INTEL_TDX_HOST */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_TDX_H */
arch/x86/include/asm/thread_info.h +6 -6
@@ -54,7 +54,7 @@* - this struct should fit entirely inside of one cache line * - this struct shares the supervisor stack pages */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct task_struct ;#include <asm/cpufeature.h> #include <linux/atomic.h>
@@ -73,7 +73,7 @@ struct thread_info { .flags = 0, \ } -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ #include <asm/asm-offsets.h>
@@ -161,7 +161,7 @@ struct thread_info {* * preempt_count needs to be 1 initially, until the scheduler is functional. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Walks up the stack frames to make sure that the specified object is
@@ -213,7 +213,7 @@ static inline int arch_within_stack_frames(const void * const stack, #endif } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * Thread-synchronous status.
@@ -224,7 +224,7 @@ static inline int arch_within_stack_frames(const void * const stack,*/ #define TS_COMPAT 0x0002/* 32bit syscall active (64BIT)*/ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_COMPAT #define TS_I386_REGS_POKED 0x0004/* regs poked by 32-bit ptracer */
@@ -242,6 +242,6 @@ static inline int arch_within_stack_frames(const void * const stack,extern void arch_setup_new_exec (void );#define arch_setup_new_exec arch_setup_new_exec -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_THREAD_INFO_H */
arch/x86/include/asm/unwind_hints.h +2 -2
@@ -5,7 +5,7 @@#include "orc_types.h" -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro UNWIND_HINT_END_OF_STACKUNWIND_HINT type=UNWIND_HINT_TYPE_END_OF_STACK
@@ -88,6 +88,6 @@#define UNWIND_HINT_RESTORE \ UNWIND_HINT(UNWIND_HINT_TYPE_RESTORE, 0, 0, 0) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_UNWIND_HINTS_H */
arch/x86/include/asm/vdso/getrandom.h +2 -2
@@ -5,7 +5,7 @@#ifndef __ASM_VDSO_GETRANDOM_H#define __ASM_VDSO_GETRANDOM_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/unistd.h>
@@ -37,6 +37,6 @@ static __always_inline const struct vdso_rng_data *__arch_get_vdso_rng_data(voidreturn &vdso_rng_data; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_GETRANDOM_H */
arch/x86/include/asm/vdso/gettimeofday.h +2 -2
@@ -10,7 +10,7 @@#ifndef __ASM_VDSO_GETTIMEOFDAY_H#define __ASM_VDSO_GETTIMEOFDAY_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <uapi/linux/time.h> #include <asm/vgtod.h>
@@ -350,6 +350,6 @@ static __always_inline u64 vdso_calc_ns(const struct vdso_data *vd, u64 cycles, }#define vdso_calc_ns vdso_calc_ns -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/x86/include/asm/vdso/processor.h +2 -2
@@ -5,7 +5,7 @@#ifndef __ASM_VDSO_PROCESSOR_H#define __ASM_VDSO_PROCESSOR_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ static __always_inline void rep_nop(void)
@@ -22,6 +22,6 @@ struct getcpu_cache;notrace long __vdso_getcpu (unsigned *cpu,unsigned *node,struct getcpu_cache *unused); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_VDSO_PROCESSOR_H */
arch/x86/include/asm/vdso/vsyscall.h +2 -2
@@ -9,7 +9,7 @@#define VDSO_PAGE_PVCLOCK_OFFSET 0#define VDSO_PAGE_HVCLOCK_OFFSET 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <vdso/datapage.h> #include <asm/vgtod.h>
@@ -36,6 +36,6 @@ struct vdso_rng_data *__x86_get_k_vdso_rng_data(void)/* The asm-generic header needs to be included after the definitions above */ #include <asm-generic/vdso/vsyscall.h> -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_VSYSCALL_H */
arch/x86/include/asm/xen/interface.h +5 -5
@@ -72,7 +72,7 @@#endif #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Explicitly size integers that represent pfns in the public interface * with Xen so that on ARM we can have one ABI that works for 32 and 64 * bit guests. */
@@ -137,7 +137,7 @@ DEFINE_GUEST_HANDLE(xen_ulong_t);#define TI_SET_DPL (_ti, _dpl) ((_ti)->flags |= (_dpl))#define TI_SET_IF (_ti, _if) ((_ti)->flags |= ((!!(_if))<<2)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct trap_info { uint8_t vector; /* exception vector */ uint8_t flags; /* 0-3: privilege level; 4: clear event enable? */
@@ -186,7 +186,7 @@ struct arch_shared_info {uint32_t wc_sec_hi; #endif }; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_X86_32 #include <asm/xen/interface_32.h>
@@ -196,7 +196,7 @@ struct arch_shared_info {#include <asm/pvclock-abi.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * The following is all CPU context. Note that the fpu_ctxt block is filled * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
@@ -376,7 +376,7 @@ struct xen_pmu_arch { } c; }; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * Prefix forces emulation of some non-trapping instructions.
arch/x86/include/asm/xen/interface_32.h +2 -2
@@ -44,7 +44,7 @@*/ #define __HYPERVISOR_VIRT_START 0xF5800000 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct cpu_user_regs { uint32_t ebx;
@@ -85,7 +85,7 @@ typedef struct xen_callback xen_callback_t;#define XEN_CALLBACK (__cs, __eip) \ ((struct xen_callback){ .cs = (__cs), .eip = (unsigned long)(__eip) }) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /*
arch/x86/include/asm/xen/interface_64.h +2 -2
@@ -77,7 +77,7 @@#define VGCF_in_syscall (1<<_VGCF_in_syscall)#define VGCF_IN_SYSCALL VGCF_in_syscall -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct iret_context {/* Top of stack (%rsp at point of hypercall). */
@@ -143,7 +143,7 @@ typedef unsigned long xen_callback_t;#define XEN_CALLBACK (__cs, __rip) \ ((unsigned long)(__rip)) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_XEN_INTERFACE_64_H */
arch/x86/math-emu/control_w.h +1 -1
@@ -11,7 +11,7 @@#ifndef _CONTROLW_H_#define _CONTROLW_H_ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _Const_ (x) $##x#else #define _Const_ (x) x
arch/x86/math-emu/exception.h +3 -3
@@ -10,7 +10,7 @@#ifndef _EXCEPTION_H_#define _EXCEPTION_H_ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define Const_ (x) $##x#else #define Const_ (x) x
@@ -37,7 +37,7 @@#define PRECISION_LOST_UP Const_((EX_Precision | SW_C1))#define PRECISION_LOST_DOWN Const_(EX_Precision) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef DEBUG #define EXCEPTION (x) { printk("exception in %s at line %d\n", \
@@ -46,6 +46,6 @@#define EXCEPTION (x) FPU_exception(x)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _EXCEPTION_H_ */
arch/x86/math-emu/fpu_emu.h +3 -3
@@ -20,7 +20,7 @@*/ #define PECULIAR_486 -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#include "fpu_asm.h" #define Const (x) $##x#else
@@ -68,7 +68,7 @@#define FPU_Exception Const(0x80000000)/* Added to tag returns. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include "fpu_system.h"
@@ -213,6 +213,6 @@ asmlinkage int FPU_round(FPU_REG *arg, unsigned int extent, int dummy,#include "fpu_proto.h" #endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _FPU_EMU_H_ */
arch/x86/math-emu/status_w.h +3 -3
@@ -13,7 +13,7 @@#include "fpu_emu.h" /* for definition of PECULIAR_486 */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define Const__ (x) $##x#else #define Const__ (x) x
@@ -37,7 +37,7 @@#define SW_Exc_Mask Const__(0x27f)/* Status word exception bit mask */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define COMP_A_gt_B 1#define COMP_A_eq_B 2
@@ -63,6 +63,6 @@ static inline void setcc(int cc)# define clear_C1 ()#endif /* PECULIAR_486 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _STATUS_H_ */
arch/x86/realmode/rm/realmode.h +2 -2
@@ -2,7 +2,7 @@#ifndef ARCH_X86_REALMODE_RM_REALMODE_H #define ARCH_X86_REALMODE_RM_REALMODE_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__/* * 16-bit ljmpw to the real_mode_seg
@@ -12,7 +12,7 @@*/ #define LJMPW_RM (to) .byte 0xea ; .word (to), real_mode_seg -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * Signature at the end of the realmode region
arch/x86/realmode/rm/wakeup.h +1 -1
@@ -7,7 +7,7 @@#ifndef ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H #define ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> /* This must match data at wakeup.S */
tools/arch/x86/include/asm/asm.h +4 -4
@@ -2,7 +2,7 @@#ifndef _ASM_X86_ASM_H#define _ASM_X86_ASM_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define __ASM_FORM (x, ...) x,## __VA_ARGS__# define __ASM_FORM_RAW (x, ...) x,## __VA_ARGS__# define __ASM_FORM_COMMA (x, ...) x,## __VA_ARGS__,
@@ -123,7 +123,7 @@#ifdef __KERNEL__/* Exception table entry */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define _ASM_EXTABLE_HANDLE (from, to, handler) \ .pushsection "__ex_table","a" ; \ .balign 4 ; \
@@ -154,7 +154,7 @@# define _ASM_NOKPROBE (entry)# endif -#else /* ! __ASSEMBLY__ */ +#else /* ! __ASSEMBLER__ */ # define _EXPAND_EXTABLE_HANDLE (x) #x# define _ASM_EXTABLE_HANDLE (from, to, handler) \ " .pushsection \"__ex_table\",\"a\"\n" \
@@ -186,7 +186,7 @@*/ registerunsigned long current_stack_pointer asm (_ASM_SP );#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __KERNEL__ */
tools/arch/x86/include/asm/nops.h +1 -1
@@ -82,7 +82,7 @@#define ASM_NOP7 _ASM_BYTES(BYTES_NOP7)#define ASM_NOP8 _ASM_BYTES(BYTES_NOP8) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern const unsigned char *const x86_nops[];#endif
tools/arch/x86/include/asm/orc_types.h +2 -2
@@ -45,7 +45,7 @@#define ORC_TYPE_REGS 3#define ORC_TYPE_REGS_PARTIAL 4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/byteorder.h> /*
@@ -73,6 +73,6 @@ struct orc_entry {#endif } __packed; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ORC_TYPES_H */
tools/arch/x86/include/asm/pvclock-abi.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PVCLOCK_ABI_H#define _ASM_X86_PVCLOCK_ABI_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * These structs MUST NOT be changed.
@@ -44,5 +44,5 @@ struct pvclock_wall_clock {#define PVCLOCK_GUEST_STOPPED (1 << 1)/* PVCLOCK_COUNTS_FROM_ZERO broke ABI and can't be used anymore. */ #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PVCLOCK_ABI_H */
Signature · 1 line
2.48.1
[tip: x86/merge] x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-UAPI headers
The following commit has been merged into the x86/merge branch of tip:
The following commit has been merged into the x86/merge branch of tip:
Commit-ID: 7f0dc4a0337387d7612f2863f931f0e753fd4397 Gitweb: https://git.kernel.org/tip/7f0dc4a0337387d7612f2863f931f0e753fd4397 Author: Thomas Huth <[email protected]> AuthorDate: Fri, 14 Mar 2025 08:10:08 +01:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 14 Mar 2025 09:47:31 +01:00
x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-UAPI headers
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 is mostly a mechanical patch (done with a simple "sed -i" statement), with some manual tweaks in <asm/frame.h>, <asm/hw_irq.h> and <asm/setup.h> that mentioned this macro in comments with some missing underscores.
--- arch/x86/boot/boot.h | 4 ++-- arch/x86/entry/vdso/extable.h | 2 +- arch/x86/include/asm/alternative.h | 6 +++--- arch/x86/include/asm/asm.h | 10 +++++----- arch/x86/include/asm/boot.h | 2 +- arch/x86/include/asm/cpufeature.h | 4 ++-- arch/x86/include/asm/cpumask.h | 4 ++-- arch/x86/include/asm/current.h | 4 ++-- arch/x86/include/asm/desc_defs.h | 4 ++-- arch/x86/include/asm/dwarf2.h | 2 +- arch/x86/include/asm/fixmap.h | 4 ++-- arch/x86/include/asm/frame.h | 10 +++++----- arch/x86/include/asm/fred.h | 4 ++-- arch/x86/include/asm/fsgsbase.h | 4 ++-- arch/x86/include/asm/ftrace.h | 8 ++++---- arch/x86/include/asm/hw_irq.h | 4 ++-- arch/x86/include/asm/ibt.h | 12 ++++++------ arch/x86/include/asm/idtentry.h | 6 +++--- arch/x86/include/asm/inst.h | 2 +- arch/x86/include/asm/irqflags.h | 10 +++++----- arch/x86/include/asm/jump_label.h | 4 ++-- arch/x86/include/asm/kasan.h | 2 +- arch/x86/include/asm/kexec.h | 4 ++-- arch/x86/include/asm/linkage.h | 6 +++--- arch/x86/include/asm/mem_encrypt.h | 4 ++-- arch/x86/include/asm/msr.h | 4 ++-- arch/x86/include/asm/nops.h | 2 +- arch/x86/include/asm/nospec-branch.h | 6 +++--- arch/x86/include/asm/orc_types.h | 4 ++-- arch/x86/include/asm/page.h | 4 ++-- arch/x86/include/asm/page_32.h | 4 ++-- arch/x86/include/asm/page_32_types.h | 4 ++-- arch/x86/include/asm/page_64.h | 4 ++-- arch/x86/include/asm/page_64_types.h | 2 +- arch/x86/include/asm/page_types.h | 4 ++-- arch/x86/include/asm/paravirt.h | 14 +++++++------- arch/x86/include/asm/paravirt_types.h | 4 ++-- arch/x86/include/asm/percpu.h | 6 +++--- arch/x86/include/asm/pgtable-2level_types.h | 4 ++-- arch/x86/include/asm/pgtable-3level_types.h | 4 ++-- arch/x86/include/asm/pgtable-invert.h | 4 ++-- arch/x86/include/asm/pgtable.h | 12 ++++++------ arch/x86/include/asm/pgtable_32.h | 4 ++-- arch/x86/include/asm/pgtable_32_areas.h | 2 +- arch/x86/include/asm/pgtable_64.h | 6 +++--- arch/x86/include/asm/pgtable_64_types.h | 4 ++-- arch/x86/include/asm/pgtable_types.h | 10 +++++----- arch/x86/include/asm/prom.h | 4 ++-- arch/x86/include/asm/pti.h | 4 ++-- arch/x86/include/asm/ptrace.h | 4 ++-- arch/x86/include/asm/purgatory.h | 4 ++-- arch/x86/include/asm/pvclock-abi.h | 4 ++-- arch/x86/include/asm/realmode.h | 4 ++-- arch/x86/include/asm/segment.h | 8 ++++---- arch/x86/include/asm/setup.h | 6 +++--- arch/x86/include/asm/setup_data.h | 4 ++-- arch/x86/include/asm/shared/tdx.h | 4 ++-- arch/x86/include/asm/shstk.h | 4 ++-- arch/x86/include/asm/signal.h | 8 ++++---- arch/x86/include/asm/smap.h | 6 +++--- arch/x86/include/asm/smp.h | 4 ++-- arch/x86/include/asm/tdx.h | 4 ++-- arch/x86/include/asm/thread_info.h | 12 ++++++------ arch/x86/include/asm/unwind_hints.h | 4 ++-- arch/x86/include/asm/vdso/getrandom.h | 4 ++-- arch/x86/include/asm/vdso/gettimeofday.h | 4 ++-- arch/x86/include/asm/vdso/processor.h | 4 ++-- arch/x86/include/asm/vdso/vsyscall.h | 4 ++-- arch/x86/include/asm/xen/interface.h | 10 +++++----- arch/x86/include/asm/xen/interface_32.h | 4 ++-- arch/x86/include/asm/xen/interface_64.h | 4 ++-- arch/x86/math-emu/control_w.h | 2 +- arch/x86/math-emu/exception.h | 6 +++--- arch/x86/math-emu/fpu_emu.h | 6 +++--- arch/x86/math-emu/status_w.h | 6 +++--- arch/x86/realmode/rm/realmode.h | 4 ++-- arch/x86/realmode/rm/wakeup.h | 2 +- tools/arch/x86/include/asm/asm.h | 8 ++++---- tools/arch/x86/include/asm/nops.h | 2 +- tools/arch/x86/include/asm/orc_types.h | 4 ++-- tools/arch/x86/include/asm/pvclock-abi.h | 4 ++-- 81 files changed, 202 insertions(+), 202 deletions(-)
arch/x86/boot/boot.h +2 -2
@@ -16,7 +16,7 @@#define STACK_SIZE 1024/* Minimum number of bytes for stack */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stdarg.h> #include <linux/types.h>
@@ -327,6 +327,6 @@ void probe_cards(int unsafe);/* video-vesa.c */ void vesa_store_edid (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* BOOT_BOOT_H */
arch/x86/entry/vdso/extable.h +1 -1
@@ -7,7 +7,7 @@* vDSO uses a dedicated handler the addresses are relative to the overall * exception table, not each individual entry. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _ASM_VDSO_EXTABLE_HANDLE (from, to) \ ASM_VDSO_EXTABLE_HANDLE from to
arch/x86/include/asm/alternative.h +3 -3
@@ -15,7 +15,7 @@#define ALT_DIRECT_CALL (feature) ((ALT_FLAG_DIRECT_CALL << ALT_FLAGS_SHIFT) | (feature))#define ALT_CALL_ALWAYS ALT_DIRECT_CALL(X86_FEATURE_ALWAYS) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stddef.h>
@@ -286,7 +286,7 @@ static inline int alternatives_text_reserved(void *start, void *end)void BUG_func (void );void nop_func (void ); -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_SMP .macro LOCK_PREFIX
@@ -369,6 +369,6 @@ void nop_func(void); ALTERNATIVE_2 oldinstr, newinstr_no, X86_FEATURE_ALWAYS, \ newinstr_yes, ft_flags -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_ALTERNATIVE_H */
arch/x86/include/asm/asm.h +5 -5
@@ -2,7 +2,7 @@#ifndef _ASM_X86_ASM_H#define _ASM_X86_ASM_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define __ASM_FORM (x, ...) x,## __VA_ARGS__# define __ASM_FORM_RAW (x, ...) x,## __VA_ARGS__# define __ASM_FORM_COMMA (x, ...) x,## __VA_ARGS__,
@@ -113,7 +113,7 @@#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #ifndef __pic__ static __always_inline __pure void *rip_rel_ptr(void *p) {
@@ -144,7 +144,7 @@ static __always_inline __pure void *rip_rel_ptr(void *p)# include <asm/extable_fixup_types.h> /* Exception table entry */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define _ASM_EXTABLE_TYPE (from, to, type) \ .pushsection "__ex_table","a" ; \
@@ -164,7 +164,7 @@ static __always_inline __pure void *rip_rel_ptr(void *p)# define _ASM_NOKPROBE (entry)# endif -#else /* ! __ASSEMBLY__ */ +#else /* ! __ASSEMBLER__ */ # define DEFINE_EXTABLE_TYPE_REG \ ".macro extable_type_reg type:req reg:req\n" \
@@ -221,7 +221,7 @@ static __always_inline __pure void *rip_rel_ptr(void *p)*/ registerunsigned long current_stack_pointer asm (_ASM_SP );#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define _ASM_EXTABLE (from, to) \ _ASM_EXTABLE_TYPE(from, to, EX_TYPE_DEFAULT)
arch/x86/include/asm/boot.h +1 -1
@@ -74,7 +74,7 @@# define BOOT_STACK_SIZE 0x1000#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned int output_len;extern const unsigned long kernel_text_size;extern const unsigned long kernel_total_size;
arch/x86/include/asm/cpufeature.h +2 -2
@@ -4,7 +4,7 @@#include <asm/processor.h> -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) && !defined(__ASSEMBLER__)#include <asm/asm.h> #include <linux/bitops.h>
@@ -208,5 +208,5 @@ t_no:#define CPU_FEATURE_TYPEVAL boot_cpu_data.x86_vendor, boot_cpu_data.x86, \ boot_cpu_data.x86_model -#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ +#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */ #endif /* _ASM_X86_CPUFEATURE_H */
arch/x86/include/asm/cpumask.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_CPUMASK_H#define _ASM_X86_CPUMASK_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cpumask.h> extern void setup_cpu_local_masks (void );
@@ -34,5 +34,5 @@ static __always_inline void arch_cpumask_clear_cpu(int cpu, struct cpumask *dstp#define arch_cpu_is_offline (cpu) unlikely(!arch_cpu_online(cpu)) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_CPUMASK_H */
arch/x86/include/asm/current.h +2 -2
@@ -5,7 +5,7 @@#include <linux/build_bug.h> #include <linux/compiler.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cache.h> #include <asm/percpu.h>
@@ -51,6 +51,6 @@ static __always_inline struct task_struct *get_current(void)#define current get_current() -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_CURRENT_H */
arch/x86/include/asm/desc_defs.h +2 -2
@@ -58,7 +58,7 @@#define DESC_USER (_DESC_DPL(3)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -166,7 +166,7 @@ struct desc_ptr {unsigned long address; } __attribute__((packed)) ; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* Boot IDT definitions */ #define BOOT_IDT_ENTRIES 32
arch/x86/include/asm/dwarf2.h +1 -1
@@ -2,7 +2,7 @@#ifndef _ASM_X86_DWARF2_H#define _ASM_X86_DWARF2_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#warning "asm/dwarf2.h should be only included in pure assembly files"#endif
arch/x86/include/asm/fixmap.h +2 -2
@@ -31,7 +31,7 @@/* fixmap starts downwards from the 507th entry in level2_fixmap_pgt */ #define FIXMAP_PMD_TOP 507 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/kernel.h> #include <asm/apicdef.h> #include <asm/page.h>
@@ -196,5 +196,5 @@ void __init *early_memremap_decrypted_wp(resource_size_t phys_addr,void __early_set_fixmap (enum fixed_addresses idx,phys_addr_t phys,pgprot_t flags); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_FIXMAP_H */
arch/x86/include/asm/frame.h +5 -5
@@ -11,7 +11,7 @@#ifdef CONFIG_FRAME_POINTER -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro FRAME_BEGIN push %_ASM_BP
@@ -51,7 +51,7 @@ .endm#endif /* CONFIG_X86_64 */ -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ #define FRAME_BEGIN \ "push %" _ASM_BP "\n" \
@@ -82,18 +82,18 @@ static inline unsigned long encode_frame_pointer(struct pt_regs *regs)#endif /* CONFIG_X86_64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define FRAME_OFFSET __ASM_SEL(4, 8)#else /* !CONFIG_FRAME_POINTER */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro ENCODE_FRAME_POINTER ptregs_offset=0 .endm -#else /* !__ASSEMBLY */ +#else /* !__ASSEMBLER__ */ #define ENCODE_FRAME_POINTER
arch/x86/include/asm/fred.h +2 -2
@@ -32,7 +32,7 @@#define FRED_CONFIG_INT_STKLVL (l) (_AT(unsigned long, l) << 9)#define FRED_CONFIG_ENTRYPOINT (p) _AT(unsigned long, (p)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_X86_FRED #include <linux/kernel.h>
@@ -113,6 +113,6 @@ static inline void fred_entry_from_kvm(unsigned int type, unsigned int vector) {static inline void fred_sync_rsp0 (unsigned long rsp0) { }static inline void fred_update_rsp0 (void ) { }#endif /* CONFIG_X86_FRED */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* ASM_X86_FRED_H */
arch/x86/include/asm/fsgsbase.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_FSGSBASE_H#define _ASM_FSGSBASE_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_X86_64
@@ -80,6 +80,6 @@ extern unsigned long x86_fsgsbase_read_task(struct task_struct *task,#endif /* CONFIG_X86_64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_FSGSBASE_H */
arch/x86/include/asm/ftrace.h +4 -4
@@ -22,7 +22,7 @@#define ARCH_SUPPORTS_FTRACE_OPS 1#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void __fentry__ (void );static inline unsigned long ftrace_call_adjust (unsigned long addr)
@@ -118,11 +118,11 @@ struct dyn_arch_ftrace { };#endif /* CONFIG_DYNAMIC_FTRACE */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_FUNCTION_TRACER */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void prepare_ftrace_return (unsigned long ip,unsigned long *parent,unsigned long frame_pointer);
@@ -166,6 +166,6 @@ static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs) }#endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_IA32_EMULATION */ #endif /* !COMPILE_OFFSETS */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_FTRACE_H */
arch/x86/include/asm/hw_irq.h +2 -2
@@ -16,7 +16,7 @@#include <asm/irq_vectors.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/percpu.h> #include <linux/profile.h>
@@ -128,6 +128,6 @@ extern char spurious_entries_start[];typedef struct irq_desc *vector_irq_t [NR_VECTORS ];DECLARE_PER_CPU (vector_irq_t, vector_irq); -#endif /* !ASSEMBLY_ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_HW_IRQ_H */
arch/x86/include/asm/ibt.h +6 -6
@@ -21,7 +21,7 @@#define HAS_KERNEL_IBT 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_X86_64 #define ASM_ENDBR "endbr64\n\t"
@@ -77,7 +77,7 @@ static inline bool is_endbr(u32 val) extern __noendbr u64 ibt_save(bool disable); extern __noendbr void ibt_restore(u64 save); -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_X86_64 #define ENDBR endbr64
@@ -85,13 +85,13 @@ extern __noendbr void ibt_restore(u64 save);#define ENDBR endbr32#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #else /* !IBT */ #define HAS_KERNEL_IBT 0 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define ASM_ENDBR #define IBT_NOSEAL (name)
@@ -103,11 +103,11 @@ static inline bool is_endbr(u32 val) { return false; }static inline u64 ibt_save (bool disable) {return 0 ; }static inline void ibt_restore (u64 save) { } -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #define ENDBR -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_X86_KERNEL_IBT */
arch/x86/include/asm/idtentry.h +3 -3
@@ -7,7 +7,7 @@#define IDT_ALIGN (8 * (1 + HAS_KERNEL_IBT)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/entry-common.h> #include <linux/hardirq.h>
@@ -474,7 +474,7 @@ static inline void fred_install_sysvec(unsigned int vector, const idtentry_t fun idt_install_sysvec(vector, asm_##function); \ } -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ /* * The ASM variants for DECLARE_IDTENTRY*() which emit the ASM entry stubs.
@@ -579,7 +579,7 @@ SYM_CODE_START(spurious_entries_start) SYM_CODE_END(spurious_entries_start)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * The actual entry points. Note that DECLARE_IDTENTRY*() serves two
arch/x86/include/asm/inst.h +1 -1
@@ -6,7 +6,7 @@#ifndef X86_ASM_INST_H #define X86_ASM_INST_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define REG_NUM_INVALID 100
arch/x86/include/asm/irqflags.h +5 -5
@@ -4,7 +4,7 @@#include <asm/processor-flags.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/nospec-branch.h>
@@ -79,7 +79,7 @@ static __always_inline void native_local_irq_restore(unsigned long flags)#ifdef CONFIG_PARAVIRT_XXL #include <asm/paravirt.h> #else -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> static __always_inline unsigned long arch_local_save_flags (void )
@@ -133,10 +133,10 @@ static __always_inline unsigned long arch_local_irq_save(void)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_PARAVIRT_XXL */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ static __always_inline int arch_irqs_disabled_flags(unsigned long flags) {return !(flags &X86_EFLAGS_IF );
@@ -154,6 +154,6 @@ static __always_inline void arch_local_irq_restore(unsigned long flags)if (!arch_irqs_disabled_flags (flags))arch_local_irq_enable (); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif
arch/x86/include/asm/jump_label.h +2 -2
@@ -7,7 +7,7 @@#include <asm/asm.h> #include <asm/nops.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stringify.h> #include <linux/types.h>
@@ -55,6 +55,6 @@ l_yes:extern int arch_jump_entry_size (struct jump_entry *entry); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/x86/include/asm/kasan.h +1 -1
@@ -23,7 +23,7 @@ (1ULL << (__VIRTUAL_MASK_SHIFT - \ KASAN_SHADOW_SCALE_SHIFT))) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_KASAN void __init kasan_early_init (void );
arch/x86/include/asm/kexec.h +2 -2
@@ -13,7 +13,7 @@# define KEXEC_CONTROL_PAGE_SIZE 4096# define KEXEC_CONTROL_CODE_MAX_SIZE 2048 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/string.h> #include <linux/kernel.h>
@@ -225,6 +225,6 @@ unsigned int arch_crash_get_elfcorehdr_size(void);#define crash_get_elfcorehdr_size arch_crash_get_elfcorehdr_size#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_KEXEC_H */
arch/x86/include/asm/linkage.h +3 -3
@@ -38,7 +38,7 @@#define ASM_FUNC_ALIGN __stringify(__FUNC_ALIGN)#define SYM_F_ALIGN __FUNC_ALIGN -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#if defined(CONFIG_MITIGATION_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define RET jmp __x86_return_thunk
@@ -50,7 +50,7 @@#endif #endif /* CONFIG_MITIGATION_RETPOLINE */ -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #if defined(CONFIG_MITIGATION_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define ASM_RET "jmp __x86_return_thunk\n\t"
@@ -62,7 +62,7 @@#endif #endif /* CONFIG_MITIGATION_RETPOLINE */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * Depending on -fpatchable-function-entry=N,N usage (CONFIG_CALL_PADDING) the
arch/x86/include/asm/mem_encrypt.h +2 -2
@@ -10,7 +10,7 @@#ifndef __X86_MEM_ENCRYPT_H__#define __X86_MEM_ENCRYPT_H__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/init.h> #include <linux/cc_platform.h>
@@ -114,6 +114,6 @@ void add_encrypt_protection_map(void);extern char __start_bss_decrypted[], __end_bss_decrypted[], __start_bss_decrypted_unused[]; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __X86_MEM_ENCRYPT_H__ */
arch/x86/include/asm/msr.h +2 -2
@@ -4,7 +4,7 @@#include "msr-index.h" -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/asm.h> #include <asm/errno.h>
@@ -397,5 +397,5 @@ static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])return wrmsr_safe_regs (regs); }#endif /* CONFIG_SMP */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_MSR_H */
arch/x86/include/asm/nops.h +1 -1
@@ -82,7 +82,7 @@#define ASM_NOP7 _ASM_BYTES(BYTES_NOP7)#define ASM_NOP8 _ASM_BYTES(BYTES_NOP8) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern const unsigned char *const x86_nops[];#endif
arch/x86/include/asm/nospec-branch.h +3 -3
@@ -177,7 +177,7 @@ add $(BITS_PER_LONG/8), %_ASM_SP; \ lfence; -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__/* * (ab)use RETPOLINE_SAFE on RET to annotate away 'bare' RET instructions
@@ -336,7 +336,7 @@#define CLEAR_BRANCH_HISTORY_VMEXIT #endif -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ typedef u8 retpoline_thunk_t [RETPOLINE_THUNK_SIZE ];extern retpoline_thunk_t __x86_indirect_thunk_array[];
@@ -596,6 +596,6 @@ static __always_inline void mds_idle_clear_cpu_buffers(void)mds_clear_cpu_buffers (); } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_NOSPEC_BRANCH_H_ */
arch/x86/include/asm/orc_types.h +2 -2
@@ -45,7 +45,7 @@#define ORC_TYPE_REGS 3#define ORC_TYPE_REGS_PARTIAL 4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/byteorder.h> /*
@@ -73,6 +73,6 @@ struct orc_entry {#endif } __packed; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ORC_TYPES_H */
arch/x86/include/asm/page.h +2 -2
@@ -14,7 +14,7 @@#include <asm/page_32.h> #endif /* CONFIG_X86_64 */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct page ;
@@ -84,7 +84,7 @@ static __always_inline u64 __is_canonical_address(u64 vaddr, u8 vaddr_bits) return __canonical_address(vaddr, vaddr_bits) == vaddr; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #include <asm-generic/memory_model.h> #include <asm-generic/getorder.h>
arch/x86/include/asm/page_32.h +2 -2
@@ -4,7 +4,7 @@#include <asm/page_32_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __phys_addr_nodebug (x) ((x) - PAGE_OFFSET)#ifdef CONFIG_DEBUG_VIRTUAL
@@ -26,6 +26,6 @@ static inline void copy_page(void *to, void *from) {memcpy (to, from,PAGE_SIZE ); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PAGE_32_H */
arch/x86/include/asm/page_32_types.h +2 -2
@@ -63,7 +63,7 @@*/ #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This much address space is reserved for vmalloc() and iomap()
@@ -75,6 +75,6 @@ extern int sysctl_legacy_va_layout;extern void find_low_pfn_range (void );extern void setup_bootmem_allocator (void ); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PAGE_32_DEFS_H */
arch/x86/include/asm/page_64.h +2 -2
@@ -4,7 +4,7 @@#include <asm/page_64_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/cpufeatures.h> #include <asm/alternative.h>
@@ -94,7 +94,7 @@ static __always_inline unsigned long task_size_max(void) }#endif /* CONFIG_X86_5LEVEL */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_X86_VSYSCALL_EMULATION # define __HAVE_ARCH_GATE_AREA 1
arch/x86/include/asm/page_64_types.h +1 -1
@@ -2,7 +2,7 @@#ifndef _ASM_X86_PAGE_64_DEFS_H#define _ASM_X86_PAGE_64_DEFS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/kaslr.h> #endif
arch/x86/include/asm/page_types.h +2 -2
@@ -43,7 +43,7 @@#define IOREMAP_MAX_ORDER (PMD_SHIFT)#endif /* CONFIG_X86_64 */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_DYNAMIC_PHYSICAL_MASK extern phys_addr_t physical_mask;
@@ -66,6 +66,6 @@ bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn);extern void initmem_init (void ); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PAGE_DEFS_H */
arch/x86/include/asm/paravirt.h +7 -7
@@ -6,7 +6,7 @@#include <asm/paravirt_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct mm_struct ;#endif
@@ -15,7 +15,7 @@ struct mm_struct;#include <asm/asm.h> #include <asm/nospec-branch.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/bug.h> #include <linux/types.h> #include <linux/cpumask.h>
@@ -720,7 +720,7 @@ static __always_inline unsigned long arch_local_irq_save(void)extern void default_banner (void );void native_pv_lock_init (void )__init ; -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_X86_64 #ifdef CONFIG_PARAVIRT_XXL
@@ -740,18 +740,18 @@ void native_pv_lock_init(void) __init;#endif /* CONFIG_PARAVIRT_XXL */ #endif /* CONFIG_X86_64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #else /* CONFIG_PARAVIRT */ # define default_banner x86_init_noop -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline void native_pv_lock_init (void ) { }#endif #endif /* !CONFIG_PARAVIRT */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #ifndef CONFIG_PARAVIRT_XXL static inline void paravirt_enter_mmap(struct mm_struct *mm) {
@@ -769,5 +769,5 @@ static inline void paravirt_set_cap(void) { }#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PARAVIRT_H */
arch/x86/include/asm/paravirt_types.h +2 -2
@@ -4,7 +4,7 @@#ifdef CONFIG_PARAVIRT -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/desc_defs.h>
@@ -519,7 +519,7 @@ unsigned long pv_native_read_cr2(void);#define paravirt_nop ((void *)nop_func) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define ALT_NOT_XEN ALT_NOT(X86_FEATURE_XENPV)
arch/x86/include/asm/percpu.h +3 -3
@@ -10,7 +10,7 @@# define __percpu_rel#endif -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#ifdef CONFIG_SMP # define __percpu %__percpu_seg:
@@ -26,7 +26,7 @@# define INIT_PER_CPU_VAR (var) var#endif -#else /* !__ASSEMBLY__: */ +#else /* !__ASSEMBLER__: */ #include <linux/build_bug.h> #include <linux/stringify.h>
@@ -619,7 +619,7 @@ do { \/* We can use this directly for local CPU (faster). */ DECLARE_PER_CPU_READ_MOSTLY(unsigned long, this_cpu_off); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_SMP
arch/x86/include/asm/pgtable-2level_types.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_PGTABLE_2LEVEL_DEFS_H#define _ASM_X86_PGTABLE_2LEVEL_DEFS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> typedef unsigned long pteval_t ;
@@ -16,7 +16,7 @@ typedef union {pteval_t pte; pteval_t pte_low; } pte_t; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define SHARED_KERNEL_PMD 0
arch/x86/include/asm/pgtable-3level_types.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H#define _ASM_X86_PGTABLE_3LEVEL_DEFS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> typedef u64 pteval_t ;
@@ -25,7 +25,7 @@ typedef union { };pmdval_t pmd; } pmd_t; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define SHARED_KERNEL_PMD (!static_cpu_has(X86_FEATURE_PTI))
arch/x86/include/asm/pgtable-invert.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_PGTABLE_INVERT_H#define _ASM_PGTABLE_INVERT_H 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * A clear pte value is special, and doesn't get inverted.
@@ -36,6 +36,6 @@ static inline u64 flip_protnone_guard(u64 oldval, u64 val, u64 mask)return val; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/x86/include/asm/pgtable.h +6 -6
@@ -15,7 +15,7 @@ cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS))) \ : (prot)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/spinlock.h> #include <asm/x86_init.h> #include <asm/pkru.h>
@@ -973,7 +973,7 @@ static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd) }#endif /* CONFIG_MITIGATION_PAGE_TABLE_ISOLATION */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #ifdef CONFIG_X86_32
@@ -982,7 +982,7 @@ static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)# include <asm/pgtable_64.h> #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/mm_types.h> #include <linux/mmdebug.h> #include <linux/log2.h>
@@ -1233,12 +1233,12 @@ static inline int pgd_none(pgd_t pgd) }#endif /* CONFIG_PGTABLE_LEVELS > 4 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET)#define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern int direct_gbpages;void init_mem_mapping (void );
@@ -1812,6 +1812,6 @@ bool arch_is_platform_page(u64 paddr);WARN_ON_ONCE (pgd_present (*pgdp) && !pgd_same (*pgdp, pgd)); \set_pgd (pgdp, pgd); \ }) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PGTABLE_H */
arch/x86/include/asm/pgtable_32.h +2 -2
@@ -13,7 +13,7 @@* This file contains the functions and defines necessary to modify and use * the i386 page table tree. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/processor.h> #include <linux/threads.h> #include <asm/paravirt.h>
@@ -45,7 +45,7 @@ do { \flush_tlb_one_kernel ((vaddr)); \ } while (0) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * This is used to calculate the .brk reservation for initial pagetables.
arch/x86/include/asm/pgtable_32_areas.h +1 -1
@@ -13,7 +13,7 @@*/ #define VMALLOC_OFFSET (8 * 1024 * 1024) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern bool __vmalloc_start_set;/* set once high_memory is set */ #endif
arch/x86/include/asm/pgtable_64.h +3 -3
@@ -5,7 +5,7 @@#include <linux/const.h> #include <asm/pgtable_64_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This file contains the functions and defines necessary to modify and use
@@ -270,7 +270,7 @@ static inline bool gup_fast_permitted(unsigned long start, unsigned long end)#include <asm/pgtable-invert.h> -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #define l4_index (x) (((x) >> 39) & 511)#define pud_index (x) (((x) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
@@ -291,5 +291,5 @@ L3_START_KERNEL = pud_index(__START_KERNEL_map) i = i +1 ; \ .endr -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PGTABLE_64_H */
arch/x86/include/asm/pgtable_64_types.h +2 -2
@@ -4,7 +4,7 @@#include <asm/sparsemem.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/kaslr.h>
@@ -44,7 +44,7 @@ static inline bool pgtable_l5_enabled(void)extern unsigned int pgdir_shift;extern unsigned int ptrs_per_p4d; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define SHARED_KERNEL_PMD 0
arch/x86/include/asm/pgtable_types.h +5 -5
@@ -164,7 +164,7 @@* to have the WB mode at index 0 (all bits clear). This is the default * right now and likely would break too much if changed. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__enum page_cache_mode { _PAGE_CACHE_MODE_WB =0 , _PAGE_CACHE_MODE_WC = 1,
@@ -239,7 +239,7 @@ enum page_cache_mode {#define __PAGE_KERNEL_IO_NOCACHE __PAGE_KERNEL_NOCACHE -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __PAGE_KERNEL_ENC (__PAGE_KERNEL | _ENC)#define __PAGE_KERNEL_ENC_WP (__PAGE_KERNEL_WP | _ENC)
@@ -262,7 +262,7 @@ enum page_cache_mode {#define PAGE_KERNEL_IO __pgprot_mask(__PAGE_KERNEL_IO)#define PAGE_KERNEL_IO_NOCACHE __pgprot_mask(__PAGE_KERNEL_IO_NOCACHE) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * early identity mapping pte attrib macros.
@@ -281,7 +281,7 @@ enum page_cache_mode {# include <asm/pgtable_64_types.h> #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -580,6 +580,6 @@ extern int __init kernel_map_pages_in_pgd(pgd_t *pgd, u64 pfn, unsigned long page_flags);extern int __init kernel_unmap_pages_in_pgd (pgd_t *pgd,unsigned long address,unsigned long numpages); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PGTABLE_DEFS_H */
arch/x86/include/asm/prom.h +2 -2
@@ -8,7 +8,7 @@#ifndef _ASM_X86_PROM_H#define _ASM_X86_PROM_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/of.h> #include <linux/types.h>
@@ -33,5 +33,5 @@ static inline void x86_flattree_get_config(void) { }extern char cmd_line[COMMAND_LINE_SIZE ]; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/x86/include/asm/pti.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PTI_H#define _ASM_X86_PTI_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION extern void pti_init (void );
@@ -11,5 +11,5 @@ extern void pti_finalize(void);static inline void pti_check_boottime_disable (void ) { }#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PTI_H */
arch/x86/include/asm/ptrace.h +2 -2
@@ -6,7 +6,7 @@#include <asm/page_types.h> #include <uapi/asm/ptrace.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef __i386__ struct pt_regs {
@@ -469,5 +469,5 @@ extern int do_set_thread_area(struct task_struct *p, int idx,# define do_set_thread_area_64 (p, s, t) (0)#endif -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PTRACE_H */
arch/x86/include/asm/purgatory.h +2 -2
@@ -2,10 +2,10 @@#ifndef _ASM_X86_PURGATORY_H#define _ASM_X86_PURGATORY_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/purgatory.h> extern void purgatory (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_PURGATORY_H */
arch/x86/include/asm/pvclock-abi.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PVCLOCK_ABI_H#define _ASM_X86_PVCLOCK_ABI_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * These structs MUST NOT be changed.
@@ -44,5 +44,5 @@ struct pvclock_wall_clock {#define PVCLOCK_GUEST_STOPPED (1 << 1)/* PVCLOCK_COUNTS_FROM_ZERO broke ABI and can't be used anymore. */ #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PVCLOCK_ABI_H */
arch/x86/include/asm/realmode.h +2 -2
@@ -9,7 +9,7 @@#define TH_FLAGS_SME_ACTIVE_BIT 0#define TH_FLAGS_SME_ACTIVE BIT(TH_FLAGS_SME_ACTIVE_BIT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/io.h>
@@ -95,6 +95,6 @@ void reserve_real_mode(void);void load_trampoline_pgtable (void );void init_real_mode (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ARCH_X86_REALMODE_H */
arch/x86/include/asm/segment.h +4 -4
@@ -233,7 +233,7 @@#define VDSO_CPUNODE_BITS 12#define VDSO_CPUNODE_MASK 0xfff -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Helper functions to store/load CPU and node numbers */
@@ -265,7 +265,7 @@ static inline void vdso_read_cpunode(unsigned *cpu, unsigned *node) *node = (p >> VDSO_CPUNODE_BITS); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef __KERNEL__
@@ -286,7 +286,7 @@ static inline void vdso_read_cpunode(unsigned *cpu, unsigned *node)*/ #define XEN_EARLY_IDT_HANDLER_SIZE (8 + ENDBR_INSN_SIZE) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern const char early_idt_handler_array[NUM_EXCEPTION_VECTORS ][EARLY_IDT_HANDLER_SIZE ];extern void early_ignore_irq (void );
@@ -350,7 +350,7 @@ static inline void __loadsegment_fs(unsigned short value)#define savesegment (seg, value) \ asm("mov %%" #seg ",%0":"=r" (value) : : "memory") -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __KERNEL__ */ #endif /* _ASM_X86_SEGMENT_H */
arch/x86/include/asm/setup.h +3 -3
@@ -27,7 +27,7 @@#define OLD_CL_ADDRESS 0x020/* Relative to real mode data */ #define NEW_CL_POINTER 0x228/* Relative to real mode data */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cache.h> #include <asm/bootparam.h>
@@ -141,7 +141,7 @@ extern bool builtin_cmdline_added __ro_after_init;#define builtin_cmdline_added 0#endif -#else /* __ASSEMBLY */ +#else /* __ASSEMBLER__ */ .macro __RESERVE_BRK name, size .pushsection .bss..brk, "aw"
@@ -153,6 +153,6 @@ SYM_DATA_END(__brk_\name)#define RESERVE_BRK (name, size) __RESERVE_BRK name, size -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SETUP_H */
arch/x86/include/asm/setup_data.h +2 -2
@@ -4,7 +4,7 @@#include <uapi/asm/setup_data.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct pci_setup_rom { struct setup_data data;
@@ -27,6 +27,6 @@ struct efi_setup_data {u64 reserved[8 ]; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SETUP_DATA_H */
arch/x86/include/asm/shared/tdx.h +2 -2
@@ -106,7 +106,7 @@#define TDX_PS_1G 2#define TDX_PS_NR (TDX_PS_1G + 1) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler_attributes.h>
@@ -177,5 +177,5 @@ static __always_inline u64 hcall_func(u64 exit_reason)return exit_reason; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_SHARED_TDX_H */
arch/x86/include/asm/shstk.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_SHSTK_H#define _ASM_X86_SHSTK_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> struct task_struct ;
@@ -37,6 +37,6 @@ static inline int shstk_update_last_frame(unsigned long val) { return 0; }static inline bool shstk_is_enabled (void ) {return false; }#endif /* CONFIG_X86_USER_SHADOW_STACK */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SHSTK_H */
arch/x86/include/asm/signal.h +4 -4
@@ -2,7 +2,7 @@#ifndef _ASM_X86_SIGNAL_H#define _ASM_X86_SIGNAL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/linkage.h> /* Most things should be clean enough to redefine this at will, if care
@@ -28,9 +28,9 @@ typedef struct {#define SA_IA32_ABI 0x02000000u#define SA_X32_ABI 0x01000000u -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #include <uapi/asm/signal.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __ARCH_HAS_SA_RESTORER
@@ -101,5 +101,5 @@ struct pt_regs;#endif /* !__i386__ */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SIGNAL_H */
arch/x86/include/asm/smap.h +3 -3
@@ -13,7 +13,7 @@#include <asm/cpufeatures.h> #include <asm/alternative.h> -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define ASM_CLAC \ ALTERNATIVE "", "clac", X86_FEATURE_SMAP
@@ -21,7 +21,7 @@#define ASM_STAC \ ALTERNATIVE "", "stac", X86_FEATURE_SMAP -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ static __always_inline void clac(void) {
@@ -61,6 +61,6 @@ static __always_inline void smap_restore(unsigned long flags)#define ASM_STAC \ ALTERNATIVE("", "stac", X86_FEATURE_SMAP) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SMAP_H */
arch/x86/include/asm/smp.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_SMP_H#define _ASM_X86_SMP_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cpumask.h> #include <linux/thread_info.h>
@@ -175,7 +175,7 @@ extern void nmi_selftest(void);extern unsigned int smpboot_control;extern unsigned long apic_mmio_base; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* Control bits for startup_64 */ #define STARTUP_READ_APICID 0x80000000
arch/x86/include/asm/tdx.h +2 -2
@@ -30,7 +30,7 @@#define TDX_SUCCESS 0ULL#define TDX_RND_NO_ENTROPY 0x8000020300000000ULL -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <uapi/asm/mce.h>
@@ -126,5 +126,5 @@ static inline int tdx_enable(void) { return -ENODEV; }static inline const char *tdx_dump_mce_info (struct mce *m) {return NULL ; }#endif /* CONFIG_INTEL_TDX_HOST */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_TDX_H */
arch/x86/include/asm/thread_info.h +6 -6
@@ -54,7 +54,7 @@* - this struct should fit entirely inside of one cache line * - this struct shares the supervisor stack pages */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct task_struct ;#include <asm/cpufeature.h> #include <linux/atomic.h>
@@ -73,7 +73,7 @@ struct thread_info { .flags = 0, \ } -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ #include <asm/asm-offsets.h>
@@ -161,7 +161,7 @@ struct thread_info {* * preempt_count needs to be 1 initially, until the scheduler is functional. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Walks up the stack frames to make sure that the specified object is
@@ -213,7 +213,7 @@ static inline int arch_within_stack_frames(const void * const stack, #endif } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * Thread-synchronous status.
@@ -224,7 +224,7 @@ static inline int arch_within_stack_frames(const void * const stack,*/ #define TS_COMPAT 0x0002/* 32bit syscall active (64BIT)*/ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_COMPAT #define TS_I386_REGS_POKED 0x0004/* regs poked by 32-bit ptracer */
@@ -242,6 +242,6 @@ static inline int arch_within_stack_frames(const void * const stack,extern void arch_setup_new_exec (void );#define arch_setup_new_exec arch_setup_new_exec -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_THREAD_INFO_H */
arch/x86/include/asm/unwind_hints.h +2 -2
@@ -5,7 +5,7 @@#include "orc_types.h" -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro UNWIND_HINT_END_OF_STACKUNWIND_HINT type=UNWIND_HINT_TYPE_END_OF_STACK
@@ -88,6 +88,6 @@#define UNWIND_HINT_RESTORE \ UNWIND_HINT(UNWIND_HINT_TYPE_RESTORE, 0, 0, 0) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_UNWIND_HINTS_H */
arch/x86/include/asm/vdso/getrandom.h +2 -2
@@ -5,7 +5,7 @@#ifndef __ASM_VDSO_GETRANDOM_H#define __ASM_VDSO_GETRANDOM_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/unistd.h>
@@ -37,6 +37,6 @@ static __always_inline const struct vdso_rng_data *__arch_get_vdso_rng_data(voidreturn &vdso_rng_data; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_GETRANDOM_H */
arch/x86/include/asm/vdso/gettimeofday.h +2 -2
@@ -10,7 +10,7 @@#ifndef __ASM_VDSO_GETTIMEOFDAY_H#define __ASM_VDSO_GETTIMEOFDAY_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <uapi/linux/time.h> #include <asm/vgtod.h>
@@ -350,6 +350,6 @@ static __always_inline u64 vdso_calc_ns(const struct vdso_data *vd, u64 cycles, }#define vdso_calc_ns vdso_calc_ns -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/x86/include/asm/vdso/processor.h +2 -2
@@ -5,7 +5,7 @@#ifndef __ASM_VDSO_PROCESSOR_H#define __ASM_VDSO_PROCESSOR_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ static __always_inline void rep_nop(void)
@@ -22,6 +22,6 @@ struct getcpu_cache;notrace long __vdso_getcpu (unsigned *cpu,unsigned *node,struct getcpu_cache *unused); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_VDSO_PROCESSOR_H */
arch/x86/include/asm/vdso/vsyscall.h +2 -2
@@ -9,7 +9,7 @@#define VDSO_PAGE_PVCLOCK_OFFSET 0#define VDSO_PAGE_HVCLOCK_OFFSET 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <vdso/datapage.h> #include <asm/vgtod.h>
@@ -36,6 +36,6 @@ struct vdso_rng_data *__x86_get_k_vdso_rng_data(void)/* The asm-generic header needs to be included after the definitions above */ #include <asm-generic/vdso/vsyscall.h> -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_VSYSCALL_H */
arch/x86/include/asm/xen/interface.h +5 -5
@@ -72,7 +72,7 @@#endif #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Explicitly size integers that represent pfns in the public interface * with Xen so that on ARM we can have one ABI that works for 32 and 64 * bit guests. */
@@ -137,7 +137,7 @@ DEFINE_GUEST_HANDLE(xen_ulong_t);#define TI_SET_DPL (_ti, _dpl) ((_ti)->flags |= (_dpl))#define TI_SET_IF (_ti, _if) ((_ti)->flags |= ((!!(_if))<<2)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct trap_info { uint8_t vector; /* exception vector */ uint8_t flags; /* 0-3: privilege level; 4: clear event enable? */
@@ -186,7 +186,7 @@ struct arch_shared_info {uint32_t wc_sec_hi; #endif }; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_X86_32 #include <asm/xen/interface_32.h>
@@ -196,7 +196,7 @@ struct arch_shared_info {#include <asm/pvclock-abi.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * The following is all CPU context. Note that the fpu_ctxt block is filled * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
@@ -376,7 +376,7 @@ struct xen_pmu_arch { } c; }; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * Prefix forces emulation of some non-trapping instructions.
arch/x86/include/asm/xen/interface_32.h +2 -2
@@ -44,7 +44,7 @@*/ #define __HYPERVISOR_VIRT_START 0xF5800000 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct cpu_user_regs { uint32_t ebx;
@@ -85,7 +85,7 @@ typedef struct xen_callback xen_callback_t;#define XEN_CALLBACK (__cs, __eip) \ ((struct xen_callback){ .cs = (__cs), .eip = (unsigned long)(__eip) }) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /*
arch/x86/include/asm/xen/interface_64.h +2 -2
@@ -77,7 +77,7 @@#define VGCF_in_syscall (1<<_VGCF_in_syscall)#define VGCF_IN_SYSCALL VGCF_in_syscall -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct iret_context {/* Top of stack (%rsp at point of hypercall). */
@@ -143,7 +143,7 @@ typedef unsigned long xen_callback_t;#define XEN_CALLBACK (__cs, __rip) \ ((unsigned long)(__rip)) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_XEN_INTERFACE_64_H */
arch/x86/math-emu/control_w.h +1 -1
@@ -11,7 +11,7 @@#ifndef _CONTROLW_H_#define _CONTROLW_H_ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _Const_ (x) $##x#else #define _Const_ (x) x
arch/x86/math-emu/exception.h +3 -3
@@ -10,7 +10,7 @@#ifndef _EXCEPTION_H_#define _EXCEPTION_H_ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define Const_ (x) $##x#else #define Const_ (x) x
@@ -37,7 +37,7 @@#define PRECISION_LOST_UP Const_((EX_Precision | SW_C1))#define PRECISION_LOST_DOWN Const_(EX_Precision) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef DEBUG #define EXCEPTION (x) { printk("exception in %s at line %d\n", \
@@ -46,6 +46,6 @@#define EXCEPTION (x) FPU_exception(x)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _EXCEPTION_H_ */
arch/x86/math-emu/fpu_emu.h +3 -3
@@ -20,7 +20,7 @@*/ #define PECULIAR_486 -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#include "fpu_asm.h" #define Const (x) $##x#else
@@ -68,7 +68,7 @@#define FPU_Exception Const(0x80000000)/* Added to tag returns. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include "fpu_system.h"
@@ -213,6 +213,6 @@ asmlinkage int FPU_round(FPU_REG *arg, unsigned int extent, int dummy,#include "fpu_proto.h" #endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _FPU_EMU_H_ */
arch/x86/math-emu/status_w.h +3 -3
@@ -13,7 +13,7 @@#include "fpu_emu.h" /* for definition of PECULIAR_486 */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define Const__ (x) $##x#else #define Const__ (x) x
@@ -37,7 +37,7 @@#define SW_Exc_Mask Const__(0x27f)/* Status word exception bit mask */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define COMP_A_gt_B 1#define COMP_A_eq_B 2
@@ -63,6 +63,6 @@ static inline void setcc(int cc)# define clear_C1 ()#endif /* PECULIAR_486 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _STATUS_H_ */
arch/x86/realmode/rm/realmode.h +2 -2
@@ -2,7 +2,7 @@#ifndef ARCH_X86_REALMODE_RM_REALMODE_H #define ARCH_X86_REALMODE_RM_REALMODE_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__/* * 16-bit ljmpw to the real_mode_seg
@@ -12,7 +12,7 @@*/ #define LJMPW_RM (to) .byte 0xea ; .word (to), real_mode_seg -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * Signature at the end of the realmode region
arch/x86/realmode/rm/wakeup.h +1 -1
@@ -7,7 +7,7 @@#ifndef ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H #define ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> /* This must match data at wakeup.S */
tools/arch/x86/include/asm/asm.h +4 -4
@@ -2,7 +2,7 @@#ifndef _ASM_X86_ASM_H#define _ASM_X86_ASM_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define __ASM_FORM (x, ...) x,## __VA_ARGS__# define __ASM_FORM_RAW (x, ...) x,## __VA_ARGS__# define __ASM_FORM_COMMA (x, ...) x,## __VA_ARGS__,
@@ -123,7 +123,7 @@#ifdef __KERNEL__/* Exception table entry */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define _ASM_EXTABLE_HANDLE (from, to, handler) \ .pushsection "__ex_table","a" ; \ .balign 4 ; \
@@ -154,7 +154,7 @@# define _ASM_NOKPROBE (entry)# endif -#else /* ! __ASSEMBLY__ */ +#else /* ! __ASSEMBLER__ */ # define _EXPAND_EXTABLE_HANDLE (x) #x# define _ASM_EXTABLE_HANDLE (from, to, handler) \ " .pushsection \"__ex_table\",\"a\"\n" \
@@ -186,7 +186,7 @@*/ registerunsigned long current_stack_pointer asm (_ASM_SP );#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __KERNEL__ */
tools/arch/x86/include/asm/nops.h +1 -1
@@ -82,7 +82,7 @@#define ASM_NOP7 _ASM_BYTES(BYTES_NOP7)#define ASM_NOP8 _ASM_BYTES(BYTES_NOP8) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern const unsigned char *const x86_nops[];#endif
tools/arch/x86/include/asm/orc_types.h +2 -2
@@ -45,7 +45,7 @@#define ORC_TYPE_REGS 3#define ORC_TYPE_REGS_PARTIAL 4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/byteorder.h> /*
@@ -73,6 +73,6 @@ struct orc_entry {#endif } __packed; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ORC_TYPES_H */
tools/arch/x86/include/asm/pvclock-abi.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PVCLOCK_ABI_H#define _ASM_X86_PVCLOCK_ABI_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * These structs MUST NOT be changed.
@@ -44,5 +44,5 @@ struct pvclock_wall_clock {#define PVCLOCK_GUEST_STOPPED (1 << 1)/* PVCLOCK_COUNTS_FROM_ZERO broke ABI and can't be used anymore. */ #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PVCLOCK_ABI_H */
[tip: x86/core] x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-UAPI headers
In reply to Thomas HuthThe following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 24a295e4ef1ca8e97d8b7015e1887b6e83e1c8be Gitweb: https://git.kernel.org/tip/24a295e4ef1ca8e97d8b7015e1887b6e83e1c8be Author: Thomas Huth <[email protected]> AuthorDate: Wed, 19 Mar 2025 11:30:57 +01:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 19 Mar 2025 11:47:30 +01:00
x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-UAPI headers
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 is mostly a mechanical patch (done with a simple "sed -i" statement), with some manual tweaks in <asm/frame.h>, <asm/hw_irq.h> and <asm/setup.h> that mentioned this macro in comments with some missing underscores.
--- arch/x86/boot/boot.h | 4 ++-- arch/x86/entry/vdso/extable.h | 2 +- arch/x86/include/asm/alternative.h | 6 +++--- arch/x86/include/asm/asm.h | 10 +++++----- arch/x86/include/asm/boot.h | 2 +- arch/x86/include/asm/cpufeature.h | 4 ++-- arch/x86/include/asm/cpumask.h | 4 ++-- arch/x86/include/asm/current.h | 4 ++-- arch/x86/include/asm/desc_defs.h | 4 ++-- arch/x86/include/asm/dwarf2.h | 2 +- arch/x86/include/asm/fixmap.h | 4 ++-- arch/x86/include/asm/frame.h | 10 +++++----- arch/x86/include/asm/fred.h | 4 ++-- arch/x86/include/asm/fsgsbase.h | 4 ++-- arch/x86/include/asm/ftrace.h | 8 ++++---- arch/x86/include/asm/hw_irq.h | 4 ++-- arch/x86/include/asm/ibt.h | 12 ++++++------ arch/x86/include/asm/idtentry.h | 6 +++--- arch/x86/include/asm/inst.h | 2 +- arch/x86/include/asm/irqflags.h | 10 +++++----- arch/x86/include/asm/jump_label.h | 4 ++-- arch/x86/include/asm/kasan.h | 2 +- arch/x86/include/asm/kexec.h | 4 ++-- arch/x86/include/asm/linkage.h | 6 +++--- arch/x86/include/asm/mem_encrypt.h | 4 ++-- arch/x86/include/asm/msr.h | 4 ++-- arch/x86/include/asm/nops.h | 2 +- arch/x86/include/asm/nospec-branch.h | 6 +++--- arch/x86/include/asm/orc_types.h | 4 ++-- arch/x86/include/asm/page.h | 4 ++-- arch/x86/include/asm/page_32.h | 4 ++-- arch/x86/include/asm/page_32_types.h | 4 ++-- arch/x86/include/asm/page_64.h | 4 ++-- arch/x86/include/asm/page_64_types.h | 2 +- arch/x86/include/asm/page_types.h | 4 ++-- arch/x86/include/asm/paravirt.h | 14 +++++++------- arch/x86/include/asm/paravirt_types.h | 4 ++-- arch/x86/include/asm/percpu.h | 4 ++-- arch/x86/include/asm/pgtable-2level_types.h | 4 ++-- arch/x86/include/asm/pgtable-3level_types.h | 4 ++-- arch/x86/include/asm/pgtable-invert.h | 4 ++-- arch/x86/include/asm/pgtable.h | 12 ++++++------ arch/x86/include/asm/pgtable_32.h | 4 ++-- arch/x86/include/asm/pgtable_32_areas.h | 2 +- arch/x86/include/asm/pgtable_64.h | 6 +++--- arch/x86/include/asm/pgtable_64_types.h | 4 ++-- arch/x86/include/asm/pgtable_types.h | 10 +++++----- arch/x86/include/asm/prom.h | 4 ++-- arch/x86/include/asm/pti.h | 4 ++-- arch/x86/include/asm/ptrace.h | 4 ++-- arch/x86/include/asm/purgatory.h | 4 ++-- arch/x86/include/asm/pvclock-abi.h | 4 ++-- arch/x86/include/asm/realmode.h | 4 ++-- arch/x86/include/asm/segment.h | 8 ++++---- arch/x86/include/asm/setup.h | 6 +++--- arch/x86/include/asm/setup_data.h | 4 ++-- arch/x86/include/asm/shared/tdx.h | 4 ++-- arch/x86/include/asm/shstk.h | 4 ++-- arch/x86/include/asm/signal.h | 8 ++++---- arch/x86/include/asm/smap.h | 6 +++--- arch/x86/include/asm/smp.h | 4 ++-- arch/x86/include/asm/tdx.h | 4 ++-- arch/x86/include/asm/thread_info.h | 12 ++++++------ arch/x86/include/asm/unwind_hints.h | 4 ++-- arch/x86/include/asm/vdso/getrandom.h | 4 ++-- arch/x86/include/asm/vdso/gettimeofday.h | 4 ++-- arch/x86/include/asm/vdso/processor.h | 4 ++-- arch/x86/include/asm/vdso/vsyscall.h | 4 ++-- arch/x86/include/asm/xen/interface.h | 10 +++++----- arch/x86/include/asm/xen/interface_32.h | 4 ++-- arch/x86/include/asm/xen/interface_64.h | 4 ++-- arch/x86/math-emu/control_w.h | 2 +- arch/x86/math-emu/exception.h | 6 +++--- arch/x86/math-emu/fpu_emu.h | 6 +++--- arch/x86/math-emu/status_w.h | 6 +++--- arch/x86/realmode/rm/realmode.h | 4 ++-- arch/x86/realmode/rm/wakeup.h | 2 +- tools/arch/x86/include/asm/asm.h | 8 ++++---- tools/arch/x86/include/asm/nops.h | 2 +- tools/arch/x86/include/asm/orc_types.h | 4 ++-- tools/arch/x86/include/asm/pvclock-abi.h | 4 ++-- 81 files changed, 201 insertions(+), 201 deletions(-)
arch/x86/boot/boot.h +2 -2
@@ -16,7 +16,7 @@#define STACK_SIZE 1024/* Minimum number of bytes for stack */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stdarg.h> #include <linux/types.h>
@@ -327,6 +327,6 @@ void probe_cards(int unsafe);/* video-vesa.c */ void vesa_store_edid (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* BOOT_BOOT_H */
arch/x86/entry/vdso/extable.h +1 -1
@@ -7,7 +7,7 @@* vDSO uses a dedicated handler the addresses are relative to the overall * exception table, not each individual entry. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _ASM_VDSO_EXTABLE_HANDLE (from, to) \ ASM_VDSO_EXTABLE_HANDLE from to
arch/x86/include/asm/alternative.h +3 -3
@@ -15,7 +15,7 @@#define ALT_DIRECT_CALL (feature) ((ALT_FLAG_DIRECT_CALL << ALT_FLAGS_SHIFT) | (feature))#define ALT_CALL_ALWAYS ALT_DIRECT_CALL(X86_FEATURE_ALWAYS) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stddef.h>
@@ -277,7 +277,7 @@ static inline int alternatives_text_reserved(void *start, void *end)void BUG_func (void );void nop_func (void ); -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_SMP .macro LOCK_PREFIX
@@ -360,6 +360,6 @@ void nop_func(void); ALTERNATIVE_2 oldinstr, newinstr_no, X86_FEATURE_ALWAYS, \ newinstr_yes, ft_flags -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_ALTERNATIVE_H */
arch/x86/include/asm/asm.h +5 -5
@@ -2,7 +2,7 @@#ifndef _ASM_X86_ASM_H#define _ASM_X86_ASM_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define __ASM_FORM (x, ...) x,## __VA_ARGS__# define __ASM_FORM_RAW (x, ...) x,## __VA_ARGS__# define __ASM_FORM_COMMA (x, ...) x,## __VA_ARGS__,
@@ -113,7 +113,7 @@#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #ifndef __pic__ static __always_inline __pure void *rip_rel_ptr(void *p) {
@@ -144,7 +144,7 @@ static __always_inline __pure void *rip_rel_ptr(void *p)# include <asm/extable_fixup_types.h> /* Exception table entry */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define _ASM_EXTABLE_TYPE (from, to, type) \ .pushsection "__ex_table","a" ; \
@@ -164,7 +164,7 @@ static __always_inline __pure void *rip_rel_ptr(void *p)# define _ASM_NOKPROBE (entry)# endif -#else /* ! __ASSEMBLY__ */ +#else /* ! __ASSEMBLER__ */ # define DEFINE_EXTABLE_TYPE_REG \ ".macro extable_type_reg type:req reg:req\n" \
@@ -232,7 +232,7 @@ static __always_inline __pure void *rip_rel_ptr(void *p)*/ registerunsigned long current_stack_pointer asm (_ASM_SP );#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define _ASM_EXTABLE (from, to) \ _ASM_EXTABLE_TYPE(from, to, EX_TYPE_DEFAULT)
arch/x86/include/asm/boot.h +1 -1
@@ -74,7 +74,7 @@# define BOOT_STACK_SIZE 0x1000#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned int output_len;extern const unsigned long kernel_text_size;extern const unsigned long kernel_total_size;
arch/x86/include/asm/cpufeature.h +2 -2
@@ -4,7 +4,7 @@#include <asm/processor.h> -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) && !defined(__ASSEMBLER__)#include <asm/asm.h> #include <linux/bitops.h>
@@ -137,5 +137,5 @@ t_no:#define CPU_FEATURE_TYPEVAL boot_cpu_data.x86_vendor, boot_cpu_data.x86, \ boot_cpu_data.x86_model -#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ +#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */ #endif /* _ASM_X86_CPUFEATURE_H */
arch/x86/include/asm/cpumask.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_CPUMASK_H#define _ASM_X86_CPUMASK_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cpumask.h> extern void setup_cpu_local_masks (void );
@@ -34,5 +34,5 @@ static __always_inline void arch_cpumask_clear_cpu(int cpu, struct cpumask *dstp#define arch_cpu_is_offline (cpu) unlikely(!arch_cpu_online(cpu)) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_CPUMASK_H */
arch/x86/include/asm/current.h +2 -2
@@ -5,7 +5,7 @@#include <linux/build_bug.h> #include <linux/compiler.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cache.h> #include <asm/percpu.h>
@@ -27,6 +27,6 @@ static __always_inline struct task_struct *get_current(void)#define current get_current() -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_CURRENT_H */
arch/x86/include/asm/desc_defs.h +2 -2
@@ -58,7 +58,7 @@#define DESC_USER (_DESC_DPL(3)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -166,7 +166,7 @@ struct desc_ptr {unsigned long address; } __attribute__((packed)) ; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* Boot IDT definitions */ #define BOOT_IDT_ENTRIES 32
arch/x86/include/asm/dwarf2.h +1 -1
@@ -2,7 +2,7 @@#ifndef _ASM_X86_DWARF2_H#define _ASM_X86_DWARF2_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#warning "asm/dwarf2.h should be only included in pure assembly files"#endif
arch/x86/include/asm/fixmap.h +2 -2
@@ -31,7 +31,7 @@/* fixmap starts downwards from the 507th entry in level2_fixmap_pgt */ #define FIXMAP_PMD_TOP 507 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/kernel.h> #include <asm/apicdef.h> #include <asm/page.h>
@@ -196,5 +196,5 @@ void __init *early_memremap_decrypted_wp(resource_size_t phys_addr,void __early_set_fixmap (enum fixed_addresses idx,phys_addr_t phys,pgprot_t flags); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_FIXMAP_H */
arch/x86/include/asm/frame.h +5 -5
@@ -11,7 +11,7 @@#ifdef CONFIG_FRAME_POINTER -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro FRAME_BEGIN push %_ASM_BP
@@ -51,7 +51,7 @@ .endm#endif /* CONFIG_X86_64 */ -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ #define FRAME_BEGIN \ "push %" _ASM_BP "\n" \
@@ -82,18 +82,18 @@ static inline unsigned long encode_frame_pointer(struct pt_regs *regs)#endif /* CONFIG_X86_64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define FRAME_OFFSET __ASM_SEL(4, 8)#else /* !CONFIG_FRAME_POINTER */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro ENCODE_FRAME_POINTER ptregs_offset=0 .endm -#else /* !__ASSEMBLY */ +#else /* !__ASSEMBLER__ */ #define ENCODE_FRAME_POINTER
arch/x86/include/asm/fred.h +2 -2
@@ -32,7 +32,7 @@#define FRED_CONFIG_INT_STKLVL (l) (_AT(unsigned long, l) << 9)#define FRED_CONFIG_ENTRYPOINT (p) _AT(unsigned long, (p)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_X86_FRED #include <linux/kernel.h>
@@ -113,6 +113,6 @@ static inline void fred_entry_from_kvm(unsigned int type, unsigned int vector) {static inline void fred_sync_rsp0 (unsigned long rsp0) { }static inline void fred_update_rsp0 (void ) { }#endif /* CONFIG_X86_FRED */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* ASM_X86_FRED_H */
arch/x86/include/asm/fsgsbase.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_FSGSBASE_H#define _ASM_FSGSBASE_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_X86_64
@@ -80,6 +80,6 @@ extern unsigned long x86_fsgsbase_read_task(struct task_struct *task,#endif /* CONFIG_X86_64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_FSGSBASE_H */
arch/x86/include/asm/ftrace.h +4 -4
@@ -22,7 +22,7 @@#define ARCH_SUPPORTS_FTRACE_OPS 1#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void __fentry__ (void );static inline unsigned long ftrace_call_adjust (unsigned long addr)
@@ -106,11 +106,11 @@ struct dyn_arch_ftrace { };#endif /* CONFIG_DYNAMIC_FTRACE */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_FUNCTION_TRACER */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void prepare_ftrace_return (unsigned long ip,unsigned long *parent,unsigned long frame_pointer);
@@ -154,6 +154,6 @@ static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs) }#endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_IA32_EMULATION */ #endif /* !COMPILE_OFFSETS */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_FTRACE_H */
arch/x86/include/asm/hw_irq.h +2 -2
@@ -16,7 +16,7 @@#include <asm/irq_vectors.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/percpu.h> #include <linux/profile.h>
@@ -128,6 +128,6 @@ extern char spurious_entries_start[];typedef struct irq_desc *vector_irq_t [NR_VECTORS ];DECLARE_PER_CPU (vector_irq_t, vector_irq); -#endif /* !ASSEMBLY_ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_HW_IRQ_H */
arch/x86/include/asm/ibt.h +6 -6
@@ -21,7 +21,7 @@#define HAS_KERNEL_IBT 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_X86_64 #define ASM_ENDBR "endbr64\n\t"
@@ -82,7 +82,7 @@ extern __noendbr bool is_endbr(u32 *val); extern __noendbr u64 ibt_save(bool disable); extern __noendbr void ibt_restore(u64 save); -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_X86_64 #define ENDBR endbr64
@@ -90,13 +90,13 @@ extern __noendbr void ibt_restore(u64 save);#define ENDBR endbr32#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #else /* !IBT */ #define HAS_KERNEL_IBT 0 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define ASM_ENDBR #define IBT_NOSEAL (name)
@@ -108,11 +108,11 @@ static inline bool is_endbr(u32 *val) { return false; }static inline u64 ibt_save (bool disable) {return 0 ; }static inline void ibt_restore (u64 save) { } -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #define ENDBR -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_X86_KERNEL_IBT */
arch/x86/include/asm/idtentry.h +3 -3
@@ -7,7 +7,7 @@#define IDT_ALIGN (8 * (1 + HAS_KERNEL_IBT)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/entry-common.h> #include <linux/hardirq.h>
@@ -474,7 +474,7 @@ static inline void fred_install_sysvec(unsigned int vector, const idtentry_t fun idt_install_sysvec(vector, asm_##function); \ } -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ /* * The ASM variants for DECLARE_IDTENTRY*() which emit the ASM entry stubs.
@@ -579,7 +579,7 @@ SYM_CODE_START(spurious_entries_start) SYM_CODE_END(spurious_entries_start)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * The actual entry points. Note that DECLARE_IDTENTRY*() serves two
arch/x86/include/asm/inst.h +1 -1
@@ -6,7 +6,7 @@#ifndef X86_ASM_INST_H #define X86_ASM_INST_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define REG_NUM_INVALID 100
arch/x86/include/asm/irqflags.h +5 -5
@@ -4,7 +4,7 @@#include <asm/processor-flags.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/nospec-branch.h>
@@ -79,7 +79,7 @@ static __always_inline void native_local_irq_restore(unsigned long flags)#ifdef CONFIG_PARAVIRT_XXL #include <asm/paravirt.h> #else -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> static __always_inline unsigned long arch_local_save_flags (void )
@@ -133,10 +133,10 @@ static __always_inline unsigned long arch_local_irq_save(void)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_PARAVIRT_XXL */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ static __always_inline int arch_irqs_disabled_flags(unsigned long flags) {return !(flags &X86_EFLAGS_IF );
@@ -154,6 +154,6 @@ static __always_inline void arch_local_irq_restore(unsigned long flags)if (!arch_irqs_disabled_flags (flags))arch_local_irq_enable (); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif
arch/x86/include/asm/jump_label.h +2 -2
@@ -7,7 +7,7 @@#include <asm/asm.h> #include <asm/nops.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stringify.h> #include <linux/types.h>
@@ -55,6 +55,6 @@ l_yes:extern int arch_jump_entry_size (struct jump_entry *entry); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/x86/include/asm/kasan.h +1 -1
@@ -23,7 +23,7 @@ (1ULL << (__VIRTUAL_MASK_SHIFT - \ KASAN_SHADOW_SCALE_SHIFT))) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_KASAN void __init kasan_early_init (void );
arch/x86/include/asm/kexec.h +2 -2
@@ -13,7 +13,7 @@# define KEXEC_CONTROL_PAGE_SIZE 4096# define KEXEC_CONTROL_CODE_MAX_SIZE 2048 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/string.h> #include <linux/kernel.h>
@@ -217,6 +217,6 @@ unsigned int arch_crash_get_elfcorehdr_size(void);#define crash_get_elfcorehdr_size arch_crash_get_elfcorehdr_size#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_KEXEC_H */
arch/x86/include/asm/linkage.h +3 -3
@@ -38,7 +38,7 @@#define ASM_FUNC_ALIGN __stringify(__FUNC_ALIGN)#define SYM_F_ALIGN __FUNC_ALIGN -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#if defined(CONFIG_MITIGATION_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define RET jmp __x86_return_thunk
@@ -50,7 +50,7 @@#endif #endif /* CONFIG_MITIGATION_RETPOLINE */ -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #if defined(CONFIG_MITIGATION_RETHUNK ) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO )#define ASM_RET "jmp __x86_return_thunk\n\t"
@@ -62,7 +62,7 @@#endif #endif /* CONFIG_MITIGATION_RETPOLINE */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * Depending on -fpatchable-function-entry=N,N usage (CONFIG_CALL_PADDING) the
arch/x86/include/asm/mem_encrypt.h +2 -2
@@ -10,7 +10,7 @@#ifndef __X86_MEM_ENCRYPT_H__#define __X86_MEM_ENCRYPT_H__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/init.h> #include <linux/cc_platform.h>
@@ -114,6 +114,6 @@ void add_encrypt_protection_map(void);extern char __start_bss_decrypted[], __end_bss_decrypted[], __start_bss_decrypted_unused[]; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __X86_MEM_ENCRYPT_H__ */
arch/x86/include/asm/msr.h +2 -2
@@ -4,7 +4,7 @@#include "msr-index.h" -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/asm.h> #include <asm/errno.h>
@@ -397,5 +397,5 @@ static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])return wrmsr_safe_regs (regs); }#endif /* CONFIG_SMP */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_MSR_H */
arch/x86/include/asm/nops.h +1 -1
@@ -82,7 +82,7 @@#define ASM_NOP7 _ASM_BYTES(BYTES_NOP7)#define ASM_NOP8 _ASM_BYTES(BYTES_NOP8) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern const unsigned char *const x86_nops[];#endif
arch/x86/include/asm/nospec-branch.h +3 -3
@@ -176,7 +176,7 @@ add $(BITS_PER_LONG/8), %_ASM_SP; \ lfence; -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__/* * (ab)use RETPOLINE_SAFE on RET to annotate away 'bare' RET instructions
@@ -334,7 +334,7 @@#define CLEAR_BRANCH_HISTORY_VMEXIT #endif -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ typedef u8 retpoline_thunk_t [RETPOLINE_THUNK_SIZE ];extern retpoline_thunk_t __x86_indirect_thunk_array[];
@@ -603,6 +603,6 @@ static __always_inline void mds_idle_clear_cpu_buffers(void)mds_clear_cpu_buffers (); } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_NOSPEC_BRANCH_H_ */
arch/x86/include/asm/orc_types.h +2 -2
@@ -45,7 +45,7 @@#define ORC_TYPE_REGS 3#define ORC_TYPE_REGS_PARTIAL 4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/byteorder.h> /*
@@ -73,6 +73,6 @@ struct orc_entry {#endif } __packed; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ORC_TYPES_H */
arch/x86/include/asm/page.h +2 -2
@@ -14,7 +14,7 @@#include <asm/page_32.h> #endif /* CONFIG_X86_64 */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct page ;
@@ -84,7 +84,7 @@ static __always_inline u64 __is_canonical_address(u64 vaddr, u8 vaddr_bits) return __canonical_address(vaddr, vaddr_bits) == vaddr; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #include <asm-generic/memory_model.h> #include <asm-generic/getorder.h>
arch/x86/include/asm/page_32.h +2 -2
@@ -4,7 +4,7 @@#include <asm/page_32_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __phys_addr_nodebug (x) ((x) - PAGE_OFFSET)#ifdef CONFIG_DEBUG_VIRTUAL
@@ -26,6 +26,6 @@ static inline void copy_page(void *to, void *from) {memcpy (to, from,PAGE_SIZE ); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PAGE_32_H */
arch/x86/include/asm/page_32_types.h +2 -2
@@ -63,7 +63,7 @@*/ #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This much address space is reserved for vmalloc() and iomap()
@@ -75,6 +75,6 @@ extern int sysctl_legacy_va_layout;extern void find_low_pfn_range (void );extern void setup_bootmem_allocator (void ); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PAGE_32_DEFS_H */
arch/x86/include/asm/page_64.h +2 -2
@@ -4,7 +4,7 @@#include <asm/page_64_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/cpufeatures.h> #include <asm/alternative.h>
@@ -95,7 +95,7 @@ static __always_inline unsigned long task_size_max(void) }#endif /* CONFIG_X86_5LEVEL */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_X86_VSYSCALL_EMULATION # define __HAVE_ARCH_GATE_AREA 1
arch/x86/include/asm/page_64_types.h +1 -1
@@ -2,7 +2,7 @@#ifndef _ASM_X86_PAGE_64_DEFS_H#define _ASM_X86_PAGE_64_DEFS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/kaslr.h> #endif
arch/x86/include/asm/page_types.h +2 -2
@@ -43,7 +43,7 @@#define IOREMAP_MAX_ORDER (PMD_SHIFT)#endif /* CONFIG_X86_64 */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_DYNAMIC_PHYSICAL_MASK extern phys_addr_t physical_mask;
@@ -66,6 +66,6 @@ bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn);extern void initmem_init (void ); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PAGE_DEFS_H */
arch/x86/include/asm/paravirt.h +7 -7
@@ -6,7 +6,7 @@#include <asm/paravirt_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct mm_struct ;#endif
@@ -15,7 +15,7 @@ struct mm_struct;#include <asm/asm.h> #include <asm/nospec-branch.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/bug.h> #include <linux/types.h> #include <linux/cpumask.h>
@@ -715,7 +715,7 @@ static __always_inline unsigned long arch_local_irq_save(void)extern void default_banner (void );void native_pv_lock_init (void )__init ; -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_X86_64 #ifdef CONFIG_PARAVIRT_XXL
@@ -735,18 +735,18 @@ void native_pv_lock_init(void) __init;#endif /* CONFIG_PARAVIRT_XXL */ #endif /* CONFIG_X86_64 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #else /* CONFIG_PARAVIRT */ # define default_banner x86_init_noop -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline void native_pv_lock_init (void ) { }#endif #endif /* !CONFIG_PARAVIRT */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #ifndef CONFIG_PARAVIRT_XXL static inline void paravirt_enter_mmap(struct mm_struct *mm) {
@@ -764,5 +764,5 @@ static inline void paravirt_set_cap(void) { }#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PARAVIRT_H */
arch/x86/include/asm/paravirt_types.h +2 -2
@@ -4,7 +4,7 @@#ifdef CONFIG_PARAVIRT -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/desc_defs.h>
@@ -525,7 +525,7 @@ unsigned long pv_native_read_cr2(void);#define paravirt_nop ((void *)nop_func) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define ALT_NOT_XEN ALT_NOT(X86_FEATURE_XENPV)
arch/x86/include/asm/percpu.h +2 -2
@@ -10,7 +10,7 @@# define __percpu_rel#endif -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#ifdef CONFIG_SMP # define __percpu %__percpu_seg:
@@ -588,7 +588,7 @@ do { \/* We can use this directly for local CPU (faster). */ DECLARE_PER_CPU_CACHE_HOT(unsigned long, this_cpu_off); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_SMP
arch/x86/include/asm/pgtable-2level_types.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_PGTABLE_2LEVEL_DEFS_H#define _ASM_X86_PGTABLE_2LEVEL_DEFS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> typedef unsigned long pteval_t ;
@@ -16,7 +16,7 @@ typedef union {pteval_t pte; pteval_t pte_low; } pte_t; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define SHARED_KERNEL_PMD 0
arch/x86/include/asm/pgtable-3level_types.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H#define _ASM_X86_PGTABLE_3LEVEL_DEFS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> typedef u64 pteval_t ;
@@ -25,7 +25,7 @@ typedef union { };pmdval_t pmd; } pmd_t; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define SHARED_KERNEL_PMD (!static_cpu_has(X86_FEATURE_PTI))
arch/x86/include/asm/pgtable-invert.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_PGTABLE_INVERT_H#define _ASM_PGTABLE_INVERT_H 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * A clear pte value is special, and doesn't get inverted.
@@ -36,6 +36,6 @@ static inline u64 flip_protnone_guard(u64 oldval, u64 val, u64 mask)return val; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/x86/include/asm/pgtable.h +6 -6
@@ -15,7 +15,7 @@ cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS))) \ : (prot)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/spinlock.h> #include <asm/x86_init.h> #include <asm/pkru.h>
@@ -973,7 +973,7 @@ static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd) }#endif /* CONFIG_MITIGATION_PAGE_TABLE_ISOLATION */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #ifdef CONFIG_X86_32
@@ -982,7 +982,7 @@ static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd)# include <asm/pgtable_64.h> #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/mm_types.h> #include <linux/mmdebug.h> #include <linux/log2.h>
@@ -1233,12 +1233,12 @@ static inline int pgd_none(pgd_t pgd) }#endif /* CONFIG_PGTABLE_LEVELS > 4 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET)#define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern int direct_gbpages;void init_mem_mapping (void );
@@ -1812,6 +1812,6 @@ bool arch_is_platform_page(u64 paddr);WARN_ON_ONCE (pgd_present (*pgdp) && !pgd_same (*pgdp, pgd)); \set_pgd (pgdp, pgd); \ }) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PGTABLE_H */
arch/x86/include/asm/pgtable_32.h +2 -2
@@ -13,7 +13,7 @@* This file contains the functions and defines necessary to modify and use * the i386 page table tree. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/processor.h> #include <linux/threads.h> #include <asm/paravirt.h>
@@ -45,7 +45,7 @@ do { \flush_tlb_one_kernel ((vaddr)); \ } while (0) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * This is used to calculate the .brk reservation for initial pagetables.
arch/x86/include/asm/pgtable_32_areas.h +1 -1
@@ -13,7 +13,7 @@*/ #define VMALLOC_OFFSET (8 * 1024 * 1024) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern bool __vmalloc_start_set;/* set once high_memory is set */ #endif
arch/x86/include/asm/pgtable_64.h +3 -3
@@ -5,7 +5,7 @@#include <linux/const.h> #include <asm/pgtable_64_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This file contains the functions and defines necessary to modify and use
@@ -270,7 +270,7 @@ static inline bool gup_fast_permitted(unsigned long start, unsigned long end)#include <asm/pgtable-invert.h> -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #define l4_index (x) (((x) >> 39) & 511)#define pud_index (x) (((x) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
@@ -291,5 +291,5 @@ L3_START_KERNEL = pud_index(__START_KERNEL_map) i = i +1 ; \ .endr -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PGTABLE_64_H */
arch/x86/include/asm/pgtable_64_types.h +2 -2
@@ -4,7 +4,7 @@#include <asm/sparsemem.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/kaslr.h>
@@ -44,7 +44,7 @@ static inline bool pgtable_l5_enabled(void)extern unsigned int pgdir_shift;extern unsigned int ptrs_per_p4d; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #define SHARED_KERNEL_PMD 0
arch/x86/include/asm/pgtable_types.h +5 -5
@@ -166,7 +166,7 @@* to have the WB mode at index 0 (all bits clear). This is the default * right now and likely would break too much if changed. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__enum page_cache_mode { _PAGE_CACHE_MODE_WB =0 , _PAGE_CACHE_MODE_WC = 1,
@@ -241,7 +241,7 @@ enum page_cache_mode {#define __PAGE_KERNEL_IO_NOCACHE __PAGE_KERNEL_NOCACHE -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __PAGE_KERNEL_ENC (__PAGE_KERNEL | _ENC)#define __PAGE_KERNEL_ENC_WP (__PAGE_KERNEL_WP | _ENC)
@@ -264,7 +264,7 @@ enum page_cache_mode {#define PAGE_KERNEL_IO __pgprot_mask(__PAGE_KERNEL_IO)#define PAGE_KERNEL_IO_NOCACHE __pgprot_mask(__PAGE_KERNEL_IO_NOCACHE) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * early identity mapping pte attrib macros.
@@ -283,7 +283,7 @@ enum page_cache_mode {# include <asm/pgtable_64_types.h> #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -582,6 +582,6 @@ extern int __init kernel_map_pages_in_pgd(pgd_t *pgd, u64 pfn, unsigned long page_flags);extern int __init kernel_unmap_pages_in_pgd (pgd_t *pgd,unsigned long address,unsigned long numpages); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PGTABLE_DEFS_H */
arch/x86/include/asm/prom.h +2 -2
@@ -8,7 +8,7 @@#ifndef _ASM_X86_PROM_H#define _ASM_X86_PROM_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/of.h> #include <linux/types.h>
@@ -33,5 +33,5 @@ static inline void x86_flattree_get_config(void) { }extern char cmd_line[COMMAND_LINE_SIZE ]; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/x86/include/asm/pti.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PTI_H#define _ASM_X86_PTI_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION extern void pti_init (void );
@@ -11,5 +11,5 @@ extern void pti_finalize(void);static inline void pti_check_boottime_disable (void ) { }#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PTI_H */
arch/x86/include/asm/ptrace.h +2 -2
@@ -6,7 +6,7 @@#include <asm/page_types.h> #include <uapi/asm/ptrace.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef __i386__ struct pt_regs {
@@ -469,5 +469,5 @@ extern int do_set_thread_area(struct task_struct *p, int idx,# define do_set_thread_area_64 (p, s, t) (0)#endif -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_PTRACE_H */
arch/x86/include/asm/purgatory.h +2 -2
@@ -2,10 +2,10 @@#ifndef _ASM_X86_PURGATORY_H#define _ASM_X86_PURGATORY_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/purgatory.h> extern void purgatory (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_PURGATORY_H */
arch/x86/include/asm/pvclock-abi.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PVCLOCK_ABI_H#define _ASM_X86_PVCLOCK_ABI_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * These structs MUST NOT be changed.
@@ -44,5 +44,5 @@ struct pvclock_wall_clock {#define PVCLOCK_GUEST_STOPPED (1 << 1)/* PVCLOCK_COUNTS_FROM_ZERO broke ABI and can't be used anymore. */ #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PVCLOCK_ABI_H */
arch/x86/include/asm/realmode.h +2 -2
@@ -9,7 +9,7 @@#define TH_FLAGS_SME_ACTIVE_BIT 0#define TH_FLAGS_SME_ACTIVE BIT(TH_FLAGS_SME_ACTIVE_BIT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/io.h>
@@ -95,6 +95,6 @@ void reserve_real_mode(void);void load_trampoline_pgtable (void );void init_real_mode (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ARCH_X86_REALMODE_H */
arch/x86/include/asm/segment.h +4 -4
@@ -233,7 +233,7 @@#define VDSO_CPUNODE_BITS 12#define VDSO_CPUNODE_MASK 0xfff -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Helper functions to store/load CPU and node numbers */
@@ -265,7 +265,7 @@ static inline void vdso_read_cpunode(unsigned *cpu, unsigned *node) *node = (p >> VDSO_CPUNODE_BITS); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef __KERNEL__
@@ -286,7 +286,7 @@ static inline void vdso_read_cpunode(unsigned *cpu, unsigned *node)*/ #define XEN_EARLY_IDT_HANDLER_SIZE (8 + ENDBR_INSN_SIZE) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern const char early_idt_handler_array[NUM_EXCEPTION_VECTORS ][EARLY_IDT_HANDLER_SIZE ];extern void early_ignore_irq (void );
@@ -350,7 +350,7 @@ static inline void __loadsegment_fs(unsigned short value)#define savesegment (seg, value) \ asm("mov %%" #seg ",%0":"=r" (value) : : "memory") -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __KERNEL__ */ #endif /* _ASM_X86_SEGMENT_H */
arch/x86/include/asm/setup.h +3 -3
@@ -27,7 +27,7 @@#define OLD_CL_ADDRESS 0x020/* Relative to real mode data */ #define NEW_CL_POINTER 0x228/* Relative to real mode data */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cache.h> #include <asm/bootparam.h>
@@ -142,7 +142,7 @@ extern bool builtin_cmdline_added __ro_after_init;#define builtin_cmdline_added 0#endif -#else /* __ASSEMBLY */ +#else /* __ASSEMBLER__ */ .macro __RESERVE_BRK name, size .pushsection .bss..brk, "aw"
@@ -154,6 +154,6 @@ SYM_DATA_END(__brk_\name)#define RESERVE_BRK (name, size) __RESERVE_BRK name, size -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SETUP_H */
arch/x86/include/asm/setup_data.h +2 -2
@@ -4,7 +4,7 @@#include <uapi/asm/setup_data.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct pci_setup_rom { struct setup_data data;
@@ -27,6 +27,6 @@ struct efi_setup_data {u64 reserved[8 ]; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SETUP_DATA_H */
arch/x86/include/asm/shared/tdx.h +2 -2
@@ -106,7 +106,7 @@#define TDX_PS_1G 2#define TDX_PS_NR (TDX_PS_1G + 1) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler_attributes.h>
@@ -177,5 +177,5 @@ static __always_inline u64 hcall_func(u64 exit_reason)return exit_reason; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_SHARED_TDX_H */
arch/x86/include/asm/shstk.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_SHSTK_H#define _ASM_X86_SHSTK_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> struct task_struct ;
@@ -37,6 +37,6 @@ static inline int shstk_update_last_frame(unsigned long val) { return 0; }static inline bool shstk_is_enabled (void ) {return false; }#endif /* CONFIG_X86_USER_SHADOW_STACK */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SHSTK_H */
arch/x86/include/asm/signal.h +4 -4
@@ -2,7 +2,7 @@#ifndef _ASM_X86_SIGNAL_H#define _ASM_X86_SIGNAL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/linkage.h> /* Most things should be clean enough to redefine this at will, if care
@@ -28,9 +28,9 @@ typedef struct {#define SA_IA32_ABI 0x02000000u#define SA_X32_ABI 0x01000000u -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #include <uapi/asm/signal.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __ARCH_HAS_SA_RESTORER
@@ -101,5 +101,5 @@ struct pt_regs;#endif /* !__i386__ */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SIGNAL_H */
arch/x86/include/asm/smap.h +3 -3
@@ -13,7 +13,7 @@#include <asm/cpufeatures.h> #include <asm/alternative.h> -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define ASM_CLAC \ ALTERNATIVE "", "clac", X86_FEATURE_SMAP
@@ -21,7 +21,7 @@#define ASM_STAC \ ALTERNATIVE "", "stac", X86_FEATURE_SMAP -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ static __always_inline void clac(void) {
@@ -61,6 +61,6 @@ static __always_inline void smap_restore(unsigned long flags)#define ASM_STAC \ ALTERNATIVE("", "stac", X86_FEATURE_SMAP) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_SMAP_H */
arch/x86/include/asm/smp.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_SMP_H#define _ASM_X86_SMP_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/cpumask.h> #include <linux/thread_info.h>
@@ -171,7 +171,7 @@ extern void nmi_selftest(void);extern unsigned int smpboot_control;extern unsigned long apic_mmio_base; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* Control bits for startup_64 */ #define STARTUP_READ_APICID 0x80000000
arch/x86/include/asm/tdx.h +2 -2
@@ -30,7 +30,7 @@#define TDX_SUCCESS 0ULL#define TDX_RND_NO_ENTROPY 0x8000020300000000ULL -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <uapi/asm/mce.h>
@@ -126,5 +126,5 @@ static inline int tdx_enable(void) { return -ENODEV; }static inline const char *tdx_dump_mce_info (struct mce *m) {return NULL ; }#endif /* CONFIG_INTEL_TDX_HOST */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_TDX_H */
arch/x86/include/asm/thread_info.h +6 -6
@@ -54,7 +54,7 @@* - this struct should fit entirely inside of one cache line * - this struct shares the supervisor stack pages */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct task_struct ;#include <asm/cpufeature.h> #include <linux/atomic.h>
@@ -73,7 +73,7 @@ struct thread_info { .flags = 0, \ } -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ #include <asm/asm-offsets.h>
@@ -161,7 +161,7 @@ struct thread_info {* * preempt_count needs to be 1 initially, until the scheduler is functional. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Walks up the stack frames to make sure that the specified object is
@@ -213,7 +213,7 @@ static inline int arch_within_stack_frames(const void * const stack, #endif } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * Thread-synchronous status.
@@ -224,7 +224,7 @@ static inline int arch_within_stack_frames(const void * const stack,*/ #define TS_COMPAT 0x0002/* 32bit syscall active (64BIT)*/ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_COMPAT #define TS_I386_REGS_POKED 0x0004/* regs poked by 32-bit ptracer */
@@ -242,6 +242,6 @@ static inline int arch_within_stack_frames(const void * const stack,extern void arch_setup_new_exec (void );#define arch_setup_new_exec arch_setup_new_exec -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_THREAD_INFO_H */
arch/x86/include/asm/unwind_hints.h +2 -2
@@ -5,7 +5,7 @@#include "orc_types.h" -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro UNWIND_HINT_END_OF_STACKUNWIND_HINT type=UNWIND_HINT_TYPE_END_OF_STACK
@@ -88,6 +88,6 @@#define UNWIND_HINT_RESTORE \ UNWIND_HINT(UNWIND_HINT_TYPE_RESTORE, 0, 0, 0) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_UNWIND_HINTS_H */
arch/x86/include/asm/vdso/getrandom.h +2 -2
@@ -5,7 +5,7 @@#ifndef __ASM_VDSO_GETRANDOM_H#define __ASM_VDSO_GETRANDOM_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/unistd.h>
@@ -37,6 +37,6 @@ static __always_inline const struct vdso_rng_data *__arch_get_vdso_rng_data(voidreturn &vdso_rng_data; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_GETRANDOM_H */
arch/x86/include/asm/vdso/gettimeofday.h +2 -2
@@ -10,7 +10,7 @@#ifndef __ASM_VDSO_GETTIMEOFDAY_H#define __ASM_VDSO_GETTIMEOFDAY_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <uapi/linux/time.h> #include <asm/vgtod.h>
@@ -350,6 +350,6 @@ static __always_inline u64 vdso_calc_ns(const struct vdso_data *vd, u64 cycles, }#define vdso_calc_ns vdso_calc_ns -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/x86/include/asm/vdso/processor.h +2 -2
@@ -5,7 +5,7 @@#ifndef __ASM_VDSO_PROCESSOR_H#define __ASM_VDSO_PROCESSOR_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ static __always_inline void rep_nop(void)
@@ -22,6 +22,6 @@ struct getcpu_cache;notrace long __vdso_getcpu (unsigned *cpu,unsigned *node,struct getcpu_cache *unused); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_VDSO_PROCESSOR_H */
arch/x86/include/asm/vdso/vsyscall.h +2 -2
@@ -9,7 +9,7 @@#define VDSO_PAGE_PVCLOCK_OFFSET 0#define VDSO_PAGE_HVCLOCK_OFFSET 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <vdso/datapage.h> #include <asm/vgtod.h>
@@ -36,6 +36,6 @@ struct vdso_rng_data *__x86_get_k_vdso_rng_data(void)/* The asm-generic header needs to be included after the definitions above */ #include <asm-generic/vdso/vsyscall.h> -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_VSYSCALL_H */
arch/x86/include/asm/xen/interface.h +5 -5
@@ -72,7 +72,7 @@#endif #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Explicitly size integers that represent pfns in the public interface * with Xen so that on ARM we can have one ABI that works for 32 and 64 * bit guests. */
@@ -137,7 +137,7 @@ DEFINE_GUEST_HANDLE(xen_ulong_t);#define TI_SET_DPL (_ti, _dpl) ((_ti)->flags |= (_dpl))#define TI_SET_IF (_ti, _if) ((_ti)->flags |= ((!!(_if))<<2)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct trap_info { uint8_t vector; /* exception vector */ uint8_t flags; /* 0-3: privilege level; 4: clear event enable? */
@@ -186,7 +186,7 @@ struct arch_shared_info {uint32_t wc_sec_hi; #endif }; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_X86_32 #include <asm/xen/interface_32.h>
@@ -196,7 +196,7 @@ struct arch_shared_info {#include <asm/pvclock-abi.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * The following is all CPU context. Note that the fpu_ctxt block is filled * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
@@ -376,7 +376,7 @@ struct xen_pmu_arch { } c; }; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * Prefix forces emulation of some non-trapping instructions.
arch/x86/include/asm/xen/interface_32.h +2 -2
@@ -44,7 +44,7 @@*/ #define __HYPERVISOR_VIRT_START 0xF5800000 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct cpu_user_regs { uint32_t ebx;
@@ -85,7 +85,7 @@ typedef struct xen_callback xen_callback_t;#define XEN_CALLBACK (__cs, __eip) \ ((struct xen_callback){ .cs = (__cs), .eip = (unsigned long)(__eip) }) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /*
arch/x86/include/asm/xen/interface_64.h +2 -2
@@ -77,7 +77,7 @@#define VGCF_in_syscall (1<<_VGCF_in_syscall)#define VGCF_IN_SYSCALL VGCF_in_syscall -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct iret_context {/* Top of stack (%rsp at point of hypercall). */
@@ -143,7 +143,7 @@ typedef unsigned long xen_callback_t;#define XEN_CALLBACK (__cs, __rip) \ ((unsigned long)(__rip)) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_X86_XEN_INTERFACE_64_H */
arch/x86/math-emu/control_w.h +1 -1
@@ -11,7 +11,7 @@#ifndef _CONTROLW_H_#define _CONTROLW_H_ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _Const_ (x) $##x#else #define _Const_ (x) x
arch/x86/math-emu/exception.h +3 -3
@@ -10,7 +10,7 @@#ifndef _EXCEPTION_H_#define _EXCEPTION_H_ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define Const_ (x) $##x#else #define Const_ (x) x
@@ -37,7 +37,7 @@#define PRECISION_LOST_UP Const_((EX_Precision | SW_C1))#define PRECISION_LOST_DOWN Const_(EX_Precision) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef DEBUG #define EXCEPTION (x) { printk("exception in %s at line %d\n", \
@@ -46,6 +46,6 @@#define EXCEPTION (x) FPU_exception(x)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _EXCEPTION_H_ */
arch/x86/math-emu/fpu_emu.h +3 -3
@@ -20,7 +20,7 @@*/ #define PECULIAR_486 -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#include "fpu_asm.h" #define Const (x) $##x#else
@@ -68,7 +68,7 @@#define FPU_Exception Const(0x80000000)/* Added to tag returns. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include "fpu_system.h"
@@ -213,6 +213,6 @@ asmlinkage int FPU_round(FPU_REG *arg, unsigned int extent, int dummy,#include "fpu_proto.h" #endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _FPU_EMU_H_ */
arch/x86/math-emu/status_w.h +3 -3
@@ -13,7 +13,7 @@#include "fpu_emu.h" /* for definition of PECULIAR_486 */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define Const__ (x) $##x#else #define Const__ (x) x
@@ -37,7 +37,7 @@#define SW_Exc_Mask Const__(0x27f)/* Status word exception bit mask */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define COMP_A_gt_B 1#define COMP_A_eq_B 2
@@ -63,6 +63,6 @@ static inline void setcc(int cc)# define clear_C1 ()#endif /* PECULIAR_486 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _STATUS_H_ */
arch/x86/realmode/rm/realmode.h +2 -2
@@ -2,7 +2,7 @@#ifndef ARCH_X86_REALMODE_RM_REALMODE_H #define ARCH_X86_REALMODE_RM_REALMODE_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__/* * 16-bit ljmpw to the real_mode_seg
@@ -12,7 +12,7 @@*/ #define LJMPW_RM (to) .byte 0xea ; .word (to), real_mode_seg -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * Signature at the end of the realmode region
arch/x86/realmode/rm/wakeup.h +1 -1
@@ -7,7 +7,7 @@#ifndef ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H #define ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> /* This must match data at wakeup.S */
tools/arch/x86/include/asm/asm.h +4 -4
@@ -2,7 +2,7 @@#ifndef _ASM_X86_ASM_H#define _ASM_X86_ASM_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define __ASM_FORM (x, ...) x,## __VA_ARGS__# define __ASM_FORM_RAW (x, ...) x,## __VA_ARGS__# define __ASM_FORM_COMMA (x, ...) x,## __VA_ARGS__,
@@ -123,7 +123,7 @@#ifdef __KERNEL__/* Exception table entry */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define _ASM_EXTABLE_HANDLE (from, to, handler) \ .pushsection "__ex_table","a" ; \ .balign 4 ; \
@@ -154,7 +154,7 @@# define _ASM_NOKPROBE (entry)# endif -#else /* ! __ASSEMBLY__ */ +#else /* ! __ASSEMBLER__ */ # define _EXPAND_EXTABLE_HANDLE (x) #x# define _ASM_EXTABLE_HANDLE (from, to, handler) \ " .pushsection \"__ex_table\",\"a\"\n" \
@@ -186,7 +186,7 @@*/ registerunsigned long current_stack_pointer asm (_ASM_SP );#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __KERNEL__ */
tools/arch/x86/include/asm/nops.h +1 -1
@@ -82,7 +82,7 @@#define ASM_NOP7 _ASM_BYTES(BYTES_NOP7)#define ASM_NOP8 _ASM_BYTES(BYTES_NOP8) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern const unsigned char *const x86_nops[];#endif
tools/arch/x86/include/asm/orc_types.h +2 -2
@@ -45,7 +45,7 @@#define ORC_TYPE_REGS 3#define ORC_TYPE_REGS_PARTIAL 4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/byteorder.h> /*
@@ -73,6 +73,6 @@ struct orc_entry {#endif } __packed; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ORC_TYPES_H */
tools/arch/x86/include/asm/pvclock-abi.h +2 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PVCLOCK_ABI_H#define _ASM_X86_PVCLOCK_ABI_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * These structs MUST NOT be changed.
@@ -44,5 +44,5 @@ struct pvclock_wall_clock {#define PVCLOCK_GUEST_STOPPED (1 << 1)/* PVCLOCK_COUNTS_FROM_ZERO broke ABI and can't be used anymore. */ #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_PVCLOCK_ABI_H */
PATCH 38/41 xtensa: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
In reply to Thomas Huth__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.
This is a completely mechanical patch (done with a simple "sed -i" statement).
--- arch/xtensa/include/uapi/asm/ptrace.h | 2 +- arch/xtensa/include/uapi/asm/signal.h | 6 +++--- arch/xtensa/include/uapi/asm/types.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
arch/xtensa/include/uapi/asm/ptrace.h +1 -1
@@ -42,7 +42,7 @@#define PTRACE_GETFDPIC_EXEC 0#define PTRACE_GETFDPIC_INTERP 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct user_pt_regs { __u32 pc;
arch/xtensa/include/uapi/asm/signal.h +3 -3
@@ -19,7 +19,7 @@#define _NSIG_BPW 32#define _NSIG_WORDS (_NSIG / _NSIG_BPW) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -77,7 +77,7 @@ typedef struct {#define MINSIGSTKSZ 2048#define SIGSTKSZ 8192 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm-generic/signal-defs.h>
@@ -106,5 +106,5 @@ typedef struct sigaltstack {__kernel_size_t ss_size; } stack_t; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI_XTENSA_SIGNAL_H */
arch/xtensa/include/uapi/asm/types.h +2 -2
@@ -14,7 +14,7 @@#include <asm-generic/int-ll64.h> -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# define __XTENSA_UL (x) (x)# define __XTENSA_UL_CONST (x) x#else
@@ -23,7 +23,7 @@# define __XTENSA_UL_CONST (x) ___XTENSA_UL_CONST(x)#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#endif
Signature · 1 line
2.48.1
PATCH 39/41 xtensa: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
In reply to Thomas HuthWhile 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 is a completely mechanical patch (done with a simple "sed -i" statement).
--- arch/xtensa/include/asm/bootparam.h | 2 +- arch/xtensa/include/asm/cmpxchg.h | 4 ++-- arch/xtensa/include/asm/coprocessor.h | 8 ++++---- arch/xtensa/include/asm/current.h | 2 +- arch/xtensa/include/asm/ftrace.h | 8 ++++---- arch/xtensa/include/asm/initialize_mmu.h | 4 ++-- arch/xtensa/include/asm/jump_label.h | 4 ++-- arch/xtensa/include/asm/kasan.h | 2 +- arch/xtensa/include/asm/kmem_layout.h | 2 +- arch/xtensa/include/asm/page.h | 4 ++-- arch/xtensa/include/asm/pgtable.h | 8 ++++---- arch/xtensa/include/asm/processor.h | 4 ++-- arch/xtensa/include/asm/ptrace.h | 6 +++--- arch/xtensa/include/asm/signal.h | 4 ++-- arch/xtensa/include/asm/thread_info.h | 8 ++++---- arch/xtensa/include/asm/tlbflush.h | 4 ++-- 16 files changed, 37 insertions(+), 37 deletions(-)
arch/xtensa/include/asm/bootparam.h +1 -1
@@ -27,7 +27,7 @@#define BP_TAG_FIRST 0x7B0B/* first tag with a version number */ #define BP_TAG_LAST 0x7E0B/* last tag */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* All records are aligned to 4 bytes */
arch/xtensa/include/asm/cmpxchg.h +2 -2
@@ -11,7 +11,7 @@#ifndef _XTENSA_CMPXCHG_H#define _XTENSA_CMPXCHG_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/bits.h> #include <linux/stringify.h>
@@ -220,6 +220,6 @@ __arch_xchg(unsigned long x, volatile void * ptr, int size) } } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _XTENSA_CMPXCHG_H */
arch/xtensa/include/asm/coprocessor.h +4 -4
@@ -16,7 +16,7 @@#include <asm/core.h> #include <asm/types.h> -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__# include <variant/tie-asm.h> .macro xchal_sa_start a b
@@ -69,7 +69,7 @@ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * XTENSA_HAVE_COPROCESSOR(x) returns 1 if coprocessor x is configured.
@@ -87,7 +87,7 @@#define XTENSA_HAVE_IO_PORTS \ XCHAL_CP_PORT_MASK -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Additional registers.
@@ -151,5 +151,5 @@ void local_coprocessors_flush_release_all(void);#endif /* XTENSA_HAVE_COPROCESSORS */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _XTENSA_COPROCESSOR_H */
arch/xtensa/include/asm/current.h +1 -1
@@ -13,7 +13,7 @@#include <asm/thread_info.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/thread_info.h>
arch/xtensa/include/asm/ftrace.h +4 -4
@@ -12,20 +12,20 @@#include <asm/processor.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned long return_address (unsigned level);#define ftrace_return_address (n) return_address(n) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #ifdef CONFIG_FUNCTION_TRACER #define MCOUNT_ADDR ((unsigned long)(_mcount))#define MCOUNT_INSN_SIZE 3 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void _mcount (void );#define mcount _mcount -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONFIG_FUNCTION_TRACER */ #endif /* _XTENSA_FTRACE_H */
arch/xtensa/include/asm/initialize_mmu.h +2 -2
@@ -34,7 +34,7 @@#define CA_WRITEBACK (0x4)#endif -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define XTENSA_HWVERSION_RC_2009_0 230000
@@ -240,6 +240,6 @@ .endm -#endif /*__ASSEMBLY__*/ +#endif /*__ASSEMBLER__*/ #endif /* _XTENSA_INITIALIZE_MMU_H */
arch/xtensa/include/asm/jump_label.h +2 -2
@@ -4,7 +4,7 @@#ifndef _ASM_XTENSA_JUMP_LABEL_H#define _ASM_XTENSA_JUMP_LABEL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -61,5 +61,5 @@ struct jump_entry {jump_label_t key; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/xtensa/include/asm/kasan.h +1 -1
@@ -2,7 +2,7 @@#ifndef __ASM_KASAN_H#define __ASM_KASAN_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_KASAN
arch/xtensa/include/asm/kmem_layout.h +1 -1
@@ -80,7 +80,7 @@#if (!XCHAL_HAVE_PTP_MMU ||XCHAL_HAVE_SPANNING_WAY ) && defined(CONFIG_USE_OF )#define XCHAL_KIO_PADDR xtensa_get_kio_paddr() -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned long xtensa_kio_paddr;static inline unsigned long xtensa_get_kio_paddr (void )
arch/xtensa/include/asm/page.h +2 -2
@@ -80,7 +80,7 @@#endif -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define __pgprot (x) (x)
@@ -172,7 +172,7 @@ static inline unsigned long ___pa(unsigned long va)#define page_to_virt (page) __va(page_to_pfn(page) << PAGE_SHIFT)#define virt_addr_valid (kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #include <asm-generic/memory_model.h> #endif /* _XTENSA_PAGE_H */
arch/xtensa/include/asm/pgtable.h +4 -4
@@ -203,7 +203,7 @@* What follows is the closest we can get by reasonable means.. * See linux/mm/mmap.c for protection_map[] array that uses these definitions. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define pte_ERROR (e) \ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
@@ -372,10 +372,10 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) return pte; } -#endif /* !defined (__ASSEMBLY__) */ +#endif /* !defined (__ASSEMBLER__) */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__/* Assembly macro _PGD_INDEX is the same as C pgd_index(unsigned long), * _PGD_OFFSET as C pgd_offset(struct mm_struct*, unsigned long),
@@ -414,7 +414,7 @@ void update_mmu_tlb_range(struct vm_area_struct *vma, unsigned long address, pte_t *ptep, unsigned int nr);#define update_mmu_tlb_range update_mmu_tlb_range -#endif /* !defined (__ASSEMBLY__) */ +#endif /* !defined (__ASSEMBLER__) */ #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
arch/xtensa/include/asm/processor.h +2 -2
@@ -105,7 +105,7 @@#error Unsupported xtensa ABI#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#if defined(__XTENSA_WINDOWED_ABI__)
@@ -263,5 +263,5 @@ static inline unsigned long get_er(unsigned long addr)#endif /* XCHAL_HAVE_EXTERN_REGS */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _XTENSA_PROCESSOR_H */
arch/xtensa/include/asm/ptrace.h +3 -3
@@ -41,7 +41,7 @@#define NO_SYSCALL (-1) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/coprocessor.h> #include <asm/core.h>
@@ -109,11 +109,11 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)int do_syscall_trace_enter (struct pt_regs *regs);void do_syscall_trace_leave (struct pt_regs *regs); -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ # include <asm/asm-offsets.h> #define PT_REGS_OFFSET (KERNEL_STACK_SIZE - PT_USER_SIZE) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _XTENSA_PTRACE_H */
arch/xtensa/include/asm/signal.h +2 -2
@@ -14,10 +14,10 @@#include <uapi/asm/signal.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __ARCH_HAS_SA_RESTORER#include <asm/sigcontext.h> -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _XTENSA_SIGNAL_H */
arch/xtensa/include/asm/thread_info.h +4 -4
@@ -16,7 +16,7 @@#define CURRENT_SHIFT KERNEL_STACK_SHIFT -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__# include <asm/processor.h> #endif
@@ -28,7 +28,7 @@* must also be changed */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#if XTENSA_HAVE_COPROCESSORS
@@ -80,7 +80,7 @@ struct thread_info {* macros/functions for gaining access to the thread information structure */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define INIT_THREAD_INFO (tsk) \ { \
@@ -99,7 +99,7 @@ static __always_inline struct thread_info *current_thread_info(void) return ti; } -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ /* how to get the thread information struct from ASM */ #define GET_THREAD_INFO (reg,sp) \
arch/xtensa/include/asm/tlbflush.h +2 -2
@@ -20,7 +20,7 @@#define ITLB_HIT_BIT 3#define DTLB_HIT_BIT 4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* TLB flushing: *
@@ -201,5 +201,5 @@ static inline unsigned long read_itlb_translation (int way)return tmp; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _XTENSA_TLBFLUSH_H */
Signature · 1 line
2.48.1
PATCH 40/41 scripts/dtc: Update fdt.h to the latest version
In reply to Thomas HuthUpdate the header to this upstream version to change the __ASSEMBLY__ macro into __ASSEMBLER__ :
https://web.git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=f4c53f4ebf78
--- scripts/dtc/libfdt/fdt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/dtc/libfdt/fdt.h +2 -2
@@ -7,7 +7,7 @@* Copyright 2012 Kim Phillips, Freescale Semiconductor. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct fdt_header { fdt32_t magic; /* magic word FDT_MAGIC */
@@ -45,7 +45,7 @@ struct fdt_property { char data[]; }; -#endif /* !__ASSEMBLY */ +#endif /* !__ASSEMBLER__ */ #define FDT_MAGIC 0xd00dfeed/* 4: version, 4: total size */ #define FDT_TAGSIZE sizeof(fdt32_t)
Signature · 1 line
2.48.1
Rob Herring
maintainerRe: [PATCH 40/41] scripts/dtc: Update fdt.h to the latest version
Quoted 5 lines · Thomas Huth
Update the header to this upstream version to change the
__ASSEMBLY__macro into__ASSEMBLER__:https://web.git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=f4c53f4ebf78
Quoted 7 lines
Cc Rob Herring <[email protected]>Cc Saravana Kannan <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- scripts/dtc/libfdt/fdt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Are you wanting me to apply this or ack it? Normally we only change dtc with the sync with upstream script.
Or maybe it doesn't matter? Do we use this header in any assembly in the kernel? Offhand, I don't think so.
Rob
Re: [PATCH 40/41] scripts/dtc: Update fdt.h to the latest version
Quoted 14 lines · Rob Herring
Quoted 5 lines · Thomas Huth
Update the header to this upstream version to change the
__ASSEMBLY__macro into__ASSEMBLER__:https://web.git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=f4c53f4ebf78
Quoted 7 lines
Cc Rob Herring <[email protected]>Cc Saravana Kannan <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- scripts/dtc/libfdt/fdt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 2 lines
Are you wanting me to apply this or ack it? Normally we only change dtc with the sync with upstream script.
As long as this series is still under discussion, I think an ack is sufficient.
Thanks,
Thomas
PATCH 41/41 treewide: Stop defining __ASSEMBLY__ for assembler files
In reply to Thomas HuthAll spots have been changed to __ASSEMBLER__ (i.e. the macro that gets defined by the compiler), so we don't have to manually define __ASSEMBLY__ now anymore.
--- Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 1 - arch/loongarch/vdso/Makefile | 2 +- arch/mips/boot/compressed/Makefile | 2 +- arch/mips/vdso/Makefile | 2 +- arch/powerpc/boot/Makefile | 2 +- arch/powerpc/platforms/cell/spufs/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/x86/boot/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- arch/x86/realmode/rm/Makefile | 2 +- arch/xtensa/kernel/Makefile | 2 +- drivers/net/wan/Makefile | 2 +- scripts/Makefile.build | 2 +- scripts/gfp-translate | 2 +- tools/testing/selftests/kvm/lib/riscv/handlers.S | 4 ---- tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 -- 17 files changed, 14 insertions(+), 21 deletions(-)
Makefile +1 -1
@@ -573,7 +573,7 @@ LINUXINCLUDE := \ -I$(objtree)/include \ $(USERINCLUDE) -KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE +KBUILD_AFLAGS := -fno-PIE KBUILD_CFLAGS := KBUILD_CFLAGS += -std=gnu11
arch/arm64/kernel/vdso32/Makefile +0 -1
@@ -93,7 +93,6 @@ VDSO_CFLAGS += -marm endif VDSO_AFLAGS := $(VDSO_CAFLAGS) -VDSO_AFLAGS += -D__ASSEMBLY__ # From arm vDSO Makefile VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
arch/loongarch/vdso/Makefile +1 -1
@@ -24,7 +24,7 @@ cflags-vdso := $(ccflags-vdso) \ $(call cc-option, -fno-asynchronous-unwind-tables) \ $(call cc-option, -fno-stack-protector) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
arch/mips/boot/compressed/Makefile +1 -1
@@ -30,7 +30,7 @@ endif KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull" -KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ +KBUILD_AFLAGS := $(KBUILD_AFLAGS) \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)
arch/mips/vdso/Makefile +1 -1
@@ -32,7 +32,7 @@ cflags-vdso := $(ccflags-vdso) \ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ $(call cc-option, -fno-asynchronous-unwind-tables) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o = -include $(c-gettimeofday-y)
arch/powerpc/boot/Makefile +1 -1
@@ -79,7 +79,7 @@ BOOTCFLAGS := $(BOOTTARGETFLAGS) \ $(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \ -fomit-frame-pointer -fno-builtin -fPIC -BOOTAFLAGS := $(BOOTTARGETFLAGS) -D__ASSEMBLY__ +BOOTAFLAGS := $(BOOTTARGETFLAGS) BOOTARFLAGS := -crD
arch/powerpc/platforms/cell/spufs/Makefile +1 -1
@@ -16,7 +16,7 @@ SPU_AS := $(SPU_CROSS)gcc SPU_LD := $(SPU_CROSS)ld SPU_OBJCOPY := $(SPU_CROSS)objcopy SPU_CFLAGS := -O2 -Wall -I$(srctree)/include -D__KERNEL__ -SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include -D__KERNEL__ +SPU_AFLAGS := -c -I$(srctree)/include -D__KERNEL__ SPU_LDFLAGS := -N -Ttext=0x0 $(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h
arch/s390/Makefile +1 -1
@@ -18,7 +18,7 @@ KBUILD_CFLAGS += -fPIC LDFLAGS_vmlinux := -no-pie --emit-relocs --discard-none extra_tools := relocs aflags_dwarf := -Wa,-gdwarf-2 -KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ +KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 ifndef CONFIG_AS_IS_LLVM KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) endif
arch/x86/boot/Makefile +1 -1
@@ -53,7 +53,7 @@ targets += cpustr.h # --------------------------------------------------------------------------- KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH)
arch/x86/boot/compressed/Makefile +1 -1
@@ -50,7 +50,7 @@ KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h # that the compiler finds it even with out-of-tree builds (make O=/some/path). CFLAGS_sev.o += -I$(objtree)/arch/x86/lib/ -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) KBUILD_LDFLAGS += $(call ld-option,--no-ld-generated-unwind-info)
arch/x86/realmode/rm/Makefile +1 -1
@@ -65,5 +65,5 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \ -I$(srctree)/arch/x86/boot -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
arch/xtensa/kernel/Makefile +1 -1
@@ -39,7 +39,7 @@ sed-y = -e ':a; s/\*(\([^)]*\)\.text\.unlikely/*(\1.literal.unlikely .{text}.unl -e 's/\.{text}/.text/g' quiet_cmd__cpp_lds_S = LDS $@ -cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ \ +cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa \ -DLINKER_SCRIPT $< | sed $(sed-y) >$@ $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE
drivers/net/wan/Makefile +1 -1
@@ -57,7 +57,7 @@ $(obj)/wanxlfw.bin: $(obj)/wanxlfw.o FORCE $(call if_changed,m68kld_bin_o) quiet_cmd_m68kas_o_S = M68KAS $@ - cmd_m68kas_o_S = $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< + cmd_m68kas_o_S = $(M68KCC) -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< $(obj)/wanxlfw.o: $(src)/wanxlfw.S FORCE $(call if_changed_dep,m68kas_o_S)
scripts/Makefile.build +1 -1
@@ -346,7 +346,7 @@ targets += $(lib-y) $(always-y) # --------------------------------------------------------------------------- quiet_cmd_cpp_lds_S = LDS $@ cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -U$(ARCH) \ - -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $< + -DLINKER_SCRIPT -o $@ $< $(obj)/%.lds: $(src)/%.lds.S FORCE $(call if_changed_dep,cpp_lds_S)
scripts/gfp-translate +1 -1
@@ -73,7 +73,7 @@ echo Parsing: $GFPMASK #include <stdio.h> // Try to fool compiler.h into not including extra stuff -#define __ASSEMBLY__ 1 +#define __ASSEMBLER__ 1 #include <generated/autoconf.h> #include <linux/gfp_types.h>
tools/testing/selftests/kvm/lib/riscv/handlers.S +0 -4
@@ -3,10 +3,6 @@ * Copyright (c) 2023 Intel Corporation */ -#ifndef __ASSEMBLY__ -#define __ASSEMBLY__ -#endif - #include <asm/csr.h> .macro save_context
tools/testing/selftests/vDSO/vgetrandom-chacha.S +0 -2
@@ -3,8 +3,6 @@ * Copyright (C) 2024 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */ -#define __ASSEMBLY__ - #if defined(__aarch64__) #include "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" #elif defined(__loongarch__)
Signature · 1 line
2.48.1