Messages in this thread | | | Date | Tue, 9 Mar 2010 22:22:11 +0100 | From | Heiko Carstens <> | Subject | Re: [PATCH 2/2] memory hotplug/s390: set phys_device |
| |
On Tue, Mar 09, 2010 at 12:37:48PM -0800, Andrew Morton wrote: > On Tue, 9 Mar 2010 18:20:52 +0100 > Heiko Carstens <heiko.carstens@de.ibm.com> wrote: > > > 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. > > > > --- 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]; > > What is the utility of this patch? It makes s390's > /sys/devices/system/memory/memoryX/phys_device display the correct > thing?
Yes, exactly.
| |