linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] memory hotplug/s390: set phys_device
@ 2010-03-09 17:20 Heiko Carstens
  2010-03-09 20:37 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Carstens @ 2010-03-09 17:20 UTC (permalink / raw)
  To: Andrew Morton, Dave Hansen
  Cc: linux-kernel, linux-mm, Gerald Schaefer, KAMEZAWA Hiroyuki,
	Martin Schwidefsky

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Implement arch specific arch_get_memory_phys_device function and initialize
phys_device for each memory section. That way we finally can tell which
piece of memory belongs to which physical device.

Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by:  Heiko Carstens <heiko.carstens@de.ibm.com>
---
 drivers/s390/char/sclp_cmd.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/s390/char/sclp_cmd.c
+++ b/drivers/s390/char/sclp_cmd.c
@@ -704,6 +704,13 @@ int sclp_chp_deconfigure(struct chp_id c
 	return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8);
 }
 
+int arch_get_memory_phys_device(unsigned long start_pfn)
+{
+	if (!rzm)
+		return 0;
+	return PFN_PHYS(start_pfn) / rzm;
+}
+
 struct chp_info_sccb {
 	struct sccb_header header;
 	u8 recognized[SCLP_CHP_INFO_MASK_SIZE];

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2010-03-09 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-09 17:20 [PATCH 2/2] memory hotplug/s390: set phys_device Heiko Carstens
2010-03-09 20:37 ` Andrew Morton
2010-03-09 21:22   ` Heiko Carstens

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).