linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yasunori Goto <ygoto@us.fujitsu.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: mbligh@aracnet.com
Subject: Fw: [Lhms-devel] Making hotremovable attribute with memory section[4/4]
Date: Mon, 16 Aug 2004 15:58:19 -0700	[thread overview]
Message-ID: <20040816155335.E6FF.YGOTO@us.fujitsu.com> (raw)

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>


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

                 reply	other threads:[~2004-08-16 22:58 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=20040816155335.E6FF.YGOTO@us.fujitsu.com \
    --to=ygoto@us.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@aracnet.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