diff options
author | Chris Metcalf <cmetcalf@ezchip.com> | 2015-03-27 19:35:31 +0100 |
---|---|---|
committer | Chris Metcalf <cmetcalf@ezchip.com> | 2015-04-17 20:01:35 +0200 |
commit | a84f24230c137a4e0ab14185e9175798ca1b0376 (patch) | |
tree | cb2fcd63e528c1caa6d263c21d33fda6b434f9fe /arch/tile | |
parent | tile: support CONTEXT_TRACKING and thus NOHZ_FULL (diff) | |
download | linux-a84f24230c137a4e0ab14185e9175798ca1b0376.tar.xz linux-a84f24230c137a4e0ab14185e9175798ca1b0376.zip |
tile: map data region shadow of kernel as R/W
This is necessary for things like reading /proc/kcore, doing ftrace,
etc. It happens by default when using huge pages to map the kernel
data, but not when using small pages.
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
Diffstat (limited to 'arch/tile')
-rw-r--r-- | arch/tile/mm/init.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c index ace32d7d3864..5bd252e3fdc5 100644 --- a/arch/tile/mm/init.c +++ b/arch/tile/mm/init.c @@ -233,9 +233,12 @@ static pgprot_t __init init_pgprot(ulong address) if (kdata_huge) return construct_pgprot(PAGE_KERNEL, PAGE_HOME_HASH); - /* We map the aliased pages of permanent text inaccessible. */ + /* + * We map the aliased pages of permanent text so we can + * update them if necessary, for ftrace, etc. + */ if (address < (ulong) _sinittext - CODE_DELTA) - return PAGE_NONE; + return construct_pgprot(PAGE_KERNEL, PAGE_HOME_HASH); /* We map read-only data non-coherent for performance. */ if ((address >= (ulong) __start_rodata && |