mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
ACPI and power management updates for 3.12-rc1
1) ACPI-based PCI hotplug (ACPIPHP) subsystem rework and introduction
of Intel Thunderbolt support on systems that use ACPI for signalling
Thunderbolt hotplug events. This also should make ACPIPHP work in
some cases in which it was known to have problems. From
Rafael J Wysocki, Mika Westerberg and Kirill A Shutemov.
2) ACPI core code cleanups and dock station support cleanups from
Jiang Liu and Rafael J Wysocki.
3) Fixes for locking problems related to ACPI device hotplug from
Rafael J Wysocki.
4) ACPICA update to version 20130725 includig fixes, cleanups, support
for more than 256 GPEs per GPE block and a change to make the ACPI
PM Timer optional (we've seen systems without the PM Timer in the
field already). One of the fixes, related to the DeRefOf operator,
is necessary to prevent some Windows 8 oriented AML from causing
problems to happen. From Bob Moore, Lv Zheng, and Jung-uk Kim.
5) Removal of the old and long deprecated /proc/acpi/event interface
and related driver changes from Thomas Renninger.
6) ACPI and Xen changes to make the reduced hardware sleep work with
the latter from Ben Guthro.
7) ACPI video driver cleanups and a blacklist of systems that should
not tell the BIOS that they are compatible with Windows 8 (or ACPI
backlight and possibly other things will not work on them). From
Felipe Contreras.
8) Assorted ACPI fixes and cleanups from Aaron Lu, Hanjun Guo,
Kuppuswamy Sathyanarayanan, Lan Tianyu, Sachin Kamat, Tang Chen,
Toshi Kani, and Wei Yongjun.
9) cpufreq ondemand governor target frequency selection change to
reduce oscillations between min and max frequencies (essentially,
it causes the governor to choose target frequencies proportional
to load) from Stratos Karafotis.
10) cpufreq fixes allowing sysfs attributes file permissions to be
preserved over suspend/resume cycles Srivatsa S Bhat.
11) Removal of Device Tree parsing for CPU device nodes from multiple
cpufreq drivers that required some changes related to
of_get_cpu_node() to be made in a few architectures and in the
driver core. From Sudeep KarkadaNagesha.
12) cpufreq core fixes and cleanups related to mutual exclusion and
driver module references from Viresh Kumar, Lukasz Majewski and
Rafael J Wysocki.
13) Assorted cpufreq fixes and cleanups from Amit Daniel Kachhap,
Bartlomiej Zolnierkiewicz, Hanjun Guo, Jingoo Han, Joseph Lo,
Julia Lawall, Li Zhong, Mark Brown, Sascha Hauer, Stephen Boyd,
Stratos Karafotis, and Viresh Kumar.
14) Fixes to prevent race conditions in coupled cpuidle from happening
from Colin Cross.
15) cpuidle core fixes and cleanups from Daniel Lezcano and
Tuukka Tikkanen.
16) Assorted cpuidle fixes and cleanups from Daniel Lezcano,
Geert Uytterhoeven, Jingoo Han, Julia Lawall, Linus Walleij,
and Sahara.
17) System sleep tracing changes from Todd E Brandt and Shuah Khan.
18) PNP subsystem conversion to using struct dev_pm_ops for power
management from Shuah Khan.
/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAABCAAGBQJSJcKhAAoJEKhOf7ml8uNsplIQAJSOshxhkkemvFOuHZ+0YIbh
R9aufjXeDkMDBi8YtU+tB7ERth1j+0LUSM0NTnP51U7e+7eSGobA9s5jSZQj2l7r
HFtnSOegLuKAfqwgfSLK91xa1rTFdfW0Kych9G2nuHtBIt6P0Oc59Cb5M0oy6QXs
nVtaDEuU//tmO71+EF5HnMJHabRTrpvtn/7NbDUpU7LZYpWJrHJFT9xt1rXNab7H
YRCATPm3kXGRg58Doc3EZE4G3D7DLvq74jWMaI089X/m5Pg1G6upqArypOy6oxdP
p2FEzYVrb2bi8fakXp7BBeO1gCJTAqIgAkbSSZHLpGhFaeEMmb9/DWPXdm2TjzMV
c1EEucvsqZWoprXgy12i5Hk814xN8d8nBBLg/UYiRJ44nc/hevXfyE9ZYj6bkseJ
+GNHmZIa1QYC05nnGli4+W4kHns8EZf/gmvIxnPuco1RN2yMWagrud5/G6Dr9M2B
hzJV6qauLVzgZso4oe79zv9aVxe/dPHKANLD/sg23WBiJJbJF1ocBlnj2Xlbpqze
pmMUWGiO/gUiS0fmpW/lAJauza5jFmSCjE4E8R0Gyn0j4YXjmMhdEanaU6J3VuCi
yVgEzYEth4sowq4AflMMLKYN+WmozDnK7taZRGmT0t+EKRFKLT6EgnNrkQgs1vKl
oawD9LM4fZ8E0yroOEme
=CgqW
-----END PGP SIGNATURE-----
Merge tag 'pm+acpi-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI and power management updates from Rafael Wysocki:
1) ACPI-based PCI hotplug (ACPIPHP) subsystem rework and introduction
of Intel Thunderbolt support on systems that use ACPI for signalling
Thunderbolt hotplug events. This also should make ACPIPHP work in
some cases in which it was known to have problems. From
Rafael J Wysocki, Mika Westerberg and Kirill A Shutemov.
2) ACPI core code cleanups and dock station support cleanups from
Jiang Liu and Rafael J Wysocki.
3) Fixes for locking problems related to ACPI device hotplug from
Rafael J Wysocki.
4) ACPICA update to version 20130725 includig fixes, cleanups, support
for more than 256 GPEs per GPE block and a change to make the ACPI
PM Timer optional (we've seen systems without the PM Timer in the
field already). One of the fixes, related to the DeRefOf operator,
is necessary to prevent some Windows 8 oriented AML from causing
problems to happen. From Bob Moore, Lv Zheng, and Jung-uk Kim.
5) Removal of the old and long deprecated /proc/acpi/event interface
and related driver changes from Thomas Renninger.
6) ACPI and Xen changes to make the reduced hardware sleep work with
the latter from Ben Guthro.
7) ACPI video driver cleanups and a blacklist of systems that should
not tell the BIOS that they are compatible with Windows 8 (or ACPI
backlight and possibly other things will not work on them). From
Felipe Contreras.
8) Assorted ACPI fixes and cleanups from Aaron Lu, Hanjun Guo,
Kuppuswamy Sathyanarayanan, Lan Tianyu, Sachin Kamat, Tang Chen,
Toshi Kani, and Wei Yongjun.
9) cpufreq ondemand governor target frequency selection change to
reduce oscillations between min and max frequencies (essentially,
it causes the governor to choose target frequencies proportional
to load) from Stratos Karafotis.
10) cpufreq fixes allowing sysfs attributes file permissions to be
preserved over suspend/resume cycles Srivatsa S Bhat.
11) Removal of Device Tree parsing for CPU device nodes from multiple
cpufreq drivers that required some changes related to
of_get_cpu_node() to be made in a few architectures and in the
driver core. From Sudeep KarkadaNagesha.
12) cpufreq core fixes and cleanups related to mutual exclusion and
driver module references from Viresh Kumar, Lukasz Majewski and
Rafael J Wysocki.
13) Assorted cpufreq fixes and cleanups from Amit Daniel Kachhap,
Bartlomiej Zolnierkiewicz, Hanjun Guo, Jingoo Han, Joseph Lo,
Julia Lawall, Li Zhong, Mark Brown, Sascha Hauer, Stephen Boyd,
Stratos Karafotis, and Viresh Kumar.
14) Fixes to prevent race conditions in coupled cpuidle from happening
from Colin Cross.
15) cpuidle core fixes and cleanups from Daniel Lezcano and
Tuukka Tikkanen.
16) Assorted cpuidle fixes and cleanups from Daniel Lezcano,
Geert Uytterhoeven, Jingoo Han, Julia Lawall, Linus Walleij,
and Sahara.
17) System sleep tracing changes from Todd E Brandt and Shuah Khan.
18) PNP subsystem conversion to using struct dev_pm_ops for power
management from Shuah Khan.
* tag 'pm+acpi-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (217 commits)
cpufreq: Don't use smp_processor_id() in preemptible context
cpuidle: coupled: fix race condition between pokes and safe state
cpuidle: coupled: abort idle if pokes are pending
cpuidle: coupled: disable interrupts after entering safe state
ACPI / hotplug: Remove containers synchronously
driver core / ACPI: Avoid device hot remove locking issues
cpufreq: governor: Fix typos in comments
cpufreq: governors: Remove duplicate check of target freq in supported range
cpufreq: Fix timer/workqueue corruption due to double queueing
ACPI / EC: Add ASUSTEK L4R to quirk list in order to validate ECDT
ACPI / thermal: Add check of "_TZD" availability and evaluating result
cpufreq: imx6q: Fix clock enable balance
ACPI: blacklist win8 OSI for buggy laptops
cpufreq: tegra: fix the wrong clock name
cpuidle: Change struct menu_device field types
cpuidle: Add a comment warning about possible overflow
cpuidle: Fix variable domains in get_typical_interval()
cpuidle: Fix menu_device->intervals type
cpuidle: CodingStyle: Break up multiple assignments on single line
cpuidle: Check called function parameter in get_typical_interval()
...
This commit is contained in:
commit
40031da445
188 changed files with 2986 additions and 3495 deletions
|
|
@ -49,6 +49,7 @@
|
|||
#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
|
||||
#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
|
||||
|
||||
struct acpiphp_context;
|
||||
struct acpiphp_bridge;
|
||||
struct acpiphp_slot;
|
||||
|
||||
|
|
@ -59,6 +60,7 @@ struct slot {
|
|||
struct hotplug_slot *hotplug_slot;
|
||||
struct acpiphp_slot *acpi_slot;
|
||||
struct hotplug_slot_info info;
|
||||
unsigned int sun; /* ACPI _SUN (Slot User Number) value */
|
||||
};
|
||||
|
||||
static inline const char *slot_name(struct slot *slot)
|
||||
|
|
@ -75,15 +77,11 @@ struct acpiphp_bridge {
|
|||
struct list_head list;
|
||||
struct list_head slots;
|
||||
struct kref ref;
|
||||
acpi_handle handle;
|
||||
|
||||
/* Ejectable PCI-to-PCI bridge (PCI bridge and PCI function) */
|
||||
struct acpiphp_func *func;
|
||||
struct acpiphp_context *context;
|
||||
|
||||
int nr_slots;
|
||||
|
||||
u32 flags;
|
||||
|
||||
/* This bus (host bridge) or Secondary bus (PCI-to-PCI bridge) */
|
||||
struct pci_bus *pci_bus;
|
||||
|
||||
|
|
@ -99,15 +97,13 @@ struct acpiphp_bridge {
|
|||
*/
|
||||
struct acpiphp_slot {
|
||||
struct list_head node;
|
||||
struct acpiphp_bridge *bridge; /* parent */
|
||||
struct pci_bus *bus;
|
||||
struct list_head funcs; /* one slot may have different
|
||||
objects (i.e. for each function) */
|
||||
struct slot *slot;
|
||||
struct mutex crit_sect;
|
||||
|
||||
u8 device; /* pci device# */
|
||||
|
||||
unsigned long long sun; /* ACPI _SUN (slot unique number) */
|
||||
u32 flags; /* see below */
|
||||
};
|
||||
|
||||
|
|
@ -119,16 +115,32 @@ struct acpiphp_slot {
|
|||
* typically 8 objects per slot (i.e. for each PCI function)
|
||||
*/
|
||||
struct acpiphp_func {
|
||||
struct acpiphp_slot *slot; /* parent */
|
||||
struct acpiphp_bridge *parent;
|
||||
struct acpiphp_slot *slot;
|
||||
|
||||
struct list_head sibling;
|
||||
struct notifier_block nb;
|
||||
acpi_handle handle;
|
||||
|
||||
u8 function; /* pci function# */
|
||||
u32 flags; /* see below */
|
||||
};
|
||||
|
||||
struct acpiphp_context {
|
||||
acpi_handle handle;
|
||||
struct acpiphp_func func;
|
||||
struct acpiphp_bridge *bridge;
|
||||
unsigned int refcount;
|
||||
};
|
||||
|
||||
static inline struct acpiphp_context *func_to_context(struct acpiphp_func *func)
|
||||
{
|
||||
return container_of(func, struct acpiphp_context, func);
|
||||
}
|
||||
|
||||
static inline acpi_handle func_to_handle(struct acpiphp_func *func)
|
||||
{
|
||||
return func_to_context(func)->handle;
|
||||
}
|
||||
|
||||
/*
|
||||
* struct acpiphp_attention_info - device specific attention registration
|
||||
*
|
||||
|
|
@ -142,45 +154,32 @@ struct acpiphp_attention_info
|
|||
struct module *owner;
|
||||
};
|
||||
|
||||
/* PCI bus bridge HID */
|
||||
#define ACPI_PCI_HOST_HID "PNP0A03"
|
||||
|
||||
/* ACPI _STA method value (ignore bit 4; battery present) */
|
||||
#define ACPI_STA_ALL (0x0000000f)
|
||||
|
||||
/* bridge flags */
|
||||
#define BRIDGE_HAS_EJ0 (0x00000001)
|
||||
|
||||
/* slot flags */
|
||||
|
||||
#define SLOT_POWEREDON (0x00000001)
|
||||
#define SLOT_ENABLED (0x00000002)
|
||||
#define SLOT_MULTIFUNCTION (0x00000004)
|
||||
#define SLOT_ENABLED (0x00000001)
|
||||
|
||||
/* function flags */
|
||||
|
||||
#define FUNC_HAS_STA (0x00000001)
|
||||
#define FUNC_HAS_EJ0 (0x00000002)
|
||||
#define FUNC_HAS_PS0 (0x00000010)
|
||||
#define FUNC_HAS_PS1 (0x00000020)
|
||||
#define FUNC_HAS_PS2 (0x00000040)
|
||||
#define FUNC_HAS_PS3 (0x00000080)
|
||||
#define FUNC_HAS_DCK (0x00000100)
|
||||
#define FUNC_HAS_DCK (0x00000004)
|
||||
|
||||
/* function prototypes */
|
||||
|
||||
/* acpiphp_core.c */
|
||||
int acpiphp_register_attention(struct acpiphp_attention_info*info);
|
||||
int acpiphp_unregister_attention(struct acpiphp_attention_info *info);
|
||||
int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot);
|
||||
int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot, unsigned int sun);
|
||||
void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
|
||||
|
||||
/* acpiphp_glue.c */
|
||||
typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
|
||||
|
||||
int acpiphp_enable_slot(struct acpiphp_slot *slot);
|
||||
int acpiphp_disable_slot(struct acpiphp_slot *slot);
|
||||
int acpiphp_eject_slot(struct acpiphp_slot *slot);
|
||||
int acpiphp_disable_and_eject_slot(struct acpiphp_slot *slot);
|
||||
u8 acpiphp_get_power_status(struct acpiphp_slot *slot);
|
||||
u8 acpiphp_get_attention_status(struct acpiphp_slot *slot);
|
||||
u8 acpiphp_get_latch_status(struct acpiphp_slot *slot);
|
||||
|
|
|
|||
|
|
@ -155,15 +155,11 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
|
|||
static int disable_slot(struct hotplug_slot *hotplug_slot)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __func__, slot_name(slot));
|
||||
|
||||
/* disable the specified slot */
|
||||
retval = acpiphp_disable_slot(slot->acpi_slot);
|
||||
if (!retval)
|
||||
retval = acpiphp_eject_slot(slot->acpi_slot);
|
||||
return retval;
|
||||
return acpiphp_disable_and_eject_slot(slot->acpi_slot);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -290,7 +286,8 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
|
|||
}
|
||||
|
||||
/* callback routine to initialize 'struct slot' for each slot */
|
||||
int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
|
||||
int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot,
|
||||
unsigned int sun)
|
||||
{
|
||||
struct slot *slot;
|
||||
int retval = -ENOMEM;
|
||||
|
|
@ -317,12 +314,11 @@ int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
|
|||
slot->hotplug_slot->info->adapter_status = acpiphp_get_adapter_status(slot->acpi_slot);
|
||||
|
||||
acpiphp_slot->slot = slot;
|
||||
snprintf(name, SLOT_NAME_SIZE, "%llu", slot->acpi_slot->sun);
|
||||
slot->sun = sun;
|
||||
snprintf(name, SLOT_NAME_SIZE, "%u", sun);
|
||||
|
||||
retval = pci_hp_register(slot->hotplug_slot,
|
||||
acpiphp_slot->bridge->pci_bus,
|
||||
acpiphp_slot->device,
|
||||
name);
|
||||
retval = pci_hp_register(slot->hotplug_slot, acpiphp_slot->bus,
|
||||
acpiphp_slot->device, name);
|
||||
if (retval == -EBUSY)
|
||||
goto error_hpslot;
|
||||
if (retval) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -66,7 +66,7 @@ do { \
|
|||
#define IBM_HARDWARE_ID1 "IBM37D0"
|
||||
#define IBM_HARDWARE_ID2 "IBM37D4"
|
||||
|
||||
#define hpslot_to_sun(A) (((struct slot *)((A)->private))->acpi_slot->sun)
|
||||
#define hpslot_to_sun(A) (((struct slot *)((A)->private))->sun)
|
||||
|
||||
/* union apci_descriptor - allows access to the
|
||||
* various device descriptors that are embedded in the
|
||||
|
|
@ -270,7 +270,6 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
|
|||
|
||||
if (subevent == 0x80) {
|
||||
dbg("%s: generationg bus event\n", __func__);
|
||||
acpi_bus_generate_proc_event(note->device, note->event, detail);
|
||||
acpi_bus_generate_netlink_event(note->device->pnp.device_class,
|
||||
dev_name(¬e->device->dev),
|
||||
note->event, detail);
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
|
|||
}
|
||||
|
||||
if (!error)
|
||||
dev_info(&dev->dev, "power state changed by ACPI to %s\n",
|
||||
dev_dbg(&dev->dev, "power state changed by ACPI to %s\n",
|
||||
acpi_power_state_string(state_conv[state]));
|
||||
|
||||
return error;
|
||||
|
|
@ -290,24 +290,16 @@ static struct pci_platform_pm_ops acpi_pci_platform_pm = {
|
|||
|
||||
void acpi_pci_add_bus(struct pci_bus *bus)
|
||||
{
|
||||
acpi_handle handle = NULL;
|
||||
|
||||
if (bus->bridge)
|
||||
handle = ACPI_HANDLE(bus->bridge);
|
||||
if (acpi_pci_disabled || handle == NULL)
|
||||
if (acpi_pci_disabled || !bus->bridge)
|
||||
return;
|
||||
|
||||
acpi_pci_slot_enumerate(bus, handle);
|
||||
acpiphp_enumerate_slots(bus, handle);
|
||||
acpi_pci_slot_enumerate(bus);
|
||||
acpiphp_enumerate_slots(bus);
|
||||
}
|
||||
|
||||
void acpi_pci_remove_bus(struct pci_bus *bus)
|
||||
{
|
||||
/*
|
||||
* bus->bridge->acpi_node.handle has already been reset to NULL
|
||||
* when acpi_pci_remove_bus() is called, so don't check ACPI handle.
|
||||
*/
|
||||
if (acpi_pci_disabled)
|
||||
if (acpi_pci_disabled || !bus->bridge)
|
||||
return;
|
||||
|
||||
acpiphp_remove_slots(bus);
|
||||
|
|
|
|||
Loading…
Reference in a new issue