Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1267941

Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver
Date 2015-11-12 14:50 +0100
Message-ID <qu0qf-16P-35@gated-at.bofh.it> (permalink)
References <qsDFp-4dG-33@gated-at.bofh.it> <qtzgl-oH-1@gated-at.bofh.it> <qtVqx-6ta-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel  driver Sinan Kaya <okaya@codeaurora.org> - 2015-11-09 01:50 +0100
  Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA  channel driver Fengguang Wu <lkp@intel.com> - 2015-11-11 03:30 +0100
    Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver Arnd Bergmann <arnd@arndb.de> - 2015-11-11 09:50 +0100
      Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA  channel driver Fengguang Wu <lkp@intel.com> - 2015-11-12 09:30 +0100
        Re: [kbuild-all] [PATCH V3 4/4] dma: add Qualcomm Technologies HIDMA channel driver Arnd Bergmann <arnd@arndb.de> - 2015-11-12 14:50 +0100

csiph-web