smp, irq_work: Continue smp_call_function*() and irq_work*() integration
[sfrench/cifs-2.6.git] / include / linux / acpi.h
index 0f24d701fbdc9f09a9a1e706ad168ae37ed50e49..d661cd0ee64db4a04f7cf74eed298c77bdbbde1b 100644 (file)
@@ -416,9 +416,30 @@ extern void acpi_osi_setup(char *str);
 extern bool acpi_osi_is_win8(void);
 
 #ifdef CONFIG_ACPI_NUMA
-int acpi_map_pxm_to_online_node(int pxm);
 int acpi_map_pxm_to_node(int pxm);
 int acpi_get_node(acpi_handle handle);
+
+/**
+ * acpi_map_pxm_to_online_node - Map proximity ID to online node
+ * @pxm: ACPI proximity ID
+ *
+ * This is similar to acpi_map_pxm_to_node(), but always returns an online
+ * node.  When the mapped node from a given proximity ID is offline, it
+ * looks up the node distance table and returns the nearest online node.
+ *
+ * ACPI device drivers, which are called after the NUMA initialization has
+ * completed in the kernel, can call this interface to obtain their device
+ * NUMA topology from ACPI tables.  Such drivers do not have to deal with
+ * offline nodes.  A node may be offline when a device proximity ID is
+ * unique, SRAT memory entry does not exist, or NUMA is disabled, ex.
+ * "numa=off" on x86.
+ */
+static inline int acpi_map_pxm_to_online_node(int pxm)
+{
+       int node = acpi_map_pxm_to_node(pxm);
+
+       return numa_map_to_online_node(node);
+}
 #else
 static inline int acpi_map_pxm_to_online_node(int pxm)
 {
@@ -488,6 +509,11 @@ void __init acpi_nvs_nosave_s3(void);
 void __init acpi_sleep_no_blacklist(void);
 #endif /* CONFIG_PM_SLEEP */
 
+int acpi_register_wakeup_handler(
+       int wake_irq, bool (*wakeup)(void *context), void *context);
+void acpi_unregister_wakeup_handler(
+       bool (*wakeup)(void *context), void *context);
+
 struct acpi_osc_context {
        char *uuid_str;                 /* UUID string */
        int rev;
@@ -530,8 +556,9 @@ extern bool osc_pc_lpi_support_confirmed;
 #define OSC_PCI_CLOCK_PM_SUPPORT               0x00000004
 #define OSC_PCI_SEGMENT_GROUPS_SUPPORT         0x00000008
 #define OSC_PCI_MSI_SUPPORT                    0x00000010
+#define OSC_PCI_EDR_SUPPORT                    0x00000080
 #define OSC_PCI_HPX_TYPE_3_SUPPORT             0x00000100
-#define OSC_PCI_SUPPORT_MASKS                  0x0000011f
+#define OSC_PCI_SUPPORT_MASKS                  0x0000019f
 
 /* PCI Host Bridge _OSC: Capabilities DWORD 3: Control Field */
 #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL      0x00000001
@@ -540,7 +567,8 @@ extern bool osc_pc_lpi_support_confirmed;
 #define OSC_PCI_EXPRESS_AER_CONTROL            0x00000008
 #define OSC_PCI_EXPRESS_CAPABILITY_CONTROL     0x00000010
 #define OSC_PCI_EXPRESS_LTR_CONTROL            0x00000020
-#define OSC_PCI_CONTROL_MASKS                  0x0000003f
+#define OSC_PCI_EXPRESS_DPC_CONTROL            0x00000080
+#define OSC_PCI_CONTROL_MASKS                  0x000000bf
 
 #define ACPI_GSB_ACCESS_ATTRIB_QUICK           0x00000002
 #define ACPI_GSB_ACCESS_ATTRIB_SEND_RCV         0x00000004