diff options
| author | Ivan Kokshaysky <ink@jurassic.park.msu.ru> | 2002-09-10 17:55:58 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@hera.kernel.org> | 2002-09-10 17:55:58 -0700 |
| commit | e91208b7a79a581d1acece8fa6f33cfa50b7dcf2 (patch) | |
| tree | 4f9bdcc19cc734f7e59251b2cdfc43765fc7dc54 | |
| parent | 6ebbf06bbd101ab572bdf581e5baec320f61848a (diff) | |
[PATCH] alpha update
- signal update; make do_signal use generic get_signal_to_deliver()
- irqs_disabled macro
- remove vmlinux.lds.s target from arch/alpha/Makefile since it works
correctly in the top level Makefile
- extra argument for pcibios_enable_device (most likely we'll never
use it though...)
| -rw-r--r-- | arch/alpha/Makefile | 3 | ||||
| -rw-r--r-- | arch/alpha/kernel/init_task.c | 2 | ||||
| -rw-r--r-- | arch/alpha/kernel/pci.c | 2 | ||||
| -rw-r--r-- | arch/alpha/kernel/signal.c | 101 | ||||
| -rw-r--r-- | include/asm-alpha/signal.h | 1 | ||||
| -rw-r--r-- | include/asm-alpha/system.h | 2 |
6 files changed, 10 insertions, 101 deletions
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile index 5ff98abd62ad..c22b4900075f 100644 --- a/arch/alpha/Makefile +++ b/arch/alpha/Makefile @@ -128,9 +128,6 @@ archmrproper: vmlinux: arch/alpha/vmlinux.lds.s -arch/$(ARCH)/vmlinux.lds.s: arch/$(ARCH)/vmlinux.lds.S - $(CPP) $(CPPFLAGS) $(CPPFLAGS_$@) -D__ASSEMBLY__ -P -C -U$(ARCH) $< -o $@ - bootpfile: @$(MAKEBOOT) bootpfile diff --git a/arch/alpha/kernel/init_task.c b/arch/alpha/kernel/init_task.c index c52bef4d6fa2..608161944ee8 100644 --- a/arch/alpha/kernel/init_task.c +++ b/arch/alpha/kernel/init_task.c @@ -8,7 +8,7 @@ static struct fs_struct init_fs = INIT_FS; static struct files_struct init_files = INIT_FILES; -static struct signal_struct init_signals = INIT_SIGNALS; +static struct signal_struct init_signals = INIT_SIGNALS(init_signals); struct mm_struct init_mm = INIT_MM(init_mm); struct task_struct init_task = INIT_TASK(init_task); diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index cb74c9705cad..014d9fff57c4 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c @@ -343,7 +343,7 @@ pcibios_fixup_pbus_ranges(struct pci_bus * bus, } int -pcibios_enable_device(struct pci_dev *dev) +pcibios_enable_device(struct pci_dev *dev, int mask) { /* Nothing to do, since we enable all devices at startup. */ return 0; diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 4a72684c8f48..c0a4228b682b 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c @@ -592,108 +592,19 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw, unsigned long r0, unsigned long r19) { + siginfo_t info; + int signr; unsigned long single_stepping = ptrace_cancel_bpt(current); if (!oldset) oldset = ¤t->blocked; - while (1) { - unsigned long signr; - struct k_sigaction *ka; - siginfo_t info; - - spin_lock_irq(¤t->sigmask_lock); - signr = dequeue_signal(¤t->blocked, &info); - spin_unlock_irq(¤t->sigmask_lock); - - if (!signr) - break; - - if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { - /* Let the debugger run. */ - current->exit_code = signr; - current->state = TASK_STOPPED; - notify_parent(current, SIGCHLD); - schedule(); - single_stepping |= ptrace_cancel_bpt(current); - - /* We're back. Did the debugger cancel the sig? */ - if (!(signr = current->exit_code)) - continue; - current->exit_code = 0; - - /* The debugger continued. Ignore SIGSTOP. */ - if (signr == SIGSTOP) - continue; - - /* Update the siginfo structure. Is this good? */ - if (signr != info.si_signo) { - info.si_signo = signr; - info.si_errno = 0; - info.si_code = SI_USER; - info.si_pid = current->parent->pid; - info.si_uid = current->parent->uid; - } - - /* If the (new) signal is now blocked, requeue it. */ - if (sigismember(¤t->blocked, signr)) { - send_sig_info(signr, &info, current); - continue; - } - } - - ka = ¤t->sig->action[signr-1]; - if (ka->sa.sa_handler == SIG_IGN) { - if (signr != SIGCHLD) - continue; - /* Check for SIGCHLD: it's special. */ - while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0) - /* nothing */; - continue; - } - - if (ka->sa.sa_handler == SIG_DFL) { - int exit_code = signr & 0x7f; - - /* Init gets no signals it doesn't want. */ - if (current->pid == 1) - continue; - - switch (signr) { - case SIGCONT: case SIGCHLD: case SIGWINCH: - continue; - - case SIGTSTP: case SIGTTIN: case SIGTTOU: - if (is_orphaned_pgrp(current->pgrp)) - continue; - /* FALLTHRU */ - - case SIGSTOP: - current->state = TASK_STOPPED; - current->exit_code = signr; - if (!(current->parent->sig->action[SIGCHLD-1] - .sa.sa_flags & SA_NOCLDSTOP)) - notify_parent(current, SIGCHLD); - schedule(); - single_stepping |= ptrace_cancel_bpt(current); - continue; - - case SIGQUIT: case SIGILL: case SIGTRAP: - case SIGABRT: case SIGFPE: case SIGSEGV: - case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ: - if (do_coredump(signr, regs)) - exit_code |= 0x80; - /* FALLTHRU */ - - default: - lock_kernel(); - sig_exit(signr, exit_code, &info); - /* NOTREACHED */ - } - continue; - } + signr = get_signal_to_deliver(&info, regs); + if (signr > 0) { /* Whee! Actually deliver the signal. */ + struct k_sigaction *ka = ¤t->sig->action[signr-1]; + if (r0) syscall_restart(r0, r19, regs, ka); handle_signal(signr, ka, &info, oldset, regs, sw); if (single_stepping) diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h index 8730c4b833fe..07f843f72edc 100644 --- a/include/asm-alpha/signal.h +++ b/include/asm-alpha/signal.h @@ -186,7 +186,6 @@ struct sigstack { #ifdef __KERNEL__ #include <asm/sigcontext.h> -#define HAVE_ARCH_GET_SIGNAL_TO_DELIVER #define HAVE_ARCH_SYS_PAUSE #endif diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index 8e5848df6369..6342ed4efdbd 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h @@ -311,6 +311,8 @@ extern int __min_ipl; #define local_irq_save(flags) do { (flags) = swpipl(IPL_MAX); barrier(); } while(0) #define local_irq_restore(flags) do { barrier(); setipl(flags); barrier(); } while(0) +#define irqs_disabled() (getipl() == IPL_MAX) + /* * TB routines.. */ |
