forked from Minki/linux
[S390] sclp: avoid 64 bit division
Avoid 64 bit division to fix this compile error on 32 bit: drivers/s390/char/sclp_cmd.c:711: undefined reference to `__udivdi3' Also move the whole arch_get_memory_phys_device function to the memory hotplug related functions. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
b8fde7224d
commit
9c95258c0d
@ -308,6 +308,13 @@ struct assign_storage_sccb {
|
||||
u16 rn;
|
||||
} __packed;
|
||||
|
||||
int arch_get_memory_phys_device(unsigned long start_pfn)
|
||||
{
|
||||
if (!rzm)
|
||||
return 0;
|
||||
return PFN_PHYS(start_pfn) >> ilog2(rzm);
|
||||
}
|
||||
|
||||
static unsigned long long rn2addr(u16 rn)
|
||||
{
|
||||
return (unsigned long long) (rn - 1) * rzm;
|
||||
@ -704,13 +711,6 @@ 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];
|
||||
|
Loading…
Reference in New Issue
Block a user