diff options
author | Alexey Kardashevskiy | 2016-04-29 10:55:17 +0200 |
---|---|---|
committer | Michael Ellerman | 2016-05-11 13:54:28 +0200 |
commit | bef9253f551189febf0052a06dc079eb34137a58 (patch) | |
tree | d55ccc3eb08103dfe3eea14e91d17c3b3c0167a3 /arch/powerpc/platforms/powernv | |
parent | powerpc/powernv: Rename pnv_pci_ioda2_tce_invalidate_entire (diff) | |
download | kernel-qcow2-linux-bef9253f551189febf0052a06dc079eb34137a58.tar.gz kernel-qcow2-linux-bef9253f551189febf0052a06dc079eb34137a58.tar.xz kernel-qcow2-linux-bef9253f551189febf0052a06dc079eb34137a58.zip |
powerpc/powernv: Define TCE Kill flags
This replaces magic constants for TCE Kill IODA2 register with macros.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv')
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index acce430559d3..d7fbbf185108 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -1840,10 +1840,13 @@ static struct iommu_table_ops pnv_ioda1_iommu_ops = { .get = pnv_tce_get, }; +#define TCE_KILL_INVAL_PE PPC_BIT(1) +#define TCE_KILL_INVAL_TCE PPC_BIT(2) + static inline void pnv_pci_ioda2_tce_invalidate_pe(struct pnv_ioda_pe *pe) { /* 01xb - invalidate TCEs that match the specified PE# */ - unsigned long val = (0x4ull << 60) | (pe->pe_number & 0xFF); + unsigned long val = TCE_KILL_INVAL_PE | (pe->pe_number & 0xFF); struct pnv_phb *phb = pe->phb; struct pnv_ioda_pe *npe; int i; @@ -1871,7 +1874,7 @@ static void pnv_pci_ioda2_do_tce_invalidate(unsigned pe_number, bool rm, unsigned long start, end, inc; /* We'll invalidate DMA address in PE scope */ - start = 0x2ull << 60; + start = TCE_KILL_INVAL_TCE; start |= (pe_number & 0xFF); end = start; |