[PATCH 04/15] kconfig: introduce option to independently enable libfdt

Daniel P. Smith posted 15 patches 1 month ago
There is a newer version of this series
[PATCH 04/15] kconfig: introduce option to independently enable libfdt
Posted by Daniel P. Smith 1 month ago
Currently the inclusion of libfdt is controlled by the CONFIG_HAS_DEVICE_TREE
kconfig flag. This flag also changes behvaior in a few places, such as boot
module processing for XSM. To support the ability to include libfdt without
changing these behaviors, introduce CONFIG_LIB_DEVICE_TREE. The inclusion of
libfdt is then moved under CONFIG_LIB_DEVICE_TREE.

Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/common/Kconfig  | 4 ++++
 xen/common/Makefile | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 90268d92499a..5c592dbdc703 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -53,8 +53,12 @@ config HAS_ALTERNATIVE
 config HAS_COMPAT
 	bool
 
+config LIB_DEVICE_TREE
+    bool
+
 config HAS_DEVICE_TREE
 	bool
+    select LIB_DEVICE_TREE
 
 config HAS_DIT # Data Independent Timing
 	bool
diff --git a/xen/common/Makefile b/xen/common/Makefile
index b279b09bfb2b..ff1795de5dda 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -78,7 +78,7 @@ obj-y += sched/
 obj-$(CONFIG_UBSAN) += ubsan/
 
 obj-$(CONFIG_NEEDS_LIBELF) += libelf/
-obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/
+obj-$(CONFIG_LIB_DEVICE_TREE) += libfdt/
 
 CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(objtree)/)$(KCONFIG_CONFIG)
 $(obj)/config.gz: $(CONF_FILE)
-- 
2.30.2
Re: [PATCH 04/15] kconfig: introduce option to independently enable libfdt
Posted by Jan Beulich 1 month ago
On 23.11.2024 19:20, Daniel P. Smith wrote:
> --- a/xen/common/Kconfig
> +++ b/xen/common/Kconfig
> @@ -53,8 +53,12 @@ config HAS_ALTERNATIVE
>  config HAS_COMPAT
>  	bool
>  
> +config LIB_DEVICE_TREE
> +    bool

Nit: Indentation is wrong here and ...

>  config HAS_DEVICE_TREE
>  	bool
> +    select LIB_DEVICE_TREE

... here.

Jan
Re: [PATCH 04/15] kconfig: introduce option to independently enable libfdt
Posted by Daniel P. Smith 2 weeks, 1 day ago
On 11/26/24 05:03, Jan Beulich wrote:
> On 23.11.2024 19:20, Daniel P. Smith wrote:
>> --- a/xen/common/Kconfig
>> +++ b/xen/common/Kconfig
>> @@ -53,8 +53,12 @@ config HAS_ALTERNATIVE
>>   config HAS_COMPAT
>>   	bool
>>   
>> +config LIB_DEVICE_TREE
>> +    bool
> 
> Nit: Indentation is wrong here and ...
> 
>>   config HAS_DEVICE_TREE
>>   	bool
>> +    select LIB_DEVICE_TREE
> 
> ... here.

ack.

v/r,
dps
Re: [PATCH 04/15] kconfig: introduce option to independently enable libfdt
Posted by Jan Beulich 1 month ago
On 26.11.2024 11:03, Jan Beulich wrote:
> On 23.11.2024 19:20, Daniel P. Smith wrote:
>> --- a/xen/common/Kconfig
>> +++ b/xen/common/Kconfig
>> @@ -53,8 +53,12 @@ config HAS_ALTERNATIVE
>>  config HAS_COMPAT
>>  	bool
>>  
>> +config LIB_DEVICE_TREE
>> +    bool
> 
> Nit: Indentation is wrong here and ...
> 
>>  config HAS_DEVICE_TREE
>>  	bool
>> +    select LIB_DEVICE_TREE
> 
> ... here.

Oh, and - please don't put LIB_DEVICE_TREE in the middle of (sorted) HAS_*.
It wants to move past them, before MEM_*.

Jan
Re: [PATCH 04/15] kconfig: introduce option to independently enable libfdt
Posted by Daniel P. Smith 2 weeks, 1 day ago
On 11/26/24 05:05, Jan Beulich wrote:
> On 26.11.2024 11:03, Jan Beulich wrote:
>> On 23.11.2024 19:20, Daniel P. Smith wrote:
>>> --- a/xen/common/Kconfig
>>> +++ b/xen/common/Kconfig
>>> @@ -53,8 +53,12 @@ config HAS_ALTERNATIVE
>>>   config HAS_COMPAT
>>>   	bool
>>>   
>>> +config LIB_DEVICE_TREE
>>> +    bool
>>
>> Nit: Indentation is wrong here and ...
>>
>>>   config HAS_DEVICE_TREE
>>>   	bool
>>> +    select LIB_DEVICE_TREE
>>
>> ... here.
> 
> Oh, and - please don't put LIB_DEVICE_TREE in the middle of (sorted) HAS_*.
> It wants to move past them, before MEM_*.

ack.

v/r,
dps
Re: [PATCH 04/15] kconfig: introduce option to independently enable libfdt
Posted by Jason Andryuk 1 month ago
On 2024-11-23 13:20, Daniel P. Smith wrote:
> Currently the inclusion of libfdt is controlled by the CONFIG_HAS_DEVICE_TREE
> kconfig flag. This flag also changes behvaior in a few places, such as boot

behavior

> module processing for XSM. To support the ability to include libfdt without
> changing these behaviors, introduce CONFIG_LIB_DEVICE_TREE. The inclusion of
> libfdt is then moved under CONFIG_LIB_DEVICE_TREE.
> 
> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
Re: [PATCH 04/15] kconfig: introduce option to independently enable libfdt
Posted by Daniel P. Smith 2 weeks, 1 day ago
On 11/25/24 10:42, Jason Andryuk wrote:
> On 2024-11-23 13:20, Daniel P. Smith wrote:
>> Currently the inclusion of libfdt is controlled by the 
>> CONFIG_HAS_DEVICE_TREE
>> kconfig flag. This flag also changes behvaior in a few places, such as 
>> boot
> 
> behavior

ack.

>> module processing for XSM. To support the ability to include libfdt 
>> without
>> changing these behaviors, introduce CONFIG_LIB_DEVICE_TREE. The 
>> inclusion of
>> libfdt is then moved under CONFIG_LIB_DEVICE_TREE.
>>
>> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
> 
> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>

thanks!

v/r,
dps