public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@redhat.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
	Linus Torvalds <torvalds@transmeta.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] reduce stack usage of sanitize_e820_map
Date: Sat, 17 Aug 2002 15:35:56 -0400	[thread overview]
Message-ID: <20020817153556.A4540@redhat.com> (raw)
In-Reply-To: <20020817151704.A3894@redhat.com>; from bcrl@redhat.com on Sat, Aug 17, 2002 at 03:17:04PM -0400

On Sat, Aug 17, 2002 at 03:17:04PM -0400, Benjamin LaHaise wrote:
> Nope.  static conflicts with __initdata.  If namespace pollution is a 
> concern, just prefix them with e820_.

Erm, foot-in-mouth.  I'd tried adding __initdata within the function, 
which conflicts with the auto attribute.  Making it static within the 
function and adding __initdata works here and has the same effect on 
stack usage.  Linus, could you apply this?  Thanks.

		-ben

--- foo-v2.5.31/arch/i386/kernel/setup.c	Sat Aug 17 15:31:33 2002
+++ test-v2.5.31/arch/i386/kernel/setup.c	Sat Aug 17 15:28:33 2002
@@ -275,17 +275,16 @@
  * replaces the original e820 map with a new one, removing overlaps.
  *
  */
-struct change_member {
-	struct e820entry *pbios; /* pointer to original bios entry */
-	unsigned long long addr; /* address for this change point */
-};
-struct change_member change_point_list[2*E820MAX] __initdata;
-struct change_member *change_point[2*E820MAX] __initdata;
-struct e820entry *overlap_list[E820MAX] __initdata;
-struct e820entry new_bios[E820MAX] __initdata;
-
 static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
 {
+	struct change_member {
+		struct e820entry *pbios; /* pointer to original bios entry */
+		unsigned long long addr; /* address for this change point */
+	};
+	static struct change_member change_point_list[2*E820MAX] __initdata;
+	static struct change_member *change_point[2*E820MAX] __initdata;
+	static struct e820entry *overlap_list[E820MAX] __initdata;
+	static struct e820entry new_bios[E820MAX] __initdata;
 	struct change_member *change_tmp;
 	unsigned long current_type, last_type;
 	unsigned long long last_addr;

      reply	other threads:[~2002-08-17 19:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-15 21:48 [patch] reduce stack usage of sanitize_e820_map Benjamin LaHaise
2002-08-16 14:58 ` Denis Vlasenko
2002-08-16 15:27   ` Linus Torvalds
2002-08-17 17:18 ` Eric W. Biederman
2002-08-17 19:17   ` Benjamin LaHaise
2002-08-17 19:35     ` Benjamin LaHaise [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=20020817153556.A4540@redhat.com \
    --to=bcrl@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox