Update for changes in mainline 2.5.3[01234].
EXPORT_SYMBOL_NOVERS(__up_wakeup);
EXPORT_SYMBOL(get_wchan);
-
-#ifdef CONFIG_PREEMPT
-EXPORT_SYMBOL(kernel_flag);
-#endif
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);
/*
#define MEM_SIZE (16*1024*1024)
#endif
-#ifdef CONFIG_PREEMPT
-spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
-#endif
-
#if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE)
char fpe_type[8];
regs->ARM_r0 = usig;
regs->ARM_sp = (unsigned long)frame;
regs->ARM_lr = retcode;
- regs->ARM_pc = handler & (thumb ? ~1 : ~3);
+ regs->ARM_pc = handler;
#ifdef CONFIG_CPU_32
regs->ARM_cpsr = cpsr;
*/
static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
{
- struct k_sigaction *ka;
siginfo_t info;
int single_stepping;
single_stepping = ptrace_cancel_bpt(current);
for (;;) {
- unsigned long signr;
-
- spin_lock_irq (¤t->sigmask_lock);
- signr = dequeue_signal(¤t->blocked, &info);
- spin_unlock_irq (¤t->sigmask_lock);
+ unsigned long signr = 0;
+ struct k_sigaction *ka;
+ sigset_t *mask = ¤t->blocked;
+
+ local_irq_disable();
+ if (current->sig->shared_pending.head) {
+ spin_lock(¤t->sig->siglock);
+ signr = dequeue_signal(¤t->sig->shared_pending, mask, &info);
+ spin_unlock(¤t->sig->siglock);
+ }
+ if (!signr) {
+ spin_lock(¤t->sigmask_lock);
+ signr = dequeue_signal(¤t->pending, mask, &info);
+ spin_unlock(¤t->sigmask_lock);
+ }
+ local_irq_enable();
if (!signr)
break;
if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
/* Let the debugger run. */
current->exit_code = signr;
- current->state = TASK_STOPPED;
+ set_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))
+ signr = current->exit_code;
+ if (signr == 0)
continue;
current->exit_code = 0;
case SIGSTOP: {
struct signal_struct *sig;
- current->state = TASK_STOPPED;
+ set_current_state(TASK_STOPPED);
current->exit_code = signr;
sig = current->parent->sig;
if (sig && !(sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP))
asmlinkage int sys_fork(struct pt_regs *regs)
{
struct task_struct *p;
- p = do_fork(SIGCHLD, regs->ARM_sp, regs, 0);
+ p = do_fork(SIGCHLD, regs->ARM_sp, regs, 0, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
}
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct pt_regs *regs)
{
struct task_struct *p;
+
+ /*
+ * We don't support SETTID / CLEARTID
+ */
+ if (clone_flags & (CLONE_SETTID | CLONE_CLEARTID))
+ return -EINVAL;
+
if (!newsp)
newsp = regs->ARM_sp;
- p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0);
+
+ p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, NULL);
+
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
}
asmlinkage int sys_vfork(struct pt_regs *regs)
{
struct task_struct *p;
- p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->ARM_sp, regs, 0);
+ p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->ARM_sp, regs, 0, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
}
#include <linux/init.h>
#include <asm/elf.h>
+#include <asm/io.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/hardware.h>
{
iotable_init(rpc_io_desc, ARRAY_SIZE(rpc_io_desc));
+ /*
+ * Turn off floppy.
+ */
+ outb(0xc, 0x3f2);
+
/*
* RiscPC can't handle half-word loads and stores
*/
__section__(".data.cacheline_aligned")))
#endif
+#define L1_CACHE_SHIFT_MAX 5 /* largest L1 which this arch supports */
+
#endif
#define ide_default_io_base(i) ((ide_ioreg_t)0)
#define ide_default_irq(b) (0)
+#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
+#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
+#define ide_check_region(from,extent) check_region((from), (extent))
+#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
+#define ide_release_region(from,extent) release_region((from), (extent))
+
+/*
+ * The following are not needed for the non-m68k ports
+ */
+#define ide_ack_intr(hwif) (1)
+#define ide_fix_driveid(id) do {} while (0)
+#define ide_release_lock(lock) do {} while (0)
+#define ide_get_lock(lock, hdlr, data) do {} while (0)
+
#endif /* __KERNEL__ */
#endif /* __ASMARM_IDE_H */
#define clf() __clf()
#define stf() __stf()
+#define irqs_disabled() \
+({ \
+ unsigned long flags; \
+ local_save_flags(flags); \
+ flags & PSR_I_BIT; \
+})
+
#endif /* CONFIG_SMP */
#endif /* __KERNEL__ */