tree:
https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
bpf-freplace-multi-attach-alt-04
head: 4b32f3fa732bbc5ab739fc9a0b9864c66a6183fd
commit: 90c87648e09050acc77c42e0ed26a8c30e175111 [2/8] bpf: verifier: refactor
check_attach_btf_id()
config: s390-randconfig-r011-20200914 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
b2c32c90bab09a6e2c1f370429db26017a182143)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
git checkout 90c87648e09050acc77c42e0ed26a8c30e175111
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/usb/host/ehci-platform.c:23:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/usb/host/ehci-platform.c:23:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/usb/host/ehci-platform.c:23:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/usb/host/ehci-platform.c:23:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from drivers/usb/host/ehci-platform.c:37:
In file included from include/linux/usb/of.h:12:
In file included from include/linux/usb/otg.h:13:
In file included from include/linux/phy/phy.h:17:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
include/linux/bpf.h:677:15: error: must use 'struct' tag to refer to type
'bpf_trampoline'
static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
^
struct
> drivers/usb/host/ehci-platform.c:251:24: warning: shift count
>= width of type [-Wshift-count-overflow]
pdata->dma_mask_64 ? DMA_BIT_MASK(64) : DMA_BIT_MASK(32));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
21 warnings and 1 error generated.
--
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/mmc/host/sdhci.c:14:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/mmc/host/sdhci.c:14:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/mmc/host/sdhci.c:14:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/mmc/host/sdhci.c:14:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from drivers/mmc/host/sdhci.c:24:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
include/linux/bpf.h:677:15: error: must use 'struct' tag to refer to type
'bpf_trampoline'
static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
^
struct
> drivers/mmc/host/sdhci.c:3953:40: warning: shift count >=
width of type [-Wshift-count-overflow]
ret =
dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/mmc/host/sdhci.c:4254:20: warning: shift count >= width of type
[-Wshift-count-overflow]
host->dma_mask = DMA_BIT_MASK(64);
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
22 warnings and 1 error generated.
--
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:15:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:15:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:15:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:15:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from drivers/usb/gadget/udc/bdc/bdc_core.c:23:
In file included from include/linux/phy/phy.h:17:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
include/linux/bpf.h:677:15: error: must use 'struct' tag to refer to type
'bpf_trampoline'
static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
^
struct
> drivers/usb/gadget/udc/bdc/bdc_core.c:557:36: warning: shift
count >= width of type [-Wshift-count-overflow]
!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) {
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
21 warnings and 1 error generated.
#
https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git/commit/?id...
git remote add toke
https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
git fetch --no-tags toke bpf-freplace-multi-attach-alt-04
git checkout 90c87648e09050acc77c42e0ed26a8c30e175111
vim +251 drivers/usb/host/ehci-platform.c
cc7eac1e4afdd1 Yoshihiro Shimoda 2020-01-27 230
41ac7b3ab7fe1d Bill Pemberton 2012-11-19 231 static int ehci_platform_probe(struct
platform_device *dev)
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 232 {
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 233 struct usb_hcd *hcd;
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 234 struct resource *res_mem;
a4aeb211757129 Hans de Goede 2014-02-07 235 struct usb_ehci_pdata *pdata =
dev_get_platdata(&dev->dev);
a4aeb211757129 Hans de Goede 2014-02-07 236 struct ehci_platform_priv *priv;
ad3db5dabad169 Hans de Goede 2014-02-07 237 struct ehci_hcd *ehci;
27b3df4139d558 Martin Blumenstingl 2018-03-03 238 int err, irq, clk = 0;
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 239
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 240 if (usb_disabled())
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 241 return -ENODEV;
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 242
f3bc64d6d1f21c Arnd Bergmann 2013-03-27 243 /*
a4aeb211757129 Hans de Goede 2014-02-07 244 * Use reasonable defaults so
platforms don't have to provide these
a4aeb211757129 Hans de Goede 2014-02-07 245 * with DT probing on ARM.
f3bc64d6d1f21c Arnd Bergmann 2013-03-27 246 */
a4aeb211757129 Hans de Goede 2014-02-07 247 if (!pdata)
a4aeb211757129 Hans de Goede 2014-02-07 248 pdata =
&ehci_platform_defaults;
e1fd7341837238 Russell King 2013-06-27 249
c99e76c55f68ea Andreas Herrmann 2015-01-12 250 err =
dma_coerce_mask_and_coherent(&dev->dev,
c99e76c55f68ea Andreas Herrmann 2015-01-12 @251 pdata->dma_mask_64 ?
DMA_BIT_MASK(64) : DMA_BIT_MASK(32));
17f69b5fa6f642 Jeremy Linton 2015-08-19 252 if (err) {
17f69b5fa6f642 Jeremy Linton 2015-08-19 253 dev_err(&dev->dev,
"Error: DMA mask configuration failed\n");
22d9d8e8316d7f Russell King 2013-06-10 254 return err;
17f69b5fa6f642 Jeremy Linton 2015-08-19 255 }
f3bc64d6d1f21c Arnd Bergmann 2013-03-27 256
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 257 irq = platform_get_irq(dev, 0);
b33f37064b743d Stephen Boyd 2019-07-30 258 if (irq < 0)
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 259 return irq;
7a7a4a592f42d9 Hauke Mehrtens 2012-03-13 260
a4aeb211757129 Hans de Goede 2014-02-07 261 hcd =
usb_create_hcd(&ehci_platform_hc_driver, &dev->dev,
a4aeb211757129 Hans de Goede 2014-02-07 262 dev_name(&dev->dev));
a4aeb211757129 Hans de Goede 2014-02-07 263 if (!hcd)
a4aeb211757129 Hans de Goede 2014-02-07 264 return -ENOMEM;
a4aeb211757129 Hans de Goede 2014-02-07 265
a4aeb211757129 Hans de Goede 2014-02-07 266 platform_set_drvdata(dev, hcd);
a4aeb211757129 Hans de Goede 2014-02-07 267 dev->dev.platform_data = pdata;
a4aeb211757129 Hans de Goede 2014-02-07 268 priv = hcd_to_ehci_priv(hcd);
ad3db5dabad169 Hans de Goede 2014-02-07 269 ehci = hcd_to_ehci(hcd);
a4aeb211757129 Hans de Goede 2014-02-07 270
a4aeb211757129 Hans de Goede 2014-02-07 271 if (pdata ==
&ehci_platform_defaults && dev->dev.of_node) {
ad3db5dabad169 Hans de Goede 2014-02-07 272 if
(of_property_read_bool(dev->dev.of_node, "big-endian-regs"))
ad3db5dabad169 Hans de Goede 2014-02-07 273 ehci->big_endian_mmio = 1;
ad3db5dabad169 Hans de Goede 2014-02-07 274
ad3db5dabad169 Hans de Goede 2014-02-07 275 if
(of_property_read_bool(dev->dev.of_node, "big-endian-desc"))
ad3db5dabad169 Hans de Goede 2014-02-07 276 ehci->big_endian_desc = 1;
ad3db5dabad169 Hans de Goede 2014-02-07 277
ad3db5dabad169 Hans de Goede 2014-02-07 278 if
(of_property_read_bool(dev->dev.of_node, "big-endian"))
ad3db5dabad169 Hans de Goede 2014-02-07 279 ehci->big_endian_mmio =
ehci->big_endian_desc = 1;
ad3db5dabad169 Hans de Goede 2014-02-07 280
314b41b16a71ee Wu Liang feng 2014-12-24 281 if
(of_property_read_bool(dev->dev.of_node,
314b41b16a71ee Wu Liang feng 2014-12-24 282
"needs-reset-on-resume"))
b4629a7bdfd8fc Alban Bedel 2015-08-04 283 priv->reset_on_resume = true;
314b41b16a71ee Wu Liang feng 2014-12-24 284
40f2f2a3255314 Joachim Eastwood 2015-05-16 285 if
(of_property_read_bool(dev->dev.of_node,
40f2f2a3255314 Joachim Eastwood 2015-05-16 286
"has-transaction-translator"))
b4629a7bdfd8fc Alban Bedel 2015-08-04 287 hcd->has_tt = 1;
40f2f2a3255314 Joachim Eastwood 2015-05-16 288
cc7eac1e4afdd1 Yoshihiro Shimoda 2020-01-27 289 if
(soc_device_match(quirk_poll_match))
cc7eac1e4afdd1 Yoshihiro Shimoda 2020-01-27 290 priv->quirk_poll = true;
cc7eac1e4afdd1 Yoshihiro Shimoda 2020-01-27 291
a4aeb211757129 Hans de Goede 2014-02-07 292 for (clk = 0; clk <
EHCI_MAX_CLKS; clk++) {
a4aeb211757129 Hans de Goede 2014-02-07 293 priv->clks[clk] =
of_clk_get(dev->dev.of_node, clk);
a4aeb211757129 Hans de Goede 2014-02-07 294 if (IS_ERR(priv->clks[clk])) {
a4aeb211757129 Hans de Goede 2014-02-07 295 err =
PTR_ERR(priv->clks[clk]);
a4aeb211757129 Hans de Goede 2014-02-07 296 if (err == -EPROBE_DEFER)
a4aeb211757129 Hans de Goede 2014-02-07 297 goto err_put_clks;
a4aeb211757129 Hans de Goede 2014-02-07 298 priv->clks[clk] = NULL;
a4aeb211757129 Hans de Goede 2014-02-07 299 break;
a4aeb211757129 Hans de Goede 2014-02-07 300 }
a4aeb211757129 Hans de Goede 2014-02-07 301 }
a4aeb211757129 Hans de Goede 2014-02-07 302 }
a4aeb211757129 Hans de Goede 2014-02-07 303
8e84f8aa5306bb Masahiro Yamada 2017-11-02 304 priv->rsts =
devm_reset_control_array_get_optional_shared(&dev->dev);
8e84f8aa5306bb Masahiro Yamada 2017-11-02 305 if (IS_ERR(priv->rsts)) {
8e84f8aa5306bb Masahiro Yamada 2017-11-02 306 err = PTR_ERR(priv->rsts);
8e84f8aa5306bb Masahiro Yamada 2017-11-02 307 goto err_put_clks;
d0e08b0077f49e Jiancheng Xue 2016-05-12 308 }
d0e08b0077f49e Jiancheng Xue 2016-05-12 309
8e84f8aa5306bb Masahiro Yamada 2017-11-02 310 err =
reset_control_deassert(priv->rsts);
76d15c8fba655c Hans de Goede 2016-06-08 311 if (err)
8e84f8aa5306bb Masahiro Yamada 2017-11-02 312 goto err_put_clks;
2d87bbd634b0fe Boris Brezillon 2014-05-13 313
843d5e036419bd Alan Stern 2014-02-11 314 if (pdata->big_endian_desc)
843d5e036419bd Alan Stern 2014-02-11 315 ehci->big_endian_desc = 1;
843d5e036419bd Alan Stern 2014-02-11 316 if (pdata->big_endian_mmio)
843d5e036419bd Alan Stern 2014-02-11 317 ehci->big_endian_mmio = 1;
b4629a7bdfd8fc Alban Bedel 2015-08-04 318 if (pdata->has_tt)
b4629a7bdfd8fc Alban Bedel 2015-08-04 319 hcd->has_tt = 1;
b4629a7bdfd8fc Alban Bedel 2015-08-04 320 if (pdata->reset_on_resume)
b4629a7bdfd8fc Alban Bedel 2015-08-04 321 priv->reset_on_resume = true;
843d5e036419bd Alan Stern 2014-02-11 322
:::::: The code at line 251 was first introduced by commit
:::::: c99e76c55f68eaa0c307ba25803c4e59c2fca1ca USB: host: Introduce flag to enable use of
64-bit dma_mask for ehci-platform
:::::: TO: Andreas Herrmann <andreas.herrmann(a)caviumnetworks.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org