From: Ralf Baechle <ralf@linux-mips.org>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: dmitri.vorobiev@movial.com, linux-mips@linux-mips.org
Subject: Re: [PATCH] [MIPS] Move several variables from .bss to .init.data
Date: Mon, 23 Nov 2009 14:04:27 +0000 [thread overview]
Message-ID: <20091123140427.GA5232@linux-mips.org> (raw)
In-Reply-To: <20091123.225919.44090248.anemo@mba.ocn.ne.jp>
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@linux-mips.org> 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@movial.com>
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@movial.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/697/
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
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) {
prev parent reply other threads:[~2009-11-23 14:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-23 11:53 [PATCH] [MIPS] Move several variables from .bss to .init.data Dmitri Vorobiev
2009-11-23 11:58 ` Florian Fainelli
2009-11-23 12:14 ` Ralf Baechle
2009-11-23 13:26 ` Atsushi Nemoto
2009-11-23 13:43 ` Dmitri Vorobiev
2009-11-23 14:06 ` Atsushi Nemoto
2009-11-23 14:37 ` Dmitri Vorobiev
2009-11-23 15:19 ` Atsushi Nemoto
2009-11-23 13:46 ` Ralf Baechle
2009-11-23 13:59 ` Atsushi Nemoto
2009-11-23 14:04 ` Ralf Baechle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091123140427.GA5232@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=anemo@mba.ocn.ne.jp \
--cc=dmitri.vorobiev@movial.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.