[U-Boot] [PATCH v2] treewide: move CONFIG_PHYS_64BIT to Kconfig

york sun york.sun at nxp.com
Mon Jul 25 19:19:27 CEST 2016


On 07/25/2016 03:58 AM, Masahiro Yamada wrote:
> We need to ensure that CONFIG_PHYS_64BIT is configured via Kconfig so
> that it is always available to the build system.  Otherwise we can run
> into cases where we have inconsistent sizes of certain attributes.
>
> Ravi Babu reported offset mismatch of struct dwc3 across files since
> commit 95ebc253e6d4 ("types.h: move and redefine resource_size_t").
> Since the commit, resource_addr_t points to phys_addr_t, whose size
> is dependent on CONFIG_PHYS_64BIT for ARM architecture.
>
> I tried my best to use "select" where possible (for example, ARMv8
> architecture) because I think this kind of option is generally user-
> unconfigurable.  However, I see some of PowerPC boards have 36BIT
> defconfigs as well as 32BIT ones.  I moved CONFIG_PHYS_64BIT to the
> defconfigs for such boards.
>
> CONFIG_36BIT is no longer referenced, so all of the defines were
> removed from CONFIG_SYS_EXTRA_OPTIONS.
>
> Fixes: 95ebc253e6d4 ("types.h: move and redefine resource_size_t")
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> Reported-by: Ravi Babu <ravibabu at ti.com>
> Acked-by: Stefan Roese <sr at denx.de>
> ---
>
> Changes in v2:
>   - Clean 36BIT, PHYS_64BIT from CONFIG_SYS_EXTRA_OPTIONS
>     (generated by  http://patchwork.ozlabs.org/patch/652215/)
>
>  Kconfig                                               |  8 ++++++++
>  arch/arm/Kconfig                                      |  1 +
>  arch/arm/cpu/armv7/omap5/Kconfig                      |  1 +
>  arch/arm/include/asm/config.h                         |  1 -
>  arch/powerpc/cpu/mpc85xx/Kconfig                      | 18 ++++++++++++++++++
>  arch/powerpc/cpu/ppc4xx/Kconfig                       |  1 +
>  configs/C29XPCIE_NAND_defconfig                       |  2 +-
>  configs/C29XPCIE_NOR_SECBOOT_defconfig                |  2 +-
>  configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig           |  2 +-
>  configs/C29XPCIE_SPIFLASH_defconfig                   |  2 +-
>  configs/C29XPCIE_defconfig                            |  2 +-
>  configs/MPC8536DS_36BIT_defconfig                     |  2 +-
>  configs/MPC8548CDS_36BIT_defconfig                    |  2 +-
>  configs/MPC8572DS_36BIT_defconfig                     |  2 +-
>  configs/MPC8641HPCN_36BIT_defconfig                   |  2 +-
>  configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig      |  5 +++--
>  configs/P1010RDB-PA_36BIT_NAND_defconfig              |  3 ++-
>  configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig       |  5 +++--
>  configs/P1010RDB-PA_36BIT_NOR_defconfig               |  3 ++-
>  configs/P1010RDB-PA_36BIT_SDCARD_defconfig            |  3 ++-
>  configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig  |  5 +++--
>  configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig          |  3 ++-
>  configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig      |  5 +++--
>  configs/P1010RDB-PB_36BIT_NAND_defconfig              |  3 ++-
>  configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig       |  5 +++--
>  configs/P1010RDB-PB_36BIT_NOR_defconfig               |  3 ++-
>  configs/P1010RDB-PB_36BIT_SDCARD_defconfig            |  3 ++-
>  configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig  |  5 +++--
>  configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig          |  3 ++-
>  configs/P1020MBG-PC_36BIT_SDCARD_defconfig            |  3 ++-
>  configs/P1020MBG-PC_36BIT_defconfig                   |  3 ++-
>  configs/P1020RDB-PC_36BIT_NAND_defconfig              |  3 ++-
>  configs/P1020RDB-PC_36BIT_SDCARD_defconfig            |  3 ++-
>  configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig          |  3 ++-
>  configs/P1020RDB-PC_36BIT_defconfig                   |  3 ++-
>  configs/P1020UTM-PC_36BIT_SDCARD_defconfig            |  3 ++-
>  configs/P1020UTM-PC_36BIT_defconfig                   |  3 ++-
>  configs/P1021RDB-PC_36BIT_NAND_defconfig              |  3 ++-
>  configs/P1021RDB-PC_36BIT_SDCARD_defconfig            |  3 ++-
>  configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig          |  3 ++-
>  configs/P1021RDB-PC_36BIT_defconfig                   |  3 ++-
>  configs/P1022DS_36BIT_NAND_defconfig                  |  3 ++-
>  configs/P1022DS_36BIT_SDCARD_defconfig                |  3 ++-
>  configs/P1022DS_36BIT_SPIFLASH_defconfig              |  3 ++-
>  configs/P1022DS_36BIT_defconfig                       |  2 +-
>  configs/P1024RDB_36BIT_defconfig                      |  3 ++-
>  configs/P1025RDB_36BIT_defconfig                      |  3 ++-
>  configs/P2020RDB-PC_36BIT_NAND_defconfig              |  3 ++-
>  configs/P2020RDB-PC_36BIT_SDCARD_defconfig            |  3 ++-
>  configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig          |  3 ++-
>  configs/P2020RDB-PC_36BIT_defconfig                   |  3 ++-
>  configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig |  3 ++-
>  configs/controlcenterd_36BIT_SDCARD_defconfig         |  3 ++-
>  include/configs/B4860QDS.h                            |  1 -
>  include/configs/C29XPCIE.h                            |  1 -
>  include/configs/MPC8536DS.h                           |  4 ----
>  include/configs/MPC8548CDS.h                          |  4 ----
>  include/configs/MPC8572DS.h                           |  4 ----
>  include/configs/MPC8641HPCN.h                         |  1 -
>  include/configs/P1010RDB.h                            |  3 ---
>  include/configs/P1022DS.h                             |  4 ----
>  include/configs/P2041RDB.h                            |  1 -
>  include/configs/P3041DS.h                             |  1 -
>  include/configs/P4080DS.h                             |  1 -
>  include/configs/P5020DS.h                             |  1 -
>  include/configs/P5040DS.h                             |  1 -
>  include/configs/T102xQDS.h                            |  1 -
>  include/configs/T102xRDB.h                            |  1 -
>  include/configs/T1040QDS.h                            |  1 -
>  include/configs/T104xRDB.h                            |  1 -
>  include/configs/T208xQDS.h                            |  1 -
>  include/configs/T208xRDB.h                            |  1 -
>  include/configs/T4240QDS.h                            |  1 -
>  include/configs/T4240RDB.h                            |  1 -
>  include/configs/controlcenterd.h                      |  4 ----
>  include/configs/cyrus.h                               |  2 --
>  include/configs/dra7xx_evm.h                          |  1 -
>  include/configs/katmai.h                              |  1 -
>  include/configs/km/kmp204x-common.h                   |  1 -
>  include/configs/p1_p2_rdb_pc.h                        |  4 ----
>  include/configs/qemu-ppce500.h                        |  2 --
>  81 files changed, 119 insertions(+), 104 deletions(-)
>
> diff --git a/Kconfig b/Kconfig
> index 335efcd..f80216f 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -126,6 +126,14 @@ config TOOLS_DEBUG
>  	  debug through the source code, etc.
>
>  endif
> +
> +config PHYS_64BIT
> +	bool "64bit physical address support"
> +	help
> +	  Say Y here to support 64bit physical memory address.
> +	  This can be used not only for 64bit SoCs, but also for
> +	  large physical address extention on 32bit SoCs.
> +
>  endmenu		# General setup
>
>  menu "Boot images"
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 397981a..fba96cd 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -6,6 +6,7 @@ config SYS_ARCH
>
>  config ARM64
>  	bool
> +	select PHYS_64BIT
>
>  config DMA_ADDR_T_64BIT
>  	bool
> diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
> index 4fb5ef9..a8600b1 100644
> --- a/arch/arm/cpu/armv7/omap5/Kconfig
> +++ b/arch/arm/cpu/armv7/omap5/Kconfig
> @@ -13,6 +13,7 @@ config TARGET_OMAP5_UEVM
>  config TARGET_DRA7XX_EVM
>  	bool "TI DRA7XX"
>  	select TI_I2C_BOARD_DETECT
> +	select PHYS_64BIT
>
>  config TARGET_AM57XX_EVM
>  	bool "AM57XX"
> diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h
> index 435fc45..1ad221a 100644
> --- a/arch/arm/include/asm/config.h
> +++ b/arch/arm/include/asm/config.h
> @@ -11,7 +11,6 @@
>  #define CONFIG_SYS_BOOT_RAMDISK_HIGH
>
>  #ifdef CONFIG_ARM64
> -#define CONFIG_PHYS_64BIT
>  #define CONFIG_STATIC_RELA
>  #endif
>
> diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig
> index 0b89157..9bcbda0 100644
> --- a/arch/powerpc/cpu/mpc85xx/Kconfig
> +++ b/arch/powerpc/cpu/mpc85xx/Kconfig
> @@ -17,6 +17,7 @@ config TARGET_SOCRATES
>  config TARGET_B4860QDS
>  	bool "Support B4860QDS"
>  	select SUPPORT_SPL
> +	select PHYS_64BIT
>
>  config TARGET_BSC9131RDB
>  	bool "Support BSC9131RDB"
> @@ -30,18 +31,23 @@ config TARGET_C29XPCIE
>  	bool "Support C29XPCIE"
>  	select SUPPORT_SPL
>  	select SUPPORT_TPL
> +	select PHYS_64BIT
>
>  config TARGET_P3041DS
>  	bool "Support P3041DS"
> +	select PHYS_64BIT
>
>  config TARGET_P4080DS
>  	bool "Support P4080DS"
> +	select PHYS_64BIT
>
>  config TARGET_P5020DS
>  	bool "Support P5020DS"
> +	select PHYS_64BIT
>
>  config TARGET_P5040DS
>  	bool "Support P5040DS"
> +	select PHYS_64BIT
>
>  config TARGET_MPC8536DS
>  	bool "Support MPC8536DS"
> @@ -96,46 +102,57 @@ config TARGET_P1_TWR
>
>  config TARGET_P2041RDB
>  	bool "Support P2041RDB"
> +	select PHYS_64BIT
>
>  config TARGET_QEMU_PPCE500
>  	bool "Support qemu-ppce500"
> +	select PHYS_64BIT
>
>  config TARGET_T102XQDS
>  	bool "Support T102xQDS"
>  	select SUPPORT_SPL
> +	select PHYS_64BIT
>
>  config TARGET_T102XRDB
>  	bool "Support T102xRDB"
>  	select SUPPORT_SPL
> +	select PHYS_64BIT
>
>  config TARGET_T1040QDS
>  	bool "Support T1040QDS"
> +	select PHYS_64BIT
>
>  config TARGET_T104XRDB
>  	bool "Support T104xRDB"
>  	select SUPPORT_SPL
> +	select PHYS_64BIT
>
>  config TARGET_T208XQDS
>  	bool "Support T208xQDS"
>  	select SUPPORT_SPL
> +	select PHYS_64BIT
>
>  config TARGET_T208XRDB
>  	bool "Support T208xRDB"
>  	select SUPPORT_SPL
> +	select PHYS_64BIT
>
>  config TARGET_T4240QDS
>  	bool "Support T4240QDS"
>  	select SUPPORT_SPL
> +	select PHYS_64BIT
>
>  config TARGET_T4240RDB
>  	bool "Support T4240RDB"
>  	select SUPPORT_SPL
> +	select PHYS_64BIT
>
>  config TARGET_CONTROLCENTERD
>  	bool "Support controlcenterd"
>
>  config TARGET_KMP204X
>  	bool "Support kmp204x"
> +	select PHYS_64BIT
>
>  config TARGET_XPEDITE520X
>  	bool "Support xpedite520x"
> @@ -151,6 +168,7 @@ config TARGET_UCP1020
>
>  config TARGET_CYRUS
>  	bool "Support Varisys Cyrus"
> +	select PHYS_64BIT
>
>  endchoice
>
> diff --git a/arch/powerpc/cpu/ppc4xx/Kconfig b/arch/powerpc/cpu/ppc4xx/Kconfig
> index 36af1b9..92a330d 100644
> --- a/arch/powerpc/cpu/ppc4xx/Kconfig
> +++ b/arch/powerpc/cpu/ppc4xx/Kconfig
> @@ -30,6 +30,7 @@ config TARGET_CANYONLANDS
>
>  config TARGET_KATMAI
>  	bool "Support katmai"
> +	select PHYS_64BIT
>
>  config TARGET_KILAUEA
>  	bool "Support kilauea"
> diff --git a/configs/C29XPCIE_NAND_defconfig b/configs/C29XPCIE_NAND_defconfig
> index bc2ddca..7db345e 100644
> --- a/configs/C29XPCIE_NAND_defconfig
> +++ b/configs/C29XPCIE_NAND_defconfig
> @@ -7,7 +7,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> -CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,NAND"
> +CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,NAND"
>  CONFIG_BOOTDELAY=-1
>  CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_SF=y
> diff --git a/configs/C29XPCIE_NOR_SECBOOT_defconfig b/configs/C29XPCIE_NOR_SECBOOT_defconfig
> index 99b437a..8b81f9f 100644
> --- a/configs/C29XPCIE_NOR_SECBOOT_defconfig
> +++ b/configs/C29XPCIE_NOR_SECBOOT_defconfig
> @@ -6,7 +6,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> -CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,SECURE_BOOT"
> +CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,SECURE_BOOT"
>  CONFIG_BOOTDELAY=-1
>  CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_SF=y

Masahiro,

You added CONFIG_PHYS_64BIT=y to most defconfig for powerpc, but not 
C29XPCI. Did you just leave them out on purpose, or just missed?

York


More information about the U-Boot mailing list