* [PATCH 01/17] percpu: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 02/17] pinctrl: " Uwe Kleine-König
` (16 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: kernel, Christoph Lameter, Tejun Heo, linux-mm
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: linux-mm@kvack.org
---
mm/percpu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index f47af91..5e812f5 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1370,7 +1370,7 @@ int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai,
#ifdef CONFIG_SMP
-const char *pcpu_fc_names[PCPU_FC_NR] __initdata = {
+const char *pcpu_fc_names[PCPU_FC_NR] __initconst = {
[PCPU_FC_AUTO] = "auto",
[PCPU_FC_EMBED] = "embed",
[PCPU_FC_PAGE] = "page",
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 02/17] pinctrl: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
2012-03-29 21:12 ` [PATCH 01/17] percpu: mark const init data with __initconst instead of __initdata Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-04-03 20:28 ` Linus Walleij
2012-03-29 21:12 ` [PATCH 03/17] ARM: " Uwe Kleine-König
` (15 subsequent siblings)
17 siblings, 1 reply; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, Linus Walleij, Randy Dunlap
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>
---
Documentation/pinctrl.txt | 2 +-
drivers/pinctrl/pinctrl-coh901.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index d97bccf..b56a309 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -786,7 +786,7 @@ and spi on the second function mapping:
#include <linux/pinctrl/machine.h>
-static const struct pinctrl_map __initdata mapping[] = {
+static const struct pinctrl_map __initconst mapping[] = {
{
.dev_name = "foo-spi.0",
.name = PINCTRL_STATE_DEFAULT,
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
index 0797eba..55697a5 100644
--- a/drivers/pinctrl/pinctrl-coh901.c
+++ b/drivers/pinctrl/pinctrl-coh901.c
@@ -174,7 +174,7 @@ struct u300_gpio_confdata {
/* Initial configuration */
-static const struct __initdata u300_gpio_confdata
+static const struct __initconst u300_gpio_confdata
bs335_gpio_config[BS335_GPIO_NUM_PORTS][U300_GPIO_PINS_PER_PORT] = {
/* Port 0, pins 0-7 */
{
@@ -255,7 +255,7 @@ bs335_gpio_config[BS335_GPIO_NUM_PORTS][U300_GPIO_PINS_PER_PORT] = {
}
};
-static const struct __initdata u300_gpio_confdata
+static const struct __initconst u300_gpio_confdata
bs365_gpio_config[BS365_GPIO_NUM_PORTS][U300_GPIO_PINS_PER_PORT] = {
/* Port 0, pins 0-7 */
{
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 02/17] pinctrl: mark const init data with __initconst instead of __initdata
2012-03-29 21:12 ` [PATCH 02/17] pinctrl: " Uwe Kleine-König
@ 2012-04-03 20:28 ` Linus Walleij
0 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2012-04-03 20:28 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: linux-kernel, Andrew Morton, kernel, Randy Dunlap
2012/3/29 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> As long as there is no other non-const variable marked __initdata in the
> same compilation unit it doesn't hurt. If there were one however
> compilation would fail with
>
> error: $variablename causes a section type conflict
>
> because a section containing const variables is marked read only and so
> cannot contain non-const variables.
Thanks. applied, U300 compiles fine so I trust you on this
advice!
Linus Walleij
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
2012-03-29 21:12 ` [PATCH 01/17] percpu: mark const init data with __initconst instead of __initdata Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 02/17] pinctrl: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 22:31 ` David Brown
` (3 more replies)
2012-03-29 21:12 ` [PATCH 04/17] FRV: " Uwe Kleine-König
` (14 subsequent siblings)
17 siblings, 4 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: kernel, Andrew Victor, Nicolas Ferre,
Jean-Christophe Plagniol-Villard, Russell King, Sekhar Nori,
Kevin Hilman, Kukjin Kim, Sascha Hauer, Shawn Guo,
Lennert Buytenhek, Nicolas Pitre, Eric Miao, Haojian Zhuang,
David Brown, Daniel Walker, Bryan Huntsman, Tony Lindgren,
Barry Song, Andrew Lunn, Lucas De Marchi, linux-arm-kernel,
davinci-linux-open-source, linux-samsung-soc, linux-arm-msm,
linux-omap
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Barry Song <baohua.song@csr.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: linux-arm-kernel@lists.infradead.org
Cc: davinci-linux-open-source@linux.davincidsp.com
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-omap@vger.kernel.org
---
arch/arm/mach-at91/board-dt.c | 2 +-
arch/arm/mach-at91/clock.c | 2 +-
arch/arm/mach-davinci/board-tnetv107x-evm.c | 6 ++--
arch/arm/mach-davinci/da830.c | 48 ++++++++++++------------
arch/arm/mach-davinci/da850.c | 6 ++--
arch/arm/mach-dove/addr-map.c | 2 +-
arch/arm/mach-exynos/mach-exynos4-dt.c | 2 +-
arch/arm/mach-exynos/mach-exynos5-dt.c | 2 +-
arch/arm/mach-imx/imx27-dt.c | 2 +-
arch/arm/mach-imx/imx51-dt.c | 2 +-
arch/arm/mach-imx/imx53-dt.c | 2 +-
arch/arm/mach-imx/mach-imx6q.c | 2 +-
arch/arm/mach-kirkwood/addr-map.c | 2 +-
arch/arm/mach-mmp/mmp-dt.c | 2 +-
arch/arm/mach-msm/board-msm8x60.c | 2 +-
arch/arm/mach-msm/board-qsd8x50.c | 4 +-
arch/arm/mach-omap2/board-generic.c | 8 ++--
arch/arm/mach-omap2/display.c | 6 ++--
arch/arm/mach-omap2/voltagedomains3xxx_data.c | 2 +-
arch/arm/mach-omap2/voltagedomains44xx_data.c | 2 +-
arch/arm/mach-orion5x/addr-map.c | 2 +-
arch/arm/mach-prima2/prima2.c | 2 +-
22 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
index c18d4d3..1c48ea2 100644
--- a/arch/arm/mach-at91/board-dt.c
+++ b/arch/arm/mach-at91/board-dt.c
@@ -48,7 +48,7 @@ static void __init at91_dt_device_init(void)
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
-static const char *at91_dt_board_compat[] __initdata = {
+static const char *at91_dt_board_compat[] __initconst = {
"atmel,at91sam9m10g45ek",
"atmel,at91sam9x5ek",
"calao,usb-a9g20",
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index a0f4d74..e4a255d 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -613,7 +613,7 @@ fail:
return 0;
}
-static struct clk *const standard_pmc_clocks[] __initdata = {
+static struct clk *const standard_pmc_clocks[] __initconst = {
/* four primary clocks */
&clk32k,
&main_clk,
diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c
index 5f14e30..645a587 100644
--- a/arch/arm/mach-davinci/board-tnetv107x-evm.c
+++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c
@@ -88,7 +88,7 @@ static struct davinci_mmc_config mmc_config = {
.version = MMC_CTLR_VERSION_1,
};
-static const short sdio1_pins[] __initdata = {
+static const short sdio1_pins[] __initconst = {
TNETV107X_SDIO1_CLK_1, TNETV107X_SDIO1_CMD_1,
TNETV107X_SDIO1_DATA0_1, TNETV107X_SDIO1_DATA1_1,
TNETV107X_SDIO1_DATA2_1, TNETV107X_SDIO1_DATA3_1,
@@ -96,12 +96,12 @@ static const short sdio1_pins[] __initdata = {
-1
};
-static const short uart1_pins[] __initdata = {
+static const short uart1_pins[] __initconst = {
TNETV107X_UART1_RD, TNETV107X_UART1_TD,
-1
};
-static const short ssp_pins[] __initdata = {
+static const short ssp_pins[] __initconst = {
TNETV107X_SSP0_0, TNETV107X_SSP0_1, TNETV107X_SSP0_2,
TNETV107X_SSP1_0, TNETV107X_SSP1_1, TNETV107X_SSP1_2,
TNETV107X_SSP1_3, -1
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index deee5c2..510648e 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -838,7 +838,7 @@ static const struct mux_config da830_pins[] = {
#endif
};
-const short da830_emif25_pins[] __initdata = {
+const short da830_emif25_pins[] __initconst = {
DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3,
DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7,
DA830_EMA_D_8, DA830_EMA_D_9, DA830_EMA_D_10, DA830_EMA_D_11,
@@ -853,19 +853,19 @@ const short da830_emif25_pins[] __initdata = {
-1
};
-const short da830_spi0_pins[] __initdata = {
+const short da830_spi0_pins[] __initconst = {
DA830_SPI0_SOMI_0, DA830_SPI0_SIMO_0, DA830_SPI0_CLK, DA830_NSPI0_ENA,
DA830_NSPI0_SCS_0,
-1
};
-const short da830_spi1_pins[] __initdata = {
+const short da830_spi1_pins[] __initconst = {
DA830_SPI1_SOMI_0, DA830_SPI1_SIMO_0, DA830_SPI1_CLK, DA830_NSPI1_ENA,
DA830_NSPI1_SCS_0,
-1
};
-const short da830_mmc_sd_pins[] __initdata = {
+const short da830_mmc_sd_pins[] __initconst = {
DA830_MMCSD_DAT_0, DA830_MMCSD_DAT_1, DA830_MMCSD_DAT_2,
DA830_MMCSD_DAT_3, DA830_MMCSD_DAT_4, DA830_MMCSD_DAT_5,
DA830_MMCSD_DAT_6, DA830_MMCSD_DAT_7, DA830_MMCSD_CLK,
@@ -873,32 +873,32 @@ const short da830_mmc_sd_pins[] __initdata = {
-1
};
-const short da830_uart0_pins[] __initdata = {
+const short da830_uart0_pins[] __initconst = {
DA830_NUART0_CTS, DA830_NUART0_RTS, DA830_UART0_RXD, DA830_UART0_TXD,
-1
};
-const short da830_uart1_pins[] __initdata = {
+const short da830_uart1_pins[] __initconst = {
DA830_UART1_RXD, DA830_UART1_TXD,
-1
};
-const short da830_uart2_pins[] __initdata = {
+const short da830_uart2_pins[] __initconst = {
DA830_UART2_RXD, DA830_UART2_TXD,
-1
};
-const short da830_usb20_pins[] __initdata = {
+const short da830_usb20_pins[] __initconst = {
DA830_USB0_DRVVBUS, DA830_USB_REFCLKIN,
-1
};
-const short da830_usb11_pins[] __initdata = {
+const short da830_usb11_pins[] __initconst = {
DA830_USB_REFCLKIN,
-1
};
-const short da830_uhpi_pins[] __initdata = {
+const short da830_uhpi_pins[] __initconst = {
DA830_UHPI_HD_0, DA830_UHPI_HD_1, DA830_UHPI_HD_2, DA830_UHPI_HD_3,
DA830_UHPI_HD_4, DA830_UHPI_HD_5, DA830_UHPI_HD_6, DA830_UHPI_HD_7,
DA830_UHPI_HD_8, DA830_UHPI_HD_9, DA830_UHPI_HD_10, DA830_UHPI_HD_11,
@@ -909,14 +909,14 @@ const short da830_uhpi_pins[] __initdata = {
-1
};
-const short da830_cpgmac_pins[] __initdata = {
+const short da830_cpgmac_pins[] __initconst = {
DA830_RMII_TXD_0, DA830_RMII_TXD_1, DA830_RMII_TXEN, DA830_RMII_CRS_DV,
DA830_RMII_RXD_0, DA830_RMII_RXD_1, DA830_RMII_RXER, DA830_MDIO_CLK,
DA830_MDIO_D,
-1
};
-const short da830_emif3c_pins[] __initdata = {
+const short da830_emif3c_pins[] __initconst = {
DA830_EMB_SDCKE, DA830_EMB_CLK_GLUE, DA830_EMB_CLK, DA830_NEMB_CS_0,
DA830_NEMB_CAS, DA830_NEMB_RAS, DA830_NEMB_WE, DA830_EMB_BA_1,
DA830_EMB_BA_0, DA830_EMB_A_0, DA830_EMB_A_1, DA830_EMB_A_2,
@@ -935,7 +935,7 @@ const short da830_emif3c_pins[] __initdata = {
-1
};
-const short da830_mcasp0_pins[] __initdata = {
+const short da830_mcasp0_pins[] __initconst = {
DA830_AHCLKX0, DA830_ACLKX0, DA830_AFSX0,
DA830_AHCLKR0, DA830_ACLKR0, DA830_AFSR0, DA830_AMUTE0,
DA830_AXR0_0, DA830_AXR0_1, DA830_AXR0_2, DA830_AXR0_3,
@@ -945,7 +945,7 @@ const short da830_mcasp0_pins[] __initdata = {
-1
};
-const short da830_mcasp1_pins[] __initdata = {
+const short da830_mcasp1_pins[] __initconst = {
DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1,
DA830_AHCLKR1, DA830_ACLKR1, DA830_AFSR1, DA830_AMUTE1,
DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_3,
@@ -954,24 +954,24 @@ const short da830_mcasp1_pins[] __initdata = {
-1
};
-const short da830_mcasp2_pins[] __initdata = {
+const short da830_mcasp2_pins[] __initconst = {
DA830_AHCLKX2, DA830_ACLKX2, DA830_AFSX2,
DA830_AHCLKR2, DA830_ACLKR2, DA830_AFSR2, DA830_AMUTE2,
DA830_AXR2_0, DA830_AXR2_1, DA830_AXR2_2, DA830_AXR2_3,
-1
};
-const short da830_i2c0_pins[] __initdata = {
+const short da830_i2c0_pins[] __initconst = {
DA830_I2C0_SDA, DA830_I2C0_SCL,
-1
};
-const short da830_i2c1_pins[] __initdata = {
+const short da830_i2c1_pins[] __initconst = {
DA830_I2C1_SCL, DA830_I2C1_SDA,
-1
};
-const short da830_lcdcntl_pins[] __initdata = {
+const short da830_lcdcntl_pins[] __initconst = {
DA830_LCD_D_0, DA830_LCD_D_1, DA830_LCD_D_2, DA830_LCD_D_3,
DA830_LCD_D_4, DA830_LCD_D_5, DA830_LCD_D_6, DA830_LCD_D_7,
DA830_LCD_D_8, DA830_LCD_D_9, DA830_LCD_D_10, DA830_LCD_D_11,
@@ -981,34 +981,34 @@ const short da830_lcdcntl_pins[] __initdata = {
-1
};
-const short da830_pwm_pins[] __initdata = {
+const short da830_pwm_pins[] __initconst = {
DA830_ECAP0_APWM0, DA830_ECAP1_APWM1, DA830_EPWM0B, DA830_EPWM0A,
DA830_EPWMSYNCI, DA830_EPWMSYNC0, DA830_ECAP2_APWM2, DA830_EHRPWMGLUETZ,
DA830_EPWM2B, DA830_EPWM2A, DA830_EPWM1B, DA830_EPWM1A,
-1
};
-const short da830_ecap0_pins[] __initdata = {
+const short da830_ecap0_pins[] __initconst = {
DA830_ECAP0_APWM0,
-1
};
-const short da830_ecap1_pins[] __initdata = {
+const short da830_ecap1_pins[] __initconst = {
DA830_ECAP1_APWM1,
-1
};
-const short da830_ecap2_pins[] __initdata = {
+const short da830_ecap2_pins[] __initconst = {
DA830_ECAP2_APWM2,
-1
};
-const short da830_eqep0_pins[] __initdata = {
+const short da830_eqep0_pins[] __initconst = {
DA830_EQEP0I, DA830_EQEP0S, DA830_EQEP0A, DA830_EQEP0B,
-1
};
-const short da830_eqep1_pins[] __initdata = {
+const short da830_eqep1_pins[] __initconst = {
DA830_EQEP1I, DA830_EQEP1S, DA830_EQEP1A, DA830_EQEP1B,
-1
};
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index b44dc84..6676dee 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -576,17 +576,17 @@ static const struct mux_config da850_pins[] = {
#endif
};
-const short da850_i2c0_pins[] __initdata = {
+const short da850_i2c0_pins[] __initconst = {
DA850_I2C0_SDA, DA850_I2C0_SCL,
-1
};
-const short da850_i2c1_pins[] __initdata = {
+const short da850_i2c1_pins[] __initconst = {
DA850_I2C1_SCL, DA850_I2C1_SDA,
-1
};
-const short da850_lcdcntl_pins[] __initdata = {
+const short da850_lcdcntl_pins[] __initconst = {
DA850_LCD_D_0, DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3,
DA850_LCD_D_4, DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7,
DA850_LCD_D_8, DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11,
diff --git a/arch/arm/mach-dove/addr-map.c b/arch/arm/mach-dove/addr-map.c
index 98b8c83b..93ea37d 100644
--- a/arch/arm/mach-dove/addr-map.c
+++ b/arch/arm/mach-dove/addr-map.c
@@ -49,7 +49,7 @@ static struct __initdata orion_addr_map_cfg addr_map_cfg = {
.bridge_virt_base = BRIDGE_VIRT_BASE,
};
-static const struct __initdata orion_addr_map_info addr_map_info[] = {
+static const struct orion_addr_map_info addr_map_info[] __initconst = {
/*
* Windows for PCIe IO+MEM space.
*/
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c
index 8245f1c..2b76302 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -72,7 +72,7 @@ static void __init exynos4210_dt_machine_init(void)
exynos4210_auxdata_lookup, NULL);
}
-static char const *exynos4210_dt_compat[] __initdata = {
+static char const *exynos4210_dt_compat[] __initconst = {
"samsung,exynos4210",
NULL
};
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index 0d26f50..9969dc1 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -61,7 +61,7 @@ static void __init exynos5250_dt_machine_init(void)
exynos5250_auxdata_lookup, NULL);
}
-static char const *exynos5250_dt_compat[] __initdata = {
+static char const *exynos5250_dt_compat[] __initconst = {
"samsung,exynos5250",
NULL
};
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index 861ceb8..a797d68 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -72,7 +72,7 @@ static struct sys_timer imx27_timer = {
.init = imx27_timer_init,
};
-static const char *imx27_dt_board_compat[] __initdata = {
+static const char *imx27_dt_board_compat[] __initconst = {
"fsl,imx27",
NULL
};
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
index 5cca573..7e00748 100644
--- a/arch/arm/mach-imx/imx51-dt.c
+++ b/arch/arm/mach-imx/imx51-dt.c
@@ -102,7 +102,7 @@ static struct sys_timer imx51_timer = {
.init = imx51_timer_init,
};
-static const char *imx51_dt_board_compat[] __initdata = {
+static const char *imx51_dt_board_compat[] __initconst = {
"fsl,imx51-babbage",
"fsl,imx51",
NULL
diff --git a/arch/arm/mach-imx/imx53-dt.c b/arch/arm/mach-imx/imx53-dt.c
index 4172279..0a02129 100644
--- a/arch/arm/mach-imx/imx53-dt.c
+++ b/arch/arm/mach-imx/imx53-dt.c
@@ -109,7 +109,7 @@ static struct sys_timer imx53_timer = {
.init = imx53_timer_init,
};
-static const char *imx53_dt_board_compat[] __initdata = {
+static const char *imx53_dt_board_compat[] __initconst = {
"fsl,imx53-ard",
"fsl,imx53-evk",
"fsl,imx53-qsb",
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index da6c1d9..59fd7de 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -129,7 +129,7 @@ static struct sys_timer imx6q_timer = {
.init = imx6q_timer_init,
};
-static const char *imx6q_dt_compat[] __initdata = {
+static const char *imx6q_dt_compat[] __initconst = {
"fsl,imx6q-arm2",
"fsl,imx6q-sabrelite",
"fsl,imx6q",
diff --git a/arch/arm/mach-kirkwood/addr-map.c b/arch/arm/mach-kirkwood/addr-map.c
index e9a7180..8ebb4ba 100644
--- a/arch/arm/mach-kirkwood/addr-map.c
+++ b/arch/arm/mach-kirkwood/addr-map.c
@@ -44,7 +44,7 @@ static struct __initdata orion_addr_map_cfg addr_map_cfg = {
.bridge_virt_base = BRIDGE_VIRT_BASE,
};
-static const struct __initdata orion_addr_map_info addr_map_info[] = {
+static const struct __initconst orion_addr_map_info addr_map_info[] = {
/*
* Windows for PCIe IO+MEM space.
*/
diff --git a/arch/arm/mach-mmp/mmp-dt.c b/arch/arm/mach-mmp/mmp-dt.c
index 6707539..43755ec 100644
--- a/arch/arm/mach-mmp/mmp-dt.c
+++ b/arch/arm/mach-mmp/mmp-dt.c
@@ -61,7 +61,7 @@ static void __init mmp_dt_init(void)
mmp_auxdata_lookup, NULL);
}
-static const char *pxa168_dt_board_compat[] __initdata = {
+static const char *pxa168_dt_board_compat[] __initconst = {
"mrvl,pxa168-aspenite",
NULL,
};
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 962e711..25597f5 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -92,7 +92,7 @@ static void __init msm8x60_dt_init(void)
msm_auxdata_lookup, NULL);
}
-static const char *msm8x60_fluid_match[] __initdata = {
+static const char *msm8x60_fluid_match[] __initconst = {
"qcom,msm8660-fluid",
"qcom,msm8660-surf",
NULL
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 7e8909c..11de242 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -39,8 +39,8 @@
extern struct sys_timer msm_timer;
-static const resource_size_t qsd8x50_surf_smc91x_base __initdata = 0x70000300;
-static const unsigned qsd8x50_surf_smc91x_gpio __initdata = 156;
+static const resource_size_t qsd8x50_surf_smc91x_base __initconst = 0x70000300;
+static const unsigned qsd8x50_surf_smc91x_gpio __initconst = 156;
/* Leave smc91x resources empty here, as we'll fill them in
* at run-time: they vary from board to board, and the true
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 74e1687..635dee4 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -57,7 +57,7 @@ static void __init omap_generic_init(void)
}
#ifdef CONFIG_SOC_OMAP2420
-static const char *omap242x_boards_compat[] __initdata = {
+static const char *omap242x_boards_compat[] __initconst = {
"ti,omap2420",
NULL,
};
@@ -76,7 +76,7 @@ MACHINE_END
#endif
#ifdef CONFIG_SOC_OMAP2430
-static const char *omap243x_boards_compat[] __initdata = {
+static const char *omap243x_boards_compat[] __initconst = {
"ti,omap2430",
NULL,
};
@@ -111,7 +111,7 @@ static void __init omap3_init(void)
omap_generic_init();
}
-static const char *omap3_boards_compat[] __initdata = {
+static const char *omap3_boards_compat[] __initconst = {
"ti,omap3",
NULL,
};
@@ -146,7 +146,7 @@ static void __init omap4_init(void)
omap_generic_init();
}
-static const char *omap4_boards_compat[] __initdata = {
+static const char *omap4_boards_compat[] __initconst = {
"ti,omap4",
NULL,
};
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 9706c64..df2ef11 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -74,14 +74,14 @@ struct omap_dss_hwmod_data {
const int id;
};
-static const struct omap_dss_hwmod_data omap2_dss_hwmod_data[] __initdata = {
+static const struct omap_dss_hwmod_data omap2_dss_hwmod_data[] __initconst = {
{ "dss_core", "omapdss_dss", -1 },
{ "dss_dispc", "omapdss_dispc", -1 },
{ "dss_rfbi", "omapdss_rfbi", -1 },
{ "dss_venc", "omapdss_venc", -1 },
};
-static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initdata = {
+static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initconst = {
{ "dss_core", "omapdss_dss", -1 },
{ "dss_dispc", "omapdss_dispc", -1 },
{ "dss_rfbi", "omapdss_rfbi", -1 },
@@ -89,7 +89,7 @@ static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initdata = {
{ "dss_dsi1", "omapdss_dsi", 0 },
};
-static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = {
+static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = {
{ "dss_core", "omapdss_dss", -1 },
{ "dss_dispc", "omapdss_dispc", -1 },
{ "dss_rfbi", "omapdss_rfbi", -1 },
diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
index 57db203..0819a02 100644
--- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
@@ -96,7 +96,7 @@ static struct voltagedomain *voltagedomains_am35xx[] __initdata = {
};
-static const char *sys_clk_name __initdata = "sys_ck";
+static const char *sys_clk_name __initconst = "sys_ck";
void __init omap3xxx_voltagedomains_init(void)
{
diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c
index c3115f6..787ce89 100644
--- a/arch/arm/mach-omap2/voltagedomains44xx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c
@@ -89,7 +89,7 @@ static struct voltagedomain *voltagedomains_omap4[] __initdata = {
NULL,
};
-static const char *sys_clk_name __initdata = "sys_clkin_ck";
+static const char *sys_clk_name __initconst = "sys_clkin_ck";
void __init omap44xx_voltagedomains_init(void)
{
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c
index 3638e5c..83a3d0b 100644
--- a/arch/arm/mach-orion5x/addr-map.c
+++ b/arch/arm/mach-orion5x/addr-map.c
@@ -82,7 +82,7 @@ static struct __initdata orion_addr_map_cfg addr_map_cfg = {
.bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE,
};
-static const struct __initdata orion_addr_map_info addr_map_info[] = {
+static const struct __initconst orion_addr_map_info addr_map_info[] = {
/*
* Setup windows for PCI+PCIe IO+MEM space.
*/
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/prima2.c
index 02b9c05..978fa2f 100644
--- a/arch/arm/mach-prima2/prima2.c
+++ b/arch/arm/mach-prima2/prima2.c
@@ -25,7 +25,7 @@ void __init sirfsoc_mach_init(void)
of_platform_bus_probe(NULL, sirfsoc_of_bus_ids, NULL);
}
-static const char *prima2cb_dt_match[] __initdata = {
+static const char *prima2cb_dt_match[] __initconst = {
"sirf,prima2-cb",
NULL
};
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
2012-03-29 21:12 ` [PATCH 03/17] ARM: " Uwe Kleine-König
@ 2012-03-29 22:31 ` David Brown
2012-03-30 4:34 ` Jean-Christophe PLAGNIOL-VILLARD
` (2 subsequent siblings)
3 siblings, 0 replies; 28+ messages in thread
From: David Brown @ 2012-03-29 22:31 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, kernel, Andrew Victor, Nicolas Ferre,
Jean-Christophe Plagniol-Villard, Russell King, Sekhar Nori,
Kevin Hilman, Kukjin Kim, Shawn Guo, Lennert Buytenhek,
Nicolas Pitre, Eric Miao, Haojian Zhuang, Daniel Walker,
Bryan Huntsman, Tony Lindgren, Barry Song, Andrew Lunn,
Lucas De Marchi, linux-arm-kernel, davinci-linux-open-source,
linux-samsung-soc, linux-arm-msm, linux-omap
On Thu, Mar 29, 2012 at 11:12:20PM +0200, Uwe Kleine-König wrote:
> arch/arm/mach-msm/board-msm8x60.c | 2 +-
> arch/arm/mach-msm/board-qsd8x50.c | 4 +-
Acked-by: David Brown <davidb@codeaurora.org>
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
2012-03-29 21:12 ` [PATCH 03/17] ARM: " Uwe Kleine-König
2012-03-29 22:31 ` David Brown
@ 2012-03-30 4:34 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-30 6:11 ` Shawn Guo
2012-03-30 16:11 ` Tony Lindgren
3 siblings, 0 replies; 28+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-30 4:34 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, kernel, Andrew Victor, Nicolas Ferre,
Russell King, Sekhar Nori, Kevin Hilman, Kukjin Kim, Shawn Guo,
Lennert Buytenhek, Nicolas Pitre, Eric Miao, Haojian Zhuang,
David Brown, Daniel Walker, Bryan Huntsman, Tony Lindgren,
Barry Song, Andrew Lunn, Lucas De Marchi, linux-arm-kernel,
davinci-linux-open-source, linux-samsung-soc, linux-arm-msm,
linux-omap
On 23:12 Thu 29 Mar , Uwe Kleine-König wrote:
> As long as there is no other non-const variable marked __initdata in the
> same compilation unit it doesn't hurt. If there were one however
> compilation would fail with
>
> error: $variablename causes a section type conflict
>
> because a section containing const variables is marked read only and so
> cannot contain non-const variables.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Andrew Victor <linux@maxim.org.za>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Lennert Buytenhek <kernel@wantstofly.org>
> Cc: Nicolas Pitre <nico@fluxnic.net>
> Cc: Eric Miao <eric.y.miao@gmail.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Daniel Walker <dwalker@fifo99.com>
> Cc: Bryan Huntsman <bryanh@codeaurora.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Barry Song <baohua.song@csr.com>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: davinci-linux-open-source@linux.davincidsp.com
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-omap@vger.kernel.org
> ---
> arch/arm/mach-at91/board-dt.c | 2 +-
> arch/arm/mach-at91/clock.c | 2 +-
for at91
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Best Regards,
J.
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
2012-03-29 21:12 ` [PATCH 03/17] ARM: " Uwe Kleine-König
2012-03-29 22:31 ` David Brown
2012-03-30 4:34 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-30 6:11 ` Shawn Guo
2012-03-30 9:50 ` Uwe Kleine-König
2012-03-30 16:11 ` Tony Lindgren
3 siblings, 1 reply; 28+ messages in thread
From: Shawn Guo @ 2012-03-30 6:11 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, kernel, Andrew Victor, Nicolas Ferre,
Jean-Christophe Plagniol-Villard, Russell King, Sekhar Nori,
Kevin Hilman, Kukjin Kim, Lennert Buytenhek, Nicolas Pitre,
Eric Miao, Haojian Zhuang, David Brown, Daniel Walker,
Bryan Huntsman, Tony Lindgren, Barry Song, Andrew Lunn,
Lucas De Marchi, linux-arm-kernel, davinci-linux-open-source,
linux-samsung-soc, linux-arm-msm, linux-omap
On Thu, Mar 29, 2012 at 11:12:20PM +0200, Uwe Kleine-König wrote:
...
> diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
> index 5cca573..7e00748 100644
> --- a/arch/arm/mach-imx/imx51-dt.c
> +++ b/arch/arm/mach-imx/imx51-dt.c
> @@ -102,7 +102,7 @@ static struct sys_timer imx51_timer = {
> .init = imx51_timer_init,
> };
>
> -static const char *imx51_dt_board_compat[] __initdata = {
> +static const char *imx51_dt_board_compat[] __initconst = {
> "fsl,imx51-babbage",
> "fsl,imx51",
> NULL
CC arch/arm/mach-imx/imx51-dt.o
arch/arm/mach-imx/imx51-dt.c:105:20: error: imx51_dt_board_compat causes a section type conflict
make[2]: *** [arch/arm/mach-imx/imx51-dt.o] Error 1
I do not understand why though.
--
Regards,
Shawn
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
2012-03-30 6:11 ` Shawn Guo
@ 2012-03-30 9:50 ` Uwe Kleine-König
2012-03-30 11:25 ` Shawn Guo
0 siblings, 1 reply; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 9:50 UTC (permalink / raw)
To: Shawn Guo
Cc: linux-kernel, Andrew Morton, kernel, Andrew Victor, Nicolas Ferre,
Jean-Christophe Plagniol-Villard, Russell King, Sekhar Nori,
Kevin Hilman, Kukjin Kim, Lennert Buytenhek, Nicolas Pitre,
Eric Miao, Haojian Zhuang, David Brown, Daniel Walker,
Bryan Huntsman, Tony Lindgren, Barry Song, Andrew Lunn,
Lucas De Marchi, linux-arm-kernel, davinci-linux-open-source,
linux-samsung-soc, linux-arm-msm, linux-omap
Hello Shawn,
On Fri, Mar 30, 2012 at 02:11:36PM +0800, Shawn Guo wrote:
> On Thu, Mar 29, 2012 at 11:12:20PM +0200, Uwe Kleine-König wrote:
> ...
> > diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
> > index 5cca573..7e00748 100644
> > --- a/arch/arm/mach-imx/imx51-dt.c
> > +++ b/arch/arm/mach-imx/imx51-dt.c
> > @@ -102,7 +102,7 @@ static struct sys_timer imx51_timer = {
> > .init = imx51_timer_init,
> > };
> >
> > -static const char *imx51_dt_board_compat[] __initdata = {
> > +static const char *imx51_dt_board_compat[] __initconst = {
> > "fsl,imx51-babbage",
> > "fsl,imx51",
> > NULL
>
> CC arch/arm/mach-imx/imx51-dt.o
> arch/arm/mach-imx/imx51-dt.c:105:20: error: imx51_dt_board_compat causes a section type conflict
> make[2]: *** [arch/arm/mach-imx/imx51-dt.o] Error 1
>
> I do not understand why though.
that's because the strings are constant, but the array is not. The fix
is:
-static const char *imx51_dt_board_compat[] __initconst = {
+static const char *const imx51_dt_board_compat[] __initconst = {
or keeping __initdata.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
2012-03-30 9:50 ` Uwe Kleine-König
@ 2012-03-30 11:25 ` Shawn Guo
0 siblings, 0 replies; 28+ messages in thread
From: Shawn Guo @ 2012-03-30 11:25 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, kernel, Andrew Victor, Nicolas Ferre,
Jean-Christophe Plagniol-Villard, Russell King, Sekhar Nori,
Kevin Hilman, Kukjin Kim, Lennert Buytenhek, Nicolas Pitre,
Eric Miao, Haojian Zhuang, David Brown, Daniel Walker,
Bryan Huntsman, Tony Lindgren, Barry Song, Andrew Lunn,
Lucas De Marchi, linux-arm-kernel, davinci-linux-open-source,
linux-samsung-soc, linux-arm-msm, linux-omap
On Fri, Mar 30, 2012 at 11:50:24AM +0200, Uwe Kleine-König wrote:
> Hello Shawn,
>
> On Fri, Mar 30, 2012 at 02:11:36PM +0800, Shawn Guo wrote:
> > On Thu, Mar 29, 2012 at 11:12:20PM +0200, Uwe Kleine-König wrote:
> > ...
> > > diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
> > > index 5cca573..7e00748 100644
> > > --- a/arch/arm/mach-imx/imx51-dt.c
> > > +++ b/arch/arm/mach-imx/imx51-dt.c
> > > @@ -102,7 +102,7 @@ static struct sys_timer imx51_timer = {
> > > .init = imx51_timer_init,
> > > };
> > >
> > > -static const char *imx51_dt_board_compat[] __initdata = {
> > > +static const char *imx51_dt_board_compat[] __initconst = {
> > > "fsl,imx51-babbage",
> > > "fsl,imx51",
> > > NULL
> >
> > CC arch/arm/mach-imx/imx51-dt.o
> > arch/arm/mach-imx/imx51-dt.c:105:20: error: imx51_dt_board_compat causes a section type conflict
> > make[2]: *** [arch/arm/mach-imx/imx51-dt.o] Error 1
> >
> > I do not understand why though.
> that's because the strings are constant, but the array is not.
Ah, yes. It indeed could be overlooked :)
--
Regards,
Shawn
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
2012-03-29 21:12 ` [PATCH 03/17] ARM: " Uwe Kleine-König
` (2 preceding siblings ...)
2012-03-30 6:11 ` Shawn Guo
@ 2012-03-30 16:11 ` Tony Lindgren
3 siblings, 0 replies; 28+ messages in thread
From: Tony Lindgren @ 2012-03-30 16:11 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, kernel, Andrew Victor, Nicolas Ferre,
Jean-Christophe Plagniol-Villard, Russell King, Sekhar Nori,
Kevin Hilman, Kukjin Kim, Shawn Guo, Lennert Buytenhek,
Nicolas Pitre, Eric Miao, Haojian Zhuang, David Brown,
Daniel Walker, Bryan Huntsman, Barry Song, Andrew Lunn,
Lucas De Marchi, linux-arm-kernel, davinci-linux-open-source,
linux-samsung-soc, linux-arm-msm, linux-omap
* Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [120329 14:16]:
> As long as there is no other non-const variable marked __initdata in the
> same compilation unit it doesn't hurt. If there were one however
> compilation would fail with
>
> error: $variablename causes a section type conflict
>
> because a section containing const variables is marked read only and so
> cannot contain non-const variables.
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 04/17] FRV: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (2 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 03/17] ARM: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 05/17] net: " Uwe Kleine-König
` (13 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, David Howells
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David Howells <dhowells@redhat.com>
---
arch/frv/mb93090-mb00/pci-irq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c
index 20f6497..808bcf7 100644
--- a/arch/frv/mb93090-mb00/pci-irq.c
+++ b/arch/frv/mb93090-mb00/pci-irq.c
@@ -28,7 +28,7 @@
*
*/
-static const uint8_t __initdata pci_bus0_irq_routing[32][4] = {
+static const uint8_t pci_bus0_irq_routing[32][4] __initconst = {
[0 ] = { IRQ_FPGA_MB86943_PCI_INTA },
[16] = { IRQ_FPGA_RTL8029_INTA },
[17] = { IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB },
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 05/17] net: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (3 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 04/17] FRV: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 06/17] hwmon: " Uwe Kleine-König
` (12 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: kernel, Andreas Koensgen, Klaus Kudielka, Joerg Reuter,
Jean-Paul Roubelat, netdev, linux-hams
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
Cc: Klaus Kudielka <klaus.kudielka@ieee.org>
Cc: Joerg Reuter <jreuter@yaina.de>
Cc: Jean-Paul Roubelat <jpr@f6fbb.org>
Cc: netdev@vger.kernel.org
Cc: linux-hams@vger.kernel.org
---
drivers/net/ethernet/8390/ne3210.c | 2 +-
drivers/net/hamradio/6pack.c | 4 ++--
drivers/net/hamradio/bpqether.c | 2 +-
drivers/net/hamradio/mkiss.c | 4 ++--
drivers/net/hamradio/scc.c | 2 +-
drivers/net/hamradio/yam.c | 2 +-
drivers/net/tokenring/smctr.c | 2 +-
drivers/net/wan/z85230.c | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/8390/ne3210.c b/drivers/net/ethernet/8390/ne3210.c
index a2f8b2b..f826e74 100644
--- a/drivers/net/ethernet/8390/ne3210.c
+++ b/drivers/net/ethernet/8390/ne3210.c
@@ -81,7 +81,7 @@ static void ne3210_block_output(struct net_device *dev, int count, const unsigne
static unsigned char irq_map[] __initdata = {15, 12, 11, 10, 9, 7, 5, 3};
static unsigned int shmem_map[] __initdata = {0xff0, 0xfe0, 0xfff0, 0xd8, 0xffe0, 0xffc0, 0xd0, 0x0};
-static const char *ifmap[] __initdata = {"UTP", "?", "BNC", "AUI"};
+static const char *ifmap[] __initconst = {"UTP", "?", "BNC", "AUI"};
static int ifmap_val[] __initdata = {
IF_PORT_10BASET,
IF_PORT_UNKNOWN,
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 64783a0..d225a2a 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -811,9 +811,9 @@ static struct tty_ldisc_ops sp_ldisc = {
/* Initialize 6pack control device -- register 6pack line discipline */
-static const char msg_banner[] __initdata = KERN_INFO \
+static const char msg_banner[] __initconst = KERN_INFO \
"AX.25: 6pack driver, " SIXPACK_VERSION "\n";
-static const char msg_regfail[] __initdata = KERN_ERR \
+static const char msg_regfail[] __initconst = KERN_ERR \
"6pack: can't register line discipline (err = %d)\n";
static int __init sixpack_init_driver(void)
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 76d5477..c2e5497 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -87,7 +87,7 @@
#include <linux/bpqether.h>
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
"AX.25: bpqether driver version 004\n";
static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index aed1a61..d694215 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -997,9 +997,9 @@ static struct tty_ldisc_ops ax_ldisc = {
.write_wakeup = mkiss_write_wakeup
};
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
"mkiss: AX.25 Multikiss, Hans Albas PE1AYX\n";
-static const char msg_regfail[] __initdata = KERN_ERR \
+static const char msg_regfail[] __initconst = KERN_ERR \
"mkiss: can't register line discipline (err = %d)\n";
static int __init mkiss_init_driver(void)
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index efc6c97..1b4a47b 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -182,7 +182,7 @@
#include "z8530.h"
-static const char banner[] __initdata = KERN_INFO \
+static const char banner[] __initconst = KERN_INFO \
"AX.25: Z8530 SCC driver version "VERSION".dl1bke\n";
static void t_dwait(unsigned long);
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 5a6412e..c6645f1 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -76,7 +76,7 @@
/* --------------------------------------------------------------------- */
static const char yam_drvname[] = "yam";
-static const char yam_drvinfo[] __initdata = KERN_INFO \
+static const char yam_drvinfo[] __initconst = KERN_INFO \
"YAM driver version 0.8 by F1OAT/F6FBB\n";
/* --------------------------------------------------------------------- */
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index cb35fb7..90b5f1e 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -59,7 +59,7 @@
#include "smctr.h" /* Our Stuff */
-static const char version[] __initdata =
+static const char version[] __initconst =
KERN_INFO "smctr.c: v1.4 7/12/00 by jschlst@samba.org\n";
static const char cardname[] = "smctr";
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
index 0e57690..feacc3b 100644
--- a/drivers/net/wan/z85230.c
+++ b/drivers/net/wan/z85230.c
@@ -1775,7 +1775,7 @@ EXPORT_SYMBOL(z8530_queue_xmit);
/*
* Module support
*/
-static const char banner[] __initdata =
+static const char banner[] __initconst =
KERN_INFO "Generic Z85C30/Z85230 interface driver v0.02\n";
static int __init z85230_init_driver(void)
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 06/17] hwmon: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (4 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 05/17] net: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 07/17] mfd: " Uwe Kleine-König
` (11 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: kernel, Jean Delvare, Guenter Roeck, lm-sensors
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: lm-sensors@lm-sensors.org
---
drivers/hwmon/w83627ehf.c | 18 +++++++++---------
drivers/hwmon/w83627hf.c | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index a25350c..54922ed 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -2619,15 +2619,15 @@ static struct platform_driver w83627ehf_driver = {
static int __init w83627ehf_find(int sioaddr, unsigned short *addr,
struct w83627ehf_sio_data *sio_data)
{
- static const char __initdata sio_name_W83627EHF[] = "W83627EHF";
- static const char __initdata sio_name_W83627EHG[] = "W83627EHG";
- static const char __initdata sio_name_W83627DHG[] = "W83627DHG";
- static const char __initdata sio_name_W83627DHG_P[] = "W83627DHG-P";
- static const char __initdata sio_name_W83627UHG[] = "W83627UHG";
- static const char __initdata sio_name_W83667HG[] = "W83667HG";
- static const char __initdata sio_name_W83667HG_B[] = "W83667HG-B";
- static const char __initdata sio_name_NCT6775[] = "NCT6775F";
- static const char __initdata sio_name_NCT6776[] = "NCT6776F";
+ static const char sio_name_W83627EHF[] __initconst = "W83627EHF";
+ static const char sio_name_W83627EHG[] __initconst = "W83627EHG";
+ static const char sio_name_W83627DHG[] __initconst = "W83627DHG";
+ static const char sio_name_W83627DHG_P[] __initconst = "W83627DHG-P";
+ static const char sio_name_W83627UHG[] __initconst = "W83627UHG";
+ static const char sio_name_W83667HG[] __initconst = "W83667HG";
+ static const char sio_name_W83667HG_B[] __initconst = "W83667HG-B";
+ static const char sio_name_NCT6775[] __initconst = "NCT6775F";
+ static const char sio_name_NCT6776[] __initconst = "NCT6776F";
u16 val;
const char *sio_name;
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 5ce54a2..aaf67ff 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -1206,7 +1206,7 @@ static int __init w83627hf_find(int sioaddr, unsigned short *addr,
int err = -ENODEV;
u16 val;
- static const __initdata char *names[] = {
+ static const char *names[] __initconst = {
"W83627HF",
"W83627THF",
"W83697HF",
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 07/17] mfd: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (5 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 06/17] hwmon: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 08/17] mips: " Uwe Kleine-König
` (10 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, Samuel Ortiz
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
drivers/mfd/ab5500-core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/ab5500-core.c b/drivers/mfd/ab5500-core.c
index 54d0fe4..3765c76 100644
--- a/drivers/mfd/ab5500-core.c
+++ b/drivers/mfd/ab5500-core.c
@@ -1291,7 +1291,7 @@ struct ab_family_id {
char *name;
};
-static const struct ab_family_id ids[] __initdata = {
+static const struct ab_family_id ids[] __initconst = {
/* AB5500 */
{
.id = AB5500_1_0,
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 08/17] mips: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (6 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 07/17] mfd: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 09/17] h8300: " Uwe Kleine-König
` (9 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, Ralf Baechle, linux-mips
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
---
arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +-
arch/mips/bcm63xx/dev-pcmcia.c | 4 ++--
arch/mips/mti-malta/malta-setup.c | 2 +-
arch/mips/pci/fixup-mpc30x.c | 4 ++--
arch/mips/powertv/asic/asic-calliope.c | 2 +-
arch/mips/powertv/asic/asic-cronus.c | 2 +-
arch/mips/powertv/asic/asic-gaia.c | 2 +-
arch/mips/powertv/asic/asic-zeus.c | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index 2f1773f..a3fe14e 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -591,7 +591,7 @@ static struct board_info __initdata board_DWVS0 = {
/*
* all boards
*/
-static const struct board_info __initdata *bcm963xx_boards[] = {
+static const struct board_info *bcm963xx_boards[] __initconst = {
#ifdef CONFIG_BCM63XX_CPU_6338
&board_96338gw,
&board_96338w,
diff --git a/arch/mips/bcm63xx/dev-pcmcia.c b/arch/mips/bcm63xx/dev-pcmcia.c
index de4d917..a551bab 100644
--- a/arch/mips/bcm63xx/dev-pcmcia.c
+++ b/arch/mips/bcm63xx/dev-pcmcia.c
@@ -79,11 +79,11 @@ static int __init config_pcmcia_cs(unsigned int cs,
return ret;
}
-static const __initdata struct {
+static const struct {
unsigned int cs;
unsigned int base;
unsigned int size;
-} pcmcia_cs[3] = {
+} pcmcia_cs[3] __initconst = {
{
.cs = MPI_CS_PCMCIA_COMMON,
.base = BCM_PCMCIA_COMMON_BASE_PA,
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index b7f37d4..2e28f65 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -111,7 +111,7 @@ static void __init pci_clock_check(void)
unsigned int __iomem *jmpr_p =
(unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int));
int jmpr = (__raw_readl(jmpr_p) >> 2) & 0x07;
- static const int pciclocks[] __initdata = {
+ static const int pciclocks[] __initconst = {
33, 20, 25, 30, 12, 16, 37, 10
};
int pciclock = pciclocks[jmpr];
diff --git a/arch/mips/pci/fixup-mpc30x.c b/arch/mips/pci/fixup-mpc30x.c
index e08f49c..8e4f828 100644
--- a/arch/mips/pci/fixup-mpc30x.c
+++ b/arch/mips/pci/fixup-mpc30x.c
@@ -22,13 +22,13 @@
#include <asm/vr41xx/mpc30x.h>
-static const int internal_func_irqs[] __initdata = {
+static const int internal_func_irqs[] __initconst = {
VRC4173_CASCADE_IRQ,
VRC4173_AC97_IRQ,
VRC4173_USB_IRQ,
};
-static const int irq_tab_mpc30x[] __initdata = {
+static const int irq_tab_mpc30x[] __initconst = {
[12] = VRC4173_PCMCIA1_IRQ,
[13] = VRC4173_PCMCIA2_IRQ,
[29] = MQ200_IRQ,
diff --git a/arch/mips/powertv/asic/asic-calliope.c b/arch/mips/powertv/asic/asic-calliope.c
index 0a170e0..7773f3d 100644
--- a/arch/mips/powertv/asic/asic-calliope.c
+++ b/arch/mips/powertv/asic/asic-calliope.c
@@ -28,7 +28,7 @@
#define CALLIOPE_ADDR(x) (CALLIOPE_IO_BASE + (x))
-const struct register_map calliope_register_map __initdata = {
+const struct register_map calliope_register_map __initconst = {
.eic_slow0_strt_add = {.phys = CALLIOPE_ADDR(0x800000)},
.eic_cfg_bits = {.phys = CALLIOPE_ADDR(0x800038)},
.eic_ready_status = {.phys = CALLIOPE_ADDR(0x80004c)},
diff --git a/arch/mips/powertv/asic/asic-cronus.c b/arch/mips/powertv/asic/asic-cronus.c
index bbc0c12..da076db 100644
--- a/arch/mips/powertv/asic/asic-cronus.c
+++ b/arch/mips/powertv/asic/asic-cronus.c
@@ -28,7 +28,7 @@
#define CRONUS_ADDR(x) (CRONUS_IO_BASE + (x))
-const struct register_map cronus_register_map __initdata = {
+const struct register_map cronus_register_map __initconst = {
.eic_slow0_strt_add = {.phys = CRONUS_ADDR(0x000000)},
.eic_cfg_bits = {.phys = CRONUS_ADDR(0x000038)},
.eic_ready_status = {.phys = CRONUS_ADDR(0x00004C)},
diff --git a/arch/mips/powertv/asic/asic-gaia.c b/arch/mips/powertv/asic/asic-gaia.c
index 91dda68..47683b3 100644
--- a/arch/mips/powertv/asic/asic-gaia.c
+++ b/arch/mips/powertv/asic/asic-gaia.c
@@ -23,7 +23,7 @@
#include <linux/init.h>
#include <asm/mach-powertv/asic.h>
-const struct register_map gaia_register_map __initdata = {
+const struct register_map gaia_register_map __initconst = {
.eic_slow0_strt_add = {.phys = GAIA_IO_BASE + 0x000000},
.eic_cfg_bits = {.phys = GAIA_IO_BASE + 0x000038},
.eic_ready_status = {.phys = GAIA_IO_BASE + 0x00004C},
diff --git a/arch/mips/powertv/asic/asic-zeus.c b/arch/mips/powertv/asic/asic-zeus.c
index 4a05bb0..6ff4b10 100644
--- a/arch/mips/powertv/asic/asic-zeus.c
+++ b/arch/mips/powertv/asic/asic-zeus.c
@@ -28,7 +28,7 @@
#define ZEUS_ADDR(x) (ZEUS_IO_BASE + (x))
-const struct register_map zeus_register_map __initdata = {
+const struct register_map zeus_register_map __initconst = {
.eic_slow0_strt_add = {.phys = ZEUS_ADDR(0x000000)},
.eic_cfg_bits = {.phys = ZEUS_ADDR(0x000038)},
.eic_ready_status = {.phys = ZEUS_ADDR(0x00004c)},
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 09/17] h8300: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (7 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 08/17] mips: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 10/17] ia64: " Uwe Kleine-König
` (8 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, Yoshinori Sato
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
---
arch/h8300/kernel/timer/itu.c | 2 +-
arch/h8300/kernel/timer/timer16.c | 2 +-
arch/h8300/kernel/timer/timer8.c | 2 +-
arch/h8300/kernel/timer/tpu.c | 2 +-
arch/h8300/platform/h8300h/irq.c | 4 ++--
arch/h8300/platform/h8s/irq.c | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/h8300/kernel/timer/itu.c b/arch/h8300/kernel/timer/itu.c
index a2ae5e9..2ab0e42 100644
--- a/arch/h8300/kernel/timer/itu.c
+++ b/arch/h8300/kernel/timer/itu.c
@@ -62,7 +62,7 @@ static struct irqaction itu_irq = {
.flags = IRQF_DISABLED | IRQF_TIMER,
};
-static const int __initdata divide_rate[] = {1, 2, 4, 8};
+static const int divide_rate[] __initconst = {1, 2, 4, 8};
void __init h8300_timer_setup(void)
{
diff --git a/arch/h8300/kernel/timer/timer16.c b/arch/h8300/kernel/timer/timer16.c
index ae0d381..78f6843 100644
--- a/arch/h8300/kernel/timer/timer16.c
+++ b/arch/h8300/kernel/timer/timer16.c
@@ -57,7 +57,7 @@ static struct irqaction timer16_irq = {
.flags = IRQF_DISABLED | IRQF_TIMER,
};
-static const int __initdata divide_rate[] = {1, 2, 4, 8};
+static const int divide_rate[] __initconst = {1, 2, 4, 8};
void __init h8300_timer_setup(void)
{
diff --git a/arch/h8300/kernel/timer/timer8.c b/arch/h8300/kernel/timer/timer8.c
index 7a1533f..ea4eb8d 100644
--- a/arch/h8300/kernel/timer/timer8.c
+++ b/arch/h8300/kernel/timer/timer8.c
@@ -77,7 +77,7 @@ static struct irqaction timer8_irq = {
.flags = IRQF_DISABLED | IRQF_TIMER,
};
-static const int __initdata divide_rate[] = {8, 64, 8192};
+static const int divide_rate[] __initconst = {8, 64, 8192};
void __init h8300_timer_setup(void)
{
diff --git a/arch/h8300/kernel/timer/tpu.c b/arch/h8300/kernel/timer/tpu.c
index 2193a2e..eec62d8 100644
--- a/arch/h8300/kernel/timer/tpu.c
+++ b/arch/h8300/kernel/timer/tpu.c
@@ -66,7 +66,7 @@ static struct irqaction tpu_irq = {
.flags = IRQF_DISABLED | IRQF_TIMER,
};
-static const int __initdata divide_rate[] = {
+static const int divide_rate[] __initconst = {
#if CONFIG_H8300_TPU_CH == 0
1,4,16,64,0,0,0,0,
#elif (CONFIG_H8300_TPU_CH == 1) || (CONFIG_H8300_TPU_CH == 5)
diff --git a/arch/h8300/platform/h8300h/irq.c b/arch/h8300/platform/h8300h/irq.c
index bc4f51b..a80e1a1 100644
--- a/arch/h8300/platform/h8300h/irq.c
+++ b/arch/h8300/platform/h8300h/irq.c
@@ -14,14 +14,14 @@
#include <asm/gpio-internal.h>
#include <asm/regs306x.h>
-const int __initdata h8300_saved_vectors[] = {
+const int h8300_saved_vectors[] __initconst = {
#if defined(CONFIG_GDB_DEBUG)
TRAP3_VEC, /* TRAPA #3 is GDB breakpoint */
#endif
-1,
};
-const h8300_vector __initdata h8300_trap_table[] = {
+const h8300_vector h8300_trap_table[] __initconst = {
0, 0, 0, 0, 0, 0, 0, 0,
system_call,
0,
diff --git a/arch/h8300/platform/h8s/irq.c b/arch/h8300/platform/h8s/irq.c
index 7b5f29f..362b191 100644
--- a/arch/h8300/platform/h8s/irq.c
+++ b/arch/h8300/platform/h8s/irq.c
@@ -18,7 +18,7 @@
#include <asm/regs267x.h>
/* saved vector list */
-const int __initdata h8300_saved_vectors[]={
+const int h8300_saved_vectors[] __initconst = {
#if defined(CONFIG_GDB_DEBUG)
TRACE_VEC,
TRAP3_VEC,
@@ -27,7 +27,7 @@ const int __initdata h8300_saved_vectors[]={
};
/* trap entry table */
-const H8300_VECTOR __initdata h8300_trap_table[] = {
+const H8300_VECTOR h8300_trap_table[] __initconst = {
0,0,0,0,0,
trace_break, /* TRACE */
0,0,
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 10/17] ia64: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (8 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 09/17] h8300: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 11/17] powerpc: " Uwe Kleine-König
` (7 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, Tony Luck, Fenghua Yu, linux-ia64
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-ia64@vger.kernel.org
---
arch/ia64/xen/irq_xen.c | 2 +-
arch/ia64/xen/irq_xen.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
index 3bb1223..01f479e 100644
--- a/arch/ia64/xen/irq_xen.c
+++ b/arch/ia64/xen/irq_xen.c
@@ -433,7 +433,7 @@ xen_resend_irq(unsigned int vector)
(void)resend_irq_on_evtchn(vector);
}
-const struct pv_irq_ops xen_irq_ops __initdata = {
+const struct pv_irq_ops xen_irq_ops __initconst = {
.register_ipi = xen_register_ipi,
.assign_irq_vector = xen_assign_irq_vector,
diff --git a/arch/ia64/xen/irq_xen.h b/arch/ia64/xen/irq_xen.h
index 26110f3..1778517 100644
--- a/arch/ia64/xen/irq_xen.h
+++ b/arch/ia64/xen/irq_xen.h
@@ -27,7 +27,7 @@ extern void (*late_time_init)(void);
extern char xen_event_callback;
void __init xen_init_IRQ(void);
-extern const struct pv_irq_ops xen_irq_ops __initdata;
+extern const struct pv_irq_ops xen_irq_ops __initconst;
extern void xen_smp_intr_init(void);
extern void xen_send_ipi(int cpu, int vec);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 11/17] powerpc: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (9 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 10/17] ia64: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 12/17] gpio/samsung: " Uwe Kleine-König
` (6 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: kernel, Josh Boyer, Matt Porter, Benjamin Herrenschmidt,
Paul Mackerras, Anatolij Gustschin, Kumar Gala, Arnd Bergmann,
linuxppc-dev, cbe-oss-dev
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: cbe-oss-dev@lists.ozlabs.org
---
arch/powerpc/platforms/40x/ppc40x_simple.c | 2 +-
arch/powerpc/platforms/512x/mpc5121_generic.c | 2 +-
arch/powerpc/platforms/52xx/lite5200.c | 2 +-
arch/powerpc/platforms/52xx/media5200.c | 2 +-
arch/powerpc/platforms/52xx/mpc5200_simple.c | 2 +-
arch/powerpc/platforms/52xx/mpc52xx_pci.c | 2 +-
arch/powerpc/platforms/83xx/mpc830x_rdb.c | 2 +-
arch/powerpc/platforms/83xx/mpc831x_rdb.c | 2 +-
arch/powerpc/platforms/83xx/mpc837x_rdb.c | 2 +-
arch/powerpc/platforms/85xx/tqm85xx.c | 2 +-
arch/powerpc/platforms/cell/qpace_setup.c | 2 +-
arch/powerpc/platforms/cell/setup.c | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c
index 9761206..2efba25 100644
--- a/arch/powerpc/platforms/40x/ppc40x_simple.c
+++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
@@ -50,7 +50,7 @@ machine_device_initcall(ppc40x_simple, ppc40x_device_probe);
* Again, if your board needs to do things differently then create a
* board.c file for it rather than adding it to this list.
*/
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"amcc,acadia",
"amcc,haleakala",
"amcc,kilauea",
diff --git a/arch/powerpc/platforms/512x/mpc5121_generic.c b/arch/powerpc/platforms/512x/mpc5121_generic.c
index 926731f..b1b558c 100644
--- a/arch/powerpc/platforms/512x/mpc5121_generic.c
+++ b/arch/powerpc/platforms/512x/mpc5121_generic.c
@@ -26,7 +26,7 @@
/*
* list of supported boards
*/
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"prt,prtlvt",
NULL
};
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 01ffa64..86bd6f2 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -172,7 +172,7 @@ static void __init lite5200_setup_arch(void)
mpc52xx_setup_pci();
}
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"fsl,lite5200",
"fsl,lite5200b",
NULL,
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c
index 17d91b7..df4d53a 100644
--- a/arch/powerpc/platforms/52xx/media5200.c
+++ b/arch/powerpc/platforms/52xx/media5200.c
@@ -232,7 +232,7 @@ static void __init media5200_setup_arch(void)
}
/* list of the supported boards */
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"fsl,media5200",
NULL
};
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
index c0aa040..2622361 100644
--- a/arch/powerpc/platforms/52xx/mpc5200_simple.c
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -49,7 +49,7 @@ static void __init mpc5200_simple_setup_arch(void)
}
/* list of the supported boards */
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"anonymous,a4m072",
"anon,charon",
"intercontrol,digsy-mtc",
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index bfb11e0..e2d401a 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -93,7 +93,7 @@ struct mpc52xx_pci {
};
/* MPC5200 device tree match tables */
-const struct of_device_id mpc52xx_pci_ids[] __initdata = {
+const struct of_device_id mpc52xx_pci_ids[] __initconst = {
{ .type = "pci", .compatible = "fsl,mpc5200-pci", },
{ .type = "pci", .compatible = "mpc5200-pci", },
{}
diff --git a/arch/powerpc/platforms/83xx/mpc830x_rdb.c b/arch/powerpc/platforms/83xx/mpc830x_rdb.c
index 4f2d9fe..3327ab9 100644
--- a/arch/powerpc/platforms/83xx/mpc830x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc830x_rdb.c
@@ -34,7 +34,7 @@ static void __init mpc830x_rdb_setup_arch(void)
mpc831x_usb_cfg();
}
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"MPC8308RDB",
"fsl,mpc8308rdb",
"denx,mpc8308_p1m",
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
index fa25977..067d3f0 100644
--- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
@@ -35,7 +35,7 @@ static void __init mpc831x_rdb_setup_arch(void)
mpc831x_usb_cfg();
}
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"MPC8313ERDB",
"fsl,mpc8315erdb",
NULL
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index 16c9c9c..a9a15bb 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -60,7 +60,7 @@ static void __init mpc837x_rdb_setup_arch(void)
machine_device_initcall(mpc837x_rdb, mpc83xx_declare_of_platform_devices);
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"fsl,mpc8377rdb",
"fsl,mpc8378rdb",
"fsl,mpc8379rdb",
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
index 4d786c2..c182de0 100644
--- a/arch/powerpc/platforms/85xx/tqm85xx.c
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -125,7 +125,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520,
machine_device_initcall(tqm85xx, mpc85xx_common_publish_devices);
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"tqc,tqm8540",
"tqc,tqm8541",
"tqc,tqm8548",
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c
index 7f9b674..6e3409d 100644
--- a/arch/powerpc/platforms/cell/qpace_setup.c
+++ b/arch/powerpc/platforms/cell/qpace_setup.c
@@ -61,7 +61,7 @@ static void qpace_progress(char *s, unsigned short hex)
printk("*** %04x : %s\n", hex, s ? s : "");
}
-static const struct of_device_id qpace_bus_ids[] __initdata = {
+static const struct of_device_id qpace_bus_ids[] __initconst = {
{ .type = "soc", },
{ .compatible = "soc", },
{ .type = "spider", },
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index fa3e294..4ab0876 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -140,7 +140,7 @@ static int __devinit cell_setup_phb(struct pci_controller *phb)
return 0;
}
-static const struct of_device_id cell_bus_ids[] __initdata = {
+static const struct of_device_id cell_bus_ids[] __initconst = {
{ .type = "soc", },
{ .compatible = "soc", },
{ .type = "spider", },
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 12/17] gpio/samsung: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (10 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 11/17] powerpc: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-04-03 20:29 ` Linus Walleij
2012-03-29 21:12 ` [PATCH 13/17] ide: " Uwe Kleine-König
` (5 subsequent siblings)
17 siblings, 1 reply; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, Grant Likely, Linus Walleij
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Linus Walleij <linus.walleij@stericsson.com>
---
drivers/gpio/gpio-samsung.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index 4627787..fee2e85 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -2681,7 +2681,7 @@ static int exynos_gpio_xlate(struct gpio_chip *gc,
return gpiospec->args[0];
}
-static const struct of_device_id exynos_gpio_dt_match[] __initdata = {
+static const struct of_device_id exynos_gpio_dt_match[] __initconst = {
{ .compatible = "samsung,exynos4-gpio", },
{}
};
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 12/17] gpio/samsung: mark const init data with __initconst instead of __initdata
2012-03-29 21:12 ` [PATCH 12/17] gpio/samsung: " Uwe Kleine-König
@ 2012-04-03 20:29 ` Linus Walleij
0 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2012-04-03 20:29 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, kernel, Grant Likely, Linus Walleij
2012/3/29 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> As long as there is no other non-const variable marked __initdata in the
> same compilation unit it doesn't hurt. If there were one however
> compilation would fail with
>
> error: $variablename causes a section type conflict
>
> because a section containing const variables is marked read only and so
> cannot contain non-const variables.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Thanks,
Linus Walleij
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 13/17] ide: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (11 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 12/17] gpio/samsung: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 14/17] media/video/s5p-tv: " Uwe Kleine-König
` (4 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, David S. Miller, linux-ide
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: linux-ide@vger.kernel.org
---
drivers/ide/ali14xx.c | 4 ++--
drivers/ide/cmd640.c | 2 +-
drivers/ide/dtc2278.c | 2 +-
drivers/ide/ht6560b.c | 2 +-
drivers/ide/icside.c | 2 +-
drivers/ide/qd65xx.c | 2 +-
drivers/ide/tx4938ide.c | 2 +-
drivers/ide/tx4939ide.c | 2 +-
drivers/ide/umc8672.c | 2 +-
9 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/ide/ali14xx.c b/drivers/ide/ali14xx.c
index d3be99f..8f3570e 100644
--- a/drivers/ide/ali14xx.c
+++ b/drivers/ide/ali14xx.c
@@ -52,13 +52,13 @@
/* port addresses for auto-detection */
#define ALI_NUM_PORTS 4
-static const int ports[ALI_NUM_PORTS] __initdata =
+static const int ports[ALI_NUM_PORTS] __initconst =
{ 0x074, 0x0f4, 0x034, 0x0e4 };
/* register initialization data */
typedef struct { u8 reg, data; } RegInitializer;
-static const RegInitializer initData[] __initdata = {
+static const RegInitializer initData[] __initconst = {
{0x01, 0x0f}, {0x02, 0x00}, {0x03, 0x00}, {0x04, 0x00},
{0x05, 0x00}, {0x06, 0x00}, {0x07, 0x2b}, {0x0a, 0x0f},
{0x25, 0x00}, {0x26, 0x00}, {0x27, 0x00}, {0x28, 0x00},
diff --git a/drivers/ide/cmd640.c b/drivers/ide/cmd640.c
index 1471730..70f0a27 100644
--- a/drivers/ide/cmd640.c
+++ b/drivers/ide/cmd640.c
@@ -685,7 +685,7 @@ static int pci_conf2(void)
return 0;
}
-static const struct ide_port_info cmd640_port_info __initdata = {
+static const struct ide_port_info cmd640_port_info __initconst = {
.chipset = ide_cmd640,
.host_flags = IDE_HFLAG_SERIALIZE |
IDE_HFLAG_NO_DMA |
diff --git a/drivers/ide/dtc2278.c b/drivers/ide/dtc2278.c
index 46af474..8722df3 100644
--- a/drivers/ide/dtc2278.c
+++ b/drivers/ide/dtc2278.c
@@ -91,7 +91,7 @@ static const struct ide_port_ops dtc2278_port_ops = {
.set_pio_mode = dtc2278_set_pio_mode,
};
-static const struct ide_port_info dtc2278_port_info __initdata = {
+static const struct ide_port_info dtc2278_port_info __initconst = {
.name = DRV_NAME,
.chipset = ide_dtc2278,
.port_ops = &dtc2278_port_ops,
diff --git a/drivers/ide/ht6560b.c b/drivers/ide/ht6560b.c
index 986f251..1e0fd3a 100644
--- a/drivers/ide/ht6560b.c
+++ b/drivers/ide/ht6560b.c
@@ -341,7 +341,7 @@ static const struct ide_port_ops ht6560b_port_ops = {
.set_pio_mode = ht6560b_set_pio_mode,
};
-static const struct ide_port_info ht6560b_port_info __initdata = {
+static const struct ide_port_info ht6560b_port_info __initconst = {
.name = DRV_NAME,
.chipset = ide_ht6560b,
.tp_ops = &ht6560b_tp_ops,
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index 8716066..7e9e1c1 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -453,7 +453,7 @@ err_free:
return ret;
}
-static const struct ide_port_info icside_v6_port_info __initdata = {
+static const struct ide_port_info icside_v6_port_info __initconst = {
.init_dma = icside_dma_off_init,
.port_ops = &icside_v6_no_dma_port_ops,
.dma_ops = &icside_v6_dma_ops,
diff --git a/drivers/ide/qd65xx.c b/drivers/ide/qd65xx.c
index e03f4f1..a6fb6a8 100644
--- a/drivers/ide/qd65xx.c
+++ b/drivers/ide/qd65xx.c
@@ -335,7 +335,7 @@ static const struct ide_port_ops qd6580_port_ops = {
.set_pio_mode = qd6580_set_pio_mode,
};
-static const struct ide_port_info qd65xx_port_info __initdata = {
+static const struct ide_port_info qd65xx_port_info __initconst = {
.name = DRV_NAME,
.tp_ops = &qd65xx_tp_ops,
.chipset = ide_qd65xx,
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index 7002765..91d49dd 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -117,7 +117,7 @@ static const struct ide_port_ops tx4938ide_port_ops = {
.set_pio_mode = tx4938ide_set_pio_mode,
};
-static const struct ide_port_info tx4938ide_port_info __initdata = {
+static const struct ide_port_info tx4938ide_port_info __initconst = {
.port_ops = &tx4938ide_port_ops,
#ifdef __BIG_ENDIAN
.tp_ops = &tx4938ide_tp_ops,
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index 71c2319..c0ab800 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -522,7 +522,7 @@ static const struct ide_dma_ops tx4939ide_dma_ops = {
.dma_sff_read_status = tx4939ide_dma_sff_read_status,
};
-static const struct ide_port_info tx4939ide_port_info __initdata = {
+static const struct ide_port_info tx4939ide_port_info __initconst = {
.init_hwif = tx4939ide_init_hwif,
.init_dma = tx4939ide_init_dma,
.port_ops = &tx4939ide_port_ops,
diff --git a/drivers/ide/umc8672.c b/drivers/ide/umc8672.c
index 5cfb781..3aa0fea 100644
--- a/drivers/ide/umc8672.c
+++ b/drivers/ide/umc8672.c
@@ -128,7 +128,7 @@ static const struct ide_port_ops umc8672_port_ops = {
.set_pio_mode = umc_set_pio_mode,
};
-static const struct ide_port_info umc8672_port_info __initdata = {
+static const struct ide_port_info umc8672_port_info __initconst = {
.name = DRV_NAME,
.chipset = ide_umc8672,
.port_ops = &umc8672_port_ops,
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 14/17] media/video/s5p-tv: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (12 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 13/17] ide: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 15/17] mtd: " Uwe Kleine-König
` (3 subsequent siblings)
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: kernel, Kyungmin Park, Tomasz Stanislawski, Mauro Carvalho Chehab,
linux-arm-kernel, linux-media
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-media@vger.kernel.org
---
drivers/media/video/s5p-tv/mixer_drv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/s5p-tv/mixer_drv.c b/drivers/media/video/s5p-tv/mixer_drv.c
index a2c0c25..edca065 100644
--- a/drivers/media/video/s5p-tv/mixer_drv.c
+++ b/drivers/media/video/s5p-tv/mixer_drv.c
@@ -461,7 +461,7 @@ static struct platform_driver mxr_driver __refdata = {
static int __init mxr_init(void)
{
int i, ret;
- static const char banner[] __initdata = KERN_INFO
+ static const char banner[] __initconst = KERN_INFO
"Samsung TV Mixer driver, "
"(c) 2010-2011 Samsung Electronics Co., Ltd.\n";
printk(banner);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 15/17] mtd: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (13 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 14/17] media/video/s5p-tv: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-04-13 15:43 ` Artem Bityutskiy
2012-03-29 21:12 ` [PATCH 16/17] drivers/x86: " Uwe Kleine-König
` (2 subsequent siblings)
17 siblings, 1 reply; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, David Woodhouse, linux-mtd
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
---
drivers/mtd/maps/wr_sbc82xx_flash.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/maps/wr_sbc82xx_flash.c b/drivers/mtd/maps/wr_sbc82xx_flash.c
index aa7e0cb..4f6bf60 100644
--- a/drivers/mtd/maps/wr_sbc82xx_flash.c
+++ b/drivers/mtd/maps/wr_sbc82xx_flash.c
@@ -59,7 +59,7 @@ static struct mtd_partition bigflash_parts[] = {
}
};
-static const char *part_probes[] __initdata = {"cmdlinepart", "RedBoot", NULL};
+static const char *part_probes[] __initconst = {"cmdlinepart", "RedBoot", NULL};
#define init_sbc82xx_one_flash(map, br, or) \
do { \
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 15/17] mtd: mark const init data with __initconst instead of __initdata
2012-03-29 21:12 ` [PATCH 15/17] mtd: " Uwe Kleine-König
@ 2012-04-13 15:43 ` Artem Bityutskiy
0 siblings, 0 replies; 28+ messages in thread
From: Artem Bityutskiy @ 2012-04-13 15:43 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, kernel, David Woodhouse, linux-mtd
[-- Attachment #1: Type: text/plain, Size: 373 bytes --]
On Thu, 2012-03-29 at 23:12 +0200, Uwe Kleine-König wrote:
> As long as there is no other non-const variable marked __initdata in the
> same compilation unit it doesn't hurt. If there were one however
> compilation would fail with
>
> error: $variablename causes a section type conflict
>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 16/17] drivers/x86: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (14 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 15/17] mtd: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 17/17] kstrtox: " Uwe Kleine-König
[not found] ` <20120330095859.GT15647@pengutronix.de>
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: kernel, Matthew Garrett, Henrique de Moraes Holschuh,
platform-driver-x86, ibm-acpi-devel
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
Cc: platform-driver-x86@vger.kernel.org
Cc: ibm-acpi-devel@lists.sourceforge.net
---
drivers/platform/x86/dell-laptop.c | 2 +-
drivers/platform/x86/thinkpad_acpi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index a05fc9c..882bfa4 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -94,7 +94,7 @@ static struct rfkill *wifi_rfkill;
static struct rfkill *bluetooth_rfkill;
static struct rfkill *wwan_rfkill;
-static const struct dmi_system_id __initdata dell_device_table[] = {
+static const struct dmi_system_id dell_device_table[] __initconst = {
{
.ident = "Dell laptop",
.matches = {
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index d68c000..dc1900c 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -522,7 +522,7 @@ static acpi_handle ec_handle;
#define TPACPI_HANDLE(object, parent, paths...) \
static acpi_handle object##_handle; \
- static const acpi_handle *object##_parent __initdata = \
+ static const acpi_handle *object##_parent __initconst = \
&parent##_handle; \
static char *object##_paths[] __initdata = { paths }
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 17/17] kstrtox: mark const init data with __initconst instead of __initdata
[not found] <20120329211131.GA31250@pengutronix.de>
` (15 preceding siblings ...)
2012-03-29 21:12 ` [PATCH 16/17] drivers/x86: " Uwe Kleine-König
@ 2012-03-29 21:12 ` Uwe Kleine-König
[not found] ` <20120330095859.GT15647@pengutronix.de>
17 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton; +Cc: kernel, Alexey Dobriyan
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
---
lib/test-kstrtox.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/test-kstrtox.c b/lib/test-kstrtox.c
index d55769d..bea3f3f 100644
--- a/lib/test-kstrtox.c
+++ b/lib/test-kstrtox.c
@@ -11,7 +11,7 @@ struct test_fail {
};
#define DEFINE_TEST_FAIL(test) \
- const struct test_fail test[] __initdata
+ const struct test_fail test[] __initconst
#define DECLARE_TEST_OK(type, test_type) \
test_type { \
@@ -21,7 +21,7 @@ struct test_fail {
}
#define DEFINE_TEST_OK(type, test) \
- const type test[] __initdata
+ const type test[] __initconst
#define TEST_FAIL(fn, type, fmt, test) \
{ \
--
1.7.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread[parent not found: <20120330095859.GT15647@pengutronix.de>]
* Re: [PATCH 00/17] mark const init data with __initconst instead of __initdata
[not found] ` <20120330095859.GT15647@pengutronix.de>
@ 2012-03-30 11:37 ` Andreas Schwab
2012-03-30 18:19 ` Uwe Kleine-König
0 siblings, 1 reply; 28+ messages in thread
From: Andreas Schwab @ 2012-03-30 11:37 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Alexey Dobriyan, Anatolij Gustschin,
Andreas Koensgen, Andrew Lunn, Andrew Victor, Arnd Bergmann,
Barry Song, Benjamin Herrenschmidt, Bryan Huntsman, cbe-oss-dev,
Christoph Lameter, Daniel Walker, David Brown, David Howells,
David S. Miller, David Woodhouse, davinci-linux-open-source,
Eric Miao, Fenghua Yu, Grant, "Likely <gran"
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes:
> After a question by Shawn Guo I noticed that my command to do the changes
> was to lax and changed things that must not be changed (at least not
> with further care). Affected are lines like:
>
> static const char *at91_dt_board_compat[] __initconst = {
>
> While at91_dt_board_compat[0] is const, at91_dt_board_compat is not.
Though it looks like at91_dt_board_compat should really be const (it is
assigned to a const pointer, likewise for all other uses of struct
machine_desc.dt_compat).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 00/17] mark const init data with __initconst instead of __initdata
2012-03-30 11:37 ` [PATCH 00/17] " Andreas Schwab
@ 2012-03-30 18:19 ` Uwe Kleine-König
0 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2012-03-30 18:19 UTC (permalink / raw)
To: Andreas Schwab
Cc: linux-kernel, Andrew Morton, Alexey Dobriyan, Anatolij Gustschin,
Andreas Koensgen, Andrew Lunn, Andrew Victor, Arnd Bergmann,
Barry Song, Benjamin Herrenschmidt, Bryan Huntsman, cbe-oss-dev,
Christoph Lameter, Daniel Walker, David Brown, David Howells,
David S. Miller, David Woodhouse, davinci-linux-open-source,
Eric Miao, Fenghua Yu, Grant
Hello Andreas,
On Fri, Mar 30, 2012 at 01:37:26PM +0200, Andreas Schwab wrote:
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes:
>
> > After a question by Shawn Guo I noticed that my command to do the changes
> > was to lax and changed things that must not be changed (at least not
> > with further care). Affected are lines like:
> >
> > static const char *at91_dt_board_compat[] __initconst = {
> >
> > While at91_dt_board_compat[0] is const, at91_dt_board_compat is not.
>
> Though it looks like at91_dt_board_compat should really be const (it is
> assigned to a const pointer, likewise for all other uses of struct
> machine_desc.dt_compat).
Yeah, still for this series I will revert to static const char
*at91_dt_board_compat[] __initdata to only have a single logical change.
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 28+ messages in thread