Skip to contentSkip to conversation

memory hotplug/s390: set phys_device

PATCH In review Heiko Carstens 2 participants 3 messages Mar 9, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 memory hotplug/s390: set phys_device

From: Heiko Carstens <[email protected]>

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 <[email protected]>
Cc Gerald Schaefer <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
---
 drivers/s390/char/sclp_cmd.c |    7 +++++++
 1 file changed, 7 insertions(+)
drivers/s390/char/sclp_cmd.c +7 -0
@@ -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 [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

maintainer
#1 lore raw
Quoted 20 lines · On Tue, 9 Mar 2010 18:20:52 +0100 Heiko Carstens <[email protected]>…

From: Heiko Carstens <[email protected]>

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 <[email protected]>
Cc Gerald Schaefer <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
---
 drivers/s390/char/sclp_cmd.c |    7 +++++++
 1 file changed, 7 insertions(+)
drivers/s390/char/sclp_cmd.c +0 -0
@@ -704,6 +704,13 @@ int sclp_chp_deconfigure(struct chp_id c
 	return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8);
 }
 

drivers/s390/char/sclp_cmd.c int sclp_chp_deconfigure(struct chp_id c · line 716

Quoted 10 lines
drivers/s390/char/sclp_cmd.c +7 -0
+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];

What is the utility of this patch? It makes s390's /sys/devices/system/memory/memoryX/phys_device display the correct thing?

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

#2 lore raw
Quoted 15 lines · Andrew Morton
Quoted 12 lines · On Tue, 9 Mar 2010 18:20:52 +0100 Heiko Carstens <[email protected]>…

From: Heiko Carstens <[email protected]>

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.

drivers/s390/char/sclp_cmd.c +0 -0
@@ -704,6 +704,13 @@ int sclp_chp_deconfigure(struct chp_id c
 	return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8);
 }
 
Quoted 14 lines

drivers/s390/char/sclp_cmd.c int sclp_chp_deconfigure(struct chp_id c · line 716

Quoted 10 lines
drivers/s390/char/sclp_cmd.c +7 -0
+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];

What is the utility of this patch? It makes s390's /sys/devices/system/memory/memoryX/phys_device display the correct thing?

Yes, exactly.

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