Skip to content

Commit 57b552b

Browse files
heicarsttorvalds
authored andcommitted
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 <heiko.carstens@de.ibm.com> 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bc32df0 commit 57b552b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎drivers/s390/char/sclp_cmd.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,13 @@ int sclp_chp_deconfigure(struct chp_id chpid)
704704
return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8);
705705
}
706706

707+
int arch_get_memory_phys_device(unsigned long start_pfn)
708+
{
709+
if (!rzm)
710+
return 0;
711+
return PFN_PHYS(start_pfn) / rzm;
712+
}
713+
707714
struct chp_info_sccb {
708715
struct sccb_header header;
709716
u8 recognized[SCLP_CHP_INFO_MASK_SIZE];

0 commit comments

Comments
 (0)