]> Git Repo - linux.git/commitdiff
Merge branches 'acpi-numa', 'acpi-glue', 'acpi-config' and 'acpi-pmic'
authorRafael J. Wysocki <[email protected]>
Mon, 30 Aug 2021 17:30:37 +0000 (19:30 +0200)
committerRafael J. Wysocki <[email protected]>
Mon, 30 Aug 2021 17:30:37 +0000 (19:30 +0200)
* acpi-numa:
  ACPI: Add LoongArch support for ACPI_PROCESSOR/ACPI_NUMA

* acpi-glue:
  driver core: Split device_platform_notify()
  software nodes: Split software_node_notify()
  ACPI: glue: Eliminate acpi_platform_notify()
  ACPI: bus: Rename functions to avoid name collision
  ACPI: glue: Change return type of two functions to void
  ACPI: glue: Rearrange acpi_device_notify()

* acpi-config:
  ACPI: configfs: Make get_header() to return error pointer
  ACPI: configfs: Use sysfs_emit() in "show" functions

* acpi-pmic:
  ACPI / PMIC: XPower: optimize MIPI PMIQ sequence I2C-bus accesses
  ACPI / PMIC: XPower: optimize I2C-bus accesses

1  2  3  4  5 
drivers/acpi/Kconfig
drivers/base/core.c
include/linux/acpi.h

diff --combined drivers/acpi/Kconfig
index 8f9940f40baa89b8d88d1b875a00db4d0cb388b2,9efd27e8af21c53c33660d5639464bcebc6935e6,9d872ea477a6c143b82bc34b0029047eaccf8f62,9d872ea477a6c143b82bc34b0029047eaccf8f62,9d872ea477a6c143b82bc34b0029047eaccf8f62..1da360c51d6625f107ebfa4bc1254c7848e809c7
@@@@@@ -280,9 -280,9 -280,9 -280,9 -280,9 +280,9 @@@@@@ config ACPI_CPPC_LI
     
     config ACPI_PROCESSOR
        tristate "Processor"
- ---   depends on X86 || IA64 || ARM64
+ +++   depends on X86 || IA64 || ARM64 || LOONGARCH
        select ACPI_PROCESSOR_IDLE
- ---   select ACPI_CPU_FREQ_PSS if X86 || IA64
+ +++   select ACPI_CPU_FREQ_PSS if X86 || IA64 || LOONGARCH
        default y
        help
          This driver adds support for the ACPI Processor package. It is required
@@@@@@ -370,7 -370,7 -370,7 -370,7 -370,7 +370,7 @@@@@@ config ACPI_TABLE_UPGRAD
     config ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD
        bool "Override ACPI tables from built-in initrd"
        depends on ACPI_TABLE_UPGRADE
 ----   depends on INITRAMFS_SOURCE!="" && INITRAMFS_COMPRESSION=""
 ++++   depends on INITRAMFS_SOURCE!="" && INITRAMFS_COMPRESSION_NONE
        help
          This option provides functionality to override arbitrary ACPI tables
          from built-in uncompressed initrd.
diff --combined drivers/base/core.c
index 6c0ef9d55a343a463b4d8596e550c036db56593e,cadcade658253c3ca050c2906537f0ad714ab0ea,70ef0ed710b8904d726d8b1c908b1738f2e33edb,cadcade658253c3ca050c2906537f0ad714ab0ea,cadcade658253c3ca050c2906537f0ad714ab0ea..3a72241b87c6a669b4ff565b0bee4535f6923241
@@@@@@ -574,10 -574,8 -574,8 -574,8 -574,8 +574,10 @@@@@@ static void devlink_remove_symlinks(str
                return;
        }
     
 ----   snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup));
 ----   sysfs_remove_link(&con->kobj, buf);
 ++++   if (device_is_registered(con)) {
 ++++           snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup));
 ++++           sysfs_remove_link(&con->kobj, buf);
 ++++   }
        snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
        sysfs_remove_link(&sup->kobj, buf);
        kfree(buf);
@@@@@@ -2002,24 -2000,24 -2000,24 -2000,24 -2000,24 +2002,24 @@@@@@ static inline int device_is_not_partiti
     }
     #endif
     
-- --static int
-- --device_platform_notify(struct device *dev, enum kobject_action action)
++ ++static void device_platform_notify(struct device *dev)
     {
-- --   int ret;
 - --
 - --   ret = acpi_platform_notify(dev, action);
 - --   if (ret)
 - --           return ret;
++ ++   acpi_device_notify(dev);
     
-       ret = acpi_platform_notify(dev, action);
 - --   ret = software_node_notify(dev, action);
-- --   if (ret)
-- --           return ret;
++ ++   software_node_notify(dev);
     
-       ret = software_node_notify(dev, action);
-       if (ret)
-               return ret;
-    
-- --   if (platform_notify && action == KOBJ_ADD)
++ ++   if (platform_notify)
                platform_notify(dev);
-- --   else if (platform_notify_remove && action == KOBJ_REMOVE)
++ ++}
++ ++
++ ++static void device_platform_notify_remove(struct device *dev)
++ ++{
++ ++   acpi_device_notify_remove(dev);
++ ++
++ ++   software_node_notify_remove(dev);
++ ++
++ ++   if (platform_notify_remove)
                platform_notify_remove(dev);
-- --   return 0;
     }
     
     /**
@@@@@@ -2837,7 -2835,6 -2835,6 -2835,6 -2835,6 +2837,7 @@@@@@ void device_initialize(struct device *d
        device_pm_init(dev);
        set_dev_node(dev, -1);
     #ifdef CONFIG_GENERIC_MSI_IRQ
 ++++   raw_spin_lock_init(&dev->msi_lock);
        INIT_LIST_HEAD(&dev->msi_list);
     #endif
        INIT_LIST_HEAD(&dev->links.consumers);
@@@@@@ -3292,9 -3289,9 -3289,7 -3289,9 -3289,9 +3292,7 @@@@@@ int device_add(struct device *dev
        }
     
        /* notify platform of device entry */
-- --   error = device_platform_notify(dev, KOBJ_ADD);
-- --   if (error)
-- --           goto platform_error;
++ ++   device_platform_notify(dev);
     
        error = device_create_file(dev, &dev_attr_uevent);
        if (error)
      SymlinkError:
        device_remove_file(dev, &dev_attr_uevent);
      attrError:
-- --   device_platform_notify(dev, KOBJ_REMOVE);
-- --platform_error:
++ ++   device_platform_notify_remove(dev);
        kobject_uevent(&dev->kobj, KOBJ_REMOVE);
        glue_dir = get_glue_dir(dev);
        kobject_del(&dev->kobj);
@@@@@@ -3543,7 -3540,7 -3537,7 -3540,7 -3540,7 +3540,7 @@@@@@ void device_del(struct device *dev
        bus_remove_device(dev);
        device_pm_remove(dev);
        driver_deferred_probe_del(dev);
-- --   device_platform_notify(dev, KOBJ_REMOVE);
++ ++   device_platform_notify_remove(dev);
        device_remove_properties(dev);
        device_links_purge(dev);
     
diff --combined include/linux/acpi.h
index 72e4f7fd268cbed14a01c69d19eb7f67d74d72ba,3e4805619fe03d240f75ea97ed51be86fc9d654b,fdbf6d7d928abe3a5765a733e560f086b2045f8e,72e4f7fd268cbed14a01c69d19eb7f67d74d72ba,72e4f7fd268cbed14a01c69d19eb7f67d74d72ba..974d497a897dcd2a8572e8aadc59966e44cc2346
@@@@@@ -249,7 -249,7 -249,7 -249,7 -249,7 +249,7 @@@@@@ void acpi_table_print_madt_entry (struc
     /* the following numa functions are architecture-dependent */
     void acpi_numa_slit_init (struct acpi_table_slit *slit);
     
- ---#if defined(CONFIG_X86) || defined(CONFIG_IA64)
+ +++#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_LOONGARCH)
     void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
     #else
     static inline void
@@@@@@ -1380,13 -1380,13 -1380,11 -1380,13 -1380,13 +1380,11 @@@@@@ static inline int find_acpi_cpu_cache_t
     #endif
     
     #ifdef CONFIG_ACPI
-- --extern int acpi_platform_notify(struct device *dev, enum kobject_action action);
++ ++extern void acpi_device_notify(struct device *dev);
++ ++extern void acpi_device_notify_remove(struct device *dev);
     #else
-- --static inline int
-- --acpi_platform_notify(struct device *dev, enum kobject_action action)
-- --{
-- --   return 0;
-- --}
++ ++static inline void acpi_device_notify(struct device *dev) { }
++ ++static inline void acpi_device_notify_remove(struct device *dev) { }
     #endif
     
     #endif     /*_LINUX_ACPI_H*/
This page took 0.066455 seconds and 4 git commands to generate.