Re: [PATCH] [MIPS] Move several variables from .bss to .init.data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 23, 2009 at 10:59:19PM +0900, Atsushi Nemoto wrote:

> On Mon, 23 Nov 2009 13:46:33 +0000, Ralf Baechle <ralf@xxxxxxxxxxxxxx> wrote:
> > > And for console option strings parts, I doubt these can be marked as
> > > __initdata.  Theoretically, the console driver might be a module,
> > 
> > No; if the driver is a module we don't offer console functionality.  Typical
> > example:
> 
> Oh, I missed that.  Thanks.  Then no objections for this part.

So below is what I've got queued now.

Thanks everbody,

  Ralf

Date:	Mon, 23 Nov 2009 13:53:37 +0200
From:	Dmitri Vorobiev <dmitri.vorobiev@xxxxxxxxxx>

MIPS: Move several variables from .bss to .init.data

Several static uninitialized variables are used in the scope of __init
functions but are themselves not marked as __initdata.  This patch is to put
those variables to where they belong and to reduce the memory footprint a
little bit.

Also, a couple of lines with spaces instead of tabs were fixed.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@xxxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxx
Patchwork: http://patchwork.linux-mips.org/patch/697/
Acked-by: Florian Fainelli <florian@xxxxxxxxxxx>
Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

 arch/mips/ar7/platform.c        |    2 +-
 arch/mips/sgi-ip22/ip22-eisa.c  |    4 ++--
 arch/mips/sgi-ip22/ip22-setup.c |    2 +-
 arch/mips/sgi-ip32/ip32-setup.c |    2 +-
 arch/mips/sni/setup.c           |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

Index: linux-queue/arch/mips/ar7/platform.c
===================================================================
--- linux-queue.orig/arch/mips/ar7/platform.c
+++ linux-queue/arch/mips/ar7/platform.c
@@ -505,7 +505,7 @@ static int __init ar7_register_devices(v
 	int res;
 	u32 *bootcr, val;
 #ifdef CONFIG_SERIAL_8250
-	static struct uart_port uart_port[2];
+	static struct uart_port uart_port[2] __initdata;
 
 	memset(uart_port, 0, sizeof(struct uart_port) * 2);
 
Index: linux-queue/arch/mips/sgi-ip22/ip22-eisa.c
===================================================================
--- linux-queue.orig/arch/mips/sgi-ip22/ip22-eisa.c
+++ linux-queue/arch/mips/sgi-ip22/ip22-eisa.c
@@ -50,9 +50,9 @@
 
 static char __init *decode_eisa_sig(unsigned long addr)
 {
-        static char sig_str[EISA_SIG_LEN];
+	static char sig_str[EISA_SIG_LEN] __initdata;
 	u8 sig[4];
-        u16 rev;
+	u16 rev;
 	int i;
 
 	for (i = 0; i < 4; i++) {
Index: linux-queue/arch/mips/sgi-ip22/ip22-setup.c
===================================================================
--- linux-queue.orig/arch/mips/sgi-ip22/ip22-setup.c
+++ linux-queue/arch/mips/sgi-ip22/ip22-setup.c
@@ -67,7 +67,7 @@ void __init plat_mem_setup(void)
 	cserial = ArcGetEnvironmentVariable("ConsoleOut");
 
 	if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) {
-		static char options[8];
+		static char options[8] __initdata;
 		char *baud = ArcGetEnvironmentVariable("dbaud");
 		if (baud)
 			strcpy(options, baud);
Index: linux-queue/arch/mips/sgi-ip32/ip32-setup.c
===================================================================
--- linux-queue.orig/arch/mips/sgi-ip32/ip32-setup.c
+++ linux-queue/arch/mips/sgi-ip32/ip32-setup.c
@@ -90,7 +90,7 @@ void __init plat_mem_setup(void)
 	{
 		char* con = ArcGetEnvironmentVariable("console");
 		if (con && *con == 'd') {
-			static char options[8];
+			static char options[8] __initdata;
 			char *baud = ArcGetEnvironmentVariable("dbaud");
 			if (baud)
 				strcpy(options, baud);
Index: linux-queue/arch/mips/sni/setup.c
===================================================================
--- linux-queue.orig/arch/mips/sni/setup.c
+++ linux-queue/arch/mips/sni/setup.c
@@ -60,7 +60,7 @@ static void __init sni_console_setup(voi
 	char *cdev;
 	char *baud;
 	int port;
-	static char options[8];
+	static char options[8] __initdata;
 
 	cdev = prom_getenv("console_dev");
 	if (strncmp(cdev, "tty", 3) == 0) {


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux