提交 5dae61b8 编写于 作者: L Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Wrap SMP IPIs with irq_enter()/irq_exit().
  [SPARC64]: Fix args to 64-bit sys_semctl() via sys_ipc().
...@@ -866,14 +866,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs) ...@@ -866,14 +866,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs)
void *info = call_data->info; void *info = call_data->info;
clear_softint(1 << irq); clear_softint(1 << irq);
if (call_data->wait) {
/* let initiator proceed only after completion */ irq_enter();
func(info);
atomic_inc(&call_data->finished); if (!call_data->wait) {
} else {
/* let initiator proceed after getting data */ /* let initiator proceed after getting data */
atomic_inc(&call_data->finished); atomic_inc(&call_data->finished);
}
func(info); func(info);
irq_exit();
if (call_data->wait) {
/* let initiator proceed only after completion */
atomic_inc(&call_data->finished);
} }
} }
...@@ -1032,7 +1039,9 @@ void smp_receive_signal(int cpu) ...@@ -1032,7 +1039,9 @@ void smp_receive_signal(int cpu)
void smp_receive_signal_client(int irq, struct pt_regs *regs) void smp_receive_signal_client(int irq, struct pt_regs *regs)
{ {
irq_enter();
clear_softint(1 << irq); clear_softint(1 << irq);
irq_exit();
} }
void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
...@@ -1040,6 +1049,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) ...@@ -1040,6 +1049,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
struct mm_struct *mm; struct mm_struct *mm;
unsigned long flags; unsigned long flags;
irq_enter();
clear_softint(1 << irq); clear_softint(1 << irq);
/* See if we need to allocate a new TLB context because /* See if we need to allocate a new TLB context because
...@@ -1059,6 +1070,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) ...@@ -1059,6 +1070,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
load_secondary_context(mm); load_secondary_context(mm);
__flush_tlb_mm(CTX_HWBITS(mm->context), __flush_tlb_mm(CTX_HWBITS(mm->context),
SECONDARY_CONTEXT); SECONDARY_CONTEXT);
irq_exit();
} }
void smp_new_mmu_context_version(void) void smp_new_mmu_context_version(void)
...@@ -1217,6 +1230,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs) ...@@ -1217,6 +1230,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
{ {
clear_softint(1 << irq); clear_softint(1 << irq);
irq_enter();
preempt_disable(); preempt_disable();
__asm__ __volatile__("flushw"); __asm__ __volatile__("flushw");
...@@ -1229,6 +1244,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs) ...@@ -1229,6 +1244,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
prom_world(0); prom_world(0);
preempt_enable(); preempt_enable();
irq_exit();
} }
/* /proc/profile writes can call this, don't __init it please. */ /* /proc/profile writes can call this, don't __init it please. */
......
...@@ -454,8 +454,8 @@ asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, ...@@ -454,8 +454,8 @@ asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
err = sys_semget(first, (int)second, (int)third); err = sys_semget(first, (int)second, (int)third);
goto out; goto out;
case SEMCTL: { case SEMCTL: {
err = sys_semctl(first, third, err = sys_semctl(first, second,
(int)second | IPC_64, (int)third | IPC_64,
(union semun) ptr); (union semun) ptr);
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册