[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/32] hw/ppc/spapr_iommu: Fix the check for invalid
From: |
David Gibson |
Subject: |
[Qemu-devel] [PATCH 12/32] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn |
Date: |
Fri, 1 May 2015 16:41:30 +1000 |
From: Thomas Huth <address@hidden>
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 <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_iommu.c | 4 ++--
include/hw/ppc/spapr.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index a14cdc4..8cd9dba 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;
}
}
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 7d9ab9d..317feb6 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -511,7 +511,7 @@ struct sPAPRTCETable {
QLIST_ENTRY(sPAPRTCETable) list;
};
-sPAPRTCETable *spapr_tce_find_by_liobn(uint32_t liobn);
+sPAPRTCETable *spapr_tce_find_by_liobn(target_ulong liobn);
void spapr_events_init(sPAPREnvironment *spapr);
void spapr_events_fdt_skel(void *fdt, uint32_t epow_irq);
int spapr_h_cas_compose_response(target_ulong addr, target_ulong size);
--
2.1.0
- [Qemu-devel] [PATCH 00/32] Accumulated -machine pseries patches 2015/05/01, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 27/32] spapr_pci: create DRConnectors for each PCI slot during PHB realize, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 12/32] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn,
David Gibson <=
- [Qemu-devel] [PATCH 26/32] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 11/32] spapr_iommu: Give unique QOM name to TCE table, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 14/32] hw/ppc/spapr: Fix error message when firmware could not be loaded, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 09/32] spapr_iommu: Make spapr_tce_find_by_liobn() public, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 18/32] spapr_rtas: add get/set-power-level RTAS interfaces, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 20/32] spapr_rtas: add get-sensor-state RTAS interface, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 19/32] spapr_rtas: add set-indicator RTAS interface, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 04/32] spapr_pci: Introduce a liobn number generating macros, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 03/32] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe, David Gibson, 2015/05/01
- [Qemu-devel] [PATCH 24/32] spapr_events: event-scan RTAS interface, David Gibson, 2015/05/01