Skip to contentSkip to conversation

powerpc/e500/qemu-e500: allow core to idle without waiting

PATCH Applied Joachim Wiberg 3 participants 5 messages Jan 12, 2022 – Feb 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/e500/qemu-e500: allow core to idle without waiting

From: Tobias Waldekranz <[email protected]>

This means an idle guest won't needlessly consume an entire core on the host, waiting for work to show up.

---
 arch/powerpc/platforms/85xx/qemu_e500.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/powerpc/platforms/85xx/qemu_e500.c +5 -0
index a4127b0b161f..4c4d577effd9 100644
@@ -67,4 +67,9 @@ define_machine(qemu_e500) {
 	.get_irq		= mpic_get_coreint_irq,
 	.calibrate_decr		= generic_calibrate_decr,
 	.progress		= udbg_progress,
+#ifdef CONFIG_PPC64
+	.power_save		= book3e_idle,
+#else
+	.power_save		= e500_idle,
+#endif
 };
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 17 lines · Joachim Wiberg

From: Tobias Waldekranz <[email protected]>

This means an idle guest won't needlessly consume an entire core on the host, waiting for work to show up.

---
 arch/powerpc/platforms/85xx/qemu_e500.c | 5 +++++

 1 file changed, 5 insertions(+)
arch/powerpc/platforms/85xx/qemu_e500.c +0 -0
index a4127b0b161f..4c4d577effd9 100644

arch/powerpc/platforms/85xx/qemu_e500.c define_machine(qemu_e500) { · line 75

Quoted 9 lines
arch/powerpc/platforms/85xx/qemu_e500.c +5 -0
@@ -67,4 +67,9 @@ define_machine(qemu_e500) {
         .get_irq                = mpic_get_coreint_irq,
         .calibrate_decr         = generic_calibrate_decr,
         .progress               = udbg_progress,
+#ifdef CONFIG_PPC64
+       .power_save             = book3e_idle,
+#else
+       .power_save             = e500_idle,
+#endif
  };

In the 32-bit case shouldn't this already be getting added by setup_power_save()? Though I see corenet_generic.c doing the same thing...

-Scott

#2 lore raw
Quoted 10 lines · Scott Wood
Quoted 7 lines · Joachim Wiberg

[snip]

arch/powerpc/platforms/85xx/qemu_e500.c +5 -0
+#ifdef CONFIG_PPC64
+       .power_save             = book3e_idle,
+#else
+       .power_save             = e500_idle,
+#endif

 };

In the 32-bit case shouldn't this already be getting added by setup_power_save()? Though I see corenet_generic.c doing the same thing...

We went for consistency with the corenet_generic.c setup, which as you noted does the same thing.

Best regards
/Joachim

maintainer Acked-by on v1 1/1
#3 lore raw
In reply to Joachim Wiberg
Quoted 17 lines · Joachim Wiberg

From: Tobias Waldekranz <[email protected]>

This means an idle guest won't needlessly consume an entire core on the host, waiting for work to show up.

---
 arch/powerpc/platforms/85xx/qemu_e500.c | 5 +++++

 1 file changed, 5 insertions(+)
arch/powerpc/platforms/85xx/qemu_e500.c +0 -0
index a4127b0b161f..4c4d577effd9 100644

arch/powerpc/platforms/85xx/qemu_e500.c define_machine(qemu_e500) { · line 75

Quoted 9 lines
arch/powerpc/platforms/85xx/qemu_e500.c +5 -0
@@ -67,4 +67,9 @@ define_machine(qemu_e500) {
         .get_irq                = mpic_get_coreint_irq,
         .calibrate_decr         = generic_calibrate_decr,
         .progress               = udbg_progress,
+#ifdef CONFIG_PPC64
+       .power_save             = book3e_idle,
+#else
+       .power_save             = e500_idle,
+#endif
  };

-Scott