Skip to content

Commit c051451

Browse files
mpemaddy-kerneldev
authored andcommitted
powerpc/io: Spell-out PCI_IO_ADDR
PCI_IO_ADDR is a ppc-ism, which obscures the fact that some of the powerpc accessors are identical to the generic ones. So remove it and spell out the type fully. Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Madhavan Srinivasan <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 8a55941 commit c051451

File tree

1 file changed

+24
-27
lines changed
  • arch/powerpc/include/asm

1 file changed

+24
-27
lines changed

arch/powerpc/include/asm/io.h

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,7 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,
274274
#include <asm/eeh.h>
275275
#endif
276276

277-
/* Shortcut to the MMIO argument pointer */
278-
#define PCI_IO_ADDR volatile void __iomem *
279-
280-
#define _IO_PORT(port) ((PCI_IO_ADDR)(_IO_BASE + (port)))
277+
#define _IO_PORT(port) ((volatile void __iomem *)(_IO_BASE + (port)))
281278

282279
/*
283280
* Non ordered and non-swapping "raw" accessors
@@ -570,133 +567,133 @@ __do_out_asm(_rec_outl, "stwbrx")
570567
_memcpy_fromio(dst, src, n)
571568
#endif /* !CONFIG_EEH */
572569

573-
static inline u8 readb(const PCI_IO_ADDR addr)
570+
static inline u8 readb(const volatile void __iomem *addr)
574571
{
575572
return __do_readb(addr);
576573
}
577574
#define readb readb
578575

579-
static inline u16 readw(const PCI_IO_ADDR addr)
576+
static inline u16 readw(const volatile void __iomem *addr)
580577
{
581578
return __do_readw(addr);
582579
}
583580
#define readw readw
584581

585-
static inline u32 readl(const PCI_IO_ADDR addr)
582+
static inline u32 readl(const volatile void __iomem *addr)
586583
{
587584
return __do_readl(addr);
588585
}
589586
#define readl readl
590587

591-
static inline u16 readw_be(const PCI_IO_ADDR addr)
588+
static inline u16 readw_be(const volatile void __iomem *addr)
592589
{
593590
return __do_readw_be(addr);
594591
}
595592

596-
static inline u32 readl_be(const PCI_IO_ADDR addr)
593+
static inline u32 readl_be(const volatile void __iomem *addr)
597594
{
598595
return __do_readl_be(addr);
599596
}
600597

601-
static inline void writeb(u8 val, PCI_IO_ADDR addr)
598+
static inline void writeb(u8 val, volatile void __iomem *addr)
602599
{
603600
out_8(addr, val);
604601
}
605602
#define writeb writeb
606603

607-
static inline void writew(u16 val, PCI_IO_ADDR addr)
604+
static inline void writew(u16 val, volatile void __iomem *addr)
608605
{
609606
out_le16(addr, val);
610607
}
611608
#define writew writew
612609

613-
static inline void writel(u32 val, PCI_IO_ADDR addr)
610+
static inline void writel(u32 val, volatile void __iomem *addr)
614611
{
615612
out_le32(addr, val);
616613
}
617614
#define writel writel
618615

619-
static inline void writew_be(u16 val, PCI_IO_ADDR addr)
616+
static inline void writew_be(u16 val, volatile void __iomem *addr)
620617
{
621618
out_be16(addr, val);
622619
}
623620

624-
static inline void writel_be(u32 val, PCI_IO_ADDR addr)
621+
static inline void writel_be(u32 val, volatile void __iomem *addr)
625622
{
626623
out_be32(addr, val);
627624
}
628625

629-
static inline void readsb(const PCI_IO_ADDR a, void *b, unsigned long c)
626+
static inline void readsb(const volatile void __iomem *a, void *b, unsigned long c)
630627
{
631628
__do_readsb(a, b, c);
632629
}
633630
#define readsb readsb
634631

635-
static inline void readsw(const PCI_IO_ADDR a, void *b, unsigned long c)
632+
static inline void readsw(const volatile void __iomem *a, void *b, unsigned long c)
636633
{
637634
__do_readsw(a, b, c);
638635
}
639636
#define readsw readsw
640637

641-
static inline void readsl(const PCI_IO_ADDR a, void *b, unsigned long c)
638+
static inline void readsl(const volatile void __iomem *a, void *b, unsigned long c)
642639
{
643640
__do_readsl(a, b, c);
644641
}
645642
#define readsl readsl
646643

647-
static inline void writesb(PCI_IO_ADDR a, const void *b, unsigned long c)
644+
static inline void writesb(volatile void __iomem *a, const void *b, unsigned long c)
648645
{
649646
__do_writesb(a, b, c);
650647
}
651648
#define writesb writesb
652649

653-
static inline void writesw(PCI_IO_ADDR a, const void *b, unsigned long c)
650+
static inline void writesw(volatile void __iomem *a, const void *b, unsigned long c)
654651
{
655652
__do_writesw(a, b, c);
656653
}
657654
#define writesw writesw
658655

659-
static inline void writesl(PCI_IO_ADDR a, const void *b, unsigned long c)
656+
static inline void writesl(volatile void __iomem *a, const void *b, unsigned long c)
660657
{
661658
__do_writesl(a, b, c);
662659
}
663660
#define writesl writesl
664661

665-
static inline void memset_io(PCI_IO_ADDR a, int c, unsigned long n)
662+
static inline void memset_io(volatile void __iomem *a, int c, unsigned long n)
666663
{
667664
_memset_io(a, c, n);
668665
}
669666
#define memset_io memset_io
670667

671-
static inline void memcpy_fromio(void *d, const PCI_IO_ADDR s, unsigned long n)
668+
static inline void memcpy_fromio(void *d, const volatile void __iomem *s, unsigned long n)
672669
{
673670
__do_memcpy_fromio(d, s, n);
674671
}
675672
#define memcpy_fromio memcpy_fromio
676673

677-
static inline void memcpy_toio(PCI_IO_ADDR d, const void *s, unsigned long n)
674+
static inline void memcpy_toio(volatile void __iomem *d, const void *s, unsigned long n)
678675
{
679676
_memcpy_toio(d, s, n);
680677
}
681678
#define memcpy_toio memcpy_toio
682679

683680
#ifdef __powerpc64__
684-
static inline u64 readq(const PCI_IO_ADDR addr)
681+
static inline u64 readq(const volatile void __iomem *addr)
685682
{
686683
return __do_readq(addr);
687684
}
688685

689-
static inline u64 readq_be(const PCI_IO_ADDR addr)
686+
static inline u64 readq_be(const volatile void __iomem *addr)
690687
{
691688
return __do_readq_be(addr);
692689
}
693690

694-
static inline void writeq(u64 val, PCI_IO_ADDR addr)
691+
static inline void writeq(u64 val, volatile void __iomem *addr)
695692
{
696693
out_le64(addr, val);
697694
}
698695

699-
static inline void writeq_be(u64 val, PCI_IO_ADDR addr)
696+
static inline void writeq_be(u64 val, volatile void __iomem *addr)
700697
{
701698
out_be64(addr, val);
702699
}

0 commit comments

Comments
 (0)