public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: drop obsolete ARCH_BOOTMEM support
@ 2012-04-06 12:47 Sam Ravnborg
  2012-04-11 16:30 ` Tejun Heo
  2012-04-14 18:26 ` [tip:x86/mm] x86: Drop " tip-bot for Sam Ravnborg
  0 siblings, 2 replies; 6+ messages in thread
From: Sam Ravnborg @ 2012-04-06 12:47 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin; +Cc: lkml, Tejun Heo

>From ae6cdc767f973f39cb205af4b80ff13f35a1b66e Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Fri, 6 Apr 2012 13:37:08 +0200
Subject: [PATCH] x86: drop obsolete ARCH_BOOTMEM support

x86 unconditionally uses NO_BOOTMEM so there is no use
of the HAVE_ARCH_BOOTMEM support as mm/bootmem.c is the
only file referencing this symbol.

bootmem_arch_preferred_node() is the function referred
in the mm/bootmem.c code and can thuis be dropped too.

x86 was the sole user of HAVE_ARCH_BOOTMEM - so there is
an opportunity to clean up a little in mm/bootmem.c too
if we do not expect other users to emerge.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tejun Heo <tj@kernel.org>
---

I found this while browsing the bootmem code for other reasons.
Build tested on x86-32

	Sam

 arch/x86/Kconfig                 |    4 ----
 arch/x86/include/asm/mmzone_32.h |    6 ------
 2 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1d14cc6..553f15e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1239,10 +1239,6 @@ config NODES_SHIFT
 	  Specify the maximum number of NUMA Nodes available on the target
 	  system.  Increases memory reserved to accommodate various tables.
 
-config HAVE_ARCH_BOOTMEM
-	def_bool y
-	depends on X86_32 && NUMA
-
 config HAVE_ARCH_ALLOC_REMAP
 	def_bool y
 	depends on X86_32 && NUMA
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h
index 55728e1..eb05fb3 100644
--- a/arch/x86/include/asm/mmzone_32.h
+++ b/arch/x86/include/asm/mmzone_32.h
@@ -61,10 +61,4 @@ static inline int pfn_valid(int pfn)
 
 #endif /* CONFIG_DISCONTIGMEM */
 
-#ifdef CONFIG_NEED_MULTIPLE_NODES
-/* always use node 0 for bootmem on this numa platform */
-#define bootmem_arch_preferred_node(__bdata, size, align, goal, limit)	\
-	(NODE_DATA(0)->bdata)
-#endif /* CONFIG_NEED_MULTIPLE_NODES */
-
 #endif /* _ASM_X86_MMZONE_32_H */
-- 
1.6.0.6


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

* Re: [PATCH] x86: drop obsolete ARCH_BOOTMEM support
  2012-04-06 12:47 [PATCH] x86: drop obsolete ARCH_BOOTMEM support Sam Ravnborg
@ 2012-04-11 16:30 ` Tejun Heo
  2012-04-11 17:03   ` Yinghai Lu
  2012-04-14 18:26 ` [tip:x86/mm] x86: Drop " tip-bot for Sam Ravnborg
  1 sibling, 1 reply; 6+ messages in thread
From: Tejun Heo @ 2012-04-11 16:30 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, lkml

On Fri, Apr 06, 2012 at 02:47:35PM +0200, Sam Ravnborg wrote:
> From ae6cdc767f973f39cb205af4b80ff13f35a1b66e Mon Sep 17 00:00:00 2001
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Fri, 6 Apr 2012 13:37:08 +0200
> Subject: [PATCH] x86: drop obsolete ARCH_BOOTMEM support
> 
> x86 unconditionally uses NO_BOOTMEM so there is no use
> of the HAVE_ARCH_BOOTMEM support as mm/bootmem.c is the
> only file referencing this symbol.
> 
> bootmem_arch_preferred_node() is the function referred
> in the mm/bootmem.c code and can thuis be dropped too.
> 
> x86 was the sole user of HAVE_ARCH_BOOTMEM - so there is
> an opportunity to clean up a little in mm/bootmem.c too
> if we do not expect other users to emerge.

avr32 seems to have it too?

-- 
tejun

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

* Re: [PATCH] x86: drop obsolete ARCH_BOOTMEM support
  2012-04-11 16:30 ` Tejun Heo
@ 2012-04-11 17:03   ` Yinghai Lu
  2012-04-11 17:11     ` Tejun Heo
  0 siblings, 1 reply; 6+ messages in thread
From: Yinghai Lu @ 2012-04-11 17:03 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Sam Ravnborg, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, lkml

On Wed, Apr 11, 2012 at 9:30 AM, Tejun Heo <tj@kernel.org> wrote:
> On Fri, Apr 06, 2012 at 02:47:35PM +0200, Sam Ravnborg wrote:
>> From ae6cdc767f973f39cb205af4b80ff13f35a1b66e Mon Sep 17 00:00:00 2001
>> From: Sam Ravnborg <sam@ravnborg.org>
>> Date: Fri, 6 Apr 2012 13:37:08 +0200
>> Subject: [PATCH] x86: drop obsolete ARCH_BOOTMEM support
>>
>> x86 unconditionally uses NO_BOOTMEM so there is no use
>> of the HAVE_ARCH_BOOTMEM support as mm/bootmem.c is the
>> only file referencing this symbol.
>>
>> bootmem_arch_preferred_node() is the function referred
>> in the mm/bootmem.c code and can thuis be dropped too.
>>
>> x86 was the sole user of HAVE_ARCH_BOOTMEM - so there is
>> an opportunity to clean up a little in mm/bootmem.c too
>> if we do not expect other users to emerge.
>
> avr32 seems to have it too?

avr32 is:

config HAVE_ARCH_BOOTMEM
        def_bool n

so that is not used with avr32

Yinghai

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

* Re: [PATCH] x86: drop obsolete ARCH_BOOTMEM support
  2012-04-11 17:03   ` Yinghai Lu
@ 2012-04-11 17:11     ` Tejun Heo
  2012-04-11 20:53       ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Tejun Heo @ 2012-04-11 17:11 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Sam Ravnborg, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, lkml

On Wed, Apr 11, 2012 at 10:03:50AM -0700, Yinghai Lu wrote:
> On Wed, Apr 11, 2012 at 9:30 AM, Tejun Heo <tj@kernel.org> wrote:
> > On Fri, Apr 06, 2012 at 02:47:35PM +0200, Sam Ravnborg wrote:
> >> From ae6cdc767f973f39cb205af4b80ff13f35a1b66e Mon Sep 17 00:00:00 2001
> >> From: Sam Ravnborg <sam@ravnborg.org>
> >> Date: Fri, 6 Apr 2012 13:37:08 +0200
> >> Subject: [PATCH] x86: drop obsolete ARCH_BOOTMEM support
> >>
> >> x86 unconditionally uses NO_BOOTMEM so there is no use
> >> of the HAVE_ARCH_BOOTMEM support as mm/bootmem.c is the
> >> only file referencing this symbol.
> >>
> >> bootmem_arch_preferred_node() is the function referred
> >> in the mm/bootmem.c code and can thuis be dropped too.
> >>
> >> x86 was the sole user of HAVE_ARCH_BOOTMEM - so there is
> >> an opportunity to clean up a little in mm/bootmem.c too
> >> if we do not expect other users to emerge.
> >
> > avr32 seems to have it too?
> 
> avr32 is:
> 
> config HAVE_ARCH_BOOTMEM
>         def_bool n
> 
> so that is not used with avr32

Yeah, then better remove the reference from there too, right?

Thanks.

-- 
tejun

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

* Re: [PATCH] x86: drop obsolete ARCH_BOOTMEM support
  2012-04-11 17:11     ` Tejun Heo
@ 2012-04-11 20:53       ` Sam Ravnborg
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2012-04-11 20:53 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Yinghai Lu, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, lkml

On Wed, Apr 11, 2012 at 10:11:15AM -0700, Tejun Heo wrote:
> On Wed, Apr 11, 2012 at 10:03:50AM -0700, Yinghai Lu wrote:
> > On Wed, Apr 11, 2012 at 9:30 AM, Tejun Heo <tj@kernel.org> wrote:
> > > On Fri, Apr 06, 2012 at 02:47:35PM +0200, Sam Ravnborg wrote:
> > >> From ae6cdc767f973f39cb205af4b80ff13f35a1b66e Mon Sep 17 00:00:00 2001
> > >> From: Sam Ravnborg <sam@ravnborg.org>
> > >> Date: Fri, 6 Apr 2012 13:37:08 +0200
> > >> Subject: [PATCH] x86: drop obsolete ARCH_BOOTMEM support
> > >>
> > >> x86 unconditionally uses NO_BOOTMEM so there is no use
> > >> of the HAVE_ARCH_BOOTMEM support as mm/bootmem.c is the
> > >> only file referencing this symbol.
> > >>
> > >> bootmem_arch_preferred_node() is the function referred
> > >> in the mm/bootmem.c code and can thuis be dropped too.
> > >>
> > >> x86 was the sole user of HAVE_ARCH_BOOTMEM - so there is
> > >> an opportunity to clean up a little in mm/bootmem.c too
> > >> if we do not expect other users to emerge.
> > >
> > > avr32 seems to have it too?
> > 
> > avr32 is:
> > 
> > config HAVE_ARCH_BOOTMEM
> >         def_bool n
> > 
> > so that is not used with avr32
> 
> Yeah, then better remove the reference from there too, right?
Yep - will do tomorrow.

	Sam

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

* [tip:x86/mm] x86: Drop obsolete ARCH_BOOTMEM support
  2012-04-06 12:47 [PATCH] x86: drop obsolete ARCH_BOOTMEM support Sam Ravnborg
  2012-04-11 16:30 ` Tejun Heo
@ 2012-04-14 18:26 ` tip-bot for Sam Ravnborg
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot for Sam Ravnborg @ 2012-04-14 18:26 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, sam, tj, tglx

Commit-ID:  302616911da8e868d3f1a00dce517ca30b0e065d
Gitweb:     http://git.kernel.org/tip/302616911da8e868d3f1a00dce517ca30b0e065d
Author:     Sam Ravnborg <sam@ravnborg.org>
AuthorDate: Fri, 6 Apr 2012 14:47:35 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 14 Apr 2012 14:28:58 +0200

x86: Drop obsolete ARCH_BOOTMEM support

x86 unconditionally uses NO_BOOTMEM so there is no use
of the HAVE_ARCH_BOOTMEM support as mm/bootmem.c is the
only file referencing this symbol.

bootmem_arch_preferred_node() is the function referred
in the mm/bootmem.c code and can thuis be dropped too.

x86 was the sole user of HAVE_ARCH_BOOTMEM - so there is
an opportunity to clean up a little in mm/bootmem.c too
if we do not expect other users to emerge.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/20120406124735.GA6920@merkur.ravnborg.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/Kconfig                 |    4 ----
 arch/x86/include/asm/mmzone_32.h |    6 ------
 2 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5bed94e..a105ee7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1255,10 +1255,6 @@ config NODES_SHIFT
 	  Specify the maximum number of NUMA Nodes available on the target
 	  system.  Increases memory reserved to accommodate various tables.
 
-config HAVE_ARCH_BOOTMEM
-	def_bool y
-	depends on X86_32 && NUMA
-
 config HAVE_ARCH_ALLOC_REMAP
 	def_bool y
 	depends on X86_32 && NUMA
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h
index 55728e1..eb05fb3 100644
--- a/arch/x86/include/asm/mmzone_32.h
+++ b/arch/x86/include/asm/mmzone_32.h
@@ -61,10 +61,4 @@ static inline int pfn_valid(int pfn)
 
 #endif /* CONFIG_DISCONTIGMEM */
 
-#ifdef CONFIG_NEED_MULTIPLE_NODES
-/* always use node 0 for bootmem on this numa platform */
-#define bootmem_arch_preferred_node(__bdata, size, align, goal, limit)	\
-	(NODE_DATA(0)->bdata)
-#endif /* CONFIG_NEED_MULTIPLE_NODES */
-
 #endif /* _ASM_X86_MMZONE_32_H */

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

end of thread, other threads:[~2012-04-14 18:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-06 12:47 [PATCH] x86: drop obsolete ARCH_BOOTMEM support Sam Ravnborg
2012-04-11 16:30 ` Tejun Heo
2012-04-11 17:03   ` Yinghai Lu
2012-04-11 17:11     ` Tejun Heo
2012-04-11 20:53       ` Sam Ravnborg
2012-04-14 18:26 ` [tip:x86/mm] x86: Drop " tip-bot for Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox