Commit 9c95258c0d5911ae263bf50d854e402ce973ab32
Committed by
Martin Schwidefsky
1 parent
b8fde7224d
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 7 additions and 7 deletions Side-by-side Diff
drivers/s390/char/sclp_cmd.c
... | ... | @@ -308,6 +308,13 @@ |
308 | 308 | u16 rn; |
309 | 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 | 318 | static unsigned long long rn2addr(u16 rn) |
312 | 319 | { |
313 | 320 | return (unsigned long long) (rn - 1) * rzm; |
... | ... | @@ -702,13 +709,6 @@ |
702 | 709 | int sclp_chp_deconfigure(struct chp_id chpid) |
703 | 710 | { |
704 | 711 | return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8); |
705 | -} | |
706 | - | |
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 | 712 | } |
713 | 713 | |
714 | 714 | struct chp_info_sccb { |