History

Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: pnpacpi: print resource shortage message only once PM: ACPI and APM must not be enabled at the same time ACPI: apply quirk_ich6_lpc_acpi to more ICH8 and ICH9 ACPICA: fix acpi_serialize hang regression ACPI : Not register gsi for PCI IDE controller in legacy mode ACPI: Reintroduce run time configurable max_cstate for !CPU_IDLE case ACPI: Make sysfs interface in ACPI power optional. ACPI: EC: Enable boot EC before bus_scan increase PNP_MAX_PORT to 40 from 24

Linus Torvalds committed 18 years ago

Commit 417009f2 parents ba67a39 55d1bb919 files · +139 −44Browse files

Unified · Split

19 files
  1. arch/x86/kernel/apm_32.c +3 −7
  2. drivers/acpi/Kconfig +6 −3
  3. drivers/acpi/ac.c +14 −2
  4. drivers/acpi/battery.c +25 −6
  5. drivers/acpi/bus.c +2 −5
  6. drivers/acpi/ec.c +13 −1
  7. drivers/acpi/events/evregion.c +4 −4
  8. drivers/acpi/pci_irq.c +9 −0
  9. drivers/acpi/processor_idle.c +4 −0
  10. drivers/acpi/sbs.c +22 −1
  11. drivers/acpi/scan.c +6 −0
  12. drivers/pci/quirks.c +6 −0
  13. drivers/pnp/pnpacpi/rsparser.c +10 −4
  14. include/linux/pci_ids.h +2 −0
  15. include/linux/pm.h +9 −0
  16. include/linux/pm_legacy.h +0 −6
  17. include/linux/pnp.h +1 −1
  18. kernel/power/main.c +3 −0
  19. kernel/power/pm.c +0 −4
arch/x86/kernel/apm_32.c+3−7
@@ -2256,14 +2256,12 @@ static int __init apm_init(void) · 2255 unmodified lines
22562256 apm_info.disabled = 1;
22572257 return -ENODEV;
22582258 }
2259− if (PM_IS_ACTIVE()) {
2259+ if (pm_flags & PM_ACPI) {
22602260 printk(KERN_NOTICE "apm: overridden by ACPI.\n");
22612261 apm_info.disabled = 1;
22622262 return -ENODEV;
22632263 }
2264−#ifdef CONFIG_PM_LEGACY
2265− pm_active = 1;
2266−#endif
2264+ pm_flags |= PM_APM;
22672265
22682266 /*
22692267 * Set up a segment that references the real mode segment 0x40
@@ -2366,9 +2364,7 @@ static void __exit apm_exit(void) · 96 unmodified lines
23662364 kthread_stop(kapmd_task);
23672365 kapmd_task = NULL;
23682366 }
2369−#ifdef CONFIG_PM_LEGACY
2370− pm_active = 0;
2371−#endif
2367+ pm_flags &= ~PM_APM;
23722368 }
23732369
23742370 module_init(apm_init);
drivers/acpi/Kconfig+6−3
@@ -82,6 +82,12 @@ config ACPI_PROCFS_POWER · 81 unmodified lines
8282 and functions, which do not yet exist in /sys
8383
8484 Say N to delete power /proc/acpi/ folders that have moved to /sys/
85+config ACPI_SYSFS_POWER
86+ bool "Future power /sys interface"
87+ select POWER_SUPPLY
88+ default y
89+ ---help---
90+ Say N to disable power /sys interface
8591 config ACPI_PROC_EVENT
8692 bool "Deprecated /proc/acpi/event support"
8793 depends on PROC_FS
@@ -103,7 +109,6 @@ config ACPI_PROC_EVENT · 15 unmodified lines
103109 config ACPI_AC
104110 tristate "AC Adapter"
105111 depends on X86
106− select POWER_SUPPLY
107112 default y
108113 help
109114 This driver adds support for the AC Adapter object, which indicates
@@ -113,7 +118,6 @@ config ACPI_AC · 3 unmodified lines
113118 config ACPI_BATTERY
114119 tristate "Battery"
115120 depends on X86
116− select POWER_SUPPLY
117121 default y
118122 help
119123 This driver adds support for battery information through
@@ -368,7 +372,6 @@ config ACPI_HOTPLUG_MEMORY · 248 unmodified lines
368372 config ACPI_SBS
369373 tristate "Smart Battery System"
370374 depends on X86
371− select POWER_SUPPLY
372375 help
373376 This driver adds support for the Smart Battery System, another
374377 type of access to battery information, found on some laptops.
drivers/acpi/ac.c+14−2
@@ -31,7 +31,9 @@ · 30 unmodified lines
3131 #include <linux/proc_fs.h>
3232 #include <linux/seq_file.h>
3333 #endif
34+#ifdef CONFIG_ACPI_SYSFS_POWER
3435 #include <linux/power_supply.h>
36+#endif
3537 #include <acpi/acpi_bus.h>
3638 #include <acpi/acpi_drivers.h>
3739
@@ -79,7 +81,9 @@ static struct acpi_driver acpi_ac_driver = { · 41 unmodified lines
7981 };
8082
8183 struct acpi_ac {
84+#ifdef CONFIG_ACPI_SYSFS_POWER
8285 struct power_supply charger;
86+#endif
8387 struct acpi_device * device;
8488 unsigned long state;
8589 };
@@ -94,7 +98,7 @@ static const struct file_operations acpi_ac_fops = { · 8 unmodified lines
9498 .release = single_release,
9599 };
96100 #endif
97−
101+#ifdef CONFIG_ACPI_SYSFS_POWER
98102 static int get_ac_property(struct power_supply *psy,
99103 enum power_supply_property psp,
100104 union power_supply_propval *val)
@@ -113,7 +117,7 @@ static int get_ac_property(struct power_supply *psy, · 12 unmodified lines
113117 static enum power_supply_property ac_props[] = {
114118 POWER_SUPPLY_PROP_ONLINE,
115119 };
116−
120+#endif
117121 /* --------------------------------------------------------------------------
118122 AC Adapter Management
119123 -------------------------------------------------------------------------- */
@@ -241,7 +245,9 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data) · 121 unmodified lines
241245 acpi_bus_generate_netlink_event(device->pnp.device_class,
242246 device->dev.bus_id, event,
243247 (u32) ac->state);
248+#ifdef CONFIG_ACPI_SYSFS_POWER
244249 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
250+#endif
245251 break;
246252 default:
247253 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -280,12 +286,14 @@ static int acpi_ac_add(struct acpi_device *device) · 32 unmodified lines
280286 #endif
281287 if (result)
282288 goto end;
289+#ifdef CONFIG_ACPI_SYSFS_POWER
283290 ac->charger.name = acpi_device_bid(device);
284291 ac->charger.type = POWER_SUPPLY_TYPE_MAINS;
285292 ac->charger.properties = ac_props;
286293 ac->charger.num_properties = ARRAY_SIZE(ac_props);
287294 ac->charger.get_property = get_ac_property;
288295 power_supply_register(&ac->device->dev, &ac->charger);
296+#endif
289297 status = acpi_install_notify_handler(device->handle,
290298 ACPI_ALL_NOTIFY, acpi_ac_notify,
291299 ac);
@@ -319,8 +327,10 @@ static int acpi_ac_resume(struct acpi_device *device) · 27 unmodified lines
319327 old_state = ac->state;
320328 if (acpi_ac_get_state(ac))
321329 return 0;
330+#ifdef CONFIG_ACPI_SYSFS_POWER
322331 if (old_state != ac->state)
323332 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
333+#endif
324334 return 0;
325335 }
326336
@@ -337,8 +347,10 @@ static int acpi_ac_remove(struct acpi_device *device, int type) · 10 unmodified lines
337347
338348 status = acpi_remove_notify_handler(device->handle,
339349 ACPI_ALL_NOTIFY, acpi_ac_notify);
350+#ifdef CONFIG_ACPI_SYSFS_POWER
340351 if (ac->charger.dev)
341352 power_supply_unregister(&ac->charger);
353+#endif
342354 #ifdef CONFIG_ACPI_PROCFS_POWER
343355 acpi_ac_remove_fs(device);
344356 #endif
drivers/acpi/battery.c+25−6
@@ -40,7 +40,9 @@ · 39 unmodified lines
4040 #include <acpi/acpi_bus.h>
4141 #include <acpi/acpi_drivers.h>
4242
43+#ifdef CONFIG_ACPI_SYSFS_POWER
4344 #include <linux/power_supply.h>
45+#endif
4446
4547 #define ACPI_BATTERY_VALUE_UNKNOWN 0xFFFFFFFF
4648
@@ -86,7 +88,9 @@ MODULE_DEVICE_TABLE(acpi, battery_device_ids); · 39 unmodified lines
8688
8789 struct acpi_battery {
8890 struct mutex lock;
91+#ifdef CONFIG_ACPI_SYSFS_POWER
8992 struct power_supply bat;
93+#endif
9094 struct acpi_device *device;
9195 unsigned long update_time;
9296 int current_now;
@@ -117,6 +121,7 @@ inline int acpi_battery_present(struct acpi_battery *battery) · 24 unmodified lines
117121 return battery->device->status.battery_present;
118122 }
119123
124+#ifdef CONFIG_ACPI_SYSFS_POWER
120125 static int acpi_battery_technology(struct acpi_battery *battery)
121126 {
122127 if (!strcasecmp("NiCd", battery->type))
@@ -222,6 +227,7 @@ static enum power_supply_property energy_battery_props[] = { · 99 unmodified lines
222227 POWER_SUPPLY_PROP_MODEL_NAME,
223228 POWER_SUPPLY_PROP_MANUFACTURER,
224229 };
230+#endif
225231
226232 #ifdef CONFIG_ACPI_PROCFS_POWER
227233 inline char *acpi_battery_units(struct acpi_battery *battery)
@@ -398,6 +404,7 @@ static int acpi_battery_init_alarm(struct acpi_battery *battery) · 170 unmodified lines
398404 return acpi_battery_set_alarm(battery);
399405 }
400406
407+#ifdef CONFIG_ACPI_SYSFS_POWER
401408 static ssize_t acpi_battery_alarm_show(struct device *dev,
402409 struct device_attribute *attr,
403410 char *buf)
@@ -429,11 +436,6 @@ static int sysfs_add_battery(struct acpi_battery *battery) · 25 unmodified lines
429436 {
430437 int result;
431438
432− battery->update_time = 0;
433− result = acpi_battery_get_info(battery);
434− acpi_battery_init_alarm(battery);
435− if (result)
436− return result;
437439 if (battery->power_unit) {
438440 battery->bat.properties = charge_battery_props;
439441 battery->bat.num_properties =
@@ -462,18 +464,31 @@ static void sysfs_remove_battery(struct acpi_battery *battery) · 22 unmodified lines
462464 power_supply_unregister(&battery->bat);
463465 battery->bat.dev = NULL;
464466 }
467+#endif
465468
466469 static int acpi_battery_update(struct acpi_battery *battery)
467470 {
468− int result = acpi_battery_get_status(battery);
471+ int result;
472+ result = acpi_battery_get_status(battery);
469473 if (result)
470474 return result;
475+#ifdef CONFIG_ACPI_SYSFS_POWER
471476 if (!acpi_battery_present(battery)) {
472477 sysfs_remove_battery(battery);
478+ battery->update_time = 0;
473479 return 0;
474480 }
481+#endif
482+ if (!battery->update_time) {
483+ result = acpi_battery_get_info(battery);
484+ if (result)
485+ return result;
486+ acpi_battery_init_alarm(battery);
487+ }
488+#ifdef CONFIG_ACPI_SYSFS_POWER
475489 if (!battery->bat.dev)
476490 sysfs_add_battery(battery);
491+#endif
477492 return acpi_battery_get_state(battery);
478493 }
479494
@@ -767,9 +782,11 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data) · 287 unmodified lines
767782 acpi_bus_generate_netlink_event(device->pnp.device_class,
768783 device->dev.bus_id, event,
769784 acpi_battery_present(battery));
785+#ifdef CONFIG_ACPI_SYSFS_POWER
770786 /* acpi_batter_update could remove power_supply object */
771787 if (battery->bat.dev)
772788 kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE);
789+#endif
773790 }
774791
775792 static int acpi_battery_add(struct acpi_device *device)
@@ -828,7 +845,9 @@ static int acpi_battery_remove(struct acpi_device *device, int type) · 52 unmodified lines
828845 #ifdef CONFIG_ACPI_PROCFS_POWER
829846 acpi_battery_remove_fs(device);
830847 #endif
848+#ifdef CONFIG_ACPI_SYSFS_POWER
831849 sysfs_remove_battery(battery);
850+#endif
832851 mutex_destroy(&battery->lock);
833852 kfree(battery);
834853 return 0;
drivers/acpi/bus.c+2−5
@@ -29,7 +29,6 @@ · 28 unmodified lines
2929 #include <linux/list.h>
3030 #include <linux/sched.h>
3131 #include <linux/pm.h>
32−#include <linux/pm_legacy.h>
3332 #include <linux/device.h>
3433 #include <linux/proc_fs.h>
3534 #ifdef CONFIG_X86
@@ -764,16 +763,14 @@ static int __init acpi_init(void) · 728 unmodified lines
764763 result = acpi_bus_init();
765764
766765 if (!result) {
767−#ifdef CONFIG_PM_LEGACY
768− if (!PM_IS_ACTIVE())
769− pm_active = 1;
766+ if (!(pm_flags & PM_APM))
767+ pm_flags |= PM_ACPI;
770768 else {
771769 printk(KERN_INFO PREFIX
772770 "APM is already active, exiting\n");
773771 disable_acpi();
774772 result = -ENODEV;
775773 }
776−#endif
777774 } else
778775 disable_acpi();
779776
drivers/acpi/ec.c+13−1
@@ -892,6 +892,17 @@ static int acpi_ec_stop(struct acpi_device *device, int type) · 891 unmodified lines
892892 return 0;
893893 }
894894
895+int __init acpi_boot_ec_enable(void)
896+{
897+ if (!boot_ec || boot_ec->handlers_installed)
898+ return 0;
899+ if (!ec_install_handlers(boot_ec)) {
900+ first_ec = boot_ec;
901+ return 0;
902+ }
903+ return -EFAULT;
904+}
905+
895906 int __init acpi_ec_ecdt_probe(void)
896907 {
897908 int ret;
@@ -924,9 +935,10 @@ int __init acpi_ec_ecdt_probe(void) · 26 unmodified lines
924935 goto error;
925936 /* We really need to limit this workaround, the only ASUS,
926937 * which needs it, has fake EC._INI method, so use it as flag.
938+ * Keep boot_ec struct as it will be needed soon.
927939 */
928940 if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x)))
929− goto error;
941+ return -ENODEV;
930942 }
931943
932944 ret = ec_install_handlers(boot_ec);
drivers/acpi/events/evregion.c+4−4
@@ -344,7 +344,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, · 343 unmodified lines
344344 * setup will potentially execute control methods
345345 * (e.g., _REG method for this region)
346346 */
347− acpi_ex_relinquish_interpreter();
347+ acpi_ex_exit_interpreter();
348348
349349 status = region_setup(region_obj, ACPI_REGION_ACTIVATE,
350350 handler_desc->address_space.context,
@@ -352,7 +352,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, · 1 unmodified line
352352
353353 /* Re-enter the interpreter */
354354
355− acpi_ex_reacquire_interpreter();
355+ acpi_ex_enter_interpreter();
356356
357357 /* Check for failure of the Region Setup */
358358
@@ -405,7 +405,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, · 46 unmodified lines
405405 * exit the interpreter because the handler *might* block -- we don't
406406 * know what it will do, so we can't hold the lock on the intepreter.
407407 */
408− acpi_ex_relinquish_interpreter();
408+ acpi_ex_exit_interpreter();
409409 }
410410
411411 /* Call the handler */
@@ -426,7 +426,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, · 14 unmodified lines
426426 * We just returned from a non-default handler, we must re-enter the
427427 * interpreter
428428 */
429− acpi_ex_reacquire_interpreter();
429+ acpi_ex_enter_interpreter();
430430 }
431431
432432 return_ACPI_STATUS(status);
drivers/acpi/pci_irq.c+9−0
@@ -429,6 +429,15 @@ int acpi_pci_irq_enable(struct pci_dev *dev) · 428 unmodified lines
429429 &polarity, &link,
430430 acpi_pci_allocate_irq);
431431
432+ if (irq < 0) {
433+ /*
434+ * IDE legacy mode controller IRQs are magic. Why do compat
435+ * extensions always make such a nasty mess.
436+ */
437+ if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE &&
438+ (dev->class & 0x05) == 0)
439+ return 0;
440+ }
432441 /*
433442 * No IRQ known to the ACPI subsystem - maybe the BIOS /
434443 * driver reported one, then use it. Exit in any case.
drivers/acpi/processor_idle.c+4−0
@@ -76,7 +76,11 @@ static void (*pm_idle_save) (void) __read_mostly; · 75 unmodified lines
7676 #define PM_TIMER_TICKS_TO_US(p) (((p) * 1000)/(PM_TIMER_FREQUENCY/1000))
7777
7878 static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER;
79+#ifdef CONFIG_CPU_IDLE
7980 module_param(max_cstate, uint, 0000);
81+#else
82+module_param(max_cstate, uint, 0644);
83+#endif
8084 static unsigned int nocst __read_mostly;
8185 module_param(nocst, uint, 0000);
8286
drivers/acpi/sbs.c+22−1
@@ -40,7 +40,9 @@ · 39 unmodified lines
4040 #include <linux/jiffies.h>
4141 #include <linux/delay.h>
4242
43+#ifdef CONFIG_ACPI_SYSFS_POWER
4344 #include <linux/power_supply.h>
45+#endif
4446
4547 #include "sbshc.h"
4648
@@ -80,7 +82,9 @@ static const struct acpi_device_id sbs_device_ids[] = { · 33 unmodified lines
8082 MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
8183
8284 struct acpi_battery {
85+#ifdef CONFIG_ACPI_SYSFS_POWER
8386 struct power_supply bat;
87+#endif
8488 struct acpi_sbs *sbs;
8589 #ifdef CONFIG_ACPI_PROCFS_POWER
8690 struct proc_dir_entry *proc_entry;
@@ -113,7 +117,9 @@ struct acpi_battery { · 26 unmodified lines
113117 #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
114118
115119 struct acpi_sbs {
120+#ifdef CONFIG_ACPI_SYSFS_POWER
116121 struct power_supply charger;
122+#endif
117123 struct acpi_device *device;
118124 struct acpi_smb_hc *hc;
119125 struct mutex lock;
@@ -157,6 +163,7 @@ static inline int acpi_battery_scale(struct acpi_battery *battery) · 37 unmodified lines
157163 acpi_battery_ipscale(battery);
158164 }
159165
166+#ifdef CONFIG_ACPI_SYSFS_POWER
160167 static int sbs_get_ac_property(struct power_supply *psy,
161168 enum power_supply_property psp,
162169 union power_supply_propval *val)
@@ -294,6 +301,7 @@ static enum power_supply_property sbs_energy_battery_props[] = { · 131 unmodified lines
294301 POWER_SUPPLY_PROP_MODEL_NAME,
295302 POWER_SUPPLY_PROP_MANUFACTURER,
296303 };
304+#endif
297305
298306 /* --------------------------------------------------------------------------
299307 Smart Battery System Management
@@ -429,6 +437,7 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs) · 129 unmodified lines
429437 return result;
430438 }
431439
440+#ifdef CONFIG_ACPI_SYSFS_POWER
432441 static ssize_t acpi_battery_alarm_show(struct device *dev,
433442 struct device_attribute *attr,
434443 char *buf)
@@ -458,6 +467,7 @@ static struct device_attribute alarm_attr = { · 23 unmodified lines
458467 .show = acpi_battery_alarm_show,
459468 .store = acpi_battery_alarm_store,
460469 };
470+#endif
461471
462472 /* --------------------------------------------------------------------------
463473 FS Interface (/proc/acpi)
@@ -793,6 +803,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) · 329 unmodified lines
793803 &acpi_battery_state_fops, &acpi_battery_alarm_fops,
794804 battery);
795805 #endif
806+#ifdef CONFIG_ACPI_SYSFS_POWER
796807 battery->bat.name = battery->name;
797808 battery->bat.type = POWER_SUPPLY_TYPE_BATTERY;
798809 if (!acpi_battery_mode(battery)) {
@@ -813,6 +824,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) · 14 unmodified lines
813824 goto end;
814825 battery->have_sysfs_alarm = 1;
815826 end:
827+#endif
816828 printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n",
817829 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
818830 battery->name, sbs->battery->present ? "present" : "absent");
@@ -822,12 +834,13 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) · 3 unmodified lines
822834 static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
823835 {
824836 struct acpi_battery *battery = &sbs->battery[id];
825−
837+#ifdef CONFIG_ACPI_SYSFS_POWER
826838 if (battery->bat.dev) {
827839 if (battery->have_sysfs_alarm)
828840 device_remove_file(battery->bat.dev, &alarm_attr);
829841 power_supply_unregister(&battery->bat);
830842 }
843+#endif
831844 #ifdef CONFIG_ACPI_PROCFS_POWER
832845 if (battery->proc_entry)
833846 acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir);
@@ -848,12 +861,14 @@ static int acpi_charger_add(struct acpi_sbs *sbs) · 14 unmodified lines
848861 if (result)
849862 goto end;
850863 #endif
864+#ifdef CONFIG_ACPI_SYSFS_POWER
851865 sbs->charger.name = "sbs-charger";
852866 sbs->charger.type = POWER_SUPPLY_TYPE_MAINS;
853867 sbs->charger.properties = sbs_ac_props;
854868 sbs->charger.num_properties = ARRAY_SIZE(sbs_ac_props);
855869 sbs->charger.get_property = sbs_get_ac_property;
856870 power_supply_register(&sbs->device->dev, &sbs->charger);
871+#endif
857872 printk(KERN_INFO PREFIX "%s [%s]: AC Adapter [%s] (%s)\n",
858873 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
859874 ACPI_AC_DIR_NAME, sbs->charger_present ? "on-line" : "off-line");
@@ -863,8 +878,10 @@ static int acpi_charger_add(struct acpi_sbs *sbs) · 3 unmodified lines
863878
864879 static void acpi_charger_remove(struct acpi_sbs *sbs)
865880 {
881+#ifdef CONFIG_ACPI_SYSFS_POWER
866882 if (sbs->charger.dev)
867883 power_supply_unregister(&sbs->charger);
884+#endif
868885 #ifdef CONFIG_ACPI_PROCFS_POWER
869886 if (sbs->charger_entry)
870887 acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir);
@@ -885,7 +902,9 @@ void acpi_sbs_callback(void *context) · 14 unmodified lines
885902 ACPI_SBS_NOTIFY_STATUS,
886903 sbs->charger_present);
887904 #endif
905+#ifdef CONFIG_ACPI_SYSFS_POWER
888906 kobject_uevent(&sbs->charger.dev->kobj, KOBJ_CHANGE);
907+#endif
889908 }
890909 if (sbs->manager_present) {
891910 for (id = 0; id < MAX_SBS_BAT; ++id) {
@@ -902,7 +921,9 @@ void acpi_sbs_callback(void *context) · 10 unmodified lines
902921 ACPI_SBS_NOTIFY_STATUS,
903922 bat->present);
904923 #endif
924+#ifdef CONFIG_ACPI_SYSFS_POWER
905925 kobject_uevent(&bat->bat.dev->kobj, KOBJ_CHANGE);
926+#endif
906927 }
907928 }
908929 }
drivers/acpi/scan.c+6−0
@@ -1449,6 +1449,8 @@ static int acpi_bus_scan_fixed(struct acpi_device *root) · 1448 unmodified lines
14491449 return result;
14501450 }
14511451
1452+int __init acpi_boot_ec_enable(void);
1453+
14521454 static int __init acpi_scan_init(void)
14531455 {
14541456 int result;
@@ -1480,6 +1482,10 @@ static int __init acpi_scan_init(void) · 25 unmodified lines
14801482 * Enumerate devices in the ACPI namespace.
14811483 */
14821484 result = acpi_bus_scan_fixed(acpi_root);
1485+
1486+ /* EC region might be needed at bus_scan, so enable it now */
1487+ acpi_boot_ec_enable();
1488+
14831489 if (!result)
14841490 result = acpi_bus_scan(acpi_root, &ops);
14851491
drivers/pci/quirks.c+6−0
@@ -465,6 +465,12 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, quirk · 464 unmodified lines
465465 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_0, quirk_ich6_lpc_acpi );
466466 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_2, quirk_ich6_lpc_acpi );
467467 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_3, quirk_ich6_lpc_acpi );
468+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_1, quirk_ich6_lpc_acpi );
469+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_4, quirk_ich6_lpc_acpi );
470+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_2, quirk_ich6_lpc_acpi );
471+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_4, quirk_ich6_lpc_acpi );
472+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_7, quirk_ich6_lpc_acpi );
473+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_8, quirk_ich6_lpc_acpi );
468474
469475 /*
470476 * VIA ACPI: One IO region pointed to by longword at
drivers/pnp/pnpacpi/rsparser.c+10−4
@@ -76,6 +76,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, · 75 unmodified lines
7676 int i = 0;
7777 int irq;
7878 int p, t;
79+ static unsigned char warned;
7980
8081 if (!valid_IRQ(gsi))
8182 return;
@@ -83,9 +84,10 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, · 1 unmodified line
8384 while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) &&
8485 i < PNP_MAX_IRQ)
8586 i++;
86− if (i >= PNP_MAX_IRQ) {
87+ if (i >= PNP_MAX_IRQ && !warned) {
8788 printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ "
8889 "resources: %d \n", PNP_MAX_IRQ);
90+ warned = 1;
8991 return;
9092 }
9193 /*
@@ -169,6 +171,7 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, · 77 unmodified lines
169171 int bus_master, int transfer)
170172 {
171173 int i = 0;
174+ static unsigned char warned;
172175
173176 while (i < PNP_MAX_DMA &&
174177 !(res->dma_resource[i].flags & IORESOURCE_UNSET))
@@ -183,9 +186,10 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, · 8 unmodified lines
183186 }
184187 res->dma_resource[i].start = dma;
185188 res->dma_resource[i].end = dma;
186− } else {
189+ } else if (!warned) {
187190 printk(KERN_ERR "pnpacpi: exceeded the max number of DMA "
188191 "resources: %d \n", PNP_MAX_DMA);
192+ warned = 1;
189193 }
190194 }
191195
@@ -193,6 +197,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, · 1 unmodified line
193197 u64 io, u64 len, int io_decode)
194198 {
195199 int i = 0;
200+ static unsigned char warned;
196201
197202 while (!(res->port_resource[i].flags & IORESOURCE_UNSET) &&
198203 i < PNP_MAX_PORT)
@@ -207,7 +212,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, · 8 unmodified lines
207212 }
208213 res->port_resource[i].start = io;
209214 res->port_resource[i].end = io + len - 1;
210− } else {
215+ } else if (!warned) {
211216 printk(KERN_ERR "pnpacpi: exceeded the max number of IO "
212217 "resources: %d \n", PNP_MAX_PORT);
213218 }
@@ -218,6 +223,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, · 4 unmodified lines
218223 int write_protect)
219224 {
220225 int i = 0;
226+ static unsigned char warned;
221227
222228 while (!(res->mem_resource[i].flags & IORESOURCE_UNSET) &&
223229 (i < PNP_MAX_MEM))
@@ -233,7 +239,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, · 9 unmodified lines
233239
234240 res->mem_resource[i].start = mem;
235241 res->mem_resource[i].end = mem + len - 1;
236− } else {
242+ } else if (!warned) {
237243 printk(KERN_ERR "pnpacpi: exceeded the max number of mem "
238244 "resources: %d\n", PNP_MAX_MEM);
239245 }
include/linux/pci_ids.h+2−0
@@ -2322,6 +2322,8 @@ · 2321 unmodified lines
23222322 #define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914
23232323 #define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919
23242324 #define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930
2325+#define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916
2326+#define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918
23252327 #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
23262328 #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
23272329 #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
include/linux/pm.h+9−0
@@ -246,6 +246,15 @@ static inline int call_platform_enable_wakeup(struct device *dev, int is_on) · 245 unmodified lines
246246 device_set_wakeup_enable(dev,val); \
247247 } while(0)
248248
249+/*
250+ * Global Power Management flags
251+ * Used to keep APM and ACPI from both being active
252+ */
253+extern unsigned int pm_flags;
254+
255+#define PM_APM 1
256+#define PM_ACPI 2
257+
249258 #endif /* __KERNEL__ */
250259
251260 #endif /* _LINUX_PM_H */
include/linux/pm_legacy.h+0−6
@@ -4,10 +4,6 @@ · 3 unmodified lines
44
55 #ifdef CONFIG_PM_LEGACY
66
7−extern int pm_active;
8−
9−#define PM_IS_ACTIVE() (pm_active != 0)
10−
117 /*
128 * Register a device with power management
139 */
@@ -21,8 +17,6 @@ int __deprecated pm_send_all(pm_request_t rqst, void *data); · 7 unmodified lines
2117
2218 #else /* CONFIG_PM_LEGACY */
2319
24−#define PM_IS_ACTIVE() 0
25−
2620 static inline struct pm_dev *pm_register(pm_dev_t type,
2721 unsigned long id,
2822 pm_callback callback)
include/linux/pnp.h+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313 #include <linux/errno.h>
1414 #include <linux/mod_devicetable.h>
1515
16−#define PNP_MAX_PORT 24
16+#define PNP_MAX_PORT 40
1717 #define PNP_MAX_MEM 12
1818 #define PNP_MAX_IRQ 2
1919 #define PNP_MAX_DMA 2
kernel/power/main.c+3−0
@@ -28,6 +28,9 @@ BLOCKING_NOTIFIER_HEAD(pm_chain_head); · 27 unmodified lines
2828
2929 DEFINE_MUTEX(pm_mutex);
3030
31+unsigned int pm_flags;
32+EXPORT_SYMBOL(pm_flags);
33+
3134 #ifdef CONFIG_SUSPEND
3235
3336 /* This is just an arbitrary number */
kernel/power/pm.c+0−4
@@ -27,8 +27,6 @@ · 26 unmodified lines
2727 #include <linux/interrupt.h>
2828 #include <linux/mutex.h>
2929
30−int pm_active;
31−
3230 /*
3331 * Locking notes:
3432 * pm_devs_lock can be a semaphore providing pm ops are not called
@@ -204,6 +202,4 @@ int pm_send_all(pm_request_t rqst, void *data) · 169 unmodified lines
204202
205203 EXPORT_SYMBOL(pm_register);
206204 EXPORT_SYMBOL(pm_send_all);
207−EXPORT_SYMBOL(pm_active);
208−
209205

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t