Commit 3ec53303 authored by Paul Mackerras's avatar Paul Mackerras

Merge samba.org:/home/paulus/kernel/linux-2.5

into samba.org:/home/paulus/kernel/for-linus-ppc
parents 0bf36f29 3f3fbc0d
...@@ -53,7 +53,9 @@ else ...@@ -53,7 +53,9 @@ else
endif endif
endif endif
core-y += arch/ppc/kernel/ arch/ppc/platforms/ arch/ppc/mm/ arch/ppc/lib/ core-y += arch/ppc/kernel/ arch/ppc/platforms/ \
arch/ppc/mm/ arch/ppc/lib/
core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/
core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/
core-$(CONFIG_XMON) += arch/ppc/xmon/ core-$(CONFIG_XMON) += arch/ppc/xmon/
core-$(CONFIG_APUS) += arch/ppc/amiga/ core-$(CONFIG_APUS) += arch/ppc/amiga/
...@@ -79,13 +81,21 @@ $(BOOT_TARGETS): vmlinux ...@@ -79,13 +81,21 @@ $(BOOT_TARGETS): vmlinux
cp -f arch/ppc/configs/$(@:config=defconfig) .config cp -f arch/ppc/configs/$(@:config=defconfig) .config
archclean: archclean:
rm -f arch/ppc/kernel/{mk_defs,asm-offsets.h,find_name}
rm -f arch/ppc/iSeries/ReleaseData.h
@$(MAKEBOOT) clean @$(MAKEBOOT) clean
archmrproper: archmrproper:
prepare: checkbin prepare: include/asm-$(ARCH)/offsets.h checkbin
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER
include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@
include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
@echo -n ' Generating $@'
@$(update-if-changed)
ifdef CONFIG_6xx ifdef CONFIG_6xx
# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later # Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later
...@@ -105,3 +115,8 @@ else ...@@ -105,3 +115,8 @@ else
checkbin: checkbin:
@true @true
endif endif
CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
include/asm-$(ARCH)/offsets.h \
arch/$(ARCH)/kernel/asm-offsets.s \
arch/$(ARCH)/iSeries/ReleaseData.h
...@@ -89,23 +89,5 @@ obj-$(CONFIG_PPC_ISERIES) += iSeries_misc.o ...@@ -89,23 +89,5 @@ obj-$(CONFIG_PPC_ISERIES) += iSeries_misc.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
entry.o: entry.S asm-offsets.h
misc.o: misc.S asm-offsets.h
l2cr.o: l2cr.S asm-offsets.h
head.o: head.S asm-offsets.h
head_4xx.o: head_4xx.S asm-offsets.h
head_8xx.o: head_8xx.S asm-offsets.h
iSeries_head.o: iSeries_head.S asm-offsets.h
iSeries_misc.o: iSeries_misc.S asm-offsets.h
asm-offsets.h: mk_defs.c asm-offsets.head \
$(TOPDIR)/include/asm/mmu.h \
$(TOPDIR)/include/asm/processor.h \
$(TOPDIR)/include/asm/pgtable.h \
$(TOPDIR)/include/asm/ptrace.h
$(CC) $(CFLAGS) -S mk_defs.c
(cat asm-offsets.head; grep '^#define' mk_defs.s) >asm-offsets.h
rm mk_defs.s
find_name : find_name.c find_name : find_name.c
$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c $(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
* #defines from the assembly-language output. * #defines from the assembly-language output.
*/ */
#include <stddef.h>
#include <linux/config.h> #include <linux/config.h>
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -34,7 +33,9 @@ ...@@ -34,7 +33,9 @@
#endif /* CONFIG_PPC_ISERIES */ #endif /* CONFIG_PPC_ISERIES */
#define DEFINE(sym, val) \ #define DEFINE(sym, val) \
asm volatile("\n#define\t" #sym "\t%0" : : "i" (val)) asm volatile("\n->" #sym " %0 " #val : : "i" (val))
#define BLANK() asm volatile("\n->" : : )
int int
main(void) main(void)
......
/*
* WARNING! This file is automatically generated - DO NOT EDIT!
*/
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <asm/cputable.h> #include <asm/cputable.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include "asm-offsets.h" #include <asm/offsets.h>
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
#include "iSeries_asm.h" #include "iSeries_asm.h"
#endif /* CONFIG_PPC_ISERIES */ #endif /* CONFIG_PPC_ISERIES */
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include "asm-offsets.h" #include <asm/offsets.h>
#ifdef CONFIG_APUS #ifdef CONFIG_APUS
#include <asm/amigappc.h> #include <asm/amigappc.h>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <asm/cputable.h> #include <asm/cputable.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include "asm-offsets.h" #include <asm/offsets.h>
/* As with the other PowerPC ports, it is expected that when code /* As with the other PowerPC ports, it is expected that when code
* execution begins here, the following registers contain valid, yet * execution begins here, the following registers contain valid, yet
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <asm/cputable.h> #include <asm/cputable.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include "asm-offsets.h" #include <asm/offsets.h>
.text .text
.globl _stext .globl _stext
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include "asm-offsets.h" #include <asm/offsets.h>
#include "iSeries_asm.h" #include "iSeries_asm.h"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include "asm-offsets.h" #include <asm/offsets.h>
#include "iSeries_asm.h" #include "iSeries_asm.h"
.text .text
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <asm/mmu.h> #include <asm/mmu.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include "asm-offsets.h" #include <asm/offsets.h>
.text .text
......
...@@ -150,11 +150,11 @@ struct hw_interrupt_type open_pic_ipi = { ...@@ -150,11 +150,11 @@ struct hw_interrupt_type open_pic_ipi = {
if (irq < open_pic_irq_offset || irq >= NumSources+open_pic_irq_offset \ if (irq < open_pic_irq_offset || irq >= NumSources+open_pic_irq_offset \
|| ISR[irq - open_pic_irq_offset] == 0) { \ || ISR[irq - open_pic_irq_offset] == 0) { \
printk("open_pic.c:%d: illegal irq %d\n", __LINE__, irq); \ printk("open_pic.c:%d: illegal irq %d\n", __LINE__, irq); \
show_stack(NULL); } dump_stack(); }
#define check_arg_cpu(cpu) \ #define check_arg_cpu(cpu) \
if (cpu < 0 || cpu >= NumProcessors){ \ if (cpu < 0 || cpu >= NumProcessors){ \
printk("open_pic.c:%d: illegal cpu %d\n", __LINE__, cpu); \ printk("open_pic.c:%d: illegal cpu %d\n", __LINE__, cpu); \
show_stack(NULL); } dump_stack(); }
#else #else
#define check_arg_ipi(ipi) do {} while (0) #define check_arg_ipi(ipi) do {} while (0)
#define check_arg_timer(timer) do {} while (0) #define check_arg_timer(timer) do {} while (0)
...@@ -317,7 +317,7 @@ void __init openpic_init(int linux_irq_offset) ...@@ -317,7 +317,7 @@ void __init openpic_init(int linux_irq_offset)
openpic_reset(); openpic_reset();
#endif #endif
if (ppc_md.progress) ppc_md.progress("openpic enter", 0x122); if (ppc_md.progress) ppc_md.progress("openpic: enter", 0x122);
t = openpic_read(&OpenPIC->Global.Feature_Reporting0); t = openpic_read(&OpenPIC->Global.Feature_Reporting0);
switch (t & OPENPIC_FEATURE_VERSION_MASK) { switch (t & OPENPIC_FEATURE_VERSION_MASK) {
...@@ -351,7 +351,7 @@ void __init openpic_init(int linux_irq_offset) ...@@ -351,7 +351,7 @@ void __init openpic_init(int linux_irq_offset)
open_pic_irq_offset = linux_irq_offset; open_pic_irq_offset = linux_irq_offset;
/* Initialize timer interrupts */ /* Initialize timer interrupts */
if ( ppc_md.progress ) ppc_md.progress("openpic timer",0x3ba); if ( ppc_md.progress ) ppc_md.progress("openpic: timer",0x3ba);
for (i = 0; i < OPENPIC_NUM_TIMERS; i++) { for (i = 0; i < OPENPIC_NUM_TIMERS; i++) {
/* Disabled, Priority 0 */ /* Disabled, Priority 0 */
openpic_inittimer(i, 0, OPENPIC_VEC_TIMER+i+linux_irq_offset); openpic_inittimer(i, 0, OPENPIC_VEC_TIMER+i+linux_irq_offset);
...@@ -361,7 +361,7 @@ void __init openpic_init(int linux_irq_offset) ...@@ -361,7 +361,7 @@ void __init openpic_init(int linux_irq_offset)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* Initialize IPI interrupts */ /* Initialize IPI interrupts */
if ( ppc_md.progress ) ppc_md.progress("openpic ipi",0x3bb); if ( ppc_md.progress ) ppc_md.progress("openpic: ipi",0x3bb);
for (i = 0; i < OPENPIC_NUM_IPI; i++) { for (i = 0; i < OPENPIC_NUM_IPI; i++) {
/* Disabled, Priority 10..13 */ /* Disabled, Priority 10..13 */
openpic_initipi(i, 10+i, OPENPIC_VEC_IPI+i+linux_irq_offset); openpic_initipi(i, 10+i, OPENPIC_VEC_IPI+i+linux_irq_offset);
...@@ -374,7 +374,7 @@ void __init openpic_init(int linux_irq_offset) ...@@ -374,7 +374,7 @@ void __init openpic_init(int linux_irq_offset)
#endif #endif
/* Initialize external interrupts */ /* Initialize external interrupts */
if (ppc_md.progress) ppc_md.progress("openpic ext",0x3bc); if (ppc_md.progress) ppc_md.progress("openpic: external",0x3bc);
openpic_set_priority(0xf); openpic_set_priority(0xf);
...@@ -389,7 +389,7 @@ void __init openpic_init(int linux_irq_offset) ...@@ -389,7 +389,7 @@ void __init openpic_init(int linux_irq_offset)
openpic_disable_irq(i+linux_irq_offset); openpic_disable_irq(i+linux_irq_offset);
/* /*
* We find the vale from either the InitSenses table * We find the value from either the InitSenses table
* or assume a negative polarity level interrupt. * or assume a negative polarity level interrupt.
*/ */
sense = (i < OpenPIC_NumInitSenses)? OpenPIC_InitSenses[i]: 1; sense = (i < OpenPIC_NumInitSenses)? OpenPIC_InitSenses[i]: 1;
...@@ -410,7 +410,7 @@ void __init openpic_init(int linux_irq_offset) ...@@ -410,7 +410,7 @@ void __init openpic_init(int linux_irq_offset)
irq_desc[i].handler = &open_pic; irq_desc[i].handler = &open_pic;
/* Initialize the spurious interrupt */ /* Initialize the spurious interrupt */
if (ppc_md.progress) ppc_md.progress("openpic spurious",0x3bd); if (ppc_md.progress) ppc_md.progress("openpic: spurious",0x3bd);
openpic_set_spurious(OPENPIC_VEC_SPURIOUS+linux_irq_offset); openpic_set_spurious(OPENPIC_VEC_SPURIOUS+linux_irq_offset);
/* Initialize the cascade */ /* Initialize the cascade */
...@@ -426,7 +426,7 @@ void __init openpic_init(int linux_irq_offset) ...@@ -426,7 +426,7 @@ void __init openpic_init(int linux_irq_offset)
#endif #endif
openpic_set_priority(0); openpic_set_priority(0);
if (ppc_md.progress) ppc_md.progress("openpic exit",0x222); if (ppc_md.progress) ppc_md.progress("openpic: exit",0x222);
} }
#ifdef notused #ifdef notused
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/prctl.h> #include <linux/prctl.h>
#include <linux/init_task.h> #include <linux/init_task.h>
#include <linux/module.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -69,6 +70,8 @@ struct task_struct init_task = INIT_TASK(init_task); ...@@ -69,6 +70,8 @@ struct task_struct init_task = INIT_TASK(init_task);
/* only used to get secondary processor up */ /* only used to get secondary processor up */
struct task_struct *current_set[NR_CPUS] = {&init_task, }; struct task_struct *current_set[NR_CPUS] = {&init_task, };
static void show_tsk_stack(struct task_struct *tsk, unsigned long sp);
#undef SHOW_TASK_SWITCHES #undef SHOW_TASK_SWITCHES
#undef CHECK_STACK #undef CHECK_STACK
...@@ -264,15 +267,15 @@ void show_regs(struct pt_regs * regs) ...@@ -264,15 +267,15 @@ void show_regs(struct pt_regs * regs)
printk("TASK = %p[%d] '%s' ", printk("TASK = %p[%d] '%s' ",
current, current->pid, current->comm); current, current->pid, current->comm);
printk("Last syscall: %ld ", current->thread.last_syscall); printk("Last syscall: %ld ", current->thread.last_syscall);
printk("\nlast math %p last altivec %p", last_task_used_math,
last_task_used_altivec);
#if defined(CONFIG_4xx) && defined(DCRN_PLB0_BEAR) #if defined(CONFIG_4xx) && defined(DCRN_PLB0_BEAR)
printk("\nPLB0: bear= 0x%8.8x acr= 0x%8.8x besr= 0x%8.8x\n", printk("\nPLB0: bear= 0x%8.8x acr= 0x%8.8x besr= 0x%8.8x\n",
mfdcr(DCRN_POB0_BEAR), mfdcr(DCRN_PLB0_ACR), mfdcr(DCRN_PLB0_BEAR), mfdcr(DCRN_PLB0_ACR),
mfdcr(DCRN_PLB0_BESR)); mfdcr(DCRN_PLB0_BESR));
#endif
#if defined(CONFIG_4xx) && defined(DCRN_POB0_BEAR)
printk("PLB0 to OPB: bear= 0x%8.8x besr0= 0x%8.8x besr1= 0x%8.8x\n", printk("PLB0 to OPB: bear= 0x%8.8x besr0= 0x%8.8x besr1= 0x%8.8x\n",
mfdcr(DCRN_PLB0_BEAR), mfdcr(DCRN_POB0_BESR0), mfdcr(DCRN_POB0_BEAR), mfdcr(DCRN_POB0_BESR0),
mfdcr(DCRN_POB0_BESR1)); mfdcr(DCRN_POB0_BESR1));
#endif #endif
...@@ -291,7 +294,7 @@ void show_regs(struct pt_regs * regs) ...@@ -291,7 +294,7 @@ void show_regs(struct pt_regs * regs)
break; break;
} }
printk("\n"); printk("\n");
show_stack((unsigned long *)regs->gpr[1]); show_tsk_stack(current, regs->gpr[1]);
} }
void exit_thread(void) void exit_thread(void)
...@@ -489,50 +492,61 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2, ...@@ -489,50 +492,61 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
return error; return error;
} }
void void show_trace_task(struct task_struct *tsk)
show_stack(unsigned long *sp)
{ {
int cnt = 0; show_tsk_stack(tsk, tsk->thread.ksp);
unsigned long i;
if (sp == NULL)
sp = (unsigned long *)_get_SP();
printk("Call backtrace: ");
for (;;) {
if (__get_user(sp, (unsigned long **)sp))
break;
if (sp == NULL)
break;
if (__get_user(i, &sp[1]))
break;
if (cnt++ % 7 == 0)
printk("\n");
printk("%08lX ", i);
if (cnt > 32)
break;
}
printk("\n");
} }
void show_trace_task(struct task_struct *tsk) void dump_stack(void)
{ {
unsigned long stack_top = (unsigned long) tsk->thread_info + THREAD_SIZE; show_tsk_stack(current, _get_SP());
unsigned long sp, prev_sp; }
static void show_tsk_stack(struct task_struct *tsk, unsigned long sp)
{
unsigned long stack_top, prev_sp, ret;
int count = 0; int count = 0;
unsigned long next_exc = 0;
struct pt_regs *regs;
extern char ret_from_except, ret_from_except_full, ret_from_syscall;
if (tsk == NULL) if (tsk == NULL)
return; return;
sp = (unsigned long) &tsk->thread.ksp; prev_sp = (unsigned long) (tsk->thread_info + 1);
do { stack_top = (unsigned long) tsk->thread_info + THREAD_SIZE;
prev_sp = sp; while (count < 16 && sp > prev_sp && sp < stack_top && (sp & 3) == 0) {
if (count == 0) {
printk("Call trace:");
#if CONFIG_KALLSYMS
printk("\n");
#endif
} else {
if (next_exc) {
ret = next_exc;
next_exc = 0;
} else
ret = *(unsigned long *)(sp + 4);
printk(" [%08lx] ", ret);
#if CONFIG_KALLSYMS
print_symbol("%s", ret);
printk("\n");
#endif
if (ret == (unsigned long) &ret_from_except
|| ret == (unsigned long) &ret_from_except_full
|| ret == (unsigned long) &ret_from_syscall) {
/* sp + 16 points to an exception frame */
regs = (struct pt_regs *) (sp + 16);
if (sp + 16 + sizeof(*regs) <= stack_top)
next_exc = regs->nip;
}
}
++count;
sp = *(unsigned long *)sp; sp = *(unsigned long *)sp;
if (sp <= prev_sp || sp >= stack_top || (sp & 3) != 0) }
break; #if !CONFIG_KALLSYMS
if (count > 0) if (count > 0)
printk("[%08lx] ", *(unsigned long *)(sp + 4));
} while (++count < 16);
if (count > 1)
printk("\n"); printk("\n");
#endif
} }
#if 0 #if 0
......
...@@ -65,11 +65,11 @@ sys_sigsuspend(old_sigset_t mask, int p2, int p3, int p4, int p6, int p7, ...@@ -65,11 +65,11 @@ sys_sigsuspend(old_sigset_t mask, int p2, int p3, int p4, int p6, int p7,
sigset_t saveset; sigset_t saveset;
mask &= _BLOCKABLE; mask &= _BLOCKABLE;
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
saveset = current->blocked; saveset = current->blocked;
siginitset(&current->blocked, mask); siginitset(&current->blocked, mask);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
regs->result = -EINTR; regs->result = -EINTR;
regs->ccr |= 0x10000000; regs->ccr |= 0x10000000;
...@@ -96,11 +96,11 @@ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, int p3, int p4, int p6, ...@@ -96,11 +96,11 @@ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, int p3, int p4, int p6,
return -EFAULT; return -EFAULT;
sigdelsetmask(&newset, ~_BLOCKABLE); sigdelsetmask(&newset, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
saveset = current->blocked; saveset = current->blocked;
current->blocked = newset; current->blocked = newset;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
regs->result = -EINTR; regs->result = -EINTR;
regs->ccr |= 0x10000000; regs->ccr |= 0x10000000;
...@@ -157,7 +157,7 @@ sys_sigaction(int sig, const struct old_sigaction *act, ...@@ -157,7 +157,7 @@ sys_sigaction(int sig, const struct old_sigaction *act,
* When we have signals to deliver, we set up on the * When we have signals to deliver, we set up on the
* user stack, going down from the original stack pointer: * user stack, going down from the original stack pointer:
* a sigregs struct * a sigregs struct
* one or more sigcontext structs with * a sigcontext struct
* a gap of __SIGNAL_FRAMESIZE bytes * a gap of __SIGNAL_FRAMESIZE bytes
* *
* Each of these things must be a multiple of 16 bytes in size. * Each of these things must be a multiple of 16 bytes in size.
...@@ -196,7 +196,7 @@ int sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, ...@@ -196,7 +196,7 @@ int sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct rt_sigframe *rt_sf; struct rt_sigframe *rt_sf;
struct sigcontext_struct sigctx; struct sigcontext sigctx;
struct sigregs *sr; struct sigregs *sr;
elf_gregset_t saved_regs; /* an array of ELF_NGREG unsigned longs */ elf_gregset_t saved_regs; /* an array of ELF_NGREG unsigned longs */
sigset_t set; sigset_t set;
...@@ -208,10 +208,10 @@ int sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, ...@@ -208,10 +208,10 @@ int sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
|| copy_from_user(&st, &rt_sf->uc.uc_stack, sizeof(st))) || copy_from_user(&st, &rt_sf->uc.uc_stack, sizeof(st)))
goto badframe; goto badframe;
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
if (regs->msr & MSR_FP) if (regs->msr & MSR_FP)
giveup_fpu(current); giveup_fpu(current);
...@@ -297,12 +297,12 @@ setup_rt_frame(struct pt_regs *regs, struct sigregs *frame, ...@@ -297,12 +297,12 @@ setup_rt_frame(struct pt_regs *regs, struct sigregs *frame,
int sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, int sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct sigcontext_struct *sc, sigctx; struct sigcontext *sc, sigctx;
struct sigregs *sr; struct sigregs *sr;
elf_gregset_t saved_regs; /* an array of ELF_NGREG unsigned longs */ elf_gregset_t saved_regs; /* an array of ELF_NGREG unsigned longs */
sigset_t set; sigset_t set;
sc = (struct sigcontext_struct *)(regs->gpr[1] + __SIGNAL_FRAMESIZE); sc = (struct sigcontext *)(regs->gpr[1] + __SIGNAL_FRAMESIZE);
if (copy_from_user(&sigctx, sc, sizeof(sigctx))) if (copy_from_user(&sigctx, sc, sizeof(sigctx)))
goto badframe; goto badframe;
...@@ -311,10 +311,10 @@ int sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, ...@@ -311,10 +311,10 @@ int sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
set.sig[1] = sigctx._unused[3]; set.sig[1] = sigctx._unused[3];
#endif #endif
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
if (regs->msr & MSR_FP ) if (regs->msr & MSR_FP )
giveup_fpu(current); giveup_fpu(current);
...@@ -344,7 +344,7 @@ static void ...@@ -344,7 +344,7 @@ static void
setup_frame(struct pt_regs *regs, struct sigregs *frame, setup_frame(struct pt_regs *regs, struct sigregs *frame,
unsigned long newsp) unsigned long newsp)
{ {
struct sigcontext_struct *sc = (struct sigcontext_struct *) newsp; struct sigcontext *sc = (struct sigcontext *) newsp;
if (verify_area(VERIFY_WRITE, frame, sizeof(*frame))) if (verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
goto badframe; goto badframe;
...@@ -387,7 +387,7 @@ static void ...@@ -387,7 +387,7 @@ static void
handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
struct pt_regs * regs, unsigned long *newspp, unsigned long frame) struct pt_regs * regs, unsigned long *newspp, unsigned long frame)
{ {
struct sigcontext_struct *sc; struct sigcontext *sc;
struct rt_sigframe *rt_sf; struct rt_sigframe *rt_sf;
struct k_sigaction *ka = &current->sig->action[sig-1]; struct k_sigaction *ka = &current->sig->action[sig-1];
...@@ -428,7 +428,7 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, ...@@ -428,7 +428,7 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
} else { } else {
/* Put a sigcontext on the stack */ /* Put a sigcontext on the stack */
*newspp -= sizeof(*sc); *newspp -= sizeof(*sc);
sc = (struct sigcontext_struct *) *newspp; sc = (struct sigcontext *) *newspp;
if (verify_area(VERIFY_WRITE, sc, sizeof(*sc))) if (verify_area(VERIFY_WRITE, sc, sizeof(*sc)))
goto badframe; goto badframe;
...@@ -446,11 +446,11 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, ...@@ -446,11 +446,11 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
ka->sa.sa_handler = SIG_DFL; ka->sa.sa_handler = SIG_DFL;
if (!(ka->sa.sa_flags & SA_NODEFER)) { if (!(ka->sa.sa_flags & SA_NODEFER)) {
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask); sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
sigaddset(&current->blocked,sig); sigaddset(&current->blocked,sig);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
} }
return; return;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <asm/cputable.h> #include <asm/cputable.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include "asm-offsets.h" #include <asm/offsets.h>
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
.comm mmu_hash_lock,4 .comm mmu_hash_lock,4
...@@ -144,9 +144,7 @@ retry: ...@@ -144,9 +144,7 @@ retry:
#endif #endif
/* Return from the exception */ /* Return from the exception */
lwz r4,_LINK(r11)
lwz r5,_CTR(r11) lwz r5,_CTR(r11)
mtlr r4
mtctr r5 mtctr r5
lwz r0,GPR0(r11) lwz r0,GPR0(r11)
lwz r7,GPR7(r11) lwz r7,GPR7(r11)
......
#
# Makefile for the PowerPC 4xx linux kernel.
obj-$(CONFIG_ASH) += ash.o
obj-$(CONFIG_CEDAR) += cedar.o
obj-$(CONFIG_CPCI405) += cpci405.o
obj-$(CONFIG_EP405) += ep405.o
obj-$(CONFIG_OAK) += oak.o
obj-$(CONFIG_REDWOOD_4) += redwood.o
obj-$(CONFIG_REDWOOD_5) += redwood5.o
obj-$(CONFIG_WALNUT) += walnut.o
obj-$(CONFIG_NP405L) += ibmnp405l.o
obj-$(CONFIG_405GP) += ibm405gp.o
obj-$(CONFIG_REDWOOD_4) += ibmstb3.o
obj-$(CONFIG_REDWOOD_5) += ibmstb4.o
obj-$(CONFIG_NP405H) += ibmnp405h.o
include $(TOPDIR)/Rules.make
...@@ -14,13 +14,6 @@ CFLAGS_pmac_setup.o += -I$(TOPDIR)/arch/$(ARCH)/mm ...@@ -14,13 +14,6 @@ CFLAGS_pmac_setup.o += -I$(TOPDIR)/arch/$(ARCH)/mm
export-objs := prep_setup.o export-objs := prep_setup.o
obj-$(CONFIG_CEDER) += ceder.o ibmnp405l.o
obj-$(CONFIG_CPCI405) += cpci405.o ibm405gp.o
obj-$(CONFIG_EP405) += ep405.o ibm405gp.o
obj-$(CONFIG_REDWOOD_4) += redwood.o ibmstb3.o
obj-$(CONFIG_REDWOOD_5) += redwood5.o ibmstb4.o
obj-$(CONFIG_WALNUT) += walnut.o ibm405gp.o
obj-$(CONFIG_ASH) += ash.o ibmnp405h.o
obj-$(CONFIG_APUS) += apus_setup.o obj-$(CONFIG_APUS) += apus_setup.o
ifeq ($(CONFIG_APUS),y) ifeq ($(CONFIG_APUS),y)
obj-$(CONFIG_PCI) += apus_pci.o obj-$(CONFIG_PCI) += apus_pci.o
......
...@@ -147,6 +147,10 @@ SECTIONS ...@@ -147,6 +147,10 @@ SECTIONS
. = ALIGN(4096); . = ALIGN(4096);
__openfirmware_end = .; __openfirmware_end = .;
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
__stop___kallsyms = .;
__bss_start = .; __bss_start = .;
.bss : .bss :
{ {
...@@ -155,6 +159,8 @@ SECTIONS ...@@ -155,6 +159,8 @@ SECTIONS
*(.bss) *(.bss)
*(COMMON) *(COMMON)
} }
__bss_stop = .;
_end = . ; _end = . ;
PROVIDE (end = .); PROVIDE (end = .);
} }
...@@ -82,7 +82,7 @@ typedef struct { ...@@ -82,7 +82,7 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#if CONFIG_PREEMPT #if CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked()) # define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else #else
# define in_atomic() (preempt_count() != 0) # define in_atomic() (preempt_count() != 0)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
struct sigcontext_struct { struct sigcontext {
unsigned long _unused[4]; unsigned long _unused[4];
int signal; int signal;
unsigned long handler; unsigned long handler;
......
...@@ -7,7 +7,7 @@ struct ucontext { ...@@ -7,7 +7,7 @@ struct ucontext {
unsigned long uc_flags; unsigned long uc_flags;
struct ucontext *uc_link; struct ucontext *uc_link;
stack_t uc_stack; stack_t uc_stack;
struct sigcontext_struct uc_mcontext; struct sigcontext uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */ sigset_t uc_sigmask; /* mask last for extensibility */
}; };
......
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