linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable
@ 2020-01-20 14:43 wangwenhu
  2020-01-21  3:25 ` Scott Wood
  0 siblings, 1 reply; 9+ messages in thread
From: wangwenhu @ 2020-01-20 14:43 UTC (permalink / raw)
  To: Scott Wood, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel
  Cc: trivial, wenhu.wang

From: wangwenhu <wenhu.wang@vivo.com>

When generating .config file with menuconfig on Freescale BOOKE
SOC, FSL_85XX_CACHE_SRAM is not configurable for the lack of
description in the Kconfig field, which makes it impossible
to support L2Cache-Sram driver. Add a description to make it
configurable.

Signed-off-by: wangwenhu <wenhu.wang@vivo.com>
---
 arch/powerpc/platforms/85xx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index fa3d29dcb57e..ee5ba10b98cb 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -17,7 +17,7 @@ if FSL_SOC_BOOKE
 if PPC32

 config FSL_85XX_CACHE_SRAM
-   bool
+   bool "Freescale Cache-Sram"
    select PPC_LIB_RHEAP
    help
      When selected, this option enables cache-sram support
--
2.23.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable
  2020-01-20 14:43 [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable wangwenhu
@ 2020-01-21  3:25 ` Scott Wood
  2020-01-21  5:20   ` 王文虎
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Wood @ 2020-01-21  3:25 UTC (permalink / raw)
  To: wangwenhu, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel
  Cc: trivial, wenhu.wang, Rai Harninder

On Mon, 2020-01-20 at 06:43 -0800, wangwenhu wrote:
> From: wangwenhu <wenhu.wang@vivo.com>
> 
> When generating .config file with menuconfig on Freescale BOOKE
> SOC, FSL_85XX_CACHE_SRAM is not configurable for the lack of
> description in the Kconfig field, which makes it impossible
> to support L2Cache-Sram driver. Add a description to make it
> configurable.
> 
> Signed-off-by: wangwenhu <wenhu.wang@vivo.com>

The intent was that drivers using the SRAM API would select the symbol.  What
is the use case for selecting it manually?

Since this code was added almost ten years ago and there are still no (in-
tree?) users of the API, we should just remove the sram code (unless this
prods someone to submit such a user very soon).

-Scott



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re:[PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable
  2020-01-21  3:25 ` Scott Wood
@ 2020-01-21  5:20   ` 王文虎
  2020-01-21  5:49     ` [PATCH] " Scott Wood
  0 siblings, 1 reply; 9+ messages in thread
From: 王文虎 @ 2020-01-21  5:20 UTC (permalink / raw)
  To: Scott Wood
  Cc: wangwenhu, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel, trivial,
	Rai Harninder

From: Scott Wood <oss@buserror.net>
Date: 2020-01-21 11:25:25
To:  wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org
Cc:  trivial@kernel.org,wenhu.wang@vivo.com,Rai Harninder <harninder.rai@nxp.com>
Subject: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On Mon, 2020-01-20 at 06:43 -0800, wangwenhu wrote:
>> From: wangwenhu <wenhu.wang@vivo.com>
>> 
>> When generating .config file with menuconfig on Freescale BOOKE
>> SOC, FSL_85XX_CACHE_SRAM is not configurable for the lack of
>> description in the Kconfig field, which makes it impossible
>> to support L2Cache-Sram driver. Add a description to make it
>> configurable.
>> 
>> Signed-off-by: wangwenhu <wenhu.wang@vivo.com>
>
>The intent was that drivers using the SRAM API would select the symbol.  What
>is the use case for selecting it manually?
>

With a repository of multiple products(meaning different defconfigs) and multiple
developers, the Kconfigs of the Kernel Source Tree change frequently. So the "make menuconfig"
process is needed for defconfigs' re-generating or updating for the complexity of dependencies
between different features defined in the Kconfigs.

>Since this code was added almost ten years ago and there are still no (in-
>tree?) users of the API, we should just remove the sram code (unless this
>prods someone to submit such a user very soon).
>

Yes, pretty long a time. But we DO really use the API now for PPCE500/Freescale SoC.
Like sometimes we need to reset the whole RAM, then the L2-Cache would be used as
SRAM for backup using. Since it is useful for us now, a re-consideration is recommanded.

>-Scott
>
>

--
Wenhu
vivo


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable
  2020-01-21  5:20   ` 王文虎
@ 2020-01-21  5:49     ` Scott Wood
  2020-01-21  6:38       ` 王文虎
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Wood @ 2020-01-21  5:49 UTC (permalink / raw)
  To: 王文虎
  Cc: wangwenhu, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel, trivial,
	Rai Harninder

On Tue, 2020-01-21 at 13:20 +0800, 王文虎 wrote:
> From: Scott Wood <oss@buserror.net>
> Date: 2020-01-21 11:25:25
> To:  wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,
> Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
> paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
> linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org
> Cc:  trivial@kernel.org,wenhu.wang@vivo.com,Rai Harninder <
> harninder.rai@nxp.com>
> Subject: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM
> configurable>On Mon, 2020-01-20 at 06:43 -0800, wangwenhu wrote:
> > > From: wangwenhu <wenhu.wang@vivo.com>
> > > 
> > > When generating .config file with menuconfig on Freescale BOOKE
> > > SOC, FSL_85XX_CACHE_SRAM is not configurable for the lack of
> > > description in the Kconfig field, which makes it impossible
> > > to support L2Cache-Sram driver. Add a description to make it
> > > configurable.
> > > 
> > > Signed-off-by: wangwenhu <wenhu.wang@vivo.com>
> > 
> > The intent was that drivers using the SRAM API would select the
> > symbol.  What
> > is the use case for selecting it manually?
> > 
> 
> With a repository of multiple products(meaning different defconfigs) and
> multiple
> developers, the Kconfigs of the Kernel Source Tree change frequently. So the
> "make menuconfig"
> process is needed for defconfigs' re-generating or updating for the
> complexity of dependencies
> between different features defined in the Kconfigs.

That doesn't answer my question of how the SRAM code would be useful other
than to some other driver that uses the API (which would use "select").  There
is no userspace API.  You could use the kernel command line to configure the
SRAM but you need to get the address of it for it to be useful.

> > Since this code was added almost ten years ago and there are still no (in-
> > tree?) users of the API, we should just remove the sram code (unless this
> > prods someone to submit such a user very soon).
> > 
> 
> Yes, pretty long a time. But we DO really use the API now for
> PPCE500/Freescale SoC.

I do not see any users in the kernel tree.  Are you talking about out-of-tree
code, or something that you've submitted or will submit soon?  Or are you
accessing it via /dev/mem?

> Like sometimes we need to reset the whole RAM, then the L2-Cache would be
> used as
> SRAM for backup using. Since it is useful for us now, a re-consideration is
> recommanded.

Where is the code that would do this?

-Scott
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re:Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable
  2020-01-21  5:49     ` [PATCH] " Scott Wood
@ 2020-01-21  6:38       ` 王文虎
  2020-02-29 23:12         ` Scott Wood
  0 siblings, 1 reply; 9+ messages in thread
From: 王文虎 @ 2020-01-21  6:38 UTC (permalink / raw)
  To: Scott Wood
  Cc: wangwenhu, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel, trivial,
	Rai Harninder

发件人:Scott Wood <oss@buserror.net>
发送日期:2020-01-21 13:49:59
收件人:"王文虎" <wenhu.wang@vivo.com>
抄送人:wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org,trivial@kernel.org,Rai Harninder <harninder.rai@nxp.com>
主题:Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On Tue, 2020-01-21 at 13:20 +0800, 王文虎 wrote:
>> From: Scott Wood <oss@buserror.net>
>> Date: 2020-01-21 11:25:25
>> To:  wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,
>> Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
>> paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
>> linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org
>> Cc:  trivial@kernel.org,wenhu.wang@vivo.com,Rai Harninder <
>> harninder.rai@nxp.com>
>> Subject: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM
>> configurable>On Mon, 2020-01-20 at 06:43 -0800, wangwenhu wrote:
>> > > From: wangwenhu <wenhu.wang@vivo.com>
>> > > 
>> > > When generating .config file with menuconfig on Freescale BOOKE
>> > > SOC, FSL_85XX_CACHE_SRAM is not configurable for the lack of
>> > > description in the Kconfig field, which makes it impossible
>> > > to support L2Cache-Sram driver. Add a description to make it
>> > > configurable.
>> > > 
>> > > Signed-off-by: wangwenhu <wenhu.wang@vivo.com>
>> > 
>> > The intent was that drivers using the SRAM API would select the
>> > symbol.  What
>> > is the use case for selecting it manually?
>> > 
>> 
>> With a repository of multiple products(meaning different defconfigs) and
>> multiple
>> developers, the Kconfigs of the Kernel Source Tree change frequently. So the
>> "make menuconfig"
>> process is needed for defconfigs' re-generating or updating for the
>> complexity of dependencies
>> between different features defined in the Kconfigs.
>
>That doesn't answer my question of how the SRAM code would be useful other
>than to some other driver that uses the API (which would use "select").  There
>is no userspace API.  You could use the kernel command line to configure the
>SRAM but you need to get the address of it for it to be useful.
>

Like you've asked below, via /dev/mem or direct calling within the Kernel.
And they are not submitted yes, under development.

>> > Since this code was added almost ten years ago and there are still no (in-
>> > tree?) users of the API, we should just remove the sram code (unless this
>> > prods someone to submit such a user very soon).
>> > 
>> 
>> Yes, pretty long a time. But we DO really use the API now for
>> PPCE500/Freescale SoC.
>
>I do not see any users in the kernel tree.  Are you talking about out-of-tree
>code, or something that you've submitted or will submit soon?  Or are you
>accessing it via /dev/mem?
>

Both, but not submitted yet, and partly under development.

>> Like sometimes we need to reset the whole RAM, then the L2-Cache would be
>> used as
>> SRAM for backup using. Since it is useful for us now, a re-consideration is
>> recommanded.
>
>Where is the code that would do this?
>

Currently under development, and not submitted yet.

>-Scott
>> 
>

Wenhu


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable
  2020-01-21  6:38       ` 王文虎
@ 2020-02-29 23:12         ` Scott Wood
  2020-03-02  4:42           ` 王文虎
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Wood @ 2020-02-29 23:12 UTC (permalink / raw)
  To: 王文虎
  Cc: wangwenhu, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel, trivial,
	Rai Harninder

On Tue, 2020-01-21 at 14:38 +0800, 王文虎 wrote:
> 发件人:Scott Wood <oss@buserror.net>
> 发送日期:2020-01-21 13:49:59
> 收件人:"王文虎" <wenhu.wang@vivo.com>
> 抄送人:wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,B
> enjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
> paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
> linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org,
> trivial@kernel.org,Rai Harninder <harninder.rai@nxp.com>
> 主题:Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On
> Tue, 2020-01-21 at 13:20 +0800, 王文虎 wrote:
> > > From: Scott Wood <oss@buserror.net>
> > > Date: 2020-01-21 11:25:25
> > > To:  wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <
> > > galak@kernel.crashing.org>,
> > > Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
> > > paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
> > > linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org
> > > Cc:  trivial@kernel.org,wenhu.wang@vivo.com,Rai Harninder <
> > > harninder.rai@nxp.com>
> > > Subject: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM
> > > configurable>On Mon, 2020-01-20 at 06:43 -0800, wangwenhu wrote:
> > > > > From: wangwenhu <wenhu.wang@vivo.com>
> > > > > 
> > > > > When generating .config file with menuconfig on Freescale BOOKE
> > > > > SOC, FSL_85XX_CACHE_SRAM is not configurable for the lack of
> > > > > description in the Kconfig field, which makes it impossible
> > > > > to support L2Cache-Sram driver. Add a description to make it
> > > > > configurable.
> > > > > 
> > > > > Signed-off-by: wangwenhu <wenhu.wang@vivo.com>
> > > > 
> > > > The intent was that drivers using the SRAM API would select the
> > > > symbol.  What
> > > > is the use case for selecting it manually?
> > > > 
> > > 
> > > With a repository of multiple products(meaning different defconfigs) and
> > > multiple
> > > developers, the Kconfigs of the Kernel Source Tree change frequently. So
> > > the
> > > "make menuconfig"
> > > process is needed for defconfigs' re-generating or updating for the
> > > complexity of dependencies
> > > between different features defined in the Kconfigs.
> > 
> > That doesn't answer my question of how the SRAM code would be useful other
> > than to some other driver that uses the API (which would use
> > "select").  There
> > is no userspace API.  You could use the kernel command line to configure
> > the
> > SRAM but you need to get the address of it for it to be useful.
> > 
> 
> Like you've asked below, via /dev/mem or direct calling within the Kernel.
> And they are not submitted yes, under development.

If they are calling within the kernel, then whatever driver that is should
select FSL_85XX_CACHE_SRAM.  Directly accessing /dev/mem without any way for
the kernel to advertise where it is or which parts of SRAM are available for
use sounds like a bad idea.

-Scott



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable
  2020-02-29 23:12         ` Scott Wood
@ 2020-03-02  4:42           ` 王文虎
  2020-03-02  8:58             ` Scott Wood
  0 siblings, 1 reply; 9+ messages in thread
From: 王文虎 @ 2020-03-02  4:42 UTC (permalink / raw)
  To: Scott Wood
  Cc: wangwenhu, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel, trivial,
	Rai Harninder

发件人:Scott Wood <oss@buserror.net>
发送日期:2020-03-01 07:12:58
收件人:"王文虎" <wenhu.wang@vivo.com>
抄送人:wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org,trivial@kernel.org,Rai Harninder <harninder.rai@nxp.com>
主题:Re: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On Tue, 2020-01-21 at 14:38 +0800, 王文虎 wrote:
>> 发件人:Scott Wood <oss@buserror.net>
>> 发送日期:2020-01-21 13:49:59
>> 收件人:"王文虎" <wenhu.wang@vivo.com>
>> 抄送人:wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,B
>> enjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
>> paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
>> linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org,
>> trivial@kernel.org,Rai Harninder <harninder.rai@nxp.com>
>> 主题:Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On
>> Tue, 2020-01-21 at 13:20 +0800, 王文虎 wrote:
>> > > From: Scott Wood <oss@buserror.net>
>> > > Date: 2020-01-21 11:25:25
>> > > To:  wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <
>> > > galak@kernel.crashing.org>,
>> > > Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
>> > > paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
>> > > linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org
>> > > Cc:  trivial@kernel.org,wenhu.wang@vivo.com,Rai Harninder <
>> > > harninder.rai@nxp.com>
>> > > Subject: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM
>> > > configurable>On Mon, 2020-01-20 at 06:43 -0800, wangwenhu wrote:
>> > > > > From: wangwenhu <wenhu.wang@vivo.com>
>> > > > > 
>> > > > > When generating .config file with menuconfig on Freescale BOOKE
>> > > > > SOC, FSL_85XX_CACHE_SRAM is not configurable for the lack of
>> > > > > description in the Kconfig field, which makes it impossible
>> > > > > to support L2Cache-Sram driver. Add a description to make it
>> > > > > configurable.
>> > > > > 
>> > > > > Signed-off-by: wangwenhu <wenhu.wang@vivo.com>
>> > > > 
>> > > > The intent was that drivers using the SRAM API would select the
>> > > > symbol.  What
>> > > > is the use case for selecting it manually?
>> > > > 
>> > > 
>> > > With a repository of multiple products(meaning different defconfigs) and
>> > > multiple
>> > > developers, the Kconfigs of the Kernel Source Tree change frequently. So
>> > > the
>> > > "make menuconfig"
>> > > process is needed for defconfigs' re-generating or updating for the
>> > > complexity of dependencies
>> > > between different features defined in the Kconfigs.
>> > 
>> > That doesn't answer my question of how the SRAM code would be useful other
>> > than to some other driver that uses the API (which would use
>> > "select").  There
>> > is no userspace API.  You could use the kernel command line to configure
>> > the
>> > SRAM but you need to get the address of it for it to be useful.
>> > 
>> 
>> Like you've asked below, via /dev/mem or direct calling within the Kernel.
>> And they are not submitted yes, under development.
>
>If they are calling within the kernel, then whatever driver that is should
>select FSL_85XX_CACHE_SRAM.  Directly accessing /dev/mem without any way for
>the kernel to advertise where it is or which parts of SRAM are available for
>use sounds like a bad idea.

>
Yes, definitely. So like we enable the moulde which should selet 
FSL_85XX_CACHE_SRAM to build vmlinux, FSL_85XX_CACHE_SRAM 
could not be seleted because of the Kconfig definition problem 
which I am trying to fix now.  So would you please merge the patch 
for the convenience of later works depending on the driver.

Wenhu

>-Scott
>
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable
  2020-03-02  4:42           ` 王文虎
@ 2020-03-02  8:58             ` Scott Wood
  2020-03-02  9:51               ` 王文虎
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Wood @ 2020-03-02  8:58 UTC (permalink / raw)
  To: 王文虎
  Cc: wangwenhu, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel, trivial,
	Rai Harninder

On Mon, 2020-03-02 at 12:42 +0800, 王文虎 wrote:
> 发件人:Scott Wood <oss@buserror.net>
> 发送日期:2020-03-01 07:12:58
> 收件人:"王文虎" <wenhu.wang@vivo.com>
> 抄送人:wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,B
> enjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
> paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
> linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org,
> trivial@kernel.org,Rai Harninder <harninder.rai@nxp.com>
> 主题:Re: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On
> Tue, 2020-01-21 at 14:38 +0800, 王文虎 wrote:
> > > 发件人:Scott Wood <oss@buserror.net>
> > > 发送日期:2020-01-21 13:49:59
> > > 收件人:"王文虎" <wenhu.wang@vivo.com>
> > > 抄送人:wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <
> > > galak@kernel.crashing.org>,B
> > > enjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
> > > paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
> > > linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org,
> > > trivial@kernel.org,Rai Harninder <harninder.rai@nxp.com>
> > > 主题:Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On
> > > Tue, 2020-01-21 at 13:20 +0800, 王文虎 wrote:
> > > > > From: Scott Wood <oss@buserror.net>
> > > > > Date: 2020-01-21 11:25:25
> > > > > To:  wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <
> > > > > galak@kernel.crashing.org>,
> > > > > Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
> > > > > paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
> > > > > linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org
> > > > > Cc:  trivial@kernel.org,wenhu.wang@vivo.com,Rai Harninder <
> > > > > harninder.rai@nxp.com>
> > > > > Subject: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM
> > > > > configurable>On Mon, 2020-01-20 at 06:43 -0800, wangwenhu wrote:
> > > > > > > From: wangwenhu <wenhu.wang@vivo.com>
> > > > > > > 
> > > > > > > When generating .config file with menuconfig on Freescale BOOKE
> > > > > > > SOC, FSL_85XX_CACHE_SRAM is not configurable for the lack of
> > > > > > > description in the Kconfig field, which makes it impossible
> > > > > > > to support L2Cache-Sram driver. Add a description to make it
> > > > > > > configurable.
> > > > > > > 
> > > > > > > Signed-off-by: wangwenhu <wenhu.wang@vivo.com>
> > > > > > 
> > > > > > The intent was that drivers using the SRAM API would select the
> > > > > > symbol.  What
> > > > > > is the use case for selecting it manually?
> > > > > > 
> > > > > 
> > > > > With a repository of multiple products(meaning different defconfigs)
> > > > > and
> > > > > multiple
> > > > > developers, the Kconfigs of the Kernel Source Tree change
> > > > > frequently. So
> > > > > the
> > > > > "make menuconfig"
> > > > > process is needed for defconfigs' re-generating or updating for the
> > > > > complexity of dependencies
> > > > > between different features defined in the Kconfigs.
> > > > 
> > > > That doesn't answer my question of how the SRAM code would be useful
> > > > other
> > > > than to some other driver that uses the API (which would use
> > > > "select").  There
> > > > is no userspace API.  You could use the kernel command line to
> > > > configure
> > > > the
> > > > SRAM but you need to get the address of it for it to be useful.
> > > > 
> > > 
> > > Like you've asked below, via /dev/mem or direct calling within the
> > > Kernel.
> > > And they are not submitted yes, under development.
> > 
> > If they are calling within the kernel, then whatever driver that is should
> > select FSL_85XX_CACHE_SRAM.  Directly accessing /dev/mem without any way
> > for
> > the kernel to advertise where it is or which parts of SRAM are available
> > for
> > use sounds like a bad idea.
> > 
> 
> Yes, definitely. So like we enable the moulde which should selet 
> FSL_85XX_CACHE_SRAM to build vmlinux, FSL_85XX_CACHE_SRAM 
> could not be seleted because of the Kconfig definition problem 
> which I am trying to fix now.  So would you please merge the patch 
> for the convenience of later works depending on the driver.

Sorry, I don't think it's something that should be enabled by itself with
nothing using the allocators.  Suppose we took this patch, and people enabled
it and accessed it via /dev/mem.  Then suppose a driver is patched to allocate
some sram and use it.  They'd be stepping on each others' toes undetected.

If you want to expose it to userspace, add code that allocates some or all of
the sram and make it something userspace can mmap.  Or, if nothing's going to
use them, remove the allocators and export the entire thing to userspace
(again via an sram-specific mappable rather than /dev/mem).

-Scott



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable
  2020-03-02  8:58             ` Scott Wood
@ 2020-03-02  9:51               ` 王文虎
  0 siblings, 0 replies; 9+ messages in thread
From: 王文虎 @ 2020-03-02  9:51 UTC (permalink / raw)
  To: Scott Wood
  Cc: wangwenhu, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel, trivial,
	Rai Harninder

发件人:Scott Wood <oss@buserror.net>
发送日期:2020-03-02 16:58:52
收件人:"王文虎" <wenhu.wang@vivo.com>
抄送人:wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org,trivial@kernel.org,Rai Harninder <harninder.rai@nxp.com>
主题:Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On Mon, 2020-03-02 at 12:42 +0800, 王文虎 wrote:
>> 发件人:Scott Wood <oss@buserror.net>
>> 发送日期:2020-03-01 07:12:58
>> 收件人:"王文虎" <wenhu.wang@vivo.com>
>> 抄送人:wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <galak@kernel.crashing.org>,B
>> enjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
>> paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
>> linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org,
>> trivial@kernel.org,Rai Harninder <harninder.rai@nxp.com>
>> 主题:Re: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On
>> Tue, 2020-01-21 at 14:38 +0800, 王文虎 wrote:
>> > > 发件人:Scott Wood <oss@buserror.net>
>> > > 发送日期:2020-01-21 13:49:59
>> > > 收件人:"王文虎" <wenhu.wang@vivo.com>
>> > > 抄送人:wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <
>> > > galak@kernel.crashing.org>,B
>> > > enjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
>> > > paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
>> > > linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org,
>> > > trivial@kernel.org,Rai Harninder <harninder.rai@nxp.com>
>> > > 主题:Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable>On
>> > > Tue, 2020-01-21 at 13:20 +0800, 王文虎 wrote:
>> > > > > From: Scott Wood <oss@buserror.net>
>> > > > > Date: 2020-01-21 11:25:25
>> > > > > To:  wangwenhu <wenhu.pku@gmail.com>,Kumar Gala <
>> > > > > galak@kernel.crashing.org>,
>> > > > > Benjamin Herrenschmidt <benh@kernel.crashing.org>,Paul Mackerras <
>> > > > > paulus@samba.org>,Michael Ellerman <mpe@ellerman.id.au>,
>> > > > > linuxppc-dev@lists.ozlabs.org,linux-kernel@vger.kernel.org
>> > > > > Cc:  trivial@kernel.org,wenhu.wang@vivo.com,Rai Harninder <
>> > > > > harninder.rai@nxp.com>
>> > > > > Subject: Re: [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM
>> > > > > configurable>On Mon, 2020-01-20 at 06:43 -0800, wangwenhu wrote:
>> > > > > > > From: wangwenhu <wenhu.wang@vivo.com>
>> > > > > > > 
>> > > > > > > When generating .config file with menuconfig on Freescale BOOKE
>> > > > > > > SOC, FSL_85XX_CACHE_SRAM is not configurable for the lack of
>> > > > > > > description in the Kconfig field, which makes it impossible
>> > > > > > > to support L2Cache-Sram driver. Add a description to make it
>> > > > > > > configurable.
>> > > > > > > 
>> > > > > > > Signed-off-by: wangwenhu <wenhu.wang@vivo.com>
>> > > > > > 
>> > > > > > The intent was that drivers using the SRAM API would select the
>> > > > > > symbol.  What
>> > > > > > is the use case for selecting it manually?
>> > > > > > 
>> > > > > 
>> > > > > With a repository of multiple products(meaning different defconfigs)
>> > > > > and
>> > > > > multiple
>> > > > > developers, the Kconfigs of the Kernel Source Tree change
>> > > > > frequently. So
>> > > > > the
>> > > > > "make menuconfig"
>> > > > > process is needed for defconfigs' re-generating or updating for the
>> > > > > complexity of dependencies
>> > > > > between different features defined in the Kconfigs.
>> > > > 
>> > > > That doesn't answer my question of how the SRAM code would be useful
>> > > > other
>> > > > than to some other driver that uses the API (which would use
>> > > > "select").  There
>> > > > is no userspace API.  You could use the kernel command line to
>> > > > configure
>> > > > the
>> > > > SRAM but you need to get the address of it for it to be useful.
>> > > > 
>> > > 
>> > > Like you've asked below, via /dev/mem or direct calling within the
>> > > Kernel.
>> > > And they are not submitted yes, under development.
>> > 
>> > If they are calling within the kernel, then whatever driver that is should
>> > select FSL_85XX_CACHE_SRAM.  Directly accessing /dev/mem without any way
>> > for
>> > the kernel to advertise where it is or which parts of SRAM are available
>> > for
>> > use sounds like a bad idea.
>> > 
>> 
>> Yes, definitely. So like we enable the moulde which should selet 
>> FSL_85XX_CACHE_SRAM to build vmlinux, FSL_85XX_CACHE_SRAM 
>> could not be seleted because of the Kconfig definition problem 
>> which I am trying to fix now.  So would you please merge the patch 
>> for the convenience of later works depending on the driver.
>
>Sorry, I don't think it's something that should be enabled by itself with
>nothing using the allocators.  Suppose we took this patch, and people enabled
>it and accessed it via /dev/mem.  Then suppose a driver is patched to allocate
>some sram and use it.  They'd be stepping on each others' toes undetected.
>
Right, and maybe i did not explain it clear: I mean that we are developing
modules both in kernel which call the interfaces of FSL_85XX_CACHE_SRAM 
directly, and in user space which is a further consideration upon the work
we have done. Cause we have not exported the code under developing, it 
seems like that nothing uses FSL_85XX_CACHE_SRAM.

>If you want to expose it to userspace, add code that allocates some or all of
>the sram and make it something userspace can mmap.  Or, if nothing's going to
>use them, remove the allocators and export the entire thing to userspace
>(again via an sram-specific mappable rather than /dev/mem).

As for /dev/mem, it was one of our choices ever but now a user-space 
driver is preferred for further consideration. But currently, the functionality 
that directly calls the insterfaces of FSL_85XX_CACHE_SRAM have been 
under developing for couples of days and would be exported in the future. 
They would be used on hw-platforms like PPCe500.

Just some time it takes. 

Do you mean the exporting is a pre-condition? If not, the merge would 
do a favor for the convenience.

Wenhu
 
>
>-Scott
>
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-03-02  9:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 14:43 [PATCH] powerpc/Kconfig: Make FSL_85XX_CACHE_SRAM configurable wangwenhu
2020-01-21  3:25 ` Scott Wood
2020-01-21  5:20   ` 王文虎
2020-01-21  5:49     ` [PATCH] " Scott Wood
2020-01-21  6:38       ` 王文虎
2020-02-29 23:12         ` Scott Wood
2020-03-02  4:42           ` 王文虎
2020-03-02  8:58             ` Scott Wood
2020-03-02  9:51               ` 王文虎

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).