* Fw: [Lhms-devel] Making hotremovable attribute with memory section[4/4]
@ 2004-08-16 22:58 Yasunori Goto
0 siblings, 0 replies; only message in thread
From: Yasunori Goto @ 2004-08-16 22:58 UTC (permalink / raw)
To: linux-kernel, linux-mm; +Cc: mbligh
Forwarded by Yasunori Goto <ygoto@us.fujitsu.com>
----------------------- Original Message -----------------------
From: Yasunori Goto <ygoto@us.fujitsu.com>
To: lhms-devel@lists.sourceforge.net
Date: Mon, 16 Aug 2004 14:37:34 -0700
Subject: [Lhms-devel] Making hotremovable attribute with memory section[4/4]
----
This is just for test removable/un-removable section.
Note:
hot-removable or un-removable attribute will be arch/platform
dependent.
---
hotremovable-goto/mm/nonlinear.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletion(-)
diff -puN mm/nonlinear.c~test_sec_removable mm/nonlinear.c
--- hotremovable/mm/nonlinear.c~test_sec_removable Fri Aug 13 16:24:52 2004
+++ hotremovable-goto/mm/nonlinear.c Fri Aug 13 16:24:52 2004
@@ -41,11 +41,14 @@ setup_memsections(void)
for (index = 0; index < NR_SECTIONS; index++) {
mem_section[index].phys_section = INVALID_SECTION;
mem_section[index].mem_map = NULL;
+ mem_section[index].flags = 0;
}
for (index = 0; index < NR_PHYS_SECTIONS; index++)
phys_section[index] = INVALID_PHYS_SECTION;
}
+extern unsigned int highmem_start_page;
+
void
alloc_memsections(unsigned long start_pfn,
unsigned long start_phys_pfn,
@@ -64,7 +67,10 @@ alloc_memsections(unsigned long start_pf
physid = pfn_to_section(start_phys_pfn);
for (; index < limit; index++, physid++) {
mem_section[index].phys_section = physid;
- printk("set mem_section[%d].phys_section: %d\n", index, mem_section[index].phys_section);
+ if (section_to_pfn(index) > highmem_start_page)
+ mem_section[index].flags = SECTION_REMOVABLE;
+
+ printk("set mem_section[%d].phys_section: %d :flags=%02x\n", index, mem_section[index].phys_section);
}
index = pfn_to_section(start_phys_pfn);
_
--
Yasunori Goto <ygoto at us.fujitsu.com>
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Lhms-devel mailing list
Lhms-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lhms-devel
--------------------- Original Message Ends --------------------
--
Yasunori Goto <ygoto at us.fujitsu.com>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-16 23:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-16 22:58 Fw: [Lhms-devel] Making hotremovable attribute with memory section[4/4] Yasunori Goto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).