Skip to content

Commit

Permalink
smp_call_function: get rid of the unused nonatomic/retry argument
Browse files Browse the repository at this point in the history
It's never used and the comments refer to nonatomic and retry
interchangably. So get rid of it.

Acked-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Jens Axboe committed Jun 26, 2008
1 parent 490f5de commit 8691e5a
Show file tree
Hide file tree
Showing 49 changed files with 95 additions and 108 deletions.
2 changes: 1 addition & 1 deletion arch/alpha/kernel/core_marvel.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ __marvel_rtc_io(u8 b, unsigned long addr, int write)
if (smp_processor_id() != boot_cpuid)
smp_call_function_single(boot_cpuid,
__marvel_access_rtc,
&rtc_access, 1, 1);
&rtc_access, 1);
else
__marvel_access_rtc(&rtc_access);
#else
Expand Down
6 changes: 3 additions & 3 deletions arch/alpha/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,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");
}

Expand Down Expand Up @@ -763,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");
}

Expand Down Expand Up @@ -815,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");
}

Expand Down
6 changes: 3 additions & 3 deletions arch/alpha/oprofile/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/oprofile/op_model_mpcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static int em_call_function(int (*fn)(void))
data.ret = 0;

preempt_disable();
smp_call_function(em_func, &data, 1, 1);
smp_call_function(em_func, &data, 1);
em_func(&data);
preempt_enable();

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/vfp/vfpmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ static int __init vfp_init(void)
else if (vfpsid & FPSID_NODOUBLE) {
printk("no double precision support\n");
} else {
smp_call_function(vfp_enable, NULL, 1, 1);
smp_call_function(vfp_enable, NULL, 1);

VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */
printk("implementor %02x architecture %d part %02x variant %x rev %x\n",
Expand Down
5 changes: 2 additions & 3 deletions arch/cris/arch-v32/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void stop_this_cpu(void* dummy)
/* Other calls */
void smp_send_stop(void)
{
smp_call_function(stop_this_cpu, NULL, 1, 0);
smp_call_function(stop_this_cpu, NULL, 0);
}

int setup_profiling_timer(unsigned int multiplier)
Expand Down Expand Up @@ -316,8 +316,7 @@ int send_ipi(int vector, int wait, cpumask_t cpu_mask)
* 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(void (*func)(void *info), void *info,
int nonatomic, int wait)
int smp_call_function(void (*func)(void *info), void *info, int wait)
{
cpumask_t cpu_mask = CPU_MASK_ALL;
struct call_data_struct data;
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/mca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,7 @@ static int __cpuinit mca_cpu_callback(struct notifier_block *nfb,
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
smp_call_function_single(hotcpu, ia64_mca_cmc_vector_adjust,
NULL, 1, 0);
NULL, 0);
break;
}
return NOTIFY_OK;
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/palinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ int palinfo_handle_smp(pal_func_cpu_u_t *f, char *page)


/* will send IPI to other CPU and wait for completion of remote call */
if ((ret=smp_call_function_single(f->req_cpu, palinfo_smp_call, &ptr, 0, 1))) {
if ((ret=smp_call_function_single(f->req_cpu, palinfo_smp_call, &ptr, 1))) {
printk(KERN_ERR "palinfo: remote CPU call from %d to %d on function %d: "
"error %d\n", smp_processor_id(), f->req_cpu, f->func_id, ret);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ pfm_syswide_cleanup_other_cpu(pfm_context_t *ctx)
int ret;

DPRINT(("calling CPU%d for cleanup\n", ctx->ctx_cpu));
ret = smp_call_function_single(ctx->ctx_cpu, pfm_syswide_force_stop, ctx, 0, 1);
ret = smp_call_function_single(ctx->ctx_cpu, pfm_syswide_force_stop, ctx, 1);
DPRINT(("called CPU%d for cleanup ret=%d\n", ctx->ctx_cpu, ret));
}
#endif /* CONFIG_SMP */
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ void cpu_idle_wait(void)
{
smp_mb();
/* kick all the CPUs so that they exit out of pm_idle */
smp_call_function(do_nothing, NULL, 0, 1);
smp_call_function(do_nothing, NULL, 1);
}
EXPORT_SYMBOL_GPL(cpu_idle_wait);

Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ ia64_sync_itc (unsigned int master)

go[MASTER] = 1;

if (smp_call_function_single(master, sync_master, NULL, 1, 0) < 0) {
if (smp_call_function_single(master, sync_master, NULL, 0) < 0) {
printk(KERN_ERR "sync_itc: failed to get attention of CPU %u!\n", master);
return;
}
Expand Down
5 changes: 2 additions & 3 deletions arch/ia64/kernel/uncached.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);
if (status == PAL_VISIBILITY_OK_REMOTE_NEEDED) {
atomic_set(&uc_pool->status, 0);
status = smp_call_function(uncached_ipi_visibility, uc_pool,
0, 1);
status = smp_call_function(uncached_ipi_visibility, uc_pool, 1);
if (status || atomic_read(&uc_pool->status))
goto failed;
} else if (status != PAL_VISIBILITY_OK)
Expand All @@ -146,7 +145,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
if (status != PAL_STATUS_SUCCESS)
goto failed;
atomic_set(&uc_pool->status, 0);
status = smp_call_function(uncached_ipi_mc_drain, uc_pool, 0, 1);
status = smp_call_function(uncached_ipi_mc_drain, uc_pool, 1);
if (status || atomic_read(&uc_pool->status))
goto failed;

Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/sn/kernel/sn2/sn_hwperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info)
if (use_ipi) {
/* use an interprocessor interrupt to call SAL */
smp_call_function_single(cpu, sn_hwperf_call_sal,
op_info, 1, 1);
op_info, 1);
}
else {
/* migrate the task before calling SAL */
Expand Down
4 changes: 2 additions & 2 deletions arch/m32r/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void smp_flush_tlb_all(void)
local_irq_save(flags);
__flush_tlb_all();
local_irq_restore(flags);
smp_call_function(flush_tlb_all_ipi, NULL, 1, 1);
smp_call_function(flush_tlb_all_ipi, NULL, 1);
preempt_enable();
}

Expand Down Expand Up @@ -505,7 +505,7 @@ void smp_invalidate_interrupt(void)
*==========================================================================*/
void smp_send_stop(void)
{
smp_call_function(stop_this_cpu, NULL, 1, 0);
smp_call_function(stop_this_cpu, NULL, 0);
}

/*==========================================================================*
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static void stop_this_cpu(void *dummy)

void smp_send_stop(void)
{
smp_call_function(stop_this_cpu, NULL, 1, 0);
smp_call_function(stop_this_cpu, NULL, 0);
}

void __init smp_cpus_done(unsigned int max_cpus)
Expand Down Expand Up @@ -266,7 +266,7 @@ static void flush_tlb_mm_ipi(void *mm)
static inline void smp_on_other_tlbs(void (*func) (void *info), void *info)
{
#ifndef CONFIG_MIPS_MT_SMTC
smp_call_function(func, info, 1, 1);
smp_call_function(func, info, 1);
#endif
}

Expand Down
18 changes: 9 additions & 9 deletions arch/mips/mm/c-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
* primary cache.
*/
static inline void r4k_on_each_cpu(void (*func) (void *info), void *info,
int retry, int wait)
int wait)
{
preempt_disable();

#if !defined(CONFIG_MIPS_MT_SMP) && !defined(CONFIG_MIPS_MT_SMTC)
smp_call_function(func, info, retry, wait);
smp_call_function(func, info, wait);
#endif
func(info);
preempt_enable();
Expand Down Expand Up @@ -350,7 +350,7 @@ static inline void local_r4k___flush_cache_all(void * args)

static void r4k___flush_cache_all(void)
{
r4k_on_each_cpu(local_r4k___flush_cache_all, NULL, 1, 1);
r4k_on_each_cpu(local_r4k___flush_cache_all, NULL, 1);
}

static inline int has_valid_asid(const struct mm_struct *mm)
Expand Down Expand Up @@ -397,7 +397,7 @@ static void r4k_flush_cache_range(struct vm_area_struct *vma,
int exec = vma->vm_flags & VM_EXEC;

if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc))
r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1);
r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1);
}

static inline void local_r4k_flush_cache_mm(void * args)
Expand Down Expand Up @@ -429,7 +429,7 @@ static void r4k_flush_cache_mm(struct mm_struct *mm)
if (!cpu_has_dc_aliases)
return;

r4k_on_each_cpu(local_r4k_flush_cache_mm, mm, 1, 1);
r4k_on_each_cpu(local_r4k_flush_cache_mm, mm, 1);
}

struct flush_cache_page_args {
Expand Down Expand Up @@ -521,7 +521,7 @@ static void r4k_flush_cache_page(struct vm_area_struct *vma,
args.addr = addr;
args.pfn = pfn;

r4k_on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1);
r4k_on_each_cpu(local_r4k_flush_cache_page, &args, 1);
}

static inline void local_r4k_flush_data_cache_page(void * addr)
Expand All @@ -535,7 +535,7 @@ static void r4k_flush_data_cache_page(unsigned long addr)
local_r4k_flush_data_cache_page((void *)addr);
else
r4k_on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr,
1, 1);
1);
}

struct flush_icache_range_args {
Expand Down Expand Up @@ -571,7 +571,7 @@ static void r4k_flush_icache_range(unsigned long start, unsigned long end)
args.start = start;
args.end = end;

r4k_on_each_cpu(local_r4k_flush_icache_range, &args, 1, 1);
r4k_on_each_cpu(local_r4k_flush_icache_range, &args, 1);
instruction_hazard();
}

Expand Down Expand Up @@ -672,7 +672,7 @@ static void local_r4k_flush_cache_sigtramp(void * arg)

static void r4k_flush_cache_sigtramp(unsigned long addr)
{
r4k_on_each_cpu(local_r4k_flush_cache_sigtramp, (void *) addr, 1, 1);
r4k_on_each_cpu(local_r4k_flush_cache_sigtramp, (void *) addr, 1);
}

static void r4k_flush_icache_all(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/pmc-sierra/yosemite/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void prom_exit(void)
#ifdef CONFIG_SMP
if (smp_processor_id())
/* CPU 1 */
smp_call_function(prom_cpu0_exit, NULL, 1, 1);
smp_call_function(prom_cpu0_exit, NULL, 1);
#endif
prom_cpu0_exit(NULL);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/sibyte/cfe/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static void __noreturn cfe_linux_exit(void *arg)
if (!reboot_smp) {
/* Get CPU 0 to do the cfe_exit */
reboot_smp = 1;
smp_call_function(cfe_linux_exit, arg, 1, 0);
smp_call_function(cfe_linux_exit, arg, 0);
}
} else {
printk("Passing control back to CFE...\n");
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/sibyte/sb1250/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static void prom_linux_exit(void)
{
#ifdef CONFIG_SMP
if (smp_processor_id()) {
smp_call_function(prom_cpu0_exit, NULL, 1, 1);
smp_call_function(prom_cpu0_exit, NULL, 1);
}
#endif
while(1);
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static void stop_this_cpu(void *dummy)

void smp_send_stop(void)
{
smp_call_function(stop_this_cpu, NULL, 0, 0);
smp_call_function(stop_this_cpu, NULL, 0);
}

extern struct gettimeofday_struct do_gtod;
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/appldata/appldata_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ __appldata_vtimer_setup(int cmd)
per_cpu(appldata_timer, i).expires = per_cpu_interval;
smp_call_function_single(i, add_virt_timer_periodic,
&per_cpu(appldata_timer, i),
0, 1);
1);
}
appldata_timer_active = 1;
P_INFO("Monitoring timer started.\n");
Expand All @@ -236,7 +236,7 @@ __appldata_vtimer_setup(int cmd)
args.timer = &per_cpu(appldata_timer, i);
args.expires = per_cpu_interval;
smp_call_function_single(i, __appldata_mod_vtimer_wrap,
&args, 0, 1);
&args, 1);
}
}
}
Expand Down
Loading

0 comments on commit 8691e5a

Please sign in to comment.