tmp_suning_uos_patched/drivers/cpuidle
Frederic Weisbecker fce8ad1568 smp: Remove wait argument from __smp_call_function_single()
The main point of calling __smp_call_function_single() is to send
an IPI in a pure asynchronous way. By embedding a csd in an object,
a caller can send the IPI without waiting for a previous one to complete
as is required by smp_call_function_single() for example. As such,
sending this kind of IPI can be safe even when irqs are disabled.

This flexibility comes at the expense of the caller who then needs to
synchronize the csd lifecycle by himself and make sure that IPIs on a
single csd are serialized.

This is how __smp_call_function_single() works when wait = 0 and this
usecase is relevant.

Now there don't seem to be any usecase with wait = 1 that can't be
covered by smp_call_function_single() instead, which is safer. Lets look
at the two possible scenario:

1) The user calls __smp_call_function_single(wait = 1) on a csd embedded
   in an object. It looks like a nice and convenient pattern at the first
   sight because we can then retrieve the object from the IPI handler easily.

   But actually it is a waste of memory space in the object since the csd
   can be allocated from the stack by smp_call_function_single(wait = 1)
   and the object can be passed an the IPI argument.

   Besides that, embedding the csd in an object is more error prone
   because the caller must take care of the serialization of the IPIs
   for this csd.

2) The user calls __smp_call_function_single(wait = 1) on a csd that
   is allocated on the stack. It's ok but smp_call_function_single()
   can do it as well and it already takes care of the allocation on the
   stack. Again it's more simple and less error prone.

Therefore, using the underscore prepend API version with wait = 1
is a bad pattern and a sign that the caller can do safer and more
simple.

There was a single user of that which has just been converted.
So lets remove this option to discourage further users.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@fb.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-02-24 14:47:09 -08:00
..
governors cpuidle: Change struct menu_device field types 2013-08-23 00:24:16 +02:00
coupled.c smp: Remove wait argument from __smp_call_function_single() 2014-02-24 14:47:09 -08:00
cpuidle-at91.c ARM: at91: cpuidle: Move driver to drivers/cpuidle 2013-10-16 23:49:35 +02:00
cpuidle-big_little.c cpuidle: big.LITTLE: vexpress-TC2 CPU idle driver 2013-08-28 11:28:51 -07:00
cpuidle-calxeda.c ARM/cpuidle: remove __init tag from Calxeda cpuidle probe function 2013-12-30 11:55:20 +01:00
cpuidle-kirkwood.c cpuidle-kirkwood.c: simplify use of devm_ioremap_resource() 2013-08-14 22:20:06 +02:00
cpuidle-powernv.c powerpc/powernv/cpuidle: Back-end cpuidle driver for powernv platform. 2014-01-29 17:02:24 +11:00
cpuidle-pseries.c powerpc/pseries/cpuidle: smt-snooze-delay cleanup. 2014-01-29 17:02:24 +11:00
cpuidle-ux500.c ARM: ux500: cpuidle: fix section mismatch 2013-10-07 16:47:07 +02:00
cpuidle-zynq.c ARM: zynq: cpuidle: convert to platform driver 2013-10-07 16:46:59 +02:00
cpuidle.c cpuidle: Check for dev before deregistering it. 2013-12-03 22:05:22 +01:00
cpuidle.h cpuidle: support multiple drivers 2012-11-15 00:34:23 +01:00
driver.c cpuidle: don't call poll_idle_init() for every cpu 2013-10-30 01:21:23 +01:00
governor.c cpuidle: remove cpuidle_unregister_governor() 2013-10-30 01:21:24 +01:00
Kconfig powerpc/pseries/cpuidle: Move processor_idle.c to drivers/cpuidle. 2014-01-29 17:02:22 +11:00
Kconfig.arm ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
Kconfig.powerpc powerpc/powernv/cpuidle: Back-end cpuidle driver for powernv platform. 2014-01-29 17:02:24 +11:00
Makefile powerpc/powernv/cpuidle: Back-end cpuidle driver for powernv platform. 2014-01-29 17:02:24 +11:00
sysfs.c cpuidle: use drv instead of cpuidle_driver in show_current_driver() 2013-10-30 01:21:23 +01:00