android_kernel_motorola_sm6225/drivers/firmware
Mike Travis 65c0118453 cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr
* This patch replaces the dangerous lvalue version of cpumask_of_cpu
    with new cpumask_of_cpu_ptr macros.  These are patterned after the
    node_to_cpumask_ptr macros.

    In general terms, if there is a cpumask_of_cpu_map[] then a pointer to
    the cpumask_of_cpu_map[cpu] entry is used.  The cpumask_of_cpu_map
    is provided when there is a large NR_CPUS count, reducing
    greatly the amount of code generated and stack space used for
    cpumask_of_cpu().  The pointer to the cpumask_t value is needed for
    calling set_cpus_allowed_ptr() to reduce the amount of stack space
    needed to pass the cpumask_t value.

    If there isn't a cpumask_of_cpu_map[], then a temporary variable is
    declared and filled in with value from cpumask_of_cpu(cpu) as well as
    a pointer variable pointing to this temporary variable.  Afterwards,
    the pointer is used to reference the cpumask value.  The compiler
    will optimize out the extra dereference through the pointer as well
    as the stack space used for the pointer, resulting in identical code.

    A good example of the orthogonal usages is in net/sunrpc/svc.c:

	case SVC_POOL_PERCPU:
	{
		unsigned int cpu = m->pool_to[pidx];
		cpumask_of_cpu_ptr(cpumask, cpu);

		*oldmask = current->cpus_allowed;
		set_cpus_allowed_ptr(current, cpumask);
		return 1;
	}
	case SVC_POOL_PERNODE:
	{
		unsigned int node = m->pool_to[pidx];
		node_to_cpumask_ptr(nodecpumask, node);

		*oldmask = current->cpus_allowed;
		set_cpus_allowed_ptr(current, nodecpumask);
		return 1;
	}

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-18 22:02:57 +02:00
..
dcdbas.c cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr 2008-07-18 22:02:57 +02:00
dcdbas.h define global BIT macro 2007-10-19 11:53:42 -07:00
dell_rbu.c dell_rbu: firmware data is const 2008-07-10 14:26:42 +01:00
dmi-id.c Remove inclusions of <linux/autoconf.h> 2008-02-06 10:41:00 -08:00
dmi_scan.c x86 boot: add header comment to dmi.h stating what it is 2008-05-25 10:55:11 +02:00
edd.c edd: fix incorrect return of 1 from module_init 2008-06-06 11:29:09 -07:00
efivars.c Kobject: convert drivers/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
iscsi_ibft.c Firmware: add iSCSI iBFT Support 2008-04-19 19:10:28 -07:00
iscsi_ibft_find.c drivers: fix integer as NULL pointer warnings 2008-04-28 17:31:13 -07:00
Kconfig sysfs: add /sys/firmware/memmap 2008-07-08 17:55:41 +02:00
Makefile sysfs: add /sys/firmware/memmap 2008-07-08 17:55:41 +02:00
memmap.c sysfs: add /sys/firmware/memmap 2008-07-08 17:55:41 +02:00
pcdp.c serial: convert early_uart to earlycon for 8250 2007-07-16 09:05:35 -07:00
pcdp.h [IA64] Make PCDP work again. 2005-07-13 11:56:32 -07:00