diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-03-24 06:49:55 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-03-24 06:49:53 -0400 |
commit | 9c95258c0d5911ae263bf50d854e402ce973ab32 (patch) | |
tree | a91567d8b0fea7ef722209183610f63ff93ee1d8 /drivers/s390 | |
parent | b8fde7224d771ce55bfd67cb57d7c4c8f430972f (diff) |
[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>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index fc7ae05ce48a..4b60ede07f0e 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -308,6 +308,13 @@ struct assign_storage_sccb { | |||
308 | u16 rn; | 308 | u16 rn; |
309 | } __packed; | 309 | } __packed; |
310 | 310 | ||
311 | int arch_get_memory_phys_device(unsigned long start_pfn) | ||
312 | { | ||
313 | if (!rzm) | ||
314 | return 0; | ||
315 | return PFN_PHYS(start_pfn) >> ilog2(rzm); | ||
316 | } | ||
317 | |||
311 | static unsigned long long rn2addr(u16 rn) | 318 | static unsigned long long rn2addr(u16 rn) |
312 | { | 319 | { |
313 | return (unsigned long long) (rn - 1) * rzm; | 320 | return (unsigned long long) (rn - 1) * rzm; |
@@ -704,13 +711,6 @@ int sclp_chp_deconfigure(struct chp_id chpid) | |||
704 | return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8); | 711 | return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8); |
705 | } | 712 | } |
706 | 713 | ||
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 | |||
714 | struct chp_info_sccb { | 714 | struct chp_info_sccb { |
715 | struct sccb_header header; | 715 | struct sccb_header header; |
716 | u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; | 716 | u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; |