linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled
@ 2023-08-02  9:24 Yuan Tan
  2023-08-02  9:25 ` [RFC 1/1] mips: malta: select PCI_QUIRK for POWER_RESET_PIIX4_POWEROFF Yuan Tan
  2023-08-08 15:31 ` Maciej W. Rozycki
  0 siblings, 2 replies; 5+ messages in thread
From: Yuan Tan @ 2023-08-02  9:24 UTC (permalink / raw)
  To: tsbogend; +Cc: linux-mips, linux-kernel, linux, w, falcon, tanyuan

Hi list,

I just found that the on QEMU Malta, POWER_RESET_PIIX4_POWEROFF relay on
PCI_QUIRKS to work, or else the reboot will hang.

Welcome everyone's suggestions.

Yuan Tan (1):
  mips: malta: select PCI_QUIRK for POWER_RESET_PIIX4_POWEROFF

 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)

-- 
2.34.1


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

* [RFC 1/1] mips: malta: select PCI_QUIRK for POWER_RESET_PIIX4_POWEROFF
  2023-08-02  9:24 [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled Yuan Tan
@ 2023-08-02  9:25 ` Yuan Tan
  2023-08-05 19:14   ` [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled Zhangjin Wu
  2023-08-08 15:31 ` Maciej W. Rozycki
  1 sibling, 1 reply; 5+ messages in thread
From: Yuan Tan @ 2023-08-02  9:25 UTC (permalink / raw)
  To: tsbogend; +Cc: linux-mips, linux-kernel, linux, w, falcon, tanyuan

Select PCI_QUIRKS for malta if POWER_RESET_PIIX4_POWEROFF enabled.

Syscall reboot relies on PCI_QUIRKS, or else the reboot will hang.

Signed-off-by: Yuan Tan <tanyuan@tinylab.org>
---
 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index fc6fba925aea..a2827488efef 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -547,6 +547,7 @@ config MIPS_MALTA
 	select MIPS_L1_CACHE_SHIFT_6
 	select MIPS_MSC
 	select PCI_GT64XXX_PCI0
+	select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF
 	select SMP_UP if SMP
 	select SWAP_IO_SPACE
 	select SYS_HAS_CPU_MIPS32_R1
-- 
2.34.1


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

* [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled
  2023-08-02  9:25 ` [RFC 1/1] mips: malta: select PCI_QUIRK for POWER_RESET_PIIX4_POWEROFF Yuan Tan
@ 2023-08-05 19:14   ` Zhangjin Wu
  2023-08-08 15:55     ` Maciej W. Rozycki
  0 siblings, 1 reply; 5+ messages in thread
From: Zhangjin Wu @ 2023-08-05 19:14 UTC (permalink / raw)
  To: tanyuan; +Cc: falcon, linux-kernel, linux-mips, linux, tsbogend, w

Hi, Yuan

To even further reduce the time cost & waste of finding the exact
poweroff options for malta, I suggest to directly select the required
options when CONFIG_POWER_RESET=y:  

    config MIPS_MALTA
    	...
     	select MIPS_L1_CACHE_SHIFT_6
     	select MIPS_MSC
     	select PCI_GT64XXX_PCI0
    +	select PCI if POWER_RESET
    +	select PCI_QUIRKS if POWER_RESET
    +	select POWER_RESET_PIIX4_POWEROFF if POWER_RESET
     	select SMP_UP if SMP
     	select SWAP_IO_SPACE
     	select SYS_HAS_CPU_MIPS32_R1

But it looks a little ugly, let's think about how to improve it.

And aslo, due to the same reason, it is possible to send a RFC patchset
to select required poweroff options for CONFIG_POWER_RESET=y of the
other architectures, like the CONFIG_ACPI=y and CONFIG_PCI=y options for
i386/x86_64 and the CONFIG_MACINTOSH_DRIVERS=y and CONFIG_ADB_CUDA=y for
ppc g3beige.

To simplify the enablement of the poweroff support, selecting the required
options for CONFIG_POWER_RESET=y may make many people happy especially when
they are using a customized config (maybe tinyconfig based) for a target qemu
board. Without normal poweroff support from the kernel side, qemu will simply
hang there after a 'poweroff' command, which is a very bad experience for the
automatical tests. Currently, based on tinyconfig, it is very hard to find the
exact poweroff options, some architectures simply enable poweroff support by
default, the others' poweroff options are hidden deeply, which make things very
hard. 

Thanks,
Zhangjin

> Hi list,
> 
> I just found that the on QEMU Malta, POWER_RESET_PIIX4_POWEROFF relay on
> PCI_QUIRKS to work, or else the reboot will hang.
> 
> Welcome everyone's suggestions.
> 
> Yuan Tan (1):
>   mips: malta: select PCI_QUIRK for POWER_RESET_PIIX4_POWEROFF
> 
>  arch/mips/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> -- 
> 2.34.1

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

* Re: [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled
  2023-08-02  9:24 [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled Yuan Tan
  2023-08-02  9:25 ` [RFC 1/1] mips: malta: select PCI_QUIRK for POWER_RESET_PIIX4_POWEROFF Yuan Tan
@ 2023-08-08 15:31 ` Maciej W. Rozycki
  1 sibling, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2023-08-08 15:31 UTC (permalink / raw)
  To: Yuan Tan; +Cc: Thomas Bogendoerfer, linux-mips, linux-kernel, linux, w, falcon

On Wed, 2 Aug 2023, Yuan Tan wrote:

> I just found that the on QEMU Malta, POWER_RESET_PIIX4_POWEROFF relay on
> PCI_QUIRKS to work, or else the reboot will hang.

 I'll check if it is reproducible with actual hardware, otherwise it might 
be an issue to fix in QEMU.

  Maciej

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

* Re: [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled
  2023-08-05 19:14   ` [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled Zhangjin Wu
@ 2023-08-08 15:55     ` Maciej W. Rozycki
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2023-08-08 15:55 UTC (permalink / raw)
  To: Zhangjin Wu
  Cc: tanyuan, linux-kernel, linux-mips, linux, Thomas Bogendoerfer, w

On Sun, 6 Aug 2023, Zhangjin Wu wrote:

> To simplify the enablement of the poweroff support, selecting the required
> options for CONFIG_POWER_RESET=y may make many people happy especially when
> they are using a customized config (maybe tinyconfig based) for a target qemu
> board. Without normal poweroff support from the kernel side, qemu will simply
> hang there after a 'poweroff' command, which is a very bad experience for the
> automatical tests. Currently, based on tinyconfig, it is very hard to find the
> exact poweroff options, some architectures simply enable poweroff support by
> default, the others' poweroff options are hidden deeply, which make things very
> hard. 

 The settings are a bit buried indeed and I was hit by that myself at one 
point when upgrading the kernel using old .config, but honestly I think we 
want to let people strip the kernel from options they don't want or need, 
so I think it will best be sorted by presetting the useful options in the 
respective defconfigs and then maybe guard the more critical ones with `if 
EXPERT'.

  Maciej

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

end of thread, other threads:[~2023-08-08 16:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02  9:24 [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled Yuan Tan
2023-08-02  9:25 ` [RFC 1/1] mips: malta: select PCI_QUIRK for POWER_RESET_PIIX4_POWEROFF Yuan Tan
2023-08-05 19:14   ` [RFC 0/1] mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled Zhangjin Wu
2023-08-08 15:55     ` Maciej W. Rozycki
2023-08-08 15:31 ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).