public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: kernel: Make IPI_WAKEUP under control of CONFIG_ARM64_ACPI_PARKING_PROTOCOL
@ 2021-01-19 14:06 Chen Jun
  2021-01-19 19:12 ` Sudeep Holla
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Jun @ 2021-01-19 14:06 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: catalin.marinas, will, lorenzo.pieralisi, rui.xiang, guohanjun,
	houtao1

since commit 5e89c55e4ed81d7abb1ce8828db35fa389dc0e90
("arm64: kernel: implement ACPI parking protocol")

On arm64, IPI 6 will be wasted without setting
CONFIG_ARM64_ACPI_PARKING_PROTOCOL.

Signed-off-by: Chen Jun <chenjun102@huawei.com>
---
 arch/arm64/kernel/smp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index ad00f99ee9b0..8b494ad1c61e 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -73,7 +73,9 @@ enum ipi_msg_type {
 	IPI_CPU_CRASH_STOP,
 	IPI_TIMER,
 	IPI_IRQ_WORK,
+#ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL
 	IPI_WAKEUP,
+#endif
 	NR_IPI
 };
 
@@ -795,7 +797,9 @@ static const char *ipi_types[NR_IPI] __tracepoint_string = {
 	[IPI_CPU_CRASH_STOP]	= "CPU stop (for crash dump) interrupts",
 	[IPI_TIMER]		= "Timer broadcast interrupts",
 	[IPI_IRQ_WORK]		= "IRQ work interrupts",
+#ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL
 	[IPI_WAKEUP]		= "CPU wake-up interrupts",
+#endif
 };
 
 static void smp_cross_call(const struct cpumask *target, unsigned int ipinr);
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: kernel: Make IPI_WAKEUP under control of CONFIG_ARM64_ACPI_PARKING_PROTOCOL
  2021-01-19 14:06 [PATCH] arm64: kernel: Make IPI_WAKEUP under control of CONFIG_ARM64_ACPI_PARKING_PROTOCOL Chen Jun
@ 2021-01-19 19:12 ` Sudeep Holla
  0 siblings, 0 replies; 2+ messages in thread
From: Sudeep Holla @ 2021-01-19 19:12 UTC (permalink / raw)
  To: Chen Jun
  Cc: linux-kernel, linux-arm-kernel, lorenzo.pieralisi,
	catalin.marinas, guohanjun, rui.xiang, houtao1, will

On Tue, Jan 19, 2021 at 02:06:09PM +0000, Chen Jun wrote:
> since commit 5e89c55e4ed81d7abb1ce8828db35fa389dc0e90
> ("arm64: kernel: implement ACPI parking protocol")
> 
> On arm64, IPI 6 will be wasted without setting
> CONFIG_ARM64_ACPI_PARKING_PROTOCOL.
> 
> Signed-off-by: Chen Jun <chenjun102@huawei.com>
> ---
>  arch/arm64/kernel/smp.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index ad00f99ee9b0..8b494ad1c61e 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -73,7 +73,9 @@ enum ipi_msg_type {
>  	IPI_CPU_CRASH_STOP,
>  	IPI_TIMER,

Going by that logic, IPI_TIMER is used only when
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y and

>  	IPI_IRQ_WORK,

IPI_IRQ_WORK when CONFIG_IRQ_WORK=y

Not sure if we what to go down that path as it may result in confusion
about IPI number and what OS is using it for. I am not against this, just
want to know others opinion on this.

> +#ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL
>  	IPI_WAKEUP,
> +#endif

Just out of curiosity, are you changing this only by code inspection or
or you running short of IPI with some downstream patches. It will be
interesting to know how you are using then if you are as it may break if
kernel decides to you them in future for its own use.

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-19 22:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-19 14:06 [PATCH] arm64: kernel: Make IPI_WAKEUP under control of CONFIG_ARM64_ACPI_PARKING_PROTOCOL Chen Jun
2021-01-19 19:12 ` Sudeep Holla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox