Skip to content

Commit c94bff6

Browse files
niklas88Vasily Gorbik
authored andcommitted
s390: Remove ioremap_wt() and pgprot_writethrough()
It turns out that while s390 architecture calls its memory-I/O mapping variants write-through and write-back the implementation of ioremap_wt() and pgprot_writethrough() does not match Linux notion of ioremap_wt(). In particular Linux expects ioremap_wt() to be weaker still than ioremap_wc(), allowing not just gathering and re-ordering but also reads to be served from cache. Instead s390's implementation is equivalent to normal ioremap() while its ioremap_wc() allows re-ordering. Note that there are no known users of ioremap_wt() on s390 and the resulting behavior is in line with asm-generic defining ioremap_wt() as ioremap(), if undefined, so no breakage is expected. As s390 does not have a mapping type matching the Linux notion of ioremap_wt() and pgprot_writethrough(), simply drop them and rely on the asm-generic fallbacks instead. Fixes: b02002c ("s390/pci: Implement ioremap_wc/prot() with MIO") Fixes: b43b3ff ("s390: mm: convert to GENERIC_IOREMAP") Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 08d95a1 commit c94bff6

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

arch/s390/include/asm/io.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
3434

3535
#define ioremap_wc(addr, size) \
3636
ioremap_prot((addr), (size), pgprot_val(pgprot_writecombine(PAGE_KERNEL)))
37-
#define ioremap_wt(addr, size) \
38-
ioremap_prot((addr), (size), pgprot_val(pgprot_writethrough(PAGE_KERNEL)))
3937

4038
static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
4139
{

arch/s390/include/asm/pgtable.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,9 +1403,6 @@ void gmap_pmdp_idte_global(struct mm_struct *mm, unsigned long vmaddr);
14031403
#define pgprot_writecombine pgprot_writecombine
14041404
pgprot_t pgprot_writecombine(pgprot_t prot);
14051405

1406-
#define pgprot_writethrough pgprot_writethrough
1407-
pgprot_t pgprot_writethrough(pgprot_t prot);
1408-
14091406
#define PFN_PTE_SHIFT PAGE_SHIFT
14101407

14111408
/*

arch/s390/mm/pgtable.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ pgprot_t pgprot_writecombine(pgprot_t prot)
3636
}
3737
EXPORT_SYMBOL_GPL(pgprot_writecombine);
3838

39-
pgprot_t pgprot_writethrough(pgprot_t prot)
40-
{
41-
/*
42-
* mio_wb_bit_mask may be set on a different CPU, but it is only set
43-
* once at init and only read afterwards.
44-
*/
45-
return __pgprot(pgprot_val(prot) & ~mio_wb_bit_mask);
46-
}
47-
EXPORT_SYMBOL_GPL(pgprot_writethrough);
48-
4939
static inline void ptep_ipte_local(struct mm_struct *mm, unsigned long addr,
5040
pte_t *ptep, int nodat)
5141
{

0 commit comments

Comments
 (0)