From: Ritesh Harjani (IBM) <ritesh.list@gmail•com>
To: Christophe Leroy <christophe.leroy@csgroup•eu>,
linuxppc-dev@lists•ozlabs.org
Cc: Madhavan Srinivasan <maddy@linux•ibm.com>,
Michael Ellerman <mpe@ellerman•id.au>,
Nicholas Piggin <npiggin@gmail•com>,
Paul Mackerras <paulus@ozlabs•org>,
"Aneesh Kumar K.V" <aneesh.kumar@kernel•org>,
Donet Tom <donettom@linux•ibm.com>
Subject: Re: [RFC 3/8] book3s64/hash: Fix phys_addr_t printf format in htab_initialize()
Date: Sat, 30 Aug 2025 13:00:58 +0530 [thread overview]
Message-ID: <87tt1pjmfh.fsf@gmail.com> (raw)
In-Reply-To: <824bfe0d-7a16-4b35-a0ec-565e4df3223e@csgroup.eu>
Christophe Leroy <christophe.leroy@csgroup•eu> writes:
> Le 30/08/2025 à 05:51, Ritesh Harjani (IBM) a écrit :
>> We get below errors when we try to enable debug logs in book3s64/hash_utils.c
>> This patch fixes these errors related to phys_addr_t printf format.
>>
>> arch/powerpc/mm/book3s64/hash_utils.c: In function ‘htab_initialize’:
>> arch/powerpc/mm/book3s64/hash_utils.c:1401:21: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘phys_addr_t’ {aka ‘long long unsigned int’} [-Werror=format=]
>> 1401 | DBG("creating mapping for region: %lx..%lx (prot: %lx)\n",
>> arch/powerpc/mm/book3s64/hash_utils.c:1401:21: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘phys_addr_t’ {aka ‘long long unsigned int’} [-Werror=format=]
>> cc1: all warnings being treated as errors
>> make[6]: *** [../scripts/Makefile.build:287: arch/powerpc/mm/book3s64/hash_utils.o] Error 1
>>
>> Cc: Madhavan Srinivasan <maddy@linux•ibm.com>
>> Cc: Michael Ellerman <mpe@ellerman•id.au>
>> Cc: Nicholas Piggin <npiggin@gmail•com>
>> Cc: Christophe Leroy <christophe.leroy@csgroup•eu>
>> Cc: Paul Mackerras <paulus@ozlabs•org>
>> Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel•org>
>> Cc: Donet Tom <donettom@linux•ibm.com>
>> Cc: linuxppc-dev@lists•ozlabs.org
>> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail•com>
>> ---
>> arch/powerpc/mm/book3s64/hash_utils.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c
>> index 1e062056cfb8..495b6da6f5d4 100644
>> --- a/arch/powerpc/mm/book3s64/hash_utils.c
>> +++ b/arch/powerpc/mm/book3s64/hash_utils.c
>> @@ -1394,7 +1394,7 @@ static void __init htab_initialize(void)
>> size = end - base;
>> base = (unsigned long)__va(base);
>>
>> - DBG("creating mapping for region: %lx..%lx (prot: %lx)\n",
>> + DBG("creating mapping for region: %llx..%llx (prot: %lx)\n",
>
> Use %pa
>
> See
> https://docs.kernel.org/core-api/printk-formats.html#physical-address-types-phys-addr-t
>
Right. Make sense. Will change it in the next spin.
-ritesh
>> base, size, prot);
>>
>> if ((base + size) >= H_VMALLOC_START) {
>> --
>> 2.50.1
>>
next prev parent reply other threads:[~2025-08-30 7:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-30 3:51 [PATCH 0/8] powerpc/book3s64: Hash / SLB fixes & improvements Ritesh Harjani (IBM)
2025-08-30 3:51 ` [RFC 1/8] powerpc/mm: Fix SLB multihit issue during SLB preload Ritesh Harjani (IBM)
2025-08-30 3:51 ` [RFC 2/8] book3s64/hash: Restrict stress_hpt_struct memblock region to within RMA limit Ritesh Harjani (IBM)
2025-08-30 3:51 ` [RFC 3/8] book3s64/hash: Fix phys_addr_t printf format in htab_initialize() Ritesh Harjani (IBM)
2025-08-30 6:26 ` Christophe Leroy
2025-08-30 7:30 ` Ritesh Harjani [this message]
2025-08-30 3:51 ` [RFC 4/8] powerpc/ptdump/64: Fix kernel_hash_pagetable dump for ISA v3.00 HPTE format Ritesh Harjani (IBM)
2025-08-30 3:51 ` [RFC 5/8] powerpc/ptdump: Dump PXX level info for kernel_page_tables Ritesh Harjani (IBM)
2025-08-30 6:31 ` Christophe Leroy
2025-08-30 7:25 ` Ritesh Harjani
2025-08-30 3:51 ` [RFC 6/8] powerpc/book3s64/slb: Make preload_add return type as void Ritesh Harjani (IBM)
2025-08-30 6:36 ` Christophe Leroy
2025-08-30 7:27 ` Ritesh Harjani
2025-08-30 3:51 ` [RFC 7/8] powerpc/book3s64/slb: Add no_slb_preload early cmdline param Ritesh Harjani (IBM)
2025-08-30 6:42 ` Christophe Leroy
2025-08-30 10:11 ` Ritesh Harjani
2025-08-30 3:51 ` [RFC 8/8] powerpc/book3s64/slb: Add slb faults to vmstat Ritesh Harjani (IBM)
2025-08-30 4:45 ` Stephen Rothwell
2025-08-30 4:56 ` Ritesh Harjani
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=87tt1pjmfh.fsf@gmail.com \
--to=ritesh.list@gmail$(echo .)com \
--cc=aneesh.kumar@kernel$(echo .)org \
--cc=christophe.leroy@csgroup$(echo .)eu \
--cc=donettom@linux$(echo .)ibm.com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=maddy@linux$(echo .)ibm.com \
--cc=mpe@ellerman$(echo .)id.au \
--cc=npiggin@gmail$(echo .)com \
--cc=paulus@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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