arm: add __initbss section attribute
Subsystems (85)
RFC 1/1 arm: add __initbss section attribute
This attribute can make init data to be into .initbss section, this will make the data to be NO_BITS in vmlinux, can shrink the Image file size, and speed up the boot up time.
--- arch/arm/kernel/vmlinux.lds.S | 2 +- arch/arm/mm/init.c | 1 + include/asm-generic/sections.h | 1 + include/asm-generic/vmlinux.lds.h | 11 ++++++++++- include/linux/init.h | 1 + include/linux/mm.h | 4 +++- 6 files changed, 17 insertions(+), 3 deletions(-)
arch/arm/kernel/vmlinux.lds.S +1 -1
@@ -330,7 +330,7 @@ SECTIONS } #endif - BSS_SECTION(0, 0, 0) + BSS_SECTION(0, 0, 0, 0) _end = .; STABS_DEBUG
arch/arm/mm/init.c +1 -0
@@ -722,6 +722,7 @@ void free_initmem(void)free_tcmmem ();poison_init_mem (__init_begin, __init_end - __init_begin); +poison_init_mem (__initbss_start, __initbss_start - __initbss_end);if (!machine_is_integrator () && !machine_is_cintegrator ())free_initmem_default (-1 ); }
include/asm-generic/sections.h +1 -0
@@ -29,6 +29,7 @@ extern char _text[], _stext[], _etext[];extern char _data[], _sdata[], _edata[];extern char __bss_start[], __bss_stop[];extern char __init_begin[], __init_end[]; +extern char __initbss_start[], __initbss_end[];extern char _sinittext[], _einittext[];extern char _end[];extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[];
include/asm-generic/vmlinux.lds.h +10 -1
@@ -574,6 +574,14 @@ *(COMMON) \ } +#define INITBSS (initbss_align) \ + . = ALIGN(initbss_align); \ + .initbss : AT(ADDR(.initbss) - LOAD_OFFSET) { \ + VMLINUX_SYMBOL(__initbss_start) = .; \ + *(.bss.init.data) \ + VMLINUX_SYMBOL(__initbss_end) = .; \ + } +/* * DWARF debug sections. * Symbols in the DWARF debugging sections are relative to
@@ -831,10 +839,11 @@ INIT_RAM_FS \ } -#define BSS_SECTION (sbss_align, bss_align, stop_align) \ +#define BSS_SECTION (sbss_align, bss_align, initbss_align, stop_align) \ . = ALIGN(sbss_align); \ VMLINUX_SYMBOL(__bss_start) = .; \ SBSS(sbss_align) \ BSS(bss_align) \ + INITBSS(initbss_align) \ . = ALIGN(stop_align); \ VMLINUX_SYMBOL(__bss_stop) = .;
include/linux/init.h +1 -0
@@ -41,6 +41,7 @@discard it in modules) */ #define __init __section(.init.text) __cold notrace#define __initdata __section(.init.data) +#define __initbss __section(.bss.init.data)#define __initconst __constsection(.init.rodata)#define __exitdata __section(.exit.data)#define __exit_call __used __section(.exitcall.exit)
include/linux/mm.h +3 -1
@@ -21,6 +21,7 @@#include <linux/resource.h> #include <linux/page_ext.h> #include <linux/err.h> +#include <asm/sections.h> struct mempolicy ;struct anon_vma ;
@@ -1722,10 +1723,11 @@ static inline void mark_page_reserved(struct page *page)*/ static inline unsigned long free_initmem_default (int poison) { -extern char __init_begin[], __init_end[];return free_reserved_area (&__init_begin, &__init_end, poison,"unused kernel" ); +return free_reserved_area (&__initbss_start, &__initbss_end, + poison,"unused kernel" ); }static inline unsigned long get_num_physpages (void )
Signature · 1 line
1.9.1
Quoted 88 lines · yalin wang
This attribute can make init data to be into .initbss section, this will make the data to be
NO_BITSin vmlinux, can shrink the Image file size, and speed up the boot up time.Signed-off-by yalin wang <[email protected]>--- arch/arm/kernel/vmlinux.lds.S | 2 +- arch/arm/mm/init.c | 1 + include/asm-generic/sections.h | 1 + include/asm-generic/vmlinux.lds.h | 11 ++++++++++- include/linux/init.h | 1 + include/linux/mm.h | 4 +++- 6 files changed, 17 insertions(+), 3 deletions(-)arch/arm/kernel/vmlinux.lds.S +1
-1@@ -330,7 +330,7 @@ SECTIONS } #endif - BSS_SECTION(0, 0, 0) + BSS_SECTION(0, 0, 0, 0) _end = .; STABS_DEBUGarch/arm/mm/init.c +1
-0@@ -722,6 +722,7 @@ void free_initmem(void)free_tcmmem ();poison_init_mem (__init_begin, __init_end - __init_begin); +poison_init_mem (__initbss_start, __initbss_start - __initbss_end);if (!machine_is_integrator () && !machine_is_cintegrator ())free_initmem_default (-1 ); }include/asm-generic/sections.h +1
-0@@ -29,6 +29,7 @@ extern char _text[], _stext[], _etext[];extern char _data[], _sdata[], _edata[];extern char __bss_start[], __bss_stop[];extern char __init_begin[], __init_end[]; +extern char __initbss_start[], __initbss_end[];extern char _sinittext[], _einittext[];extern char _end[];extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[];include/asm-generic/vmlinux.lds.h +10
-1@@ -574,6 +574,14 @@ *(COMMON) \ } +#define INITBSS (initbss_align) \ + . = ALIGN(initbss_align); \ + .initbss : AT(ADDR(.initbss) - LOAD_OFFSET) { \ + VMLINUX_SYMBOL(__initbss_start) = .; \ + *(.bss.init.data) \ + VMLINUX_SYMBOL(__initbss_end) = .; \ + } +/* * DWARF debug sections. * Symbols in the DWARF debugging sections are relative to @@ -831,10 +839,11 @@ INIT_RAM_FS \ } -#define BSS_SECTION (sbss_align, bss_align, stop_align) \ +#define BSS_SECTION (sbss_align, bss_align, initbss_align, stop_align) \ . = ALIGN(sbss_align); \ VMLINUX_SYMBOL(__bss_start) = .; \ SBSS(sbss_align) \ BSS(bss_align) \ + INITBSS(initbss_align) \ . = ALIGN(stop_align); \ VMLINUX_SYMBOL(__bss_stop) = .;include/linux/init.h +0
-0
include/linux/init.h line 44
Quoted 4 lines
include/linux/init.h +1
-0@@ -41,6 +41,7 @@discard it in modules) */ #define __init __section(.init.text) __cold notrace#define __initdata __section(.init.data) +#define __initbss __section(.bss.init.data)
Shouldn't this be .init.bss ?
Quoted 16 lines
include/linux/init.h +0
-0#define __initconst __constsection(.init.rodata)#define __exitdata __section(.exit.data)#define __exit_call __used __section(.exitcall.exit)include/linux/mm.h +1
-0@@ -21,6 +21,7 @@#include <linux/resource.h> #include <linux/page_ext.h> #include <linux/err.h> +#include <asm/sections.h> struct mempolicy ;struct anon_vma ;
include/linux/mm.h static inline void mark_page_reserved(struct page *page) · line 1730
Quoted 9 lines
include/linux/mm.h +2
-1@@ -1722,10 +1723,11 @@ static inline void mark_page_reserved(struct page *page)*/ static inline unsigned long free_initmem_default (int poison) { -extern char __init_begin[], __init_end[];return free_reserved_area (&__init_begin, &__init_end, poison,"unused kernel" ); +return free_reserved_area (&__initbss_start, &__initbss_end, + poison,"unused kernel" );
You obviously have not tested this code, since the first return makes the second unreachable.
So you will need to put __initbss annotations all over the tree to actually populate and then free this section (after you have fixed your code). Before we do that, could we have an estimate of how much memory it actually frees up, especially since the zImage compression should ensure that zero initialized PROGBITS .data does not take very much additional space in the first place.
Signature · 7 lines
Ard. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 128 lines · Ard Biesheuvel
Quoted 88 lines · yalin wang
This attribute can make init data to be into .initbss section, this will make the data to be
NO_BITSin vmlinux, can shrink the Image file size, and speed up the boot up time.Signed-off-by yalin wang <[email protected]>---
arch/arm/kernel/vmlinux.lds.S | 2 +- arch/arm/mm/init.c | 1 + include/asm-generic/sections.h | 1 + include/asm-generic/vmlinux.lds.h | 11 ++++++++++- include/linux/init.h | 1 + include/linux/mm.h | 4 +++- 6 files changed, 17 insertions(+), 3 deletions(-)arch/arm/kernel/vmlinux.lds.S +1
-1@@ -330,7 +330,7 @@ SECTIONS } #endif - BSS_SECTION(0, 0, 0) + BSS_SECTION(0, 0, 0, 0) _end = .; STABS_DEBUGarch/arm/mm/init.c +1
-0@@ -722,6 +722,7 @@ void free_initmem(void)free_tcmmem ();poison_init_mem (__init_begin, __init_end - __init_begin); +poison_init_mem (__initbss_start, __initbss_start - __initbss_end);if (!machine_is_integrator () && !machine_is_cintegrator ())free_initmem_default (-1 ); }include/asm-generic/sections.h +1
-0@@ -29,6 +29,7 @@ extern char _text[], _stext[], _etext[];extern char _data[], _sdata[], _edata[];extern char __bss_start[], __bss_stop[];extern char __init_begin[], __init_end[]; +extern char __initbss_start[], __initbss_end[];extern char _sinittext[], _einittext[];extern char _end[];extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[];include/asm-generic/vmlinux.lds.h +10
-1@@ -574,6 +574,14 @@ *(COMMON) \ } +#define INITBSS (initbss_align) \ + . = ALIGN(initbss_align); \ + .initbss : AT(ADDR(.initbss) - LOAD_OFFSET) { \ + VMLINUX_SYMBOL(__initbss_start) = .; \ + *(.bss.init.data) \ + VMLINUX_SYMBOL(__initbss_end) = .; \ + } +/* * DWARF debug sections. * Symbols in the DWARF debugging sections are relative to @@ -831,10 +839,11 @@ INIT_RAM_FS \ } -#define BSS_SECTION (sbss_align, bss_align, stop_align) \ +#define BSS_SECTION (sbss_align, bss_align, initbss_align, stop_align) \ . = ALIGN(sbss_align); \ VMLINUX_SYMBOL(__bss_start) = .; \ SBSS(sbss_align) \ BSS(bss_align) \ + INITBSS(initbss_align) \ . = ALIGN(stop_align); \ VMLINUX_SYMBOL(__bss_stop) = .;include/linux/init.h +0
-0include/linux/init.h line 44
Quoted 4 lines
include/linux/init.h +1
-0@@ -41,6 +41,7 @@discard it in modules) */ #define __init __section(.init.text) __cold notrace#define __initdata __section(.init.data) +#define __initbss __section(.bss.init.data)Shouldn't this be .init.bss ?
Quoted 16 lines
include/linux/init.h +0
-0#define __initconst __constsection(.init.rodata)#define __exitdata __section(.exit.data)#define __exit_call __used __section(.exitcall.exit)include/linux/mm.h +1
-0@@ -21,6 +21,7 @@#include <linux/resource.h> #include <linux/page_ext.h> #include <linux/err.h> +#include <asm/sections.h> struct mempolicy ;struct anon_vma ;include/linux/mm.h static inline void mark_page_reserved(struct page *page) · line 1730
Quoted 9 lines
include/linux/mm.h +2
-1@@ -1722,10 +1723,11 @@ static inline void mark_page_reserved(struct page *page)*/ static inline unsigned long free_initmem_default (int poison) { -extern char __init_begin[], __init_end[];return free_reserved_area (&__init_begin, &__init_end, poison,"unused kernel" ); +return free_reserved_area (&__initbss_start, &__initbss_end, + poison,"unused kernel" );You obviously have not tested this code, since the first return makes the second unreachable.
Quoted 9 lines
So you will need to put
__initbssannotations all over the tree to actually populate and then free this section (after you have fixed your code). Before we do that, could we have an estimate of how much memory it actually frees up, especially since the zImage compression should ensure that zero initialized PROGBITS .data does not take very much additional space in the first place.Signature · 1 line
Ard.
yeah, I just compile it , not test it . because i need replace lots of __initdata variable to __initbss first . i don’t think zImage compression can shrink zero data in .data section ,
in current __initdata implementation , the zero initialized data are mixed with non-zero data, for example:
int a = 20 __initdata;
int b __initdata; // zero initialized data
int c = 30 __initdata;
so the zero data are not in a contineous memory area, compress will not benefit from this scenario, and on some platforms like arm64 , don’t compress compress zImage ,
i will make a test in some time later, and send out the result to see if this method is better .
Thanks
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Arnd Bergmann
maintainerQuoted 5 lines · On Monday 12 October 2015 11:59:16 yalin wang wrote:
This attribute can make init data to be into .initbss section, this will make the data to be
NO_BITSin vmlinux, can shrink the Image file size, and speed up the boot up time.Signed-off-by yalin wang <[email protected]>
Do you have an estimate of how much it gains?
In multi_v7_defconfig, I see a total of 3367 symbols with 406016 bytes init.data, but only 348 bytes of those are in zero-initialized symbols.
Arnd
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
include/asm-generic/vmlinux.lds.h line 842
Quoted 5 lines
include/asm-generic/vmlinux.lds.h +1
-1-#define BSS_SECTION (sbss_align, bss_align, stop_align) \ +#define BSS_SECTION (sbss_align, bss_align, initbss_align, stop_align) \
A few comments:
1) - please align the backslash at the end of the
line with the backslash above it.
2) - you need to fix all the remaining users of BSS_SECTION.
3) - do we really need the flexibility to specify an alignment (stop_align)? If not - drop the extra argument.
Sam
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 11 lines · Sam Ravnborg
include/asm-generic/vmlinux.lds.h
Quoted 6 lines
include/asm-generic/vmlinux.lds.h +1
-1-#define BSS_SECTION (sbss_align, bss_align, stop_align) \ +#define BSS_SECTION (sbss_align, bss_align, initbss_align, stop_align) \A few comments:
Quoted 7 lines
1) - please align the backslash at the end of the
line with the backslash above it.
2) - you need to fix all the remaining users ofBSS_SECTION.
3) - do we really need the flexibility to specify an alignment (stop_align)? If not - drop the extra argument.Sam
i change lots of __initdata to __initbss to test it on ARM arch,
arch/alpha/kernel/smc37c669.c +2 -2
@@ -983,7 +983,7 @@ static SMC37c669_CONFIG_REGS *SMC37c669 __initdata = NULL;** and standard ISA IRQs. ** */ -static SMC37c669_IRQ_TRANSLATION_ENTRY *SMC37c669_irq_table__initdata ; +static SMC37c669_IRQ_TRANSLATION_ENTRY *SMC37c669_irq_table __initbss;/* ** The following definition is for the default IRQ
@@ -1032,7 +1032,7 @@ static SMC37c669_IRQ_TRANSLATION_ENTRY *SMC37c669_irq_tables[] __initdata =** ISA DMA channels. ** */ -static SMC37c669_DRQ_TRANSLATION_ENTRY *SMC37c669_drq_table__initdata ; +static SMC37c669_DRQ_TRANSLATION_ENTRY *SMC37c669_drq_table __initbss;/* ** The following definition is the default DRQ
arch/arm/kernel/setup.c +3 -3
@@ -90,7 +90,7 @@ EXPORT_SYMBOL(__machine_arch_type);unsigned int cacheid__read_mostly ;EXPORT_SYMBOL (cacheid); -unsigned int __atags_pointer__initdata ; +unsigned int __atags_pointer __initbss;unsigned int system_rev;EXPORT_SYMBOL (system_rev);
@@ -152,7 +152,7 @@ EXPORT_SYMBOL(elf_platform);static const char *cpu_name;static const char *machine_name;static char __initdata cmd_line[COMMAND_LINE_SIZE ]; -const struct machine_desc *machine_desc__initdata ; +const struct machine_desc *machine_desc __initbss;static union {char c[4 ];unsigned long l; } endian_test__initdata = { {'l' ,'?' ,'?' ,'b' } };#define ENDIANNESS ((char)endian_test.l)
@@ -739,7 +739,7 @@ int __init arm_add_memory(u64 start, u64 size)static int __init early_mem (char *p) { -static int usermem__initdata =0 ; + static int usermem __initbss;u64 size;u64 start;char *endp;
arch/arm/mach-davinci/devices-da8xx.c +2 -2
@@ -829,8 +829,8 @@ static struct platform_device da8xx_dsp = {#if IS_ENABLED (CONFIG_DA8XX_REMOTEPROC ) -static phys_addr_t rproc_base__initdata ; -static unsigned long rproc_size__initdata ; +static phys_addr_t rproc_base __initbss; +static unsigned long rproc_size __initbss;static int __init early_rproc_mem (char *p) {
arch/arm/mach-exynos/s5p-dev-mfc.c +1 -1
@@ -34,7 +34,7 @@ struct s5p_mfc_reserved_mem {struct device *dev; }; -static struct s5p_mfc_reserved_mem s5p_mfc_mem[2 ]__initdata ; +static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initbss; static void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize,
arch/arm/mach-imx/devices/platform-ipu-core.c +1 -1
@@ -28,7 +28,7 @@ const struct imx_ipu_core_data imx35_ipu_core_data __initconst =imx_ipu_core_entry_single (MX35 );#endif -static struct platform_device *imx_ipu_coredev__initdata ; +static struct platform_device *imx_ipu_coredev __initbss;struct platform_device *__init imx_add_ipu_core (const struct imx_ipu_core_data *data)
arch/arm/mach-imx/mach-imx27_visstrim_m10.c +1 -1
@@ -239,7 +239,7 @@ static struct mx2_camera_platform_data visstrim_camera = { .clk = 100000, }; -static phys_addr_t mx2_camera_base__initdata ; +static phys_addr_t mx2_camera_base __initbss;#define MX2_CAMERA_BUF_SIZE SZ_8Mstatic void __init visstrim_analog_camera_init (void )
arch/arm/mach-imx/mach-mx27_3ds.c +1 -1
@@ -245,7 +245,7 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .phy_mode = FSL_USB2_PHY_ULPI, }; -static bool otg_mode_host__initdata ; +static bool otg_mode_host __initbss;static int __init mx27_3ds_otg_mode (char *options) {
arch/arm/mach-imx/mach-mx31_3ds.c +2 -2
@@ -164,7 +164,7 @@ static int mx31_3ds_pins[] = {/* * Camera support */ -static phys_addr_t mx3_camera_base__initdata ; +static phys_addr_t mx3_camera_base __initbss;#define MX31_3DS_CAMERA_BUF_SIZE SZ_8M#define MX31_3DS_GPIO_CAMERA_PW IOMUX_TO_GPIO(MX31_PIN_CSI_D5)
@@ -665,7 +665,7 @@ static const struct fsl_usb2_platform_data usbotg_pdata __initconst = { .phy_mode = FSL_USB2_PHY_ULPI, }; -static bool otg_mode_host__initdata ; +static bool otg_mode_host __initbss;static int __init mx31_3ds_otg_mode (char *options) {
arch/arm/mach-imx/mach-mx31moboard.c +1 -1
@@ -470,7 +470,7 @@ static struct mx3_camera_pdata camera_pdata __initdata = { .mclk_10khz = 4800, }; -static phys_addr_t mx3_camera_base__initdata ; +static phys_addr_t mx3_camera_base __initbss;#define MX3_CAMERA_BUF_SIZE SZ_4Mstatic int __init mx31moboard_init_cam (void )
arch/arm/mach-imx/mach-mx35_3ds.c +2 -2
@@ -255,7 +255,7 @@ static const iomux_v3_cfg_t mx35pdk_pads[] __initconst = {/* * Camera support */ -static phys_addr_t mx3_camera_base__initdata ; +static phys_addr_t mx3_camera_base __initbss;#define MX35_3DS_CAMERA_BUF_SIZE SZ_8Mstatic const struct mx3_camera_pdata mx35_3ds_camera_pdata__initconst = {
@@ -531,7 +531,7 @@ static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { .portsc = MXC_EHCI_MODE_SERIAL, }; -static bool otg_mode_host__initdata ; +static bool otg_mode_host __initbss;static int __init mx35_3ds_otg_mode (char *options) {
arch/arm/mach-imx/mach-pca100.c +1 -1
@@ -297,7 +297,7 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .phy_mode = FSL_USB2_PHY_ULPI, }; -static bool otg_mode_host__initdata ; +static bool otg_mode_host __initbss;static int __init pca100_otg_mode (char *options) {
arch/arm/mach-imx/mach-pcm037.c +2 -2
@@ -408,7 +408,7 @@ struct mx3_camera_pdata camera_pdata __initdata = { .mclk_10khz = 2000, }; -static phys_addr_t mx3_camera_base__initdata ; +static phys_addr_t mx3_camera_base __initbss;#define MX3_CAMERA_BUF_SIZE SZ_4Mstatic int __init pcm037_init_camera (void )
@@ -551,7 +551,7 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .phy_mode = FSL_USB2_PHY_ULPI, }; -static bool otg_mode_host__initdata ; +static bool otg_mode_host __initbss;static int __init pcm037_otg_mode (char *options) {
arch/arm/mach-imx/mach-pcm043.c +1 -1
@@ -326,7 +326,7 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .phy_mode = FSL_USB2_PHY_UTMI, }; -static bool otg_mode_host__initdata ; +static bool otg_mode_host __initbss;static int __init pcm043_otg_mode (char *options) {
arch/arm/mach-omap2/serial.c +1 -1
@@ -103,7 +103,7 @@ static void omap_uart_enable_wakeup(struct device *dev, bool enable)#define OMAP_UART_DEFAULT_PAD_NAME_LEN 28static char rx_pad_name[OMAP_UART_DEFAULT_PAD_NAME_LEN ], - tx_pad_name[OMAP_UART_DEFAULT_PAD_NAME_LEN ]__initdata ; + tx_pad_name[OMAP_UART_DEFAULT_PAD_NAME_LEN] __initbss; static void __init omap_serial_fill_uart_tx_rx_pads(struct omap_board_data *bdata,
arch/arm/mach-omap2/timer.c +1 -1
@@ -356,7 +356,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,/* Clocksource code */ static struct omap_dm_timer clksrc; -static bool use_gptimer_clksrc__initdata ; +static bool use_gptimer_clksrc __initbss;/* * clocksource
arch/arm/mach-orion5x/pci.c +1 -1
@@ -526,7 +526,7 @@ static void rc_pci_fixup(struct pci_dev *dev) }DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL ,PCI_ANY_ID , rc_pci_fixup); -static int orion5x_pci_disabled__initdata ; +static int orion5x_pci_disabled __initbss;void __init orion5x_pci_disable (void ) {
arch/arm/mach-sa1100/badge4.c +1 -1
@@ -161,7 +161,7 @@ static struct flash_platform_data badge4_flash_data = {static struct resource badge4_flash_resource =DEFINE_RES_MEM (SA1100_CS0_PHYS ,SZ_64M ); -static int five_v_on__initdata =0 ; +static int five_v_on __initbss;static int __init five_v_on_setup (char *ignore) {
arch/arm/mach-shmobile/pm-rmobile.c +2 -2
@@ -170,9 +170,9 @@ enum pd_types {static struct special_pd {struct device_node *pd;enum pd_types type; -} special_pds[MAX_NUM_SPECIAL_PDS ]__initdata ; +} special_pds[MAX_NUM_SPECIAL_PDS] __initbss; -static unsigned int num_special_pds__initdata ; +static unsigned int num_special_pds __initbss;static const struct of_device_id special_ids[]__initconst = { { .compatible ="arm,coresight-etm3x" , .data = (void *)PD_DEBUG },
arch/arm/mm/dma-mapping.c +2 -2
@@ -400,9 +400,9 @@ struct dma_contig_early_reserve {unsigned long size; }; -static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS ]__initdata ; +static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS] __initbss; -static int dma_mmu_remap_num__initdata ; +static int dma_mmu_remap_num __initbss;void __init dma_contiguous_early_fixup (phys_addr_t base,unsigned long size) {
arch/arm/mm/init.c +2 -2
@@ -46,8 +46,8 @@ unsigned long __init __clear_cr(unsigned long mask) }#endif -static phys_addr_t phys_initrd_start__initdata =0 ; -static unsigned long phys_initrd_size__initdata =0 ; +static phys_addr_t phys_initrd_start __initbss; +static unsigned long phys_initrd_size __initbss;static int __init early_initrd (char *p) {
arch/arm/mm/mmu.c +4 -4
@@ -62,7 +62,7 @@ pmdval_t user_pmd_table = _PAGE_USER_TABLE;#define CPOLICY_WRITEALLOC 4static unsigned int cachepolicy__initdata =CPOLICY_WRITEBACK ; -static unsigned int ecc_mask__initdata =0 ; +static unsigned int ecc_mask __initbss;pgprot_t pgprot_user;pgprot_t pgprot_kernel;pgprot_t pgprot_hyp_device;
@@ -121,7 +121,7 @@ static struct cachepolicy cache_policies[] __initdata = { };#ifdef CONFIG_CPU_CP15 -static unsigned long initial_pmd_value__initdata =0 ; +static unsigned long initial_pmd_value __initbss;/* * Initialise the cache_policy variable with the initial state specified
@@ -360,7 +360,7 @@ EXPORT_SYMBOL(get_mem_type);static pte_t *(*pte_offset_fixmap)(pmd_t *dir,unsigned long addr);static pte_t bm_pte[PTRS_PER_PTE +PTE_HWTABLE_PTRS ] -__aligned(PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE) __initdata ; + __aligned(PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE) __initbss;static pte_t *__init pte_offset_early_fixmap (pmd_t *dir,unsigned long addr) {
@@ -1105,7 +1105,7 @@ static int __init early_vmalloc(char *arg) }early_param ("vmalloc" , early_vmalloc); -phys_addr_t arm_lowmem_limit__initdata =0 ; +phys_addr_t arm_lowmem_limit __initbss;void __init sanity_check_meminfo (void ) {
arch/arm/plat-samsung/init.c +1 -1
@@ -91,7 +91,7 @@ void __init s3c24xx_init_clocks(int xtal)/* uart management */ #if IS_ENABLED (CONFIG_SAMSUNG_ATAGS ) -static int nr_uarts__initdata =0 ; +static int nr_uarts __initbss;#ifdef CONFIG_SERIAL_SAMSUNG_UARTS static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS ];
arch/arm/xen/enlighten.c +1 -1
@@ -43,7 +43,7 @@ static struct vcpu_info __percpu *xen_vcpu_info;/* These are unused until we support booting "pre-ballooned" */ unsigned long xen_released_pages; -struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS ]__initdata ; +struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initbss;static __read_mostly unsigned int xen_events_irq;
arch/arm64/kernel/acpi.c +2 -2
@@ -41,8 +41,8 @@ EXPORT_SYMBOL(acpi_disabled);int acpi_pci_disabled =1 ;/* skip ACPI PCI scan and IRQ initialization */ EXPORT_SYMBOL (acpi_pci_disabled); -static bool param_acpi_off__initdata ; -static bool param_acpi_force__initdata ; +static bool param_acpi_off __initbss; +static bool param_acpi_force __initbss;static int __init parse_acpi (char *arg) {
arch/arm64/kernel/efi.c +1 -1
@@ -50,7 +50,7 @@ static struct mm_struct efi_mm = { .mmlist = LIST_HEAD_INIT(efi_mm.mmlist), }; -static int uefi_debug__initdata ; +static int uefi_debug __initbss;static int __init uefi_debug_setup (char *str) { uefi_debug =1 ;
arch/arm64/kernel/setup.c +1 -1
@@ -81,7 +81,7 @@ unsigned int compat_elf_hwcap2 __read_mostly;DECLARE_BITMAP (cpu_hwcaps,ARM64_NCAPS ); -phys_addr_t __fdt_pointer__initdata ; +phys_addr_t __fdt_pointer __initbss;/* * Standard memory resources
arch/arm64/kernel/smp.c +1 -1
@@ -387,7 +387,7 @@ static int __init smp_cpu_setup(int cpu)return 0 ; } -static bool bootcpu_valid__initdata ; +static bool bootcpu_valid __initbss;static unsigned int cpu_count =1 ;#ifdef CONFIG_ACPI
arch/arm64/kernel/topology.c +1 -1
@@ -99,7 +99,7 @@ static int __init parse_cluster(struct device_node *cluster, int depth)bool leaf = true;bool has_cores = false;struct device_node *c; -static int cluster_id__initdata ; + static int cluster_id __initbss;int core_id =0 ;int i, ret;
arch/arm64/mm/init.c +1 -1
@@ -358,7 +358,7 @@ void free_initmem(void)#ifdef CONFIG_BLK_DEV_INITRD -static int keep_initrd__initdata ; +static int keep_initrd __initbss;void __init free_initrd_mem (unsigned long start,unsigned long end) {
arch/avr32/boards/atngw100/setup.c +1 -1
@@ -104,7 +104,7 @@ static struct atmel_nand_data atngw100mkii_nand_data __initdata = {#endif /* Initialized by bootloader-specific startup code. */ -struct tag *bootloader_tags__initdata ; +struct tag *bootloader_tags __initbss;struct eth_addr {u8 addr[6 ];
arch/avr32/boards/atstk1000/setup.c +1 -1
@@ -25,7 +25,7 @@#include "atstk1000.h" /* Initialized by bootloader-specific startup code. */ -struct tag *bootloader_tags__initdata ; +struct tag *bootloader_tags __initbss;static struct fb_videomode __initdata ltv350qv_modes[] = { {
arch/avr32/boards/favr-32/setup.c +1 -1
@@ -46,7 +46,7 @@ unsigned long at32_board_osc_rates[3] = { };/* Initialized by bootloader-specific startup code. */ -struct tag *bootloader_tags__initdata ; +struct tag *bootloader_tags __initbss;static struct atmel_abdac_pdata __initdata abdac0_data = { };
arch/avr32/boards/hammerhead/setup.c +1 -1
@@ -42,7 +42,7 @@ unsigned long at32_board_osc_rates[3] = { };/* Initialized by bootloader-specific startup code. */ -struct tag *bootloader_tags__initdata ; +struct tag *bootloader_tags __initbss;#ifdef CONFIG_BOARD_HAMMERHEAD_LCD static struct fb_videomode __initdata hda350tlv_modes[] = {
arch/avr32/boards/merisc/setup.c +1 -1
@@ -40,7 +40,7 @@static int merisc_board_id;/* Initialized by bootloader-specific startup code. */ -struct tag *bootloader_tags__initdata ; +struct tag *bootloader_tags __initbss;/* Oscillator frequencies. These are board specific */ unsigned long at32_board_osc_rates[3 ] = {
arch/avr32/boards/mimc200/setup.c +1 -1
@@ -41,7 +41,7 @@ unsigned long at32_board_osc_rates[3] = { };/* Initialized by bootloader-specific startup code. */ -struct tag *bootloader_tags__initdata ; +struct tag *bootloader_tags __initbss;static struct fb_videomode __initdata pt0434827_modes[] = { {
arch/blackfin/kernel/setup.c +5 -5
@@ -74,17 +74,17 @@ static struct bfin_memmap {unsigned long long size;unsigned long type; } map[BFIN_MEMMAP_MAX ]; -} bfin_memmap__initdata ; +}bfin_memmap __initbss;/* for memmap sanitization */ struct change_member {struct bfin_memmap_entry *pentry;/* pointer to original entry */ unsigned long long addr;/* address for this change point */ }; -static struct change_member change_point_list[2 *BFIN_MEMMAP_MAX ]__initdata ; -static struct change_member *change_point[2 *BFIN_MEMMAP_MAX ]__initdata ; -static struct bfin_memmap_entry *overlap_list[BFIN_MEMMAP_MAX ]__initdata ; -static struct bfin_memmap_entry new_map[BFIN_MEMMAP_MAX ]__initdata ; +static struct change_member change_point_list[2*BFIN_MEMMAP_MAX] __initbss; +static struct change_member *change_point[2*BFIN_MEMMAP_MAX] __initbss; +static struct bfin_memmap_entry *overlap_list[BFIN_MEMMAP_MAX] __initbss; +static struct bfin_memmap_entry new_map[BFIN_MEMMAP_MAX] __initbss; DEFINE_PER_CPU(struct blackfin_cpudata, cpu_data);
arch/c6x/kernel/setup.c +4 -4
@@ -69,8 +69,8 @@ unsigned long ram_start;unsigned long ram_end;/* Uncached memory for DMA consistent use (memdma=) */ -static unsigned long dma_start__initdata ; -static unsigned long dma_size__initdata ; +static unsigned long dma_start __initbss; +static unsigned long dma_size __initbss;struct cpuinfo_c6x {const char *cpu_name;
@@ -214,7 +214,7 @@ static void __init get_cpuinfo(void)/* * Early parsing of the command line */ -static u32 mem_size__initdata ; +static u32 mem_size __initbss;/* "mem=" parsing. */ static int __init early_mem (char *p)
@@ -247,7 +247,7 @@ early_param("memdma", early_memdma);int __init c6x_add_memory (phys_addr_t start,unsigned long size) { -static int ram_found__initdata ; + static int ram_found __initbss;/* We only handle one bank (the one with PAGE_OFFSET) for now */ if (ram_found)
arch/ia64/kernel/acpi.c +2 -2
@@ -172,8 +172,8 @@ void __init __acpi_unmap_table(char *map, unsigned long size)Boot-time Table Parsing -------------------------------------------------------------------------- */ -static int available_cpus__initdata ; -struct acpi_table_madt *acpi_madt__initdata ; +static int available_cpus __initbss; +struct acpi_table_madt *acpi_madt __initbss;static u8 has_8259; static int __init
arch/ia64/kernel/mca.c +1 -1
@@ -167,7 +167,7 @@ static int cpe_poll_enabled = 1;extern void salinfo_log_wakeup (int type,u8 *buffer,u64 size,int irqsafe); -static int mca_init__initdata ; +static int mca_init __initbss;/* * limited & delayed printing support for MCA/INIT handler
arch/ia64/kernel/setup.c +2 -2
@@ -130,8 +130,8 @@ EXPORT_SYMBOL(ia64_max_iommu_merge_mask);/* * We use a special marker for the end of memory and it uses the extra (+1) slot */ -struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS +1 ]__initdata ; -int num_rsvd_regions__initdata ; +struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1] __initbss; +int num_rsvd_regions __initbss;/*
arch/ia64/kernel/smpboot.c +1 -1
@@ -128,7 +128,7 @@ EXPORT_SYMBOL(ia64_cpu_to_sapicid);static cpumask_t cpu_callin_map; -struct smp_boot_data smp_boot_data__initdata ; +struct smp_boot_data smp_boot_data __initbss;unsigned long ap_wakeup_vector =-1 ;/* External Int use to wakeup APs */
arch/ia64/mm/discontig.c +2 -2
@@ -44,8 +44,8 @@ struct early_node_data {unsigned long max_pfn; }; -static struct early_node_data mem_data[MAX_NUMNODES ]__initdata ; -static nodemask_t memory_less_mask__initdata ; +static struct early_node_data mem_data[MAX_NUMNODES] __initbss; +static nodemask_t memory_less_mask __initbss;pg_data_t *pgdat_list[MAX_NUMNODES ];
arch/ia64/mm/init.c +1 -1
@@ -591,7 +591,7 @@ find_max_min_low_pfn (u64 start, u64 end, void *arg)* purposes. */ -static int nolwsys__initdata ; +static int nolwsys __initbss;static int __init nolwsys_setup (char *s)
arch/m32r/kernel/setup.c +1 -1
@@ -377,7 +377,7 @@ const struct seq_operations cpuinfo_op = { };#endif /* CONFIG_PROC_FS */ -unsigned long cpu_initialized__initdata =0 ; +unsigned long cpu_initialized __initbss;/* * cpu_init() initializes state that is per-CPU. Some data is already
arch/m68k/kernel/bootinfo_proc.c +1 -1
@@ -13,7 +13,7 @@#include <asm/byteorder.h> -static char bootinfo_tmp[1536 ]__initdata ; +static char bootinfo_tmp[1536] __initbss;static void *bootinfo_copy;static size_t bootinfo_size;
arch/m68k/kernel/setup_mm.c +2 -2
@@ -75,9 +75,9 @@ unsigned long m68k_memoffset;struct m68k_mem_info m68k_memory[NUM_MEMINFO ];EXPORT_SYMBOL (m68k_memory); -static struct m68k_mem_info m68k_ramdisk__initdata ; +static struct m68k_mem_info m68k_ramdisk __initbss; -static char m68k_command_line[CL_SIZE ]__initdata ; +static char m68k_command_line[CL_SIZE] __initbss;void (*mach_sched_init) (irq_handler_t handler)__initdata =NULL ;/* machine dependent irq functions */
arch/metag/kernel/setup.c +1 -1
@@ -110,7 +110,7 @@ extern char _heap_start[];extern struct console dash_console;#endif -const struct machine_desc *machine_desc__initdata ; +const struct machine_desc *machine_desc __initbss;/* * Map a Linux CPU number to a hardware thread ID
arch/mips/ar7/platform.c +1 -1
@@ -563,7 +563,7 @@ static struct platform_device ar7_wdt = {static int __init ar7_register_uarts (void ) {#ifdef CONFIG_SERIAL_8250 -static struct uart_port uart_port__initdata ; + static struct uart_port uart_port __initbss;struct clk *bus_clk;int res;
arch/mips/ath79/pci.c +2 -2
@@ -22,8 +22,8 @@#include "pci.h" static int (*ath79_pci_plat_dev_init)(struct pci_dev *dev); -static const struct ath79_pci_irq *ath79_pci_irq_map__initdata ; -static unsigned ath79_pci_nr_irqs__initdata ; +static const struct ath79_pci_irq *ath79_pci_irq_map __initbss; +static unsigned ath79_pci_nr_irqs __initbss;static const struct ath79_pci_irq ar71xx_pci_irq_map[]__initconst = { {
arch/mips/bcm47xx/prom.c +1 -1
@@ -50,7 +50,7 @@ __init void bcm47xx_set_system_type(u16 chip_id) chip_id); } -static unsigned long lowmem__initdata ; +static unsigned long lowmem __initbss;static __init void prom_init_mem (void ) {
arch/mips/kernel/mips_machine.c +1 -1
@@ -13,7 +13,7 @@#include <asm/mips_machine.h> #include <asm/prom.h> -static struct mips_machine *mips_machine__initdata ; +static struct mips_machine *mips_machine __initbss;#define for_each_machine (mach) \ for ((mach) = (struct mips_machine *)&__mips_machines_start; \
arch/mips/kernel/pm-cps.c +2 -2
@@ -70,8 +70,8 @@ static DEFINE_PER_CPU_ALIGNED(atomic_t, pm_barrier); DEFINE_PER_CPU_ALIGNED(struct mips_static_suspend_state, cps_cpu_state);/* A somewhat arbitrary number of labels & relocs for uasm */ -static struct uasm_label labels[32 ]__initdata ; -static struct uasm_reloc relocs[32 ]__initdata ; +static struct uasm_label labels[32] __initbss; +static struct uasm_reloc relocs[32] __initbss;/* CPU dependant sync types */ static unsigned stype_intervention;
arch/mips/kernel/setup.c +1 -1
@@ -496,7 +496,7 @@ static void __init bootmem_init(void)* initialization hook for anything else was introduced. */ -static int usermem__initdata ; +static int usermem __initbss;static int __init early_parse_mem (char *p) {
arch/mips/lasat/serial.c +1 -1
@@ -26,7 +26,7 @@#include <asm/lasat/lasat.h> #include <asm/lasat/serial.h> -static struct resource lasat_serial_res[2 ]__initdata ; +static struct resource lasat_serial_res[2] __initbss;static struct plat_serial8250_port lasat_serial8250_port[] = { {
arch/mips/mti-malta/malta-dtshim.c +1 -1
@@ -17,7 +17,7 @@#include <asm/fw/fw.h> #include <asm/page.h> -static unsigned char fdt_buf[16 <<10 ]__initdata ; +static unsigned char fdt_buf[16 << 10] __initbss;/* determined physical memory size, not overridden by command line args */ extern unsigned long physical_memsize;
arch/mips/pci/pci.c +1 -1
@@ -346,7 +346,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, vma->vm_end - vma->vm_start, vma->vm_page_prot); } -char * (*pcibios_plat_setup)(char *str)__initdata ; +char * (*pcibios_plat_setup)(char *str) __initbss;char *__init pcibios_setup (char *str) {
arch/mips/rb532/prom.c +1 -1
@@ -69,7 +69,7 @@ static inline unsigned long tag2ul(char *arg, const char *tag)void __init prom_setup_cmdline (void ) { -static char cmd_line[COMMAND_LINE_SIZE ]__initdata ; + static char cmd_line[COMMAND_LINE_SIZE] __initbss;char *cp, *board;int prom_argc;char **prom_argv;
arch/mips/sgi-ip22/ip22-eisa.c +1 -1
@@ -50,7 +50,7 @@static char __init *decode_eisa_sig (unsigned long addr) { -static char sig_str[EISA_SIG_LEN ]__initdata ; + static char sig_str[EISA_SIG_LEN] __initbss;u8 sig[4 ];u16 rev;int i;
arch/mips/sgi-ip22/ip22-setup.c +1 -1
@@ -64,7 +64,7 @@ void __init plat_mem_setup(void) cserial =ArcGetEnvironmentVariable ("ConsoleOut" );if ((ctype && *ctype =='d' ) || (cserial && *cserial =='s' )) { -static char options[8 ]__initdata ; + static char options[8] __initbss;char *baud =ArcGetEnvironmentVariable ("dbaud" );if (baud)strcpy (options, baud);
arch/mips/sgi-ip32/ip32-setup.c +1 -1
@@ -90,7 +90,7 @@ void __init plat_mem_setup(void) {char * con =ArcGetEnvironmentVariable ("console" );if (con && *con =='d' ) { -static char options[8 ]__initdata ; + static char options[8] __initbss;char *baud =ArcGetEnvironmentVariable ("dbaud" );if (baud)strcpy (options, baud);
arch/mips/sni/setup.c +1 -1
@@ -62,7 +62,7 @@ static void __init sni_console_setup(void)char *cdev;char *baud;int port; -static char options[8 ]__initdata ; + static char options[8] __initbss; cdev =prom_getenv ("console_dev" );if (strncmp (cdev,"tty" ,3 ) ==0 ) {
arch/mips/txx9/generic/pci.c +2 -2
@@ -102,7 +102,7 @@ struct pci_controller txx9_primary_pcic = {#ifdef CONFIG_64BIT int txx9_pci_mem_high__initdata =1 ;#else -int txx9_pci_mem_high__initdata ; +int txx9_pci_mem_high __initbss;#endif /*
@@ -397,7 +397,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)return txx9_board_vec->pci_map_irq (dev, slot, pin); } -char * (*txx9_board_pcibios_setup)(char *str)__initdata ; +char * (*txx9_board_pcibios_setup)(char *str) __initbss;char *__init txx9_pcibios_setup (char *str) {
arch/mips/txx9/generic/setup.c +5 -5
@@ -78,7 +78,7 @@ unsigned int txx9_gbus_clock;#ifdef CONFIG_CPU_TX39XX /* don't enable by default - see errata */ -int txx9_ccfg_toeon__initdata ; +int txx9_ccfg_toeon __initbss;#else int txx9_ccfg_toeon__initdata =1 ;#endif
@@ -121,7 +121,7 @@ EXPORT_SYMBOL(clk_put);#include <asm/txx9/boards.h> #undef BOARD_VEC -struct txx9_board_vec *txx9_board_vec__initdata ; +struct txx9_board_vec *txx9_board_vec __initbss;static char txx9_system_type[32 ];static struct txx9_board_vec *board_vecs[]__initdata = {
@@ -175,8 +175,8 @@ static void __init prom_init_cmdline(void) } } -static int txx9_ic_disable__initdata ; -static int txx9_dc_disable__initdata ; +static int txx9_ic_disable __initbss; +static int txx9_dc_disable __initbss;#if defined(CONFIG_CPU_TX49XX )/* flush all cache on very early stage (before 4k_cache_init) */
@@ -281,7 +281,7 @@ static inline void txx9_cache_fixup(void)static void __init preprocess_cmdline (void ) { -static char cmdline[COMMAND_LINE_SIZE ]__initdata ; + static char cmdline[COMMAND_LINE_SIZE] __initbss;char *s;strcpy (cmdline, arcs_cmdline);
arch/openrisc/mm/ioremap.c +1 -1
@@ -27,7 +27,7 @@extern int mem_init_done; -static unsigned int fixmaps_used__initdata ; +static unsigned int fixmaps_used __initbss;/* * Remap an arbitrary physical address space into the kernel virtual
arch/parisc/mm/init.c +1 -1
@@ -382,7 +382,7 @@ static void __init setup_bootmem(void)static int __init parisc_text_address (unsigned long vaddr) { -static unsigned long head_ptr__initdata ; +static unsigned long head_ptr __initbss;if (!head_ptr) head_ptr = PAGE_MASK & (unsigned long)
arch/powerpc/kernel/prom_init.c +1 -1
@@ -147,7 +147,7 @@ extern void copy_and_flush(unsigned long dest, unsigned long src,/* prom structure */ static struct prom_t __initdata prom; -static unsigned long prom_entry__initdata ; +static unsigned long prom_entry __initbss;#define PROM_SCRATCH_SIZE 256
arch/powerpc/mm/numa.c +1 -1
@@ -43,7 +43,7 @@static int numa_enabled =1 ; -static char *cmdline__initdata ; +static char *cmdline __initbss;static int numa_debug; #define dbg(args...) if (numa_debug) { printk(KERN_INFO args); }
arch/s390/kernel/smp.c +1 -1
@@ -838,7 +838,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)return 0 ; } -static unsigned int setup_possible_cpus__initdata ; +static unsigned int setup_possible_cpus __initbss;static int __init _setup_possible_cpus (char *s) {
arch/sh/drivers/pci/fixups-sdk7786.c +1 -1
@@ -23,7 +23,7 @@* Misconfigurations can be detected through the FPGA via the slot * resistors to determine card presence. Hotplug remains unsupported. */ -static unsigned int slot4en__initdata ; +static unsigned int slot4en __initbss;char *__init pcibios_setup (char *str) {
arch/sparc/kernel/irq_64.c +1 -1
@@ -105,7 +105,7 @@ static void bucket_set_irq(unsigned long bucket_pa, unsigned int irq)#define irq_work_pa (__cpu) &(trap_block[(__cpu)].irq_worklist_pa) -static unsigned long hvirq_major__initdata ; +static unsigned long hvirq_major __initbss;static int __init early_hvirq_major (char *p) {int rc =kstrtoul (p,10 , &hvirq_major);
arch/sparc/kernel/nmi.c +1 -1
@@ -45,7 +45,7 @@ EXPORT_SYMBOL(nmi_active);static unsigned int nmi_hz =HZ ; static DEFINE_PER_CPU(short, wd_enabled); -static int endflag__initdata ; +static int endflag __initbss; static DEFINE_PER_CPU(unsigned int, last_irq_sum); static DEFINE_PER_CPU(long, alert_counter);
arch/sparc/kernel/prom_common.c +1 -1
@@ -142,7 +142,7 @@ static int __init prom_common_nextprop(phandle node, char *prev, char *buf)return handle_nextprop_quirks (buf, name); } -unsigned int prom_early_allocated__initdata ; +unsigned int prom_early_allocated __initbss;static struct of_pdt_ops prom_sparc_ops__initdata = { .nextprop = prom_common_nextprop,
arch/sparc/kernel/setup_32.c +2 -2
@@ -99,11 +99,11 @@ static void prom_sync_me(void)local_irq_restore (flags); } -static unsigned int boot_flags__initdata =0 ; +static unsigned int boot_flags __initbss;#define BOOTME_DEBUG 0x1/* Exported for mm/init.c:paging_init. */ -unsigned long cmdline_memory_size__initdata =0 ; +unsigned long cmdline_memory_size __initbss;/* which CPU booted us (0xff = not set) */ unsigned char boot_cpu_id =0xff ;/* 0xff will make it into DATA section... */
arch/sparc/mm/init_64.c +2 -2
@@ -1363,8 +1363,8 @@ static unsigned long __init bootmem_init(unsigned long phys_base)return end_pfn; } -static struct linux_prom64_registers pall[MAX_BANKS ]__initdata ; -static int pall_ents__initdata ; +static struct linux_prom64_registers pall[MAX_BANKS] __initbss; +static int pall_ents __initbss;static unsigned long max_phys_bits =40 ;
arch/sparc/prom/bootstr_32.c +1 -1
@@ -10,7 +10,7 @@#define BARG_LEN 256static char barg_buf[BARG_LEN ] = {0 }; -static char fetched__initdata =0 ; +static char fetched __initbss;char *__init prom_getbootargs (void )
arch/um/kernel/um_arch.c +1 -1
@@ -113,7 +113,7 @@ unsigned long end_vm;int ncpus =1 ;/* Set in early boot */ -static int have_root__initdata =0 ; +static int have_root __initbss;/* Set in uml_mem_setup and modified in linux_main */ long long physmem_size =32 *1024 *1024 ;
arch/unicore32/kernel/setup.c +1 -1
@@ -224,7 +224,7 @@ request_standard_resources(struct meminfo *mi) } } -static void (*init_machine)(void )__initdata ; +static void (*init_machine)(void) __initbss;static int __init customize_machine (void ) {
arch/x86/kernel/acpi/boot.c +6 -6
@@ -66,11 +66,11 @@ int acpi_ioapic;int acpi_strict;int acpi_disable_cmcff; -u8 acpi_sci_flags__initdata ; -int acpi_sci_override_gsi__initdata ; -int acpi_skip_timer_override__initdata ; -int acpi_use_timer_override__initdata ; -int acpi_fix_pin2_polarity__initdata ; +u8 acpi_sci_flags __initbss; +int acpi_sci_override_gsi __initbss; +int acpi_skip_timer_override __initbss; +int acpi_use_timer_override __initbss; +int acpi_fix_pin2_polarity __initbss;#ifdef CONFIG_X86_LOCAL_APIC static u64 acpi_lapic_addr__initdata =APIC_DEFAULT_PHYS_BASE ;
@@ -806,7 +806,7 @@ static int __init acpi_parse_sbf(struct acpi_table_header *table)#ifdef CONFIG_HPET_TIMER #include <asm/hpet.h> -static struct resource *hpet_res__initdata ; +static struct resource *hpet_res __initbss;static int __init acpi_parse_hpet (struct acpi_table_header *table) {
arch/x86/kernel/aperture_64.c +3 -3
@@ -47,11 +47,11 @@#define GART_MAX_ADDR (1ULL << 32)int gart_iommu_aperture; -int gart_iommu_aperture_disabled__initdata ; -int gart_iommu_aperture_allowed__initdata ; +int gart_iommu_aperture_disabled __initbss; +int gart_iommu_aperture_allowed __initbss;int fallback_aper_order__initdata =1 ;/* 64MB */ -int fallback_aper_force__initdata ; +int fallback_aper_force __initbss;int fix_aperture__initdata =1 ;
arch/x86/kernel/apic/apic.c +3 -3
@@ -132,7 +132,7 @@ static inline void imcr_apic_to_pic(void)* * +1=force-enable */ -static int force_enable_local_apic__initdata ; +static int force_enable_local_apic __initbss;/* * APIC command line parameters
@@ -148,7 +148,7 @@ static int __init parse_lapic(char *arg)early_param ("lapic" , parse_lapic);#ifdef CONFIG_X86_64 -static int apic_calibrate_pmtmr__initdata ; +static int apic_calibrate_pmtmr __initbss;static __init int setup_apicpmtimer (char *s) { apic_calibrate_pmtmr =1 ;
@@ -161,7 +161,7 @@ __setup("apicpmtimer", setup_apicpmtimer);unsigned long mp_lapic_addr;int disable_apic;/* Disable local APIC timer from the kernel commandline or via dmi quirk */ -static int disable_apic_timer__initdata ; +static int disable_apic_timer __initbss;/* Local APIC timer works in C2 */ int local_apic_timer_c2_ok;EXPORT_SYMBOL_GPL (local_apic_timer_c2_ok);
arch/x86/kernel/apic/io_apic.c +2 -2
@@ -1598,7 +1598,7 @@ void __init setup_ioapic_ids_from_mpc(void) }#endif -int no_timer_check__initdata ; +int no_timer_check __initbss;static int __init notimercheck (char *s) {
@@ -2009,7 +2009,7 @@ static inline void __init unlock_ExtINT_logic(void)ioapic_write_entry (apic, pin, entry0); } -static int disable_timer_pin_1__initdata ; +static int disable_timer_pin_1 __initbss;/* Actually the next is obsolete, but keep it for paranoid reasons -AK */ static int __init disable_timer_pin_setup (char *arg) {
arch/x86/kernel/apic/probe_32.c +1 -1
@@ -129,7 +129,7 @@ apic_driver(apic_default);struct apic *apic = &apic_default;EXPORT_SYMBOL_GPL (apic); -static int cmdline_apic__initdata ; +static int cmdline_apic __initbss;static int __init parse_apic (char *arg) {struct apic **drv;
arch/x86/kernel/cpu/mtrr/cleanup.c +1 -1
@@ -449,7 +449,7 @@ static int __init parse_mtrr_chunk_size_opt(char *p)early_param ("mtrr_chunk_size" , parse_mtrr_chunk_size_opt);/* Granularity of mtrr of block: */ -static u64 mtrr_gran_size__initdata ; +static u64 mtrr_gran_size __initbss;static int __init parse_mtrr_gran_size_opt (char *p) {
arch/x86/kernel/e820.c +5 -5
@@ -259,10 +259,10 @@ static int __init cpcompare(const void *a, const void *b)int __init sanitize_e820_map (struct e820entry *biosmap,int max_nr_map,u32 *pnr_map) { -static struct change_member change_point_list[2 *E820_X_MAX ]__initdata ; -static struct change_member *change_point[2 *E820_X_MAX ]__initdata ; -static struct e820entry *overlap_list[E820_X_MAX ]__initdata ; -static struct e820entry new_bios[E820_X_MAX ]__initdata ; + static struct change_member change_point_list[2*E820_X_MAX] __initbss; + static struct change_member *change_point[2*E820_X_MAX] __initbss; + static struct e820entry *overlap_list[E820_X_MAX] __initbss; + static struct e820entry new_bios[E820_X_MAX] __initbss;unsigned long current_type, last_type;unsigned long long last_addr;int chgidx;
@@ -807,7 +807,7 @@ static void early_panic(char *msg)panic (msg); } -static int userdef__initdata ; +static int userdef __initbss;/* "mem=nopentium" disables the 4MB page tables. */ static int __init parse_memopt (char *p)
arch/x86/kernel/fpu/init.c +1 -1
@@ -103,7 +103,7 @@ static void __init fpu__init_system_mxcsr(void)if (cpu_has_fxsr) {/* Static because GCC does not get 16-byte stack alignment right: */ -static struct fxregs_state fxregs__initdata ; + static struct fxregs_state fxregs __initbss; asmvolatile ("fxsave %0" :"+m" (fxregs));
arch/x86/kernel/nmi_selftest.c +1 -1
@@ -25,7 +25,7 @@static int __initdata nmi_fail;/* check to see if NMI IPIs work on this machine */ -static DECLARE_BITMAP(nmi_ipi_mask, NR_CPUS) __initdata; +static DECLARE_BITMAP(nmi_ipi_mask, NR_CPUS) __initbss;static int __initdata testcase_total;static int __initdata testcase_successes;
arch/x86/kernel/pci-calgary_64.c +3 -3
@@ -160,9 +160,9 @@ unsigned int specified_table_size = TCE_TABLE_SIZE_UNSPECIFIED;static int translate_empty_slots__read_mostly =0 ;static int calgary_detected__read_mostly =0 ; -static struct rio_table_hdr *rio_table_hdr__initdata ; -static struct scal_detail *scal_devs[MAX_NUMNODES ]__initdata ; -static struct rio_detail *rio_devs[MAX_NUMNODES *4 ]__initdata ; +static struct rio_table_hdr *rio_table_hdr __initbss; +static struct scal_detail *scal_devs[MAX_NUMNODES] __initbss; +static struct rio_detail *rio_devs[MAX_NUMNODES * 4] __initbss;struct calgary_bus_info {void *tce_space;
arch/x86/mm/numa.c +2 -2
@@ -21,8 +21,8 @@#include "numa_internal.h" int __initdata numa_off; -nodemask_t numa_nodes_parsed__initdata ; -static nodemask_t numa_nodes_empty__initdata ; +nodemask_t numa_nodes_parsed __initbss; +static nodemask_t numa_nodes_empty __initbss;struct pglist_data *node_data[MAX_NUMNODES ]__read_mostly ;EXPORT_SYMBOL (node_data);
arch/x86/mm/numa_emulation.c +3 -3
@@ -11,7 +11,7 @@#include "numa_internal.h" static int emu_nid_to_phys[MAX_NUMNODES ]; -static char *emu_cmdline__initdata ; +static char *emu_cmdline __initbss;void __init numa_emu_cmdline (char *str) {
@@ -309,8 +309,8 @@ static int __init split_nodes_size_interleave(struct numa_meminfo *ei,*/ void __init numa_emulation (struct numa_meminfo *numa_meminfo,int numa_dist_cnt) { -static struct numa_meminfo ei__initdata ; -static struct numa_meminfo pi__initdata ; + static struct numa_meminfo ei __initbss; + static struct numa_meminfo pi __initbss;const u64 max_addr =PFN_PHYS (max_pfn);u8 *phys_dist =NULL ;size_t phys_size = numa_dist_cnt * numa_dist_cnt *sizeof (phys_dist[0 ]);
arch/x86/mm/srat.c +1 -1
@@ -24,7 +24,7 @@#include <asm/apic.h> #include <asm/uv/uv.h> -int acpi_numa__initdata ; +int acpi_numa __initbss;static __init int setup_node (int pxm) {
arch/x86/platform/efi/efi.c +3 -3
@@ -58,8 +58,8 @@struct efi_memory_map memmap; -static struct efi efi_phys__initdata ; -static efi_system_table_t efi_systab__initdata ; +static struct efi efi_phys __initbss; +static efi_system_table_t efi_systab __initbss;static efi_config_table_type_t arch_tables[]__initdata = { #ifdef CONFIG_X86_UV
@@ -70,7 +70,7 @@ static efi_config_table_type_t arch_tables[] __initdata = {u64 efi_setup;/* efi setup_data physical address */ -static int add_efi_memmap__initdata ; +static int add_efi_memmap __initbss;static int __init setup_add_efi_memmap (char *arg) { add_efi_memmap =1 ;
arch/x86/platform/olpc/olpc_dt.c +1 -1
@@ -124,7 +124,7 @@ static int __init olpc_dt_pkg2path(phandle node, char *buf,return 0 ; } -static unsigned int prom_early_allocated__initdata ; +static unsigned int prom_early_allocated __initbss;void *__init prom_early_alloc (unsigned long size) {
arch/x86/platform/olpc/olpc_ofw.c +1 -1
@@ -11,7 +11,7 @@static int (*olpc_ofw_cif)(int *);/* page dir entry containing OFW's pgdir table; filled in by head_32.S */ -u32 olpc_ofw_pgd__initdata ; +u32 olpc_ofw_pgd __initbss;static DEFINE_SPINLOCK (ofw_lock);
arch/x86/xen/mmu.c +1 -1
@@ -116,7 +116,7 @@ static pud_t level3_user_vsyscall[PTRS_PER_PUD] __page_aligned_bss; DEFINE_PER_CPU(unsigned long, xen_cr3); /* cr3 stored as physaddr */ DEFINE_PER_CPU(unsigned long, xen_current_cr3); /* actual vcpu cr3 */ -static phys_addr_t xen_pt_base, xen_pt_size__initdata ; +static phys_addr_t xen_pt_base, xen_pt_size __initbss;/* * Just beyond the highest usermode address. STACK_TOP_MAX has a
arch/x86/xen/setup.c +3 -3
@@ -35,14 +35,14 @@#define GB (x) ((uint64_t)(x) * 1024 * 1024 * 1024)/* Amount of extra memory space we add to the e820 ranges */ -struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS ]__initdata ; +struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initbss;/* Number of pages released from the initial allocation. */ unsigned long xen_released_pages;/* E820 map used during setting up memory. */ -static struct e820entry xen_e820_map[E820MAX ]__initdata ; -static u32 xen_e820_map_entries__initdata ; +static struct e820entry xen_e820_map[E820MAX] __initbss; +static u32 xen_e820_map_entries __initbss;/* * Buffer used to remap identity mapped pages. We only need the virtual space.
arch/xtensa/mm/init.c +1 -1
@@ -31,7 +31,7 @@#include <asm/sections.h> #include <asm/sysmem.h> -struct sysmem_info sysmem__initdata ; +struct sysmem_info sysmem __initbss;static void __init sysmem_dump (void ) {
drivers/acpi/blacklist.c +1 -1
@@ -47,7 +47,7 @@ struct acpi_blacklist_item {u32 is_critical_error; }; -static struct dmi_system_id acpi_osi_dmi_table[]__initdata ; +static struct dmi_system_id acpi_osi_dmi_table[] __initbss;/* * POLICY: If *anything* doesn't work, put it on the blacklist.
drivers/acpi/numa.c +1 -1
@@ -42,7 +42,7 @@ static int pxm_to_node_map[MAX_PXM_DOMAINS]static int node_to_pxm_map[MAX_NUMNODES ] = { [0 ...MAX_NUMNODES -1 ] =PXM_INVAL }; -unsigned char acpi_srat_revision__initdata ; +unsigned char acpi_srat_revision __initbss;int pxm_to_node (int pxm) {
drivers/acpi/tables.c +2 -2
@@ -38,9 +38,9 @@static char *mps_inti_flags_polarity[] = {"dfl" ,"high" ,"res" ,"low" };static char *mps_inti_flags_trigger[] = {"dfl" ,"edge" ,"res" ,"level" }; -static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES ]__initdata ; +static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES] __initbss; -static int acpi_apic_instance__initdata ; +static int acpi_apic_instance __initbss;/* * Disable table checksum verification for the early stage due to the size
drivers/ata/libata-core.c +1 -1
@@ -123,7 +123,7 @@ struct ata_force_ent {static struct ata_force_ent *ata_force_tbl;static int ata_force_tbl_size; -static char ata_force_param_buf[PAGE_SIZE ]__initdata ; +static char ata_force_param_buf[PAGE_SIZE] __initbss;/* param_buf is thrown away after initialization, disallow read */ module_param_string (force, ata_force_param_buf,sizeof (ata_force_param_buf),0 );MODULE_PARM_DESC (force,"Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)" );
drivers/clk/imx/clk-imx1.c +1 -1
@@ -38,7 +38,7 @@ static const char *clko_sel_clks[] = { "per1", "hclk", "clk48m", "clk16m",static struct clk *clk[IMX1_CLK_MAX ];static struct clk_onecell_data clk_data; -static void __iomem *ccm__initdata ; +static void __iomem *ccm __initbss;#define CCM_CSCR (ccm + 0x0000)#define CCM_MPCTL0 (ccm + 0x0004)#define CCM_SPCTL0 (ccm + 0x000c)
drivers/clk/imx/clk-imx21.c +1 -1
@@ -23,7 +23,7 @@#define MX21_GPT1_BASE_ADDR 0x10003000#define MX21_INT_GPT1 (NR_IRQS_LEGACY + 26) -static void __iomem *ccm__initdata ; +static void __iomem *ccm __initbss;/* Register offsets */ #define CCM_CSCR (ccm + 0x00)
drivers/clk/imx/clk-imx27.c +1 -1
@@ -15,7 +15,7 @@#define MX27_GPT1_BASE_ADDR 0x10003000#define MX27_INT_GPT1 (NR_IRQS_LEGACY + 26) -static void __iomem *ccm__initdata ; +static void __iomem *ccm __initbss;/* Register offsets */ #define CCM_CSCR (ccm + 0x00)
drivers/clk/imx/clk.c +2 -2
@@ -74,8 +74,8 @@ void imx_cscmr1_fixup(u32 *val)return ; } -static int imx_keep_uart_clocks__initdata ; -static struct clk **const *imx_uart_clocks__initdata ; +static int imx_keep_uart_clocks __initbss; +static struct clk ** const *imx_uart_clocks __initbss;static int __init imx_keep_uart_clocks_param (char *str) {
drivers/clk/mediatek/clk-mt8173.c +2 -2
@@ -890,8 +890,8 @@ static const struct mtk_gate venclt_clks[] __initconst = { GATE_VENCLT(CLK_VENCLT_CKE1, "venclt_cke1", "venclt_sel", 4), }; -static struct clk_onecell_data *mt8173_top_clk_data__initdata ; -static struct clk_onecell_data *mt8173_pll_clk_data__initdata ; +static struct clk_onecell_data *mt8173_top_clk_data __initbss; +static struct clk_onecell_data *mt8173_pll_clk_data __initbss;static void __init mtk_clk_enable_critical (void ) {
drivers/clk/shmobile/clk-r8a7740.c +1 -1
@@ -59,7 +59,7 @@ static const struct clk_div_table div4_div_table[] = { { 13, 72 }, { 14, 96 }, { 0, 0 } }; -static u32 cpg_mode__initdata ; +static u32 cpg_mode __initbss;static struct clk *__init r8a7740_cpg_register_clock(struct device_node *np, struct r8a7740_cpg *cpg,
drivers/clk/shmobile/clk-r8a7778.c +2 -2
@@ -45,8 +45,8 @@ struct { { "s1", { 8, 6, 8, 6 } }, }; -static u32 cpg_mode_rates__initdata ; -static u32 cpg_mode_divs__initdata ; +static u32 cpg_mode_rates __initbss; +static u32 cpg_mode_divs __initbss; static struct clk * __init r8a7778_cpg_register_clock(struct device_node *np, struct r8a7778_cpg *cpg,
drivers/clk/shmobile/clk-r8a7779.c +1 -1
@@ -88,7 +88,7 @@ static const unsigned int cpg_plla_mult[4] __initconst = { 42, 48, 56, 64 };* Initialization */ -static u32 cpg_mode__initdata ; +static u32 cpg_mode __initbss;static struct clk *__init r8a7779_cpg_register_clock(struct device_node *np, struct r8a7779_cpg *cpg,
drivers/clk/shmobile/clk-rcar-gen2.c +1 -1
@@ -295,7 +295,7 @@ static const struct clk_div_table cpg_sd01_div_table[] = {* Initialization */ -static u32 cpg_mode__initdata ; +static u32 cpg_mode __initbss;static struct clk *__init rcar_gen2_cpg_register_clock(struct device_node *np, struct rcar_gen2_cpg *cpg,
drivers/clocksource/arm_arch_timer.c +1 -1
@@ -42,7 +42,7 @@#define ARCH_CP15_TIMER BIT(0)#define ARCH_MEM_TIMER BIT(1) -static unsigned arch_timers_present__initdata ; +static unsigned arch_timers_present __initbss;static void __iomem *arch_counter_base;
drivers/firmware/dmi_scan.c +2 -2
@@ -20,7 +20,7 @@ EXPORT_SYMBOL_GPL(dmi_kobj);*/ static const char dmi_empty_string[] =" " ; -static u32 dmi_ver__initdata ; +static u32 dmi_ver __initbss;static u32 dmi_len;static u16 dmi_num;static u8 smbios_entry_point[32 ];
@@ -32,7 +32,7 @@ static int smbios_entry_point_size;static int dmi_initialized;/* DMI system identification string used during boot */ -static char dmi_ids_string[128 ]__initdata ; +static char dmi_ids_string[128] __initbss; static struct dmi_memdev_info { const char *device;
drivers/gpu/drm/drm_modes.c +1 -1
@@ -1491,4 +1491,4 @@ int drm_mode_convert_umode(struct drm_display_mode *out, out:return ret; -} +}
drivers/input/serio/i8042.c +2 -2
@@ -685,8 +685,8 @@ static int __init i8042_check_mux(void)/* * The following is used to test AUX IRQ delivery. */ -static struct completion i8042_aux_irq_delivered__initdata ; -static bool i8042_irq_being_tested__initdata ; +static struct completion i8042_aux_irq_delivered __initbss; +static bool i8042_irq_being_tested __initbss;static irqreturn_t __init i8042_aux_test_irq (int irq,void *dev_id) {
drivers/irqchip/irq-gic.c +2 -2
@@ -1100,7 +1100,7 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, }#ifdef CONFIG_OF -static int gic_cnt__initdata ; +static int gic_cnt __initbss;static bool gic_check_eoimode (struct device_node *node,void __iomem **base) {
@@ -1195,7 +1195,7 @@ IRQCHIP_DECLARE(pl390, "arm,pl390", gic_of_init);#endif #ifdef CONFIG_ACPI -static phys_addr_t cpu_phy_base__initdata ; +static phys_addr_t cpu_phy_base __initbss; static int __init gic_acpi_parse_madt_cpu(struct acpi_subtable_header *header,
drivers/mtd/ubi/block.c +2 -2
@@ -75,10 +75,10 @@ struct ubiblock_pdu { };/* Numbers of elements set in the @ubiblock_param array */ -static int ubiblock_devs__initdata ; +static int ubiblock_devs __initbss;/* MTD devices specification parameters */ -static struct ubiblock_param ubiblock_param[UBIBLOCK_MAX_DEVICES ]__initdata ; +static struct ubiblock_param ubiblock_param[UBIBLOCK_MAX_DEVICES] __initbss;struct ubiblock {struct ubi_volume_desc *desc;
drivers/net/arcnet/com90xx.c +1 -1
@@ -79,7 +79,7 @@ static int numcards;#define BUFFER_SIZE (512)#define MIRROR_SIZE (BUFFER_SIZE * 4) -static int com90xx_skip_probe__initdata =0 ; +static int com90xx_skip_probe __initbss;/* Module parameters */
drivers/net/wan/sbni.c +5 -5
@@ -153,8 +153,8 @@ static const char version[] ="Granch SBNI12 driver ver 5.0.1 Jun 22 2001 Denis I.Timofeev.\n" ;static bool skip_pci_probe__initdata = false; -static int scandone__initdata =0 ; -static int num__initdata =0 ; +static int scandone __initbss; +static int num __initbss;static unsigned char rxl_tab[];static u32 crc32tab[];
@@ -165,11 +165,11 @@ static struct net_device *sbni_cards[ SBNI_MAX_NUM_CARDS ];/* Lists of device's parameters */ static u32 io[SBNI_MAX_NUM_CARDS ]__initdata = { [0 ...SBNI_MAX_NUM_CARDS -1 ] =-1 }; -static u32 irq[SBNI_MAX_NUM_CARDS ]__initdata ; -static u32 baud[SBNI_MAX_NUM_CARDS ]__initdata ; +static u32 irq[ SBNI_MAX_NUM_CARDS ] __initbss; +static u32 baud[ SBNI_MAX_NUM_CARDS ] __initbss;static u32 rxl[SBNI_MAX_NUM_CARDS ]__initdata = { [0 ...SBNI_MAX_NUM_CARDS -1 ] =-1 }; -static u32 mac[SBNI_MAX_NUM_CARDS ]__initdata ; +static u32 mac[ SBNI_MAX_NUM_CARDS ] __initbss;#ifndef MODULE typedef u32 iarr [];
drivers/of/pdt.c +2 -2
@@ -23,12 +23,12 @@#include <linux/of.h> #include <linux/of_pdt.h> -static struct of_pdt_ops *of_pdt_prom_ops__initdata ; +static struct of_pdt_ops *of_pdt_prom_ops __initbss;void __initdata (*of_pdt_build_more)(struct device_node *dp);#if defined(CONFIG_SPARC ) -unsigned int of_pdt_unique_id__initdata ; +unsigned int of_pdt_unique_id __initbss;#define of_pdt_incr_unique_id (p) do { \ (p)->unique_id = of_pdt_unique_id++; \
drivers/parport/parport_pc.c +1 -1
@@ -3220,7 +3220,7 @@ static int __init parse_parport_params(void)#else -static int parport_setup_ptr__initdata ; +static int parport_setup_ptr __initbss;/* * Acceptable parameters:
drivers/pci/pci-stub.c +1 -1
@@ -19,7 +19,7 @@#include <linux/module.h> #include <linux/pci.h> -static char ids[1024 ]__initdata ; +static char ids[1024] __initbss;module_param_string (ids, ids,sizeof (ids),0 ); MODULE_PARM_DESC(ids, "Initial PCI IDs to add to the stub driver, format is "
drivers/platform/x86/acer-wmi.c +1 -1
@@ -793,7 +793,7 @@ static acpi_status __init AMW0_find_mailled(void)return AE_OK ; } -static int AMW0_set_cap_acpi_check_device_found__initdata ; +static int AMW0_set_cap_acpi_check_device_found __initbss;static acpi_status __init AMW0_set_cap_acpi_check_device_cb (acpi_handle handle,u32 level,void *context,void **retval)
drivers/pnp/pnpacpi/core.c +1 -1
@@ -309,7 +309,7 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle,return AE_OK ; } -int pnpacpi_disabled__initdata ; +int pnpacpi_disabled __initbss;static int __init pnpacpi_init (void ) {if (acpi_disabled || pnpacpi_disabled) {
drivers/s390/char/sclp_early.c +1 -1
@@ -48,7 +48,7 @@ struct read_info_sccb {u8 _pad_122[4096 -122 ];/* 122-4095 */ } __packed__aligned(PAGE_SIZE) ; -static char sccb_early[PAGE_SIZE ]__aligned(PAGE_SIZE) __initdata ; +static char sccb_early[PAGE_SIZE] __aligned(PAGE_SIZE) __initbss;static struct sclp_ipl_info sclp_ipl_info;struct sclp_info sclp;
drivers/scsi/NCR5380.c +1 -1
@@ -534,7 +534,7 @@ static void NCR5380_set_timer(struct NCR5380_hostdata *hostdata, unsigned long t } -static int probe_irq__initdata =0 ; +static int probe_irq __initbss;/** * probe_intr - helper for IRQ autoprobe
drivers/scsi/gdth.c +1 -1
@@ -329,7 +329,7 @@ static int irq[MAXHA] __initdata = {0xff ,0xff ,0xff ,0xff ,0xff ,0xff ,0xff ,0xff , 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};/* disable driver flag */ -static int disable__initdata =0 ; +static int disable __initbss;/* reserve flag */ static int reserve_mode =1 ;/* reserve list */
drivers/soc/tegra/fuse/speedo-tegra30.c +1 -1
@@ -84,7 +84,7 @@ static const u32 __initconst cpu_process_speedos[][CPU_PROCESS_CORNERS] = { {295, 336, 358, 375, 391, UINT_MAX}, }; -static int threshold_index__initdata ; +static int threshold_index __initbss;static void __init fuse_speedo_calib (u32 *speedo_g,u32 *speedo_lp) {
drivers/staging/board/board.c +2 -2
@@ -22,8 +22,8 @@#include "board.h" -static struct device_node *irqc_node__initdata ; -static unsigned int irqc_base__initdata ; +static struct device_node *irqc_node __initbss; +static unsigned int irqc_base __initbss;static bool find_by_address (u64 base_address) {
drivers/vfio/pci/vfio_pci.c +1 -1
@@ -35,7 +35,7 @@#define DRIVER_AUTHOR "Alex Williamson <[email protected]>"#define DRIVER_DESC "VFIO PCI - User Level meta-driver" -static char ids[1024 ]__initdata ; +static char ids[1024] __initbss;module_param_string (ids, ids,sizeof (ids),0 );MODULE_PARM_DESC (ids,"Initial PCI IDs to add to the vfio driver, format is \"vendor:device[:subvendor[:subdevice[:class[:class_mask]]]]\" and multiple comma separated entries can be specified" );
drivers/video/fbdev/amifb.c +4 -4
@@ -950,10 +950,10 @@ static int round_down_bpp = 1; /* for mode probing */static int amifb_ilbm =0 ;/* interleaved or normal bitplanes */ -static u32 amifb_hfmin__initdata ;/* monitor hfreq lower limit (Hz) */ -static u32 amifb_hfmax__initdata ;/* monitor hfreq upper limit (Hz) */ -static u16 amifb_vfmin__initdata ;/* monitor vfreq lower limit (Hz) */ -static u16 amifb_vfmax__initdata ;/* monitor vfreq upper limit (Hz) */ +static u32 amifb_hfmin __initbss; /* monitor hfreq lower limit (Hz) */ +static u32 amifb_hfmax __initbss; /* monitor hfreq upper limit (Hz) */ +static u16 amifb_vfmin __initbss; /* monitor vfreq lower limit (Hz) */ +static u16 amifb_vfmax __initbss; /* monitor vfreq upper limit (Hz) *//*
drivers/video/fbdev/omap2/dss/omapdss-boot-init.c +1 -1
@@ -30,7 +30,7 @@#include <linux/slab.h> #include <linux/list.h> -static struct list_head dss_conv_list__initdata ; +static struct list_head dss_conv_list __initbss;static const char prefix[]__initconst ="omapdss," ;
drivers/video/fbdev/stifb.c +1 -1
@@ -1345,7 +1345,7 @@ out_err0:return -ENXIO ; } -static int stifb_disabled__initdata ; +static int stifb_disabled __initbss;int __init stifb_setup (char *options);
drivers/video/fbdev/vfb.c +1 -1
@@ -117,7 +117,7 @@ static struct fb_fix_screeninfo vfb_fix = { .accel = FB_ACCEL_NONE, }; -static bool vfb_enable__initdata =0 ;/* disabled by default */ +static bool vfb_enable __initbss; /* disabled by default */module_param (vfb_enable, bool,0 ); static int vfb_check_var(struct fb_var_screeninfo *var,
drivers/watchdog/octeon-wdt-main.c +3 -3
@@ -105,10 +105,10 @@ MODULE_PARM_DESC(nowayout,"Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); -static u32 nmi_stage1_insns[64 ]__initdata ; +static u32 nmi_stage1_insns[64] __initbss;/* We need one branch and therefore one relocation per target label. */ -static struct uasm_label labels[5 ]__initdata ; -static struct uasm_reloc relocs[5 ]__initdata ; +static struct uasm_label labels[5] __initbss; +static struct uasm_reloc relocs[5] __initbss;enum lable_id { label_enter_bootloader =1
drivers/xen/efi.c +1 -1
@@ -261,7 +261,7 @@ static efi_status_t xen_efi_query_capsule_caps(efi_capsule_header_t **capsules,return efi_data (op).status; } -static efi_char16_t vendor[100 ]__initdata ; +static efi_char16_t vendor[100] __initbss;static efi_system_table_t efi_systab_xen__initdata = { .hdr = {
drivers/zorro/zorro.c +1 -1
@@ -30,7 +30,7 @@*/ unsigned int zorro_num_autocon; -struct zorro_dev_init zorro_autocon_init[ZORRO_NUM_AUTO ]__initdata ; +struct zorro_dev_init zorro_autocon_init[ZORRO_NUM_AUTO] __initbss;struct zorro_dev *zorro_autocon;
init/do_mounts.c +6 -6
@@ -35,11 +35,11 @@#include "do_mounts.h" -int __initdata rd_doload;/* 1 = load RAM disk, 0 = don't load */ +int __initbss rd_doload; /* 1 = load RAM disk, 0 = don't load */int root_mountflags =MS_RDONLY |MS_SILENT ; -static char *__initdata root_device_name; -static char __initdata saved_root_name[64 ]; +static char * __initbss root_device_name; +static char __initbss saved_root_name[64];static int root_wait;dev_t ROOT_DEV ;
@@ -308,21 +308,21 @@ static int __init rootwait_setup(char *str)__setup ("rootwait" , rootwait_setup); -static char *__initdata root_mount_data; +static char * __initbss root_mount_data;static int __init root_data_setup (char *str) { root_mount_data = str;return 1 ; } -static char *__initdata root_fs_names; +static char * __initbss root_fs_names;static int __init fs_names_setup (char *str) { root_fs_names = str;return 1 ; } -static unsigned int __initdata root_delay; +static unsigned int __initbss root_delay;static int __init root_delay_setup (char *str) { root_delay =simple_strtoul (str,NULL ,0 );
init/do_mounts_initrd.c +2 -2
@@ -21,8 +21,8 @@#include "do_mounts.h" unsigned long initrd_start, initrd_end; -phys_addr_t initrd_start_phys__initdata ; -phys_addr_t initrd_end_phys__initdata ; +phys_addr_t initrd_start_phys __initbss; +phys_addr_t initrd_end_phys __initbss;int initrd_below_start_ok;unsigned int real_root_dev;/* do_proc_dointvec cannot handle kdev_t */ static int __initdata mount_initrd =1 ;
init/do_mounts_md.c +4 -4
@@ -24,11 +24,11 @@*/ #ifdef CONFIG_MD_AUTODETECT -static int __initdata raid_noautodetect; +static int __initbss raid_noautodetect;#else static int __initdata raid_noautodetect=1 ;#endif -static int __initdata raid_autopart; +static int __initbss raid_autopart; static struct { int minor;
@@ -36,9 +36,9 @@ static struct {int level;int chunk;char *device_names; -} md_setup_args[256 ]__initdata ; +} md_setup_args[256] __initbss; -static int md_setup_ents__initdata ; +static int md_setup_ents __initbss;/* * Parse the command-line parameters given our kernel, but do not
init/do_mounts_rd.c +1 -1
@@ -33,7 +33,7 @@ static int __init prompt_ramdisk(char *str) }__setup ("prompt_ramdisk=" , prompt_ramdisk); -int __initdata rd_image_start;/* starting block # of image */ +int __initbss rd_image_start; /* starting block # of image */static int __init ramdisk_start_setup (char *str) {
init/initramfs.c +21 -21
105 lines not on this page · raw message
init/main.c +3 -3
@@ -120,7 +120,7 @@ extern void time_init(void);void (*__initdata late_time_init)(void );/* Untouched command line saved by arch-specific code. */ -char __initdata boot_command_line[COMMAND_LINE_SIZE ]; +char __initbss boot_command_line[COMMAND_LINE_SIZE];/* Untouched saved command line (eg. for /proc) */ char *saved_command_line;/* Command line for parameter parsing */
@@ -440,8 +440,8 @@ void __init parse_early_options(char *cmdline)/* Arch code calls this early on, or if not, just before other parsing. */ void __init parse_early_param (void ) { -static int done__initdata ; -static char tmp_cmdline[COMMAND_LINE_SIZE ]__initdata ; + static int done __initbss; + static char tmp_cmdline[COMMAND_LINE_SIZE] __initbss;if (done)return ;
kernel/cgroup.c +1 -1
@@ -5124,7 +5124,7 @@ int __init cgroup_init_early(void)return 0 ; } -static unsigned long cgroup_disable_mask__initdata ; +static unsigned long cgroup_disable_mask __initbss;/** * cgroup_init - cgroup initialization
kernel/power/suspend_test.c +1 -1
@@ -143,7 +143,7 @@ static int __init has_wakealarm(struct device *dev, const void *data)* at startup time. They're normally disabled, for faster boot and because * we can't know which states really work on this particular system. */ -static const char *test_state_label__initdata ; +static const char *test_state_label __initbss;static char warn_bad_state[]__initdata =KERN_WARNING "PM: can't test '%s' suspend state\n" ;
kernel/trace/ftrace.c +5 -5
@@ -4267,11 +4267,11 @@ EXPORT_SYMBOL_GPL(ftrace_set_global_notrace);* command line interface to allow users to set filters on boot up. */ #define FTRACE_FILTER_SIZE COMMAND_LINE_SIZE -static char ftrace_notrace_buf[FTRACE_FILTER_SIZE ]__initdata ; -static char ftrace_filter_buf[FTRACE_FILTER_SIZE ]__initdata ; +static char ftrace_notrace_buf[FTRACE_FILTER_SIZE] __initbss; +static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initbss;/* Used by function selftest to not test if filter is set */ -bool ftrace_filter_param__initdata ; +bool ftrace_filter_param __initbss;static int __init set_ftrace_notrace (char *str) {
@@ -4290,8 +4290,8 @@ static int __init set_ftrace_filter(char *str)__setup ("ftrace_filter=" , set_ftrace_filter);#ifdef CONFIG_FUNCTION_GRAPH_TRACER -static char ftrace_graph_buf[FTRACE_FILTER_SIZE ]__initdata ; -static char ftrace_graph_notrace_buf[FTRACE_FILTER_SIZE ]__initdata ; +static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initbss; +static char ftrace_graph_notrace_buf[FTRACE_FILTER_SIZE] __initbss;static int ftrace_set_func (unsigned long *array,int *idx,int size,char *buffer);static unsigned long save_global_trampoline;
kernel/trace/ring_buffer.c +3 -3
@@ -4709,7 +4709,7 @@ static int rb_cpu_notify(struct notifier_block *self,* ring buffer should happen that's not expected, a big warning * is displayed and all ring buffers are disabled. */ -static struct task_struct *rb_threads[NR_CPUS ]__initdata ; +static struct task_struct *rb_threads[NR_CPUS] __initbss;struct rb_test_data {struct ring_buffer *buffer;
@@ -4729,7 +4729,7 @@ struct rb_test_data {int cnt; }; -static struct rb_test_data rb_data[NR_CPUS ]__initdata ; +static struct rb_test_data rb_data[NR_CPUS] __initbss;/* 1 meg per cpu */ #define RB_TEST_BUFFER_SIZE 1048576
@@ -4739,7 +4739,7 @@ static char rb_string[] __initdata ="?+|:';\",.<>/?abcdefghijklmnopqrstuvwxyz1234567890" "!@#$%^&*()?+\\?+|:';\",.<>/?abcdefghijklmnopqrstuv" ; -static bool rb_test_started__initdata ; +static bool rb_test_started __initbss;struct rb_item {int size;
kernel/trace/trace.c +5 -5
@@ -164,7 +164,7 @@ static union trace_enum_map_item *trace_enum_maps;static int tracing_set_tracer (struct trace_array *tr,const char *buf);#define MAX_TRACER_SIZE 100 -static char bootup_tracer_buf[MAX_TRACER_SIZE ]__initdata ; +static char bootup_tracer_buf[MAX_TRACER_SIZE] __initbss;static char *default_bootup_tracer;static bool allocate_snapshot;
@@ -213,8 +213,8 @@ static int __init boot_alloc_snapshot(char *str)__setup ("alloc_snapshot" , boot_alloc_snapshot); -static char trace_boot_options_buf[MAX_TRACER_SIZE ]__initdata ; -static char *trace_boot_options__initdata ; +static char trace_boot_options_buf[MAX_TRACER_SIZE] __initbss; +static char *trace_boot_options __initbss;static int __init set_trace_boot_options (char *str) {
@@ -224,8 +224,8 @@ static int __init set_trace_boot_options(char *str) }__setup ("trace_options=" , set_trace_boot_options); -static char trace_boot_clock_buf[MAX_TRACER_SIZE ]__initdata ; -static char *trace_boot_clock__initdata ; +static char trace_boot_clock_buf[MAX_TRACER_SIZE] __initbss; +static char *trace_boot_clock __initbss;static int __init set_trace_boot_clock (char *str) {
kernel/trace/trace_events.c +1 -1
@@ -2447,7 +2447,7 @@ static void __add_event_to_tracers(struct trace_event_call *call)extern struct trace_event_call *__start_ftrace_events[];extern struct trace_event_call *__stop_ftrace_events[]; -static char bootup_event_buf[COMMAND_LINE_SIZE ]__initdata ; +static char bootup_event_buf[COMMAND_LINE_SIZE] __initbss;static __init int setup_trace_event (char *str) {
kernel/trace/trace_stack.c +1 -1
@@ -420,7 +420,7 @@ stack_trace_sysctl(struct ctl_table *table, int write,return ret; } -static char stack_trace_filter_buf[COMMAND_LINE_SIZE +1 ]__initdata ; +static char stack_trace_filter_buf[COMMAND_LINE_SIZE+1] __initbss;static __init int enable_stacktrace (char *str) {
lib/debugobjects.c +1 -1
@@ -35,7 +35,7 @@ struct debug_bucket {static struct debug_bucket obj_hash[ODEBUG_HASH_SIZE ]; -static struct debug_obj obj_static_pool[ODEBUG_POOL_SIZE ]__initdata ; +static struct debug_obj obj_static_pool[ODEBUG_POOL_SIZE] __initbss;static DEFINE_RAW_SPINLOCK (pool_lock);
lib/list_sort.c +1 -1
@@ -169,7 +169,7 @@ struct debug_el { };/* Array, containing pointers to all elements in the test list */ -static struct debug_el **elts__initdata ; +static struct debug_el **elts __initbss;static int __init check (struct debug_el *ela,struct debug_el *elb) {
lib/test_printf.c +3 -3
@@ -36,9 +36,9 @@#endif #define PTR_WIDTH_STR stringify(PTR_WIDTH) -static unsigned total_tests__initdata ; -static unsigned failed_tests__initdata ; -static char *test_buffer__initdata ; +static unsigned total_tests __initbss; +static unsigned failed_tests __initbss; +static char *test_buffer __initbss; static int __printf(4, 0) __init do_test(int bufsize, const char *expect, int elen,
mm/bootmem.c +2 -2
@@ -34,7 +34,7 @@ unsigned long max_low_pfn;unsigned long min_low_pfn;unsigned long max_pfn; -bootmem_data_t bootmem_node_data[MAX_NUMNODES ]__initdata ; +bootmem_data_t bootmem_node_data[MAX_NUMNODES] __initbss;static struct list_head bdata_list__initdata =LIST_HEAD_INIT (bdata_list);
@@ -243,7 +243,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata)return count; } -static int reset_managed_pages_done__initdata ; +static int reset_managed_pages_done __initbss;void reset_node_managed_pages (pg_data_t *pgdat) {
mm/early_ioremap.c +5 -5
@@ -18,7 +18,7 @@#include <asm/early_ioremap.h> #ifdef CONFIG_MMU -static int early_ioremap_debug__initdata ; +static int early_ioremap_debug __initbss;static int __init early_ioremap_debug_setup (char *str) {
@@ -28,7 +28,7 @@ static int __init early_ioremap_debug_setup(char *str) }early_param ("early_ioremap_debug" , early_ioremap_debug_setup); -static int after_paging_init__initdata ; +static int after_paging_init __initbss;void __init __weak early_ioremap_shutdown (void ) {
@@ -60,9 +60,9 @@ static inline void __init __late_clear_fixmap(enum fixed_addresses idx) }#endif -static void __iomem *prev_map[FIX_BTMAPS_SLOTS ]__initdata ; -static unsigned long prev_size[FIX_BTMAPS_SLOTS ]__initdata ; -static unsigned long slot_virt[FIX_BTMAPS_SLOTS ]__initdata ; +static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initbss; +static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initbss; +static unsigned long slot_virt[FIX_BTMAPS_SLOTS] __initbss;void __init early_ioremap_setup (void ) {
mm/kmemleak.c +2 -2
@@ -268,8 +268,8 @@ struct early_log {/* early logging buffer and current position */ static struct early_log - early_log[CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE ]__initdata ; -static int crt_early_log__initdata ; + early_log[CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE] __initbss; +static int crt_early_log __initbss;static void kmemleak_disable (void );
mm/memcontrol.c +1 -1
@@ -5728,7 +5728,7 @@ void mem_cgroup_uncharge_swap(swp_entry_t entry)#ifdef CONFIG_MEMCG_SWAP_ENABLED static int really_do_swap_account__initdata =1 ;#else -static int really_do_swap_account__initdata ; +static int really_do_swap_account __initbss;#endif static int __init enable_swap_account (char *s)
mm/mempolicy.c +1 -1
@@ -2508,7 +2508,7 @@ void mpol_free_shared_policy(struct shared_policy *p) }#ifdef CONFIG_NUMA_BALANCING -static int __initdata numabalancing_override; +static int __initbss numabalancing_override;static void __init check_numabalancing_enable (void ) {
mm/memtest.c +1 -1
@@ -80,7 +80,7 @@ static void __init do_one_pass(u64 pattern, phys_addr_t start, phys_addr_t end) }/* default is disabled */ -static unsigned int memtest_pattern__initdata ; +static unsigned int memtest_pattern __initbss;static int __init parse_memtest (char *arg) {
mm/nobootmem.c +1 -1
@@ -156,7 +156,7 @@ static unsigned long __init free_low_memory_core_early(void)return count; } -static int reset_managed_pages_done__initdata ; +static int reset_managed_pages_done __initbss;void reset_node_managed_pages (pg_data_t *pgdat) {
mm/page_alloc.c +3 -3
@@ -248,8 +248,8 @@ static unsigned long __meminitdata dma_reserve;#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP static unsigned long __meminitdata arch_zone_lowest_possible_pfn[MAX_NR_ZONES ];static unsigned long __meminitdata arch_zone_highest_possible_pfn[MAX_NR_ZONES ]; -static unsigned long __initdata required_kernelcore; -static unsigned long __initdata required_movablecore; +static unsigned long __initbss required_kernelcore; +static unsigned long __initbss required_movablecore;static unsigned long __meminitdata zone_movable_pfn[MAX_NUMNODES ];/* movable_zone is the "real" zone pages in ZONE_MOVABLE are taken from */
@@ -1112,7 +1112,7 @@ static void __init deferred_free_range(struct page *page, }/* Completion tracking for deferred_init_memmap() threads */ -static atomic_t pgdat_init_n_undone__initdata ; +static atomic_t pgdat_init_n_undone __initbss;static __initdata DECLARE_COMPLETION (pgdat_init_all_done_comp);static inline void __init pgdat_init_report_one_done (void )
mm/percpu.c +4 -4
@@ -1528,8 +1528,8 @@ static void pcpu_dump_alloc_info(const char *lvl,int __init pcpu_setup_first_chunk (const struct pcpu_alloc_info *ai,void *base_addr) { -static int smap[PERCPU_DYNAMIC_EARLY_SLOTS ]__initdata ; -static int dmap[PERCPU_DYNAMIC_EARLY_SLOTS ]__initdata ; + static int smap[PERCPU_DYNAMIC_EARLY_SLOTS] __initbss; + static int dmap[PERCPU_DYNAMIC_EARLY_SLOTS] __initbss;size_t dyn_size = ai->dyn_size;size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;struct pcpu_chunk *schunk, *dchunk =NULL ;
@@ -1776,8 +1776,8 @@ static struct pcpu_alloc_info * __init pcpu_build_alloc_info( size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn) { -static int group_map[NR_CPUS ]__initdata ; -static int group_cnt[NR_CPUS ]__initdata ; + static int group_map[NR_CPUS] __initbss; + static int group_cnt[NR_CPUS] __initbss;const size_t static_size = __per_cpu_end - __per_cpu_start;int nr_groups =1 , nr_units =0 ;size_t size_sum, min_unit_size, alloc_size;
mm/slab.c +2 -2
@@ -238,7 +238,7 @@ struct arraycache_init {* Need this for bootstrapping a per node allocator. */ #define NUM_INIT_LISTS (2 * MAX_NUMNODES) -static struct kmem_cache_node __initdata init_kmem_cache_node[NUM_INIT_LISTS ]; +static struct kmem_cache_node __initbss init_kmem_cache_node[NUM_INIT_LISTS];#define CACHE_CACHE 0#define SIZE_NODE (MAX_NUMNODES)
@@ -429,7 +429,7 @@ static inline void set_obj_status(struct page *page, int idx, int val) {}#define SLAB_MAX_ORDER_HI 1#define SLAB_MAX_ORDER_LO 0static int slab_max_order =SLAB_MAX_ORDER_LO ; -static bool slab_max_order_set__initdata ; +static bool slab_max_order_set __initbss;static inline struct kmem_cache *virt_to_cache (const void *obj) {
mm/slub.c +1 -1
@@ -3881,7 +3881,7 @@ static struct kmem_cache * __init bootstrap(struct kmem_cache *static_cache)void __init kmem_cache_init (void ) { -static __initdata struct kmem_cache boot_kmem_cache, + static __initbss struct kmem_cache boot_kmem_cache, boot_kmem_cache_node;if (debug_guardpage_minorder ())
mm/vmalloc.c +2 -2
@@ -1143,7 +1143,7 @@ void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t pro }EXPORT_SYMBOL (vm_map_ram); -static struct vm_struct *vmlist__initdata ; +static struct vm_struct *vmlist __initbss;/** * vm_area_add_early - add vmap area early during boot * @vm: vm_struct to add
@@ -1184,7 +1184,7 @@ void __init vm_area_add_early(struct vm_struct *vm)*/ void __init vm_area_register_early (struct vm_struct *vm,size_t align) { -static size_t vm_init_off__initdata ; + static size_t vm_init_off __initbss;unsigned long addr; addr =ALIGN (VMALLOC_START + vm_init_off, align);
net/ipv4/ipconfig.c +10 -10
@@ -113,9 +113,9 @@* variables using firmware environment vars. If this is set, it will * ignore such firmware variables. */ -int ic_set_manually__initdata =0 ;/* IPconfig parameters set manually */ +int ic_set_manually __initbss; /* IPconfig parameters set manually */ -static int ic_enable__initdata ;/* IP config enabled? */ +static int ic_enable __initbss; /* IP config enabled? *//* Protocol choice */ int ic_proto_enabled__initdata =0
@@ -130,7 +130,7 @@ int ic_proto_enabled __initdata = 0#endif ; -static int ic_host_name_set__initdata ;/* Host name set by us? */ +static int ic_host_name_set __initbss; /* Host name set by us? */__be32 ic_myaddr =NONE ;/* My IP address */ static __be32 ic_netmask =NONE ;/* Netmask for local subnet */
@@ -144,7 +144,7 @@ __be32 root_server_addr = NONE; /* Address of NFS server */u8 root_server_path[256 ] = {0 , };/* Path to mount as root */ /* vendor class identifier */ -static char vendor_class_identifier[253 ]__initdata ; +static char vendor_class_identifier[253] __initbss;/* Persistent data: */
@@ -160,17 +160,17 @@ static u8 ic_domain[64]; /* DNS (not NIS) domain name */static char user_dev_name[IFNAMSIZ ]__initdata = {0 , };/* Protocols supported by available interfaces */ -static int ic_proto_have_if__initdata ; +static int ic_proto_have_if __initbss;/* MTU for boot device */ -static int ic_dev_mtu__initdata ; +static int ic_dev_mtu __initbss;#ifdef IPCONFIG_DYNAMIC static DEFINE_SPINLOCK (ic_recv_lock); -static volatile int ic_got_reply__initdata ;/* Proto(s) that replied */ +static volatile int ic_got_reply __initbss; /* Proto(s) that replied */#endif #ifdef IPCONFIG_DHCP -static int ic_dhcp_msgtype__initdata ;/* DHCP msg type received */ +static int ic_dhcp_msgtype __initbss; /* DHCP msg type received */#endif
@@ -186,8 +186,8 @@ struct ic_device {__be32 xid; }; -static struct ic_device *ic_first_dev__initdata ;/* List of open device */ -static struct net_device *ic_dev__initdata ;/* Selected device */ +static struct ic_device *ic_first_dev __initbss; /* List of open device */ +static struct net_device *ic_dev __initbss; /* Selected device */static bool __init ic_is_init_dev (struct net_device *dev) {
security/apparmor/lsm.c +1 -1
@@ -37,7 +37,7 @@#include "include/procattr.h" /* Flag indicating whether initialization completed */ -int apparmor_initialized__initdata ; +int apparmor_initialized __initbss;/* * LSM hook functions
security/integrity/ima/ima_policy.c +2 -2
@@ -139,7 +139,7 @@ static struct list_head *ima_rules;static DEFINE_MUTEX (ima_rules_mutex); -static int ima_policy__initdata ; +static int ima_policy __initbss;static int __init default_measure_policy_setup (char *str) {if (ima_policy)
@@ -162,7 +162,7 @@ static int __init policy_setup(char *str) }__setup ("ima_policy=" , policy_setup); -static bool ima_use_appraise_tcb__initdata ; +static bool ima_use_appraise_tcb __initbss;static int __init default_appraise_policy_setup (char *str) { ima_use_appraise_tcb =1 ;
sound/oss/aedsp16.c +2 -2
@@ -409,8 +409,8 @@#define INIT_MSS (1<<1)#define INIT_MPU401 (1<<2) -static int soft_cfg__initdata =0 ;/* bitmapped config */ -static int soft_cfg_mss__initdata =0 ;/* bitmapped mss config */ +static int soft_cfg __initbss; /* bitmapped config */ +static int soft_cfg_mss __initbss; /* bitmapped mss config */static int ver[CARDVERDIGITS ]__initdata = {0 ,0 };/* DSP Ver: hi->ver[0] lo->ver[1] */
sound/oss/msnd_pinnacle.c +8 -8
@@ -1630,20 +1630,20 @@ static int write_ndelay __initdata = -1;static int cfg__initdata =-1 ;/* Extra Peripheral Configuration */ -static int reset__initdata =0 ; -static int mpu_io__initdata =0 ; -static int mpu_irq__initdata =0 ; -static int ide_io0__initdata =0 ; -static int ide_io1__initdata =0 ; -static int ide_irq__initdata =0 ; -static int joystick_io__initdata =0 ; +static int reset __initbss; +static int mpu_io __initbss; +static int mpu_irq __initbss; +static int ide_io0 __initbss; +static int ide_io1 __initbss; +static int ide_irq __initbss; +static int joystick_io __initbss;/* If we have the digital daugherboard... */ static bool digital__initdata = false;#endif static int fifosize__initdata =DEFFIFOSIZE ; -static int calibrate_signal__initdata =0 ; +static int calibrate_signal __initbss;#else /* not a module */
build result :
yalin@ubuntu:~/linux-next$ ll ../kernel_out_arm/arch/arm/boot/*Image* -rwxrwxr-x 1 yalin yalin 14487552 Oct 13 15:08 ../kernel_out_arm/arch/arm/boot/Image* # apply the patch -rwxrwxr-x 1 yalin yalin 14512128 Oct 12 11:48 ../kernel_out_arm/arch/arm/boot/Image_old* -rwxrwxr-x 1 yalin yalin 6479568 Oct 13 15:08 ../kernel_out_arm/arch/arm/boot/zImage* # apply the patch -rwxrwxr-x 1 yalin yalin 6479664 Oct 12 17:31 ../kernel_out_arm/arch/arm/boot/zImage_old*
Image size shrink about 24576 bytes
zImage seems not change much .
it will be more useful for platform which don’t use compress Image like ARM64 / x86 platform i think.
Thanks
Arnd Bergmann
maintainerQuoted 11 lines · On Tuesday 13 October 2015 15:33:10 yalin wang wrote:
Quoted 11 lines · Sam Ravnborg
include/asm-generic/vmlinux.lds.h
Quoted 6 lines
include/asm-generic/vmlinux.lds.h +1
-1-#define BSS_SECTION (sbss_align, bss_align, stop_align) \ +#define BSS_SECTION (sbss_align, bss_align, initbss_align, stop_align) \A few comments:
Quoted 9 lines
Quoted 7 lines
1) - please align the backslash at the end of the
line with the backslash above it.
2) - you need to fix all the remaining users ofBSS_SECTION.
3) - do we really need the flexibility to specify an alignment (stop_align)? If not - drop the extra argument.Sam
i change lots of
__initdatato__initbssto test it on ARM arch,
Ok, I found my mistake in the script I used to calculate the savings, here is the correct output showing all uninitialized variables in multi_v7_defconfig:
4 done.44688
1024 boot_command_line
1024 tmp_cmdline.44689
4 late_time_init
4 root_mount_data
4 root_fs_names
4 rd_doload
4 root_delay
64 saved_root_name
4 root_device_name
4 message
4 byte_count
4 victim
4 collected
8 this_header
4 state
4 collect
4 remains
4 next_state
8 header_buf
8 next_header
4 do_retain_initrd
4 name_len
4 body_len
4 gid
4 uid
4 mtime
4 wfd
4 vcollected
4 ino
4 mode
4 nlink
4 major
4 minor
4 rdev
4 symlink_buf
4 name_buf
64 msg_buf.29770
128 head
4 machine_desc
4 usermem.34390
4 __atags_pointer
1024 cmd_line
1024 default_command_line
1536 atags_copy
4 dma_mmu_remap_num
64 dma_mmu_remap
4 phys_initrd_start
4024 phys_initrd_size
4096 bm_pte
4 ecc_mask
4 initial_pmd_value
4 arm_lowmem_limit
24 s5p_mfc_mem
28 tx_pad_name
4 use_gptimer_clksrc
4 omap_table_init
4 mpurate
4 am35xx_aes_hwmod_ocp_ifs
4 am35xx_sham_hwmod_ocp_ifs
4 dra72x_hwmod_ocp_ifs
4 rx51_vibra_data
4 num_special_pds
128 special_pds
4 main_extable_sort_needed
4 new_log_buf_len
24 opts.36513
512 smap.22469
512 dmap.22470
64 group_map.22521
64 group_cnt.22522
4 pcpu_chosen_fc
4 vmlist
4 vm_init_off.26867
4 reset_managed_pages_done
116 boot_kmem_cache_node.32827
116 boot_kmem_cache.32826
4 dhash_entries
4 ihash_entries
4 mhash_entries
4 mphash_entries
256 nfs_root_parms
1028 nfs_export_path
1028 nfs_root_device
4 gic_cnt
4 threshold_index
4096 ata_force_param_buf
4 mtd_devs
2432 mtd_dev_param
8 m68k_probes
8 isa_probes
4 arch_timers_present
4 dt_root_size_cells
4 dt_root_addr_cells
4 imx_keep_uart_clocks
4 imx_uart_clocks
4 mt8173_top_clk_data
4 mt8173_pll_clk_data
4 cpg_mode
4 cpg_mode_rates
4 cpg_mode_divs
4 cpg_mode
4 cpg_mode
4 thash_entries
4 uhash_entries
4 ic_got_reply
4 ic_first_dev
4 ic_dev
16 user_dev_name
4 ic_dhcp_msgtype
4 ic_host_name_set
4 ic_dev_mtu
4 ic_set_manually
4 ic_enable
256 vendor_class_identifier
4 ic_proto_have_if
4 dma_reserve
4 nr_kernel_pages
4 nr_all_pages
196 __clk_of_table_sentinel
200 __rmem_of_table_sentinel
196 __clksrc_of_table_sentinel
200 __iommu_of_table_sentinel
8 __cpu_method_of_table_sentinel
8 __cpuidle_method_of_table_sentinel
196 irqchip_of_match_end
32 __earlycon_table_sentinel
200 __earlycon_of_table_sentinel
6 __irf_end
26398 total
Quoted 160 lines · Arnd Bergmann
Quoted 11 lines · On Tuesday 13 October 2015 15:33:10 yalin wang wrote:
Quoted 11 lines · Sam Ravnborg
include/asm-generic/vmlinux.lds.h
Quoted 6 lines
include/asm-generic/vmlinux.lds.h +1
-1-#define BSS_SECTION (sbss_align, bss_align, stop_align) \ +#define BSS_SECTION (sbss_align, bss_align, initbss_align, stop_align) \A few comments:
Quoted 9 lines
Quoted 7 lines
1) - please align the backslash at the end of the
line with the backslash above it.
2) - you need to fix all the remaining users ofBSS_SECTION.
3) - do we really need the flexibility to specify an alignment (stop_align)? If not - drop the extra argument.Sam
i change lots of
__initdatato__initbssto test it on ARM arch,Ok, I found my mistake in the script I used to calculate the savings, here is the correct output showing all uninitialized variables in
multi_v7_defconfig:4 done.44688
1024boot_command_line
1024 tmp_cmdline.44689
4late_time_init
4root_mount_data
4root_fs_names
4rd_doload
4root_delay
64saved_root_name
4root_device_name
4 message
4byte_count
4 victim
4 collected
8this_header
4 state
4 collect
4 remains
4next_state
8header_buf
8next_header
4do_retain_initrd
4name_len
4body_len
4 gid
4 uid
4 mtime
4 wfd
4 vcollected
4 ino
4 mode
4 nlink
4 major
4 minor
4 rdev
4symlink_buf
4name_buf
64 msg_buf.29770
128 head
4machine_desc
4 usermem.34390
4__atags_pointer
1024cmd_line
1024default_command_line
1536atags_copy
4dma_mmu_remap_num
64dma_mmu_remap
4phys_initrd_start
4024phys_initrd_size
4096bm_pte
4ecc_mask
4initial_pmd_value
4arm_lowmem_limit
24s5p_mfc_mem
28tx_pad_name
4use_gptimer_clksrc
4omap_table_init
4 mpurate
4am35xx_aes_hwmod_ocp_ifs
4am35xx_sham_hwmod_ocp_ifs
4dra72x_hwmod_ocp_ifs
4rx51_vibra_data
4num_special_pds
128special_pds
4main_extable_sort_needed
4new_log_buf_len
24 opts.36513
512 smap.22469
512 dmap.22470
64 group_map.22521
64 group_cnt.22522
4pcpu_chosen_fc
4 vmlist
4 vm_init_off.26867
4reset_managed_pages_done
116 boot_kmem_cache_node.32827
116 boot_kmem_cache.32826
4dhash_entries
4ihash_entries
4mhash_entries
4mphash_entries
256nfs_root_parms
1028nfs_export_path
1028nfs_root_device
4gic_cnt
4threshold_index
4096ata_force_param_buf
4mtd_devs
2432mtd_dev_param
8m68k_probes
8isa_probes
4arch_timers_present
4dt_root_size_cells
4dt_root_addr_cells
4imx_keep_uart_clocks
4imx_uart_clocks
4mt8173_top_clk_data
4mt8173_pll_clk_data
4cpg_mode
4cpg_mode_rates
4cpg_mode_divs
4cpg_mode
4cpg_mode
4thash_entries
4uhash_entries
4ic_got_reply
4ic_first_dev
4ic_dev
16user_dev_name
4ic_dhcp_msgtype
4ic_host_name_set
4ic_dev_mtu
4ic_set_manually
4ic_enable
256vendor_class_identifier
4ic_proto_have_if
4dma_reserve
4nr_kernel_pages
4nr_all_pages
196__clk_of_table_sentinel
200__rmem_of_table_sentinel
196__clksrc_of_table_sentinel
200__iommu_of_table_sentinel
8__cpu_method_of_table_sentinel
8__cpuidle_method_of_table_sentinel
196irqchip_of_match_end
32__earlycon_table_sentinel
200__earlycon_of_table_sentinel
6__irf_end
Quoted 1 line
26398 total
i am curious about your scripts ,
could you show me ?
Thank you !
Arnd Bergmann
maintainerQuoted 8 lines · On Tuesday 13 October 2015 17:51:32 yalin wang wrote:
Quoted 6 lines
32
__earlycon_table_sentinel
200__earlycon_of_table_sentinel
6__irf_end26398 total
i am curious about your scripts ,
could you show me ?
I was using some ad-hoc command line tricks, including
objcopy -j .init.data build/multi_v7_defconfig/vmlinux /tmp/initdata
nm initdata | sort -n | { read start b sym ; while read a b c ; do objdump -Dr --start-address=0x$start --stop-address=0x$a initdata > initdata.d/$sym ; start=$a ; sym=$c ; done } (some manual sorting to delete the files that have pre-initialized symbols)
sum=0 ; nm /tmp/initdata | sort -n | { read start b sym ; while read a b c ; do test -e ../$sym && { echo $[0x$a - 0x$start]\ $sym ; sum=$[$sum + $[0x$a - 0x$start]] ; } ; start=$a ; sym=$c ; done ; echo $sum;}
I'm sure there are better ways to do this, and the manual step I used at first was faulty.
Arnd
Arnd Bergmann
maintainerQuoted 8 lines · On Tuesday 13 October 2015 17:51:32 yalin wang wrote:
Quoted 6 lines
32
__earlycon_table_sentinel
200__earlycon_of_table_sentinel
6__irf_end26398 total
i am curious about your scripts ,
could you show me ?
I was using some ad-hoc command line tricks, including
objcopy -j .init.data build/multi_v7_defconfig/vmlinux /tmp/initdata
nm initdata | sort -n | { read start b sym ; while read a b c ; do objdump -Dr --start-address=0x$start --stop-address=0x$a initdata > initdata.d/$sym ; start=$a ; sym=$c ; done } (some manual sorting to delete the files that have pre-initialized symbols)
sum=0 ; nm /tmp/initdata | sort -n | { read start b sym ; while read a b c ; do test -e ../$sym && { echo $[0x$a - 0x$start]\ $sym ; sum=$[$sum + $[0x$a - 0x$start]] ; } ; start=$a ; sym=$c ; done ; echo $sum;}
I'm sure there are better ways to do this, and the manual step I used at first was faulty.
Arnd
Arnd Bergmann
maintainerQuoted 11 lines · On Tuesday 13 October 2015 15:33:10 yalin wang wrote:
Quoted 11 lines · Sam Ravnborg
include/asm-generic/vmlinux.lds.h
Quoted 6 lines
include/asm-generic/vmlinux.lds.h +1
-1-#define BSS_SECTION (sbss_align, bss_align, stop_align) \ +#define BSS_SECTION (sbss_align, bss_align, initbss_align, stop_align) \A few comments:
Quoted 9 lines
Quoted 7 lines
1) - please align the backslash at the end of the
line with the backslash above it.
2) - you need to fix all the remaining users ofBSS_SECTION.
3) - do we really need the flexibility to specify an alignment (stop_align)? If not - drop the extra argument.Sam
i change lots of
__initdatato__initbssto test it on ARM arch,
Ok, I found my mistake in the script I used to calculate the savings, here is the correct output showing all uninitialized variables in multi_v7_defconfig:
4 done.44688
1024 boot_command_line
1024 tmp_cmdline.44689
4 late_time_init
4 root_mount_data
4 root_fs_names
4 rd_doload
4 root_delay
64 saved_root_name
4 root_device_name
4 message
4 byte_count
4 victim
4 collected
8 this_header
4 state
4 collect
4 remains
4 next_state
8 header_buf
8 next_header
4 do_retain_initrd
4 name_len
4 body_len
4 gid
4 uid
4 mtime
4 wfd
4 vcollected
4 ino
4 mode
4 nlink
4 major
4 minor
4 rdev
4 symlink_buf
4 name_buf
64 msg_buf.29770
128 head
4 machine_desc
4 usermem.34390
4 __atags_pointer
1024 cmd_line
1024 default_command_line
1536 atags_copy
4 dma_mmu_remap_num
64 dma_mmu_remap
4 phys_initrd_start
4024 phys_initrd_size
4096 bm_pte
4 ecc_mask
4 initial_pmd_value
4 arm_lowmem_limit
24 s5p_mfc_mem
28 tx_pad_name
4 use_gptimer_clksrc
4 omap_table_init
4 mpurate
4 am35xx_aes_hwmod_ocp_ifs
4 am35xx_sham_hwmod_ocp_ifs
4 dra72x_hwmod_ocp_ifs
4 rx51_vibra_data
4 num_special_pds
128 special_pds
4 main_extable_sort_needed
4 new_log_buf_len
24 opts.36513
512 smap.22469
512 dmap.22470
64 group_map.22521
64 group_cnt.22522
4 pcpu_chosen_fc
4 vmlist
4 vm_init_off.26867
4 reset_managed_pages_done
116 boot_kmem_cache_node.32827
116 boot_kmem_cache.32826
4 dhash_entries
4 ihash_entries
4 mhash_entries
4 mphash_entries
256 nfs_root_parms
1028 nfs_export_path
1028 nfs_root_device
4 gic_cnt
4 threshold_index
4096 ata_force_param_buf
4 mtd_devs
2432 mtd_dev_param
8 m68k_probes
8 isa_probes
4 arch_timers_present
4 dt_root_size_cells
4 dt_root_addr_cells
4 imx_keep_uart_clocks
4 imx_uart_clocks
4 mt8173_top_clk_data
4 mt8173_pll_clk_data
4 cpg_mode
4 cpg_mode_rates
4 cpg_mode_divs
4 cpg_mode
4 cpg_mode
4 thash_entries
4 uhash_entries
4 ic_got_reply
4 ic_first_dev
4 ic_dev
16 user_dev_name
4 ic_dhcp_msgtype
4 ic_host_name_set
4 ic_dev_mtu
4 ic_set_manually
4 ic_enable
256 vendor_class_identifier
4 ic_proto_have_if
4 dma_reserve
4 nr_kernel_pages
4 nr_all_pages
196 __clk_of_table_sentinel
200 __rmem_of_table_sentinel
196 __clksrc_of_table_sentinel
200 __iommu_of_table_sentinel
8 __cpu_method_of_table_sentinel
8 __cpuidle_method_of_table_sentinel
196 irqchip_of_match_end
32 __earlycon_table_sentinel
200 __earlycon_of_table_sentinel
6 __irf_end
26398 total