[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/40] hw/ppc/spapr_iommu: Fix the check for invalid
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 15/40] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn |
Date: |
Wed, 3 Jun 2015 23:45:16 +0200 |
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>
Signed-off-by: Alexander Graf <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);
--
1.8.1.4
- [Qemu-devel] [PULL 01/40] macio: Convert to realize(), (continued)
- [Qemu-devel] [PULL 01/40] macio: Convert to realize(), Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 10/40] spapr_iommu: Add separate trace points for PCI DMA operations, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 23/40] spapr_rtas: add get-sensor-state RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 31/40] pci: make pci_bar useable outside pci.c, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 05/40] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 33/40] spapr_pci: emit hotplug add/remove events during hotplug, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 04/40] spapr_pci: Fix unsafe signed/unsigned comparisons, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 30/40] spapr_pci: create DRConnectors for each PCI slot during PHB realize, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 15/40] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn,
Alexander Graf <=
- [Qemu-devel] [PULL 24/40] spapr: add rtas_st_buffer_direct() helper, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 12/40] spapr_iommu: Make spapr_tce_find_by_liobn() public, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 08/40] spapr_vio: Introduce a liobn number generating macros, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 06/40] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 09/40] spapr_pci: Define default DMA window size as a macro, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 07/40] spapr_pci: Introduce a liobn number generating macros, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 18/40] hw/ppc/spapr: Use error_report() instead of hw_error(), Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 14/40] spapr_iommu: Give unique QOM name to TCE table, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 16/40] pseries: Add pseries-2.4 machine type, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 13/40] spapr_pci: Rework device-tree rendering, Alexander Graf, 2015/06/03