Tree/Branch: next-20150112 Git describe: next-20150112 Commit: 442e3e6681 Add linux-next specific files for 20150112
Build Time: 18 min 46 sec
Passed: 6 / 8 ( 75.00 %) Failed: 2 / 8 ( 25.00 %)
Errors: 3 Warnings: 30 Section Mismatches: 0
Failed defconfigs: arm64-allmodconfig arm-allmodconfig
Errors:
arm64-allmodconfig ../arch/arm64/mm/dump.c:55:20: error: 'PCI_IOBASE' undeclared here (not in a function) ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
arm-allmodconfig ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration] ../drivers/dma/k3dma.c:823:12: error: conflicting types for 'k3_dma_resume'
------------------------------------------------------------------------------- defconfigs with issues (other than build errors): 25 warnings 0 mismatches : arm64-allmodconfig 1 warnings 0 mismatches : arm-multi_v7_defconfig 17 warnings 0 mismatches : arm-allmodconfig 1 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Errors summary: 3 2 ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration] 1 ../drivers/dma/k3dma.c:823:12: error: conflicting types for 'k3_dma_resume' 1 ../arch/arm64/mm/dump.c:55:20: error: 'PCI_IOBASE' undeclared here (not in a function)
Warnings Summary: 30 6 ../drivers/ata/sata_dwc_460ex.c:668:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 6 ../drivers/ata/sata_dwc_460ex.c:652:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 2 ../include/linux/dynamic_debug.h:78:3: warning: unsupported argument to '__builtin_return_address' 2 ../drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp] 2 ../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp] 2 ../drivers/clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable] 1 ../sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1 ../sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1 ../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=] 1 ../lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1480 bytes is larger than 1024 bytes [-Wframe-larger-than=] 1 ../include/uapi/linux/swab.h:13:15: warning: integer overflow in expression [-Woverflow] 1 ../include/linux/kernel.h:711:17: warning: comparison of distinct pointer types lacks a cast 1 ../include/linux/dynamic_debug.h:64:16: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] 1 ../fs/btrfs/extent_io.c:2193:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1 ../drivers/usb/renesas_usbhs/common.c:471:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 1 ../drivers/usb/gadget/udc/udc-xilinx.c:2135:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 1 ../drivers/spi/spi-s3c64xx.c:336:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1 ../drivers/spi/spi-s3c64xx.c:327:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1 ../drivers/net/ethernet/rocker/rocker.c:809:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 1 ../drivers/net/ethernet/dec/tulip/tulip_core.c:101:2: warning: #warning Processor architecture undefined! [-Wcpp] 1 ../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1208 bytes is larger than 1024 bytes [-Wframe-larger-than=] 1 ../drivers/infiniband/hw/qib/qib_qp.c:44:0: warning: "BITS_PER_PAGE" redefined 1 ../drivers/gpio/gpio-74xx-mmio.c:132:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined 1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined 1 ../arch/arm64/kernel/efi.c:276:20: warning: 'free_end' may be used uninitialized in this function [-Wmaybe-uninitialized] 1 ../arch/arm/mach-cns3xxx/pcie.c:298:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
=============================================================================== Detailed per-defconfig build reports below:
------------------------------------------------------------------------------- arm64-allmodconfig : FAIL, 2 errors, 25 warnings, 0 section mismatches
Errors: ../arch/arm64/mm/dump.c:55:20: error: 'PCI_IOBASE' undeclared here (not in a function) ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
Warnings: ../drivers/ata/sata_dwc_460ex.c:652:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:652:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:652:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:652:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:652:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:652:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:668:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:668:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:668:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:668:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:668:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/ata/sata_dwc_460ex.c:668:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ../sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined ../drivers/gpio/gpio-74xx-mmio.c:132:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/infiniband/hw/qib/qib_qp.c:44:0: warning: "BITS_PER_PAGE" redefined ../drivers/spi/spi-s3c64xx.c:327:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ../drivers/spi/spi-s3c64xx.c:336:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp] ../drivers/net/ethernet/dec/tulip/tulip_core.c:101:2: warning: #warning Processor architecture undefined! [-Wcpp] ../drivers/usb/gadget/udc/udc-xilinx.c:2135:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp] ../drivers/usb/renesas_usbhs/common.c:471:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
------------------------------------------------------------------------------- arm-multi_v7_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings: ../drivers/clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
------------------------------------------------------------------------------- arm-allmodconfig : FAIL, 2 errors, 17 warnings, 0 section mismatches
Errors: ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration] ../drivers/dma/k3dma.c:823:12: error: conflicting types for 'k3_dma_resume'
Warnings: ../arch/arm/mach-cns3xxx/pcie.c:298:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=] ../lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1480 bytes is larger than 1024 bytes [-Wframe-larger-than=] ../fs/btrfs/extent_io.c:2193:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ../drivers/clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable] ../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=] ../include/linux/kernel.h:711:17: warning: comparison of distinct pointer types lacks a cast ../include/linux/dynamic_debug.h:78:3: warning: unsupported argument to '__builtin_return_address' ../include/linux/dynamic_debug.h:78:3: warning: unsupported argument to '__builtin_return_address' ../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1208 bytes is larger than 1024 bytes [-Wframe-larger-than=] ../include/linux/dynamic_debug.h:64:16: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] ../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp] ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ../drivers/net/ethernet/rocker/rocker.c:809:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ../drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp] ../include/uapi/linux/swab.h:13:15: warning: integer overflow in expression [-Woverflow]
------------------------------------------------------------------------------- arm64-defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings: ../arch/arm64/kernel/efi.c:276:20: warning: 'free_end' may be used uninitialized in this function [-Wmaybe-uninitialized] -------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig x86_64-allnoconfig arm-allnoconfig x86_64-defconfig
On Mon, Jan 12, 2015 at 08:03:27AM +0000, Build bot for Mark Brown wrote:
arm64-allmodconfig ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
arm-allmodconfig ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
Since commit 84683a7e081ff60e (sata_dwc_460ex: enable COMPILE_TEST for the driver) the sata_dwc_460ex has been breaking the all*config builds for arm and arm64 as the driver uses dma_cache_sync() but this function is not provided on those architectures.
Either a more specific dependency is needed or the function shouldn't be used, I've not looked at the code.
On Mon, Jan 12, 2015 at 12:36:55PM +0000, Mark Brown wrote:
On Mon, Jan 12, 2015 at 08:03:27AM +0000, Build bot for Mark Brown wrote:
arm64-allmodconfig ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
arm-allmodconfig ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
Since commit 84683a7e081ff60e (sata_dwc_460ex: enable COMPILE_TEST for the driver) the sata_dwc_460ex has been breaking the all*config builds for arm and arm64 as the driver uses dma_cache_sync() but this function is not provided on those architectures.
Either a more specific dependency is needed or the function shouldn't be used, I've not looked at the code.
The driver does look rather broken. Let's first read up when dma_cache_sync() should be used:
void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction direction)
Do a partial sync of memory that was allocated by dma_alloc_noncoherent(), starting at virtual address vaddr and continuing on for size. Again, you *must* observe the cache line boundaries when doing this.
Note "memory that was allocated by dma_alloc_noncoherent()".
Now, let's look at the driver:
static int map_sg_to_lli(struct scatterlist *sg, int num_elems, struct lli *lli, dma_addr_t dma_lli, void __iomem *dmadr_addr, int dir) { ... dma_cache_sync(NULL, lli, (sizeof(struct lli) * idx), DMA_BIDIRECTIONAL); }
static int dma_dwc_xfer_setup(struct scatterlist *sg, int num_elems, struct lli *lli, dma_addr_t dma_lli, void __iomem *addr, int dir) { /* Convert SG list to linked list of items (LLIs) for AHB DMA */ num_lli = map_sg_to_lli(sg, num_elems, lli, dma_lli, addr, dir); }
dma_chan = dma_dwc_xfer_setup(sg, qc->n_elem, hsdevp->llit[tag], hsdevp->llit_dma[tag], (void *__iomem)(&hsdev->sata_dwc_regs->\ dmadr), qc->dma_dir);
for (i = 0; i < SATA_DWC_QCMD_MAX; i++) { hsdevp->llit[i] = dma_alloc_coherent(pdev, SATA_DWC_DMAC_LLI_TBL_SZ, &(hsdevp->llit_dma[i]), GFP_ATOMIC);
So, hsdevp->llit[x] is allocated using dma_alloc_*coherent*(), not dma_alloc_*noncohernet*(), so dma_cache_sync() should not be used according to the DMA API documentation.
Moreover, that GFP_ATOMIC flag looks mightily suspicious - we've done a previous allocation using kzalloc(, GFP_KERNEL), so we aren't in an atomic region, so why use GFP_ATOMIC there?
It doesn't look like it'll pass sparse checks either:
struct sata_dwc_device { u8 *reg_base; struct sata_dwc_regs *sata_dwc_regs; /* DW Synopsys SATA specific */ };
u8 *base = NULL;
base = of_iomap(ofdev->dev.of_node, 0); hsdev->reg_base = base; hsdev->sata_dwc_regs = (void *__iomem)(base + SATA_DWC_REG_OFFSET);
Maybe it should be moved to drivers/staging? :)
On Mon, 2015-01-12 at 12:50 +0000, Russell King - ARM Linux wrote:
On Mon, Jan 12, 2015 at 12:36:55PM +0000, Mark Brown wrote:
On Mon, Jan 12, 2015 at 08:03:27AM +0000, Build bot for Mark Brown wrote:
arm64-allmodconfig ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
arm-allmodconfig ../drivers/ata/sata_dwc_460ex.c:719:3: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
Since commit 84683a7e081ff60e (sata_dwc_460ex: enable COMPILE_TEST for the driver) the sata_dwc_460ex has been breaking the all*config builds for arm and arm64 as the driver uses dma_cache_sync() but this function is not provided on those architectures.
Either a more specific dependency is needed or the function shouldn't be used, I've not looked at the code.
The driver does look rather broken. Let's first read up when dma_cache_sync() should be used:
void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction direction) Do a partial sync of memory that was allocated by dma_alloc_noncoherent(), starting at virtual address vaddr and continuing on for size. Again, you *must* observe the cache line boundaries when doing this.
Note "memory that was allocated by dma_alloc_noncoherent()".
Now, let's look at the driver:
static int map_sg_to_lli(struct scatterlist *sg, int num_elems, struct lli *lli, dma_addr_t dma_lli, void __iomem *dmadr_addr, int dir) { ... dma_cache_sync(NULL, lli, (sizeof(struct lli) * idx), DMA_BIDIRECTIONAL); }
static int dma_dwc_xfer_setup(struct scatterlist *sg, int num_elems, struct lli *lli, dma_addr_t dma_lli, void __iomem *addr, int dir) { /* Convert SG list to linked list of items (LLIs) for AHB DMA */ num_lli = map_sg_to_lli(sg, num_elems, lli, dma_lli, addr, dir); }
dma_chan = dma_dwc_xfer_setup(sg, qc->n_elem, hsdevp->llit[tag], hsdevp->llit_dma[tag], (void *__iomem)(&hsdev->sata_dwc_regs->\ dmadr), qc->dma_dir); for (i = 0; i < SATA_DWC_QCMD_MAX; i++) { hsdevp->llit[i] = dma_alloc_coherent(pdev, SATA_DWC_DMAC_LLI_TBL_SZ, &(hsdevp->llit_dma[i]), GFP_ATOMIC);
So, hsdevp->llit[x] is allocated using dma_alloc_*coherent*(), not dma_alloc_*noncohernet*(), so dma_cache_sync() should not be used according to the DMA API documentation.
Moreover, that GFP_ATOMIC flag looks mightily suspicious - we've done a previous allocation using kzalloc(, GFP_KERNEL), so we aren't in an atomic region, so why use GFP_ATOMIC there?
It doesn't look like it'll pass sparse checks either:
struct sata_dwc_device { u8 *reg_base; struct sata_dwc_regs *sata_dwc_regs; /* DW Synopsys SATA specific */ };
u8 *base = NULL; base = of_iomap(ofdev->dev.of_node, 0); hsdev->reg_base = base; hsdev->sata_dwc_regs = (void *__iomem)(base + SATA_DWC_REG_OFFSET);
Maybe it should be moved to drivers/staging? :)
I'm working on it.
My target is to remove private implementation of dw_dmac from this driver. It will make it mostly free of sparse / compiler warnings. Sorry, I didn't test on ARM platform since I have none.
I just send a plug patch to disable compilation on ARMs.
kernel-build-reports@lists.linaro.org