Skip to content

Commit

Permalink
Merge branch 'parisc-4.20-2' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/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
  • Loading branch information
Linus Torvalds committed Oct 29, 2018
2 parents 57dbde6 + c9fa406 commit c38239b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
3 changes: 0 additions & 3 deletions arch/parisc/include/uapi/asm/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_ipc_pid_t;
#define __kernel_ipc_pid_t __kernel_ipc_pid_t

typedef int __kernel_suseconds_t;
#define __kernel_suseconds_t __kernel_suseconds_t

typedef long long __kernel_off64_t;
typedef unsigned long long __kernel_ino64_t;

Expand Down
5 changes: 3 additions & 2 deletions arch/parisc/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@
*/
.macro space_check spc,tmp,fault
mfsp %sr7,\tmp
/* check against %r0 which is same value as LINUX_GATEWAY_SPACE */
or,COND(<>) %r0,\spc,%r0 /* user may execute gateway page
* as kernel, so defeat the space
* check if it is */
Expand Down Expand Up @@ -910,9 +911,9 @@ intr_check_sig:
* Only do signals if we are returning to user space
*/
LDREG PT_IASQ0(%r16), %r20
cmpib,COND(=),n 0,%r20,intr_restore /* backward */
cmpib,COND(=),n LINUX_GATEWAY_SPACE, %r20, intr_restore /* backward */
LDREG PT_IASQ1(%r16), %r20
cmpib,COND(=),n 0,%r20,intr_restore /* backward */
cmpib,COND(=),n LINUX_GATEWAY_SPACE, %r20, intr_restore /* backward */

/* NOTE: We need to enable interrupts if we have to deliver
* signals. We used to do this earlier but it caused kernel
Expand Down
10 changes: 4 additions & 6 deletions arch/parisc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,17 +513,15 @@ static void __init map_pages(unsigned long start_vaddr,

void __init set_kernel_text_rw(int enable_read_write)
{
unsigned long start = (unsigned long)_stext;
unsigned long start = (unsigned long)__init_begin;
unsigned long end = (unsigned long)_etext;

map_pages(start, __pa(start), end-start,
PAGE_KERNEL_RWX, enable_read_write ? 1:0);

/* force the kernel to see the new TLB entries */
__flush_tlb_range(0, start, end);

/* dump old cached instructions */
flush_icache_range(start, end);
/* force the kernel to see the new page table entries */
flush_cache_all();
flush_tlb_all();
}

void __ref free_initmem(void)
Expand Down

0 comments on commit c38239b

Please sign in to comment.