* [PATCH] don't align initmem poisoning
@ 2004-10-07 18:36 Dave Hansen
0 siblings, 0 replies; only message in thread
From: Dave Hansen @ 2004-10-07 18:36 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-mm
[-- 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++;
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-07 18:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-07 18:36 [PATCH] don't align initmem poisoning Dave Hansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox