mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
s390x: Replace PAGE_SIZE, PAGE_SHIFT and PAGE_MASK
The PAGE_SIZE macro is causing trouble on Alpine Linux since it clashes with a macro from a system header there. We already have the TARGET_PAGE_SIZE, TARGET_PAGE_MASK and TARGET_PAGE_BITS macros in QEMU anyway, so let's simply replace the PAGE_SIZE, PAGE_MASK and PAGE_SHIFT macro with their TARGET_* counterparts. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/572 Message-Id: <20210901125800.611183-1-thuth@redhat.com> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
c35622387e
commit
ed3288ff8f
4 changed files with 11 additions and 14 deletions
|
@ -613,7 +613,7 @@ static uint32_t s390_pci_update_iotlb(S390PCIIOMMU *iommu,
|
|||
.iova = entry->iova,
|
||||
.translated_addr = entry->translated_addr,
|
||||
.perm = entry->perm,
|
||||
.addr_mask = ~PAGE_MASK,
|
||||
.addr_mask = ~TARGET_PAGE_MASK,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -640,7 +640,7 @@ static uint32_t s390_pci_update_iotlb(S390PCIIOMMU *iommu,
|
|||
cache = g_new(S390IOTLBEntry, 1);
|
||||
cache->iova = entry->iova;
|
||||
cache->translated_addr = entry->translated_addr;
|
||||
cache->len = PAGE_SIZE;
|
||||
cache->len = TARGET_PAGE_SIZE;
|
||||
cache->perm = entry->perm;
|
||||
g_hash_table_replace(iommu->iotlb, &cache->iova, cache);
|
||||
dec_dma_avail(iommu);
|
||||
|
@ -725,8 +725,8 @@ int rpcit_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2, uintptr_t ra)
|
|||
while (entry.iova < start && entry.iova < end &&
|
||||
(dma_avail > 0 || entry.perm == IOMMU_NONE)) {
|
||||
dma_avail = s390_pci_update_iotlb(iommu, &entry);
|
||||
entry.iova += PAGE_SIZE;
|
||||
entry.translated_addr += PAGE_SIZE;
|
||||
entry.iova += TARGET_PAGE_SIZE;
|
||||
entry.translated_addr += TARGET_PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
err:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue