Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a043d79 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Ralf Baechle
Browse files

mips: mark const init data with __initconst instead of __initdata



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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: linux-mips@linux-mips.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: kernel@pengutronix.de
Patchwork: https://patchwork.linux-mips.org/patch/3565/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 5520e426
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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];
+2 −2
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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)},
+1 −1
Original line number Diff line number Diff line
@@ -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)},
Loading