From: Heiko Carstens Date: Mon, 15 Mar 2010 04:35:05 +0000 (-0400) Subject: memory hotplug/s390: set phys_device X-Git-Tag: v2.6.34-rc2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57b552ba0b2faf7cce66d476ef8ce7f6210c62fd;p=profile%2Fcommon%2Fkernel-common.git memory hotplug/s390: set phys_device 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. This makes s390's /sys/devices/system/memory/memoryX/phys_device display the correct thing? Signed-off-by: Heiko Carstens Cc: Dave Hansen Cc: Gerald Schaefer Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index b3beab6..fc7ae05 100644 --- 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 chpid) 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];