Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver
On Thursday 12 November 2015 16:20:15 Fengguang Wu wrote: > Hi Arnd, > > On Wed, Nov 11, 2015 at 09:42:00AM +0100, Arnd Bergmann wrote: > > On Wednesday 11 November 2015 10:21:03 Fengguang Wu wrote: > > > Hi Sinan, > > > > > > Sorry please ignore this warning -- it's actually a problem specific > > > to the mn10300 arch. I'll disable such warning in mn10300 in future. > > > > I just tried to find what happened here. mn10300 appears to define > > the type based on the gcc version: > > > > #if __GNUC__ == 4 > > typedef unsigned int__kernel_size_t; > > typedef signed int __kernel_ssize_t; > > #else > > typedef unsigned long __kernel_size_t; > > typedef signed long __kernel_ssize_t; > > #endif > > > > while gcc defines it based on whether you are using a Linux targetted > > gcc or a bare-metal one: > > > > gcc/config/mn10300/linux.h:#undef SIZE_TYPE > > gcc/config/mn10300/mn10300.h:#undef SIZE_TYPE > > gcc/config/mn10300/mn10300.h:#define SIZE_TYPE "unsigned int" > > > > I can think of two reasons why it went wrong here: > > > > a) You are using gcc-5.x, and the check in the kernel should be ">=" > >rather than "==". We should probably fix that regardless > > > > b) You are using a bare-metal gcc rather than a Linux version. > > > I couldn't find an mn10300 gcc on kernel.org, which one do you use? > > I used this mn10300 compiler: > > https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_am33_2.0-linux.tar.xz Ok, so this is not gcc-5.x (i.e. we are not hitting the first problem), but it uses this definition: ./lib/gcc/am33_2.0-linux/4.9.0/include/stddef.h:#define __SIZE_TYPE__ long unsigned int which does not match what the kernel expects. I see I have the same thing in my locally built am33_2.0-linux-gcc-4.9.3. I have just tried this again with a newly built am33_2.0-linux-gcc-5.2.1, and that indeed avoids almost all warnings for the mn10300 kernel. I suspect this is really a combination of two bugs that cancel each other out, but if you do the same update on your system, you will get the results you want and will no longer see the bogus warning. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver
Hi Arnd, On Wed, Nov 11, 2015 at 09:42:00AM +0100, Arnd Bergmann wrote: > On Wednesday 11 November 2015 10:21:03 Fengguang Wu wrote: > > Hi Sinan, > > > > Sorry please ignore this warning -- it's actually a problem specific > > to the mn10300 arch. I'll disable such warning in mn10300 in future. > > I just tried to find what happened here. mn10300 appears to define > the type based on the gcc version: > > #if __GNUC__ == 4 > typedef unsigned int__kernel_size_t; > typedef signed int __kernel_ssize_t; > #else > typedef unsigned long __kernel_size_t; > typedef signed long __kernel_ssize_t; > #endif > > while gcc defines it based on whether you are using a Linux targetted > gcc or a bare-metal one: > > gcc/config/mn10300/linux.h:#undef SIZE_TYPE > gcc/config/mn10300/mn10300.h:#undef SIZE_TYPE > gcc/config/mn10300/mn10300.h:#define SIZE_TYPE "unsigned int" > > I can think of two reasons why it went wrong here: > > a) You are using gcc-5.x, and the check in the kernel should be ">=" >rather than "==". We should probably fix that regardless > > b) You are using a bare-metal gcc rather than a Linux version. > I couldn't find an mn10300 gcc on kernel.org, which one do you use? I used this mn10300 compiler: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_am33_2.0-linux.tar.xz Thanks, Fengguang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver
Hi Arnd, On Wed, Nov 11, 2015 at 09:42:00AM +0100, Arnd Bergmann wrote: > On Wednesday 11 November 2015 10:21:03 Fengguang Wu wrote: > > Hi Sinan, > > > > Sorry please ignore this warning -- it's actually a problem specific > > to the mn10300 arch. I'll disable such warning in mn10300 in future. > > I just tried to find what happened here. mn10300 appears to define > the type based on the gcc version: > > #if __GNUC__ == 4 > typedef unsigned int__kernel_size_t; > typedef signed int __kernel_ssize_t; > #else > typedef unsigned long __kernel_size_t; > typedef signed long __kernel_ssize_t; > #endif > > while gcc defines it based on whether you are using a Linux targetted > gcc or a bare-metal one: > > gcc/config/mn10300/linux.h:#undef SIZE_TYPE > gcc/config/mn10300/mn10300.h:#undef SIZE_TYPE > gcc/config/mn10300/mn10300.h:#define SIZE_TYPE "unsigned int" > > I can think of two reasons why it went wrong here: > > a) You are using gcc-5.x, and the check in the kernel should be ">=" >rather than "==". We should probably fix that regardless > > b) You are using a bare-metal gcc rather than a Linux version. > I couldn't find an mn10300 gcc on kernel.org, which one do you use? I used this mn10300 compiler: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_am33_2.0-linux.tar.xz Thanks, Fengguang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver
On Thursday 12 November 2015 16:20:15 Fengguang Wu wrote: > Hi Arnd, > > On Wed, Nov 11, 2015 at 09:42:00AM +0100, Arnd Bergmann wrote: > > On Wednesday 11 November 2015 10:21:03 Fengguang Wu wrote: > > > Hi Sinan, > > > > > > Sorry please ignore this warning -- it's actually a problem specific > > > to the mn10300 arch. I'll disable such warning in mn10300 in future. > > > > I just tried to find what happened here. mn10300 appears to define > > the type based on the gcc version: > > > > #if __GNUC__ == 4 > > typedef unsigned int__kernel_size_t; > > typedef signed int __kernel_ssize_t; > > #else > > typedef unsigned long __kernel_size_t; > > typedef signed long __kernel_ssize_t; > > #endif > > > > while gcc defines it based on whether you are using a Linux targetted > > gcc or a bare-metal one: > > > > gcc/config/mn10300/linux.h:#undef SIZE_TYPE > > gcc/config/mn10300/mn10300.h:#undef SIZE_TYPE > > gcc/config/mn10300/mn10300.h:#define SIZE_TYPE "unsigned int" > > > > I can think of two reasons why it went wrong here: > > > > a) You are using gcc-5.x, and the check in the kernel should be ">=" > >rather than "==". We should probably fix that regardless > > > > b) You are using a bare-metal gcc rather than a Linux version. > > > I couldn't find an mn10300 gcc on kernel.org, which one do you use? > > I used this mn10300 compiler: > > https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_am33_2.0-linux.tar.xz Ok, so this is not gcc-5.x (i.e. we are not hitting the first problem), but it uses this definition: ./lib/gcc/am33_2.0-linux/4.9.0/include/stddef.h:#define __SIZE_TYPE__ long unsigned int which does not match what the kernel expects. I see I have the same thing in my locally built am33_2.0-linux-gcc-4.9.3. I have just tried this again with a newly built am33_2.0-linux-gcc-5.2.1, and that indeed avoids almost all warnings for the mn10300 kernel. I suspect this is really a combination of two bugs that cancel each other out, but if you do the same update on your system, you will get the results you want and will no longer see the bogus warning. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver
On Wednesday 11 November 2015 10:21:03 Fengguang Wu wrote: > Hi Sinan, > > Sorry please ignore this warning -- it's actually a problem specific > to the mn10300 arch. I'll disable such warning in mn10300 in future. I just tried to find what happened here. mn10300 appears to define the type based on the gcc version: #if __GNUC__ == 4 typedef unsigned int__kernel_size_t; typedef signed int __kernel_ssize_t; #else typedef unsigned long __kernel_size_t; typedef signed long __kernel_ssize_t; #endif while gcc defines it based on whether you are using a Linux targetted gcc or a bare-metal one: gcc/config/mn10300/linux.h:#undef SIZE_TYPE gcc/config/mn10300/mn10300.h:#undef SIZE_TYPE gcc/config/mn10300/mn10300.h:#define SIZE_TYPE "unsigned int" I can think of two reasons why it went wrong here: a) You are using gcc-5.x, and the check in the kernel should be ">=" rather than "==". We should probably fix that regardless b) You are using a bare-metal gcc rather than a Linux version. I couldn't find an mn10300 gcc on kernel.org, which one do you use? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver
On Wednesday 11 November 2015 10:21:03 Fengguang Wu wrote: > Hi Sinan, > > Sorry please ignore this warning -- it's actually a problem specific > to the mn10300 arch. I'll disable such warning in mn10300 in future. I just tried to find what happened here. mn10300 appears to define the type based on the gcc version: #if __GNUC__ == 4 typedef unsigned int__kernel_size_t; typedef signed int __kernel_ssize_t; #else typedef unsigned long __kernel_size_t; typedef signed long __kernel_ssize_t; #endif while gcc defines it based on whether you are using a Linux targetted gcc or a bare-metal one: gcc/config/mn10300/linux.h:#undef SIZE_TYPE gcc/config/mn10300/mn10300.h:#undef SIZE_TYPE gcc/config/mn10300/mn10300.h:#define SIZE_TYPE "unsigned int" I can think of two reasons why it went wrong here: a) You are using gcc-5.x, and the check in the kernel should be ">=" rather than "==". We should probably fix that regardless b) You are using a bare-metal gcc rather than a Linux version. I couldn't find an mn10300 gcc on kernel.org, which one do you use? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver
Hi Sinan, Sorry please ignore this warning -- it's actually a problem specific to the mn10300 arch. I'll disable such warning in mn10300 in future. Thanks, Fengguang On Sun, Nov 08, 2015 at 07:43:52PM -0500, Sinan Kaya wrote: > > > On 11/8/2015 2:13 PM, kbuild test robot wrote: > >Hi Sinan, > > > >[auto build test WARNING on: robh/for-next] > >[also build test WARNING on: v4.3 next-20151106] > > > >url: > >https://github.com/0day-ci/linux/commits/Sinan-Kaya/ma-add-Qualcomm-Technologies-HIDMA-driver/20151108-125824 > >base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux for-next > >config: mn10300-allyesconfig (attached as .config) > >reproduce: > > wget > > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > > -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # save the attached .config to linux build tree > > make.cross ARCH=mn10300 > > > >All warnings (new ones prefixed by >>): > > > >In file included from include/linux/printk.h:277:0, > > from include/linux/kernel.h:13, > > from include/linux/list.h:8, > > from include/linux/kobject.h:20, > > from include/linux/device.h:17, > > from include/linux/dmaengine.h:20, > > from drivers/dma/qcom/hidma.c:45: > >drivers/dma/qcom/hidma.c: In function 'hidma_prep_dma_memcpy': > >include/linux/dynamic_debug.h:64:16: warning: format '%zu' expects > > argument of type 'size_t', but argument 7 has type 'unsigned int' > > [-Wformat=] > > static struct _ddebug __aligned(8) \ > >^ > >include/linux/dynamic_debug.h:84:2: note: in expansion of macro > > 'DEFINE_DYNAMIC_DEBUG_METADATA' > > DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ > > ^ > >include/linux/device.h:1171:2: note: in expansion of macro > > 'dynamic_dev_dbg' > > dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ > > ^ > >>>drivers/dma/qcom/hidma.c:391:2: note: in expansion of macro 'dev_dbg' > > dev_dbg(mdma->ddev.dev, > > ^ > > > >vim +/dev_dbg +391 drivers/dma/qcom/hidma.c > > > >375 > >376 mchan->allocated = 0; > >377 spin_unlock_irqrestore(>lock, irqflags); > >378 dev_dbg(mdma->ddev.dev, "freed channel for %u\n", > > mchan->dma_sig); > >379 } > >380 > >381 > >382 static struct dma_async_tx_descriptor * > >383 hidma_prep_dma_memcpy(struct dma_chan *dmach, dma_addr_t > > dma_dest, > >384 dma_addr_t dma_src, size_t len, > > unsigned long flags) > >385 { > >386 struct hidma_chan *mchan = to_hidma_chan(dmach); > >387 struct hidma_desc *mdesc = NULL; > >388 struct hidma_dev *mdma = mchan->dmadev; > >389 unsigned long irqflags; > >390 > > > 391 dev_dbg(mdma->ddev.dev, > >392 "memcpy: chan:%p dest:%pad src:%pad len:%zu\n", > > mchan, > >393 _dest, _src, len); > >394 > > What am I missing? > > len is size_t. This page says use %zu for size_t. > > https://www.kernel.org/doc/Documentation/printk-formats.txt > > > > >395 /* Get free descriptor */ > >396 spin_lock_irqsave(>lock, irqflags); > >397 if (!list_empty(>free)) { > >398 mdesc = list_first_entry(>free, struct > > hidma_desc, > >399 node); > > > >--- > >0-DAY kernel test infrastructureOpen Source Technology Center > >https://lists.01.org/pipermail/kbuild-all Intel Corporation > > > > > > -- > Sinan Kaya > Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux > Foundation Collaborative Project > ___ > kbuild-all mailing list > kbuild-...@lists.01.org > https://lists.01.org/mailman/listinfo/kbuild-all -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver
Hi Sinan, Sorry please ignore this warning -- it's actually a problem specific to the mn10300 arch. I'll disable such warning in mn10300 in future. Thanks, Fengguang On Sun, Nov 08, 2015 at 07:43:52PM -0500, Sinan Kaya wrote: > > > On 11/8/2015 2:13 PM, kbuild test robot wrote: > >Hi Sinan, > > > >[auto build test WARNING on: robh/for-next] > >[also build test WARNING on: v4.3 next-20151106] > > > >url: > >https://github.com/0day-ci/linux/commits/Sinan-Kaya/ma-add-Qualcomm-Technologies-HIDMA-driver/20151108-125824 > >base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux for-next > >config: mn10300-allyesconfig (attached as .config) > >reproduce: > > wget > > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > > -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # save the attached .config to linux build tree > > make.cross ARCH=mn10300 > > > >All warnings (new ones prefixed by >>): > > > >In file included from include/linux/printk.h:277:0, > > from include/linux/kernel.h:13, > > from include/linux/list.h:8, > > from include/linux/kobject.h:20, > > from include/linux/device.h:17, > > from include/linux/dmaengine.h:20, > > from drivers/dma/qcom/hidma.c:45: > >drivers/dma/qcom/hidma.c: In function 'hidma_prep_dma_memcpy': > >include/linux/dynamic_debug.h:64:16: warning: format '%zu' expects > > argument of type 'size_t', but argument 7 has type 'unsigned int' > > [-Wformat=] > > static struct _ddebug __aligned(8) \ > >^ > >include/linux/dynamic_debug.h:84:2: note: in expansion of macro > > 'DEFINE_DYNAMIC_DEBUG_METADATA' > > DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ > > ^ > >include/linux/device.h:1171:2: note: in expansion of macro > > 'dynamic_dev_dbg' > > dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ > > ^ > >>>drivers/dma/qcom/hidma.c:391:2: note: in expansion of macro 'dev_dbg' > > dev_dbg(mdma->ddev.dev, > > ^ > > > >vim +/dev_dbg +391 drivers/dma/qcom/hidma.c > > > >375 > >376 mchan->allocated = 0; > >377 spin_unlock_irqrestore(>lock, irqflags); > >378 dev_dbg(mdma->ddev.dev, "freed channel for %u\n", > > mchan->dma_sig); > >379 } > >380 > >381 > >382 static struct dma_async_tx_descriptor * > >383 hidma_prep_dma_memcpy(struct dma_chan *dmach, dma_addr_t > > dma_dest, > >384 dma_addr_t dma_src, size_t len, > > unsigned long flags) > >385 { > >386 struct hidma_chan *mchan = to_hidma_chan(dmach); > >387 struct hidma_desc *mdesc = NULL; > >388 struct hidma_dev *mdma = mchan->dmadev; > >389 unsigned long irqflags; > >390 > > > 391 dev_dbg(mdma->ddev.dev, > >392 "memcpy: chan:%p dest:%pad src:%pad len:%zu\n", > > mchan, > >393 _dest, _src, len); > >394 > > What am I missing? > > len is size_t. This page says use %zu for size_t. > > https://www.kernel.org/doc/Documentation/printk-formats.txt > > > > >395 /* Get free descriptor */ > >396 spin_lock_irqsave(>lock, irqflags); > >397 if (!list_empty(>free)) { > >398 mdesc = list_first_entry(>free, struct > > hidma_desc, > >399 node); > > > >--- > >0-DAY kernel test infrastructureOpen Source Technology Center > >https://lists.01.org/pipermail/kbuild-all Intel Corporation > > > > > > -- > Sinan Kaya > Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux > Foundation Collaborative Project > ___ > kbuild-all mailing list > kbuild-...@lists.01.org > https://lists.01.org/mailman/listinfo/kbuild-all -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/