From: Vishal Chourasia <vishalc@linux.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: Restrict ARCH_HIBERNATION_POSSIBLE to supported configurations
Date: Wed, 15 Nov 2023 17:23:49 +0530 [thread overview]
Message-ID: <ecc9d34a-4960-4540-802e-d35ee4f5259b@linux.ibm.com> (raw)
In-Reply-To: <87sf57zbcd.fsf@linux.ibm.com>
On 15/11/23 1:39 pm, Aneesh Kumar K.V wrote:
> Vishal Chourasia <vishalc@linux.ibm.com> writes:
>
>> This patch modifies the ARCH_HIBERNATION_POSSIBLE option to ensure that it
>> correctly depends on these PowerPC configurations being enabled. As a result,
>> it prevents the HOTPLUG_CPU from being selected when the required dependencies
>> are not satisfied.
>>
>> This change aligns the dependency tree with the expected hardware support for
>> CPU hot-plugging under PowerPC architectures, ensuring that the kernel
>> configuration steps do not lead to inconsistent states.
>>
>> Signed-off-by: Vishal Chourasia <vishalc@linux.ibm.com>
>> ---
>> During the configuration process with 'make randconfig' followed by
>> 'make olddefconfig', we observed a warning indicating an unmet direct
>> dependency for the HOTPLUG_CPU option. The dependency in question relates to
>> various PowerPC configurations (PPC_PSERIES, PPC_PMAC, PPC_POWERNV,
>> FSL_SOC_BOOKE) which were not enabled, yet the HOTPLUG_CPU was being
>> erroneously selected due to an implicit assumption by the PM_SLEEP_SMP option.
>> This misalignment in dependencies could potentially lead to inconsistent kernel
>> configuration states, especially when considering the necessary hardware
>> support for CPU hot-plugging on PowerPC platforms. The patch aims to correct
>> this by ensuring that ARCH_HIBERNATION_POSSIBLE is contingent upon the
>> appropriate PowerPC configurations being active.
>>
>> steps to reproduce (before applying the patch):
>>
>> Run 'make pseries_le_defconfig'
>> Run 'make menuconfig'
>> Enable hibernation [ Kernel options -> Hibernation (aka 'suspend to disk') ]
>> Disable [ Platform support -> IBM PowerNV (Non-Virtualized) platform support ]
>> Disable [ Platform support -> IBM pSeries & new (POWER5-based) iSeries ]
>> Enable SMP [ Processor support -> Symmetric multi-processing support ]
>> Save the config
>> Run 'make olddefconfig'
>>
>> arch/powerpc/Kconfig | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index 6f105ee4f3cf..bf99ff9869f6 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -380,8 +380,9 @@ config DEFAULT_UIMAGE
>> Used to allow a board to specify it wants a uImage built by default
>>
>> config ARCH_HIBERNATION_POSSIBLE
>> - bool
>> - default y
>> + def_bool y
>> + depends on PPC_PSERIES || \
>> + PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE
>>
>> config ARCH_SUSPEND_POSSIBLE
>> def_bool y
>>
> I am wondering whether it should be switched to using select from
> config PPC?
selecting ARCH_HIBERNATION_POSSIBLE based on value of config PPC
will not guarantee config PPC_PSERIES being set
PPC_PSERIES can be set to N, even when config PPC is set.
grep -A 5 -i "config ppc_pseries" arch/powerpc/platforms/pseries/Kconfig
config PPC_PSERIES
depends on PPC64 && PPC_BOOK3S
bool "IBM pSeries & new (POWER5-based) iSeries"
select HAVE_PCSPKR_PLATFORM
select MPIC
select OF_DYNAMIC
>
> -aneesh
next prev parent reply other threads:[~2023-11-15 11:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 8:20 [PATCH] powerpc: Restrict ARCH_HIBERNATION_POSSIBLE to supported configurations Vishal Chourasia
2023-11-15 8:09 ` Aneesh Kumar K.V
2023-11-15 11:53 ` Vishal Chourasia [this message]
2023-11-15 12:16 ` Aneesh Kumar K V
2023-11-16 8:43 ` Vishal Chourasia
2023-11-16 23:22 ` Michael Ellerman
2023-11-17 8:34 ` Vishal Chourasia
2023-11-17 10:06 ` Vishal Chourasia
2023-11-22 5:05 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ecc9d34a-4960-4540-802e-d35ee4f5259b@linux.ibm.com \
--to=vishalc@linux.ibm.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).