Commit 001ff2ee authored by Michael Ellerman's avatar Michael Ellerman

powerpc/powernv: Use __raw_[rm_]writeq_be() in pci-ioda.c

This allows us to squash some sparse warnings and also avoids having
to do explicity endian conversions in the code.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Reviewed-by: default avatarSamuel Mendoza-Jonas <sam@mendozajonas.com>
parent 8056fe28
......@@ -1976,9 +1976,10 @@ static void pnv_pci_p7ioc_tce_invalidate(struct iommu_table *tbl,
mb(); /* Ensure above stores are visible */
while (start <= end) {
if (rm)
__raw_rm_writeq(cpu_to_be64(start), invalidate);
__raw_rm_writeq_be(start, invalidate);
else
__raw_writeq(cpu_to_be64(start), invalidate);
__raw_writeq_be(start, invalidate);
start += inc;
}
......@@ -2055,9 +2056,9 @@ static void pnv_pci_phb3_tce_invalidate_entire(struct pnv_phb *phb, bool rm)
mb(); /* Ensure previous TCE table stores are visible */
if (rm)
__raw_rm_writeq(cpu_to_be64(val), invalidate);
__raw_rm_writeq_be(val, invalidate);
else
__raw_writeq(cpu_to_be64(val), invalidate);
__raw_writeq_be(val, invalidate);
}
static inline void pnv_pci_phb3_tce_invalidate_pe(struct pnv_ioda_pe *pe)
......@@ -2067,7 +2068,7 @@ static inline void pnv_pci_phb3_tce_invalidate_pe(struct pnv_ioda_pe *pe)
unsigned long val = PHB3_TCE_KILL_INVAL_PE | (pe->pe_number & 0xFF);
mb(); /* Ensure above stores are visible */
__raw_writeq(cpu_to_be64(val), invalidate);
__raw_writeq_be(val, invalidate);
}
static void pnv_pci_phb3_tce_invalidate(struct pnv_ioda_pe *pe, bool rm,
......@@ -2090,9 +2091,9 @@ static void pnv_pci_phb3_tce_invalidate(struct pnv_ioda_pe *pe, bool rm,
while (start <= end) {
if (rm)
__raw_rm_writeq(cpu_to_be64(start), invalidate);
__raw_rm_writeq_be(start, invalidate);
else
__raw_writeq(cpu_to_be64(start), invalidate);
__raw_writeq_be(start, invalidate);
start += inc;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment