* [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32
@ 2023-09-14 10:09 Yuan Tan
2023-09-14 10:10 ` [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig Yuan Tan
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Yuan Tan @ 2023-09-14 10:09 UTC (permalink / raw)
To: mpe, christophe.leroy
Cc: linux, linux-kernel, falcon, linuxppc-dev, w, tanyuan
These patches are to add dependencies of POWER_RESET for pmac32.
As I have to use "savedefconfig" on the latest branch of different
architectures, I am sending separate patches for each architecture in v3.
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[1] there after a 'poweroff' command,
which is a very bad experience for the automatical tests.
However, CONFIG_POWER_RESET is ineffective if there are no
dependencies that enable certain devices in Kconfig.
Currently, based on tinyconfig, it is very hard to find the exact
poweroff related option[2]. Some architectures' poweroff works well without
any dependence, the others' poweroff options are hidden deeply, which
make things hard.
After multiple verifications, these options have been identified as the
minimum dependencies required for poweroff to function normally.
Additionally, 'make savedefconfig' simplifies the defconfig
automatically.
Zhangjin and I invested a significant amount of time in searching for
the current options on these devices. We hope that this set of patches
will save time for others. If community like it, we will consider adding
dependencies for POWER_RESET on other devices.
We hope every device's CONFIG_POWER_RESET will have proper dependencies. :)
---
[1]: https://lore.kernel.org/lkml/511b2f6009fb830b3f32b4be3dca99596c684fa3.1689759351.git.falcon@tinylab.org/
[2]: https://lore.kernel.org/all/983843582e52e83fba79ad45cea6c79e1f62ec6c.1690489039.git.falcon@tinylab.org/
v1: https://lore.kernel.org/all/20230831201727.3177853-1-tanyuan@tinylab.org/
v2: https://lore.kernel.org/all/cover.1693535514.git.tanyuan@tinylab.org/
---
Changes in v2:
- Fix the mistake of using spaces instead of tabs in kconfig.
Changes in v3:
- Enable POWER_RESET and simplify the deconfig.
- Select ADB_CUDA in PPC_PMAC32 only.
Yuan Tan (3):
powerpc/config: Cleanup pmac32_defconfig
Kconfig: Add dependencies of POWER_RESET for pmac32
powerpc/config: Simplify pmac32_defconfig
arch/powerpc/configs/pmac32_defconfig | 46 +++++++++++--------------
arch/powerpc/platforms/powermac/Kconfig | 1 +
2 files changed, 21 insertions(+), 26 deletions(-)
base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig
2023-09-14 10:09 [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Yuan Tan
@ 2023-09-14 10:10 ` Yuan Tan
2023-09-14 13:10 ` Michael Ellerman
2023-09-14 10:10 ` [PATCH v3 2/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Yuan Tan
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Yuan Tan @ 2023-09-14 10:10 UTC (permalink / raw)
To: mpe, christophe.leroy
Cc: Philippe Mathieu-Daudé, linux, linux-kernel, falcon,
linuxppc-dev, w, tanyuan
Use 'make savedefconfig' to cleanup pmac32_defconfig, based on Linux
7.6-rc1
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Yuan Tan <tanyuan@tinylab.org>
---
arch/powerpc/configs/pmac32_defconfig | 44 ++++++++++++---------------
1 file changed, 19 insertions(+), 25 deletions(-)
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index a205da9ee5f2..11d489c2c3e0 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -1,4 +1,3 @@
-CONFIG_ALTIVEC=y
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
@@ -8,12 +7,8 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_BLK_DEV_INITRD=y
-# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_PARTITION_ADVANCED=y
+CONFIG_ALTIVEC=y
# CONFIG_PPC_CHRP is not set
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
@@ -21,12 +16,15 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_PMAC=y
CONFIG_GEN_RTC=y
CONFIG_HIGHMEM=y
-CONFIG_BINFMT_MISC=m
CONFIG_HIBERNATION=y
CONFIG_PM_DEBUG=y
CONFIG_APM_EMULATION=y
-CONFIG_PCCARD=m
-CONFIG_YENTA=m
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_BINFMT_MISC=m
+# CONFIG_COMPAT_BRK is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
@@ -100,6 +98,8 @@ CONFIG_BT_HCIBFUSB=m
CONFIG_CFG80211=m
CONFIG_MAC80211=m
CONFIG_MAC80211_LEDS=y
+CONFIG_PCCARD=m
+CONFIG_YENTA=m
# CONFIG_STANDALONE is not set
CONFIG_CONNECTOR=y
CONFIG_MAC_FLOPPY=m
@@ -179,7 +179,6 @@ CONFIG_SERIAL_8250=m
CONFIG_SERIAL_PMACZILOG=y
CONFIG_SERIAL_PMACZILOG_TTYS=y
CONFIG_SERIAL_PMACZILOG_CONSOLE=y
-CONFIG_NVRAM=y
CONFIG_I2C_CHARDEV=m
CONFIG_APM_POWER=y
CONFIG_BATTERY_PMU=y
@@ -189,7 +188,6 @@ CONFIG_AGP_UNINORTH=m
CONFIG_DRM=m
CONFIG_DRM_RADEON=m
CONFIG_DRM_LEGACY=y
-CONFIG_DRM_R128=m
CONFIG_FB=y
CONFIG_FB_OF=y
CONFIG_FB_CONTROL=y
@@ -275,23 +273,19 @@ CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_ISO8859_1=m
-CONFIG_CRC_T10DIF=y
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_DETECT_HUNG_TASK=y
-CONFIG_XMON=y
-CONFIG_XMON_DEFAULT=y
-CONFIG_BOOTX_TEXT=y
-CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRC_T10DIF=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_XMON=y
+CONFIG_XMON_DEFAULT=y
+CONFIG_BOOTX_TEXT=y
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/3] Kconfig: Add dependencies of POWER_RESET for pmac32
2023-09-14 10:09 [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Yuan Tan
2023-09-14 10:10 ` [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig Yuan Tan
@ 2023-09-14 10:10 ` Yuan Tan
2023-09-14 10:10 ` [PATCH v3 3/3] powerpc/config: Simplify pmac32_defconfig Yuan Tan
2023-09-21 9:30 ` (subset) [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Michael Ellerman
3 siblings, 0 replies; 8+ messages in thread
From: Yuan Tan @ 2023-09-14 10:10 UTC (permalink / raw)
To: mpe, christophe.leroy
Cc: linux, linux-kernel, falcon, linuxppc-dev, w, tanyuan
pmac32's power off depends on ADB_CUDA to work. Enable it when
POWER_RESET is set for convenience.
Suggested-by: Zhangjin Wu <falcon@tinylab.org>
Signed-off-by: Yuan Tan <tanyuan@tinylab.org>
---
arch/powerpc/platforms/powermac/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/powermac/Kconfig b/arch/powerpc/platforms/powermac/Kconfig
index 130707ec9f99..8bdae0caf21e 100644
--- a/arch/powerpc/platforms/powermac/Kconfig
+++ b/arch/powerpc/platforms/powermac/Kconfig
@@ -2,6 +2,7 @@
config PPC_PMAC
bool "Apple PowerMac based machines"
depends on PPC_BOOK3S && CPU_BIG_ENDIAN
+ select ADB_CUDA if POWER_RESET && PPC32
select MPIC
select FORCE_PCI
select PPC_INDIRECT_PCI if PPC32
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 3/3] powerpc/config: Simplify pmac32_defconfig
2023-09-14 10:09 [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Yuan Tan
2023-09-14 10:10 ` [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig Yuan Tan
2023-09-14 10:10 ` [PATCH v3 2/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Yuan Tan
@ 2023-09-14 10:10 ` Yuan Tan
2023-09-21 9:30 ` (subset) [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Michael Ellerman
3 siblings, 0 replies; 8+ messages in thread
From: Yuan Tan @ 2023-09-14 10:10 UTC (permalink / raw)
To: mpe, christophe.leroy
Cc: Philippe Mathieu-Daudé, linux, linux-kernel, falcon,
linuxppc-dev, w, tanyuan
Simplify pmac32_defconfig with POWER_RESET dependences.
Regenerate pmac32_defconfig with 'make savedefconfig'.
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Yuan Tan <tanyuan@tinylab.org>
---
arch/powerpc/configs/pmac32_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index 11d489c2c3e0..17df965be099 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -138,7 +138,6 @@ CONFIG_DM_SNAPSHOT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_ADB=y
-CONFIG_ADB_CUDA=y
CONFIG_ADB_PMU=y
CONFIG_ADB_PMU_LED=y
CONFIG_ADB_PMU_LED_DISK=y
@@ -180,6 +179,7 @@ CONFIG_SERIAL_PMACZILOG=y
CONFIG_SERIAL_PMACZILOG_TTYS=y
CONFIG_SERIAL_PMACZILOG_CONSOLE=y
CONFIG_I2C_CHARDEV=m
+CONFIG_POWER_RESET=y
CONFIG_APM_POWER=y
CONFIG_BATTERY_PMU=y
CONFIG_HWMON=m
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig
2023-09-14 10:10 ` [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig Yuan Tan
@ 2023-09-14 13:10 ` Michael Ellerman
2023-09-14 14:37 ` Yuan Tan
0 siblings, 1 reply; 8+ messages in thread
From: Michael Ellerman @ 2023-09-14 13:10 UTC (permalink / raw)
To: Yuan Tan, christophe.leroy
Cc: Philippe Mathieu-Daudé, linux, linux-kernel, falcon,
linuxppc-dev, w, tanyuan
Yuan Tan <tanyuan@tinylab.org> writes:
> Use 'make savedefconfig' to cleanup pmac32_defconfig, based on Linux
> 7.6-rc1
Thanks but I don't like doing these updates in a single commit like
this, it's easy to accidentally lose a symbol.
I prefer an explanation for what's changing for each symbol. See
1ce7fda142af ("powerpc/configs/64s: Drop IPV6 which is default y") and
the commits leading up to it, to see what I mean.
But I suspect you probably don't want to go to all that effort, which is
fine :)
So I won't take patch 1, but patch 2 and 3 look fine. No need to resend,
I'll deal with any merge fixup needed.
cheers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig
2023-09-14 13:10 ` Michael Ellerman
@ 2023-09-14 14:37 ` Yuan Tan
2023-09-21 23:50 ` Michael Ellerman
0 siblings, 1 reply; 8+ messages in thread
From: Yuan Tan @ 2023-09-14 14:37 UTC (permalink / raw)
To: Michael Ellerman, christophe.leroy
Cc: Philippe Mathieu-Daudé, linux, linux-kernel, falcon,
linuxppc-dev, w
Hi Michael
On 9/14/2023 9:10 PM, Michael Ellerman wrote:
> Yuan Tan <tanyuan@tinylab.org> writes:
>> Use 'make savedefconfig' to cleanup pmac32_defconfig, based on Linux
>> 7.6-rc1
> Thanks but I don't like doing these updates in a single commit like
> this, it's easy to accidentally lose a symbol.
Yeah I have the same concerns too.
>
> I prefer an explanation for what's changing for each symbol. See
> 1ce7fda142af ("powerpc/configs/64s: Drop IPV6 which is default y") and
> the commits leading up to it, to see what I mean.
>
> But I suspect you probably don't want to go to all that effort, which is
> fine :)
I am not familiar with other options, so I'd better not do that. :)
By the way, just to be cautious, since the defconfig can only be updated
by 'savedefconfig'[1], how can we write an explanation for a single
change in an option?
I mean, when I change one option, the value of the other undetermined
option will be set just like in patch 1.
[1]:
https://lore.kernel.org/all/54da2376-dc65-0a96-55df-7a5acfbb9bff@csgroup.eu/
>
> So I won't take patch 1, but patch 2 and 3 look fine. No need to resend,
> I'll deal with any merge fixup needed.
>
> cheers
Thank you :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (subset) [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32
2023-09-14 10:09 [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Yuan Tan
` (2 preceding siblings ...)
2023-09-14 10:10 ` [PATCH v3 3/3] powerpc/config: Simplify pmac32_defconfig Yuan Tan
@ 2023-09-21 9:30 ` Michael Ellerman
3 siblings, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2023-09-21 9:30 UTC (permalink / raw)
To: christophe.leroy, Yuan Tan; +Cc: falcon, linux, linuxppc-dev, linux-kernel, w
On Thu, 14 Sep 2023 18:09:55 +0800, Yuan Tan wrote:
> These patches are to add dependencies of POWER_RESET for pmac32.
>
> As I have to use "savedefconfig" on the latest branch of different
> architectures, I am sending separate patches for each architecture in v3.
>
> 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[1] there after a 'poweroff' command,
> which is a very bad experience for the automatical tests.
>
> [...]
Patches 2 and 3 applied to powerpc/next.
[2/3] Kconfig: Add dependencies of POWER_RESET for pmac32
https://git.kernel.org/powerpc/c/a3ef2fef198c25c1d9ac6ff89fd50230e9507207
[3/3] powerpc/config: Simplify pmac32_defconfig
https://git.kernel.org/powerpc/c/f84b727d132c39c70208503e60149af6dd5a217f
cheers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig
2023-09-14 14:37 ` Yuan Tan
@ 2023-09-21 23:50 ` Michael Ellerman
0 siblings, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2023-09-21 23:50 UTC (permalink / raw)
To: Yuan Tan, christophe.leroy
Cc: Philippe Mathieu-Daudé, linux, linux-kernel, falcon,
linuxppc-dev, w
Yuan Tan <tanyuan@tinylab.org> writes:
> On 9/14/2023 9:10 PM, Michael Ellerman wrote:
>> Yuan Tan <tanyuan@tinylab.org> writes:
>>> Use 'make savedefconfig' to cleanup pmac32_defconfig, based on Linux
>>> 7.6-rc1
>> Thanks but I don't like doing these updates in a single commit like
>> this, it's easy to accidentally lose a symbol.
> Yeah I have the same concerns too.
>>
>> I prefer an explanation for what's changing for each symbol. See
>> 1ce7fda142af ("powerpc/configs/64s: Drop IPV6 which is default y") and
>> the commits leading up to it, to see what I mean.
>>
>> But I suspect you probably don't want to go to all that effort, which is
>> fine :)
>
> I am not familiar with other options, so I'd better not do that. :)
>
> By the way, just to be cautious, since the defconfig can only be updated
> by 'savedefconfig'[1], how can we write an explanation for a single
> change in an option?
Well the defconfig can be updated manually, but the changes you make
manually should match what savedefconfig would do.
> I mean, when I change one option, the value of the other undetermined
> option will be set just like in patch 1.
At that point I just stage the change to the option I'm changing, and
leave the other lines modified by savedefconfig alone. That way you can
commit the changes made by savedefconfig in multiple steps, explaining
what happens along the way, and the end result is the same as what
savedefconfig generates.
So for example at the moment if you do savedefconfig on
pmac32_defconfig, the start of the diff looks like:
1 diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
2 index 57ded82c2840..17df965be099 100644
3 --- a/arch/powerpc/configs/pmac32_defconfig
4 +++ b/arch/powerpc/configs/pmac32_defconfig
5 @@ -1,4 +1,3 @@
6 -CONFIG_ALTIVEC=y
7 # CONFIG_LOCALVERSION_AUTO is not set
8 CONFIG_SYSVIPC=y
9 CONFIG_POSIX_MQUEUE=y
10 @@ -8,12 +7,8 @@ CONFIG_IKCONFIG=y
11 CONFIG_IKCONFIG_PROC=y
12 CONFIG_LOG_BUF_SHIFT=14
13 CONFIG_BLK_DEV_INITRD=y
14 -# CONFIG_COMPAT_BRK is not set
15 CONFIG_PROFILING=y
16 -CONFIG_MODULES=y
17 -CONFIG_MODULE_UNLOAD=y
18 -CONFIG_MODULE_FORCE_UNLOAD=y
19 -CONFIG_PARTITION_ADVANCED=y
20 +CONFIG_ALTIVEC=y
21 # CONFIG_PPC_CHRP is not set
22 CONFIG_CPU_FREQ=y
23 CONFIG_CPU_FREQ_GOV_POWERSAVE=y
So you can stage lines 6 and 20, and commit that as "Update for symbol
movement", ie. nothing changed other than a symbol moved.
Then repeat that until eventually the config is up to date.
cheers
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-09-21 23:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14 10:09 [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Yuan Tan
2023-09-14 10:10 ` [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig Yuan Tan
2023-09-14 13:10 ` Michael Ellerman
2023-09-14 14:37 ` Yuan Tan
2023-09-21 23:50 ` Michael Ellerman
2023-09-14 10:10 ` [PATCH v3 2/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Yuan Tan
2023-09-14 10:10 ` [PATCH v3 3/3] powerpc/config: Simplify pmac32_defconfig Yuan Tan
2023-09-21 9:30 ` (subset) [PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32 Michael Ellerman
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).