mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: linux-kernel@vger.kernel.org
Subject: [RFC][PATCH 01/12] memory hotplug prep: kill local_mapnr
Date: Fri, 12 Aug 2005 07:47:14 -0700	[thread overview]
Message-ID: <20050812144714.805F4B48@kernel.beaverton.ibm.com> (raw)


This is unused, except for in an alpha header.  Keep the alpha
one, kill the rest.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug-dave/include/asm-i386/mmzone.h   |    6 ------
 memhotplug-dave/include/asm-m32r/mmzone.h   |    6 ------
 memhotplug-dave/include/asm-parisc/mmzone.h |    6 ------
 memhotplug-dave/include/asm-ppc64/mmzone.h  |    3 ---
 memhotplug-dave/include/asm-x86_64/mmzone.h |    2 --
 5 files changed, 23 deletions(-)

diff -puN include/asm-x86_64/mmzone.h~C0-kill-local_mapnr include/asm-x86_64/mmzone.h
--- memhotplug/include/asm-x86_64/mmzone.h~C0-kill-local_mapnr	2005-08-12 07:43:43.000000000 -0700
+++ memhotplug-dave/include/asm-x86_64/mmzone.h	2005-08-12 07:43:43.000000000 -0700
@@ -38,8 +38,6 @@ static inline __attribute__((pure)) int 
 
 #ifdef CONFIG_DISCONTIGMEM
 
-#define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT)
-#define kvaddr_to_nid(kaddr)	phys_to_nid(__pa(kaddr))
 
 /* AK: this currently doesn't deal with invalid addresses. We'll see 
    if the 2.5 kernel doesn't pass them
diff -puN include/asm-parisc/mmzone.h~C0-kill-local_mapnr include/asm-parisc/mmzone.h
--- memhotplug/include/asm-parisc/mmzone.h~C0-kill-local_mapnr	2005-08-12 07:43:43.000000000 -0700
+++ memhotplug-dave/include/asm-parisc/mmzone.h	2005-08-12 07:43:43.000000000 -0700
@@ -27,12 +27,6 @@ extern struct node_map_data node_data[];
 })
 #define node_localnr(pfn, nid)		((pfn) - node_start_pfn(nid))
 
-#define local_mapnr(kvaddr)						\
-({									\
-	unsigned long __pfn = __pa(kvaddr) >> PAGE_SHIFT;		\
-	(__pfn - node_start_pfn(pfn_to_nid(__pfn)));			\
-})
-
 #define pfn_to_page(pfn)						\
 ({									\
 	unsigned long __pfn = (pfn);					\
diff -puN include/asm-ppc64/mmzone.h~C0-kill-local_mapnr include/asm-ppc64/mmzone.h
--- memhotplug/include/asm-ppc64/mmzone.h~C0-kill-local_mapnr	2005-08-12 07:43:43.000000000 -0700
+++ memhotplug-dave/include/asm-ppc64/mmzone.h	2005-08-12 07:43:43.000000000 -0700
@@ -67,9 +67,6 @@ static inline int pa_to_nid(unsigned lon
 #define node_start_pfn(nid)	(NODE_DATA(nid)->node_start_pfn)
 #define node_end_pfn(nid)	(NODE_DATA(nid)->node_end_pfn)
 
-#define local_mapnr(kvaddr) \
-	( (__pa(kvaddr) >> PAGE_SHIFT) - node_start_pfn(kvaddr_to_nid(kvaddr)) 
-
 #ifdef CONFIG_DISCONTIGMEM
 
 /*
diff -puN include/asm-alpha/mmzone.h~C0-kill-local_mapnr include/asm-alpha/mmzone.h
diff -puN include/asm-i386/mmzone.h~C0-kill-local_mapnr include/asm-i386/mmzone.h
--- memhotplug/include/asm-i386/mmzone.h~C0-kill-local_mapnr	2005-08-12 07:43:43.000000000 -0700
+++ memhotplug-dave/include/asm-i386/mmzone.h	2005-08-12 07:43:43.000000000 -0700
@@ -88,12 +88,6 @@ static inline int pfn_to_nid(unsigned lo
 	__pgdat->node_start_pfn + __pgdat->node_spanned_pages;		\
 })
 
-#define local_mapnr(kvaddr)						\
-({									\
-	unsigned long __pfn = __pa(kvaddr) >> PAGE_SHIFT;		\
-	(__pfn - node_start_pfn(pfn_to_nid(__pfn)));			\
-})
-
 /* XXX: FIXME -- wli */
 #define kern_addr_valid(kaddr)	(0)
 
diff -puN include/asm-m32r/mmzone.h~C0-kill-local_mapnr include/asm-m32r/mmzone.h
--- memhotplug/include/asm-m32r/mmzone.h~C0-kill-local_mapnr	2005-08-12 07:43:43.000000000 -0700
+++ memhotplug-dave/include/asm-m32r/mmzone.h	2005-08-12 07:43:43.000000000 -0700
@@ -21,12 +21,6 @@ extern struct pglist_data *node_data[];
 	__pgdat->node_start_pfn + __pgdat->node_spanned_pages - 1;	\
 })
 
-#define local_mapnr(kvaddr)						\
-({									\
-	unsigned long __pfn = __pa(kvaddr) >> PAGE_SHIFT;		\
-	(__pfn - node_start_pfn(pfn_to_nid(__pfn)));			\
-})
-
 #define pfn_to_page(pfn)						\
 ({									\
 	unsigned long __pfn = pfn;					\
_

             reply	other threads:[~2005-08-12 14:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 14:47 Dave Hansen [this message]
2005-08-12 14:47 ` [RFC][PATCH 02/12] memory hotplug prep: break out zone initialization Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 03/12] memory hotplug prep: zone wait table at runtime Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 04/12] memory hotplug prep: __section_nr helper Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 05/12] memory hotplug prep: fixup bad_range() Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 06/12] memory hotplug locking: node_size_lock Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 07/12] memory hotplug locking: zone span seqlock Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 08/12] memory hotplug: sysfs and add/remove functions Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 09/12] memory hotplug: move section_mem_map alloc to sparse.c Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 10/12] memory hotplug: call setup_per_zone_pages_min after hotplug Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 11/12] memory hotplug: i386 addition functions Dave Hansen
2005-08-12 14:47 ` [RFC][PATCH 12/12] memory hotplug: ppc64 specific hot-add functions Dave Hansen

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=20050812144714.805F4B48@kernel.beaverton.ibm.com \
    --to=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome