Skip to contentSkip to conversation

sparc: Fix /proc/kcore

PATCH New David Miller 1 participant 1 message Mar 19, 2015 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 1/1 sparc: Fix /proc/kcore

/proc/kcore investigates the "System RAM" elements in /proc/iomem to initialize it's memory tables. Therefore we have to register them before it tries to do so. kcore uses device_initcall() so let's use arch_initcall() for the registry.

Also we need ARCH_PROC_KCORE_TEXT to get the virtual addresses of the kernel image correct.

---
 arch/sparc/Kconfig      | 3 +++
 arch/sparc/mm/init_64.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
arch/sparc/Kconfig +3 -0
index 96ac69c..efb00ec 100644
@@ -86,6 +86,9 @@ config ARCH_DEFCONFIG
 	default "arch/sparc/configs/sparc32_defconfig" if SPARC32
 	default "arch/sparc/configs/sparc64_defconfig" if SPARC64
 
+config ARCH_PROC_KCORE_TEXT
+	def_bool y
+
 config IOMMU_HELPER
 	bool
 	default y if SPARC64
arch/sparc/mm/init_64.c +1 -1
index 3ea267c..4ca0d6b 100644
@@ -2820,7 +2820,7 @@ static int __init report_memory(void)
 
 	return 0;
 }
-device_initcall(report_memory);
+arch_initcall(report_memory);
 
 #ifdef CONFIG_SMP
 #define do_flush_tlb_kernel_range	smp_flush_tlb_kernel_range
Signature · 1 line
2.1.2.532.g19b5d50