bootmem_debug [KNL] Enable bootmem allocator debug messages.
+++ + bert_disable [ACPI]
+++ + Disable BERT OS support on buggy BIOSes.
+++ +
bttv.card= [HW,V4L] bttv (bt848 + bt878 based grabber cards)
bttv.radio= Most important insmod options are available as
kernel args too.
Address Range Mirroring feature even if your box
doesn't support it.
++++ efivar_ssdt= [EFI; X86] Name of an EFI variable that contains an SSDT
++++ that is to be dynamically loaded by Linux. If there are
++++ multiple variables with the same name but with different
++++ vendor GUIDs, all of them will be loaded. See
++++ Documentation/acpi/ssdt-overlays.txt for details.
++++
++++
eisa_irq_edge= [PARISC,HW]
See header of drivers/parisc/eisa.c.
bool
select THERMAL
+ +++config ACPI_PROCESSOR_CSTATE
+ +++ def_bool y
+ +++ depends on IA64 || X86
+ +++
config ACPI_PROCESSOR_IDLE
bool
select CPU_IDLE
config ACPI_PROCESSOR
tristate "Processor"
depends on X86 || IA64 || ARM64
- --- select ACPI_PROCESSOR_IDLE if X86 || IA64
+ +++ select ACPI_PROCESSOR_IDLE
select ACPI_CPU_FREQ_PSS if X86 || IA64
default y
help
config ACPI_NUMA
bool "NUMA support"
depends on NUMA
---- depends on (X86 || IA64)
---- default y if IA64_GENERIC || IA64_SGI_SN2
++++ depends on (X86 || IA64 || ARM64)
++++ default y if IA64_GENERIC || IA64_SGI_SN2 || ARM64
config ACPI_CUSTOM_DSDT_FILE
string "Custom DSDT Table file to include"
bool
default ACPI_CUSTOM_DSDT_FILE != ""
++++config ARCH_HAS_ACPI_TABLE_UPGRADE
++++ def_bool n
++++
config ACPI_TABLE_UPGRADE
bool "Allow upgrading ACPI tables via initrd"
---- depends on BLK_DEV_INITRD && X86
++++ depends on BLK_DEV_INITRD && ARCH_HAS_ACPI_TABLE_UPGRADE
default y
help
This option provides functionality to upgrade arbitrary ACPI tables
endif
++++config ACPI_CONFIGFS
++++ tristate "ACPI configfs support"
++++ select CONFIGFS_FS
++++ help
++++ Select this option to enable support for ACPI configuration from
++++ userspace. The configurable ACPI groups will be visible under
++++ /config/acpi, assuming configfs is mounted under /config.
++++
endif # ACPI
#include <linux/acpi.h>
#include <linux/slab.h>
#include <linux/regulator/machine.h>
++++#include <linux/workqueue.h>
++++#include <linux/reboot.h>
++++#include <linux/delay.h>
#ifdef CONFIG_X86
#include <asm/mpspec.h>
#endif
EXPORT_SYMBOL_GPL(acpi_bus_detach_private_data);
static void acpi_print_osc_error(acpi_handle handle,
---- struct acpi_osc_context *context, char *error)
++++ struct acpi_osc_context *context, char *error)
{
---- struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER};
int i;
---- if (ACPI_FAILURE(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer)))
---- printk(KERN_DEBUG "%s: %s\n", context->uuid_str, error);
---- else {
---- printk(KERN_DEBUG "%s (%s): %s\n",
---- (char *)buffer.pointer, context->uuid_str, error);
---- kfree(buffer.pointer);
---- }
---- printk(KERN_DEBUG "_OSC request data:");
++++ acpi_handle_debug(handle, "(%s): %s\n", context->uuid_str, error);
++++
++++ pr_debug("_OSC request data:");
for (i = 0; i < context->cap.length; i += sizeof(u32))
---- printk(" %x", *((u32 *)(context->cap.pointer + i)));
---- printk("\n");
++++ pr_debug(" %x", *((u32 *)(context->cap.pointer + i)));
++++
++++ pr_debug("\n");
}
acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
EXPORT_SYMBOL(acpi_run_osc);
bool osc_sb_apei_support_acked;
+ +++
+ +++/*
+ +++ * ACPI 6.0 Section 8.4.4.2 Idle State Coordination
+ +++ * OSPM supports platform coordinated low power idle(LPI) states
+ +++ */
+ +++bool osc_pc_lpi_support_confirmed;
+ +++EXPORT_SYMBOL_GPL(osc_pc_lpi_support_confirmed);
+ +++
static u8 sb_uuid_str[] = "0811B06E-4A27-44F9-8D60-3CBBC22E7B48";
static void acpi_bus_osc_support(void)
{
capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PPC_OST_SUPPORT;
capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
+ +++ capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
if (!ghes_disable)
capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_APEI_SUPPORT;
return;
if (ACPI_SUCCESS(acpi_run_osc(handle, &context))) {
u32 *capbuf_ret = context.ret.pointer;
- --- if (context.ret.length > OSC_SUPPORT_DWORD)
+ +++ if (context.ret.length > OSC_SUPPORT_DWORD) {
osc_sb_apei_support_acked =
capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_APEI_SUPPORT;
+ +++ osc_pc_lpi_support_confirmed =
+ +++ capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_PCLPI_SUPPORT;
+ +++ }
kfree(context.ret.pointer);
}
/* do we need to check other returned cap? Sounds no */
acpi_device_notify);
}
++++/* Handle events targeting \_SB device (at present only graceful shutdown) */
++++
++++#define ACPI_SB_NOTIFY_SHUTDOWN_REQUEST 0x81
++++#define ACPI_SB_INDICATE_INTERVAL 10000
++++
++++static void sb_notify_work(struct work_struct *dummy)
++++{
++++ acpi_handle sb_handle;
++++
++++ orderly_poweroff(true);
++++
++++ /*
++++ * After initiating graceful shutdown, the ACPI spec requires OSPM
++++ * to evaluate _OST method once every 10seconds to indicate that
++++ * the shutdown is in progress
++++ */
++++ acpi_get_handle(NULL, "\\_SB", &sb_handle);
++++ while (1) {
++++ pr_info("Graceful shutdown in progress.\n");
++++ acpi_evaluate_ost(sb_handle, ACPI_OST_EC_OSPM_SHUTDOWN,
++++ ACPI_OST_SC_OS_SHUTDOWN_IN_PROGRESS, NULL);
++++ msleep(ACPI_SB_INDICATE_INTERVAL);
++++ }
++++}
++++
++++static void acpi_sb_notify(acpi_handle handle, u32 event, void *data)
++++{
++++ static DECLARE_WORK(acpi_sb_work, sb_notify_work);
++++
++++ if (event == ACPI_SB_NOTIFY_SHUTDOWN_REQUEST) {
++++ if (!work_busy(&acpi_sb_work))
++++ schedule_work(&acpi_sb_work);
++++ } else
++++ pr_warn("event %x is not supported by \\_SB device\n", event);
++++}
++++
++++static int __init acpi_setup_sb_notify_handler(void)
++++{
++++ acpi_handle sb_handle;
++++
++++ if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &sb_handle)))
++++ return -ENXIO;
++++
++++ if (ACPI_FAILURE(acpi_install_notify_handler(sb_handle, ACPI_DEVICE_NOTIFY,
++++ acpi_sb_notify, NULL)))
++++ return -EINVAL;
++++
++++ return 0;
++++}
++++
/* --------------------------------------------------------------------------
Device Matching
-------------------------------------------------------------------------- */
/**
* acpi_subsystem_init - Finalize the early initialization of ACPI.
*
---- * Switch over the platform to the ACPI mode (if possible), initialize the
---- * handling of ACPI events, install the interrupt and global lock handlers.
++++ * Switch over the platform to the ACPI mode (if possible).
*
* Doing this too early is generally unsafe, but at the same time it needs to be
* done before all things that really depend on ACPI. The right spot appears to
}
}
++++static acpi_status acpi_bus_table_handler(u32 event, void *table, void *context)
++++{
++++ acpi_scan_table_handler(event, table, context);
++++
++++ return acpi_sysfs_table_handler(event, table, context);
++++}
++++
static int __init acpi_bus_init(void)
{
int result;
* _PDC control method may load dynamic SSDT tables,
* and we need to install the table handler before that.
*/
++++ status = acpi_install_table_handler(acpi_bus_table_handler, NULL);
++++
acpi_sysfs_init();
acpi_early_processor_set_pdc();
acpi_sleep_proc_init();
acpi_wakeup_device_init();
acpi_debugger_init();
++++ acpi_setup_sb_notify_handler();
return 0;
}
#define ACPI_CSTATE_SYSTEMIO 0
#define ACPI_CSTATE_FFH 1
#define ACPI_CSTATE_HALT 2
+ +++#define ACPI_CSTATE_INTEGER 3
#define ACPI_CX_DESC_LEN 32
char desc[ACPI_CX_DESC_LEN];
};
+ +++struct acpi_lpi_state {
+ +++ u32 min_residency;
+ +++ u32 wake_latency; /* worst case */
+ +++ u32 flags;
+ +++ u32 arch_flags;
+ +++ u32 res_cnt_freq;
+ +++ u32 enable_parent_state;
+ +++ u64 address;
+ +++ u8 index;
+ +++ u8 entry_method;
+ +++ char desc[ACPI_CX_DESC_LEN];
+ +++};
+ +++
struct acpi_processor_power {
int count;
- --- struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
+ +++ union {
+ +++ struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
+ +++ struct acpi_lpi_state lpi_states[ACPI_PROCESSOR_MAX_POWER];
+ +++ };
int timer_broadcast_on_state;
};
u8 bm_control:1;
u8 bm_check:1;
u8 has_cst:1;
+ +++ u8 has_lpi:1;
u8 power_setup_done:1;
u8 bm_rld_set:1;
u8 need_hotplug_init:1;
DECLARE_PER_CPU(struct acpi_processor *, processors);
extern struct acpi_processor_errata errata;
- ---#ifdef ARCH_HAS_POWER_INIT
+ +++#if defined(ARCH_HAS_POWER_INIT) && defined(CONFIG_ACPI_PROCESSOR_CSTATE)
void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
unsigned int cpu);
int acpi_processor_ffh_cstate_probe(unsigned int cpu,
/* in processor_core.c */
phys_cpuid_t acpi_get_phys_id(acpi_handle, int type, u32 acpi_id);
++++phys_cpuid_t acpi_map_madt_entry(u32 acpi_id);
int acpi_map_cpuid(phys_cpuid_t phys_id, u32 acpi_id);
int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id);
#ifdef CONFIG_ACPI_PROCESSOR_IDLE
int acpi_processor_power_init(struct acpi_processor *pr);
int acpi_processor_power_exit(struct acpi_processor *pr);
- ---int acpi_processor_cst_has_changed(struct acpi_processor *pr);
+ +++int acpi_processor_power_state_has_changed(struct acpi_processor *pr);
int acpi_processor_hotplug(struct acpi_processor *pr);
#else
static inline int acpi_processor_power_init(struct acpi_processor *pr)
return -ENODEV;
}
- ---static inline int acpi_processor_cst_has_changed(struct acpi_processor *pr)
+ +++static inline int acpi_processor_power_state_has_changed(struct acpi_processor *pr)
{
return -ENODEV;
}
int acpi_mps_check (void);
int acpi_numa_init (void);
----void early_acpi_table_init(void *data, size_t size);
int acpi_table_init (void);
int acpi_table_parse(char *id, acpi_tbl_table_handler handler);
int __init acpi_parse_entries(char *id, unsigned long table_size,
int acpi_parse_mcfg (struct acpi_table_header *header);
void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
----/* the following four functions are architecture-dependent */
++++/* the following numa functions are architecture-dependent */
void acpi_numa_slit_init (struct acpi_table_slit *slit);
++++
++++#if defined(CONFIG_X86) || defined(CONFIG_IA64)
void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
++++#else
++++static inline void
++++acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) { }
++++#endif
++++
void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa);
++++
++++#ifdef CONFIG_ARM64
++++void acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa);
++++#else
++++static inline void
++++acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) { }
++++#endif
++++
int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma);
----void acpi_numa_arch_fixup(void);
#ifndef PHYS_CPUID_INVALID
typedef u32 phys_cpuid_t;
#define OSC_SB_HOTPLUG_OST_SUPPORT 0x00000008
#define OSC_SB_APEI_SUPPORT 0x00000010
#define OSC_SB_CPC_SUPPORT 0x00000020
+ +++#define OSC_SB_CPCV2_SUPPORT 0x00000040
+ +++#define OSC_SB_PCLPI_SUPPORT 0x00000080
+ +++#define OSC_SB_OSLPI_SUPPORT 0x00000100
extern bool osc_sb_apei_support_acked;
+ +++extern bool osc_pc_lpi_support_confirmed;
/* PCI Host Bridge _OSC: Capabilities DWORD 2: Support Field */
#define OSC_PCI_EXT_CONFIG_SUPPORT 0x00000001
struct platform_device *acpi_create_platform_device(struct acpi_device *);
#define ACPI_PTR(_ptr) (_ptr)
++++static inline void acpi_device_set_enumerated(struct acpi_device *adev)
++++{
++++ adev->flags.visited = true;
++++}
++++
++++static inline void acpi_device_clear_enumerated(struct acpi_device *adev)
++++{
++++ adev->flags.visited = false;
++++}
++++
++++enum acpi_reconfig_event {
++++ ACPI_RECONFIG_DEVICE_ADD = 0,
++++ ACPI_RECONFIG_DEVICE_REMOVE,
++++};
++++
++++int acpi_reconfig_notifier_register(struct notifier_block *nb);
++++int acpi_reconfig_notifier_unregister(struct notifier_block *nb);
++++
#else /* !CONFIG_ACPI */
#define acpi_disabled 1
return NULL;
}
----static inline void early_acpi_table_init(void *data, size_t size) { }
static inline void acpi_early_init(void) { }
static inline void acpi_subsystem_init(void) { }
#define ACPI_PTR(_ptr) (NULL)
++++static inline void acpi_device_set_enumerated(struct acpi_device *adev)
++++{
++++}
++++
++++static inline void acpi_device_clear_enumerated(struct acpi_device *adev)
++++{
++++}
++++
++++static inline int acpi_reconfig_notifier_register(struct notifier_block *nb)
++++{
++++ return -EINVAL;
++++}
++++
++++static inline int acpi_reconfig_notifier_unregister(struct notifier_block *nb)
++++{
++++ return -EINVAL;
++++}
++++
#endif /* !CONFIG_ACPI */
#ifdef CONFIG_ACPI
#define acpi_probe_device_table(t) ({ int __r = 0; __r;})
#endif
++++#ifdef CONFIG_ACPI_TABLE_UPGRADE
++++void acpi_table_upgrade(void);
++++#else
++++static inline void acpi_table_upgrade(void) { }
++++#endif
++++
#endif /*_LINUX_ACPI_H*/