mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
Merge branches 'acpi-osl', 'acpi-pad', 'acpi-video' and 'acpi-assorted'
* acpi-osl: ACPI / PM: Fix incorrect wakeup IRQ setting during suspend-to-idle ACPI: Using correct irq when waiting for events ACPI: Use correct IRQ when uninstalling ACPI interrupt handler * acpi-pad: ACPI / PAD: power_saving_thread() is not freezable * acpi-video: ACPI / video: Add a quirk to force native backlight on Lenovo IdeaPad S405 * acpi-assorted: ACPI / Documentation: add copy_dsdt to ACPI format options ACPI / sysfs: correctly check failing memory allocation
This commit is contained in:
commit
66c4487724
7 changed files with 32 additions and 10 deletions
|
@ -167,7 +167,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||||
|
|
||||||
acpi= [HW,ACPI,X86,ARM64]
|
acpi= [HW,ACPI,X86,ARM64]
|
||||||
Advanced Configuration and Power Interface
|
Advanced Configuration and Power Interface
|
||||||
Format: { force | off | strict | noirq | rsdt }
|
Format: { force | off | strict | noirq | rsdt |
|
||||||
|
copy_dsdt }
|
||||||
force -- enable ACPI if default was off
|
force -- enable ACPI if default was off
|
||||||
off -- disable ACPI if default was on
|
off -- disable ACPI if default was on
|
||||||
noirq -- do not use ACPI for IRQ routing
|
noirq -- do not use ACPI for IRQ routing
|
||||||
|
|
|
@ -148,8 +148,6 @@ static int power_saving_thread(void *data)
|
||||||
while (!kthread_should_stop()) {
|
while (!kthread_should_stop()) {
|
||||||
unsigned long expire_time;
|
unsigned long expire_time;
|
||||||
|
|
||||||
try_to_freeze();
|
|
||||||
|
|
||||||
/* round robin to cpus */
|
/* round robin to cpus */
|
||||||
expire_time = last_jiffies + round_robin_time * HZ;
|
expire_time = last_jiffies + round_robin_time * HZ;
|
||||||
if (time_before(expire_time, jiffies)) {
|
if (time_before(expire_time, jiffies)) {
|
||||||
|
|
|
@ -79,6 +79,7 @@ static struct workqueue_struct *kacpid_wq;
|
||||||
static struct workqueue_struct *kacpi_notify_wq;
|
static struct workqueue_struct *kacpi_notify_wq;
|
||||||
static struct workqueue_struct *kacpi_hotplug_wq;
|
static struct workqueue_struct *kacpi_hotplug_wq;
|
||||||
static bool acpi_os_initialized;
|
static bool acpi_os_initialized;
|
||||||
|
unsigned int acpi_sci_irq = INVALID_ACPI_IRQ;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This list of permanent mappings is for memory that may be accessed from
|
* This list of permanent mappings is for memory that may be accessed from
|
||||||
|
@ -854,17 +855,19 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler,
|
||||||
acpi_irq_handler = NULL;
|
acpi_irq_handler = NULL;
|
||||||
return AE_NOT_ACQUIRED;
|
return AE_NOT_ACQUIRED;
|
||||||
}
|
}
|
||||||
|
acpi_sci_irq = irq;
|
||||||
|
|
||||||
return AE_OK;
|
return AE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
acpi_status acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
|
acpi_status acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler handler)
|
||||||
{
|
{
|
||||||
if (irq != acpi_gbl_FADT.sci_interrupt)
|
if (gsi != acpi_gbl_FADT.sci_interrupt || !acpi_sci_irq_valid())
|
||||||
return AE_BAD_PARAMETER;
|
return AE_BAD_PARAMETER;
|
||||||
|
|
||||||
free_irq(irq, acpi_irq);
|
free_irq(acpi_sci_irq, acpi_irq);
|
||||||
acpi_irq_handler = NULL;
|
acpi_irq_handler = NULL;
|
||||||
|
acpi_sci_irq = INVALID_ACPI_IRQ;
|
||||||
|
|
||||||
return AE_OK;
|
return AE_OK;
|
||||||
}
|
}
|
||||||
|
@ -1178,8 +1181,8 @@ void acpi_os_wait_events_complete(void)
|
||||||
* Make sure the GPE handler or the fixed event handler is not used
|
* Make sure the GPE handler or the fixed event handler is not used
|
||||||
* on another CPU after removal.
|
* on another CPU after removal.
|
||||||
*/
|
*/
|
||||||
if (acpi_irq_handler)
|
if (acpi_sci_irq_valid())
|
||||||
synchronize_hardirq(acpi_gbl_FADT.sci_interrupt);
|
synchronize_hardirq(acpi_sci_irq);
|
||||||
flush_workqueue(kacpid_wq);
|
flush_workqueue(kacpid_wq);
|
||||||
flush_workqueue(kacpi_notify_wq);
|
flush_workqueue(kacpi_notify_wq);
|
||||||
}
|
}
|
||||||
|
|
|
@ -632,14 +632,16 @@ static int acpi_freeze_prepare(void)
|
||||||
acpi_enable_wakeup_devices(ACPI_STATE_S0);
|
acpi_enable_wakeup_devices(ACPI_STATE_S0);
|
||||||
acpi_enable_all_wakeup_gpes();
|
acpi_enable_all_wakeup_gpes();
|
||||||
acpi_os_wait_events_complete();
|
acpi_os_wait_events_complete();
|
||||||
enable_irq_wake(acpi_gbl_FADT.sci_interrupt);
|
if (acpi_sci_irq_valid())
|
||||||
|
enable_irq_wake(acpi_sci_irq);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void acpi_freeze_restore(void)
|
static void acpi_freeze_restore(void)
|
||||||
{
|
{
|
||||||
acpi_disable_wakeup_devices(ACPI_STATE_S0);
|
acpi_disable_wakeup_devices(ACPI_STATE_S0);
|
||||||
disable_irq_wake(acpi_gbl_FADT.sci_interrupt);
|
if (acpi_sci_irq_valid())
|
||||||
|
disable_irq_wake(acpi_sci_irq);
|
||||||
acpi_enable_all_runtime_gpes();
|
acpi_enable_all_runtime_gpes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -878,6 +878,9 @@ int __init acpi_sysfs_init(void)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
hotplug_kobj = kobject_create_and_add("hotplug", acpi_kobj);
|
hotplug_kobj = kobject_create_and_add("hotplug", acpi_kobj);
|
||||||
|
if (!hotplug_kobj)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
result = sysfs_create_file(hotplug_kobj, &force_remove_attr.attr);
|
result = sysfs_create_file(hotplug_kobj, &force_remove_attr.attr);
|
||||||
if (result)
|
if (result)
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -243,6 +243,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Non win8 machines which need native backlight nevertheless */
|
/* Non win8 machines which need native backlight nevertheless */
|
||||||
|
{
|
||||||
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1201530 */
|
||||||
|
.callback = video_detect_force_native,
|
||||||
|
.ident = "Lenovo Ideapad S405",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "Lenovo IdeaPad S405"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */
|
||||||
.callback = video_detect_force_native,
|
.callback = video_detect_force_native,
|
||||||
|
|
|
@ -206,6 +206,12 @@ int acpi_ioapic_registered(acpi_handle handle, u32 gsi_base);
|
||||||
void acpi_irq_stats_init(void);
|
void acpi_irq_stats_init(void);
|
||||||
extern u32 acpi_irq_handled;
|
extern u32 acpi_irq_handled;
|
||||||
extern u32 acpi_irq_not_handled;
|
extern u32 acpi_irq_not_handled;
|
||||||
|
extern unsigned int acpi_sci_irq;
|
||||||
|
#define INVALID_ACPI_IRQ ((unsigned)-1)
|
||||||
|
static inline bool acpi_sci_irq_valid(void)
|
||||||
|
{
|
||||||
|
return acpi_sci_irq != INVALID_ACPI_IRQ;
|
||||||
|
}
|
||||||
|
|
||||||
extern int sbf_port;
|
extern int sbf_port;
|
||||||
extern unsigned long acpi_realmode_flags;
|
extern unsigned long acpi_realmode_flags;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue