mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers

While the GCC and Clang compilers already define __ASSEMBLER__
automatically when compiling assembler code, __ASSEMBLY__ is a macro
that only gets defined by the Makefiles in the kernel. Defining
such a macro was necessary in the early days of the kernel, since GCC
only started providing __ASSEMBLER__ since version 3.0 in 2000 (see
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=f8f769ea4e69 ).
However, having two macros can be very confusing nowadays for the
developers when switching between userspace and kernelspace coding,
or when dealing with uapi headers that should use __ASSEMBLER__
instead. So let's now standardize on the __ASSEMBLER__ macro that is
provided by the compilers.

This is almost a completely mechanical patch (done with a simple
"sed -i" statement), with just one comment tweaked manually in
arch/mips/include/asm/cpu.h (that was missing some underscores).

Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
Thomas Huth 2025-08-04 08:56:29 +02:00 committed by Thomas Bogendoerfer
parent 21050b589f
commit 157f9533f9
53 changed files with 142 additions and 142 deletions

View File

@ -15,7 +15,7 @@
/*
* Configure language
*/
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#define _ATYPE_
#define _ATYPE32_
#define _ATYPE64_
@ -34,7 +34,7 @@
/*
* 32-bit MIPS address spaces
*/
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#define _ACAST32_
#define _ACAST64_
#else

View File

@ -10,7 +10,7 @@
#ifndef __ASM_ASM_EVA_H
#define __ASM_ASM_EVA_H
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/* Kernel variants */
@ -99,7 +99,7 @@
#endif /* CONFIG_EVA */
#else /* __ASSEMBLY__ */
#else /* __ASSEMBLER__ */
#define kernel_cache(op, base) cache op, base
#define kernel_pref(hint, base) pref hint, base
@ -185,6 +185,6 @@
#endif /* CONFIG_EVA */
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* __ASM_ASM_EVA_H */

View File

@ -37,7 +37,7 @@
#define CFI_SECTIONS
#endif
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
/*
* LEAF - declare leaf routine
*/
@ -123,7 +123,7 @@ symbol = value
#define ASM_PRINT(string)
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
/*
* Stack alignment
@ -228,7 +228,7 @@ symbol = value
#define LONG_INS ins
#define LONG_EXT ext
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#define LONG .word
#endif
#define LONGSIZE 4
@ -257,7 +257,7 @@ symbol = value
#define LONG_INS dins
#define LONG_EXT dext
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#define LONG .dword
#endif
#define LONGSIZE 8

View File

@ -42,7 +42,7 @@
#define ZSCM_REG_BASE 0x97000000
#if !defined(__ASSEMBLY__)
#if !defined(__ASSEMBLER__)
#include <linux/cpumask.h>
#include <asm/r4kcache.h>
@ -124,6 +124,6 @@ static inline void bmips_write_zscm_reg(unsigned int offset, unsigned long data)
barrier();
}
#endif /* !defined(__ASSEMBLY__) */
#endif /* !defined(__ASSEMBLER__) */
#endif /* _ASM_BMIPS_H */

View File

@ -288,7 +288,7 @@
#define FPIR_IMP_NONE 0x0000
#if !defined(__ASSEMBLY__)
#if !defined(__ASSEMBLER__)
enum cpu_type_enum {
CPU_UNKNOWN,
@ -329,7 +329,7 @@ enum cpu_type_enum {
CPU_LAST
};
#endif /* !__ASSEMBLY */
#endif /* !__ASSEMBLER__ */
/*
* ISA Level encodings

View File

@ -37,7 +37,7 @@
#define KN0X_ESR_SYNLO (0x7f<<0) /* syndrome from ECC logic */
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <linux/interrupt.h>

View File

@ -95,7 +95,7 @@
#define DEC_CPU_IRQ_ALL (0xff << CAUSEB_IP)
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/*
* Interrupt table structures to hide differences between systems.
@ -121,6 +121,6 @@ extern void cpu_all_int(void);
extern void dec_intr_unimplemented(void);
extern void asic_intr_unimplemented(void);
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif

View File

@ -71,7 +71,7 @@
#define KN01_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <linux/interrupt.h>
#include <linux/spinlock.h>

View File

@ -80,7 +80,7 @@
#define KN02_IRQ_ALL 0xff
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <linux/types.h>

View File

@ -70,7 +70,7 @@
#define KN02XA_EAR_RES_0 (0x3<<0) /* unused */
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <linux/interrupt.h>

View File

@ -13,7 +13,7 @@
#include <kernel-entry-init.h>
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#ifdef CONFIG_EVA
@ -38,6 +38,6 @@ platform_eva_init
#endif /* CONFIG_EVA */
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif

View File

@ -15,7 +15,7 @@
#define MCOUNT_ADDR ((unsigned long)(_mcount))
#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
extern void _mcount(void);
#define mcount _mcount
@ -89,11 +89,11 @@ struct dyn_arch_ftrace {
void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
unsigned long fp);
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* CONFIG_FUNCTION_TRACER */
#ifdef CONFIG_FTRACE_SYSCALLS
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/*
* Some syscall entry functions on mips start with "__sys_" (fork and clone,
* for instance). We should also match the sys_ variant with those.
@ -105,6 +105,6 @@ static inline bool arch_syscall_match_sym_name(const char *sym,
return !strcmp(sym, name) ||
(!strncmp(sym, "__sys_", 6) && !strcmp(sym + 6, name + 4));
}
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* CONFIG_FTRACE_SYSCALLS */
#endif /* _ASM_MIPS_FTRACE_H */

View File

@ -301,7 +301,7 @@ do { \
#endif
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#define _ssnop ___ssnop
#define _ehb ___ehb
@ -417,6 +417,6 @@ do { \
*/
extern void mips_ihb(void);
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* _ASM_HAZARDS_H */

View File

@ -11,7 +11,7 @@
#ifndef _ASM_IRQFLAGS_H
#define _ASM_IRQFLAGS_H
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <linux/compiler.h>
#include <linux/stringify.h>
@ -142,7 +142,7 @@ static inline int arch_irqs_disabled(void)
return arch_irqs_disabled_flags(arch_local_save_flags());
}
#endif /* #ifndef __ASSEMBLY__ */
#endif /* #ifndef __ASSEMBLER__ */
/*
* Do the CPU's IRQ-state tracing from assembly code.

View File

@ -70,7 +70,7 @@
#define LED_E 0x9e
#define LED_F 0x8e
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
static __inline__ void pica_set_led(unsigned int bits)
{
@ -79,7 +79,7 @@ static __inline__ void pica_set_led(unsigned int bits)
*led_register = bits;
}
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* Base address of the Sonic Ethernet adapter in Jazz machines.
@ -100,7 +100,7 @@ static __inline__ void pica_set_led(unsigned int bits)
#define JAZZ_KEYBOARD_DATA 0xe0005000
#define JAZZ_KEYBOARD_COMMAND 0xe0005001
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef struct {
unsigned char data;
@ -121,7 +121,7 @@ typedef struct {
*/
#define keyboard_hardware jazz_keyboard_hardware
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* i8042 keyboard controller for most other Mips machines.
@ -154,7 +154,7 @@ typedef struct {
/*
* DRAM configuration register
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#ifdef __MIPSEL__
typedef struct {
unsigned int bank2 : 3;
@ -174,7 +174,7 @@ typedef struct {
unsigned int bank2 : 3;
} dram_configuration;
#endif
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#define PICA_DRAM_CONFIG 0xe00fffe0
@ -260,7 +260,7 @@ typedef struct {
/*
* Access the R4030 DMA and I/O Controller
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
static inline void r4030_delay(void)
{
@ -299,7 +299,7 @@ static inline void r4030_write_reg32(unsigned long addr, unsigned val)
r4030_delay();
}
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#define JAZZ_FDC_BASE 0xe0003000
#define JAZZ_RTC_BASE 0xe0004000

View File

@ -10,7 +10,7 @@
#define arch_jump_label_transform_static arch_jump_label_transform
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <linux/types.h>
#include <asm/isa-rev.h>
@ -76,5 +76,5 @@ struct jump_entry {
jump_label_t key;
};
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* _ASM_MIPS_JUMP_LABEL_H */

View File

@ -2,7 +2,7 @@
#ifndef __ASM_LINKAGE_H
#define __ASM_LINKAGE_H
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#include <asm/asm.h>
#endif

View File

@ -21,13 +21,13 @@
/*
* This gives the physical RAM offset.
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
# if defined(CONFIG_MIPS_AUTO_PFN_OFFSET)
# define PHYS_OFFSET ((unsigned long)PFN_PHYS(ARCH_PFN_OFFSET))
# elif !defined(PHYS_OFFSET)
# define PHYS_OFFSET _AC(0, UL)
# endif
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#ifdef CONFIG_32BIT
#define CAC_BASE _AC(0x80000000, UL)

View File

@ -21,7 +21,7 @@
#ifndef _ASM_MIPS_BOARDS_BONITO64_H
#define _ASM_MIPS_BOARDS_BONITO64_H
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
/* offsets from base register */
#define BONITO(x) (x)
@ -36,7 +36,7 @@ extern unsigned long _pcictrl_bonito_pcicfg;
#define BONITO(x) *(volatile u32 *)(_pcictrl_bonito + (x))
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#define BONITO_BOOT_BASE 0x1fc00000

View File

@ -10,7 +10,7 @@
#include <asm/mipsregs.h>
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/*
* C macros
@ -176,7 +176,7 @@
/* TCHalt */
#define TCHALT_H (_ULCAST_(1))
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
static inline unsigned core_nvpes(void)
{
@ -469,6 +469,6 @@ do { \
__BUILD_SET_C0(mvpcontrol)
#endif /* Not __ASSEMBLY__ */
#endif /* Not __ASSEMBLER__ */
#endif

View File

@ -32,7 +32,7 @@
/*
* Configure language
*/
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#define _ULCAST_
#define _U64CAST_
#else
@ -1346,7 +1346,7 @@
#define FPU_CSR_RD 0x3 /* towards -Infinity */
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/*
* Macros for handling the ISA mode bit for MIPS16 and microMIPS.
@ -3095,6 +3095,6 @@ static inline unsigned int get_ebase_cpunum(void)
return read_c0_ebase() & MIPS_EBASE_CPUNUM;
}
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* _ASM_MIPSREGS_H */

View File

@ -8,7 +8,7 @@
#include <asm/mipsregs.h>
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <asm/inst.h>
@ -218,7 +218,7 @@ __BUILD_MSA_CTL_REG(request, 5)
__BUILD_MSA_CTL_REG(map, 6)
__BUILD_MSA_CTL_REG(unmap, 7)
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#define MSA_IR 0
#define MSA_CSR 1

View File

@ -43,7 +43,7 @@
* Bridge address map
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#define ATE_V 0x01
#define ATE_CO 0x02
@ -288,7 +288,7 @@ struct bridge_err_cmdword {
};
#define berr_field berr_un.berr_st
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* The values of these macros can and should be crosschecked

View File

@ -8,7 +8,7 @@
#ifndef __ASM_PM_H
#define __ASM_PM_H
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#include <asm/asm-offsets.h>
#include <asm/asm.h>
@ -130,7 +130,7 @@
RESUME_RESTORE_REGS_RETURN
.endm
#else /* __ASSEMBLY__ */
#else /* __ASSEMBLER__ */
/**
* struct mips_static_suspend_state - Core saved CPU state across S2R.
@ -150,6 +150,6 @@ struct mips_static_suspend_state {
unsigned long sp;
};
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* __ASM_PM_HELPERS_H */

View File

@ -42,7 +42,7 @@
#define Pref_WriteBackInvalidate 25
#define Pref_PrepareForStore 30
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
.macro __pref hint addr
#ifdef CONFIG_CPU_HAS_PREFETCH

View File

@ -103,7 +103,7 @@
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#if _MIPS_SIM == _MIPS_SIM_ABI32
/*
@ -192,6 +192,6 @@
#define ra $31 /* return address */
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* _ASM_REGDEF_H */

View File

@ -19,7 +19,7 @@
#include <asm/sibyte/bigsur.h>
#endif
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#ifdef LEDS_PHYS
#define setleds(t0, t1, c0, c1, c2, c3) \
@ -46,6 +46,6 @@ extern void setleds(char *str);
#define setleds(s) do { } while (0)
#endif /* LEDS_PHYS */
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* _SIBYTE_BOARD_H */

View File

@ -19,7 +19,7 @@
#define SB1250_DUART_MINOR_BASE 64
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <asm/addrspace.h>

View File

@ -199,7 +199,7 @@
* Note: you'll need to define uint32_t and uint64_t in your headers.
*/
#if !defined(__ASSEMBLY__)
#if !defined(__ASSEMBLER__)
#define _SB_MAKE64(x) ((uint64_t)(x))
#define _SB_MAKE32(x) ((uint32_t)(x))
#else
@ -238,9 +238,9 @@
*/
#if defined(__mips64) && !defined(__ASSEMBLY__)
#if defined(__mips64) && !defined(__ASSEMBLER__)
#define SBWRITECSR(csr, val) *((volatile uint64_t *) PHYS_TO_K1(csr)) = (val)
#define SBREADCSR(csr) (*((volatile uint64_t *) PHYS_TO_K1(csr)))
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif

View File

@ -9,7 +9,7 @@
#define CPS_ENTRY_PATCH_INSNS 6
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
struct vpe_boot_config {
unsigned long pc;
@ -55,9 +55,9 @@ static inline bool mips_cps_smp_in_use(void) { return false; }
#endif /* !CONFIG_MIPS_CPS */
#else /* __ASSEMBLY__ */
#else /* __ASSEMBLER__ */
.extern mips_cps_bootcfg;
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* __MIPS_ASM_SMP_CPS_H__ */

View File

@ -10,10 +10,10 @@
#define _ASM_SN_ADDRS_H
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <linux/smp.h>
#include <linux/types.h>
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#include <asm/addrspace.h>
#include <asm/sn/kldir.h>
@ -25,15 +25,15 @@
#endif
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#define UINT64_CAST (unsigned long)
#else /* __ASSEMBLY__ */
#else /* __ASSEMBLER__ */
#define UINT64_CAST
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#define NASID_GET_META(_n) ((_n) >> NASID_LOCAL_BITS)
@ -254,7 +254,7 @@
#define LOCAL_HUB_ADDR(_x) (IALIAS_BASE + (_x))
#define REMOTE_HUB_ADDR(_n, _x) ((NODE_SWIN_BASE(_n, 1) + 0x800000 + (_x)))
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#define LOCAL_HUB_PTR(_x) ((u64 *)LOCAL_HUB_ADDR((_x)))
#define REMOTE_HUB_PTR(_n, _x) ((u64 *)REMOTE_HUB_ADDR((_n), (_x)))
@ -265,7 +265,7 @@
#define REMOTE_HUB_S(_n, _r, _d) __raw_writeq((_d), \
REMOTE_HUB_PTR((_n), (_r)))
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* Software structure locations -- permanently fixed
@ -315,7 +315,7 @@
#define KLI_KERN_XP 8
#define KLI_KERN_PARTID 9
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#define KLD_BASE(nasid) ((kldir_ent_t *) KLDIR_ADDR(nasid))
#define KLD_LAUNCH(nasid) (KLD_BASE(nasid) + KLI_LAUNCH)
@ -371,7 +371,7 @@
#define KERN_VARS_ADDR(nasid) KLD_KERN_VARS(nasid)->pointer
#define KERN_VARS_SIZE(nasid) KLD_KERN_VARS(nasid)->size
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* _ASM_SN_ADDRS_H */

View File

@ -39,7 +39,7 @@
#define G_PARTIDOFF 40
#define G_TABLEOFF 128
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef struct gda {
u32 g_magic; /* GDA magic number */
@ -63,7 +63,7 @@ typedef struct gda {
#define GDA ((gda_t*) GDA_ADDR(get_nasid()))
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* Define: PART_GDA_VERSION
* Purpose: Define the minimum version of the GDA required, lower

View File

@ -15,7 +15,7 @@
#define KLDIR_ENT_SIZE 0x40
#define KLDIR_MAX_ENTRIES (0x400 / 0x40)
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef struct kldir_ent_s {
u64 magic; /* Indicates validity of entry */
off_t offset; /* Offset from start of node space */
@ -27,7 +27,7 @@ typedef struct kldir_ent_s {
/* NOTE: These 16 bytes are used in the Partition KLDIR
entry to store partition info. Refer to klpart.h for this. */
} kldir_ent_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#ifdef CONFIG_SGI_IP27
#include <asm/sn/sn0/kldir.h>

View File

@ -12,7 +12,7 @@
#define KV_MAGIC 0x5f4b565f
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <asm/sn/types.h>
@ -24,6 +24,6 @@ typedef struct kern_vars_s {
unsigned long kv_rw_baseaddr;
} kern_vars_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* __ASM_SN_KLKERNVARS_H */

View File

@ -59,7 +59,7 @@
* clears the BUSY flag after control is returned to it.
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef int launch_state_t;
typedef void (*launch_proc_t)(u64 call_parm);
@ -101,6 +101,6 @@ typedef struct launch_s {
#define LAUNCH_FLASH (*(void (*)(void)) \
IP27PROM_FLASHLEDS)
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* _ASM_SN_LAUNCH_H */

View File

@ -48,7 +48,7 @@
*
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef struct nmi_s {
volatile unsigned long magic; /* Magic number */
@ -59,13 +59,13 @@ typedef struct nmi_s {
volatile unsigned long gmaster; /* Flag true only on global master*/
} nmi_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/* Following definitions are needed both in the prom & the kernel
* to identify the format of the nmi cpu register save area in the
* low memory on each node.
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
struct reg_struct {
unsigned long gpr[32];
@ -78,7 +78,7 @@ struct reg_struct {
unsigned long nmi_sr;
};
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/* These are the assembly language offsets into the reg_struct structure */

View File

@ -84,15 +84,15 @@
#define NASID_GET(_pa) (int) ((UINT64_CAST (_pa) >> \
NASID_SHFT) & NASID_BITMASK)
#if !defined(__ASSEMBLY__)
#if !defined(__ASSEMBLER__)
#define NODE_SWIN_BASE(nasid, widget) \
((widget == 0) ? NODE_BWIN_BASE((nasid), SWIN0_BIGWIN) \
: RAW_NODE_SWIN_BASE(nasid, widget))
#else /* __ASSEMBLY__ */
#else /* __ASSEMBLER__ */
#define NODE_SWIN_BASE(nasid, widget) \
(NODE_IO_BASE(nasid) + (UINT64_CAST(widget) << SWIN_SIZE_BITS))
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
/*
* The following definitions pertain to the IO special address
@ -139,11 +139,11 @@
/* Turn on sable logging for the processors whose bits are set. */
#define SABLE_LOG_TRIGGER(_map)
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#define KERN_NMI_ADDR(nasid, slice) \
TO_NODE_UNCAC((nasid), IP27_NMI_KREGS_OFFSET + \
(IP27_NMI_KREGS_CPU_SIZE * (slice)))
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#ifdef PROM
@ -248,7 +248,7 @@
#define KL_UART_DATA LOCAL_HUB_ADDR(MD_UREG0_1) /* UART data reg */
#define KL_I2C_REG MD_UREG0_0 /* I2C reg */
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/* Address 0x400 to 0x1000 ualias points to cache error eframe + misc
* CACHE_ERR_SP_PTR could either contain an address to the stack, or
@ -266,7 +266,7 @@
#define CACHE_ERR_SP (CACHE_ERR_SP_PTR - 16)
#define CACHE_ERR_AREA_SIZE (ARCS_SPB_OFFSET - CACHE_ERR_EFRAME)
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#define _ARCSPROM

View File

@ -37,7 +37,7 @@
#define UATTR_MSPEC 2
#define UATTR_UNCAC 3
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
/*
* Returns the local nasid into res.
*/

View File

@ -169,7 +169,7 @@
/*
* The IO LLP control status register and widget control register
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef union hubii_wid_u {
u64 wid_reg_value;
@ -292,7 +292,7 @@ typedef union io_perf_cnt {
} perf_cnt_bits;
} io_perf_cnt_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#define LNK_STAT_WORKING 0x2
@ -440,7 +440,7 @@ typedef union io_perf_cnt {
/*
* Fields in CRB Register A
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef union icrba_u {
u64 reg_value;
struct {
@ -486,7 +486,7 @@ typedef union h1_icrba_u {
#define ICRBN_A_CERR_SHFT 54
#define ICRBN_A_ERR_MASK 0x3ff
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#define IIO_ICRB_ADDR_SHFT 2 /* Shift to get proper address */
@ -509,7 +509,7 @@ typedef union h1_icrba_u {
/*
* Fields in CRB Register B
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef union icrbb_u {
u64 reg_value;
struct {
@ -608,7 +608,7 @@ typedef union h1_icrbb_u {
#define b_imsg icrbb_field_s.imsg
#define b_initiator icrbb_field_s.initiator
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* values for field xtsize
@ -666,7 +666,7 @@ typedef union h1_icrbb_u {
* Fields in CRB Register C
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef union icrbc_s {
u64 reg_value;
@ -698,13 +698,13 @@ typedef union icrbc_s {
#define c_barrop icrbc_field_s.barrop
#define c_doresp icrbc_field_s.doresp
#define c_gbr icrbc_field_s.gbr
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* Fields in CRB Register D
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef union icrbd_s {
u64 reg_value;
struct {
@ -737,7 +737,7 @@ typedef union hubii_ifdr_u {
} hi_ifdr_fields;
} hubii_ifdr_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* Hardware designed names for the BTE control registers.
@ -784,7 +784,7 @@ typedef union hubii_ifdr_u {
* IO PIO Read Table Entry format
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef union iprte_a {
u64 entry;
@ -806,7 +806,7 @@ typedef union iprte_a {
#define iprte_init iprte_fields.initiator
#define iprte_addr iprte_fields.addr
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#define IPRTE_ADDRSHFT 3
@ -814,7 +814,7 @@ typedef union iprte_a {
* Hub IIO PRB Register format.
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/*
* Note: Fields bnakctr, anakctr, xtalkctrmode, ovflow fields are
* "Status" fields, and should only be used in case of clean up after errors.
@ -846,7 +846,7 @@ typedef union iprb_u {
#define iprb_anakctr iprb_fields_s.anakctr
#define iprb_xtalkctr iprb_fields_s.xtalkctr
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* values for mode field in iprb_t.
@ -861,7 +861,7 @@ typedef union iprb_u {
/*
* IO CRB entry C_A to E_A : Partial (cache) CRBS
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef union icrbp_a {
u64 ip_reg; /* the entire register value */
struct {
@ -895,7 +895,7 @@ typedef union icrbp_a {
} ip_fmt;
} icrbp_a_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* A couple of defines to go with the above structure.
@ -903,7 +903,7 @@ typedef union icrbp_a {
#define ICRBP_A_CERR_SHFT 54
#define ICRBP_A_ERR_MASK 0x3ff
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef union hubii_idsr {
u64 iin_reg;
struct {
@ -917,7 +917,7 @@ typedef union hubii_idsr {
level : 7;
} iin_fmt;
} hubii_idsr_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/*
* IO BTE Length/Status (IIO_IBLS) register bit field definitions

View File

@ -423,7 +423,7 @@
* Operations on page migration threshold register
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/*
* LED register macros
@ -735,7 +735,7 @@ typedef union md_perf_cnt {
} md_perf_cnt_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#define DIR_ERROR_VALID_MASK 0xe000000000000000

View File

@ -11,7 +11,7 @@
#ifndef _ASM_SGI_SN0_HUBNI_H
#define _ASM_SGI_SN0_HUBNI_H
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <linux/types.h>
#endif
@ -226,7 +226,7 @@
#define NLT_EXIT_PORT_MASK (UINT64_CAST 0xf)
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef union hubni_port_error_u {
u64 nipe_reg_value;
@ -258,6 +258,6 @@ static inline int get_region_shift(void)
return NASID_TO_COARSEREG_SHFT;
}
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* _ASM_SGI_SN0_HUBNI_H */

View File

@ -306,7 +306,7 @@
#define ERR_STACK_SIZE_BYTES(_sz) \
((_sz) ? (PI_MIN_STACK_SIZE << ((_sz) - 1)) : 0)
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/*
* format of error stack and error status registers.
*/
@ -359,7 +359,7 @@ typedef union pi_err_stat1 {
typedef u64 rtc_time_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/* Bits in PI_SYSAD_ERRCHK_EN */

View File

@ -11,7 +11,7 @@
#include <linux/types.h>
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef unsigned long cpuid_t;
typedef signed short nasid_t; /* node id in numa-as-id space */

View File

@ -193,7 +193,7 @@
* Preprocessor magic to expand macros used as arguments before we insert them
* into assembly code.
*/
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
# define ___SYNC(type, reason, else) \
____SYNC(type, reason, else)
#else

View File

@ -11,7 +11,7 @@
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <asm/processor.h>
@ -73,7 +73,7 @@ static inline struct thread_info *current_thread_info(void)
register unsigned long current_stack_pointer __asm__("sp");
#endif
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
/* thread information allocation */
#if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_32BIT)

View File

@ -29,7 +29,7 @@
#define NR_syscalls (__NR_O32_Linux + __NR_O32_Linux_syscalls)
#endif
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#define __ARCH_WANT_NEW_STAT
#define __ARCH_WANT_OLD_READDIR
@ -62,6 +62,6 @@
/* whitelists for checksyscalls */
#define __IGNORE_fadvise64_64
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* _ASM_UNISTD_H */

View File

@ -11,7 +11,7 @@
#ifndef __ASM_VDSO_GETTIMEOFDAY_H
#define __ASM_VDSO_GETTIMEOFDAY_H
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <asm/vdso/vdso.h>
#include <asm/clocksource.h>
@ -215,6 +215,6 @@ static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(
}
#define __arch_get_vdso_u_time_data __arch_get_vdso_u_time_data
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* __ASM_VDSO_GETTIMEOFDAY_H */

View File

@ -5,7 +5,7 @@
#ifndef __ASM_VDSO_PROCESSOR_H
#define __ASM_VDSO_PROCESSOR_H
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#ifdef CONFIG_CPU_LOONGSON64
/*
@ -22,6 +22,6 @@
#define cpu_relax() barrier()
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* __ASM_VDSO_PROCESSOR_H */

View File

@ -9,7 +9,7 @@
#define __VDSO_PAGES 4
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <asm/asm.h>
#include <asm/vdso.h>
@ -69,4 +69,4 @@ static inline void __iomem *get_gic(const struct vdso_time_data *data)
#endif /* CONFIG_CLKSRC_MIPS_GIC */
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */

View File

@ -4,13 +4,13 @@
#include <asm/page.h>
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <vdso/datapage.h>
/* 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 */

View File

@ -12,7 +12,7 @@
#ifndef _ASM_XTALK_XTALK_H
#define _ASM_XTALK_XTALK_H
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
/*
* User-level device driver visible types
*/
@ -47,6 +47,6 @@ typedef struct xtalk_piomap_s *xtalk_piomap_t;
#define XIO_PORT(x) ((xwidgetnum_t)(((x)&XIO_PORT_BITS) >> XIO_PORT_SHIFT))
#define XIO_PACK(p, o) ((((uint64_t)(p))<<XIO_PORT_SHIFT) | ((o)&XIO_ADDR_BITS))
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* _ASM_XTALK_XTALK_H */

View File

@ -203,7 +203,7 @@ static const struct widget_ident __initconst widget_idents[] = {
* widget target flush register are widget dependent thus will not be
* defined here
*/
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
typedef u32 widgetreg_t;
/* widget configuration registers */
@ -274,6 +274,6 @@ typedef struct xwidget_hwid_s {
((hwid2)->mfg_num == XWIDGET_MFG_NUM_NONE) || \
((hwid1)->mfg_num == (hwid2)->mfg_num)))
#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif /* _ASM_XTALK_XWIDGET_H */

View File

@ -60,7 +60,7 @@
PM_DEEP_STANDBY | \
PM_PLL_PWRDOWN | PM_PWR_DOWN)
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#ifndef CONFIG_MIPS
extern const unsigned long brcmstb_pm_do_s2_sz;