]> Git Repo - linux.git/commitdiff
Merge branches 'acpi-prm', 'acpi-sysfs' and 'acpi-x86'
authorRafael J. Wysocki <[email protected]>
Tue, 29 Jun 2021 13:48:08 +0000 (15:48 +0200)
committerRafael J. Wysocki <[email protected]>
Tue, 29 Jun 2021 13:48:08 +0000 (15:48 +0200)
* acpi-prm:
  ACPI: PRM: make symbol 'prm_module_list' static
  ACPI: Add \_SB._OSC bit for PRM
  ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype

* acpi-sysfs:
  ACPI: sysfs: Remove tailing return statement in void function
  ACPI: sysfs: Use __ATTR_RO() and __ATTR_RW() macros
  ACPI: sysfs: Sort headers alphabetically
  ACPI: sysfs: Refactor param_get_trace_state() to drop dead code
  ACPI: sysfs: Unify pattern of memory allocations
  ACPI: sysfs: Allow bitmap list to be supplied to acpi_mask_gpe
  ACPI: sysfs: Make sparse happy about address space in use
  ACPI: sysfs: fix doc warnings in device_sysfs.c
  ACPI: sysfs: Drop four redundant return statements
  ACPI: sysfs: Fix a buffer overrun problem with description_show()

* acpi-x86:
  x86/acpi: Switch to pr_xxx log functions

1  2  3  4 
drivers/acpi/Makefile
drivers/acpi/bus.c
include/linux/acpi.h

diff --combined drivers/acpi/Makefile
index 9aa82d527272069578cb92b9b470dacd81c6210f,efb0d1f64019b64a9f702f75af77e6531a0c6064,700b41adf2db6dd82f272b5a0983d89a9ff7b00e,700b41adf2db6dd82f272b5a0983d89a9ff7b00e..ceb1aed4b1fc9eff7bd8bbb78ec19196f31712c5
@@@@@ -8,11 -8,6 -8,6 -8,6 +8,11 @@@@@ ccflags-$(CONFIG_ACPI_DEBUG)     += -DACPI_
    #
    # ACPI Boot-Time Table Parsing
    #
 +++ifeq ($(CONFIG_ACPI_CUSTOM_DSDT),y)
 +++tables.o: $(src)/../../include/$(subst $\",,$(CONFIG_ACPI_CUSTOM_DSDT_FILE)) ;
 +++
 +++endif
 +++
    obj-$(CONFIG_ACPI)          += tables.o
    obj-$(CONFIG_X86)           += blacklist.o
    
@@@@@ -66,6 -61,7 -61,6 -61,6 +66,7 @@@@@ acpi-$(CONFIG_ACPI_FPDT)      += acpi_fpdt.
    acpi-$(CONFIG_ACPI_LPIT)    += acpi_lpit.o
    acpi-$(CONFIG_ACPI_GENERIC_GSI) += irq.o
    acpi-$(CONFIG_ACPI_WATCHDOG)        += acpi_watchdog.o
+ ++acpi-$(CONFIG_ACPI_PRMT)    += prmt.o
    
    # Address translation
    acpi-$(CONFIG_ACPI_ADXL)    += acpi_adxl.o
diff --combined drivers/acpi/bus.c
index 278418ea3a19ec23618ca79d93352f1527915815,e8119a9eca28f8fc6fa19f808a51d2b0854f3ca8,be7da23fad76f4a17f69ad12a039015b38fc92e3,be7da23fad76f4a17f69ad12a039015b38fc92e3..8a7860e4af66e1b2646cfe3c92c2c44998aa9c9d
    #include <linux/pci.h>
    #include <acpi/apei.h>
    #include <linux/suspend.h>
+ ++#include <linux/prmt.h>
    
    #include "internal.h"
    
@@@@@ -262,6 -263,8 -262,8 -262,8 +263,6 @@@@@ out_success
    
    out_kfree:
        kfree(output.pointer);
 ---    if (status != AE_OK)
 ---            context->ret.pointer = NULL;
        return status;
    }
    EXPORT_SYMBOL(acpi_run_osc);
@@@@@ -302,6 -305,7 -304,6 -304,6 +303,7 @@@@@ static void acpi_bus_osc_negotiate_plat
    
        capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
        capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
+ ++    capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT;
    
    #ifdef CONFIG_ARM64
        capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT;
        if (ACPI_FAILURE(acpi_run_osc(handle, &context)))
                return;
    
 ---    capbuf_ret = context.ret.pointer;
 ---    if (context.ret.length <= OSC_SUPPORT_DWORD) {
 ---            kfree(context.ret.pointer);
 ---            return;
 ---    }
 +++    kfree(context.ret.pointer);
    
 ---    /*
 ---     * Now run _OSC again with query flag clear and with the caps
 ---     * supported by both the OS and the platform.
 ---     */
 +++    /* Now run _OSC again with query flag clear */
        capbuf[OSC_QUERY_DWORD] = 0;
 ---    capbuf[OSC_SUPPORT_DWORD] = capbuf_ret[OSC_SUPPORT_DWORD];
 ---    kfree(context.ret.pointer);
    
        if (ACPI_FAILURE(acpi_run_osc(handle, &context)))
                return;
    
        capbuf_ret = context.ret.pointer;
 ---    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;
 ---            osc_sb_native_usb4_support_confirmed =
 ---                    capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_NATIVE_USB4_SUPPORT;
 ---    }
 +++    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;
 +++    osc_sb_native_usb4_support_confirmed =
 +++            capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_NATIVE_USB4_SUPPORT;
    
        kfree(context.ret.pointer);
    }
@@@@@ -1193,8 -1208,7 -1206,7 -1206,7 +1195,8 @@@@@ void __init acpi_subsystem_init(void
    
    static acpi_status acpi_bus_table_handler(u32 event, void *table, void *context)
    {
 ---    acpi_scan_table_handler(event, table, context);
 +++    if (event == ACPI_TABLE_EVENT_LOAD)
 +++            acpi_scan_table_notify();
    
        return acpi_sysfs_table_handler(event, table, context);
    }
@@@@@ -1318,6 -1332,7 -1330,6 -1330,6 +1320,7 @@@@@ static int __init acpi_init(void
                acpi_kobj = NULL;
        }
    
+ ++    init_prmt();
        result = acpi_bus_init();
        if (result) {
                disable_acpi();
diff --combined include/linux/acpi.h
index 0a6d2845fcaf538dfa640dc92a927d925eb60d6f,a618ba698a5cd7076c7b3d22c93c3dfaf49c5bc5,c60745f657e9c9fc10a5276bb90d466652fc9f9f,c60745f657e9c9fc10a5276bb90d466652fc9f9f..98e0f207e115d66e00624cae94d32647e4c75c20
@@@@@ -132,6 -132,7 -132,6 -132,6 +132,7 @@@@@ enum acpi_address_range_id 
    union acpi_subtable_headers {
        struct acpi_subtable_header common;
        struct acpi_hmat_structure hmat;
+ ++    struct acpi_prmt_module_header prmt;
    };
    
    typedef int (*acpi_tbl_table_handler)(struct acpi_table_header *table);
@@@@@ -550,6 -551,7 -550,6 -550,6 +551,7 @@@@@ acpi_status acpi_run_osc(acpi_handle ha
    #define OSC_SB_OSLPI_SUPPORT                        0x00000100
    #define OSC_SB_CPC_DIVERSE_HIGH_SUPPORT             0x00001000
    #define OSC_SB_GENERIC_INITIATOR_SUPPORT    0x00002000
+ ++#define OSC_SB_PRM_SUPPORT                  0x00020000
    #define OSC_SB_NATIVE_USB4_SUPPORT          0x00040000
    
    extern bool osc_sb_apei_support_acked;
@@@@@ -666,6 -668,7 -666,7 -666,7 +668,6 @@@@@ extern bool acpi_driver_match_device(st
                                     const struct device_driver *drv);
    int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
    int acpi_device_modalias(struct device *, char *, int);
 ---void acpi_walk_dep_device_list(acpi_handle handle);
    
    struct platform_device *acpi_create_platform_device(struct acpi_device *,
                                                    struct property_entry *);
This page took 0.083066 seconds and 4 git commands to generate.