Unverified Commit 49e27cd3 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4219 Initial cleanups for vCPU hotplug

Merge Pull Request from: @ci-robot 
 
PR sync from: liwei <liwei728@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/4H7MREBN4GBW5HSE4U5GEIXWNQKPN45I/ 
This series aims to switch most architectures over to using generic
CPU devices rather than arch specific implementations.

James Morse (16):
  ACPI: scan: Use the acpi_device_is_present() helper in more places
  ACPI: scan: Rename acpi_scan_device_not_present() to be about
    enumeration
  arm64, irqchip/gic-v3, ACPI: Move MADT GICC enabled check into a
    helper
  arch_topology: Make register_cpu_capacity_sysctl() tolerant to late
    CPUs
  x86: intel_epb: Don't rely on link order
  ACPI: Move ACPI_HOTPLUG_CPU to be disabled on arm64 and riscv
  drivers: base: Use present CPUs in GENERIC_CPU_DEVICES
  drivers: base: Allow parts of GENERIC_CPU_DEVICES to be overridden
  drivers: base: Implement weak arch_unregister_cpu()
  drivers: base: Move cpu_dev_init() after node_dev_init()
  drivers: base: Print a warning instead of panic() when register_cpu()
    fails
  arm64: setup: Switch over to GENERIC_CPU_DEVICES using
    arch_register_cpu()
  x86/topology: Switch over to GENERIC_CPU_DEVICES
  LoongArch: Switch over to GENERIC_CPU_DEVICES
  LoongArch: Use the __weak version of arch_unregister_cpu()
  riscv: Switch over to GENERIC_CPU_DEVICES

Russell King (Oracle) (8):
  x86/topology: remove arch_*register_cpu() exports
  Loongarch: remove arch_*register_cpu() exports
  drivers: base: add arch_cpu_is_hotpluggable()
  arm64: convert to arch_cpu_is_hotpluggable()
  x86/topology: use weak version of arch_unregister_cpu()
  x86/topology: convert to use arch_cpu_is_hotpluggable()
  LoongArch: convert to use arch_cpu_is_hotpluggable()
  riscv: convert to use arch_cpu_is_hotpluggable()


-- 
2.25.1
 
https://gitee.com/openeuler/kernel/issues/I8XMTL 
 
Link:https://gitee.com/openeuler/kernel/pulls/4219

 

Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Reviewed-by: default avatarJason Zeng <jason.zeng@intel.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Reviewed-by: default avatarMingzheng Xing <xingmingzheng@iscas.ac.cn>
Reviewed-by: default avatarMao Bibo <maobibo@loongson.cn>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents 68f406e1 404a2018
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -133,6 +133,7 @@ config ARM64
	select GENERIC_ARCH_TOPOLOGY
	select GENERIC_ARCH_TOPOLOGY
	select GENERIC_CLOCKEVENTS_BROADCAST
	select GENERIC_CLOCKEVENTS_BROADCAST
	select GENERIC_CPU_AUTOPROBE
	select GENERIC_CPU_AUTOPROBE
	select GENERIC_CPU_DEVICES
	select GENERIC_CPU_VULNERABILITIES
	select GENERIC_CPU_VULNERABILITIES
	select GENERIC_EARLY_IOREMAP
	select GENERIC_EARLY_IOREMAP
	select GENERIC_IDLE_POLL_SETUP
	select GENERIC_IDLE_POLL_SETUP
+0 −1
Original line number Original line Diff line number Diff line
@@ -38,7 +38,6 @@ struct cpuinfo_32bit {
};
};


struct cpuinfo_arm64 {
struct cpuinfo_arm64 {
	struct cpu	cpu;
	struct kobject	kobj;
	struct kobject	kobj;
	u64		reg_ctr;
	u64		reg_ctr;
	u64		reg_cntfrq;
	u64		reg_cntfrq;
+2 −11
Original line number Original line Diff line number Diff line
@@ -451,19 +451,10 @@ static inline bool cpu_can_disable(unsigned int cpu)
	return false;
	return false;
}
}


static int __init topology_init(void)
bool arch_cpu_is_hotpluggable(int num)
{
{
	int i;
	return cpu_can_disable(num);

	for_each_possible_cpu(i) {
		struct cpu *cpu = &per_cpu(cpu_data.cpu, i);
		cpu->hotpluggable = cpu_can_disable(i);
		register_cpu(cpu, i);
	}

	return 0;
}
}
subsys_initcall(topology_init);


static void dump_kernel_offset(void)
static void dump_kernel_offset(void)
{
{
+1 −1
Original line number Original line Diff line number Diff line
@@ -521,7 +521,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
{
{
	u64 hwid = processor->arm_mpidr;
	u64 hwid = processor->arm_mpidr;


	if (!(processor->flags & ACPI_MADT_ENABLED)) {
	if (!acpi_gicc_is_usable(processor)) {
		pr_debug("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
		pr_debug("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
		return;
		return;
	}
	}
+2 −0
Original line number Original line Diff line number Diff line
@@ -5,6 +5,7 @@ config LOONGARCH
	select ACPI
	select ACPI
	select ACPI_GENERIC_GSI if ACPI
	select ACPI_GENERIC_GSI if ACPI
	select ACPI_MCFG if ACPI
	select ACPI_MCFG if ACPI
	select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU
	select ACPI_PPTT if ACPI
	select ACPI_PPTT if ACPI
	select ACPI_SYSTEM_POWER_STATES_SUPPORT	if ACPI
	select ACPI_SYSTEM_POWER_STATES_SUPPORT	if ACPI
	select ARCH_BINFMT_ELF_STATE
	select ARCH_BINFMT_ELF_STATE
@@ -71,6 +72,7 @@ config LOONGARCH
	select GENERIC_CLOCKEVENTS
	select GENERIC_CLOCKEVENTS
	select GENERIC_CMOS_UPDATE
	select GENERIC_CMOS_UPDATE
	select GENERIC_CPU_AUTOPROBE
	select GENERIC_CPU_AUTOPROBE
	select GENERIC_CPU_DEVICES
	select GENERIC_ENTRY
	select GENERIC_ENTRY
	select GENERIC_GETTIMEOFDAY
	select GENERIC_GETTIMEOFDAY
	select GENERIC_IOREMAP if !ARCH_IOREMAP
	select GENERIC_IOREMAP if !ARCH_IOREMAP
Loading