diff options
author | Thomas Huth | 2015-05-07 07:33:38 +0200 |
---|---|---|
committer | Alexander Graf | 2015-06-03 23:56:51 +0200 |
commit | f9ce8e0aa3fb55ae7a8ea34d3169e73e87feb337 (patch) | |
tree | 8c1d69c87ca9c907d335f79e71a48d4a64fbbd2f /hw/ppc/spapr_iommu.c | |
parent | spapr_iommu: Give unique QOM name to TCE table (diff) | |
download | qemu-f9ce8e0aa3fb55ae7a8ea34d3169e73e87feb337.tar.gz qemu-f9ce8e0aa3fb55ae7a8ea34d3169e73e87feb337.tar.xz qemu-f9ce8e0aa3fb55ae7a8ea34d3169e73e87feb337.zip |
hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn
The check "liobn & 0xFFFFFFFF00000000ULL" in spapr_tce_find_by_liobn()
is completely useless since liobn is only declared as an uint32_t
parameter. Fix this by using target_ulong instead (this is what most
of the callers of this function are using, too).
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/spapr_iommu.c')
-rw-r--r-- | hw/ppc/spapr_iommu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c index a14cdc434f..8cd9dba9ac 100644 --- a/hw/ppc/spapr_iommu.c +++ b/hw/ppc/spapr_iommu.c @@ -41,7 +41,7 @@ enum sPAPRTCEAccess { static QLIST_HEAD(spapr_tce_tables, sPAPRTCETable) spapr_tce_tables; -sPAPRTCETable *spapr_tce_find_by_liobn(uint32_t liobn) +sPAPRTCETable *spapr_tce_find_by_liobn(target_ulong liobn) { sPAPRTCETable *tcet; @@ -52,7 +52,7 @@ sPAPRTCETable *spapr_tce_find_by_liobn(uint32_t liobn) } QLIST_FOREACH(tcet, &spapr_tce_tables, list) { - if (tcet->liobn == liobn) { + if (tcet->liobn == (uint32_t)liobn) { return tcet; } } |