diff options
author | Alon Levy <alevy@redhat.com> | 2012-03-21 17:57:32 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-03-21 17:57:32 +0200 |
commit | 5391736c29c5452252a5f00833ea76087e7c8a71 (patch) | |
tree | 0733c82161f19b15c42cee694f50d841bb7299c0 /server/red_memslots.h | |
parent | f360273614ac06493ea5a9d501036fa36d3224ee (diff) | |
download | spice-5391736c29c5452252a5f00833ea76087e7c8a71.tar.gz spice-5391736c29c5452252a5f00833ea76087e7c8a71.tar.xz spice-5391736c29c5452252a5f00833ea76087e7c8a71.zip |
server/red_memslots: use QXLPHYSICAL for addresses
Cannot assume unsigned long == QXLPHYSICAL, not true for 32 bit
architectures.
Diffstat (limited to 'server/red_memslots.h')
-rw-r--r-- | server/red_memslots.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/red_memslots.h b/server/red_memslots.h index 7aea0a3b..75754d0c 100644 --- a/server/red_memslots.h +++ b/server/red_memslots.h @@ -43,12 +43,12 @@ typedef struct RedMemSlotInfo { unsigned long memslot_clean_virt_mask; } RedMemSlotInfo; -static inline int get_memslot_id(RedMemSlotInfo *info, unsigned long addr) +static inline int get_memslot_id(RedMemSlotInfo *info, uint64_t addr) { return addr >> info->memslot_id_shift; } -static inline int get_generation(RedMemSlotInfo *info, unsigned long addr) +static inline int get_generation(RedMemSlotInfo *info, uint64_t addr) { return (addr >> info->memslot_gen_shift) & info->memslot_gen_mask; } |