summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/include/asm/atomic.h5
-rw-r--r--arch/arm64/include/asm/compat.h2
-rw-r--r--arch/arm64/include/asm/debug-monitors.h3
-rw-r--r--arch/arm64/include/asm/dma-mapping.h3
-rw-r--r--arch/arm64/include/asm/fpsimd.h2
-rw-r--r--arch/arm64/include/asm/futex.h3
-rw-r--r--arch/arm64/include/asm/hw_breakpoint.h3
-rw-r--r--arch/arm64/include/asm/io.h3
-rw-r--r--arch/arm64/include/asm/irqflags.h5
-rw-r--r--arch/arm64/include/asm/pci.h2
-rw-r--r--arch/arm64/include/asm/proc-fns.h2
-rw-r--r--arch/arm64/include/asm/processor.h3
-rw-r--r--arch/arm64/include/asm/signal32.h2
-rw-r--r--arch/arm64/include/asm/thread_info.h3
-rw-r--r--arch/arm64/include/asm/vdso.h4
-rw-r--r--arch/arm64/include/asm/vdso_datapage.h4
16 files changed, 3 insertions, 46 deletions
diff --git a/arch/arm64/include/asm/atomic.h b/arch/arm64/include/asm/atomic.h
index 657b0457d83c..a5ca23950cfd 100644
--- a/arch/arm64/include/asm/atomic.h
+++ b/arch/arm64/include/asm/atomic.h
@@ -15,8 +15,6 @@
15#include <asm/barrier.h> 15#include <asm/barrier.h>
16#include <asm/lse.h> 16#include <asm/lse.h>
17 17
18#ifdef __KERNEL__
19
20#define __ARM64_IN_ATOMIC_IMPL 18#define __ARM64_IN_ATOMIC_IMPL
21 19
22#if defined(CONFIG_ARM64_LSE_ATOMICS) && defined(CONFIG_AS_LSE) 20#if defined(CONFIG_ARM64_LSE_ATOMICS) && defined(CONFIG_AS_LSE)
@@ -157,5 +155,4 @@
157 155
158#include <asm-generic/atomic-instrumented.h> 156#include <asm-generic/atomic-instrumented.h>
159 157
160#endif 158#endif /* __ASM_ATOMIC_H */
161#endif
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index fb8ad4616b3b..b0d53a265f1d 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -4,7 +4,6 @@
4 */ 4 */
5#ifndef __ASM_COMPAT_H 5#ifndef __ASM_COMPAT_H
6#define __ASM_COMPAT_H 6#define __ASM_COMPAT_H
7#ifdef __KERNEL__
8#ifdef CONFIG_COMPAT 7#ifdef CONFIG_COMPAT
9 8
10/* 9/*
@@ -215,5 +214,4 @@ static inline int is_compat_thread(struct thread_info *thread)
215} 214}
216 215
217#endif /* CONFIG_COMPAT */ 216#endif /* CONFIG_COMPAT */
218#endif /* __KERNEL__ */
219#endif /* __ASM_COMPAT_H */ 217#endif /* __ASM_COMPAT_H */
diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h
index d8ec5bb881c2..7619f473155f 100644
--- a/arch/arm64/include/asm/debug-monitors.h
+++ b/arch/arm64/include/asm/debug-monitors.h
@@ -5,8 +5,6 @@
5#ifndef __ASM_DEBUG_MONITORS_H 5#ifndef __ASM_DEBUG_MONITORS_H
6#define __ASM_DEBUG_MONITORS_H 6#define __ASM_DEBUG_MONITORS_H
7 7
8#ifdef __KERNEL__
9
10#include <linux/errno.h> 8#include <linux/errno.h>
11#include <linux/types.h> 9#include <linux/types.h>
12#include <asm/brk-imm.h> 10#include <asm/brk-imm.h>
@@ -128,5 +126,4 @@ static inline int reinstall_suspended_bps(struct pt_regs *regs)
128int aarch32_break_handler(struct pt_regs *regs); 126int aarch32_break_handler(struct pt_regs *regs);
129 127
130#endif /* __ASSEMBLY */ 128#endif /* __ASSEMBLY */
131#endif /* __KERNEL__ */
132#endif /* __ASM_DEBUG_MONITORS_H */ 129#endif /* __ASM_DEBUG_MONITORS_H */
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
index bdcb0922a40c..fb3e5044f473 100644
--- a/arch/arm64/include/asm/dma-mapping.h
+++ b/arch/arm64/include/asm/dma-mapping.h
@@ -5,8 +5,6 @@
5#ifndef __ASM_DMA_MAPPING_H 5#ifndef __ASM_DMA_MAPPING_H
6#define __ASM_DMA_MAPPING_H 6#define __ASM_DMA_MAPPING_H
7 7
8#ifdef __KERNEL__
9
10#include <linux/types.h> 8#include <linux/types.h>
11#include <linux/vmalloc.h> 9#include <linux/vmalloc.h>
12 10
@@ -27,5 +25,4 @@ static inline bool is_device_dma_coherent(struct device *dev)
27 return dev->dma_coherent; 25 return dev->dma_coherent;
28} 26}
29 27
30#endif /* __KERNEL__ */
31#endif /* __ASM_DMA_MAPPING_H */ 28#endif /* __ASM_DMA_MAPPING_H */
diff --git a/arch/arm64/include/asm/fpsimd.h b/arch/arm64/include/asm/fpsimd.h
index b6a2c352f4c3..59f10dd13f12 100644
--- a/arch/arm64/include/asm/fpsimd.h
+++ b/arch/arm64/include/asm/fpsimd.h
@@ -21,7 +21,7 @@
21#include <linux/stddef.h> 21#include <linux/stddef.h>
22#include <linux/types.h> 22#include <linux/types.h>
23 23
24#if defined(__KERNEL__) && defined(CONFIG_COMPAT) 24#ifdef CONFIG_COMPAT
25/* Masks for extracting the FPSR and FPCR from the FPSCR */ 25/* Masks for extracting the FPSR and FPCR from the FPSCR */
26#define VFP_FPSCR_STAT_MASK 0xf800009f 26#define VFP_FPSCR_STAT_MASK 0xf800009f
27#define VFP_FPSCR_CTRL_MASK 0x07f79f00 27#define VFP_FPSCR_CTRL_MASK 0x07f79f00
diff --git a/arch/arm64/include/asm/futex.h b/arch/arm64/include/asm/futex.h
index 6211e3105491..6cc26a127819 100644
--- a/arch/arm64/include/asm/futex.h
+++ b/arch/arm64/include/asm/futex.h
@@ -5,8 +5,6 @@
5#ifndef __ASM_FUTEX_H 5#ifndef __ASM_FUTEX_H
6#define __ASM_FUTEX_H 6#define __ASM_FUTEX_H
7 7
8#ifdef __KERNEL__
9
10#include <linux/futex.h> 8#include <linux/futex.h>
11#include <linux/uaccess.h> 9#include <linux/uaccess.h>
12 10
@@ -129,5 +127,4 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *_uaddr,
129 return ret; 127 return ret;
130} 128}
131 129
132#endif /* __KERNEL__ */
133#endif /* __ASM_FUTEX_H */ 130#endif /* __ASM_FUTEX_H */
diff --git a/arch/arm64/include/asm/hw_breakpoint.h b/arch/arm64/include/asm/hw_breakpoint.h
index db9ab760e6fd..bc7aaed4b34e 100644
--- a/arch/arm64/include/asm/hw_breakpoint.h
+++ b/arch/arm64/include/asm/hw_breakpoint.h
@@ -10,8 +10,6 @@
10#include <asm/sysreg.h> 10#include <asm/sysreg.h>
11#include <asm/virt.h> 11#include <asm/virt.h>
12 12
13#ifdef __KERNEL__
14
15struct arch_hw_breakpoint_ctrl { 13struct arch_hw_breakpoint_ctrl {
16 u32 __reserved : 19, 14 u32 __reserved : 19,
17 len : 8, 15 len : 8,
@@ -156,5 +154,4 @@ static inline int get_num_wrps(void)
156 ID_AA64DFR0_WRPS_SHIFT); 154 ID_AA64DFR0_WRPS_SHIFT);
157} 155}
158 156
159#endif /* __KERNEL__ */
160#endif /* __ASM_BREAKPOINT_H */ 157#endif /* __ASM_BREAKPOINT_H */
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
index 7ed92626949d..179a4c65c0d4 100644
--- a/arch/arm64/include/asm/io.h
+++ b/arch/arm64/include/asm/io.h
@@ -8,8 +8,6 @@
8#ifndef __ASM_IO_H 8#ifndef __ASM_IO_H
9#define __ASM_IO_H 9#define __ASM_IO_H
10 10
11#ifdef __KERNEL__
12
13#include <linux/types.h> 11#include <linux/types.h>
14 12
15#include <asm/byteorder.h> 13#include <asm/byteorder.h>
@@ -207,5 +205,4 @@ extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
207 205
208extern int devmem_is_allowed(unsigned long pfn); 206extern int devmem_is_allowed(unsigned long pfn);
209 207
210#endif /* __KERNEL__ */
211#endif /* __ASM_IO_H */ 208#endif /* __ASM_IO_H */
diff --git a/arch/arm64/include/asm/irqflags.h b/arch/arm64/include/asm/irqflags.h
index 7872f260c9ee..1a59f0ed1ae3 100644
--- a/arch/arm64/include/asm/irqflags.h
+++ b/arch/arm64/include/asm/irqflags.h
@@ -5,8 +5,6 @@
5#ifndef __ASM_IRQFLAGS_H 5#ifndef __ASM_IRQFLAGS_H
6#define __ASM_IRQFLAGS_H 6#define __ASM_IRQFLAGS_H
7 7
8#ifdef __KERNEL__
9
10#include <asm/alternative.h> 8#include <asm/alternative.h>
11#include <asm/ptrace.h> 9#include <asm/ptrace.h>
12#include <asm/sysreg.h> 10#include <asm/sysreg.h>
@@ -128,5 +126,4 @@ static inline void arch_local_irq_restore(unsigned long flags)
128 : "memory"); 126 : "memory");
129} 127}
130 128
131#endif 129#endif /* __ASM_IRQFLAGS_H */
132#endif
diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h
index 9e690686e8aa..70b323cf8300 100644
--- a/arch/arm64/include/asm/pci.h
+++ b/arch/arm64/include/asm/pci.h
@@ -1,7 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __ASM_PCI_H 2#ifndef __ASM_PCI_H
3#define __ASM_PCI_H 3#define __ASM_PCI_H
4#ifdef __KERNEL__
5 4
6#include <linux/types.h> 5#include <linux/types.h>
7#include <linux/slab.h> 6#include <linux/slab.h>
@@ -35,5 +34,4 @@ static inline int pci_proc_domain(struct pci_bus *bus)
35} 34}
36#endif /* CONFIG_PCI */ 35#endif /* CONFIG_PCI */
37 36
38#endif /* __KERNEL__ */
39#endif /* __ASM_PCI_H */ 37#endif /* __ASM_PCI_H */
diff --git a/arch/arm64/include/asm/proc-fns.h b/arch/arm64/include/asm/proc-fns.h
index 368d90a9d0e5..a2ce65a0c1fa 100644
--- a/arch/arm64/include/asm/proc-fns.h
+++ b/arch/arm64/include/asm/proc-fns.h
@@ -9,7 +9,6 @@
9#ifndef __ASM_PROCFNS_H 9#ifndef __ASM_PROCFNS_H
10#define __ASM_PROCFNS_H 10#define __ASM_PROCFNS_H
11 11
12#ifdef __KERNEL__
13#ifndef __ASSEMBLY__ 12#ifndef __ASSEMBLY__
14 13
15#include <asm/page.h> 14#include <asm/page.h>
@@ -25,5 +24,4 @@ extern u64 cpu_do_resume(phys_addr_t ptr, u64 idmap_ttbr);
25#include <asm/memory.h> 24#include <asm/memory.h>
26 25
27#endif /* __ASSEMBLY__ */ 26#endif /* __ASSEMBLY__ */
28#endif /* __KERNEL__ */
29#endif /* __ASM_PROCFNS_H */ 27#endif /* __ASM_PROCFNS_H */
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index 844e2964b0f5..fa7a6f63308f 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -20,7 +20,6 @@
20#define NET_IP_ALIGN 0 20#define NET_IP_ALIGN 0
21 21
22#ifndef __ASSEMBLY__ 22#ifndef __ASSEMBLY__
23#ifdef __KERNEL__
24 23
25#include <linux/build_bug.h> 24#include <linux/build_bug.h>
26#include <linux/cache.h> 25#include <linux/cache.h>
@@ -283,8 +282,6 @@ static inline void spin_lock_prefetch(const void *ptr)
283 282
284#define HAVE_ARCH_PICK_MMAP_LAYOUT 283#define HAVE_ARCH_PICK_MMAP_LAYOUT
285 284
286#endif
287
288extern unsigned long __ro_after_init signal_minsigstksz; /* sigframe size */ 285extern unsigned long __ro_after_init signal_minsigstksz; /* sigframe size */
289extern void __init minsigstksz_setup(void); 286extern void __init minsigstksz_setup(void);
290 287
diff --git a/arch/arm64/include/asm/signal32.h b/arch/arm64/include/asm/signal32.h
index bd43d1cf724b..7e9f163d02ec 100644
--- a/arch/arm64/include/asm/signal32.h
+++ b/arch/arm64/include/asm/signal32.h
@@ -5,7 +5,6 @@
5#ifndef __ASM_SIGNAL32_H 5#ifndef __ASM_SIGNAL32_H
6#define __ASM_SIGNAL32_H 6#define __ASM_SIGNAL32_H
7 7
8#ifdef __KERNEL__
9#ifdef CONFIG_COMPAT 8#ifdef CONFIG_COMPAT
10#include <linux/compat.h> 9#include <linux/compat.h>
11 10
@@ -79,5 +78,4 @@ static inline void compat_setup_restart_syscall(struct pt_regs *regs)
79{ 78{
80} 79}
81#endif /* CONFIG_COMPAT */ 80#endif /* CONFIG_COMPAT */
82#endif /* __KERNEL__ */
83#endif /* __ASM_SIGNAL32_H */ 81#endif /* __ASM_SIGNAL32_H */
diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
index 180b34ec5965..e35cd84b102c 100644
--- a/arch/arm64/include/asm/thread_info.h
+++ b/arch/arm64/include/asm/thread_info.h
@@ -8,8 +8,6 @@
8#ifndef __ASM_THREAD_INFO_H 8#ifndef __ASM_THREAD_INFO_H
9#define __ASM_THREAD_INFO_H 9#define __ASM_THREAD_INFO_H
10 10
11#ifdef __KERNEL__
12
13#include <linux/compiler.h> 11#include <linux/compiler.h>
14 12
15#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
@@ -121,5 +119,4 @@ void arch_release_task_struct(struct task_struct *tsk);
121 .addr_limit = KERNEL_DS, \ 119 .addr_limit = KERNEL_DS, \
122} 120}
123 121
124#endif /* __KERNEL__ */
125#endif /* __ASM_THREAD_INFO_H */ 122#endif /* __ASM_THREAD_INFO_H */
diff --git a/arch/arm64/include/asm/vdso.h b/arch/arm64/include/asm/vdso.h
index 9c15e0a06301..07468428fd29 100644
--- a/arch/arm64/include/asm/vdso.h
+++ b/arch/arm64/include/asm/vdso.h
@@ -5,8 +5,6 @@
5#ifndef __ASM_VDSO_H 5#ifndef __ASM_VDSO_H
6#define __ASM_VDSO_H 6#define __ASM_VDSO_H
7 7
8#ifdef __KERNEL__
9
10/* 8/*
11 * Default link address for the vDSO. 9 * Default link address for the vDSO.
12 * Since we randomise the VDSO mapping, there's little point in trying 10 * Since we randomise the VDSO mapping, there's little point in trying
@@ -28,6 +26,4 @@
28 26
29#endif /* !__ASSEMBLY__ */ 27#endif /* !__ASSEMBLY__ */
30 28
31#endif /* __KERNEL__ */
32
33#endif /* __ASM_VDSO_H */ 29#endif /* __ASM_VDSO_H */
diff --git a/arch/arm64/include/asm/vdso_datapage.h b/arch/arm64/include/asm/vdso_datapage.h
index ba6dbc3de864..1f38bf330a6e 100644
--- a/arch/arm64/include/asm/vdso_datapage.h
+++ b/arch/arm64/include/asm/vdso_datapage.h
@@ -5,8 +5,6 @@
5#ifndef __ASM_VDSO_DATAPAGE_H 5#ifndef __ASM_VDSO_DATAPAGE_H
6#define __ASM_VDSO_DATAPAGE_H 6#define __ASM_VDSO_DATAPAGE_H
7 7
8#ifdef __KERNEL__
9
10#ifndef __ASSEMBLY__ 8#ifndef __ASSEMBLY__
11 9
12struct vdso_data { 10struct vdso_data {
@@ -32,6 +30,4 @@ struct vdso_data {
32 30
33#endif /* !__ASSEMBLY__ */ 31#endif /* !__ASSEMBLY__ */
34 32
35#endif /* __KERNEL__ */
36
37#endif /* __ASM_VDSO_DATAPAGE_H */ 33#endif /* __ASM_VDSO_DATAPAGE_H */