Message ID | 686dbb3128ad4e413b22685cd466a68e1adf670b.1690968173.git.tanyuan@tinylab.org (mailing list archive) |
---|---|
State | RFC |
Headers | show |
Series | mips: malta: Select PCI_QUIRKS if POWER_RESET_PIIX4_POWEROFF is enabled | expand |
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
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
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
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(+)