tree:
https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 792c8003efc4d75b5f52db70e7380b6a425bdba8 [414/1142] xlink-pcie: XLink PCIe Remote
and Local Host driver
config: alpha-randconfig-s032-20210514 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
#
https://github.com/intel/linux-intel-lts/commit/792c8003efc4d75b5f52db70e...
git remote add intel-linux-intel-lts
https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 792c8003efc4d75b5f52db70e7380b6a425bdba8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
--
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:174:41: sparse:
sparse: cast removes address space '<asn:2>' of expression
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:175:56: sparse: sparse: incorrect type
in initializer (different address spaces) @@ expected void [noderef] <asn:2>
*engine_en @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:175:56: sparse: expected void [noderef]
<asn:2> *engine_en
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:175:56: sparse: got unsigned int *
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:178:55: sparse:
sparse: incorrect type in initializer (different address spaces) @@ expected void
[noderef] <asn:2> *int_mask @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:178:55: sparse: expected void [noderef]
<asn:2> *int_mask
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:178:55: sparse: got unsigned int *
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:181:56: sparse:
sparse: incorrect type in initializer (different address spaces) @@ expected void
[noderef] <asn:2> *int_clear @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:181:56: sparse: expected void [noderef]
<asn:2> *int_clear
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:181:56: sparse: got unsigned int *
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:184:53: sparse:
sparse: incorrect type in initializer (different address spaces) @@ expected void
[noderef] <asn:2> *ll_err @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:184:53: sparse: expected void [noderef]
<asn:2> *ll_err
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:184:53: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:215:41: sparse: sparse: cast removes
address space '<asn:2>' of expression
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:216:56: sparse: sparse: incorrect type in
initializer (different address spaces) @@ expected void [noderef] <asn:2>
*engine_en @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:216:56: sparse: expected void
[noderef] <asn:2> *engine_en
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:216:56: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:219:55: sparse: sparse: incorrect type in
initializer (different address spaces) @@ expected void [noderef] <asn:2>
*int_mask @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:219:55: sparse: expected void
[noderef] <asn:2> *int_mask
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:219:55: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:222:56: sparse: sparse: incorrect type in
initializer (different address spaces) @@ expected void [noderef] <asn:2>
*int_clear @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:222:56: sparse: expected void
[noderef] <asn:2> *int_clear
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:222:56: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:225:53: sparse: sparse: incorrect type in
initializer (different address spaces) @@ expected void [noderef] <asn:2>
*ll_err @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:225:53: sparse: expected void
[noderef] <asn:2> *ll_err
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:225:53: sparse: got unsigned int *
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:228:57: sparse:
sparse: incorrect type in initializer (different address spaces) @@ expected void
[noderef] <asn:2> *arb_weight @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:228:57: sparse: expected void [noderef]
<asn:2> *arb_weight
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:228:57: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:252:29: sparse: sparse: cast removes
address space '<asn:2>' of expression
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:253:54: sparse:
sparse: incorrect type in argument 2 (different address spaces) @@ expected void
[noderef] <asn:2> *addr @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:253:54: sparse: expected void [noderef]
<asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:253:54: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:329:20: sparse: sparse: incorrect type in
argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr
@@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:329:20: sparse: expected void
[noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:329:20: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:330:41: sparse: sparse: incorrect type in
argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr
@@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:330:41: sparse: expected void
[noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:330:41: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:331:47: sparse: sparse: incorrect type in
argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr
@@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:331:47: sparse: expected void
[noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:331:47: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:340:41: sparse: sparse: cast removes
address space '<asn:2>' of expression
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:350:21: sparse: sparse: cast removes
address space '<asn:2>' of expression
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:358:52: sparse:
sparse: incorrect type in argument 3 (different address spaces) @@ expected void
[noderef] <asn:2> *doorbell @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:358:52: sparse: expected void [noderef]
<asn:2> *doorbell
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:358:52: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:365:31: sparse: sparse: incorrect type in
argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *addr
@@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:365:31: sparse: expected void
[noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:365:31: sparse: got unsigned int *
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:374:38: sparse:
sparse: incorrect type in argument 1 (different address spaces) @@ expected void
[noderef] <asn:2> *err_status @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:374:38: sparse: expected void [noderef]
<asn:2> *err_status
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:374:38: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:379:20: sparse: sparse: incorrect type in
argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr
@@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:379:20: sparse: expected void
[noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:379:20: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:394:41: sparse: sparse: cast removes
address space '<asn:2>' of expression
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:404:21: sparse: sparse: cast removes
address space '<asn:2>' of expression
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:412:52: sparse: sparse: incorrect type in
argument 3 (different address spaces) @@ expected void [noderef] <asn:2>
*doorbell @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:412:52: sparse: expected void
[noderef] <asn:2> *doorbell
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:412:52: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:419:31: sparse: sparse: incorrect type in
argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *addr
@@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:419:31: sparse: expected void
[noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:419:31: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:428:38: sparse: sparse: incorrect type in
argument 1 (different address spaces) @@ expected void [noderef] <asn:2>
*err_status @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:428:38: sparse: expected void
[noderef] <asn:2> *err_status
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:428:38: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:431:26: sparse: sparse: incorrect type in
argument 1 (different address spaces) @@ expected void [noderef] <asn:2>
*err_status @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:431:26: sparse: expected void
[noderef] <asn:2> *err_status
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:431:26: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:436:20: sparse: sparse: incorrect type in
argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr
@@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:436:20: sparse: expected void
[noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:436:20: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:506:41: sparse: sparse: cast removes
address space '<asn:2>' of expression
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:508:38: sparse:
sparse: incorrect type in initializer (different address spaces) @@ expected void
[noderef] <asn:2> *w_engine_en @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:508:38: sparse: expected void [noderef]
<asn:2> *w_engine_en
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:508:38: sparse: got unsigned int *
> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:509:38: sparse:
sparse: incorrect type in initializer (different address spaces) @@ expected void
[noderef] <asn:2> *r_engine_en @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:509:38: sparse: expected void [noderef]
<asn:2> *r_engine_en
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:509:38: sparse: got unsigned int *
vim +/xlink_sw_id +60 drivers/misc/xlink-pcie/local_host/mxlk_epf.c
59
60 u32 xlink_sw_id;
61
62 static irqreturn_t mxlk_err_interrupt(int irq, void *args)
63 {
64 struct mxlk *mxlk = args;
65 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
66 u32 val;
67
68 val = ioread32(mxlk_epf->apb_base + PCIE_REGS_PCIE_ERR_INTR_FLAGS);
69 if (val & LINK_REQ_RST_FLG)
70 mxlk_ep_dma_reset(mxlk_epf->epf);
71
72 iowrite32(val, mxlk_epf->apb_base + PCIE_REGS_PCIE_ERR_INTR_FLAGS);
73
74 return IRQ_HANDLED;
75 }
76
77 static irqreturn_t mxlk_host_interrupt(int irq, void *args)
78 {
79 struct mxlk *mxlk = args;
80 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
81 u32 val;
82 u8 event;
83
84 val = ioread32(mxlk_epf->apb_base + PCIE_REGS_PCIE_INTR_FLAGS);
85 if (val & LBC_CII_EVENT_FLAG) {
86 iowrite32(LBC_CII_EVENT_FLAG,
87 mxlk_epf->apb_base + PCIE_REGS_PCIE_INTR_FLAGS);
88
89 event = mxlk_get_doorbell(mxlk, TO_DEVICE, DEV_EVENT);
90 if (unlikely(event != NO_OP)) {
91 mxlk_set_doorbell(mxlk, TO_DEVICE, DEV_EVENT, NO_OP);
92 if (event == REQUEST_RESET)
93 orderly_reboot();
94 return IRQ_HANDLED;
95 }
96
97 if (likely(mxlk_epf->core_irq_callback))
98 mxlk_epf->core_irq_callback(irq, mxlk);
99 }
100
101 return IRQ_HANDLED;
102 }
103
104 void mxlk_register_host_irq(struct mxlk *mxlk, irq_handler_t
func)
105 {
106 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
107
108 mxlk_epf->core_irq_callback = func;
109 }
110
111 int mxlk_raise_irq(struct mxlk *mxlk, enum mxlk_doorbell_type
type)
112 {
113 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
114 struct pci_epf *epf = mxlk_epf->epf;
115
116 mxlk_set_doorbell(mxlk, FROM_DEVICE, type, 1);
117
118 return pci_epc_raise_irq(epf->epc, epf->func_no, PCI_EPC_IRQ_MSI, 1);
119 }
120
121 static void __iomem *mxlk_epc_alloc_addr(struct pci_epc *epc,
122 phys_addr_t *phys_addr, size_t size)
123 {
124 void __iomem *virt_addr;
125 unsigned long flags;
126
127 spin_lock_irqsave(&epc->lock, flags);
128 virt_addr = pci_epc_mem_alloc_addr(epc, phys_addr, size);
129 spin_unlock_irqrestore(&epc->lock, flags);
130
131 return virt_addr;
132 }
133
134 static void mxlk_epc_free_addr(struct pci_epc *epc, phys_addr_t phys_addr,
135 void __iomem *virt_addr, size_t size)
136 {
137 unsigned long flags;
138
139 spin_lock_irqsave(&epc->lock, flags);
140 pci_epc_mem_free_addr(epc, phys_addr, virt_addr, size);
141 spin_unlock_irqrestore(&epc->lock, flags);
142 }
143
144 int mxlk_copy_from_host_ll(struct mxlk *mxlk, int chan, int
descs_num)
145 {
146 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
147 struct pci_epf *epf = mxlk_epf->epf;
148
149 return mxlk_ep_dma_read_ll(epf, chan, descs_num);
150 }
151
152 int mxlk_copy_to_host_ll(struct mxlk *mxlk, int chan, int
descs_num)
153 {
154 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
155 struct pci_epf *epf = mxlk_epf->epf;
156
157 return mxlk_ep_dma_write_ll(epf, chan, descs_num);
158 }
159
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org