From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 6/6] x86: move CONFIG_PHYS_ADDR_T_64BIT setting into Kconfig
Date: Thu, 13 Mar 2025 08:54:16 +0100 [thread overview]
Message-ID: <20250313075416.3202194-6-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250313075416.3202194-1-a.fatoum@pengutronix.de>
sizeof(phys_addr_t) depends on whether CONFIG_PHYS_ADDR_T_64BIT is
enabled, which we so far defined depending on __x86_64__ in a header
file.
Given that we have a 64BIT symbol already in Kconfig that's selected
when building for 64-bit, let's have it select PHYS_ADDR_T_64BIT.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
- drop CONFIG_PHYS_ADDR_T_64BIT assignment in header file
- reword commit message accordingly
---
arch/x86/Kconfig | 1 +
arch/x86/include/asm/types.h | 6 ------
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index cea8e25b81f0..b453890f022b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -28,6 +28,7 @@ menu "ARCH specific settings"
config 64BIT
def_bool y if X86_EFI
select ARCH_DMA_ADDR_T_64BIT
+ select PHYS_ADDR_T_64BIT
help
Say yes to build a 64-bit binary - formerly known as x86_64
Say no to build a 32-bit binary - formerly known as i386.
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index 52a6e51fd4b1..feb5843b9c92 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -14,12 +14,6 @@
*/
#define INTERNAL_SIZE_T unsigned long
-/*
- * This is a Kconfig variable in the Kernel, but we want to detect
- * this during compile time, so we set it here.
- */
-#define CONFIG_PHYS_ADDR_T_64BIT
-
#endif
#endif
--
2.39.5
next prev parent reply other threads:[~2025-03-13 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 7:54 [PATCH v2 1/6] arch: move promptless options to end of Kconfig file Ahmad Fatoum
2025-03-13 7:54 ` [PATCH v2 2/6] RISC-V: rename HAS_CACHE to RISCV_ICACHE Ahmad Fatoum
2025-03-13 7:54 ` [PATCH v2 3/6] treewide: retire CONFIG_HAS_CACHE Ahmad Fatoum
2025-03-13 7:54 ` [PATCH v2 4/6] arch: move hidden arch options to arch/Kconfig Ahmad Fatoum
2025-03-13 7:54 ` [PATCH v2 5/6] arch: move PHYS_ADDR_T_64BIT definition " Ahmad Fatoum
2025-03-13 7:54 ` Ahmad Fatoum [this message]
2025-03-14 16:08 ` [PATCH v2 1/6] arch: move promptless options to end of Kconfig file Sascha Hauer
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=20250313075416.3202194-6-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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