Skip to content

Commit

Permalink
sparc: Fix /proc/kcore
Browse files Browse the repository at this point in the history
/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.

Reported-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Mar 19, 2015
1 parent 53eb251 commit 3c08158
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c08158

Please sign in to comment.