aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-12 02:59:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-12 02:59:07 -0400
commit1573d2caf713874cfe0d1336c823d0fb548d8bed (patch)
tree5757eb1a18a5536441c1347726f9c6cbbe0ca31e /arch/parisc
parent4cdf8dbe2d4b3891a9abd9f9ec32acbe58de0cf6 (diff)
parent0a862485f42af7df530b0b5f0e5ba8ffbb3a4a12 (diff)
Merge branch 'parisc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fixes from Helge Deller: "Some final updates and fixes for this merge window for the parisc architecture. Changes include: - Fix boot problems with new memblock allocator on rp3410 machine - Increase initial kernel mapping size for 32- and 64-bit kernels, this allows to boot bigger kernels which have many modules built-in - Fix kernel layout regarding __gp and move exception table into RO section - Show trap names in crashes, use extable.h header instead of module.h" * 'parisc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Show trap name in kernel crash parisc: Zero-initialize newly alloced memblock parisc: Move exception table into read-only section parisc: Fix kernel memory layout regarding position of __gp parisc: Increase initial kernel mapping size parisc: Migrate exception table users off module.h and onto extable.h
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/include/asm/pgtable.h6
-rw-r--r--arch/parisc/include/asm/traps.h1
-rw-r--r--arch/parisc/kernel/traps.c4
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S14
-rw-r--r--arch/parisc/mm/fault.c19
-rw-r--r--arch/parisc/mm/init.c2
6 files changed, 29 insertions, 17 deletions
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
index e44bdb9078a5..c2c43f714684 100644
--- a/arch/parisc/include/asm/pgtable.h
+++ b/arch/parisc/include/asm/pgtable.h
@@ -83,10 +83,10 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
83 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) 83 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e))
84 84
85/* This is the size of the initially mapped kernel memory */ 85/* This is the size of the initially mapped kernel memory */
86#if defined(CONFIG_64BIT) || defined(CONFIG_SMP) 86#if defined(CONFIG_64BIT)
87#define KERNEL_INITIAL_ORDER 25 /* 1<<25 = 32MB */ 87#define KERNEL_INITIAL_ORDER 26 /* 1<<26 = 64MB */
88#else 88#else
89#define KERNEL_INITIAL_ORDER 24 /* 1<<24 = 16MB */ 89#define KERNEL_INITIAL_ORDER 25 /* 1<<25 = 32MB */
90#endif 90#endif
91#define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) 91#define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER)
92 92
diff --git a/arch/parisc/include/asm/traps.h b/arch/parisc/include/asm/traps.h
index 5e953ab4530d..63670231f48a 100644
--- a/arch/parisc/include/asm/traps.h
+++ b/arch/parisc/include/asm/traps.h
@@ -11,6 +11,7 @@ void parisc_terminate(char *msg, struct pt_regs *regs,
11void die_if_kernel(char *str, struct pt_regs *regs, long err); 11void die_if_kernel(char *str, struct pt_regs *regs, long err);
12 12
13/* mm/fault.c */ 13/* mm/fault.c */
14const char *trap_name(unsigned long code);
14void do_page_fault(struct pt_regs *regs, unsigned long code, 15void do_page_fault(struct pt_regs *regs, unsigned long code,
15 unsigned long address); 16 unsigned long address);
16#endif 17#endif
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 97d6b208e129..378df9207406 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -458,8 +458,8 @@ void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long o
458 } 458 }
459 459
460 printk("\n"); 460 printk("\n");
461 printk(KERN_CRIT "%s: Code=%d regs=%p (Addr=" RFMT ")\n", 461 pr_crit("%s: Code=%d (%s) regs=%p (Addr=" RFMT ")\n",
462 msg, code, regs, offset); 462 msg, code, trap_name(code), regs, offset);
463 show_regs(regs); 463 show_regs(regs);
464 464
465 spin_unlock(&terminate_lock); 465 spin_unlock(&terminate_lock);
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index b37787dbe775..3d6ef1b29c6a 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -90,8 +90,9 @@ SECTIONS
90 /* Start of data section */ 90 /* Start of data section */
91 _sdata = .; 91 _sdata = .;
92 92
93 RO_DATA_SECTION(8) 93 /* Architecturally we need to keep __gp below 0x1000000 and thus
94 94 * in front of RO_DATA_SECTION() which stores lots of tracepoint
95 * and ftrace symbols. */
95#ifdef CONFIG_64BIT 96#ifdef CONFIG_64BIT
96 . = ALIGN(16); 97 . = ALIGN(16);
97 /* Linkage tables */ 98 /* Linkage tables */
@@ -106,6 +107,12 @@ SECTIONS
106 } 107 }
107#endif 108#endif
108 109
110 RO_DATA_SECTION(8)
111
112 /* RO because of BUILDTIME_EXTABLE_SORT */
113 EXCEPTION_TABLE(8)
114 NOTES
115
109 /* unwind info */ 116 /* unwind info */
110 .PARISC.unwind : { 117 .PARISC.unwind : {
111 __start___unwind = .; 118 __start___unwind = .;
@@ -121,9 +128,6 @@ SECTIONS
121 . = ALIGN(HUGEPAGE_SIZE); 128 . = ALIGN(HUGEPAGE_SIZE);
122 data_start = .; 129 data_start = .;
123 130
124 EXCEPTION_TABLE(8)
125 NOTES
126
127 /* Data */ 131 /* Data */
128 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE) 132 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
129 133
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
index 47a6ca4c9e40..8ff9253930af 100644
--- a/arch/parisc/mm/fault.c
+++ b/arch/parisc/mm/fault.c
@@ -14,7 +14,7 @@
14#include <linux/ptrace.h> 14#include <linux/ptrace.h>
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/module.h> 17#include <linux/extable.h>
18#include <linux/uaccess.h> 18#include <linux/uaccess.h>
19 19
20#include <asm/traps.h> 20#include <asm/traps.h>
@@ -204,6 +204,16 @@ static const char * const trap_description[] = {
204 [28] "Unaligned data reference trap", 204 [28] "Unaligned data reference trap",
205}; 205};
206 206
207const char *trap_name(unsigned long code)
208{
209 const char *t = NULL;
210
211 if (code < ARRAY_SIZE(trap_description))
212 t = trap_description[code];
213
214 return t ? t : "Unknown trap";
215}
216
207/* 217/*
208 * Print out info about fatal segfaults, if the show_unhandled_signals 218 * Print out info about fatal segfaults, if the show_unhandled_signals
209 * sysctl is set: 219 * sysctl is set:
@@ -213,8 +223,6 @@ show_signal_msg(struct pt_regs *regs, unsigned long code,
213 unsigned long address, struct task_struct *tsk, 223 unsigned long address, struct task_struct *tsk,
214 struct vm_area_struct *vma) 224 struct vm_area_struct *vma)
215{ 225{
216 const char *trap_name = NULL;
217
218 if (!unhandled_signal(tsk, SIGSEGV)) 226 if (!unhandled_signal(tsk, SIGSEGV))
219 return; 227 return;
220 228
@@ -226,10 +234,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long code,
226 tsk->comm, code, address); 234 tsk->comm, code, address);
227 print_vma_addr(KERN_CONT " in ", regs->iaoq[0]); 235 print_vma_addr(KERN_CONT " in ", regs->iaoq[0]);
228 236
229 if (code < ARRAY_SIZE(trap_description)) 237 pr_cont(" trap #%lu: %s%c", code, trap_name(code),
230 trap_name = trap_description[code];
231 pr_warn(KERN_CONT " trap #%lu: %s%c", code,
232 trap_name ? trap_name : "unknown",
233 vma ? ',':'\n'); 238 vma ? ',':'\n');
234 239
235 if (vma) 240 if (vma)
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 356f38473b5d..e02ada312be8 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -105,6 +105,8 @@ static void * __init get_memblock(unsigned long size)
105 else 105 else
106 panic("get_memblock() failed.\n"); 106 panic("get_memblock() failed.\n");
107 107
108 memset(__va(phys), 0, size);
109
108 return __va(phys); 110 return __va(phys);
109} 111}
110 112