aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-10-29 18:02:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-29 18:02:40 -0400
commitc38239b4be1ac7e4bcf5bbd971353bae51525b8f (patch)
tree0603687897074068a6ec9cde44486b5ed49b6397
parent57dbde63f2888af1be5111d369d124f4e659c0f8 (diff)
parentc9fa406f62ec952bc4689b5120a02759ce42a68d (diff)
Merge branch 'parisc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: "Three small patches: - A boot fix for A500 machines, crash was caused by the new alternative patching code from this merge window (Dave) - Change __kernel_suseconds_t to match glibc on 64-bit parisc (Arnd) - Use constants instead of hard-coded numbers (me)" * 'parisc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix A500 boot crash parisc: Use LINUX_GATEWAY_SPACE constant in entry.S parisc64: change __kernel_suseconds_t to match glibc
-rw-r--r--arch/parisc/include/uapi/asm/posix_types.h3
-rw-r--r--arch/parisc/kernel/entry.S5
-rw-r--r--arch/parisc/mm/init.c10
3 files changed, 7 insertions, 11 deletions
diff --git a/arch/parisc/include/uapi/asm/posix_types.h b/arch/parisc/include/uapi/asm/posix_types.h
index 2785632c85e7..8dce56f5dcee 100644
--- a/arch/parisc/include/uapi/asm/posix_types.h
+++ b/arch/parisc/include/uapi/asm/posix_types.h
@@ -16,9 +16,6 @@ typedef unsigned short __kernel_mode_t;
16typedef unsigned short __kernel_ipc_pid_t; 16typedef unsigned short __kernel_ipc_pid_t;
17#define __kernel_ipc_pid_t __kernel_ipc_pid_t 17#define __kernel_ipc_pid_t __kernel_ipc_pid_t
18 18
19typedef int __kernel_suseconds_t;
20#define __kernel_suseconds_t __kernel_suseconds_t
21
22typedef long long __kernel_off64_t; 19typedef long long __kernel_off64_t;
23typedef unsigned long long __kernel_ino64_t; 20typedef unsigned long long __kernel_ino64_t;
24 21
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 1c60408a64ad..d5eb19efa65b 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -394,6 +394,7 @@
394 */ 394 */
395 .macro space_check spc,tmp,fault 395 .macro space_check spc,tmp,fault
396 mfsp %sr7,\tmp 396 mfsp %sr7,\tmp
397 /* check against %r0 which is same value as LINUX_GATEWAY_SPACE */
397 or,COND(<>) %r0,\spc,%r0 /* user may execute gateway page 398 or,COND(<>) %r0,\spc,%r0 /* user may execute gateway page
398 * as kernel, so defeat the space 399 * as kernel, so defeat the space
399 * check if it is */ 400 * check if it is */
@@ -910,9 +911,9 @@ intr_check_sig:
910 * Only do signals if we are returning to user space 911 * Only do signals if we are returning to user space
911 */ 912 */
912 LDREG PT_IASQ0(%r16), %r20 913 LDREG PT_IASQ0(%r16), %r20
913 cmpib,COND(=),n 0,%r20,intr_restore /* backward */ 914 cmpib,COND(=),n LINUX_GATEWAY_SPACE, %r20, intr_restore /* backward */
914 LDREG PT_IASQ1(%r16), %r20 915 LDREG PT_IASQ1(%r16), %r20
915 cmpib,COND(=),n 0,%r20,intr_restore /* backward */ 916 cmpib,COND(=),n LINUX_GATEWAY_SPACE, %r20, intr_restore /* backward */
916 917
917 /* NOTE: We need to enable interrupts if we have to deliver 918 /* NOTE: We need to enable interrupts if we have to deliver
918 * signals. We used to do this earlier but it caused kernel 919 * signals. We used to do this earlier but it caused kernel
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index e7e626bcd0be..f88a52b8531c 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -513,17 +513,15 @@ static void __init map_pages(unsigned long start_vaddr,
513 513
514void __init set_kernel_text_rw(int enable_read_write) 514void __init set_kernel_text_rw(int enable_read_write)
515{ 515{
516 unsigned long start = (unsigned long)_stext; 516 unsigned long start = (unsigned long)__init_begin;
517 unsigned long end = (unsigned long)_etext; 517 unsigned long end = (unsigned long)_etext;
518 518
519 map_pages(start, __pa(start), end-start, 519 map_pages(start, __pa(start), end-start,
520 PAGE_KERNEL_RWX, enable_read_write ? 1:0); 520 PAGE_KERNEL_RWX, enable_read_write ? 1:0);
521 521
522 /* force the kernel to see the new TLB entries */ 522 /* force the kernel to see the new page table entries */
523 __flush_tlb_range(0, start, end); 523 flush_cache_all();
524 524 flush_tlb_all();
525 /* dump old cached instructions */
526 flush_icache_range(start, end);
527} 525}
528 526
529void __ref free_initmem(void) 527void __ref free_initmem(void)