android_kernel_xiaomi_sdm845/drivers/acpi
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
..
dispatcher ACPICA: Cleanup debug operand dump mechanism 2008-07-16 23:27:04 +02:00
events ACPI: Enhance /sys/firmware/interrupts to allow enable/disable/clear from user-space 2008-07-16 23:27:04 +02:00
executer ACPICA: Cleanup debug operand dump mechanism 2008-07-16 23:27:04 +02:00
hardware ACPI: Enhance /sys/firmware/interrupts to allow enable/disable/clear from user-space 2008-07-16 23:27:04 +02:00
namespace ACPICA: Cleanup debug operand dump mechanism 2008-07-16 23:27:04 +02:00
parser ACPICA: Eliminate acpi_native_uint type v2 2008-07-16 23:27:03 +02:00
resources ACPICA: Cleanup of _PRT parsing code 2008-07-16 23:27:04 +02:00
sleep Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
tables Fix FADT parsing 2008-07-16 23:27:08 +02:00
utilities ACPICA: Fix mutex debug code for wrong loop termination value 2008-07-16 23:27:04 +02:00
ac.c ACPI: no AC status notification 2008-06-14 01:26:37 -04:00
acpi_memhotplug.c ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers 2007-07-23 13:56:42 -04:00
asus_acpi.c asus_acpi: remove misleading mask 2008-03-18 02:31:34 -04:00
battery.c acpi: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
bay.c dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled. 2008-07-16 23:27:02 +02:00
blacklist.c ACPI: DMI: quirk for FSC ESPRIMO Mobile V5505 2008-02-14 02:43:39 -05:00
bus.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
button.c acpi: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
cm_sbs.c ACPI: clean up ACPI_MODULE_NAME() use 2007-02-12 22:42:12 -05:00
container.c ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers 2007-07-23 13:56:42 -04:00
debug.c ACPI: add control method tracing support 2007-11-19 12:25:46 -05:00
dock.c dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled. 2008-07-16 23:27:02 +02:00
ec.c ACPI: EC: Use msleep instead of udelay while waiting for event. 2008-06-11 19:13:45 -04:00
event.c acpi: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
fan.c ACPI: fix acpi fan state set error 2008-07-16 23:27:01 +02:00
glue.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
Kconfig Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
Makefile Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
numa.c ACPICA: Update DMAR and SRAT table definitions 2008-07-16 23:27:04 +02:00
osl.c flush kacpi_notify_wq before removing notify handler 2008-04-29 02:34:42 -04:00
pci_bind.c ACPI: misc cleanups 2008-02-07 03:33:23 -05:00
pci_irq.c ACPI: use dev_printk when possible 2008-07-16 23:27:07 +02:00
pci_link.c ACPI: misc cleanups 2008-02-07 03:33:23 -05:00
pci_root.c ACPI: fix section mismatch in acpi_pci_root_add 2008-02-21 02:56:32 -05:00
pci_slot.c PCI: ACPI PCI slot detection driver 2008-06-10 14:37:14 -07:00
power.c ACPI: Introduce new device wakeup flag 'prepared' 2008-07-07 16:26:14 -07:00
processor_core.c ACPI: Disable MWAIT via DMI on broken Compal board 2008-07-16 23:27:05 +02:00
processor_idle.c ACPI : Create "idle=nomwait" bootparam 2008-07-16 23:27:05 +02:00
processor_perflib.c ACPI: change processors from array to per_cpu variable 2008-07-16 23:27:01 +02:00
processor_thermal.c acpi: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
processor_throttling.c cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr 2008-07-18 22:02:57 +02:00
reboot.c Add the ability to reset the machine using the RESET_REG in ACPI's FADT table. 2008-07-16 23:27:08 +02:00
sbs.c acpi: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
sbshc.c ACPI: SBS: remove typo from sbchc.c 2008-03-18 05:13:14 -04:00
sbshc.h ACPI: SBS: Ignore alarms coming from unknown devices 2007-12-14 15:14:06 -05:00
scan.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
system.c ACPI: Enhance /sys/firmware/interrupts to allow enable/disable/clear from user-space 2008-07-16 23:27:04 +02:00
tables.c Revert "ACPI: parse 2nd MADT by default" 2007-03-30 14:16:10 -04:00
thermal.c ACPI: Reject below-freezing temperatures as invalid critical temperatures 2008-06-11 19:13:47 -04:00
toshiba_acpi.c toshiba_acpi: Enable autoloading 2008-03-11 13:35:08 -04:00
utils.c ACPICA: Fixes for external Reference Objects 2008-04-22 19:08:51 -04:00
video.c ACPI: video: fix brightness allocation 2008-07-16 23:27:05 +02:00
wmi.c ACPI: WMI: Clean up handling of spec violating data blocks 2008-03-11 17:59:05 -04:00