mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Baruch Siach <baruch@tkos.co.il>,
	Timur Tabi <B04825@freescale.com>,
	Scott Wood <scottwood@freescale.com>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Wolfram Sang <w.sang@pengutronix.de>,
	Grant Likely <grant.likely@secretlab.ca>,
	Anatolij Gustschin <agust@denx.de>,
	Paul Bolle <pebolle@tiscali.nl>,
	Sonny Rao <sonnyrao@linux.vnet.ibm.com>
Subject: Re: [RFC PATCH 02/17] powerpc: Split up PHYS_64BIT config option to fix "select" issues
Date: Thu, 10 Nov 2011 07:36:06 -0600	[thread overview]
Message-ID: <5AD601D7-7E16-42B0-BC5F-6D4333EC100E@kernel.crashing.org> (raw)
In-Reply-To: <1320883635-17194-3-git-send-email-Kyle.D.Moffett@boeing.com>


On Nov 9, 2011, at 6:07 PM, Kyle Moffett wrote:

> The "CONFIG_PHYS_64BIT" option violates the Kconfig best-practices in
> various colorful ways.  It has explicit dependencies, but it is also
> "select"ed by various CPUs and platforms.  It is not set on 64-bit
> systems, but it is used by a number of pieces of powerpc code to enable
> or disable 64-bit physical address support.
> 
> To resolve these issues, the option has now been split into 3:
> 
>  CONFIG_PHYS_64BIT_SUPPORTED:
>    This hidden option should be selected by any CPU type which supports
>    64-bit physical addresses.  This will enable the PHYS_64BIT option
>    to be selected.  It is (obviously) always set on PPC64.
> 
>  CONFIG_PHYS_64BIT_DT_REQUIRED:
>    This hidden option should be selected by any board or platform which
>    has >32-bit physical devices present in hardware.  If this is set
>    then the CONFIG_PHYS_64BIT option will be forcibly enabled and
>    hidden from the user.  It is (obviously) always set on PPC64.
> 
>  CONFIG_PHYS_64BIT:
>    This option is user-controllable, where allowed by CPU and platform
>    settings, and should never be pointed at with a "select" statement.
>    Due to the values of the above two options, this is never visible on
>    PPC64.
> 
> Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
> ---
> arch/powerpc/Kconfig                   |    4 ++--
> arch/powerpc/platforms/82xx/Kconfig    |    2 +-
> arch/powerpc/platforms/83xx/Kconfig    |    2 +-
> arch/powerpc/platforms/85xx/Kconfig    |   12 ++++++------
> arch/powerpc/platforms/86xx/Kconfig    |    1 +
> arch/powerpc/platforms/Kconfig.cputype |   25 ++++++++++++++++++-------
> 6 files changed, 29 insertions(+), 17 deletions(-)

I don't really see what this gets us and don't think we should make this change.

- k

> 
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index b177caa..27e31c5 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -18,10 +18,10 @@ config WORD_SIZE
> 	default 32 if !PPC64
> 
> config ARCH_PHYS_ADDR_T_64BIT
> -       def_bool PPC64 || PHYS_64BIT
> +	def_bool PHYS_64BIT
> 
> config ARCH_DMA_ADDR_T_64BIT
> -	def_bool ARCH_PHYS_ADDR_T_64BIT
> +	def_bool PHYS_64BIT
> 
> config MMU
> 	bool
> diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig
> index 7c7df40..849d403 100644
> --- a/arch/powerpc/platforms/82xx/Kconfig
> +++ b/arch/powerpc/platforms/82xx/Kconfig
> @@ -1,6 +1,6 @@
> menuconfig PPC_82xx
> 	bool "82xx-based boards (PQ II)"
> -	depends on 6xx
> +	depends on 6xx && !PHYS_64BIT
> 
> if PPC_82xx
> 
> diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
> index 670a033..1ed8877 100644
> --- a/arch/powerpc/platforms/83xx/Kconfig
> +++ b/arch/powerpc/platforms/83xx/Kconfig
> @@ -1,6 +1,6 @@
> menuconfig PPC_83xx
> 	bool "83xx-based boards"
> -	depends on 6xx
> +	depends on 6xx && !PHYS_64BIT
> 	select PPC_UDBG_16550
> 	select PPC_PCI_CHOICE
> 	select FSL_PCI if PCI
> diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
> index 9088381..37f9de7 100644
> --- a/arch/powerpc/platforms/85xx/Kconfig
> +++ b/arch/powerpc/platforms/85xx/Kconfig
> @@ -80,7 +80,7 @@ config P1010_RDB
> config P1022_DS
> 	bool "Freescale P1022 DS"
> 	select DEFAULT_UIMAGE
> -	select PHYS_64BIT	# The DTS has 36-bit addresses
> +	select PHYS_64BIT_DT_REQUIRED # The DTS has 36-bit addresses
> 	select SWIOTLB
> 	help
> 	  This option enables support for the Freescale P1022DS reference board.
> @@ -175,7 +175,7 @@ config P2041_RDB
> 	bool "Freescale P2041 RDB"
> 	select DEFAULT_UIMAGE
> 	select PPC_E500MC
> -	select PHYS_64BIT
> +	select PHYS_64BIT_DT_REQUIRED
> 	select SWIOTLB
> 	select ARCH_REQUIRE_GPIOLIB
> 	select GPIO_MPC8XXX
> @@ -189,7 +189,7 @@ config P3041_DS
> 	bool "Freescale P3041 DS"
> 	select DEFAULT_UIMAGE
> 	select PPC_E500MC
> -	select PHYS_64BIT
> +	select PHYS_64BIT_DT_REQUIRED
> 	select SWIOTLB
> 	select ARCH_REQUIRE_GPIOLIB
> 	select GPIO_MPC8XXX
> @@ -203,7 +203,7 @@ config P3060_QDS
> 	bool "Freescale P3060 QDS"
> 	select DEFAULT_UIMAGE
> 	select PPC_E500MC
> -	select PHYS_64BIT
> +	select PHYS_64BIT_DT_REQUIRED
> 	select SWIOTLB
> 	select MPC8xxx_GPIO
> 	select HAS_RAPIDIO
> @@ -216,7 +216,7 @@ config P4080_DS
> 	bool "Freescale P4080 DS"
> 	select DEFAULT_UIMAGE
> 	select PPC_E500MC
> -	select PHYS_64BIT
> +	select PHYS_64BIT_DT_REQUIRED
> 	select SWIOTLB
> 	select ARCH_REQUIRE_GPIOLIB
> 	select GPIO_MPC8XXX
> @@ -233,7 +233,7 @@ config P5020_DS
> 	select DEFAULT_UIMAGE
> 	select E500
> 	select PPC_E500MC
> -	select PHYS_64BIT
> +	select PHYS_64BIT_DT_REQUIRED
> 	select SWIOTLB
> 	select ARCH_REQUIRE_GPIOLIB
> 	select GPIO_MPC8XXX
> diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
> index 8d6599d..576eb43 100644
> --- a/arch/powerpc/platforms/86xx/Kconfig
> +++ b/arch/powerpc/platforms/86xx/Kconfig
> @@ -5,6 +5,7 @@ menuconfig PPC_86xx
> 	select FSL_SOC
> 	select ALTIVEC
> 	select ARCH_WANT_OPTIONAL_GPIOLIB
> +	select PHYS_64BIT_SUPPORTED
> 	help
> 	  The Freescale E600 SoCs have 74xx cores.
> 
> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
> index 9210e94..0ab01b0 100644
> --- a/arch/powerpc/platforms/Kconfig.cputype
> +++ b/arch/powerpc/platforms/Kconfig.cputype
> @@ -26,6 +26,7 @@ config PPC_BOOK3S_32
> 
> config PPC_85xx
> 	bool "Freescale 85xx"
> +	select PHYS_64BIT_SUPPORTED
> 	select E500
> 
> config PPC_8xx
> @@ -47,7 +48,8 @@ config 44x
> 	select PPC_UDBG_16550
> 	select 4xx_SOC
> 	select PPC_PCI_CHOICE
> -	select PHYS_64BIT
> +	select PHYS_64BIT_SUPPORTED
> +	select PHYS_64BIT_DT_REQUIRED
> 
> config E200
> 	bool "Freescale e200"
> @@ -187,14 +189,20 @@ config PPC_FSL_BOOK3E
> 	select PPC_SMP_MUXED_IPI
> 	default y if FSL_BOOKE
> 
> -config PTE_64BIT
> -	bool
> -	depends on 44x || E500 || PPC_86xx
> -	default y if PHYS_64BIT
> +## Only some 32-bit CPUs support 64-bit physical addresses
> +config PHYS_64BIT_SUPPORTED
> +	def_bool PPC64
> +
> +## Some 32-bit system device trees have >32-bit physical addresses, and so
> +## the kernel won't boot unless those are supported.
> +config PHYS_64BIT_DT_REQUIRED
> +	def_bool PPC64
> 
> +## DO NOT "select" this user-visible symbol, select the two above instead!
> config PHYS_64BIT
> -	bool 'Large physical address support' if E500 || PPC_86xx
> -	depends on (44x || E500 || PPC_86xx) && !PPC_83xx && !PPC_82xx
> +	def_bool PHYS_64BIT_DT_REQUIRED
> +	prompt 'Large physical address support' if !PHYS_64BIT_DT_REQUIRED
> +	depends on PHYS_64BIT_SUPPORTED
> 	---help---
> 	  This option enables kernel support for larger than 32-bit physical
> 	  addresses.  This feature may not be available on all cores.
> @@ -205,6 +213,9 @@ config PHYS_64BIT
> 
> 	  If in doubt, say N here.
> 
> +config PTE_64BIT
> +	def_bool PHYS_64BIT
> +
> config ALTIVEC
> 	bool "AltiVec Support"
> 	depends on 6xx || POWER4
> -- 
> 1.7.2.5


  reply	other threads:[~2011-11-10 13:36 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E42AB6F.1050900@freescale.com>
2011-11-10  0:03 ` [RFC PATCH 00/17] powerpc/e500: separate e500 from e500mc Kyle Moffett
2011-11-10 13:59   ` Kumar Gala
2011-11-10 16:17     ` Moffett, Kyle D
2011-11-10 16:30       ` Kumar Gala
2011-11-10 16:54         ` Scott Wood
2011-11-11  0:38           ` Moffett, Kyle D
2011-11-11  4:40             ` Benjamin Herrenschmidt
2011-11-15  2:32               ` [RFC PATCH 0/2] powerpc: CPU cache op cleanup Kyle Moffett
2011-11-15 22:29                 ` Benjamin Herrenschmidt
2011-11-15 22:45                   ` Moffett, Kyle D
2011-11-15 23:46                     ` Benjamin Herrenschmidt
2011-11-16  0:25                       ` Moffett, Kyle D
2011-11-16  4:40                     ` Paul Mackerras
2011-11-16 20:52                       ` Moffett, Kyle D
2011-11-15  2:32               ` [RFC PATCH 1/2] powerpc: Remove duplicate cacheable_memcpy/memzero functions Kyle Moffett
2011-11-15 22:31                 ` Benjamin Herrenschmidt
2011-11-15  2:36               ` [RFC PATCH 00/17] powerpc/e500: separate e500 from e500mc Moffett, Kyle D
2011-11-15  2:41                 ` Tabi Timur-B04825
2011-11-15  3:40                   ` Kyle Moffett
2011-11-15 22:41                 ` Benjamin Herrenschmidt
2011-11-10  0:06 ` Kyle Moffett
2011-11-10  0:06 ` [RFC PATCH 01/17] powerpc/mpic: Fix bogus CONFIG_BOOKE conditional Kyle Moffett
2011-11-10 13:33   ` Kumar Gala
2011-11-10  0:07 ` [RFC PATCH 02/17] powerpc: Split up PHYS_64BIT config option to fix "select" issues Kyle Moffett
2011-11-10 13:36   ` Kumar Gala [this message]
2011-11-10 14:04   ` Timur Tabi
2011-11-10 16:31     ` Moffett, Kyle D
2011-11-10 16:50       ` Timur Tabi
2011-11-11  4:50         ` Benjamin Herrenschmidt
2011-11-11 13:12           ` Tabi Timur-B04825
2011-11-10  0:07 ` [RFC PATCH 03/17] fsl_rio: Remove FreeScale e500 conditionals Kyle Moffett
2011-11-10  0:07 ` [RFC PATCH 04/17] powerpc: Allow multiple machine-check handlers Kyle Moffett
2011-11-10 13:37   ` Kumar Gala
2011-11-10 16:33     ` Moffett, Kyle D
2011-11-10  0:07 ` [RFC PATCH 05/17] powerpc/e500: Remove unused "default e500" from CPU table Kyle Moffett
2011-11-10  0:07 ` [RFC PATCH 06/17] powerpc/e500: Split FreeScale e500v1/v2 and e500mc config options Kyle Moffett
2011-11-10  0:07 ` [RFC PATCH 07/17] powerpc/e200: Rename CONFIG_E200 => CONFIG_FSL_E200 Kyle Moffett
2011-11-10  0:07 ` [RFC PATCH 08/17] powerpc/e500: Remove conditional "lwsync" substitution Kyle Moffett
2011-11-10 13:40   ` Kumar Gala
2011-11-10 16:31     ` Scott Wood
2011-11-10 16:42       ` Kumar Gala
2011-11-10 17:03         ` Scott Wood
2011-11-10 20:27           ` Moffett, Kyle D
2011-11-10 20:34             ` Kumar Gala
2011-11-11  4:45               ` Benjamin Herrenschmidt
2011-11-11  4:43             ` Benjamin Herrenschmidt
2011-11-10  0:07 ` [RFC PATCH 09/17] powerpc/e500: Split idle handlers for e500v1/v2 and e500mc Kyle Moffett
2011-11-10  0:07 ` [RFC PATCH 10/17] powerpc/e500: Fix up the last references to CONFIG_PPC_E500MC Kyle Moffett
2011-11-10  0:07 ` [RFC PATCH 11/17] powerpc/e500: Use the correct assembler flags for e500mc and e5500 Kyle Moffett
2011-11-10  0:07 ` [RFC PATCH 12/17] powerpc/e500: Separate e500mc CPU table entries from e500v1/e500v2 Kyle Moffett
2011-11-10  0:07 ` [RFC PATCH 13/17] powerpc/e500: Add a new CONFIG_FSL_E5500 option for the e5500 Kyle Moffett
2011-11-10 13:46   ` Kumar Gala
2011-11-10 16:49   ` Scott Wood
2011-11-10  0:07 ` [RFC PATCH 14/17] powerpc/e500: Don't make kgdb use e500v1/e500v2 registers on e500mc Kyle Moffett
2011-11-10 16:46   ` Scott Wood
2011-11-10  0:07 ` [RFC PATCH 15/17] powerpc/e500: Fix up all remaining code uses of CONFIG_E500 Kyle Moffett
2011-11-10  0:07 ` [RFC PATCH 16/17] powerpc/e500: Make __setup_cpu_{e200,e500,e500mc,e5500} optional Kyle Moffett
2011-11-10 16:47   ` Scott Wood
2011-11-10 18:52     ` Kumar Gala
2011-11-10  0:07 ` [RFC PATCH 17/17] powerpc/e500: Finally remove "CONFIG_E500" Kyle Moffett

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=5AD601D7-7E16-42B0-BC5F-6D4333EC100E@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=B04825@freescale.com \
    --cc=Kyle.D.Moffett@boeing.com \
    --cc=agust@denx.de \
    --cc=baruch@tkos.co.il \
    --cc=benh@kernel.crashing.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=paulus@samba.org \
    --cc=pebolle@tiscali.nl \
    --cc=scottwood@freescale.com \
    --cc=sonnyrao@linux.vnet.ibm.com \
    --cc=w.sang@pengutronix.de \
    /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

all inboxes | Powered by JetHome®