[linux-review:yingjie_bai-126-com/powerpc32-booke-consistently-return-phys_addr_t-in-__pa/20191230-161556 2/2] arch/powerpc/platforms/85xx/smp.c:261:52: error: right shift count >= width of type
by kbuild test robot
tree: https://github.com/0day-ci/linux/commits/yingjie_bai-126-com/powerpc32-bo...
head: 706aa8a127db3bf87280b231d4b217e3d96d2b93
commit: 706aa8a127db3bf87280b231d4b217e3d96d2b93 [2/2] powerpc/mpc85xx: also write addr_h to spin table for 64bit boot entry
config: powerpc-ge_imp3a_defconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 706aa8a127db3bf87280b231d4b217e3d96d2b93
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/platforms/85xx/smp.c: In function 'smp_85xx_start_cpu':
>> arch/powerpc/platforms/85xx/smp.c:261:52: error: right shift count >= width of type [-Werror=shift-count-overflow]
out_be32(&spin_table->addr_h, __pa(__early_start) >> 32);
^~
cc1: all warnings being treated as errors
vim +261 arch/powerpc/platforms/85xx/smp.c
187
188 static int smp_85xx_start_cpu(int cpu)
189 {
190 int ret = 0;
191 struct device_node *np;
192 const u64 *cpu_rel_addr;
193 unsigned long flags;
194 int ioremappable;
195 int hw_cpu = get_hard_smp_processor_id(cpu);
196 struct epapr_spin_table __iomem *spin_table;
197
198 np = of_get_cpu_node(cpu, NULL);
199 cpu_rel_addr = of_get_property(np, "cpu-release-addr", NULL);
200 if (!cpu_rel_addr) {
201 pr_err("No cpu-release-addr for cpu %d\n", cpu);
202 return -ENOENT;
203 }
204
205 /*
206 * A secondary core could be in a spinloop in the bootpage
207 * (0xfffff000), somewhere in highmem, or somewhere in lowmem.
208 * The bootpage and highmem can be accessed via ioremap(), but
209 * we need to directly access the spinloop if its in lowmem.
210 */
211 ioremappable = *cpu_rel_addr > virt_to_phys(high_memory);
212
213 /* Map the spin table */
214 if (ioremappable)
215 spin_table = ioremap_coherent(*cpu_rel_addr,
216 sizeof(struct epapr_spin_table));
217 else
218 spin_table = phys_to_virt(*cpu_rel_addr);
219
220 local_irq_save(flags);
221 hard_irq_disable();
222
223 if (qoriq_pm_ops)
224 qoriq_pm_ops->cpu_up_prepare(cpu);
225
226 /* if cpu is not spinning, reset it */
227 if (read_spin_table_addr_l(spin_table) != 1) {
228 /*
229 * We don't set the BPTR register here since it already points
230 * to the boot page properly.
231 */
232 mpic_reset_core(cpu);
233
234 /*
235 * wait until core is ready...
236 * We need to invalidate the stale data, in case the boot
237 * loader uses a cache-inhibited spin table.
238 */
239 if (!spin_event_timeout(
240 read_spin_table_addr_l(spin_table) == 1,
241 10000, 100)) {
242 pr_err("timeout waiting for cpu %d to reset\n",
243 hw_cpu);
244 ret = -EAGAIN;
245 goto err;
246 }
247 }
248
249 flush_spin_table(spin_table);
250 out_be32(&spin_table->pir, hw_cpu);
251 #ifdef CONFIG_PPC64
252 out_be64((u64 *)(&spin_table->addr_h),
253 __pa(ppc_function_entry(generic_secondary_smp_init)));
254 #else
255 /*
256 * We need also to write addr_h to spin table for systems
257 * in which their physical memory start address was configured
258 * to above 4G, otherwise the secondary core can not get
259 * correct entry to start from.
260 */
> 261 out_be32(&spin_table->addr_h, __pa(__early_start) >> 32);
262 out_be32(&spin_table->addr_l, __pa(__early_start));
263 #endif
264 flush_spin_table(spin_table);
265 err:
266 local_irq_restore(flags);
267
268 if (ioremappable)
269 iounmap(spin_table);
270
271 return ret;
272 }
273
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[efi:next 9/13] arch/x86//platform/efi/efi_64.c:1029:10: error: implicit declaration of function 'efi_thunk_set_virtual_address_map'; did you mean 'efi_set_virtual_address_map'?
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head: ab041b67577c2c9ac0f43438359d0126d1d2c6d5
commit: c2a8bab63fecf3375e459b83ba6f1cd07dcb2477 [9/13] efi/x86: simplify mixed mode call wrapper
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
git checkout c2a8bab63fecf3375e459b83ba6f1cd07dcb2477
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86//platform/efi/efi_64.c: In function 'efi_set_virtual_address_map':
>> arch/x86//platform/efi/efi_64.c:1029:10: error: implicit declaration of function 'efi_thunk_set_virtual_address_map'; did you mean 'efi_set_virtual_address_map'? [-Werror=implicit-function-declaration]
return efi_thunk_set_virtual_address_map(memory_map_size,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
efi_set_virtual_address_map
cc1: some warnings being treated as errors
vim +1029 arch/x86//platform/efi/efi_64.c
1018
1019 efi_status_t __init efi_set_virtual_address_map(unsigned long memory_map_size,
1020 unsigned long descriptor_size,
1021 u32 descriptor_version,
1022 efi_memory_desc_t *virtual_map)
1023 {
1024 efi_status_t status;
1025 unsigned long flags;
1026 pgd_t *save_pgd = NULL;
1027
1028 if (efi_is_mixed())
> 1029 return efi_thunk_set_virtual_address_map(memory_map_size,
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[nfs:testing 12/12] fs/nfs/./nfs4trace.h:2216:4: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int'
by kbuild test robot
tree: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git testing
head: b96931ff504fa3c488f557c067ad8184aca4329b
commit: b96931ff504fa3c488f557c067ad8184aca4329b [12/12] pNFS/flexfiles: Add tracing for layout errors
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b96931ff504fa3c488f557c067ad8184aca4329b
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/trace/define_trace.h:102:0,
from fs/nfs/nfs4trace.h:2237,
from fs/nfs/nfs4trace.c:13:
fs/nfs/./nfs4trace.h: In function 'trace_raw_output_ff_layout_commit_error':
>> fs/nfs/./nfs4trace.h:2216:4: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
"error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
^
fs/nfs/./nfs4trace.h:2218:4:
-__entry->error,
~~~~~~~~~~~
include/trace/trace_events.h:366:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
trace_seq_printf(s, print); \
^~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
PARAMS(print)); \
^~~~~~
fs/nfs/./nfs4trace.h:2182:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(ff_layout_commit_error,
^~~~~~~~~~~
fs/nfs/./nfs4trace.h:2215:3: note: in expansion of macro 'TP_printk'
TP_printk(
^~~~~~~~~
In file included from include/trace/trace_events.h:400:0,
from include/trace/define_trace.h:102,
from fs/nfs/nfs4trace.h:2237,
from fs/nfs/nfs4trace.c:13:
fs/nfs/./nfs4trace.h:2216:12: note: format string is defined here
"error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
~^
%ld
vim +2216 fs/nfs/./nfs4trace.h
2181
2182 TRACE_EVENT(ff_layout_commit_error,
2183 TP_PROTO(
2184 const struct nfs_commit_data *data
2185 ),
2186
2187 TP_ARGS(data),
2188
2189 TP_STRUCT__entry(
2190 __field(unsigned long, error)
2191 __field(dev_t, dev)
2192 __field(u32, fhandle)
2193 __field(u64, fileid)
2194 __field(loff_t, offset)
2195 __field(u32, count)
2196 __string(dstaddr, data->ds_clp ?
2197 rpc_peeraddr2str(data->ds_clp->cl_rpcclient,
2198 RPC_DISPLAY_ADDR) : "unknown")
2199 ),
2200
2201 TP_fast_assign(
2202 const struct inode *inode = data->inode;
2203
2204 __entry->error = data->res.op_status;
2205 __entry->fhandle = nfs_fhandle_hash(data->args.fh);
2206 __entry->fileid = NFS_FILEID(inode);
2207 __entry->dev = inode->i_sb->s_dev;
2208 __entry->offset = data->args.offset;
2209 __entry->count = data->args.count;
2210 __assign_str(dstaddr, data->ds_clp ?
2211 rpc_peeraddr2str(data->ds_clp->cl_rpcclient,
2212 RPC_DISPLAY_ADDR) : "unknown");
2213 ),
2214
2215 TP_printk(
> 2216 "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
2217 "offset=%llu count=%u dstaddr=%s",
2218 -__entry->error,
2219 show_nfsv4_errors(__entry->error),
2220 MAJOR(__entry->dev), MINOR(__entry->dev),
2221 (unsigned long long)__entry->fileid,
2222 __entry->fhandle,
2223 __entry->offset, __entry->count,
2224 __get_str(dstaddr)
2225 )
2226 );
2227
2228
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[usb:usb-testing 36/41] drivers/usb/chipidea/../host/ehci.h:743:3: error: implicit declaration of function 'readl_be'; did you mean 'readsb'?
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head: 4e52af1ccaa2d979894d4d059037ff9ec4d26a83
commit: 88eaaecc44461f9fb147bf7ee6ccc6d4e9fc23e0 [36/41] usb: host: Enable compile testing for some of drivers
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 88eaaecc44461f9fb147bf7ee6ccc6d4e9fc23e0
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/usb/chipidea/host.c:18:0:
drivers/usb/chipidea/../host/ehci.h: In function 'ehci_readl':
>> drivers/usb/chipidea/../host/ehci.h:743:3: error: implicit declaration of function 'readl_be'; did you mean 'readsb'? [-Werror=implicit-function-declaration]
readl_be(regs) :
^~~~~~~~
readsb
drivers/usb/chipidea/../host/ehci.h: In function 'ehci_writel':
drivers/usb/chipidea/../host/ehci.h:767:3: error: implicit declaration of function 'writel_be'; did you mean 'writel'? [-Werror=implicit-function-declaration]
writel_be(val, regs) :
^~~~~~~~~
writel
cc1: some warnings being treated as errors
--
In file included from drivers/usb/host/ehci-hcd.c:96:0:
drivers/usb/host/ehci.h: In function 'ehci_readl':
>> drivers/usb/host/ehci.h:743:3: error: implicit declaration of function 'readl_be'; did you mean 'readsb'? [-Werror=implicit-function-declaration]
readl_be(regs) :
^~~~~~~~
readsb
drivers/usb/host/ehci.h: In function 'ehci_writel':
>> drivers/usb/host/ehci.h:767:3: error: implicit declaration of function 'writel_be'; did you mean 'writesb'? [-Werror=implicit-function-declaration]
writel_be(val, regs) :
^~~~~~~~~
writesb
cc1: some warnings being treated as errors
--
In file included from drivers/usb/host/ehci-platform.c:37:0:
drivers/usb/host/ehci.h: In function 'ehci_readl':
>> drivers/usb/host/ehci.h:743:3: error: implicit declaration of function 'readl_be'; did you mean 'readsb'? [-Werror=implicit-function-declaration]
readl_be(regs) :
^~~~~~~~
readsb
drivers/usb/host/ehci.h: In function 'ehci_writel':
>> drivers/usb/host/ehci.h:767:3: error: implicit declaration of function 'writel_be'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
writel_be(val, regs) :
^~~~~~~~~
writeb
cc1: some warnings being treated as errors
vim +743 drivers/usb/chipidea/../host/ehci.h
91bc4d31e81b15 Vladimir Barinov 2007-12-30 737
083522d76662cd Benjamin Herrenschmidt 2006-12-15 738 static inline unsigned int ehci_readl(const struct ehci_hcd *ehci,
083522d76662cd Benjamin Herrenschmidt 2006-12-15 739 __u32 __iomem *regs)
083522d76662cd Benjamin Herrenschmidt 2006-12-15 740 {
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28 741 #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
083522d76662cd Benjamin Herrenschmidt 2006-12-15 742 return ehci_big_endian_mmio(ehci) ?
68f50e52554a0a Al Viro 2007-02-09 @743 readl_be(regs) :
68f50e52554a0a Al Viro 2007-02-09 744 readl(regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28 745 #else
68f50e52554a0a Al Viro 2007-02-09 746 return readl(regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28 747 #endif
083522d76662cd Benjamin Herrenschmidt 2006-12-15 748 }
083522d76662cd Benjamin Herrenschmidt 2006-12-15 749
:::::: The code at line 743 was first introduced by commit
:::::: 68f50e52554a0a55dfe2e3fdf659ee0569d73c3f [PATCH] hci_{read,write}l() does force casts to wrong type for no reason
:::::: TO: Al Viro <viro(a)ftp.linux.org.uk>
:::::: CC: Linus Torvalds <torvalds(a)woody.linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[linux-review:UPDATE-20191226-145837/Rocky-Liao/Bluetooth-hci_qca-Add-QCA-Rome-power-off-support-to-the-qca_power_off/20191226-050402 4/4] drivers/bluetooth/hci_qca.c:1346:21: error: assignment from incompatible pointer type
by kbuild test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20191226-145837/Rocky-Lia...
head: 76e10b6059148f2d0d7a278f52266fb6a692e456
commit: 76e10b6059148f2d0d7a278f52266fb6a692e456 [4/4] Bluetooth: hci_qca: Add HCI command timeout handling
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
git checkout 76e10b6059148f2d0d7a278f52266fb6a692e456
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/bluetooth/hci_qca.c: In function 'qca_setup':
>> drivers/bluetooth/hci_qca.c:1346:21: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
hdev->cmd_timeout = qca_cmd_timeout;
^
>> drivers/bluetooth/hci_qca.c:1347:6: error: 'struct qca_data' has no member named 'cmd_timeout_cnt'
qca->cmd_timeout_cnt = 0;
^~
In file included from drivers/bluetooth/hci_qca.c:33:0:
drivers/bluetooth/hci_qca.c: In function 'qca_cmd_timeout':
drivers/bluetooth/hci_qca.c:1504:54: error: 'struct qca_data' has no member named 'cmd_timeout_cnt'
BT_ERR("hu %p hci cmd timeout count=0x%x", hu, ++qca->cmd_timeout_cnt);
^
include/net/bluetooth/bluetooth.h:138:45: note: in definition of macro 'BT_ERR'
#define BT_ERR(fmt, ...) bt_err(fmt "\n", ##__VA_ARGS__)
^~~~~~~~~~~
drivers/bluetooth/hci_qca.c:1506:9: error: 'struct qca_data' has no member named 'cmd_timeout_cnt'
if (qca->cmd_timeout_cnt >= QCA_MAX_CMD_TIMEOUT_COUNT)
^~
cc1: some warnings being treated as errors
vim +1346 drivers/bluetooth/hci_qca.c
1264
1265 static int qca_setup(struct hci_uart *hu)
1266 {
1267 struct hci_dev *hdev = hu->hdev;
1268 struct qca_data *qca = hu->priv;
1269 struct qca_serdev *qcadev;
1270 unsigned int speed, qca_baudrate = QCA_BAUDRATE_115200;
1271 unsigned int init_retry_count = 0;
1272 enum qca_btsoc_type soc_type = qca_soc_type(hu);
1273 const char *firmware_name = qca_get_firmware_name(hu);
1274 int ret;
1275 int soc_ver = 0;
1276
1277 ret = qca_check_speeds(hu);
1278 if (ret)
1279 return ret;
1280
1281 /* Patch downloading has to be done without IBS mode */
1282 clear_bit(QCA_IBS_ENABLED, &qca->flags);
1283
1284 /* Enable controller to do both LE scan and BR/EDR inquiry
1285 * simultaneously.
1286 */
1287 set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
1288
1289 retry:
1290 if (qca_is_wcn399x(soc_type)) {
1291 bt_dev_info(hdev, "setting up wcn3990");
1292
1293 /* Enable NON_PERSISTENT_SETUP QUIRK to ensure to execute
1294 * setup for every hci up.
1295 */
1296 set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
1297 set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
1298 hu->hdev->shutdown = qca_power_off;
1299 ret = qca_wcn3990_init(hu);
1300 if (ret)
1301 return ret;
1302
1303 ret = qca_read_soc_version(hdev, &soc_ver, soc_type);
1304 if (ret)
1305 return ret;
1306 } else {
1307 bt_dev_info(hdev, "ROME setup");
1308 if (hu->serdev) {
1309 /* Enable NON_PERSISTENT_SETUP QUIRK to ensure to
1310 * execute setup for every hci up.
1311 */
1312 set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
1313 hu->hdev->shutdown = qca_power_off;
1314 qcadev = serdev_device_get_drvdata(hu->serdev);
1315 gpiod_set_value_cansleep(qcadev->bt_en, 1);
1316 /* Controller needs time to bootup. */
1317 msleep(150);
1318 }
1319 qca_set_speed(hu, QCA_INIT_SPEED);
1320 }
1321
1322 /* Setup user speed if needed */
1323 speed = qca_get_speed(hu, QCA_OPER_SPEED);
1324 if (speed) {
1325 ret = qca_set_speed(hu, QCA_OPER_SPEED);
1326 if (ret)
1327 return ret;
1328
1329 qca_baudrate = qca_get_baudrate_value(speed);
1330 }
1331
1332 if (!qca_is_wcn399x(soc_type)) {
1333 /* Get QCA version information */
1334 ret = qca_read_soc_version(hdev, &soc_ver, soc_type);
1335 if (ret)
1336 return ret;
1337 }
1338
1339 bt_dev_info(hdev, "QCA controller version 0x%08x", soc_ver);
1340 /* Setup patch / NVM configurations */
1341 ret = qca_uart_setup(hdev, qca_baudrate, soc_type, soc_ver,
1342 firmware_name);
1343 if (!ret) {
1344 set_bit(QCA_IBS_ENABLED, &qca->flags);
1345 qca_debugfs_init(hdev);
> 1346 hdev->cmd_timeout = qca_cmd_timeout;
> 1347 qca->cmd_timeout_cnt = 0;
1348 } else if (ret == -ENOENT) {
1349 /* No patch/nvm-config found, run with original fw/config */
1350 ret = 0;
1351 } else if (ret == -EAGAIN) {
1352 /*
1353 * Userspace firmware loader will return -EAGAIN in case no
1354 * patch/nvm-config is found, so run with original fw/config.
1355 */
1356 ret = 0;
1357 } else {
1358 if (init_retry_count < QCA_MAX_INIT_RETRY_COUNT) {
1359 qca_power_off(hdev);
1360 if (hu->serdev) {
1361 serdev_device_close(hu->serdev);
1362 ret = serdev_device_open(hu->serdev);
1363 if (ret) {
1364 bt_dev_err(hu->hdev, "open port fail");
1365 return ret;
1366 }
1367 }
1368 init_retry_count++;
1369 goto retry;
1370 }
1371 }
1372
1373 /* Setup bdaddr */
1374 if (qca_is_wcn399x(soc_type))
1375 hu->hdev->set_bdaddr = qca_set_bdaddr;
1376 else
1377 hu->hdev->set_bdaddr = qca_set_bdaddr_rome;
1378
1379 return ret;
1380 }
1381
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
Re: [PATCH 2/7] misc: pci_endpoint_test: Do not request or allocate IRQs in probe
by kbuild test robot
Hi Kishon,
I love your patch! Perhaps something to improve:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on pci/next arm-soc/for-next linus/master v5.5-rc4 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kishon-Vijay-Abraham-I/Improveme...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git d1eef1c619749b2a57e514a3fa67d9a516ffa919
config: arm-randconfig-a001-20191229 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:11:0,
from include/linux/delay.h:22,
from drivers/misc/pci_endpoint_test.c:10:
drivers/misc/pci_endpoint_test.c: In function 'pci_endpoint_test_probe':
drivers/misc/pci_endpoint_test.c:73:22: error: 'PCI_DEVICE_ID_TI_J721E' undeclared (first use in this function); did you mean 'PCI_DEVICE_ID_TI_7510'?
((pdev)->device == PCI_DEVICE_ID_TI_J721E)
^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/misc/pci_endpoint_test.c:693:2: note: in expansion of macro 'if'
if (!(is_am654_pci_dev(pdev) || is_j721e_pci_dev(pdev))) {
^~
drivers/misc/pci_endpoint_test.c:693:34: note: in expansion of macro 'is_j721e_pci_dev'
if (!(is_am654_pci_dev(pdev) || is_j721e_pci_dev(pdev))) {
^~~~~~~~~~~~~~~~
drivers/misc/pci_endpoint_test.c:73:22: note: each undeclared identifier is reported only once for each function it appears in
((pdev)->device == PCI_DEVICE_ID_TI_J721E)
^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/misc/pci_endpoint_test.c:693:2: note: in expansion of macro 'if'
if (!(is_am654_pci_dev(pdev) || is_j721e_pci_dev(pdev))) {
^~
drivers/misc/pci_endpoint_test.c:693:34: note: in expansion of macro 'is_j721e_pci_dev'
if (!(is_am654_pci_dev(pdev) || is_j721e_pci_dev(pdev))) {
^~~~~~~~~~~~~~~~
vim +/if +693 drivers/misc/pci_endpoint_test.c
638
639 static int pci_endpoint_test_probe(struct pci_dev *pdev,
640 const struct pci_device_id *ent)
641 {
642 int err;
643 int id;
644 char name[20];
645 enum pci_barno bar;
646 void __iomem *base;
647 struct device *dev = &pdev->dev;
648 struct pci_endpoint_test *test;
649 struct pci_endpoint_test_data *data;
650 enum pci_barno test_reg_bar = BAR_0;
651 struct miscdevice *misc_device;
652
653 if (pci_is_bridge(pdev))
654 return -ENODEV;
655
656 test = devm_kzalloc(dev, sizeof(*test), GFP_KERNEL);
657 if (!test)
658 return -ENOMEM;
659
660 test->test_reg_bar = 0;
661 test->alignment = 0;
662 test->pdev = pdev;
663 test->irq_type = IRQ_TYPE_UNDEFINED;
664
665 if (no_msi)
666 irq_type = IRQ_TYPE_LEGACY;
667
668 data = (struct pci_endpoint_test_data *)ent->driver_data;
669 if (data) {
670 test_reg_bar = data->test_reg_bar;
671 test->test_reg_bar = test_reg_bar;
672 test->alignment = data->alignment;
673 irq_type = data->irq_type;
674 }
675
676 init_completion(&test->irq_raised);
677 mutex_init(&test->mutex);
678
679 err = pci_enable_device(pdev);
680 if (err) {
681 dev_err(dev, "Cannot enable PCI device\n");
682 return err;
683 }
684
685 err = pci_request_regions(pdev, DRV_MODULE_NAME);
686 if (err) {
687 dev_err(dev, "Cannot obtain PCI resources\n");
688 goto err_disable_pdev;
689 }
690
691 pci_set_master(pdev);
692
> 693 if (!(is_am654_pci_dev(pdev) || is_j721e_pci_dev(pdev))) {
694 if (!pci_endpoint_test_alloc_irq_vectors(test, irq_type))
695 goto err_disable_irq;
696
697 if (!pci_endpoint_test_request_irq(test))
698 goto err_disable_irq;
699 }
700
701 for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
702 if (pci_resource_flags(pdev, bar) & IORESOURCE_MEM) {
703 base = pci_ioremap_bar(pdev, bar);
704 if (!base) {
705 dev_err(dev, "Failed to read BAR%d\n", bar);
706 WARN_ON(bar == test_reg_bar);
707 }
708 test->bar[bar] = base;
709 }
710 }
711
712 test->base = test->bar[test_reg_bar];
713 if (!test->base) {
714 err = -ENOMEM;
715 dev_err(dev, "Cannot perform PCI test without BAR%d\n",
716 test_reg_bar);
717 goto err_iounmap;
718 }
719
720 pci_set_drvdata(pdev, test);
721
722 id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL);
723 if (id < 0) {
724 err = id;
725 dev_err(dev, "Unable to get id\n");
726 goto err_iounmap;
727 }
728
729 snprintf(name, sizeof(name), DRV_MODULE_NAME ".%d", id);
730 misc_device = &test->miscdev;
731 misc_device->minor = MISC_DYNAMIC_MINOR;
732 misc_device->name = kstrdup(name, GFP_KERNEL);
733 if (!misc_device->name) {
734 err = -ENOMEM;
735 goto err_ida_remove;
736 }
737 misc_device->fops = &pci_endpoint_test_fops,
738
739 err = misc_register(misc_device);
740 if (err) {
741 dev_err(dev, "Failed to register device\n");
742 goto err_kfree_name;
743 }
744
745 return 0;
746
747 err_kfree_name:
748 kfree(misc_device->name);
749
750 err_ida_remove:
751 ida_simple_remove(&pci_endpoint_test_ida, id);
752
753 err_iounmap:
754 for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
755 if (test->bar[bar])
756 pci_iounmap(pdev, test->bar[bar]);
757 }
758 pci_endpoint_test_release_irq(test);
759
760 err_disable_irq:
761 pci_endpoint_test_free_irq_vectors(test);
762 pci_release_regions(pdev);
763
764 err_disable_pdev:
765 pci_disable_device(pdev);
766
767 return err;
768 }
769
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[usb:usb-testing 36/41] drivers/usb/host/ohci-at91.c:449:39: sparse: sparse: invalid assignment: &=
by kbuild test robot
Hi Krzysztof,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head: 4e52af1ccaa2d979894d4d059037ff9ec4d26a83
commit: 88eaaecc44461f9fb147bf7ee6ccc6d4e9fc23e0 [36/41] usb: host: Enable compile testing for some of drivers
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-129-g341daf20-dirty
git checkout 88eaaecc44461f9fb147bf7ee6ccc6d4e9fc23e0
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/usb/host/ohci-at91.c:449:39: sparse: sparse: invalid assignment: &=
>> drivers/usb/host/ohci-at91.c:449:39: sparse: left side has type unsigned int
>> drivers/usb/host/ohci-at91.c:449:39: sparse: right side has type restricted __le32
drivers/usb/host/ohci-at91.c:452:39: sparse: sparse: invalid assignment: |=
drivers/usb/host/ohci-at91.c:452:39: sparse: left side has type unsigned int
drivers/usb/host/ohci-at91.c:452:39: sparse: right side has type restricted __le32
drivers/usb/host/ohci-at91.c:455:39: sparse: sparse: invalid assignment: |=
drivers/usb/host/ohci-at91.c:455:39: sparse: left side has type unsigned int
drivers/usb/host/ohci-at91.c:455:39: sparse: right side has type restricted __le32
--
>> drivers/usb/host/ohci-s3c2410.c:277:39: sparse: sparse: invalid assignment: |=
>> drivers/usb/host/ohci-s3c2410.c:277:39: sparse: left side has type unsigned int
>> drivers/usb/host/ohci-s3c2410.c:277:39: sparse: right side has type restricted __le32
drivers/usb/host/ohci-s3c2410.c:280:39: sparse: sparse: invalid assignment: |=
drivers/usb/host/ohci-s3c2410.c:280:39: sparse: left side has type unsigned int
drivers/usb/host/ohci-s3c2410.c:280:39: sparse: right side has type restricted __le32
--
>> drivers/usb/host/ehci-mv.c:178:23: sparse: sparse: cast removes address space '<asn:2>' of expression
>> drivers/usb/host/ehci-mv.c:178:20: sparse: sparse: incorrect type in assignment (different address spaces)
>> drivers/usb/host/ehci-mv.c:178:20: sparse: expected struct ehci_caps [noderef] <asn:2> *caps
>> drivers/usb/host/ehci-mv.c:178:20: sparse: got struct ehci_caps *
vim +449 drivers/usb/host/ohci-at91.c
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 323
aa6e52a35d388e Thomas Petazzoni 2011-07-13 324 /*
aa6e52a35d388e Thomas Petazzoni 2011-07-13 325 * Look at the control requests to the root hub and see if we need to override.
aa6e52a35d388e Thomas Petazzoni 2011-07-13 326 */
aa6e52a35d388e Thomas Petazzoni 2011-07-13 327 static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
aa6e52a35d388e Thomas Petazzoni 2011-07-13 328 u16 wIndex, char *buf, u16 wLength)
aa6e52a35d388e Thomas Petazzoni 2011-07-13 329 {
d4f09e28d7bc5c Jingoo Han 2013-07-30 330 struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller);
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 331 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 332 struct usb_hub_descriptor *desc;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 333 int ret = -EINVAL;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 334 u32 *data = (u32 *)buf;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 335
aa6e52a35d388e Thomas Petazzoni 2011-07-13 336 dev_dbg(hcd->self.controller,
aa6e52a35d388e Thomas Petazzoni 2011-07-13 337 "ohci_at91_hub_control(%p,0x%04x,0x%04x,0x%04x,%p,%04x)\n",
aa6e52a35d388e Thomas Petazzoni 2011-07-13 338 hcd, typeReq, wValue, wIndex, buf, wLength);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 339
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 340 wIndex--;
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 341
aa6e52a35d388e Thomas Petazzoni 2011-07-13 342 switch (typeReq) {
aa6e52a35d388e Thomas Petazzoni 2011-07-13 343 case SetPortFeature:
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 344 switch (wValue) {
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 345 case USB_PORT_FEAT_POWER:
aa6e52a35d388e Thomas Petazzoni 2011-07-13 346 dev_dbg(hcd->self.controller, "SetPortFeat: POWER\n");
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 347 if (valid_port(wIndex)) {
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 348 ohci_at91_usb_set_power(pdata, wIndex, 1);
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 349 ret = 0;
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 350 }
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 351
aa6e52a35d388e Thomas Petazzoni 2011-07-13 352 goto out;
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 353
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 354 case USB_PORT_FEAT_SUSPEND:
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 355 dev_dbg(hcd->self.controller, "SetPortFeat: SUSPEND\n");
85550f9148a852 Jelle Martijn Kok 2017-02-21 356 if (valid_port(wIndex) && ohci_at91->sfr_regmap) {
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 357 ohci_at91_port_suspend(ohci_at91->sfr_regmap,
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 358 1);
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 359 return 0;
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 360 }
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 361 break;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 362 }
aa6e52a35d388e Thomas Petazzoni 2011-07-13 363 break;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 364
aa6e52a35d388e Thomas Petazzoni 2011-07-13 365 case ClearPortFeature:
aa6e52a35d388e Thomas Petazzoni 2011-07-13 366 switch (wValue) {
aa6e52a35d388e Thomas Petazzoni 2011-07-13 367 case USB_PORT_FEAT_C_OVER_CURRENT:
aa6e52a35d388e Thomas Petazzoni 2011-07-13 368 dev_dbg(hcd->self.controller,
aa6e52a35d388e Thomas Petazzoni 2011-07-13 369 "ClearPortFeature: C_OVER_CURRENT\n");
aa6e52a35d388e Thomas Petazzoni 2011-07-13 370
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 371 if (valid_port(wIndex)) {
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 372 pdata->overcurrent_changed[wIndex] = 0;
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 373 pdata->overcurrent_status[wIndex] = 0;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 374 }
aa6e52a35d388e Thomas Petazzoni 2011-07-13 375
aa6e52a35d388e Thomas Petazzoni 2011-07-13 376 goto out;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 377
aa6e52a35d388e Thomas Petazzoni 2011-07-13 378 case USB_PORT_FEAT_OVER_CURRENT:
aa6e52a35d388e Thomas Petazzoni 2011-07-13 379 dev_dbg(hcd->self.controller,
aa6e52a35d388e Thomas Petazzoni 2011-07-13 380 "ClearPortFeature: OVER_CURRENT\n");
aa6e52a35d388e Thomas Petazzoni 2011-07-13 381
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 382 if (valid_port(wIndex))
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 383 pdata->overcurrent_status[wIndex] = 0;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 384
aa6e52a35d388e Thomas Petazzoni 2011-07-13 385 goto out;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 386
aa6e52a35d388e Thomas Petazzoni 2011-07-13 387 case USB_PORT_FEAT_POWER:
aa6e52a35d388e Thomas Petazzoni 2011-07-13 388 dev_dbg(hcd->self.controller,
aa6e52a35d388e Thomas Petazzoni 2011-07-13 389 "ClearPortFeature: POWER\n");
aa6e52a35d388e Thomas Petazzoni 2011-07-13 390
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 391 if (valid_port(wIndex)) {
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 392 ohci_at91_usb_set_power(pdata, wIndex, 0);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 393 return 0;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 394 }
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 395 break;
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 396
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 397 case USB_PORT_FEAT_SUSPEND:
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 398 dev_dbg(hcd->self.controller, "ClearPortFeature: SUSPEND\n");
85550f9148a852 Jelle Martijn Kok 2017-02-21 399 if (valid_port(wIndex) && ohci_at91->sfr_regmap) {
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 400 ohci_at91_port_suspend(ohci_at91->sfr_regmap,
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 401 0);
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 402 return 0;
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 403 }
2e2aa1bc7eff90 Wenyou Yang 2016-08-23 404 break;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 405 }
aa6e52a35d388e Thomas Petazzoni 2011-07-13 406 break;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 407 }
aa6e52a35d388e Thomas Petazzoni 2011-07-13 408
42b59eba718a14 Laurent Pinchart 2014-04-16 409 ret = ohci_hub_control(hcd, typeReq, wValue, wIndex + 1, buf, wLength);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 410 if (ret)
aa6e52a35d388e Thomas Petazzoni 2011-07-13 411 goto out;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 412
aa6e52a35d388e Thomas Petazzoni 2011-07-13 413 switch (typeReq) {
aa6e52a35d388e Thomas Petazzoni 2011-07-13 414 case GetHubDescriptor:
aa6e52a35d388e Thomas Petazzoni 2011-07-13 415
aa6e52a35d388e Thomas Petazzoni 2011-07-13 416 /* update the hub's descriptor */
aa6e52a35d388e Thomas Petazzoni 2011-07-13 417
aa6e52a35d388e Thomas Petazzoni 2011-07-13 418 desc = (struct usb_hub_descriptor *)buf;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 419
aa6e52a35d388e Thomas Petazzoni 2011-07-13 420 dev_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n",
aa6e52a35d388e Thomas Petazzoni 2011-07-13 421 desc->wHubCharacteristics);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 422
aa6e52a35d388e Thomas Petazzoni 2011-07-13 423 /* remove the old configurations for power-switching, and
aa6e52a35d388e Thomas Petazzoni 2011-07-13 424 * over-current protection, and insert our new configuration
aa6e52a35d388e Thomas Petazzoni 2011-07-13 425 */
aa6e52a35d388e Thomas Petazzoni 2011-07-13 426
aa6e52a35d388e Thomas Petazzoni 2011-07-13 427 desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_LPSM);
a9c49bcd0a4fe6 Sergei Shtylyov 2015-01-19 428 desc->wHubCharacteristics |=
a9c49bcd0a4fe6 Sergei Shtylyov 2015-01-19 429 cpu_to_le16(HUB_CHAR_INDV_PORT_LPSM);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 430
aa6e52a35d388e Thomas Petazzoni 2011-07-13 431 if (pdata->overcurrent_supported) {
aa6e52a35d388e Thomas Petazzoni 2011-07-13 432 desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_OCPM);
a9c49bcd0a4fe6 Sergei Shtylyov 2015-01-19 433 desc->wHubCharacteristics |=
a9c49bcd0a4fe6 Sergei Shtylyov 2015-01-19 434 cpu_to_le16(HUB_CHAR_INDV_PORT_OCPM);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 435 }
aa6e52a35d388e Thomas Petazzoni 2011-07-13 436
aa6e52a35d388e Thomas Petazzoni 2011-07-13 437 dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n",
aa6e52a35d388e Thomas Petazzoni 2011-07-13 438 desc->wHubCharacteristics);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 439
aa6e52a35d388e Thomas Petazzoni 2011-07-13 440 return ret;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 441
aa6e52a35d388e Thomas Petazzoni 2011-07-13 442 case GetPortStatus:
aa6e52a35d388e Thomas Petazzoni 2011-07-13 443 /* check port status */
aa6e52a35d388e Thomas Petazzoni 2011-07-13 444
aa6e52a35d388e Thomas Petazzoni 2011-07-13 445 dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 446
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 447 if (valid_port(wIndex)) {
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 448 if (!ohci_at91_usb_get_power(pdata, wIndex))
aa6e52a35d388e Thomas Petazzoni 2011-07-13 @449 *data &= ~cpu_to_le32(RH_PS_PPS);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 450
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 451 if (pdata->overcurrent_changed[wIndex])
aa6e52a35d388e Thomas Petazzoni 2011-07-13 452 *data |= cpu_to_le32(RH_PS_OCIC);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 453
0ee6d1eeef7bf4 Nicolas Ferre 2012-03-21 454 if (pdata->overcurrent_status[wIndex])
aa6e52a35d388e Thomas Petazzoni 2011-07-13 455 *data |= cpu_to_le32(RH_PS_POCI);
aa6e52a35d388e Thomas Petazzoni 2011-07-13 456 }
aa6e52a35d388e Thomas Petazzoni 2011-07-13 457 }
aa6e52a35d388e Thomas Petazzoni 2011-07-13 458
aa6e52a35d388e Thomas Petazzoni 2011-07-13 459 out:
aa6e52a35d388e Thomas Petazzoni 2011-07-13 460 return ret;
aa6e52a35d388e Thomas Petazzoni 2011-07-13 461 }
aa6e52a35d388e Thomas Petazzoni 2011-07-13 462
:::::: The code at line 449 was first introduced by commit
:::::: aa6e52a35d388e730f4df0ec2ec48294590cc459 at91: at91-ohci: support overcurrent notification
:::::: TO: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
:::::: CC: Arnd Bergmann <arnd(a)arndb.de>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
Re: [PATCH 3/3] iommu: Enable compile testing for some of drivers
by kbuild test robot
Hi Krzysztof,
I love your patch! Yet something to improve:
[auto build test ERROR on iommu/next]
[also build test ERROR on v5.5-rc4 next-20191219]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Krzysztof-Kozlowski/iommu-omap-F...
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/rockchip/rockchip_drm_gem.c: In function 'rockchip_gem_alloc_iommu':
>> drivers/gpu/drm/rockchip/rockchip_drm_gem.c:134:20: error: implicit declaration of function 'vmap'; did you mean 'bmap'? [-Werror=implicit-function-declaration]
rk_obj->kvaddr = vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
^~~~
bmap
>> drivers/gpu/drm/rockchip/rockchip_drm_gem.c:134:59: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MPX'?
rk_obj->kvaddr = vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
^~~~~~
VM_MPX
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:134:59: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/rockchip/rockchip_drm_gem.c: In function 'rockchip_gem_free_iommu':
>> drivers/gpu/drm/rockchip/rockchip_drm_gem.c:190:2: error: implicit declaration of function 'vunmap'; did you mean 'iounmap'? [-Werror=implicit-function-declaration]
vunmap(rk_obj->kvaddr);
^~~~~~
iounmap
drivers/gpu/drm/rockchip/rockchip_drm_gem.c: In function 'rockchip_gem_prime_vmap':
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:547:49: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MPX'?
return vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
^~~~~~
VM_MPX
cc1: some warnings being treated as errors
vim +134 drivers/gpu/drm/rockchip/rockchip_drm_gem.c
38f993b7c59e26 Tomasz Figa 2016-06-24 119
38f993b7c59e26 Tomasz Figa 2016-06-24 120 static int rockchip_gem_alloc_iommu(struct rockchip_gem_object *rk_obj,
38f993b7c59e26 Tomasz Figa 2016-06-24 121 bool alloc_kmap)
38f993b7c59e26 Tomasz Figa 2016-06-24 122 {
38f993b7c59e26 Tomasz Figa 2016-06-24 123 int ret;
38f993b7c59e26 Tomasz Figa 2016-06-24 124
38f993b7c59e26 Tomasz Figa 2016-06-24 125 ret = rockchip_gem_get_pages(rk_obj);
38f993b7c59e26 Tomasz Figa 2016-06-24 126 if (ret < 0)
38f993b7c59e26 Tomasz Figa 2016-06-24 127 return ret;
38f993b7c59e26 Tomasz Figa 2016-06-24 128
38f993b7c59e26 Tomasz Figa 2016-06-24 129 ret = rockchip_gem_iommu_map(rk_obj);
38f993b7c59e26 Tomasz Figa 2016-06-24 130 if (ret < 0)
38f993b7c59e26 Tomasz Figa 2016-06-24 131 goto err_free;
38f993b7c59e26 Tomasz Figa 2016-06-24 132
38f993b7c59e26 Tomasz Figa 2016-06-24 133 if (alloc_kmap) {
38f993b7c59e26 Tomasz Figa 2016-06-24 @134 rk_obj->kvaddr = vmap(rk_obj->pages, rk_obj->num_pages, VM_MAP,
38f993b7c59e26 Tomasz Figa 2016-06-24 135 pgprot_writecombine(PAGE_KERNEL));
38f993b7c59e26 Tomasz Figa 2016-06-24 136 if (!rk_obj->kvaddr) {
38f993b7c59e26 Tomasz Figa 2016-06-24 137 DRM_ERROR("failed to vmap() buffer\n");
38f993b7c59e26 Tomasz Figa 2016-06-24 138 ret = -ENOMEM;
38f993b7c59e26 Tomasz Figa 2016-06-24 139 goto err_unmap;
38f993b7c59e26 Tomasz Figa 2016-06-24 140 }
38f993b7c59e26 Tomasz Figa 2016-06-24 141 }
38f993b7c59e26 Tomasz Figa 2016-06-24 142
38f993b7c59e26 Tomasz Figa 2016-06-24 143 return 0;
38f993b7c59e26 Tomasz Figa 2016-06-24 144
38f993b7c59e26 Tomasz Figa 2016-06-24 145 err_unmap:
38f993b7c59e26 Tomasz Figa 2016-06-24 146 rockchip_gem_iommu_unmap(rk_obj);
38f993b7c59e26 Tomasz Figa 2016-06-24 147 err_free:
38f993b7c59e26 Tomasz Figa 2016-06-24 148 rockchip_gem_put_pages(rk_obj);
38f993b7c59e26 Tomasz Figa 2016-06-24 149
38f993b7c59e26 Tomasz Figa 2016-06-24 150 return ret;
38f993b7c59e26 Tomasz Figa 2016-06-24 151 }
38f993b7c59e26 Tomasz Figa 2016-06-24 152
38f993b7c59e26 Tomasz Figa 2016-06-24 153 static int rockchip_gem_alloc_dma(struct rockchip_gem_object *rk_obj,
f76c83b580043d Daniel Kurtz 2015-01-12 154 bool alloc_kmap)
2048e3286f347d Mark Yao 2014-08-22 155 {
2048e3286f347d Mark Yao 2014-08-22 156 struct drm_gem_object *obj = &rk_obj->base;
2048e3286f347d Mark Yao 2014-08-22 157 struct drm_device *drm = obj->dev;
2048e3286f347d Mark Yao 2014-08-22 158
00085f1efa387a Krzysztof Kozlowski 2016-08-03 159 rk_obj->dma_attrs = DMA_ATTR_WRITE_COMBINE;
2048e3286f347d Mark Yao 2014-08-22 160
f76c83b580043d Daniel Kurtz 2015-01-12 161 if (!alloc_kmap)
00085f1efa387a Krzysztof Kozlowski 2016-08-03 162 rk_obj->dma_attrs |= DMA_ATTR_NO_KERNEL_MAPPING;
f76c83b580043d Daniel Kurtz 2015-01-12 163
2048e3286f347d Mark Yao 2014-08-22 164 rk_obj->kvaddr = dma_alloc_attrs(drm->dev, obj->size,
2048e3286f347d Mark Yao 2014-08-22 165 &rk_obj->dma_addr, GFP_KERNEL,
00085f1efa387a Krzysztof Kozlowski 2016-08-03 166 rk_obj->dma_attrs);
4b9a90c0b374f8 Daniel Kurtz 2015-01-07 167 if (!rk_obj->kvaddr) {
913bb40a45f18f Brian Norris 2016-06-09 168 DRM_ERROR("failed to allocate %zu byte dma buffer", obj->size);
4b9a90c0b374f8 Daniel Kurtz 2015-01-07 169 return -ENOMEM;
2048e3286f347d Mark Yao 2014-08-22 170 }
2048e3286f347d Mark Yao 2014-08-22 171
2048e3286f347d Mark Yao 2014-08-22 172 return 0;
2048e3286f347d Mark Yao 2014-08-22 173 }
2048e3286f347d Mark Yao 2014-08-22 174
38f993b7c59e26 Tomasz Figa 2016-06-24 175 static int rockchip_gem_alloc_buf(struct rockchip_gem_object *rk_obj,
38f993b7c59e26 Tomasz Figa 2016-06-24 176 bool alloc_kmap)
38f993b7c59e26 Tomasz Figa 2016-06-24 177 {
38f993b7c59e26 Tomasz Figa 2016-06-24 178 struct drm_gem_object *obj = &rk_obj->base;
38f993b7c59e26 Tomasz Figa 2016-06-24 179 struct drm_device *drm = obj->dev;
38f993b7c59e26 Tomasz Figa 2016-06-24 180 struct rockchip_drm_private *private = drm->dev_private;
38f993b7c59e26 Tomasz Figa 2016-06-24 181
38f993b7c59e26 Tomasz Figa 2016-06-24 182 if (private->domain)
38f993b7c59e26 Tomasz Figa 2016-06-24 183 return rockchip_gem_alloc_iommu(rk_obj, alloc_kmap);
38f993b7c59e26 Tomasz Figa 2016-06-24 184 else
38f993b7c59e26 Tomasz Figa 2016-06-24 185 return rockchip_gem_alloc_dma(rk_obj, alloc_kmap);
38f993b7c59e26 Tomasz Figa 2016-06-24 186 }
38f993b7c59e26 Tomasz Figa 2016-06-24 187
38f993b7c59e26 Tomasz Figa 2016-06-24 188 static void rockchip_gem_free_iommu(struct rockchip_gem_object *rk_obj)
38f993b7c59e26 Tomasz Figa 2016-06-24 189 {
38f993b7c59e26 Tomasz Figa 2016-06-24 @190 vunmap(rk_obj->kvaddr);
38f993b7c59e26 Tomasz Figa 2016-06-24 191 rockchip_gem_iommu_unmap(rk_obj);
38f993b7c59e26 Tomasz Figa 2016-06-24 192 rockchip_gem_put_pages(rk_obj);
38f993b7c59e26 Tomasz Figa 2016-06-24 193 }
38f993b7c59e26 Tomasz Figa 2016-06-24 194
:::::: The code at line 134 was first introduced by commit
:::::: 38f993b7c59e261b8ff7deb66c96c7dff4017f7b drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain
:::::: TO: Tomasz Figa <tfiga(a)chromium.org>
:::::: CC: Mark Yao <mark.yao(a)rock-chips.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[usb:usb-testing 36/40] drivers/usb/host/ehci.h:767:3: error: implicit declaration of function 'writel_be'; did you mean 'writeb'?
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head: 51d22e855ea3459d4b272e46aff95de0e59e65a7
commit: 88eaaecc44461f9fb147bf7ee6ccc6d4e9fc23e0 [36/40] usb: host: Enable compile testing for some of drivers
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 88eaaecc44461f9fb147bf7ee6ccc6d4e9fc23e0
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/usb/host/ehci-platform.c:37:0:
drivers/usb/host/ehci.h: In function 'ehci_readl':
drivers/usb/host/ehci.h:743:3: error: implicit declaration of function 'readl_be'; did you mean 'readsb'? [-Werror=implicit-function-declaration]
readl_be(regs) :
^~~~~~~~
readsb
drivers/usb/host/ehci.h: In function 'ehci_writel':
>> drivers/usb/host/ehci.h:767:3: error: implicit declaration of function 'writel_be'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
writel_be(val, regs) :
^~~~~~~~~
writeb
cc1: some warnings being treated as errors
vim +767 drivers/usb/host/ehci.h
91bc4d31e81b15 Vladimir Barinov 2007-12-30 737
083522d76662cd Benjamin Herrenschmidt 2006-12-15 738 static inline unsigned int ehci_readl(const struct ehci_hcd *ehci,
083522d76662cd Benjamin Herrenschmidt 2006-12-15 739 __u32 __iomem *regs)
083522d76662cd Benjamin Herrenschmidt 2006-12-15 740 {
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28 741 #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
083522d76662cd Benjamin Herrenschmidt 2006-12-15 742 return ehci_big_endian_mmio(ehci) ?
68f50e52554a0a Al Viro 2007-02-09 @743 readl_be(regs) :
68f50e52554a0a Al Viro 2007-02-09 744 readl(regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28 745 #else
68f50e52554a0a Al Viro 2007-02-09 746 return readl(regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28 747 #endif
083522d76662cd Benjamin Herrenschmidt 2006-12-15 748 }
083522d76662cd Benjamin Herrenschmidt 2006-12-15 749
feffe09f510c47 Peter Chen 2014-01-10 750 #ifdef CONFIG_SOC_IMX28
feffe09f510c47 Peter Chen 2014-01-10 751 static inline void imx28_ehci_writel(const unsigned int val,
feffe09f510c47 Peter Chen 2014-01-10 752 volatile __u32 __iomem *addr)
feffe09f510c47 Peter Chen 2014-01-10 753 {
feffe09f510c47 Peter Chen 2014-01-10 754 __asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr));
feffe09f510c47 Peter Chen 2014-01-10 755 }
feffe09f510c47 Peter Chen 2014-01-10 756 #else
feffe09f510c47 Peter Chen 2014-01-10 757 static inline void imx28_ehci_writel(const unsigned int val,
feffe09f510c47 Peter Chen 2014-01-10 758 volatile __u32 __iomem *addr)
feffe09f510c47 Peter Chen 2014-01-10 759 {
feffe09f510c47 Peter Chen 2014-01-10 760 }
feffe09f510c47 Peter Chen 2014-01-10 761 #endif
083522d76662cd Benjamin Herrenschmidt 2006-12-15 762 static inline void ehci_writel(const struct ehci_hcd *ehci,
083522d76662cd Benjamin Herrenschmidt 2006-12-15 763 const unsigned int val, __u32 __iomem *regs)
083522d76662cd Benjamin Herrenschmidt 2006-12-15 764 {
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28 765 #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
083522d76662cd Benjamin Herrenschmidt 2006-12-15 766 ehci_big_endian_mmio(ehci) ?
68f50e52554a0a Al Viro 2007-02-09 @767 writel_be(val, regs) :
68f50e52554a0a Al Viro 2007-02-09 768 writel(val, regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28 769 #else
feffe09f510c47 Peter Chen 2014-01-10 770 if (ehci->imx28_write_fix)
feffe09f510c47 Peter Chen 2014-01-10 771 imx28_ehci_writel(val, regs);
feffe09f510c47 Peter Chen 2014-01-10 772 else
68f50e52554a0a Al Viro 2007-02-09 773 writel(val, regs);
d728e327d4f86d Benjamin Herrenschmidt 2006-12-28 774 #endif
083522d76662cd Benjamin Herrenschmidt 2006-12-15 775 }
8cd42e97bf451b Kumar Gala 2006-01-20 776
:::::: The code at line 767 was first introduced by commit
:::::: 68f50e52554a0a55dfe2e3fdf659ee0569d73c3f [PATCH] hci_{read,write}l() does force casts to wrong type for no reason
:::::: TO: Al Viro <viro(a)ftp.linux.org.uk>
:::::: CC: Linus Torvalds <torvalds(a)woody.linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
Re: [PATCH 3/3] mtd: onenand: Enable compile testing of OMAP and Samsung drivers
by kbuild test robot
Hi Krzysztof,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.5-rc4 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Krzysztof-Kozlowski/mtd-onenand-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bf8d1cd4386535004c4afe7f03d37f9864c9940e
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-129-g341daf20-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/mtd/nand/onenand/samsung_mtd.c:678:17: sparse: sparse: incorrect type in argument 2 (different address spaces)
>> drivers/mtd/nand/onenand/samsung_mtd.c:678:17: sparse: expected void const *from
>> drivers/mtd/nand/onenand/samsung_mtd.c:678:17: sparse: got void [noderef] <asn:2> *[assigned] p
>> drivers/mtd/nand/onenand/samsung_mtd.c:679:19: sparse: sparse: incorrect type in assignment (different address spaces)
>> drivers/mtd/nand/onenand/samsung_mtd.c:679:19: sparse: expected void [noderef] <asn:2> *[assigned] p
>> drivers/mtd/nand/onenand/samsung_mtd.c:679:19: sparse: got unsigned char *
drivers/mtd/nand/onenand/samsung_mtd.c:682:9: sparse: sparse: incorrect type in argument 2 (different address spaces)
drivers/mtd/nand/onenand/samsung_mtd.c:682:9: sparse: expected void const *from
drivers/mtd/nand/onenand/samsung_mtd.c:682:9: sparse: got void [noderef] <asn:2> *[assigned] p
vim +678 drivers/mtd/nand/onenand/samsung_mtd.c
e23abf4b774322 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 614
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 615 static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 616 unsigned char *buffer, int offset, size_t count)
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 617 {
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 618 struct onenand_chip *this = mtd->priv;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 619 void __iomem *p;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 620 void *buf = (void *) buffer;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 621 dma_addr_t dma_src, dma_dst;
08b3af3092bb2c drivers/mtd/onenand/samsung.c Kyungmin Park 2010-11-02 622 int err, ofs, page_dma = 0;
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 623 struct device *dev = &onenand->pdev->dev;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 624
9aba97ad004ed0 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-08-27 625 p = this->base + area;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 626 if (ONENAND_CURRENT_BUFFERRAM(this)) {
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 627 if (area == ONENAND_DATARAM)
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 628 p += this->writesize;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 629 else
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 630 p += mtd->oobsize;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 631 }
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 632
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 633 if (offset & 3 || (size_t) buf & 3 ||
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 634 !onenand->dma_addr || count != mtd->writesize)
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 635 goto normal;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 636
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 637 /* Handle vmalloc address */
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 638 if (buf >= high_memory) {
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 639 struct page *page;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 640
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 641 if (((size_t) buf & PAGE_MASK) !=
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 642 ((size_t) (buf + count - 1) & PAGE_MASK))
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 643 goto normal;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 644 page = vmalloc_to_page(buf);
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 645 if (!page)
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 646 goto normal;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 647
08b3af3092bb2c drivers/mtd/onenand/samsung.c Kyungmin Park 2010-11-02 648 /* Page offset */
08b3af3092bb2c drivers/mtd/onenand/samsung.c Kyungmin Park 2010-11-02 649 ofs = ((size_t) buf & ~PAGE_MASK);
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 650 page_dma = 1;
08b3af3092bb2c drivers/mtd/onenand/samsung.c Kyungmin Park 2010-11-02 651
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 652 /* DMA routine */
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 653 dma_src = onenand->phys_base + (p - this->base);
08b3af3092bb2c drivers/mtd/onenand/samsung.c Kyungmin Park 2010-11-02 654 dma_dst = dma_map_page(dev, page, ofs, count, DMA_FROM_DEVICE);
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 655 } else {
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 656 /* DMA routine */
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 657 dma_src = onenand->phys_base + (p - this->base);
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 658 dma_dst = dma_map_single(dev, buf, count, DMA_FROM_DEVICE);
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 659 }
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 660 if (dma_mapping_error(dev, dma_dst)) {
102f66a740cfbe drivers/mtd/nand/onenand/samsung_mtd.c Krzysztof Kozlowski 2019-12-29 661 dev_err(dev, "Couldn't map a %zu byte buffer for DMA\n", count);
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 662 goto normal;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 663 }
81d46c59550997 drivers/mtd/onenand/samsung.c Arnd Bergmann 2014-05-08 664 err = s5pc110_dma_ops(dma_dst, dma_src,
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 665 count, S5PC110_DMA_DIR_READ);
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 666
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 667 if (page_dma)
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 668 dma_unmap_page(dev, dma_dst, count, DMA_FROM_DEVICE);
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 669 else
dcf08227e964a5 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-09-28 670 dma_unmap_single(dev, dma_dst, count, DMA_FROM_DEVICE);
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 671
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 672 if (!err)
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 673 return 0;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 674
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 675 normal:
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 676 if (count != mtd->writesize) {
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 677 /* Copy the bufferram to memory to prevent unaligned access */
9aba97ad004ed0 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-08-27 @678 memcpy(this->page_buf, p, mtd->writesize);
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 @679 p = this->page_buf + offset;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 680 }
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 681
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 682 memcpy(buffer, p, count);
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 683
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 684 return 0;
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 685 }
46f3e88bd9da01 drivers/mtd/onenand/samsung.c Kyungmin Park 2010-04-28 686
:::::: The code at line 678 was first introduced by commit
:::::: 9aba97ad004ed0cde9747a9daf5b1484edb746cd mtd: OneNAND: Fix 2KiB pagesize handling at Samsung SoCs
:::::: TO: Kyungmin Park <kyungmin.park(a)samsung.com>
:::::: CC: David Woodhouse <David.Woodhouse(a)intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months