projects/linux·commit 59190f42

Merge branch 'generic-ipi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

59190f42 · Linus Torvalds <[email protected]> · 2008-07-15 14:02:33 -07:00

* 'generic-ipi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (22 commits)
  generic-ipi: more merge fallout
  generic-ipi: merge fix
  x86, visws: use mach-default/entry_arch.h
  x86, visws: fix generic-ipi build
  generic-ipi: fixlet
  generic-ipi: fix s390 build bug
  generic-ipi: fix linux-next tree build failure
  fix: "smp_call_function: get rid of the unused nonatomic/retry argument"
  fix: "smp_call_function: get rid of the unused nonatomic/retry argument"
  fix "smp_call_function: get rid of the unused nonatomic/retry argument"
  on_each_cpu(): kill unused 'retry' parameter
  smp_call_function: get rid of the unused nonatomic/retry argument
  sh: convert to generic helpers for IPI function calls
  parisc: convert to generic helpers for IPI function calls
  mips: convert to generic helpers for IPI function calls
  m32r: convert to generic helpers for IPI function calls
  arm: convert to generic helpers for IPI function calls
  alpha: convert to generic helpers for IPI function calls
  ia64: convert to generic helpers for IPI function calls
  powerpc: convert to generic helpers for IPI function calls
  ...

Fix trivial conflicts due to rcu updates in kernel/rcupdate.c manually
Commit
59190f4213462f191fc0d22d39b1cf18ea39ca39
Parents
64fd52a5 · f6f88e9b

Merge commit. Changes below are compared with the first parent: 64fd52a5.

Changes

129 files changed · +891 −1796

FileStatusAddDelContent
arch/Kconfigmodified+3−0View file
arch/alpha/Kconfigmodified+1−0View file
arch/alpha/kernel/core_marvel.cmodified+3−3View file
arch/alpha/kernel/process.cmodified+1−1View file
arch/alpha/kernel/smp.cmodified+15−165View file
arch/alpha/oprofile/common.cmodified+3−3View file
arch/arm/Kconfigmodified+1−0View file
arch/arm/kernel/smp.cmodified+18−145View file
arch/arm/oprofile/op_model_mpcore.cmodified+1−1View file
arch/arm/vfp/vfpmodule.cmodified+1−1View file
arch/cris/arch-v32/kernel/smp.cmodified+2−3View file
arch/ia64/Kconfigmodified+1−0View file
arch/ia64/kernel/mca.cmodified+3−3View file
arch/ia64/kernel/palinfo.cmodified+1−1View file
arch/ia64/kernel/perfmon.cmodified+3−3View file
arch/ia64/kernel/process.cmodified+1−1View file
arch/ia64/kernel/smp.cmodified+15−239View file
arch/ia64/kernel/smpboot.cmodified+3−3View file
arch/ia64/kernel/uncached.cmodified+2−3View file
arch/ia64/sn/kernel/sn2/sn_hwperf.cmodified+1−1View file
arch/m32r/Kconfigmodified+1−0View file
arch/m32r/kernel/m32r_ksyms.cmodified+0−3View file
arch/m32r/kernel/smp.cmodified+15−117View file
arch/m32r/kernel/traps.cmodified+2−1View file
arch/mips/Kconfigmodified+1−0View file
arch/mips/kernel/irq-rm9000.cmodified+2−2View file
arch/mips/kernel/smp.cmodified+15−134View file
arch/mips/kernel/smtc.cmodified+0−1View file
arch/mips/mm/c-r4k.cmodified+9−9View file
arch/mips/oprofile/common.cmodified+3−3View file
arch/mips/oprofile/op_model_mipsxx.cmodified+2−2View file
arch/mips/pmc-sierra/yosemite/prom.cmodified+1−1View file
arch/mips/sibyte/cfe/setup.cmodified+1−1View file
arch/mips/sibyte/sb1250/prom.cmodified+1−1View file
arch/parisc/Kconfigmodified+1−0View file
arch/parisc/kernel/cache.cmodified+3−3View file
arch/parisc/kernel/smp.cmodified+22−114View file
arch/parisc/mm/init.cmodified+1−1View file
arch/powerpc/Kconfigmodified+1−0View file
arch/powerpc/kernel/machine_kexec_64.cmodified+1−1View file
arch/powerpc/kernel/rtas.cmodified+1−1View file
arch/powerpc/kernel/smp.cmodified+20−214View file
arch/powerpc/kernel/tau_6xx.cmodified+2−2View file
arch/powerpc/kernel/time.cmodified+1−1View file
arch/powerpc/mm/slice.cmodified+1−1View file
arch/powerpc/mm/tlb_64.cmodified+1−1View file
arch/powerpc/oprofile/common.cmodified+3−3View file
arch/powerpc/platforms/cell/interrupt.cmodified+1−0View file
arch/powerpc/platforms/ps3/smp.cmodified+4−3View file
arch/powerpc/platforms/pseries/xics.cmodified+2−4View file
arch/powerpc/sysdev/mpic.cmodified+1−1View file
arch/ppc/kernel/smp.cmodified+1−1View file
arch/s390/appldata/appldata_base.cmodified+2−2View file
arch/s390/kernel/smp.cmodified+9−13View file
arch/s390/kernel/time.cmodified+5−5View file
arch/sh/Kconfigmodified+1−0View file
arch/sh/kernel/smp.cmodified+15−47View file
arch/sparc64/kernel/smp.cmodified+5−8View file
arch/sparc64/mm/hugetlbpage.cmodified+1−1View file
arch/um/kernel/smp.cmodified+1−2View file
arch/x86/Kconfigmodified+1−0View file
arch/x86/kernel/apic_32.cmodified+4−0View file
arch/x86/kernel/cpu/mcheck/mce_64.cmodified+3−3View file
arch/x86/kernel/cpu/mcheck/non-fatal.cmodified+1−1View file
arch/x86/kernel/cpu/mtrr/main.cmodified+2−2View file
arch/x86/kernel/cpu/perfctr-watchdog.cmodified+2−2View file
arch/x86/kernel/cpuid.cmodified+1−1View file
arch/x86/kernel/entry_64.Smodified+3−0View file
arch/x86/kernel/io_apic_32.cmodified+1−1View file
arch/x86/kernel/io_apic_64.cmodified+1−1View file
arch/x86/kernel/irqinit_64.cmodified+4−0View file
arch/x86/kernel/ldt.cmodified+1−1View file
arch/x86/kernel/nmi.cmodified+3−3View file
arch/x86/kernel/process.cmodified+1−1View file
arch/x86/kernel/smp.cmodified+20−138View file
arch/x86/kernel/smpboot.cmodified+2−2View file
arch/x86/kernel/smpcommon.cmodified+0−56View file
arch/x86/kernel/tlb_32.cmodified+1−1View file
arch/x86/kernel/tlb_64.cmodified+1−1View file
arch/x86/kernel/vsyscall_64.cmodified+2−2View file
arch/x86/kvm/vmx.cmodified+2−2View file
arch/x86/kvm/x86.cmodified+1−1View file
arch/x86/lib/msr-on-cpu.cmodified+4−4View file
arch/x86/mach-voyager/voyager_smp.cmodified+19−79View file
arch/x86/mm/pageattr.cmodified+2−2View file
arch/x86/oprofile/nmi_int.cmodified+5−5View file
arch/x86/pci/amd_bus.cmodified+1−1View file
arch/x86/xen/enlighten.cmodified+3−1View file
arch/x86/xen/mmu.cmodified+1−1View file
arch/x86/xen/smp.cmodified+47−88View file
arch/x86/xen/xen-ops.hmodified+2−7View file
drivers/acpi/processor_idle.cmodified+1−1View file
drivers/char/agp/generic.cmodified+1−1View file
drivers/char/sysrq.cmodified+1−1View file
drivers/cpuidle/cpuidle.cmodified+1−1View file
drivers/lguest/x86/core.cmodified+2−2View file
drivers/watchdog/booke_wdt.cmodified+3−3View file
fs/buffer.cmodified+1−1View file
include/asm-alpha/smp.hmodified+3−2View file
include/asm-arm/smp.hmodified+3−0View file
include/asm-ia64/smp.hmodified+3−5View file
include/asm-m32r/smp.hmodified+4−0View file
include/asm-mips/smp.hmodified+3−10View file
include/asm-parisc/smp.hmodified+3−0View file
include/asm-powerpc/smp.hmodified+4−4View file
include/asm-sh/smp.hmodified+4−10View file
include/asm-sparc/smp.hmodified+1−1View file
include/asm-x86/hw_irq.hmodified+1−0View file
include/asm-x86/irq_vectors.hmodified+5−1View file
include/asm-x86/mach-default/entry_arch.hmodified+1−0View file
include/asm-x86/mach-visws/entry_arch.hmodified+2−20View file
include/asm-x86/mach-voyager/entry_arch.hmodified+1−1View file
include/asm-x86/smp.hmodified+12−9View file
include/asm-x86/xen/events.hmodified+1−0View file
include/linux/smp.hmodified+38−8View file
init/main.cmodified+2−0View file
kernel/Makefilemodified+1−0View file
kernel/hrtimer.cmodified+1−1View file
kernel/profile.cmodified+3−3View file
kernel/rcupdate.cmodified+1−1View file
kernel/smp.cadded+382−0View file
kernel/softirq.cmodified+2−2View file
kernel/time/tick-broadcast.cmodified+1−1View file
mm/page_alloc.cmodified+1−1View file
mm/slab.cmodified+2−2View file
mm/slub.cmodified+1−1View file
net/core/flow.cmodified+1−1View file
net/iucv/iucv.cmodified+8−8View file
virt/kvm/kvm_main.cmodified+7−7View file

Only the first 600 diff lines are shown. Download the complete patch.

arch/Kconfig

View file
diff --git a/arch/Kconfig b/arch/Kconfig
index 3ea332b..ad89a33 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -39,3 +39,6 @@ config HAVE_KRETPROBES
config HAVE_DMA_ATTRS
def_bool n
+
+config USE_GENERIC_SMP_HELPERS
+ def_bool n

arch/alpha/Kconfig

View file
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 729cdbd..dbe8c28 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -528,6 +528,7 @@ config ARCH_MAY_HAVE_PC_FDC
config SMP
bool "Symmetric multi-processing support"
depends on ALPHA_SABLE || ALPHA_LYNX || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK || ALPHA_MARVEL
+ select USE_GENERIC_SMP_HELPERS
---help---
This enables support for systems with more than one CPU. If you have
a system with only one CPU, like most personal computers, say N. If

arch/alpha/kernel/core_marvel.c

View file
diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c
index b04f1fe..04dcc5e 100644
--- a/arch/alpha/kernel/core_marvel.c
+++ b/arch/alpha/kernel/core_marvel.c
@@ -660,9 +660,9 @@ __marvel_rtc_io(u8 b, unsigned long addr, int write)
#ifdef CONFIG_SMP
if (smp_processor_id() != boot_cpuid)
- smp_call_function_on_cpu(__marvel_access_rtc,
- &rtc_access, 1, 1,
- cpumask_of_cpu(boot_cpuid));
+ smp_call_function_single(boot_cpuid,
+ __marvel_access_rtc,
+ &rtc_access, 1);
else
__marvel_access_rtc(&rtc_access);
#else

arch/alpha/kernel/process.c

View file
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 96ed82f..351407e 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -160,7 +160,7 @@ common_shutdown(int mode, char *restart_cmd)
struct halt_info args;
args.mode = mode;
args.restart_cmd = restart_cmd;
- on_each_cpu(common_shutdown_1, &args, 1, 0);
+ on_each_cpu(common_shutdown_1, &args, 0);
}
void

arch/alpha/kernel/smp.c

View file
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 2525692..83df541 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -62,6 +62,7 @@ static struct {
enum ipi_message_type {
IPI_RESCHEDULE,
IPI_CALL_FUNC,
+ IPI_CALL_FUNC_SINGLE,
IPI_CPU_STOP,
};
@@ -558,51 +559,6 @@ send_ipi_message(cpumask_t to_whom, enum ipi_message_type operation)
wripir(i);
}
-/* Structure and data for smp_call_function. This is designed to
- minimize static memory requirements. Plus it looks cleaner. */
-
-struct smp_call_struct {
- void (*func) (void *info);
- void *info;
- long wait;
- atomic_t unstarted_count;
- atomic_t unfinished_count;
-};
-
-static struct smp_call_struct *smp_call_function_data;
-
-/* Atomicly drop data into a shared pointer. The pointer is free if
- it is initially locked. If retry, spin until free. */
-
-static int
-pointer_lock (void *lock, void *data, int retry)
-{
- void *old, *tmp;
-
- mb();
- again:
- /* Compare and swap with zero. */
- asm volatile (
- "1: ldq_l %0,%1\n"
- " mov %3,%2\n"
- " bne %0,2f\n"
- " stq_c %2,%1\n"
- " beq %2,1b\n"
- "2:"
- : "=&r"(old), "=m"(*(void **)lock), "=&r"(tmp)
- : "r"(data)
- : "memory");
-
- if (old == 0)
- return 0;
- if (! retry)
- return -EBUSY;
-
- while (*(void **)lock)
- barrier();
- goto again;
-}
-
void
handle_ipi(struct pt_regs *regs)
{
@@ -632,31 +588,12 @@ handle_ipi(struct pt_regs *regs)
break;
case IPI_CALL_FUNC:
- {
- struct smp_call_struct *data;
- void (*func)(void *info);
- void *info;
- int wait;
-
- data = smp_call_function_data;
- func = data->func;
- info = data->info;
- wait = data->wait;
-
- /* Notify the sending CPU that the data has been
- received, and execution is about to begin. */
- mb();
- atomic_dec (&data->unstarted_count);
-
- /* At this point the structure may be gone unless
- wait is true. */
- (*func)(info);
-
- /* Notify the sending CPU that the task is done. */
- mb();
- if (wait) atomic_dec (&data->unfinished_count);
+ generic_smp_call_function_interrupt();
+ break;
+
+ case IPI_CALL_FUNC_SINGLE:
+ generic_smp_call_function_single_interrupt();
break;
- }
case IPI_CPU_STOP:
halt();
@@ -700,102 +637,15 @@ smp_send_stop(void)
send_ipi_message(to_whom, IPI_CPU_STOP);
}
-/*
- * Run a function on all other CPUs.
- * <func> The function to run. This must be fast and non-blocking.
- * <info> An arbitrary pointer to pass to the function.
- * <retry> If true, keep retrying until ready.
- * <wait> If true, wait until function has completed on other CPUs.
- * [RETURNS] 0 on success, else a negative status code.
- *
- * Does not return until remote CPUs are nearly ready to execute <func>
- * or are or have executed.
- * You must not call this function with disabled interrupts or from a
- * hardware interrupt handler or from a bottom half handler.
- */
-
-int
-smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry,
- int wait, cpumask_t to_whom)
+void arch_send_call_function_ipi(cpumask_t mask)
{
- struct smp_call_struct data;
- unsigned long timeout;
- int num_cpus_to_call;
-
- /* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
-
- data.func = func;
- data.info = info;
- data.wait = wait;
-
- cpu_clear(smp_processor_id(), to_whom);
- num_cpus_to_call = cpus_weight(to_whom);
-
- atomic_set(&data.unstarted_count, num_cpus_to_call);
- atomic_set(&data.unfinished_count, num_cpus_to_call);
-
- /* Acquire the smp_call_function_data mutex. */
- if (pointer_lock(&smp_call_function_data, &data, retry))
- return -EBUSY;
-
- /* Send a message to the requested CPUs. */
- send_ipi_message(to_whom, IPI_CALL_FUNC);
-
- /* Wait for a minimal response. */
- timeout = jiffies + HZ;
- while (atomic_read (&data.unstarted_count) > 0
- && time_before (jiffies, timeout))
- barrier();
-
- /* If there's no response yet, log a message but allow a longer
- * timeout period -- if we get a response this time, log
- * a message saying when we got it..
- */
- if (atomic_read(&data.unstarted_count) > 0) {
- long start_time = jiffies;
- printk(KERN_ERR "%s: initial timeout -- trying long wait\n",
- __func__);
- timeout = jiffies + 30 * HZ;
- while (atomic_read(&data.unstarted_count) > 0
- && time_before(jiffies, timeout))
- barrier();
- if (atomic_read(&data.unstarted_count) <= 0) {
- long delta = jiffies - start_time;
- printk(KERN_ERR
- "%s: response %ld.%ld seconds into long wait\n",
- __func__, delta / HZ,
- (100 * (delta - ((delta / HZ) * HZ))) / HZ);
- }
- }
-
- /* We either got one or timed out -- clear the lock. */
- mb();
- smp_call_function_data = NULL;
-
- /*
- * If after both the initial and long timeout periods we still don't
- * have a response, something is very wrong...
- */
- BUG_ON(atomic_read (&data.unstarted_count) > 0);
-
- /* Wait for a complete response, if needed. */
- if (wait) {
- while (atomic_read (&data.unfinished_count) > 0)
- barrier();
- }
-
- return 0;
+ send_ipi_message(mask, IPI_CALL_FUNC);
}
-EXPORT_SYMBOL(smp_call_function_on_cpu);
-int
-smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
+void arch_send_call_function_single_ipi(int cpu)
{
- return smp_call_function_on_cpu (func, info, retry, wait,
- cpu_online_map);
+ send_ipi_message(cpumask_of_cpu(cpu), IPI_CALL_FUNC_SINGLE);
}
-EXPORT_SYMBOL(smp_call_function);
static void
ipi_imb(void *ignored)
@@ -807,7 +657,7 @@ void
smp_imb(void)
{
/* Must wait other processors to flush their icache before continue. */
- if (on_each_cpu(ipi_imb, NULL, 1, 1))
+ if (on_each_cpu(ipi_imb, NULL, 1))
printk(KERN_CRIT "smp_imb: timed out\n");
}
EXPORT_SYMBOL(smp_imb);
@@ -823,7 +673,7 @@ flush_tlb_all(void)
{
/* Although we don't have any data to pass, we do want to
synchronize with the other processors. */
- if (on_each_cpu(ipi_flush_tlb_all, NULL, 1, 1)) {
+ if (on_each_cpu(ipi_flush_tlb_all, NULL, 1)) {
printk(KERN_CRIT "flush_tlb_all: timed out\n");
}
}
@@ -860,7 +710,7 @@ flush_tlb_mm(struct mm_struct *mm)
}
}
- if (smp_call_function(ipi_flush_tlb_mm, mm, 1, 1)) {
+ if (smp_call_function(ipi_flush_tlb_mm, mm, 1)) {
printk(KERN_CRIT "flush_tlb_mm: timed out\n");
}
@@ -913,7 +763,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
data.mm = mm;
data.addr = addr;
- if (smp_call_function(ipi_flush_tlb_page, &data, 1, 1)) {
+ if (smp_call_function(ipi_flush_tlb_page, &data, 1)) {
printk(KERN_CRIT "flush_tlb_page: timed out\n");
}
@@ -965,7 +815,7 @@ flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
}
}
- if (smp_call_function(ipi_flush_icache_page, mm, 1, 1)) {
+ if (smp_call_function(ipi_flush_icache_page, mm, 1)) {
printk(KERN_CRIT "flush_icache_page: timed out\n");
}

arch/alpha/oprofile/common.c

View file
diff --git a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c
index 9fc0eeb..7c3d5ec 100644
--- a/arch/alpha/oprofile/common.c
+++ b/arch/alpha/oprofile/common.c
@@ -65,7 +65,7 @@ op_axp_setup(void)
model->reg_setup(&reg, ctr, &sys);
/* Configure the registers on all cpus. */
- (void)smp_call_function(model->cpu_setup, &reg, 0, 1);
+ (void)smp_call_function(model->cpu_setup, &reg, 1);
model->cpu_setup(&reg);
return 0;
}
@@ -86,7 +86,7 @@ op_axp_cpu_start(void *dummy)
static int
op_axp_start(void)
{
- (void)smp_call_function(op_axp_cpu_start, NULL, 0, 1);
+ (void)smp_call_function(op_axp_cpu_start, NULL, 1);
op_axp_cpu_start(NULL);
return 0;
}
@@ -101,7 +101,7 @@ op_axp_cpu_stop(void *dummy)
static void
op_axp_stop(void)
{
- (void)smp_call_function(op_axp_cpu_stop, NULL, 0, 1);
+ (void)smp_call_function(op_axp_cpu_stop, NULL, 1);
op_axp_cpu_stop(NULL);
}

arch/arm/Kconfig

View file
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 258f136..c7ad324 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -701,6 +701,7 @@ source "kernel/time/Kconfig"
config SMP
bool "Symmetric Multi-Processing (EXPERIMENTAL)"
depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP)
+ select USE_GENERIC_SMP_HELPERS
help
This enables support for systems with more than one CPU. If you have
a system with only one CPU, like most personal computers, say N. If

arch/arm/kernel/smp.c

View file
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index eefae1d..5a7c095 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -68,20 +68,10 @@ enum ipi_msg_type {
IPI_TIMER,
IPI_RESCHEDULE,
IPI_CALL_FUNC,
+ IPI_CALL_FUNC_SINGLE,
IPI_CPU_STOP,
};
-struct smp_call_struct {
- void (*func)(void *info);
- void *info;
- int wait;
- cpumask_t pending;
- cpumask_t unfinished;
-};
-
-static struct smp_call_struct * volatile smp_call_function_data;
-static DEFINE_SPINLOCK(smp_call_function_lock);
-
int __cpuinit __cpu_up(unsigned int cpu)
{
struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu);
@@ -366,114 +356,15 @@ static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
local_irq_restore(flags);
}
-/*
- * You must not call this function with disabled interrupts, from a
- * hardware interrupt handler, nor from a bottom half handler.
- */
-static int smp_call_function_on_cpu(void (*func)(void *info), void *info,
- int retry, int wait, cpumask_t callmap)
-{
- struct smp_call_struct data;
- unsigned long timeout;
- int ret = 0;
-
- data.func = func;
- data.info = info;
- data.wait = wait;
-
- cpu_clear(smp_processor_id(), callmap);
- if (cpus_empty(callmap))
- goto out;
-
- data.pending = callmap;
- if (wait)
- data.unfinished = callmap;
-
- /*
- * try to get the mutex on smp_call_function_data
- */
- spin_lock(&smp_call_function_lock);
- smp_call_function_data = &data;
-
- send_ipi_message(callmap, IPI_CALL_FUNC);
-
- timeout = jiffies + HZ;
- while (!cpus_empty(data.pending) && time_before(jiffies, timeout))
- barrier();
-
- /*
- * did we time out?
- */
- if (!cpus_empty(data.pending)) {
- /*
- * this may be causing our panic - report it
- */
- printk(KERN_CRIT
- "CPU%u: smp_call_function timeout for %p(%p)\n"
- " callmap %lx pending %lx, %swait\n",
- smp_processor_id(), func, info, *cpus_addr(callmap),
- *cpus_addr(data.pending), wait ? "" : "no ");
-
- /*
- * TRACE
- */
- timeout = jiffies + (5 * HZ);
- while (!cpus_empty(data.pending) && time_before(jiffies, timeout))
- barrier();
-
- if (cpus_empty(data.pending))
- printk(KERN_CRIT " RESOLVED\n");
- else
- printk(KERN_CRIT " STILL STUCK\n");
- }
-
- /*
- * whatever happened, we're done with the data, so release it
- */
- smp_call_function_data = NULL;
- spin_unlock(&smp_call_function_lock);
-
- if (!cpus_empty(data.pending)) {
- ret = -ETIMEDOUT;
- goto out;
- }
-
- if (wait)
- while (!cpus_empty(data.unfinished))
- barrier();
- out:
-
- return 0;
-}
-
-int smp_call_function(void (*func)(void *info), void *info, int retry,
- int wait)
+void arch_send_call_function_ipi(cpumask_t mask)
{
- return smp_call_function_on_cpu(func, info, retry, wait,
- cpu_online_map);
+ send_ipi_message(mask, IPI_CALL_FUNC);
}
-EXPORT_SYMBOL_GPL(smp_call_function);
-int smp_call_function_single(int cpu, void (*func)(void *info), void *info,
- int retry, int wait)
+void arch_send_call_function_single_ipi(int cpu)
{
- /* prevent preemption and reschedule on another processor */
- int current_cpu = get_cpu();
- int ret = 0;
-
- if (cpu == current_cpu) {
- local_irq_disable();
- func(info);
- local_irq_enable();
- } else
- ret = smp_call_function_on_cpu(func, info, retry, wait,
- cpumask_of_cpu(cpu));
-
- put_cpu();
-
- return ret;
+ send_ipi_message(cpumask_of_cpu(cpu), IPI_CALL_FUNC_SINGLE);
}
-EXPORT_SYMBOL_GPL(smp_call_function_single);
void show_ipi_list(struct seq_file *p)
{
@@ -521,27 +412,6 @@ asmlinkage void __exception do_local_timer(struct pt_regs *regs)
}
#endif
-/*
- * ipi_call_function - handle IPI from smp_call_function()
- *
- * Note that we copy data out of the cross-call structure and then
- * let the caller know that we're here and have done with their data
- */
-static void ipi_call_function(unsigned int cpu)
-{
- struct smp_call_struct *data = smp_call_function_data;
- void (*func)(void *info) = data->func;
- void *info = data->info;
- int wait = data->wait;
-
- cpu_clear(cpu, data->pending);
-
- func(info);
-
- if (wait)
- cpu_clear(cpu, data->unfinished);
-}
-
static DEFINE_SPINLOCK(stop_lock);
/*
@@ -611,7 +481,11 @@ asmlinkage void __exception do_IPI(struct pt_regs *regs)
break;
case IPI_CALL_FUNC:
- ipi_call_function(cpu);
+ generic_smp_call_function_interrupt();
+ break;
+
+ case IPI_CALL_FUNC_SINGLE:
+ generic_smp_call_function_single_interrupt();
break;
case IPI_CPU_STOP:
@@ -662,14 +536,13 @@ int setup_profiling_timer(unsigned int multiplier)
}
static int
-on_each_cpu_mask(void (*func)(void *), void *info, int retry, int wait,
- cpumask_t mask)
+on_each_cpu_mask(void (*func)(void *), void *info, int wait, cpumask_t mask)
{
int ret = 0;
preempt_disable();
- ret = smp_call_function_on_cpu(func, info, retry, wait, mask);
+ ret = smp_call_function_mask(mask, func, info, wait);
if (cpu_isset(smp_processor_id(), mask))
func(info);
@@ -731,14 +604,14 @@ static inline void ipi_flush_tlb_kernel_range(void *arg)
void flush_tlb_all(void)
{
- on_each_cpu(ipi_flush_tlb_all, NULL, 1, 1);
+ on_each_cpu(ipi_flush_tlb_all, NULL, 1);
}
void flush_tlb_mm(struct mm_struct *mm)
{
cpumask_t mask = mm->cpu_vm_mask;
- on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, 1, mask);
+ on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, mask);
}
void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
@@ -749,7 +622,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
ta.ta_vma = vma;
ta.ta_start = uaddr;
- on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, 1, mask);
+ on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, mask);
}
void flush_tlb_kernel_page(unsigned long kaddr)
@@ -758,7 +631,7 @@ void flush_tlb_kernel_page(unsigned long kaddr)
ta.ta_start = kaddr;
- on_each_cpu(ipi_flush_tlb_kernel_page, &ta, 1, 1);
+ on_each_cpu(ipi_flush_tlb_kernel_page, &ta, 1);
}
void flush_tlb_range(struct vm_area_struct *vma,
@@ -771,7 +644,7 @@ void flush_tlb_range(struct vm_area_struct *vma,
ta.ta_start = start;
ta.ta_end = end;
- on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, 1, mask);
+ on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, mask);
}
void flush_tlb_kernel_range(unsigned long start, unsigned long end)
@@ -781,5 +654,5 @@ void flush_tlb_kernel_range(unsigned long start, unsigned long end)
ta.ta_start = start;
ta.ta_end = end;

This diff is incomplete. Download the complete patch.

arch/arm/oprofile/op_model_mpcore.c

View file

This diff is incomplete. Download the complete patch.

arch/arm/vfp/vfpmodule.c

View file

This diff is incomplete. Download the complete patch.

arch/cris/arch-v32/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/ia64/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/ia64/kernel/mca.c

View file

This diff is incomplete. Download the complete patch.

arch/ia64/kernel/palinfo.c

View file

This diff is incomplete. Download the complete patch.

arch/ia64/kernel/perfmon.c

View file

This diff is incomplete. Download the complete patch.

arch/ia64/kernel/process.c

View file

This diff is incomplete. Download the complete patch.

arch/ia64/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/ia64/kernel/smpboot.c

View file

This diff is incomplete. Download the complete patch.

arch/ia64/kernel/uncached.c

View file

This diff is incomplete. Download the complete patch.

arch/ia64/sn/kernel/sn2/sn_hwperf.c

View file

This diff is incomplete. Download the complete patch.

arch/m32r/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/m32r/kernel/m32r_ksyms.c

View file

This diff is incomplete. Download the complete patch.

arch/m32r/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/m32r/kernel/traps.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/irq-rm9000.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/smtc.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/mm/c-r4k.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/oprofile/common.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/oprofile/op_model_mipsxx.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/pmc-sierra/yosemite/prom.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/sibyte/cfe/setup.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/sibyte/sb1250/prom.c

View file

This diff is incomplete. Download the complete patch.

arch/parisc/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/parisc/kernel/cache.c

View file

This diff is incomplete. Download the complete patch.

arch/parisc/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/parisc/mm/init.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/kernel/machine_kexec_64.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/kernel/rtas.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/kernel/tau_6xx.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/kernel/time.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/mm/slice.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/mm/tlb_64.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/oprofile/common.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/platforms/cell/interrupt.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/platforms/ps3/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/platforms/pseries/xics.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/sysdev/mpic.c

View file

This diff is incomplete. Download the complete patch.

arch/ppc/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/appldata/appldata_base.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/time.c

View file

This diff is incomplete. Download the complete patch.

arch/sh/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/sh/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/sparc64/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/sparc64/mm/hugetlbpage.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/apic_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/cpu/mcheck/mce_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/cpu/mcheck/non-fatal.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/cpu/mtrr/main.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/cpu/perfctr-watchdog.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/cpuid.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/entry_64.S

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/io_apic_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/io_apic_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/irqinit_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/ldt.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/nmi.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/process.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/smpboot.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/smpcommon.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/tlb_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/tlb_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/vsyscall_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kvm/vmx.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kvm/x86.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/lib/msr-on-cpu.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mach-voyager/voyager_smp.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mm/pageattr.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/oprofile/nmi_int.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/pci/amd_bus.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/enlighten.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/mmu.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/xen-ops.h

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/processor_idle.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/agp/generic.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/sysrq.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpuidle/cpuidle.c

View file

This diff is incomplete. Download the complete patch.

drivers/lguest/x86/core.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/booke_wdt.c

View file

This diff is incomplete. Download the complete patch.

fs/buffer.c

View file

This diff is incomplete. Download the complete patch.

include/asm-alpha/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-arm/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-ia64/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-m32r/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-mips/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-parisc/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-sh/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-sparc/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/hw_irq.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/irq_vectors.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/mach-default/entry_arch.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/mach-visws/entry_arch.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/mach-voyager/entry_arch.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/smp.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/xen/events.h

View file

This diff is incomplete. Download the complete patch.

include/linux/smp.h

View file

This diff is incomplete. Download the complete patch.

init/main.c

View file

This diff is incomplete. Download the complete patch.

kernel/Makefile

View file

This diff is incomplete. Download the complete patch.

kernel/hrtimer.c

View file

This diff is incomplete. Download the complete patch.

kernel/profile.c

View file

This diff is incomplete. Download the complete patch.

kernel/rcupdate.c

View file

This diff is incomplete. Download the complete patch.

kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

kernel/softirq.c

View file

This diff is incomplete. Download the complete patch.

kernel/time/tick-broadcast.c

View file

This diff is incomplete. Download the complete patch.

mm/page_alloc.c

View file

This diff is incomplete. Download the complete patch.

mm/slab.c

View file

This diff is incomplete. Download the complete patch.

mm/slub.c

View file

This diff is incomplete. Download the complete patch.

net/core/flow.c

View file

This diff is incomplete. Download the complete patch.

net/iucv/iucv.c

View file

This diff is incomplete. Download the complete patch.

virt/kvm/kvm_main.c

View file

This diff is incomplete. Download the complete patch.