lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202208201146.8VeY9pez-lkp@intel.com>
Date:   Sat, 20 Aug 2022 11:41:38 +0800
From:   kernel test robot <lkp@...el.com>
To:     Baoquan He <bhe@...hat.com>, linux-kernel@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org, hch@...radead.org,
        agordeev@...ux.ibm.com, wangkefeng.wang@...wei.com,
        linux-arm-kernel@...ts.infradead.org, Baoquan He <bhe@...hat.com>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Rich Felker <dalias@...c.org>, linux-sh@...r.kernel.org
Subject: Re: [PATCH v2 10/11] sh: mm: Convert to GENERIC_IOREMAP

Hi Baoquan,

I love your patch! Yet something to improve:

[auto build test ERROR on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/Baoquan-He/mm-ioremap-Convert-architectures-to-take-GENERIC_IOREMAP-way/20220820-083435
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
config: sh-allmodconfig
compiler: sh4-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/503a31451202f89e58bc5f0a49261398fafbd90e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Baoquan-He/mm-ioremap-Convert-architectures-to-take-GENERIC_IOREMAP-way/20220820-083435
        git checkout 503a31451202f89e58bc5f0a49261398fafbd90e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh prepare

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/io.h:13,
                    from include/linux/irq.h:20,
                    from include/asm-generic/hardirq.h:17,
                    from arch/sh/include/asm/hardirq.h:9,
                    from include/linux/hardirq.h:11,
                    from include/linux/interrupt.h:11,
                    from include/linux/kernel_stat.h:9,
                    from include/linux/cgroup.h:26,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from arch/sh/kernel/asm-offsets.c:16:
>> arch/sh/include/asm/io.h:259: warning: "ioremap_cache" redefined
     259 | #define ioremap_cache ioremap_cache
         | 
   arch/sh/include/asm/io.h:257: note: this is the location of the previous definition
     257 | #define ioremap_cache(addr, size)  \
         | 
   In file included from arch/sh/include/asm/io.h:263:
>> include/asm-generic/io.h:689:14: error: conflicting types for 'insb'; have 'void(long unsigned int,  void *, unsigned int)'
     689 | #define insb insb
         |              ^~~~
   include/asm-generic/io.h:690:20: note: in expansion of macro 'insb'
     690 | static inline void insb(unsigned long addr, void *buffer, unsigned int count)
         |                    ^~~~
   In file included from arch/sh/include/asm/io.h:220:
   arch/sh/include/asm/io_noioport.h:56:20: note: previous definition of 'insb' with type 'void(long unsigned int,  void *, long unsigned int)'
      56 | static inline void insb(unsigned long port, void *dst, unsigned long count)
         |                    ^~~~
>> include/asm-generic/io.h:697:14: error: conflicting types for 'insw'; have 'void(long unsigned int,  void *, unsigned int)'
     697 | #define insw insw
         |              ^~~~
   include/asm-generic/io.h:698:20: note: in expansion of macro 'insw'
     698 | static inline void insw(unsigned long addr, void *buffer, unsigned int count)
         |                    ^~~~
   arch/sh/include/asm/io_noioport.h:61:20: note: previous definition of 'insw' with type 'void(long unsigned int,  void *, long unsigned int)'
      61 | static inline void insw(unsigned long port, void *dst, unsigned long count)
         |                    ^~~~
>> include/asm-generic/io.h:705:14: error: conflicting types for 'insl'; have 'void(long unsigned int,  void *, unsigned int)'
     705 | #define insl insl
         |              ^~~~
   include/asm-generic/io.h:706:20: note: in expansion of macro 'insl'
     706 | static inline void insl(unsigned long addr, void *buffer, unsigned int count)
         |                    ^~~~
   arch/sh/include/asm/io_noioport.h:66:20: note: previous definition of 'insl' with type 'void(long unsigned int,  void *, long unsigned int)'
      66 | static inline void insl(unsigned long port, void *dst, unsigned long count)
         |                    ^~~~
>> include/asm-generic/io.h:713:15: error: conflicting types for 'outsb'; have 'void(long unsigned int,  const void *, unsigned int)'
     713 | #define outsb outsb
         |               ^~~~~
   include/asm-generic/io.h:714:20: note: in expansion of macro 'outsb'
     714 | static inline void outsb(unsigned long addr, const void *buffer,
         |                    ^~~~~
   arch/sh/include/asm/io_noioport.h:71:20: note: previous definition of 'outsb' with type 'void(long unsigned int,  const void *, long unsigned int)'
      71 | static inline void outsb(unsigned long port, const void *src, unsigned long count)
         |                    ^~~~~
>> include/asm-generic/io.h:722:15: error: conflicting types for 'outsw'; have 'void(long unsigned int,  const void *, unsigned int)'
     722 | #define outsw outsw
         |               ^~~~~
   include/asm-generic/io.h:723:20: note: in expansion of macro 'outsw'
     723 | static inline void outsw(unsigned long addr, const void *buffer,
         |                    ^~~~~
   arch/sh/include/asm/io_noioport.h:76:20: note: previous definition of 'outsw' with type 'void(long unsigned int,  const void *, long unsigned int)'
      76 | static inline void outsw(unsigned long port, const void *src, unsigned long count)
         |                    ^~~~~
>> include/asm-generic/io.h:731:15: error: conflicting types for 'outsl'; have 'void(long unsigned int,  const void *, unsigned int)'
     731 | #define outsl outsl
         |               ^~~~~
   include/asm-generic/io.h:732:20: note: in expansion of macro 'outsl'
     732 | static inline void outsl(unsigned long addr, const void *buffer,
         |                    ^~~~~
   arch/sh/include/asm/io_noioport.h:81:20: note: previous definition of 'outsl' with type 'void(long unsigned int,  const void *, long unsigned int)'
      81 | static inline void outsl(unsigned long port, const void *src, unsigned long count)
         |                    ^~~~~
>> include/asm-generic/io.h:792:17: error: conflicting types for 'ioread8'; have 'u8(const volatile void *)' {aka 'unsigned char(const volatile void *)'}
     792 | #define ioread8 ioread8
         |                 ^~~~~~~
   include/asm-generic/io.h:793:18: note: in expansion of macro 'ioread8'
     793 | static inline u8 ioread8(const volatile void __iomem *addr)
         |                  ^~~~~~~
   In file included from arch/sh/include/asm/io.h:22:
   include/asm-generic/iomap.h:29:21: note: previous declaration of 'ioread8' with type 'unsigned int(const void *)'
      29 | extern unsigned int ioread8(const void __iomem *);
         |                     ^~~~~~~
>> include/asm-generic/io.h:800:18: error: conflicting types for 'ioread16'; have 'u16(const volatile void *)' {aka 'short unsigned int(const volatile void *)'}
     800 | #define ioread16 ioread16
         |                  ^~~~~~~~
   include/asm-generic/io.h:801:19: note: in expansion of macro 'ioread16'
     801 | static inline u16 ioread16(const volatile void __iomem *addr)
         |                   ^~~~~~~~
   include/asm-generic/iomap.h:30:21: note: previous declaration of 'ioread16' with type 'unsigned int(const void *)'
      30 | extern unsigned int ioread16(const void __iomem *);
         |                     ^~~~~~~~
>> include/asm-generic/io.h:808:18: error: conflicting types for 'ioread32'; have 'u32(const volatile void *)' {aka 'unsigned int(const volatile void *)'}
     808 | #define ioread32 ioread32
         |                  ^~~~~~~~
   include/asm-generic/io.h:809:19: note: in expansion of macro 'ioread32'
     809 | static inline u32 ioread32(const volatile void __iomem *addr)
         |                   ^~~~~~~~
   include/asm-generic/iomap.h:32:21: note: previous declaration of 'ioread32' with type 'unsigned int(const void *)'
      32 | extern unsigned int ioread32(const void __iomem *);
         |                     ^~~~~~~~
>> include/asm-generic/io.h:826:18: error: conflicting types for 'iowrite8'; have 'void(u8,  volatile void *)' {aka 'void(unsigned char,  volatile void *)'}
     826 | #define iowrite8 iowrite8
         |                  ^~~~~~~~
   include/asm-generic/io.h:827:20: note: in expansion of macro 'iowrite8'
     827 | static inline void iowrite8(u8 value, volatile void __iomem *addr)
         |                    ^~~~~~~~
   include/asm-generic/iomap.h:50:13: note: previous declaration of 'iowrite8' with type 'void(u8,  void *)' {aka 'void(unsigned char,  void *)'}
      50 | extern void iowrite8(u8, void __iomem *);
         |             ^~~~~~~~
>> include/asm-generic/io.h:834:19: error: conflicting types for 'iowrite16'; have 'void(u16,  volatile void *)' {aka 'void(short unsigned int,  volatile void *)'}
     834 | #define iowrite16 iowrite16
         |                   ^~~~~~~~~
   include/asm-generic/io.h:835:20: note: in expansion of macro 'iowrite16'
     835 | static inline void iowrite16(u16 value, volatile void __iomem *addr)
         |                    ^~~~~~~~~
   include/asm-generic/iomap.h:51:13: note: previous declaration of 'iowrite16' with type 'void(u16,  void *)' {aka 'void(short unsigned int,  void *)'}
      51 | extern void iowrite16(u16, void __iomem *);
         |             ^~~~~~~~~
>> include/asm-generic/io.h:842:19: error: conflicting types for 'iowrite32'; have 'void(u32,  volatile void *)' {aka 'void(unsigned int,  volatile void *)'}
     842 | #define iowrite32 iowrite32
         |                   ^~~~~~~~~
   include/asm-generic/io.h:843:20: note: in expansion of macro 'iowrite32'
     843 | static inline void iowrite32(u32 value, volatile void __iomem *addr)
         |                    ^~~~~~~~~
   include/asm-generic/iomap.h:53:13: note: previous declaration of 'iowrite32' with type 'void(u32,  void *)' {aka 'void(unsigned int,  void *)'}
      53 | extern void iowrite32(u32, void __iomem *);
         |             ^~~~~~~~~
>> include/asm-generic/io.h:860:20: error: conflicting types for 'ioread16be'; have 'u16(const volatile void *)' {aka 'short unsigned int(const volatile void *)'}
     860 | #define ioread16be ioread16be
         |                    ^~~~~~~~~~
   include/asm-generic/io.h:861:19: note: in expansion of macro 'ioread16be'
     861 | static inline u16 ioread16be(const volatile void __iomem *addr)
         |                   ^~~~~~~~~~
   include/asm-generic/iomap.h:31:21: note: previous declaration of 'ioread16be' with type 'unsigned int(const void *)'
      31 | extern unsigned int ioread16be(const void __iomem *);
         |                     ^~~~~~~~~~
>> include/asm-generic/io.h:868:20: error: conflicting types for 'ioread32be'; have 'u32(const volatile void *)' {aka 'unsigned int(const volatile void *)'}
     868 | #define ioread32be ioread32be
         |                    ^~~~~~~~~~
   include/asm-generic/io.h:869:19: note: in expansion of macro 'ioread32be'
     869 | static inline u32 ioread32be(const volatile void __iomem *addr)
         |                   ^~~~~~~~~~
   include/asm-generic/iomap.h:33:21: note: previous declaration of 'ioread32be' with type 'unsigned int(const void *)'
      33 | extern unsigned int ioread32be(const void __iomem *);
         |                     ^~~~~~~~~~
>> include/asm-generic/io.h:886:21: error: conflicting types for 'iowrite16be'; have 'void(u16,  volatile void *)' {aka 'void(short unsigned int,  volatile void *)'}
     886 | #define iowrite16be iowrite16be
         |                     ^~~~~~~~~~~
   include/asm-generic/io.h:887:20: note: in expansion of macro 'iowrite16be'
     887 | static inline void iowrite16be(u16 value, void volatile __iomem *addr)
         |                    ^~~~~~~~~~~
   include/asm-generic/iomap.h:52:13: note: previous declaration of 'iowrite16be' with type 'void(u16,  void *)' {aka 'void(short unsigned int,  void *)'}
      52 | extern void iowrite16be(u16, void __iomem *);
         |             ^~~~~~~~~~~
>> include/asm-generic/io.h:894:21: error: conflicting types for 'iowrite32be'; have 'void(u32,  volatile void *)' {aka 'void(unsigned int,  volatile void *)'}
     894 | #define iowrite32be iowrite32be
         |                     ^~~~~~~~~~~
   include/asm-generic/io.h:895:20: note: in expansion of macro 'iowrite32be'
     895 | static inline void iowrite32be(u32 value, volatile void __iomem *addr)
         |                    ^~~~~~~~~~~
   include/asm-generic/iomap.h:54:13: note: previous declaration of 'iowrite32be' with type 'void(u32,  void *)' {aka 'void(unsigned int,  void *)'}
      54 | extern void iowrite32be(u32, void __iomem *);
         |             ^~~~~~~~~~~
>> include/asm-generic/io.h:912:21: error: conflicting types for 'ioread8_rep'; have 'void(const volatile void *, void *, unsigned int)'
     912 | #define ioread8_rep ioread8_rep
         |                     ^~~~~~~~~~~
   include/asm-generic/io.h:913:20: note: in expansion of macro 'ioread8_rep'
     913 | static inline void ioread8_rep(const volatile void __iomem *addr, void *buffer,
         |                    ^~~~~~~~~~~
   include/asm-generic/iomap.h:82:13: note: previous declaration of 'ioread8_rep' with type 'void(const void *, void *, long unsigned int)'
      82 | extern void ioread8_rep(const void __iomem *port, void *buf, unsigned long count);
         |             ^~~~~~~~~~~
   include/asm-generic/io.h: In function 'ioread8_rep':
>> include/asm-generic/io.h:916:16: warning: passing argument 1 of '__raw_readsb' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     916 |         readsb(addr, buffer, count);
         |                ^~~~
   arch/sh/include/asm/io.h:59:46: note: in definition of macro 'readsb'
      59 | #define readsb(p,d,l)           __raw_readsb(p,d,l)
         |                                              ^
   arch/sh/include/asm/io.h:103:60: note: expected 'volatile void *' but argument is of type 'const volatile void *'
     103 | static inline void pfx##reads##bwlq(volatile void __iomem *mem,         \
         |                                     ~~~~~~~~~~~~~~~~~~~~~~~^~~
   arch/sh/include/asm/io.h:114:1: note: in expansion of macro '__BUILD_MEMORY_STRING'
     114 | __BUILD_MEMORY_STRING(__raw_, b, u8)
         | ^~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/io.h: At top level:
>> include/asm-generic/io.h:921:22: error: conflicting types for 'ioread16_rep'; have 'void(const volatile void *, void *, unsigned int)'
     921 | #define ioread16_rep ioread16_rep
         |                      ^~~~~~~~~~~~
   include/asm-generic/io.h:922:20: note: in expansion of macro 'ioread16_rep'
     922 | static inline void ioread16_rep(const volatile void __iomem *addr,
         |                    ^~~~~~~~~~~~
   include/asm-generic/iomap.h:83:13: note: previous declaration of 'ioread16_rep' with type 'void(const void *, void *, long unsigned int)'
      83 | extern void ioread16_rep(const void __iomem *port, void *buf, unsigned long count);
         |             ^~~~~~~~~~~~
   include/asm-generic/io.h: In function 'ioread16_rep':
   include/asm-generic/io.h:925:16: warning: passing argument 1 of '__raw_readsw' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     925 |         readsw(addr, buffer, count);
         |                ^~~~
   arch/sh/include/asm/io.h:60:46: note: in definition of macro 'readsw'
      60 | #define readsw(p,d,l)           __raw_readsw(p,d,l)
         |                                              ^
   arch/sh/include/asm/io.h:103:60: note: expected 'volatile void *' but argument is of type 'const volatile void *'
     103 | static inline void pfx##reads##bwlq(volatile void __iomem *mem,         \
         |                                     ~~~~~~~~~~~~~~~~~~~~~~~^~~
   arch/sh/include/asm/io.h:115:1: note: in expansion of macro '__BUILD_MEMORY_STRING'
     115 | __BUILD_MEMORY_STRING(__raw_, w, u16)
         | ^~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/io.h: At top level:
   include/asm-generic/io.h:930:22: error: conflicting types for 'ioread32_rep'; have 'void(const volatile void *, void *, unsigned int)'
     930 | #define ioread32_rep ioread32_rep
         |                      ^~~~~~~~~~~~
   include/asm-generic/io.h:931:20: note: in expansion of macro 'ioread32_rep'
     931 | static inline void ioread32_rep(const volatile void __iomem *addr,
         |                    ^~~~~~~~~~~~
   include/asm-generic/iomap.h:84:13: note: previous declaration of 'ioread32_rep' with type 'void(const void *, void *, long unsigned int)'
      84 | extern void ioread32_rep(const void __iomem *port, void *buf, unsigned long count);
         |             ^~~~~~~~~~~~
   include/asm-generic/io.h: In function 'ioread32_rep':
   include/asm-generic/io.h:934:16: warning: passing argument 1 of '__raw_readsl' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
     934 |         readsl(addr, buffer, count);
         |                ^~~~
   arch/sh/include/asm/io.h:61:46: note: in definition of macro 'readsl'
      61 | #define readsl(p,d,l)           __raw_readsl(p,d,l)
         |                                              ^
   arch/sh/include/asm/io.h:118:39: note: expected 'const void *' but argument is of type 'const volatile void *'
     118 | void __raw_readsl(const void __iomem *addr, void *data, int longlen);
         |                   ~~~~~~~~~~~~~~~~~~~~^~~~
   include/asm-generic/io.h: At top level:
   include/asm-generic/io.h:950:22: error: conflicting types for 'iowrite8_rep'; have 'void(volatile void *, const void *, unsigned int)'
     950 | #define iowrite8_rep iowrite8_rep
         |                      ^~~~~~~~~~~~
   include/asm-generic/io.h:951:20: note: in expansion of macro 'iowrite8_rep'
     951 | static inline void iowrite8_rep(volatile void __iomem *addr,
         |                    ^~~~~~~~~~~~
   include/asm-generic/iomap.h:86:13: note: previous declaration of 'iowrite8_rep' with type 'void(void *, const void *, long unsigned int)'
      86 | extern void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count);
         |             ^~~~~~~~~~~~
   include/asm-generic/io.h:960:23: error: conflicting types for 'iowrite16_rep'; have 'void(volatile void *, const void *, unsigned int)'
     960 | #define iowrite16_rep iowrite16_rep
         |                       ^~~~~~~~~~~~~
   include/asm-generic/io.h:961:20: note: in expansion of macro 'iowrite16_rep'
     961 | static inline void iowrite16_rep(volatile void __iomem *addr,
         |                    ^~~~~~~~~~~~~
   include/asm-generic/iomap.h:87:13: note: previous declaration of 'iowrite16_rep' with type 'void(void *, const void *, long unsigned int)'
      87 | extern void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count);
         |             ^~~~~~~~~~~~~
   include/asm-generic/io.h:970:23: error: conflicting types for 'iowrite32_rep'; have 'void(volatile void *, const void *, unsigned int)'
     970 | #define iowrite32_rep iowrite32_rep
         |                       ^~~~~~~~~~~~~
   include/asm-generic/io.h:971:20: note: in expansion of macro 'iowrite32_rep'
     971 | static inline void iowrite32_rep(volatile void __iomem *addr,
         |                    ^~~~~~~~~~~~~
   include/asm-generic/iomap.h:88:13: note: previous declaration of 'iowrite32_rep' with type 'void(void *, const void *, long unsigned int)'
      88 | extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count);
         |             ^~~~~~~~~~~~~
   include/asm-generic/io.h: In function 'iowrite32_rep':
   include/asm-generic/io.h:975:17: warning: passing argument 1 of '__raw_writesl' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
     975 |         writesl(addr, buffer, count);
         |                 ^~~~
   arch/sh/include/asm/io.h:65:47: note: in definition of macro 'writesl'
      65 | #define writesl(p,d,l)          __raw_writesl(p,d,l)
         |                                               ^
   arch/sh/include/asm/io.h:117:34: note: expected 'void *' but argument is of type 'volatile void *'
     117 | void __raw_writesl(void __iomem *addr, const void *data, int longlen);
         |                    ~~~~~~~~~~~~~~^~~~
   include/asm-generic/io.h: At top level:
   include/asm-generic/io.h:1177:19: error: conflicting types for 'memset_io'; have 'void(volatile void *, int,  size_t)' {aka 'void(volatile void *, int,  unsigned int)'}
    1177 | #define memset_io memset_io
         |                   ^~~~~~~~~
   include/asm-generic/io.h:1186:20: note: in expansion of macro 'memset_io'
    1186 | static inline void memset_io(volatile void __iomem *addr, int value,
         |                    ^~~~~~~~~
   arch/sh/include/asm/io.h:230:6: note: previous declaration of 'memset_io' with type 'void(volatile void *, int,  long unsigned int)'
     230 | void memset_io(volatile void __iomem *, int, unsigned long);
         |      ^~~~~~~~~
   include/asm-generic/io.h:1194:23: error: conflicting types for 'memcpy_fromio'; have 'void(void *, const volatile void *, size_t)' {aka 'void(void *, const volatile void *, unsigned int)'}
    1194 | #define memcpy_fromio memcpy_fromio
         |                       ^~~~~~~~~~~~~
   include/asm-generic/io.h:1203:20: note: in expansion of macro 'memcpy_fromio'
    1203 | static inline void memcpy_fromio(void *buffer,
         |                    ^~~~~~~~~~~~~
   arch/sh/include/asm/io.h:228:6: note: previous declaration of 'memcpy_fromio' with type 'void(void *, const volatile void *, long unsigned int)'
     228 | void memcpy_fromio(void *, const volatile void __iomem *, unsigned long);
         |      ^~~~~~~~~~~~~
   include/asm-generic/io.h:1212:21: error: conflicting types for 'memcpy_toio'; have 'void(volatile void *, const void *, size_t)' {aka 'void(volatile void *, const void *, unsigned int)'}
    1212 | #define memcpy_toio memcpy_toio


vim +689 include/asm-generic/io.h

9216efafc52ff9 Thierry Reding 2014-10-01  682  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  683  /*
9ab3a7a0d2b417 Thierry Reding 2014-07-04  684   * {in,out}s{b,w,l}{,_p}() are variants of the above that repeatedly access a
9ab3a7a0d2b417 Thierry Reding 2014-07-04  685   * single I/O port multiple times.
9ab3a7a0d2b417 Thierry Reding 2014-07-04  686   */
9ab3a7a0d2b417 Thierry Reding 2014-07-04  687  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  688  #ifndef insb
9ab3a7a0d2b417 Thierry Reding 2014-07-04 @689  #define insb insb
9ab3a7a0d2b417 Thierry Reding 2014-07-04  690  static inline void insb(unsigned long addr, void *buffer, unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  691  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  692  	readsb(PCI_IOBASE + addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  693  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  694  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  695  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  696  #ifndef insw
9ab3a7a0d2b417 Thierry Reding 2014-07-04 @697  #define insw insw
9ab3a7a0d2b417 Thierry Reding 2014-07-04  698  static inline void insw(unsigned long addr, void *buffer, unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  699  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  700  	readsw(PCI_IOBASE + addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  701  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  702  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  703  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  704  #ifndef insl
9ab3a7a0d2b417 Thierry Reding 2014-07-04 @705  #define insl insl
9ab3a7a0d2b417 Thierry Reding 2014-07-04  706  static inline void insl(unsigned long addr, void *buffer, unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  707  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  708  	readsl(PCI_IOBASE + addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  709  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  710  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  711  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  712  #ifndef outsb
9ab3a7a0d2b417 Thierry Reding 2014-07-04 @713  #define outsb outsb
9ab3a7a0d2b417 Thierry Reding 2014-07-04  714  static inline void outsb(unsigned long addr, const void *buffer,
9ab3a7a0d2b417 Thierry Reding 2014-07-04  715  			 unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  716  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  717  	writesb(PCI_IOBASE + addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  718  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  719  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  720  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  721  #ifndef outsw
9ab3a7a0d2b417 Thierry Reding 2014-07-04 @722  #define outsw outsw
9ab3a7a0d2b417 Thierry Reding 2014-07-04  723  static inline void outsw(unsigned long addr, const void *buffer,
9ab3a7a0d2b417 Thierry Reding 2014-07-04  724  			 unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  725  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  726  	writesw(PCI_IOBASE + addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  727  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  728  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  729  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  730  #ifndef outsl
9ab3a7a0d2b417 Thierry Reding 2014-07-04 @731  #define outsl outsl
9ab3a7a0d2b417 Thierry Reding 2014-07-04  732  static inline void outsl(unsigned long addr, const void *buffer,
9ab3a7a0d2b417 Thierry Reding 2014-07-04  733  			 unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  734  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  735  	writesl(PCI_IOBASE + addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  736  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  737  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  738  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  739  #ifndef insb_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  740  #define insb_p insb_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  741  static inline void insb_p(unsigned long addr, void *buffer, unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  742  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  743  	insb(addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  744  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  745  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  746  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  747  #ifndef insw_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  748  #define insw_p insw_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  749  static inline void insw_p(unsigned long addr, void *buffer, unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  750  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  751  	insw(addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  752  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  753  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  754  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  755  #ifndef insl_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  756  #define insl_p insl_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  757  static inline void insl_p(unsigned long addr, void *buffer, unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  758  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  759  	insl(addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  760  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  761  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  762  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  763  #ifndef outsb_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  764  #define outsb_p outsb_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  765  static inline void outsb_p(unsigned long addr, const void *buffer,
9ab3a7a0d2b417 Thierry Reding 2014-07-04  766  			   unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  767  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  768  	outsb(addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  769  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  770  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  771  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  772  #ifndef outsw_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  773  #define outsw_p outsw_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  774  static inline void outsw_p(unsigned long addr, const void *buffer,
9ab3a7a0d2b417 Thierry Reding 2014-07-04  775  			   unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  776  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  777  	outsw(addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  778  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  779  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  780  
9ab3a7a0d2b417 Thierry Reding 2014-07-04  781  #ifndef outsl_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  782  #define outsl_p outsl_p
9ab3a7a0d2b417 Thierry Reding 2014-07-04  783  static inline void outsl_p(unsigned long addr, const void *buffer,
9ab3a7a0d2b417 Thierry Reding 2014-07-04  784  			   unsigned int count)
9ab3a7a0d2b417 Thierry Reding 2014-07-04  785  {
9ab3a7a0d2b417 Thierry Reding 2014-07-04  786  	outsl(addr, buffer, count);
9ab3a7a0d2b417 Thierry Reding 2014-07-04  787  }
9ab3a7a0d2b417 Thierry Reding 2014-07-04  788  #endif
9ab3a7a0d2b417 Thierry Reding 2014-07-04  789  
9216efafc52ff9 Thierry Reding 2014-10-01  790  #ifndef CONFIG_GENERIC_IOMAP
9216efafc52ff9 Thierry Reding 2014-10-01  791  #ifndef ioread8
9216efafc52ff9 Thierry Reding 2014-10-01 @792  #define ioread8 ioread8
9216efafc52ff9 Thierry Reding 2014-10-01  793  static inline u8 ioread8(const volatile void __iomem *addr)
9216efafc52ff9 Thierry Reding 2014-10-01  794  {
9216efafc52ff9 Thierry Reding 2014-10-01  795  	return readb(addr);
9216efafc52ff9 Thierry Reding 2014-10-01  796  }
9216efafc52ff9 Thierry Reding 2014-10-01  797  #endif
9216efafc52ff9 Thierry Reding 2014-10-01  798  
9216efafc52ff9 Thierry Reding 2014-10-01  799  #ifndef ioread16
9216efafc52ff9 Thierry Reding 2014-10-01 @800  #define ioread16 ioread16
9216efafc52ff9 Thierry Reding 2014-10-01  801  static inline u16 ioread16(const volatile void __iomem *addr)
9216efafc52ff9 Thierry Reding 2014-10-01  802  {
9216efafc52ff9 Thierry Reding 2014-10-01  803  	return readw(addr);
9216efafc52ff9 Thierry Reding 2014-10-01  804  }
9216efafc52ff9 Thierry Reding 2014-10-01  805  #endif
9216efafc52ff9 Thierry Reding 2014-10-01  806  
9216efafc52ff9 Thierry Reding 2014-10-01  807  #ifndef ioread32
9216efafc52ff9 Thierry Reding 2014-10-01 @808  #define ioread32 ioread32
9216efafc52ff9 Thierry Reding 2014-10-01  809  static inline u32 ioread32(const volatile void __iomem *addr)
9216efafc52ff9 Thierry Reding 2014-10-01  810  {
9216efafc52ff9 Thierry Reding 2014-10-01  811  	return readl(addr);
9216efafc52ff9 Thierry Reding 2014-10-01  812  }
9216efafc52ff9 Thierry Reding 2014-10-01  813  #endif
9216efafc52ff9 Thierry Reding 2014-10-01  814  
9e44fb1816dba8 Horia Geantă   2016-05-19  815  #ifdef CONFIG_64BIT
9e44fb1816dba8 Horia Geantă   2016-05-19  816  #ifndef ioread64
9e44fb1816dba8 Horia Geantă   2016-05-19  817  #define ioread64 ioread64
9e44fb1816dba8 Horia Geantă   2016-05-19  818  static inline u64 ioread64(const volatile void __iomem *addr)
9e44fb1816dba8 Horia Geantă   2016-05-19  819  {
9e44fb1816dba8 Horia Geantă   2016-05-19  820  	return readq(addr);
9e44fb1816dba8 Horia Geantă   2016-05-19  821  }
9e44fb1816dba8 Horia Geantă   2016-05-19  822  #endif
9e44fb1816dba8 Horia Geantă   2016-05-19  823  #endif /* CONFIG_64BIT */
9e44fb1816dba8 Horia Geantă   2016-05-19  824  
9216efafc52ff9 Thierry Reding 2014-10-01  825  #ifndef iowrite8
9216efafc52ff9 Thierry Reding 2014-10-01 @826  #define iowrite8 iowrite8
9216efafc52ff9 Thierry Reding 2014-10-01  827  static inline void iowrite8(u8 value, volatile void __iomem *addr)
9216efafc52ff9 Thierry Reding 2014-10-01  828  {
9216efafc52ff9 Thierry Reding 2014-10-01  829  	writeb(value, addr);
9216efafc52ff9 Thierry Reding 2014-10-01  830  }
9216efafc52ff9 Thierry Reding 2014-10-01  831  #endif
9216efafc52ff9 Thierry Reding 2014-10-01  832  
9216efafc52ff9 Thierry Reding 2014-10-01  833  #ifndef iowrite16
9216efafc52ff9 Thierry Reding 2014-10-01 @834  #define iowrite16 iowrite16
9216efafc52ff9 Thierry Reding 2014-10-01  835  static inline void iowrite16(u16 value, volatile void __iomem *addr)
9216efafc52ff9 Thierry Reding 2014-10-01  836  {
9216efafc52ff9 Thierry Reding 2014-10-01  837  	writew(value, addr);
9216efafc52ff9 Thierry Reding 2014-10-01  838  }
9216efafc52ff9 Thierry Reding 2014-10-01  839  #endif
9216efafc52ff9 Thierry Reding 2014-10-01  840  
9216efafc52ff9 Thierry Reding 2014-10-01  841  #ifndef iowrite32
9216efafc52ff9 Thierry Reding 2014-10-01 @842  #define iowrite32 iowrite32
9216efafc52ff9 Thierry Reding 2014-10-01  843  static inline void iowrite32(u32 value, volatile void __iomem *addr)
9216efafc52ff9 Thierry Reding 2014-10-01  844  {
9216efafc52ff9 Thierry Reding 2014-10-01  845  	writel(value, addr);
9216efafc52ff9 Thierry Reding 2014-10-01  846  }
9216efafc52ff9 Thierry Reding 2014-10-01  847  #endif
9216efafc52ff9 Thierry Reding 2014-10-01  848  
9e44fb1816dba8 Horia Geantă   2016-05-19  849  #ifdef CONFIG_64BIT
9e44fb1816dba8 Horia Geantă   2016-05-19  850  #ifndef iowrite64
9e44fb1816dba8 Horia Geantă   2016-05-19  851  #define iowrite64 iowrite64
9e44fb1816dba8 Horia Geantă   2016-05-19  852  static inline void iowrite64(u64 value, volatile void __iomem *addr)
9e44fb1816dba8 Horia Geantă   2016-05-19  853  {
9e44fb1816dba8 Horia Geantă   2016-05-19  854  	writeq(value, addr);
9e44fb1816dba8 Horia Geantă   2016-05-19  855  }
9e44fb1816dba8 Horia Geantă   2016-05-19  856  #endif
9e44fb1816dba8 Horia Geantă   2016-05-19  857  #endif /* CONFIG_64BIT */
9e44fb1816dba8 Horia Geantă   2016-05-19  858  
9216efafc52ff9 Thierry Reding 2014-10-01  859  #ifndef ioread16be
9216efafc52ff9 Thierry Reding 2014-10-01 @860  #define ioread16be ioread16be
9216efafc52ff9 Thierry Reding 2014-10-01  861  static inline u16 ioread16be(const volatile void __iomem *addr)
9216efafc52ff9 Thierry Reding 2014-10-01  862  {
7a1aedba706194 Horia Geantă   2016-05-19  863  	return swab16(readw(addr));
9216efafc52ff9 Thierry Reding 2014-10-01  864  }
9216efafc52ff9 Thierry Reding 2014-10-01  865  #endif
9216efafc52ff9 Thierry Reding 2014-10-01  866  
9216efafc52ff9 Thierry Reding 2014-10-01  867  #ifndef ioread32be
9216efafc52ff9 Thierry Reding 2014-10-01 @868  #define ioread32be ioread32be
9216efafc52ff9 Thierry Reding 2014-10-01  869  static inline u32 ioread32be(const volatile void __iomem *addr)
9216efafc52ff9 Thierry Reding 2014-10-01  870  {
7a1aedba706194 Horia Geantă   2016-05-19  871  	return swab32(readl(addr));
9216efafc52ff9 Thierry Reding 2014-10-01  872  }
9216efafc52ff9 Thierry Reding 2014-10-01  873  #endif
9216efafc52ff9 Thierry Reding 2014-10-01  874  
9e44fb1816dba8 Horia Geantă   2016-05-19  875  #ifdef CONFIG_64BIT
9e44fb1816dba8 Horia Geantă   2016-05-19  876  #ifndef ioread64be
9e44fb1816dba8 Horia Geantă   2016-05-19  877  #define ioread64be ioread64be
9e44fb1816dba8 Horia Geantă   2016-05-19  878  static inline u64 ioread64be(const volatile void __iomem *addr)
9e44fb1816dba8 Horia Geantă   2016-05-19  879  {
9e44fb1816dba8 Horia Geantă   2016-05-19  880  	return swab64(readq(addr));
9e44fb1816dba8 Horia Geantă   2016-05-19  881  }
9e44fb1816dba8 Horia Geantă   2016-05-19  882  #endif
9e44fb1816dba8 Horia Geantă   2016-05-19  883  #endif /* CONFIG_64BIT */
9e44fb1816dba8 Horia Geantă   2016-05-19  884  
9216efafc52ff9 Thierry Reding 2014-10-01  885  #ifndef iowrite16be
9216efafc52ff9 Thierry Reding 2014-10-01 @886  #define iowrite16be iowrite16be
9216efafc52ff9 Thierry Reding 2014-10-01  887  static inline void iowrite16be(u16 value, void volatile __iomem *addr)
9216efafc52ff9 Thierry Reding 2014-10-01  888  {
7a1aedba706194 Horia Geantă   2016-05-19  889  	writew(swab16(value), addr);
9216efafc52ff9 Thierry Reding 2014-10-01  890  }
9216efafc52ff9 Thierry Reding 2014-10-01  891  #endif
9216efafc52ff9 Thierry Reding 2014-10-01  892  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (241808 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ