Skip to contentSkip to conversation

Kexec/Kdump support POWER6

PATCH New Sachin P. Sant 1 participant 1 message May 23, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Kexec/Kdump support POWER6

Read supported VRMA page size from device tree.

Thanks
-Sachin

* Read supported VRMA page size from device tree.

---

arch/powerpc/kernel/setup_64.c +4 -0
diff -Naurp linux-2.6.22-rc2/arch/powerpc/kernel/setup_64.c linux-2.6.22-rc2-vrma/arch/powerpc/kernel/setup_64.c
@@ -73,6 +73,10 @@ int have_of = 1;
 int boot_cpuid = 0;
 u64 ppc64_pft_size;
 
+/* For VRMA */
+u64 ppc64_vrma_page_shift;
+int have_vrma = 0;
+
 /* Pick defaults since we might want to patch instructions
  * before we've read this from the device tree.
  */
arch/powerpc/mm/hash_utils_64.c +7 -0
diff -Naurp linux-2.6.22-rc2/arch/powerpc/mm/hash_utils_64.c linux-2.6.22-rc2-vrma/arch/powerpc/mm/hash_utils_64.c
@@ -199,6 +199,13 @@ static int __init htab_dt_scan_page_size
 	if (type == NULL || strcmp(type, "cpu") != 0)
 		return 0;
 
+	prop = (u32 *)of_get_flat_dt_prop(node, "ibm,vrma-page-sizes", &size);
+	if (prop != NULL) {
+		DBG("VRMA Page size from device-tree:\n");
+		ppc64_vrma_page_shift = prop[0];
+		have_vrma = 1;
+	}
+
 	prop = (u32 *)of_get_flat_dt_prop(node,
 					  "ibm,segment-page-sizes", &size);
 	if (prop != NULL) {
include/asm-powerpc/page_64.h +4 -0
diff -Naurp linux-2.6.22-rc2/include/asm-powerpc/page_64.h linux-2.6.22-rc2-vrma/include/asm-powerpc/page_64.h
@@ -76,6 +76,10 @@ static inline void copy_page(void *to, v
 /* Log 2 of page table size */
 extern u64 ppc64_pft_size;
 
+/* For VRMA */
+extern u64 ppc64_vrma_page_shift;
+extern int have_vrma;
+
 /* Large pages size */
 #ifdef CONFIG_HUGETLB_PAGE
 extern unsigned int HPAGE_SHIFT;