+ hugetlb-add-phys-addr-to-struct-huge_bootmem_page.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     hugetlb: add phys addr to struct huge_bootmem_page
has been added to the -mm tree.  Its filename is
     hugetlb-add-phys-addr-to-struct-huge_bootmem_page.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: hugetlb: add phys addr to struct huge_bootmem_page
From: Becky Bruce <beckyb@xxxxxxxxxxxxxxxxxxx>

This is needed on HIGHMEM systems - we don't always have a virtual
address so store the physical address and map it in as needed.

Signed-off-by: Becky Bruce <beckyb@xxxxxxxxxxxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/hugetlb.h |    3 +++
 mm/hugetlb.c            |    8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff -puN include/linux/hugetlb.h~hugetlb-add-phys-addr-to-struct-huge_bootmem_page include/linux/hugetlb.h
--- a/include/linux/hugetlb.h~hugetlb-add-phys-addr-to-struct-huge_bootmem_page
+++ a/include/linux/hugetlb.h
@@ -231,6 +231,9 @@ struct hstate {
 struct huge_bootmem_page {
 	struct list_head list;
 	struct hstate *hstate;
+#ifdef CONFIG_HIGHMEM
+	phys_addr_t phys;
+#endif
 };
 
 struct page *alloc_huge_page_node(struct hstate *h, int nid);
diff -puN mm/hugetlb.c~hugetlb-add-phys-addr-to-struct-huge_bootmem_page mm/hugetlb.c
--- a/mm/hugetlb.c~hugetlb-add-phys-addr-to-struct-huge_bootmem_page
+++ a/mm/hugetlb.c
@@ -1105,8 +1105,14 @@ static void __init gather_bootmem_preall
 	struct huge_bootmem_page *m;
 
 	list_for_each_entry(m, &huge_boot_pages, list) {
-		struct page *page = virt_to_page(m);
 		struct hstate *h = m->hstate;
+#ifdef CONFIG_HIGHMEM
+		struct page *page = pfn_to_page(m->phys >> PAGE_SHIFT);
+		free_bootmem_late((unsigned long)m,
+				  sizeof(struct huge_bootmem_page));
+#else
+		struct page *page = virt_to_page(m);
+#endif
 		__ClearPageReserved(page);
 		WARN_ON(page_count(page) != 1);
 		prep_compound_huge_page(page, h->order);
_

Patches currently in -mm which might be from beckyb@xxxxxxxxxxxxxxxxxxx are

fs-hugetlbfs-inodec-fix-pgoff-alignment-checking-on-32-bit.patch
hugetlb-add-phys-addr-to-struct-huge_bootmem_page.patch
hugetlb-add-phys-addr-to-struct-huge_bootmem_page-fix.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux