diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2014-05-27 15:36:35 +1000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-06-16 13:24:39 +0200 |
commit | 523e7b8ab818ec3fab14cfd7a20d51cb3aa33a9d (patch) | |
tree | b7d72322305d1dbc097846b9374dc034d6a04a74 /target-ppc | |
parent | e4c35b78bce645aaa299d3b7b62494c880c6c74d (diff) |
spapr_iommu: Get rid of window_size in sPAPRTCETable
This removes window_size as it is basically a copy of nb_table
shifted by SPAPR_TCE_PAGE_SHIFT. As new dynamic DMA windows are
going to support windows as big as the entire RAM and this number
will be bigger that 32 capacity, we will have to do something
about @window_size anyway and removal seems to be the right way to go.
This removes dma_window_start/dma_window_size from sPAPRPHBState as
they are no longer used.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc')
-rw-r--r-- | target-ppc/kvm.c | 4 | ||||
-rw-r--r-- | target-ppc/kvm_ppc.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 2b2e35f22f..e6a1625b6b 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -1660,7 +1660,7 @@ void *kvmppc_create_spapr_tce(uint32_t liobn, uint32_t window_size, int *pfd) return table; } -int kvmppc_remove_spapr_tce(void *table, int fd, uint32_t window_size) +int kvmppc_remove_spapr_tce(void *table, int fd, uint32_t nb_table) { long len; @@ -1668,7 +1668,7 @@ int kvmppc_remove_spapr_tce(void *table, int fd, uint32_t window_size) return -1; } - len = (window_size / SPAPR_TCE_PAGE_SIZE)*sizeof(uint64_t); + len = nb_table * sizeof(uint64_t); if ((munmap(table, len) < 0) || (close(fd) < 0)) { fprintf(stderr, "KVM: Unexpected error removing TCE table: %s", diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h index 98aa641d8f..5ea209a81b 100644 --- a/target-ppc/kvm_ppc.h +++ b/target-ppc/kvm_ppc.h @@ -149,7 +149,7 @@ static inline void *kvmppc_create_spapr_tce(uint32_t liobn, } static inline int kvmppc_remove_spapr_tce(void *table, int pfd, - uint32_t window_size) + uint32_t nb_table) { return -1; } |