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
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.
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);
}
#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;
}
/**
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);
}
/* 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);
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);
/* 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
#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*/