All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] powerpc: Make SPU_FS depend on SPARSEMEM
@ 2014-08-19 21:16 Pranith Kumar
  2014-08-20  7:49   ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Pranith Kumar @ 2014-08-19 21:16 UTC (permalink / raw)
  To: Arnd Bergmann, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, open list:CELL BROADBAND EN...,
	open list:CELL BROADBAND EN...,
	open list

SPU_FS unconditionally enables MEMORY_HOTPLUG, which will fail to build if
SPARSEMEM=n.

Make SPU_FS depend on SPARSEMEM so that hotplug-memory.c does not fail to
compile.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 arch/powerpc/platforms/cell/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 9978f59..832872e 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -60,7 +60,7 @@ menu "Cell Broadband Engine options"
 config SPU_FS
 	tristate "SPU file system"
 	default m
-	depends on PPC_CELL
+	depends on PPC_CELL && SPARSEMEM
 	select SPU_BASE
 	select MEMORY_HOTPLUG
 	help
-- 
1.9.1


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

* Re: [RFC PATCH] powerpc: Make SPU_FS depend on SPARSEMEM
  2014-08-19 21:16 [RFC PATCH] powerpc: Make SPU_FS depend on SPARSEMEM Pranith Kumar
@ 2014-08-20  7:49   ` Geert Uytterhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20  7:49 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Arnd Bergmann, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, open list:CELL BROADBAND EN...,
	open list:CELL BROADBAND EN...,
	open list

Hi Pranith,

On Tue, Aug 19, 2014 at 11:16 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> SPU_FS unconditionally enables MEMORY_HOTPLUG, which will fail to build if
> SPARSEMEM=n.
>
> Make SPU_FS depend on SPARSEMEM so that hotplug-memory.c does not fail to
> compile.
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  arch/powerpc/platforms/cell/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
> index 9978f59..832872e 100644
> --- a/arch/powerpc/platforms/cell/Kconfig
> +++ b/arch/powerpc/platforms/cell/Kconfig
> @@ -60,7 +60,7 @@ menu "Cell Broadband Engine options"
>  config SPU_FS
>         tristate "SPU file system"
>         default m
> -       depends on PPC_CELL
> +       depends on PPC_CELL && SPARSEMEM
>         select SPU_BASE
>         select MEMORY_HOTPLUG
>         help
> --
> 1.9.1

Is this a randconfig kernel?

config ARCH_SPARSEMEM_DEFAULT
       def_bool y
       depends on (SMP && PPC_PSERIES) || PPC_PS3

Why is this not enabled? !SMP? !PPC_PSERIES? !PPC_PS3?

If PPC_CELL is enabled, this issue was introduced by

commit 78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d
Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date:   Tue Feb 13 11:46:06 2007 +1100

    [POWERPC] spufs: remove need for struct page for SPEs

    This patch removes the need for struct page for SPE local store
    and registers from spufs. It also makes the locking much more
    obvious and no longer relying on the truncate logic black magic
    for protecting against races between unmap_mapping_range() and
    new pages faulted in. It does so by switching to a nopfn() handler
    and using the new vm_insert_pfn() to setup the PTEs itself while
    holding a lock on the SPE.

    The nice thing is that this patch actually removes a lot more code
    than it adds :-)

    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: Paul Mackerras <paulus@samba.org>


Another question: why does SPU_FS select MEMORY_HOTPLUG?

commit 4da30d15b6d5036b0d96422d6946ca758111fae3
Author: Geoff Levand <geoffrey.levand@am.sony.com>
Date:   Fri Jun 23 20:57:49 2006 +0200

    [POWERPC] spufs: fix memory hotplug dependency

    spufs_base.c calls __add_pages, which depends on CONFIG_MEMORY_HOTPLUG.

    Moved the selection of CONFIG_MEMORY_HOTPLUG from CONFIG_SPUFS_MMAP
    to CONFIG_SPU_FS.

    Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
    Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>

However, the call to __add_pages() has been moved a few times afterwards,
to be finally removed in the aforementioned commit
78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d.

Does it still build/work if you just drop the "select MEMORY_HOTPLUG"?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [RFC PATCH] powerpc: Make SPU_FS depend on SPARSEMEM
@ 2014-08-20  7:49   ` Geert Uytterhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20  7:49 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: open list:CELL BROADBAND EN...,
	Arnd Bergmann, open list, Paul Mackerras,
	open list:CELL BROADBAND EN...

Hi Pranith,

On Tue, Aug 19, 2014 at 11:16 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> SPU_FS unconditionally enables MEMORY_HOTPLUG, which will fail to build if
> SPARSEMEM=n.
>
> Make SPU_FS depend on SPARSEMEM so that hotplug-memory.c does not fail to
> compile.
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  arch/powerpc/platforms/cell/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
> index 9978f59..832872e 100644
> --- a/arch/powerpc/platforms/cell/Kconfig
> +++ b/arch/powerpc/platforms/cell/Kconfig
> @@ -60,7 +60,7 @@ menu "Cell Broadband Engine options"
>  config SPU_FS
>         tristate "SPU file system"
>         default m
> -       depends on PPC_CELL
> +       depends on PPC_CELL && SPARSEMEM
>         select SPU_BASE
>         select MEMORY_HOTPLUG
>         help
> --
> 1.9.1

Is this a randconfig kernel?

config ARCH_SPARSEMEM_DEFAULT
       def_bool y
       depends on (SMP && PPC_PSERIES) || PPC_PS3

Why is this not enabled? !SMP? !PPC_PSERIES? !PPC_PS3?

If PPC_CELL is enabled, this issue was introduced by

commit 78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d
Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date:   Tue Feb 13 11:46:06 2007 +1100

    [POWERPC] spufs: remove need for struct page for SPEs

    This patch removes the need for struct page for SPE local store
    and registers from spufs. It also makes the locking much more
    obvious and no longer relying on the truncate logic black magic
    for protecting against races between unmap_mapping_range() and
    new pages faulted in. It does so by switching to a nopfn() handler
    and using the new vm_insert_pfn() to setup the PTEs itself while
    holding a lock on the SPE.

    The nice thing is that this patch actually removes a lot more code
    than it adds :-)

    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: Paul Mackerras <paulus@samba.org>


Another question: why does SPU_FS select MEMORY_HOTPLUG?

commit 4da30d15b6d5036b0d96422d6946ca758111fae3
Author: Geoff Levand <geoffrey.levand@am.sony.com>
Date:   Fri Jun 23 20:57:49 2006 +0200

    [POWERPC] spufs: fix memory hotplug dependency

    spufs_base.c calls __add_pages, which depends on CONFIG_MEMORY_HOTPLUG.

    Moved the selection of CONFIG_MEMORY_HOTPLUG from CONFIG_SPUFS_MMAP
    to CONFIG_SPU_FS.

    Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
    Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>

However, the call to __add_pages() has been moved a few times afterwards,
to be finally removed in the aforementioned commit
78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d.

Does it still build/work if you just drop the "select MEMORY_HOTPLUG"?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [RFC PATCH] powerpc: Make SPU_FS depend on SPARSEMEM
  2014-08-20  7:49   ` Geert Uytterhoeven
@ 2014-08-20 13:09     ` Pranith Kumar
  -1 siblings, 0 replies; 5+ messages in thread
From: Pranith Kumar @ 2014-08-20 13:09 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, open list:CELL BROADBAND EN...,
	open list:CELL BROADBAND EN...,
	open list, Geoff Levand

On Wed, Aug 20, 2014 at 3:49 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:

> Is this a randconfig kernel?

Yes, randconfig with ARCH=powerpc.

>
> config ARCH_SPARSEMEM_DEFAULT
>        def_bool y
>        depends on (SMP && PPC_PSERIES) || PPC_PS3
>
> Why is this not enabled? !SMP? !PPC_PSERIES? !PPC_PS3?

This was indeed enabled, but that does not do much. We will need
CONFIG_SPARSEMEM which depends on CONFIG_SPARSEMEM_MANUAL which was
not enabled.


>
> If PPC_CELL is enabled, this issue was introduced by
>
> commit 78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d
> Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date:   Tue Feb 13 11:46:06 2007 +1100
>
>     [POWERPC] spufs: remove need for struct page for SPEs
>
>     This patch removes the need for struct page for SPE local store
>     and registers from spufs. It also makes the locking much more
>     obvious and no longer relying on the truncate logic black magic
>     for protecting against races between unmap_mapping_range() and
>     new pages faulted in. It does so by switching to a nopfn() handler
>     and using the new vm_insert_pfn() to setup the PTEs itself while
>     holding a lock on the SPE.
>
>     The nice thing is that this patch actually removes a lot more code
>     than it adds :-)
>
>     Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>     Signed-off-by: Paul Mackerras <paulus@samba.org>
>
>
> Another question: why does SPU_FS select MEMORY_HOTPLUG?

Not really sure :(

>
> commit 4da30d15b6d5036b0d96422d6946ca758111fae3
> Author: Geoff Levand <geoffrey.levand@am.sony.com>
> Date:   Fri Jun 23 20:57:49 2006 +0200
>
>     [POWERPC] spufs: fix memory hotplug dependency
>
>     spufs_base.c calls __add_pages, which depends on CONFIG_MEMORY_HOTPLUG.
>
>     Moved the selection of CONFIG_MEMORY_HOTPLUG from CONFIG_SPUFS_MMAP
>     to CONFIG_SPU_FS.
>
>     Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
>     Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
>     Signed-off-by: Paul Mackerras <paulus@samba.org>
>
> However, the call to __add_pages() has been moved a few times afterwards,
> to be finally removed in the aforementioned commit
> 78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d.
>
> Does it still build/work if you just drop the "select MEMORY_HOTPLUG"?

I should have saved the config file :(. I think it will build since
the problem was that hotplug-memory.o needs CONFIG_SPARSEMEM.



-- 
Pranith

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

* Re: [RFC PATCH] powerpc: Make SPU_FS depend on SPARSEMEM
@ 2014-08-20 13:09     ` Pranith Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Pranith Kumar @ 2014-08-20 13:09 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: open list:CELL BROADBAND EN...,
	Geoff Levand, Arnd Bergmann, open list, Paul Mackerras,
	open list:CELL BROADBAND EN...

On Wed, Aug 20, 2014 at 3:49 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:

> Is this a randconfig kernel?

Yes, randconfig with ARCH=powerpc.

>
> config ARCH_SPARSEMEM_DEFAULT
>        def_bool y
>        depends on (SMP && PPC_PSERIES) || PPC_PS3
>
> Why is this not enabled? !SMP? !PPC_PSERIES? !PPC_PS3?

This was indeed enabled, but that does not do much. We will need
CONFIG_SPARSEMEM which depends on CONFIG_SPARSEMEM_MANUAL which was
not enabled.


>
> If PPC_CELL is enabled, this issue was introduced by
>
> commit 78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d
> Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date:   Tue Feb 13 11:46:06 2007 +1100
>
>     [POWERPC] spufs: remove need for struct page for SPEs
>
>     This patch removes the need for struct page for SPE local store
>     and registers from spufs. It also makes the locking much more
>     obvious and no longer relying on the truncate logic black magic
>     for protecting against races between unmap_mapping_range() and
>     new pages faulted in. It does so by switching to a nopfn() handler
>     and using the new vm_insert_pfn() to setup the PTEs itself while
>     holding a lock on the SPE.
>
>     The nice thing is that this patch actually removes a lot more code
>     than it adds :-)
>
>     Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>     Signed-off-by: Paul Mackerras <paulus@samba.org>
>
>
> Another question: why does SPU_FS select MEMORY_HOTPLUG?

Not really sure :(

>
> commit 4da30d15b6d5036b0d96422d6946ca758111fae3
> Author: Geoff Levand <geoffrey.levand@am.sony.com>
> Date:   Fri Jun 23 20:57:49 2006 +0200
>
>     [POWERPC] spufs: fix memory hotplug dependency
>
>     spufs_base.c calls __add_pages, which depends on CONFIG_MEMORY_HOTPLUG.
>
>     Moved the selection of CONFIG_MEMORY_HOTPLUG from CONFIG_SPUFS_MMAP
>     to CONFIG_SPU_FS.
>
>     Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
>     Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
>     Signed-off-by: Paul Mackerras <paulus@samba.org>
>
> However, the call to __add_pages() has been moved a few times afterwards,
> to be finally removed in the aforementioned commit
> 78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d.
>
> Does it still build/work if you just drop the "select MEMORY_HOTPLUG"?

I should have saved the config file :(. I think it will build since
the problem was that hotplug-memory.o needs CONFIG_SPARSEMEM.



-- 
Pranith

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

end of thread, other threads:[~2014-08-20 13:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-19 21:16 [RFC PATCH] powerpc: Make SPU_FS depend on SPARSEMEM Pranith Kumar
2014-08-20  7:49 ` Geert Uytterhoeven
2014-08-20  7:49   ` Geert Uytterhoeven
2014-08-20 13:09   ` Pranith Kumar
2014-08-20 13:09     ` Pranith Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.