ARM: move #include <asm/cp15.h> into cacheflush.h
Subsystems (7)
cover ARM: move #include <asm/cp15.h> into cacheflush.h
There are several places where an explicit include of <asm/cp15.h> is needed just because cacheflush.h uses one of its macros in v7_exit_coherency_flush(). Let's put the include in the proper header.
These obviously have some dependencies, so I'd focus on:
(1) Is patch 1 acceptable? If so, then:
(2) Make sure patch 1 is serialized before the rest
I did a cursory scan of every file that includes cp15.h, and these are the only ones I found that only needed it for the sake of v7_exit_coherency_flush().
These are barely compile tested.
Thanks,
Brian
Brian Norris (5):
ARM: include missing cp15.h header
ARM: mvebu: drop unnecessary include
ARM: rockchip: drop unnecessary include
ARM: vexpress: drop unnecessary include
ARM: brcmstb: drop unnecessary include
arch/arm/include/asm/cacheflush.h | 1 + arch/arm/mach-bcm/platsmp-brcmstb.c | 1 - arch/arm/mach-mvebu/pmsu.c | 1 - arch/arm/mach-rockchip/platsmp.c | 1 - arch/arm/mach-vexpress/dcscb.c | 1 - arch/arm/mach-vexpress/tc2_pm.c | 1 - 6 files changed, 1 insertion(+), 5 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/5 ARM: include missing cp15.h header
As of this commit:
commit 39792c7cf3111d69dc4aa0923859d8b929e9039f
ARM: 7861/1: cacheflush: consolidate single-CPU ARMv7 cache disabling code
cacheflush.h now utilizes the CR_C macro from cp15.h. Let's include it.
This also means several users of v7_exit_coherency_flush() no longer have to include cp15.h directly when they don't directly use any #defines from it.
--- arch/arm/include/asm/cacheflush.h | 1 + 1 file changed, 1 insertion(+)
arch/arm/include/asm/cacheflush.h +1 -0
@@ -16,6 +16,7 @@#include <asm/shmparam.h> #include <asm/cachetype.h> #include <asm/outercache.h> +#include <asm/cp15.h> #define CACHE_COLOUR (vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
Signature · 1 line
1.9.1
PATCH 2/5 ARM: mvebu: drop unnecessary include
In reply to Brian Norris<asm/cp15.h> is only being included because of the implicit requirements of v7_exit_coherency_flush(). Now that the implicit include is provided for us, we can drop it from our explicit list.
--- arch/arm/mach-mvebu/pmsu.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-mvebu/pmsu.c +0 -1
@@ -33,7 +33,6 @@#include <linux/slab.h> #include <linux/smp.h> #include <asm/cacheflush.h> -#include <asm/cp15.h> #include <asm/smp_scu.h> #include <asm/smp_plat.h> #include <asm/suspend.h>
Signature · 1 line
1.9.1
PATCH 3/5 ARM: rockchip: drop unnecessary include
In reply to Brian Norris<asm/cp15.h> is only being included because of the implicit requirements of v7_exit_coherency_flush(). Now that the implicit include is provided for us, we can drop it from our explicit list.
--- arch/arm/mach-rockchip/platsmp.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-rockchip/platsmp.c +0 -1
@@ -21,7 +21,6 @@#include <linux/of_address.h> #include <asm/cacheflush.h> -#include <asm/cp15.h> #include <asm/smp_scu.h> #include <asm/smp_plat.h> #include <asm/mach/map.h>
Signature · 1 line
1.9.1
PATCH 4/5 ARM: vexpress: drop unnecessary include
In reply to Brian Norris<asm/cp15.h> is only being included because of the implicit requirements of v7_exit_coherency_flush(). Now that the implicit include is provided for us, we can drop it from our explicit list.
--- arch/arm/mach-vexpress/dcscb.c | 1 - arch/arm/mach-vexpress/tc2_pm.c | 1 - 2 files changed, 2 deletions(-)
arch/arm/mach-vexpress/dcscb.c +0 -1
@@ -22,7 +22,6 @@#include <asm/proc-fns.h> #include <asm/cacheflush.h> #include <asm/cputype.h> -#include <asm/cp15.h> #define RST_HOLD0 0x0
arch/arm/mach-vexpress/tc2_pm.c +0 -1
@@ -26,7 +26,6 @@#include <asm/proc-fns.h> #include <asm/cacheflush.h> #include <asm/cputype.h> -#include <asm/cp15.h> #include <linux/arm-cci.h>
Signature · 1 line
1.9.1
PATCH 5/5 ARM: brcmstb: drop unnecessary include
In reply to Brian Norris<asm/cp15.h> is only being included because of the implicit requirements of v7_exit_coherency_flush(). Now that the implicit include is provided for us, we can drop it from our explicit list.
---
This is based on code queued for 3.18
arch/arm/mach-bcm/platsmp-brcmstb.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-bcm/platsmp-brcmstb.c +0 -1
@@ -25,7 +25,6 @@#include <linux/mfd/syscon.h> #include <asm/cacheflush.h> -#include <asm/cp15.h> #include <asm/mach-types.h> #include <asm/smp_plat.h>
Signature · 1 line
1.9.1
Quoted 6 lines · Brian Norris
There are several places where an explicit include of <
asm/cp15.h> is needed just becausecacheflush.huses one of its macros inv7_exit_coherency_flush(). Let's put the include in the proper header.These obviously have some dependencies, so I'd focus on:
(1) Is patch 1 acceptable? If so, then:
Well, I'm wondering if it is really a gain to force a dependency for cp15.h on every user of cacheflush.h just because of the seldomly used v7_exit_coherency_flush(). But I don't mind either ways.
Nicolas
Quoted 6 lines · Nicolas Pitre
Quoted 4 lines · Brian Norris
There are several places where an explicit include of <
asm/cp15.h> is needed just becausecacheflush.huses one of its macros inv7_exit_coherency_flush(). Let's put the include in the proper header.
Quoted 6 lines
Quoted 2 lines
These obviously have some dependencies, so I'd focus on:
(1) Is patch 1 acceptable? If so, then:Well, I'm wondering if it is really a gain to force a dependency for
cp15.hon every user ofcacheflush.hjust because of the seldomly usedv7_exit_coherency_flush(). But I don't mind either ways.
I don't like unnecessary dependencies. We have too many of them already, and it basically means that touching any header file triggers a full kernel rebuild.
If we go down the path of adding unnecessary dependencies, we might as well do away with make and just script the damn thing, and that'll probably be faster since there'll be no dependencies to track. Just throw everything through ccache and let it deal with anything which has changed. Just don't allow your disk to fill up during the build, ccache really doesn't like that.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net.