* [PATCH V1] bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support
@ 2023-01-24 5:04 Souradeep Chowdhury
2023-01-24 5:44 ` Masami Hiramatsu
2023-03-12 11:49 ` Heinz Wiesinger
0 siblings, 2 replies; 4+ messages in thread
From: Souradeep Chowdhury @ 2023-01-24 5:04 UTC (permalink / raw)
To: Masami Hiramatsu, linux-kernel, Bjorn Andersson
Cc: linux-arm-kernel, linux-arm-msm, Sai Prakash Ranjan, Sibi Sankar,
Rajendra Nayak, Souradeep Chowdhury
The Data Capture and Compare(DCC) is a debugging tool that uses the bootconfig
for configuring the register values during boot-time. Increase the max nodes
supported by bootconfig to cater to the requirements of the Data Capture and
Compare Driver.
Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
---
include/linux/bootconfig.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h
index 1611f9d..ca73940 100644
--- a/include/linux/bootconfig.h
+++ b/include/linux/bootconfig.h
@@ -59,7 +59,7 @@ struct xbc_node {
/* Maximum size of boot config is 32KB - 1 */
#define XBC_DATA_MAX (XBC_VALUE - 1)
-#define XBC_NODE_MAX 1024
+#define XBC_NODE_MAX 8192
#define XBC_KEYLEN_MAX 256
#define XBC_DEPTH_MAX 16
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V1] bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support
2023-01-24 5:04 [PATCH V1] bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support Souradeep Chowdhury
@ 2023-01-24 5:44 ` Masami Hiramatsu
2023-03-12 11:49 ` Heinz Wiesinger
1 sibling, 0 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2023-01-24 5:44 UTC (permalink / raw)
To: Souradeep Chowdhury
Cc: linux-kernel, Bjorn Andersson, linux-arm-kernel, linux-arm-msm,
Sai Prakash Ranjan, Sibi Sankar, Rajendra Nayak
On Tue, 24 Jan 2023 10:34:42 +0530
Souradeep Chowdhury <quic_schowdhu@quicinc.com> wrote:
> The Data Capture and Compare(DCC) is a debugging tool that uses the bootconfig
> for configuring the register values during boot-time. Increase the max nodes
> supported by bootconfig to cater to the requirements of the Data Capture and
> Compare Driver.
Thanks, this looks good to me :)
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
> ---
> include/linux/bootconfig.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h
> index 1611f9d..ca73940 100644
> --- a/include/linux/bootconfig.h
> +++ b/include/linux/bootconfig.h
> @@ -59,7 +59,7 @@ struct xbc_node {
> /* Maximum size of boot config is 32KB - 1 */
> #define XBC_DATA_MAX (XBC_VALUE - 1)
>
> -#define XBC_NODE_MAX 1024
> +#define XBC_NODE_MAX 8192
> #define XBC_KEYLEN_MAX 256
> #define XBC_DEPTH_MAX 16
>
> --
> 2.7.4
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V1] bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support
2023-01-24 5:04 [PATCH V1] bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support Souradeep Chowdhury
2023-01-24 5:44 ` Masami Hiramatsu
@ 2023-03-12 11:49 ` Heinz Wiesinger
2023-03-13 6:02 ` Masami Hiramatsu
1 sibling, 1 reply; 4+ messages in thread
From: Heinz Wiesinger @ 2023-03-12 11:49 UTC (permalink / raw)
To: quic_schowdhu
Cc: andersson, linux-arm-kernel, linux-arm-msm, linux-kernel,
mhiramat, quic_rjendra, quic_saipraka, quic_sibis
[-- Attachment #1: Type: text/plain, Size: 888 bytes --]
Hi everyone,
It looks like this broke the bootconfig tests (tools/bootconfig/test-
bootconfig.sh), tested on 6.1.18:
Max node number check
test case 12 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)...
Apply ./temp-HCfT.bconf to ./initrd-NGHv
Number of nodes: 1024
Size: 8110 bytes
Checksum: 599485
\t\t[OK]
test case 13 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)...
Apply ./temp-HCfT.bconf to ./initrd-NGHv
Number of nodes: 1025
Size: 8118 bytes
Checksum: 600212
\t\t[NG]
When I adjust the max node number for the tests to 8192, test case 13 passes,
but test case 12 then fails:
Max node number check
test case 12 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
Error: Config data is too big.
\t\t[NG]
test case 13 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
Error: Config data is too big.
\t\t[OK]
Grs,
Heinz
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V1] bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support
2023-03-12 11:49 ` Heinz Wiesinger
@ 2023-03-13 6:02 ` Masami Hiramatsu
0 siblings, 0 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2023-03-13 6:02 UTC (permalink / raw)
To: Heinz Wiesinger
Cc: quic_schowdhu, andersson, linux-arm-kernel, linux-arm-msm,
linux-kernel, mhiramat, quic_rjendra, quic_saipraka, quic_sibis
On Sun, 12 Mar 2023 12:49:44 +0100
Heinz Wiesinger <pprkut@slackware.com> wrote:
> Hi everyone,
Oops, thanks for pointing it out. I have to run the test in the test environment...
>
> It looks like this broke the bootconfig tests (tools/bootconfig/test-
> bootconfig.sh), tested on 6.1.18:
>
> Max node number check
> test case 12 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)...
> Apply ./temp-HCfT.bconf to ./initrd-NGHv
> Number of nodes: 1024
> Size: 8110 bytes
> Checksum: 599485
> \t\t[OK]
> test case 13 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)...
> Apply ./temp-HCfT.bconf to ./initrd-NGHv
> Number of nodes: 1025
> Size: 8118 bytes
> Checksum: 600212
> \t\t[NG]
Yes, it needs to test with 8192 and 8193 nodes. Those are
boundary checker.
Thanks!
>
> When I adjust the max node number for the tests to 8192, test case 13 passes,
> but test case 12 then fails:
>
> Max node number check
> test case 12 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
> Error: Config data is too big.
> \t\t[NG]
> test case 13 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
> Error: Config data is too big.
> \t\t[OK]
Ah, it hits the size limitation. :D
Each node consumes "node%d\n" = 6-11 bytes, and 11 bytes*8k = 88k bytes > 32K bytes.
So, for making 8k nodes (including delimiter), we need to use 3 random alphabets for
node name. (26^3 = 17576)
Let me fix that and thanks for report!
>
> Grs,
> Heinz
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-13 6:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-24 5:04 [PATCH V1] bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support Souradeep Chowdhury
2023-01-24 5:44 ` Masami Hiramatsu
2023-03-12 11:49 ` Heinz Wiesinger
2023-03-13 6:02 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox