Commit c7816456 authored by Richard Henderson's avatar Richard Henderson

Merge minor changes from entry_rewrite tree.

parent 5d059ffc
...@@ -251,6 +251,10 @@ CONFIG_ALPHA_PRIMO ...@@ -251,6 +251,10 @@ CONFIG_ALPHA_PRIMO
CONFIG_ALPHA_GAMMA CONFIG_ALPHA_GAMMA
Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx. Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx.
CONFIG_ALPHA_EV67
Is this a machine based on the EV67 core? If in doubt, select N here
and the machine will be treated as an EV6.
CONFIG_ALPHA_SRM CONFIG_ALPHA_SRM
There are two different types of booting firmware on Alphas: SRM, There are two different types of booting firmware on Alphas: SRM,
which is command line driven, and ARC, which uses menus and arrow which is command line driven, and ARC, which uses menus and arrow
...@@ -610,3 +614,14 @@ CONFIG_DEBUG_SPINLOCK ...@@ -610,3 +614,14 @@ CONFIG_DEBUG_SPINLOCK
best used in conjunction with the NMI watchdog so that spinlock best used in conjunction with the NMI watchdog so that spinlock
deadlocks are also debuggable. deadlocks are also debuggable.
CONFIG_DEBUG_RWLOCK
If you say Y here then read-write lock processing will count how many
times it has tried to get the lock and issue an error message after
too many attempts. If you suspect a rwlock problem or a kernel
hacker asks for this option then say Y. Otherwise say N.
CONFIG_DEBUG_SEMAPHORE
If you say Y here then semaphore processing will issue lots of
verbose debugging messages. If you suspect a semaphore problem or a
kernel hacker asks for this option then say Y. Otherwise say N.
This diff is collapsed.
...@@ -191,26 +191,13 @@ machine_power_off(void) ...@@ -191,26 +191,13 @@ machine_power_off(void)
common_shutdown(LINUX_REBOOT_CMD_POWER_OFF, NULL); common_shutdown(LINUX_REBOOT_CMD_POWER_OFF, NULL);
} }
/* Used by sysrq-p, among others. I don't believe r9-r15 are ever
saved in the context it's used. */
void void
show_regs(struct pt_regs * regs) show_regs(struct pt_regs *regs)
{ {
printk("\n"); dik_show_regs(regs, 0);
printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
printk("ps: %04lx pc: [<%016lx>] CPU %d %s\n",
regs->ps, regs->pc, smp_processor_id(), print_tainted());
printk("rp: [<%016lx>] sp: %p\n", regs->r26, regs+1);
printk(" r0: %016lx r1: %016lx r2: %016lx r3: %016lx\n",
regs->r0, regs->r1, regs->r2, regs->r3);
printk(" r4: %016lx r5: %016lx r6: %016lx r7: %016lx\n",
regs->r4, regs->r5, regs->r6, regs->r7);
printk(" r8: %016lx r16: %016lx r17: %016lx r18: %016lx\n",
regs->r8, regs->r16, regs->r17, regs->r18);
printk("r19: %016lx r20: %016lx r21: %016lx r22: %016lx\n",
regs->r19, regs->r20, regs->r21, regs->r22);
printk("r23: %016lx r24: %016lx r25: %016lx r26: %016lx\n",
regs->r23, regs->r24, regs->r25, regs->r26);
printk("r27: %016lx r28: %016lx r29: %016lx hae: %016lx\n",
regs->r27, regs->r28, regs->gp, regs->hae);
} }
/* /*
......
...@@ -125,11 +125,10 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -125,11 +125,10 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
goto bad_area; goto bad_area;
if (expand_stack(vma, address)) if (expand_stack(vma, address))
goto bad_area; goto bad_area;
/*
* Ok, we have a good vm_area for this memory access, so /* Ok, we have a good vm_area for this memory access, so
* we can handle it.. we can handle it. */
*/ good_area:
good_area:
if (cause < 0) { if (cause < 0) {
if (!(vma->vm_flags & VM_EXEC)) if (!(vma->vm_flags & VM_EXEC))
goto bad_area; goto bad_area;
...@@ -143,11 +142,9 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -143,11 +142,9 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
} }
survive: survive:
/* /* If for any reason at all we couldn't handle the fault,
* If for any reason at all we couldn't handle the fault, make sure we exit gracefully rather than endlessly redo
* make sure we exit gracefully rather than endlessly redo the fault. */
* the fault.
*/
fault = handle_mm_fault(mm, vma, address, cause > 0); fault = handle_mm_fault(mm, vma, address, cause > 0);
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
...@@ -155,14 +152,11 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -155,14 +152,11 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
goto out_of_memory; goto out_of_memory;
if (fault == 0) if (fault == 0)
goto do_sigbus; goto do_sigbus;
return; return;
/* /* Something tried to access memory that isn't in our memory map.
* Something tried to access memory that isn't in our memory map.. Fix it, but check if it's kernel or user first. */
* Fix it, but check if it's kernel or user first.. bad_area:
*/
bad_area:
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
if (user_mode(regs)) { if (user_mode(regs)) {
...@@ -170,7 +164,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -170,7 +164,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
return; return;
} }
no_context: no_context:
/* Are we prepared to handle this fault as an exception? */ /* Are we prepared to handle this fault as an exception? */
if ((fixup = search_exception_table(regs->pc, regs->gp)) != 0) { if ((fixup = search_exception_table(regs->pc, regs->gp)) != 0) {
unsigned long newpc; unsigned long newpc;
...@@ -183,20 +177,16 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -183,20 +177,16 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
return; return;
} }
/* /* Oops. The kernel tried to access some bad page. We'll have to
* Oops. The kernel tried to access some bad page. We'll have to terminate things with extreme prejudice. */
* terminate things with extreme prejudice.
*/
printk(KERN_ALERT "Unable to handle kernel paging request at " printk(KERN_ALERT "Unable to handle kernel paging request at "
"virtual address %016lx\n", address); "virtual address %016lx\n", address);
die_if_kernel("Oops", regs, cause, (unsigned long*)regs - 16); die_if_kernel("Oops", regs, cause, (unsigned long*)regs - 16);
do_exit(SIGKILL); do_exit(SIGKILL);
/* /* We ran out of memory, or some other thing happened to us that
* We ran out of memory, or some other thing happened to us that made made us unable to handle the page fault gracefully. */
* us unable to handle the page fault gracefully. out_of_memory:
*/
out_of_memory:
if (current->pid == 1) { if (current->pid == 1) {
yield(); yield();
down_read(&mm->mmap_sem); down_read(&mm->mmap_sem);
...@@ -208,18 +198,16 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -208,18 +198,16 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
goto no_context; goto no_context;
do_exit(SIGKILL); do_exit(SIGKILL);
do_sigbus: do_sigbus:
/* /* Send a sigbus, regardless of whether we were in kernel
* Send a sigbus, regardless of whether we were in kernel or user mode. */
* or user mode.
*/
force_sig(SIGBUS, current); force_sig(SIGBUS, current);
if (!user_mode(regs)) if (!user_mode(regs))
goto no_context; goto no_context;
return; return;
#ifdef CONFIG_ALPHA_LARGE_VMALLOC #ifdef CONFIG_ALPHA_LARGE_VMALLOC
vmalloc_fault: vmalloc_fault:
if (user_mode(regs)) { if (user_mode(regs)) {
force_sig(SIGSEGV, current); force_sig(SIGSEGV, current);
return; return;
......
...@@ -58,10 +58,11 @@ SECTIONS ...@@ -58,10 +58,11 @@ SECTIONS
__initcall_end = .; __initcall_end = .;
} }
. = ALIGN(64); .data.percpu ALIGN(64): {
__per_cpu_start = .; __per_cpu_start = .;
.data.percpu : { *(.data.percpu) } *(.data.percpu)
__per_cpu_end = .; __per_cpu_end = .;
}
/* The initial task and kernel stack */ /* The initial task and kernel stack */
.data.init_thread ALIGN(2*8192) : { .data.init_thread ALIGN(2*8192) : {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#define PAL_wrperfmon 57 #define PAL_wrperfmon 57
#define PAL_rdusp 58 #define PAL_rdusp 58
#define PAL_whami 60 #define PAL_whami 60
#define PAL_rtsys 61 #define PAL_retsys 61
#define PAL_rti 63 #define PAL_rti 63
#endif /* __ALPHA_PAL_H */ #endif /* __ALPHA_PAL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment