All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm <linux-mm@kvack.org>
Subject: [PATCH] don't align initmem poisoning
Date: Thu, 07 Oct 2004 11:36:23 -0700	[thread overview]
Message-ID: <1097174067.22025.37.camel@localhost> (raw)

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

The recent initmem poison patch tries to page-align the address that it
memsets.  I think this is unnecessary because __init_begin is
page-aligned already in the linker script:

  /* will be freed after init */
  . = ALIGN(4096);              /* Init code and data */
  __init_begin = .;
  .init.text : {

-- Dave

[-- Attachment #2: A1-no-page-align-init-poison.patch --]
[-- Type: text/x-patch, Size: 751 bytes --]


Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug-dave/arch/i386/mm/init.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/i386/mm/init.c~A1-no-page-align-init-poison arch/i386/mm/init.c
--- memhotplug/arch/i386/mm/init.c~A1-no-page-align-init-poison	2004-10-07 11:28:46.000000000 -0700
+++ memhotplug-dave/arch/i386/mm/init.c	2004-10-07 11:30:05.000000000 -0700
@@ -723,7 +723,7 @@ void free_initmem(void)
 	for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
 		ClearPageReserved(virt_to_page(addr));
 		set_page_count(virt_to_page(addr), 1);
-		memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE);
+		memset((void *)addr, 0xcc, PAGE_SIZE);
 		free_page(addr);
 		totalram_pages++;
 	}
_

                 reply	other threads:[~2004-10-07 18:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1097174067.22025.37.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.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.