Skip to contentSkip to conversation

irqchip: riscv: Using CPUHP_AP_ONLINE_DYN

PATCH In review [email protected] 2 participants 6 messages Mar 1, 2021 – Mar 17, 2021

Subsystems (9)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/4 irqchip: riscv: Using CPUHP_AP_ONLINE_DYN

From: Guo Ren <[email protected]>

Remove RISC-V irqchip custom definitions in hotplug.h:
- CPUHP_AP_IRQ_RISCV_STARTING
- CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING

For coding convention.

---
 drivers/irqchip/irq-riscv-intc.c  | 2 +-
 drivers/irqchip/irq-sifive-plic.c | 2 +-
 include/linux/cpuhotplug.h        | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)
drivers/irqchip/irq-riscv-intc.c +1 -1
index 8017f6d..2c37f3a 100644
@@ -125,7 +125,7 @@ static int __init riscv_intc_init(struct device_node *node,
 		return rc;
 	}
 
-	cpuhp_setup_state(CPUHP_AP_IRQ_RISCV_STARTING,
+	cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
 			  "irqchip/riscv/intc:starting",
 			  riscv_intc_cpu_starting,
 			  riscv_intc_cpu_dying);
drivers/irqchip/irq-sifive-plic.c +1 -1
index 6f432d2..f499f1b 100644
@@ -375,7 +375,7 @@ static int __init plic_init(struct device_node *node,
 	 */
 	handler = this_cpu_ptr(&plic_handlers);
 	if (handler->present && !plic_cpuhp_setup_done) {
-		cpuhp_setup_state(CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING,
+		cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
 				  "irqchip/sifive/plic:starting",
 				  plic_starting_cpu, plic_dying_cpu);
 		plic_cpuhp_setup_done = true;
include/linux/cpuhotplug.h +0 -2
index f14adb8..14f49fd 100644
@@ -103,8 +103,6 @@ enum cpuhp_state {
 	CPUHP_AP_IRQ_ARMADA_XP_STARTING,
 	CPUHP_AP_IRQ_BCM2836_STARTING,
 	CPUHP_AP_IRQ_MIPS_GIC_STARTING,
-	CPUHP_AP_IRQ_RISCV_STARTING,
-	CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING,
 	CPUHP_AP_ARM_MVEBU_COHERENCY,
 	CPUHP_AP_MICROCODE_LOADER,
 	CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING,
Signature · 7 lines
2.7.4


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
author maintainer
#1 lore raw

PATCH 2/4 clocksource: riscv: Using CPUHP_AP_ONLINE_DYN

From: Guo Ren <[email protected]>

Remove RISC-V clocksource custom definitions in hotplug.h:
- CPUHP_AP_RISCV_TIMER_STARTING

For coding convention.

---
 drivers/clocksource/timer-riscv.c | 4 ++--
 include/linux/cpuhotplug.h        | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/clocksource/timer-riscv.c +2 -2
index c51c5ed..43aee27 100644
@@ -150,10 +150,10 @@ static int __init riscv_timer_init_dt(struct device_node *n)
 		return error;
 	}
 
-	error = cpuhp_setup_state(CPUHP_AP_RISCV_TIMER_STARTING,
+	error = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
 			 "clockevents/riscv/timer:starting",
 			 riscv_timer_starting_cpu, riscv_timer_dying_cpu);
-	if (error)
+	if (error < 0)
 		pr_err("cpu hp setup state failed for RISCV timer [%d]\n",
 		       error);
 	return error;
include/linux/cpuhotplug.h +0 -1
index 14f49fd..f60538b 100644
@@ -130,7 +130,6 @@ enum cpuhp_state {
 	CPUHP_AP_MARCO_TIMER_STARTING,
 	CPUHP_AP_MIPS_GIC_TIMER_STARTING,
 	CPUHP_AP_ARC_TIMER_STARTING,
-	CPUHP_AP_RISCV_TIMER_STARTING,
 	CPUHP_AP_CLINT_TIMER_STARTING,
 	CPUHP_AP_CSKY_TIMER_STARTING,
 	CPUHP_AP_HYPERV_TIMER_STARTING,
Signature · 7 lines
2.7.4


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Acked-by on v1 2/4
#2 lore raw

Re: [PATCH 2/4] clocksource: riscv: Using CPUHP_AP_ONLINE_DYN

Quoted 44 lines · On Mon, 01 Mar 2021 06:28:20 PST (-0800), [email protected] wrote:

From: Guo Ren <[email protected]>

Remove RISC-V clocksource custom definitions in hotplug.h:
- CPUHP_AP_RISCV_TIMER_STARTING

For coding convention.

---
 drivers/clocksource/timer-riscv.c | 4 ++--
 include/linux/cpuhotplug.h        | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/clocksource/timer-riscv.c +2 -2
index c51c5ed..43aee27 100644
@@ -150,10 +150,10 @@ static int __init riscv_timer_init_dt(struct device_node *n)
 		return error;
 	}
 
-	error = cpuhp_setup_state(CPUHP_AP_RISCV_TIMER_STARTING,
+	error = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
 			 "clockevents/riscv/timer:starting",
 			 riscv_timer_starting_cpu, riscv_timer_dying_cpu);
-	if (error)
+	if (error < 0)
 		pr_err("cpu hp setup state failed for RISCV timer [%d]\n",
 		       error);
 	return error;
include/linux/cpuhotplug.h +0 -0
index 14f49fd..f60538b 100644

include/linux/cpuhotplug.h enum cpuhp_state { · line 135

Quoted 7 lines
include/linux/cpuhotplug.h +0 -1
@@ -130,7 +130,6 @@ enum cpuhp_state {
 	CPUHP_AP_MARCO_TIMER_STARTING,
 	CPUHP_AP_MIPS_GIC_TIMER_STARTING,
 	CPUHP_AP_ARC_TIMER_STARTING,
-	CPUHP_AP_RISCV_TIMER_STARTING,
 	CPUHP_AP_CLINT_TIMER_STARTING,
 	CPUHP_AP_CSKY_TIMER_STARTING,
 	CPUHP_AP_HYPERV_TIMER_STARTING,

Just like the previous one. Presumably CLINT is ours as well?

Thanks!

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

author maintainer
#3 lore raw

PATCH 3/4 clocksource: csky: Using CPUHP_AP_ONLINE_DYN

In reply to [email protected]

From: Guo Ren <[email protected]>

Remove C-SKY clocksource custom definitions in hotplug.h:
- CPUHP_AP_CSKY_TIMER_STARTING

For coding convention.

---
 drivers/clocksource/timer-mp-csky.c | 4 ++--
 include/linux/cpuhotplug.h          | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/clocksource/timer-mp-csky.c +2 -2
index 183a995..fc17d77 100644
@@ -151,11 +151,11 @@ static int __init csky_mptimer_init(struct device_node *np)
 	clocksource_register_hz(&csky_clocksource, timer_of_rate(to));
 	sched_clock_register(sched_clock_read, 32, timer_of_rate(to));
 
-	ret = cpuhp_setup_state(CPUHP_AP_CSKY_TIMER_STARTING,
+	ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
 				"clockevents/csky/timer:starting",
 				csky_mptimer_starting_cpu,
 				csky_mptimer_dying_cpu);
-	if (ret)
+	if (ret < 0)
 		return -EINVAL;
 
 	return 0;
include/linux/cpuhotplug.h +0 -1
index f60538b..7f25b44 100644
@@ -131,7 +131,6 @@ enum cpuhp_state {
 	CPUHP_AP_MIPS_GIC_TIMER_STARTING,
 	CPUHP_AP_ARC_TIMER_STARTING,
 	CPUHP_AP_CLINT_TIMER_STARTING,
-	CPUHP_AP_CSKY_TIMER_STARTING,
 	CPUHP_AP_HYPERV_TIMER_STARTING,
 	CPUHP_AP_KVM_STARTING,
 	CPUHP_AP_KVM_ARM_VGIC_INIT_STARTING,
Signature · 7 lines
2.7.4


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
author maintainer
#4 lore raw

PATCH 4/4 perf: csky: Using CPUHP_AP_ONLINE_DYN

In reply to [email protected]

From: Guo Ren <[email protected]>

Remove C-SKY perf custom definitions in hotplug.h:
- CPUHP_AP_PERF_CSKY_ONLINE

For coding convention.

---
 arch/csky/kernel/perf_event.c | 4 ++--
 include/linux/cpuhotplug.h    | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
arch/csky/kernel/perf_event.c +2 -2
index e5f1842..ccc27c3 100644
@@ -1319,10 +1319,10 @@ int csky_pmu_device_probe(struct platform_device *pdev,
 		pr_notice("[perf] PMU request irq fail!\n");
 	}
 
-	ret = cpuhp_setup_state(CPUHP_AP_PERF_CSKY_ONLINE, "AP_PERF_ONLINE",
+	ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "arch/csky/perf_event:starting",
 				csky_pmu_starting_cpu,
 				csky_pmu_dying_cpu);
-	if (ret) {
+	if (ret < 0) {
 		csky_pmu_free_irq();
 		free_percpu(csky_pmu.hw_events);
 		return ret;
include/linux/cpuhotplug.h +0 -1
index 7f25b44..3a76019 100644
@@ -182,7 +182,6 @@ enum cpuhp_state {
 	CPUHP_AP_PERF_POWERPC_TRACE_IMC_ONLINE,
 	CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE,
 	CPUHP_AP_PERF_POWERPC_HV_GPCI_ONLINE,
-	CPUHP_AP_PERF_CSKY_ONLINE,
 	CPUHP_AP_WATCHDOG_ONLINE,
 	CPUHP_AP_WORKQUEUE_ONLINE,
 	CPUHP_AP_RCUTREE_ONLINE,
Signature · 7 lines
2.7.4


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Acked-by on v1 1/4
#5 lore raw
In reply to [email protected]
Quoted 56 lines · On Mon, 01 Mar 2021 06:28:19 PST (-0800), [email protected] wrote:

From: Guo Ren <[email protected]>

Remove RISC-V irqchip custom definitions in hotplug.h:
- CPUHP_AP_IRQ_RISCV_STARTING
- CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING

For coding convention.

---
 drivers/irqchip/irq-riscv-intc.c  | 2 +-
 drivers/irqchip/irq-sifive-plic.c | 2 +-
 include/linux/cpuhotplug.h        | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)
drivers/irqchip/irq-riscv-intc.c +1 -1
index 8017f6d..2c37f3a 100644
@@ -125,7 +125,7 @@ static int __init riscv_intc_init(struct device_node *node,
 		return rc;
 	}
 
-	cpuhp_setup_state(CPUHP_AP_IRQ_RISCV_STARTING,
+	cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
 			  "irqchip/riscv/intc:starting",
 			  riscv_intc_cpu_starting,
 			  riscv_intc_cpu_dying);
drivers/irqchip/irq-sifive-plic.c +1 -1
index 6f432d2..f499f1b 100644
@@ -375,7 +375,7 @@ static int __init plic_init(struct device_node *node,
 	 */
 	handler = this_cpu_ptr(&plic_handlers);
 	if (handler->present && !plic_cpuhp_setup_done) {
-		cpuhp_setup_state(CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING,
+		cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
 				  "irqchip/sifive/plic:starting",
 				  plic_starting_cpu, plic_dying_cpu);
 		plic_cpuhp_setup_done = true;
include/linux/cpuhotplug.h +0 -0
index f14adb8..14f49fd 100644

include/linux/cpuhotplug.h enum cpuhp_state { · line 108

Quoted 8 lines
include/linux/cpuhotplug.h +0 -2
@@ -103,8 +103,6 @@ enum cpuhp_state {
 	CPUHP_AP_IRQ_ARMADA_XP_STARTING,
 	CPUHP_AP_IRQ_BCM2836_STARTING,
 	CPUHP_AP_IRQ_MIPS_GIC_STARTING,
-	CPUHP_AP_IRQ_RISCV_STARTING,
-	CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING,
 	CPUHP_AP_ARM_MVEBU_COHERENCY,
 	CPUHP_AP_MICROCODE_LOADER,
 	CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING,

I'm going to assume this is going in through an irqchip tree, but LMK if you want me to take it via mine. This isn't really my sort of thing, so I'd prefer at least an Ack.

Thanks!

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv