* [RFC PATCH 0/8] Remove unneccessary included headers
@ 2018-05-30 16:41 Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 1/8] powerpc: remove kdump.h from page.h Christophe Leroy
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Christophe Leroy @ 2018-05-30 16:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
The purpose of this serie is to limit the number of includes to
only the necessary ones in order to reduce the number of files
recompiled everytime a header file is modified.
This is the start of the work, please provide feedback if any so
that I don't go in the wrong direction.
Christophe Leroy (8):
powerpc: remove kdump.h from page.h
powerpc: remove unneeded inclusions of cpu_has_feature.h
powerpc: remove superflous inclusions of asm-compat.h
powerpc: remove superflous inclusions of asm/feature-fixups.h
powerpc: remove superflous inclusions of asm/fixmap.h
powerpc: declare set_breakpoint() static
powerpc/book3s: Remove PPC_PIN_SIZE
powerpc: fix includes in asm/processor.h
arch/powerpc/include/asm/book3s/32/pgtable.h | 5 -----
arch/powerpc/include/asm/cacheflush.h | 1 -
arch/powerpc/include/asm/cputable.h | 2 --
arch/powerpc/include/asm/cputime.h | 1 -
arch/powerpc/include/asm/dbell.h | 1 -
arch/powerpc/include/asm/debug.h | 1 -
arch/powerpc/include/asm/dt_cpu_ftrs.h | 3 ---
arch/powerpc/include/asm/feature-fixups.h | 2 ++
arch/powerpc/include/asm/firmware.h | 1 -
arch/powerpc/include/asm/fixmap.h | 2 --
arch/powerpc/include/asm/hw_breakpoint.h | 1 +
arch/powerpc/include/asm/mmu.h | 1 -
arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +-
arch/powerpc/include/asm/page.h | 1 -
arch/powerpc/include/asm/ppc-opcode.h | 1 -
arch/powerpc/include/asm/processor.h | 5 ++---
arch/powerpc/include/asm/reg.h | 1 +
arch/powerpc/kernel/head_8xx.S | 1 -
arch/powerpc/kernel/process.c | 14 +++++++-------
arch/powerpc/kernel/setup_32.c | 1 +
arch/powerpc/kernel/vdso.c | 1 -
arch/powerpc/mm/dump_hashpagetable.c | 1 -
arch/powerpc/sysdev/cpm_common.c | 1 -
23 files changed, 15 insertions(+), 35 deletions(-)
--
2.13.3
^ permalink raw reply [flat|nested] 10+ messages in thread
* [RFC PATCH 1/8] powerpc: remove kdump.h from page.h
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
@ 2018-05-30 16:41 ` Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 2/8] powerpc: remove unneeded inclusions of cpu_has_feature.h Christophe Leroy
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2018-05-30 16:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
page.h doesn't need kdump.h
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/page.h | 1 -
arch/powerpc/kernel/setup_32.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
index db7be0779d55..a9fbefaacf10 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -17,7 +17,6 @@
#include <asm/types.h>
#endif
#include <asm/asm-compat.h>
-#include <asm/kdump.h>
/*
* On regular PPC32 page size is 4K (but we support 4K/16K/64K/256K pages
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 74457485574b..ef747a5a30b9 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -40,6 +40,7 @@
#include <asm/code-patching.h>
#include <asm/cpu_has_feature.h>
#include <asm/asm-prototypes.h>
+#include <asm/kdump.h>
#define DBG(fmt...)
--
2.13.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 2/8] powerpc: remove unneeded inclusions of cpu_has_feature.h
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 1/8] powerpc: remove kdump.h from page.h Christophe Leroy
@ 2018-05-30 16:41 ` Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 3/8] powerpc: remove superflous inclusions of asm-compat.h Christophe Leroy
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2018-05-30 16:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
Files not using cpu_has_feature() don't need cpu_has_feature.h
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/cacheflush.h | 1 -
arch/powerpc/include/asm/cputime.h | 1 -
arch/powerpc/include/asm/dbell.h | 1 -
arch/powerpc/include/asm/dt_cpu_ftrs.h | 3 ---
arch/powerpc/kernel/vdso.c | 1 -
5 files changed, 7 deletions(-)
diff --git a/arch/powerpc/include/asm/cacheflush.h b/arch/powerpc/include/asm/cacheflush.h
index 11843e37d9cf..cfe3a98349c4 100644
--- a/arch/powerpc/include/asm/cacheflush.h
+++ b/arch/powerpc/include/asm/cacheflush.h
@@ -11,7 +11,6 @@
#include <linux/mm.h>
#include <asm/cputable.h>
-#include <asm/cpu_has_feature.h>
/*
* No cache flushing is required when address mappings are changed,
diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h
index 99b541865d8d..d78fee0cdbf0 100644
--- a/arch/powerpc/include/asm/cputime.h
+++ b/arch/powerpc/include/asm/cputime.h
@@ -23,7 +23,6 @@
#include <asm/div64.h>
#include <asm/time.h>
#include <asm/param.h>
-#include <asm/cpu_has_feature.h>
typedef u64 __nocast cputime_t;
typedef u64 __nocast cputime64_t;
diff --git a/arch/powerpc/include/asm/dbell.h b/arch/powerpc/include/asm/dbell.h
index 9f2ae0d25e15..998c42ff1caa 100644
--- a/arch/powerpc/include/asm/dbell.h
+++ b/arch/powerpc/include/asm/dbell.h
@@ -16,7 +16,6 @@
#include <linux/threads.h>
#include <asm/ppc-opcode.h>
-#include <asm/cpu_has_feature.h>
#define PPC_DBELL_MSG_BRDCAST (0x04000000)
#define PPC_DBELL_TYPE(x) (((x) & 0xf) << (63-36))
diff --git a/arch/powerpc/include/asm/dt_cpu_ftrs.h b/arch/powerpc/include/asm/dt_cpu_ftrs.h
index 71515d909ed1..40165eea22ee 100644
--- a/arch/powerpc/include/asm/dt_cpu_ftrs.h
+++ b/arch/powerpc/include/asm/dt_cpu_ftrs.h
@@ -10,9 +10,6 @@
*/
#include <linux/types.h>
-#include <asm/asm-compat.h>
-#include <asm/feature-fixups.h>
-#include <uapi/asm/cputable.h>
#ifdef CONFIG_PPC_DT_CPU_FTRS
bool dt_cpu_ftrs_init(void *fdt);
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index b44ec104a5a1..63b4e4485b00 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -22,7 +22,6 @@
#include <linux/security.h>
#include <linux/memblock.h>
-#include <asm/cpu_has_feature.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/mmu.h>
--
2.13.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 3/8] powerpc: remove superflous inclusions of asm-compat.h
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 1/8] powerpc: remove kdump.h from page.h Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 2/8] powerpc: remove unneeded inclusions of cpu_has_feature.h Christophe Leroy
@ 2018-05-30 16:41 ` Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 4/8] powerpc: remove superflous inclusions of asm/feature-fixups.h Christophe Leroy
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2018-05-30 16:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
ppc-opcode.h doesn't need asm-compat.h
neither does dt_cpu_ftrs.h
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/cputable.h | 1 -
arch/powerpc/include/asm/feature-fixups.h | 2 ++
arch/powerpc/include/asm/ppc-opcode.h | 1 -
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index 66fcab13c8b4..7518dafa7cd4 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -4,7 +4,6 @@
#include <linux/types.h>
-#include <asm/asm-compat.h>
#include <asm/feature-fixups.h>
#include <uapi/asm/cputable.h>
diff --git a/arch/powerpc/include/asm/feature-fixups.h b/arch/powerpc/include/asm/feature-fixups.h
index a9b64df34e2a..ecfdf9d3d145 100644
--- a/arch/powerpc/include/asm/feature-fixups.h
+++ b/arch/powerpc/include/asm/feature-fixups.h
@@ -1,6 +1,8 @@
#ifndef __ASM_POWERPC_FEATURE_FIXUPS_H
#define __ASM_POWERPC_FEATURE_FIXUPS_H
+#include <asm/asm-compat.h>
+
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index 4436887bc415..ab12fac26f5b 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -13,7 +13,6 @@
#define _ASM_POWERPC_PPC_OPCODE_H
#include <linux/stringify.h>
-#include <asm/asm-compat.h>
#define __REG_R0 0
#define __REG_R1 1
--
2.13.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 4/8] powerpc: remove superflous inclusions of asm/feature-fixups.h
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
` (2 preceding siblings ...)
2018-05-30 16:41 ` [RFC PATCH 3/8] powerpc: remove superflous inclusions of asm-compat.h Christophe Leroy
@ 2018-05-30 16:41 ` Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 5/8] powerpc: remove superflous inclusions of asm/fixmap.h Christophe Leroy
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2018-05-30 16:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
files not using feature fixup don't need asm/feature-fixups.h
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/cputable.h | 1 -
arch/powerpc/include/asm/firmware.h | 1 -
arch/powerpc/include/asm/mmu.h | 1 -
arch/powerpc/include/asm/reg.h | 1 +
4 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index 7518dafa7cd4..e99905274a77 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -4,7 +4,6 @@
#include <linux/types.h>
-#include <asm/feature-fixups.h>
#include <uapi/asm/cputable.h>
#ifndef __ASSEMBLY__
diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h
index 535add3f7791..59ae44cf0bb8 100644
--- a/arch/powerpc/include/asm/firmware.h
+++ b/arch/powerpc/include/asm/firmware.h
@@ -15,7 +15,6 @@
#ifdef __KERNEL__
#include <asm/asm-compat.h>
-#include <asm/feature-fixups.h>
/* firmware feature bitmask values */
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index 61d15ce92278..61d0d2d69583 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -6,7 +6,6 @@
#include <linux/types.h>
#include <asm/asm-compat.h>
-#include <asm/feature-fixups.h>
/*
* MMU features bit definitions
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
index cb0f272ce123..a7b8860ed896 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -13,6 +13,7 @@
#include <linux/stringify.h>
#include <asm/cputable.h>
+#include <asm/feature-fixups.h>
/* Pickup Book E specific registers. */
#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
--
2.13.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 5/8] powerpc: remove superflous inclusions of asm/fixmap.h
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
` (3 preceding siblings ...)
2018-05-30 16:41 ` [RFC PATCH 4/8] powerpc: remove superflous inclusions of asm/feature-fixups.h Christophe Leroy
@ 2018-05-30 16:41 ` Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 6/8] powerpc: declare set_breakpoint() static Christophe Leroy
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2018-05-30 16:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
Files not using fixmap consts or functions don't need asm/fixmap.h
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/fixmap.h | 2 --
arch/powerpc/kernel/head_8xx.S | 1 -
arch/powerpc/mm/dump_hashpagetable.c | 1 -
arch/powerpc/sysdev/cpm_common.c | 1 -
4 files changed, 5 deletions(-)
diff --git a/arch/powerpc/include/asm/fixmap.h b/arch/powerpc/include/asm/fixmap.h
index 6c40dfda5912..40efdf1d2d6e 100644
--- a/arch/powerpc/include/asm/fixmap.h
+++ b/arch/powerpc/include/asm/fixmap.h
@@ -15,9 +15,7 @@
#define _ASM_FIXMAP_H
#ifndef __ASSEMBLY__
-#include <linux/kernel.h>
#include <asm/page.h>
-#include <asm/pgtable.h>
#ifdef CONFIG_HIGHMEM
#include <linux/threads.h>
#include <asm/kmap_types.h>
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 6cab07e76732..95f6bdc0718f 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -30,7 +30,6 @@
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
-#include <asm/fixmap.h>
#include <asm/export.h>
#if CONFIG_TASK_SIZE <= 0x80000000 && CONFIG_PAGE_OFFSET >= 0x80000000
diff --git a/arch/powerpc/mm/dump_hashpagetable.c b/arch/powerpc/mm/dump_hashpagetable.c
index 14cfb11b09d0..ddffb1513ddc 100644
--- a/arch/powerpc/mm/dump_hashpagetable.c
+++ b/arch/powerpc/mm/dump_hashpagetable.c
@@ -19,7 +19,6 @@
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
-#include <asm/fixmap.h>
#include <asm/pgtable.h>
#include <linux/const.h>
#include <asm/page.h>
diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c
index b74508175b67..010975c3422f 100644
--- a/arch/powerpc/sysdev/cpm_common.c
+++ b/arch/powerpc/sysdev/cpm_common.c
@@ -28,7 +28,6 @@
#include <asm/udbg.h>
#include <asm/io.h>
#include <asm/cpm.h>
-#include <asm/fixmap.h>
#include <soc/fsl/qe/qe.h>
#include <mm/mmu_decl.h>
--
2.13.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 6/8] powerpc: declare set_breakpoint() static
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
` (4 preceding siblings ...)
2018-05-30 16:41 ` [RFC PATCH 5/8] powerpc: remove superflous inclusions of asm/fixmap.h Christophe Leroy
@ 2018-05-30 16:41 ` Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 7/8] powerpc/book3s: Remove PPC_PIN_SIZE Christophe Leroy
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2018-05-30 16:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
set_breakpoint() is only used in process.c so make it static
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/debug.h | 1 -
arch/powerpc/kernel/process.c | 14 +++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/include/asm/debug.h b/arch/powerpc/include/asm/debug.h
index ce5da214ffe5..7756026b95ca 100644
--- a/arch/powerpc/include/asm/debug.h
+++ b/arch/powerpc/include/asm/debug.h
@@ -45,7 +45,6 @@ static inline int debugger_break_match(struct pt_regs *regs) { return 0; }
static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; }
#endif
-void set_breakpoint(struct arch_hw_breakpoint *brk);
void __set_breakpoint(struct arch_hw_breakpoint *brk);
bool ppc_breakpoint_available(void);
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 1237f13fed51..3e66cf6f7f95 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -714,6 +714,13 @@ void switch_booke_debug_regs(struct debug_reg *new_debug)
EXPORT_SYMBOL_GPL(switch_booke_debug_regs);
#else /* !CONFIG_PPC_ADV_DEBUG_REGS */
#ifndef CONFIG_HAVE_HW_BREAKPOINT
+static void set_breakpoint(struct arch_hw_breakpoint *brk)
+{
+ preempt_disable();
+ __set_breakpoint(brk);
+ preempt_enable();
+}
+
static void set_debug_reg_defaults(struct thread_struct *thread)
{
thread->hw_brk.address = 0;
@@ -826,13 +833,6 @@ void __set_breakpoint(struct arch_hw_breakpoint *brk)
WARN_ON_ONCE(1);
}
-void set_breakpoint(struct arch_hw_breakpoint *brk)
-{
- preempt_disable();
- __set_breakpoint(brk);
- preempt_enable();
-}
-
/* Check if we have DAWR or DABR hardware */
bool ppc_breakpoint_available(void)
{
--
2.13.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 7/8] powerpc/book3s: Remove PPC_PIN_SIZE
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
` (5 preceding siblings ...)
2018-05-30 16:41 ` [RFC PATCH 6/8] powerpc: declare set_breakpoint() static Christophe Leroy
@ 2018-05-30 16:41 ` Christophe Leroy
2018-05-30 16:42 ` [RFC PATCH 8/8] powerpc: fix includes in asm/processor.h Christophe Leroy
2018-05-31 9:55 ` [RFC PATCH 0/8] Remove unneccessary included headers Michael Ellerman
8 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2018-05-30 16:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
PPC_PIN_SIZE is specific to the 44x and is defined in mmu.h
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/book3s/32/pgtable.h | 5 -----
arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
index c615abdce119..0603479d04c3 100644
--- a/arch/powerpc/include/asm/book3s/32/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
@@ -84,17 +84,12 @@
* of RAM. -- Cort
*/
#define VMALLOC_OFFSET (0x1000000) /* 16M */
-#ifdef PPC_PIN_SIZE
-#define VMALLOC_START (((_ALIGN((long)high_memory, PPC_PIN_SIZE) + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
-#else
#define VMALLOC_START ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
-#endif
#define VMALLOC_END ioremap_bot
#ifndef __ASSEMBLY__
#include <linux/sched.h>
#include <linux/threads.h>
-#include <asm/io.h> /* For sub-arch specific PPC_PIN_SIZE */
extern unsigned long ioremap_bot;
diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h
index 987a658b18e1..35fa43c20b6e 100644
--- a/arch/powerpc/include/asm/nohash/32/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/32/pgtable.h
@@ -8,7 +8,7 @@
#ifndef __ASSEMBLY__
#include <linux/sched.h>
#include <linux/threads.h>
-#include <asm/io.h> /* For sub-arch specific PPC_PIN_SIZE */
+#include <asm/mmu.h> /* For sub-arch specific PPC_PIN_SIZE */
extern unsigned long ioremap_bot;
--
2.13.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [RFC PATCH 8/8] powerpc: fix includes in asm/processor.h
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
` (6 preceding siblings ...)
2018-05-30 16:41 ` [RFC PATCH 7/8] powerpc/book3s: Remove PPC_PIN_SIZE Christophe Leroy
@ 2018-05-30 16:42 ` Christophe Leroy
2018-05-31 9:55 ` [RFC PATCH 0/8] Remove unneccessary included headers Michael Ellerman
8 siblings, 0 replies; 10+ messages in thread
From: Christophe Leroy @ 2018-05-30 16:42 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linux-kernel, linuxppc-dev
Remove superflous includes and add missing ones
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/hw_breakpoint.h | 1 +
arch/powerpc/include/asm/processor.h | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/hw_breakpoint.h b/arch/powerpc/include/asm/hw_breakpoint.h
index 8e7b09703ca4..3637588d3f6d 100644
--- a/arch/powerpc/include/asm/hw_breakpoint.h
+++ b/arch/powerpc/include/asm/hw_breakpoint.h
@@ -55,6 +55,7 @@ struct arch_hw_breakpoint {
struct perf_event;
struct pmu;
struct perf_sample_data;
+struct task_struct;
#define HW_BREAKPOINT_ALIGN 0x7
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index c4b36a494a63..74ed654928f0 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -39,10 +39,9 @@
#endif /* CONFIG_PPC64 */
#ifndef __ASSEMBLY__
-#include <linux/compiler.h>
-#include <linux/cache.h>
+#include <linux/types.h>
+#include <asm/thread_info.h>
#include <asm/ptrace.h>
-#include <asm/types.h>
#include <asm/hw_breakpoint.h>
/* We do _not_ want to define new machine types at all, those must die
--
2.13.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [RFC PATCH 0/8] Remove unneccessary included headers
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
` (7 preceding siblings ...)
2018-05-30 16:42 ` [RFC PATCH 8/8] powerpc: fix includes in asm/processor.h Christophe Leroy
@ 2018-05-31 9:55 ` Michael Ellerman
8 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2018-05-31 9:55 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras
Cc: linux-kernel, linuxppc-dev
Christophe Leroy <christophe.leroy@c-s.fr> writes:
> The purpose of this serie is to limit the number of includes to
> only the necessary ones in order to reduce the number of files
> recompiled everytime a header file is modified.
>
> This is the start of the work, please provide feedback if any so
> that I don't go in the wrong direction.
Thanks for starting on this.
There's a few build errors, summary below.
http://kisskb.ellerman.id.au/kisskb/head/14031/
cheers
arch/powerpc/kernel/machine_kexec.c:140:26: error: 'KDUMP_KERNELBASE' undeclared (first use in this function):
corenet32_smp_defconfig powerpc
corenet32_smp_defconfig powerpc-5.3
g5_defconfig powerpc
g5_defconfig powerpc-5.3
gamecube_defconfig powerpc
gamecube_defconfig powerpc-5.3
maple_defconfig powerpc
maple_defconfig powerpc-5.3
mpc85xx_defconfig powerpc
mpc85xx_defconfig powerpc-5.3
mpc85xx_smp_defconfig powerpc
mpc85xx_smp_defconfig powerpc-5.3
mpc86xx_defconfig powerpc
mpc86xx_defconfig powerpc-5.3
powernv_defconfig+NO_NUMA ppc64le
powernv_defconfig+NO_PERF ppc64le
powernv_defconfig+NO_RADIX ppc64le
powernv_defconfig+STRICT_RWX ppc64le
powernv_defconfig+THIN ppc64le
powerpc-randconfig powerpc-5.3
ppc64e_defconfig+KEXEC powerpc
ppc64e_defconfig+KEXEC powerpc-5.3
ps3_defconfig powerpc
ps3_defconfig powerpc-5.3
pseries_defconfig powerpc
pseries_defconfig powerpc-5.3
pseries_defconfig+NO_MEMORY_HOTPLUG powerpc
pseries_defconfig+NO_MEMORY_HOTPLUG powerpc-5.3
pseries_defconfig+NO_MEMORY_HOTREMOVE powerpc
pseries_defconfig+NO_SPLPAR powerpc
pseries_defconfig+NO_SPLPAR powerpc-5.3
pseries_le_defconfig ppc64le
pseries_le_defconfig+NO_NUMA ppc64le
pseries_le_defconfig+NO_SPLPAR ppc64le
skiroot_defconfig ppc64le
wii_defconfig powerpc
wii_defconfig powerpc-5.3
arch/powerpc/include/asm/cputable.h:146:23: error: implicit declaration of function 'ASM_CONST' [-Werror=implicit-function-declaration]:
amigaone_defconfig powerpc-5.3
corenet_basic_defconfig powerpc-5.3
holly_defconfig powerpc-5.3
mpc85xx_basic_defconfig powerpc-5.3
pmac32_defconfig powerpc-5.3
pmac32_defconfig+KVM powerpc-5.3
pmac32_defconfig+kexec powerpc-5.3
arch/powerpc/include/asm/cputable.h:538:6: error: enumerator value for 'CPU_FTRS_POSSIBLE' is not an integer constant:
44x/akebono_defconfig powerpc
44x/akebono_defconfig powerpc-5.3
44x/currituck_defconfig powerpc
44x/currituck_defconfig powerpc-5.3
amigaone_defconfig powerpc
amigaone_defconfig powerpc-5.3
chrp32_defconfig powerpc
chrp32_defconfig powerpc-5.3
corenet_basic_defconfig powerpc
corenet_basic_defconfig powerpc-5.3
holly_defconfig powerpc
holly_defconfig powerpc-5.3
mpc85xx_basic_defconfig powerpc
mpc85xx_basic_defconfig powerpc-5.3
pmac32_defconfig powerpc
pmac32_defconfig powerpc-5.3
pmac32_defconfig+KVM powerpc
pmac32_defconfig+KVM powerpc-5.3
pmac32_defconfig+SMP powerpc
pmac32_defconfig+SMP powerpc-5.3
pmac32_defconfig+kexec powerpc
pmac32_defconfig+kexec powerpc-5.3
ppc6xx_defconfig powerpc
ppc6xx_defconfig powerpc-5.3
arch/powerpc/include/asm/cputable.h:614:6: error: enumerator value for 'CPU_FTRS_ALWAYS' is not an integer constant:
44x/akebono_defconfig powerpc
44x/akebono_defconfig powerpc-5.3
44x/currituck_defconfig powerpc
44x/currituck_defconfig powerpc-5.3
amigaone_defconfig powerpc
amigaone_defconfig powerpc-5.3
chrp32_defconfig powerpc
chrp32_defconfig powerpc-5.3
corenet_basic_defconfig powerpc
corenet_basic_defconfig powerpc-5.3
holly_defconfig powerpc
holly_defconfig powerpc-5.3
mpc85xx_basic_defconfig powerpc
mpc85xx_basic_defconfig powerpc-5.3
pmac32_defconfig powerpc
pmac32_defconfig powerpc-5.3
pmac32_defconfig+KVM powerpc
pmac32_defconfig+KVM powerpc-5.3
pmac32_defconfig+SMP powerpc
pmac32_defconfig+SMP powerpc-5.3
pmac32_defconfig+kexec powerpc
pmac32_defconfig+kexec powerpc-5.3
ppc6xx_defconfig powerpc
ppc6xx_defconfig powerpc-5.3
arch/powerpc/include/asm/cputable.h:505:6: error: implicit declaration of function 'ASM_CONST' [-Werror=implicit-function-declaration]:
amigaone_defconfig powerpc
chrp32_defconfig powerpc
corenet_basic_defconfig powerpc
holly_defconfig powerpc
mpc85xx_basic_defconfig powerpc
pmac32_defconfig powerpc
pmac32_defconfig+KVM powerpc
pmac32_defconfig+SMP powerpc
pmac32_defconfig+kexec powerpc
ppc6xx_defconfig powerpc
arch/powerpc/kernel/machine_kexec.c:155:22: error: 'KDUMP_KERNELBASE' undeclared (first use in this function):
44x/fsp2_defconfig powerpc-5.3
arch/powerpc/include/asm/cputable.h:158:32: error: implicit declaration of function 'ASM_CONST' [-Werror=implicit-function-declaration]:
44x/akebono_defconfig powerpc-5.3
44x/currituck_defconfig powerpc-5.3
chrp32_defconfig powerpc-5.3
pmac32_defconfig+SMP powerpc-5.3
ppc6xx_defconfig powerpc-5.3
arch/powerpc/include/asm/cputable.h:515:6: error: implicit declaration of function 'ASM_CONST' [-Werror=implicit-function-declaration]:
44x/akebono_defconfig powerpc
44x/currituck_defconfig powerpc
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-05-31 9:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-30 16:41 [RFC PATCH 0/8] Remove unneccessary included headers Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 1/8] powerpc: remove kdump.h from page.h Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 2/8] powerpc: remove unneeded inclusions of cpu_has_feature.h Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 3/8] powerpc: remove superflous inclusions of asm-compat.h Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 4/8] powerpc: remove superflous inclusions of asm/feature-fixups.h Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 5/8] powerpc: remove superflous inclusions of asm/fixmap.h Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 6/8] powerpc: declare set_breakpoint() static Christophe Leroy
2018-05-30 16:41 ` [RFC PATCH 7/8] powerpc/book3s: Remove PPC_PIN_SIZE Christophe Leroy
2018-05-30 16:42 ` [RFC PATCH 8/8] powerpc: fix includes in asm/processor.h Christophe Leroy
2018-05-31 9:55 ` [RFC PATCH 0/8] Remove unneccessary included headers Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).