• Alexander Graf's avatar
    KVM: PPC: Book3S: Compile fix for ppc32 in HIOR access code · b8e6f8ae
    Alexander Graf authored
    We were failing to compile on book3s_32 with the following errors:
    
    arch/powerpc/kvm/book3s_pr.c:883:45: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
    arch/powerpc/kvm/book3s_pr.c:898:79: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
    
    Fix this by explicity casting the u64 to long before we use it as a pointer.
    
    Also, on PPC32 we can not use get_user/put_user for 64bit wide variables,
    as there is no single instruction that could load or store variables that big.
    
    So instead, we have to use copy_from/to_user which works everywhere.
    Reported-by: default avatarJörg Sommer <joerg@alea.gnuu.de>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    b8e6f8ae
book3s_pr.c 29.7 KB