public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
@ 2021-10-27 15:03 Andy Shevchenko
  2021-10-27 23:15 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Andy Shevchenko @ 2021-10-27 15:03 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andrew Morton

When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/delay.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/delay.h b/include/linux/delay.h
index 1d0e2ce6b6d9..8eacf67eb212 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -19,7 +19,7 @@
  *   https://lists.openwall.net/linux-kernel/2011/01/09/56
  */
 
-#include <linux/kernel.h>
+#include <linux/math.h>
 
 extern unsigned long loops_per_jiffy;
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-27 15:03 [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions Andy Shevchenko
@ 2021-10-27 23:15 ` kernel test robot
  2021-10-27 23:43   ` Andrew Morton
  2021-10-28  2:36 ` kernel test robot
  2021-10-28 15:30 ` Guenter Roeck
  2 siblings, 1 reply; 13+ messages in thread
From: kernel test robot @ 2021-10-27 23:15 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel
  Cc: kbuild-all, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 2708 bytes --]

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on hnaz-mm/master linus/master v5.15-rc7 next-20211027]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/delay-Replace-kernel-h-with-the-necessary-inclusions/20211027-230458
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2f111a6fd5b5297b4e92f53798ca086f7c7d33a4
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/fd321f3d5b18ccab48b82ee4099ae79961067fdc
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andy-Shevchenko/delay-Replace-kernel-h-with-the-necessary-inclusions/20211027-230458
        git checkout fd321f3d5b18ccab48b82ee4099ae79961067fdc
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/media/dvb-frontends/cxd2880/cxd2880_common.c: In function 'cxd2880_convert2s_complement':
>> drivers/media/dvb-frontends/cxd2880/cxd2880_common.c:18:30: error: implicit declaration of function 'GENMASK' [-Werror=implicit-function-declaration]
      18 |                 return (int)(GENMASK(31, bitlen) | value);
         |                              ^~~~~~~
   cc1: all warnings being treated as errors


vim +/GENMASK +18 drivers/media/dvb-frontends/cxd2880/cxd2880_common.c

1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  11  
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  12  int cxd2880_convert2s_complement(u32 value, u32 bitlen)
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  13  {
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  14  	if (!bitlen || bitlen >= 32)
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  15  		return (int)value;
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  16  
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  17  	if (value & (u32)(1 << (bitlen - 1)))
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18 @18  		return (int)(GENMASK(31, bitlen) | value);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 61666 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-27 23:15 ` kernel test robot
@ 2021-10-27 23:43   ` Andrew Morton
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Morton @ 2021-10-27 23:43 UTC (permalink / raw)
  To: kernel test robot
  Cc: Andy Shevchenko, linux-kernel, kbuild-all,
	Linux Memory Management List

On Thu, 28 Oct 2021 07:15:13 +0800 kernel test robot <lkp@intel.com> wrote:

> Hi Andy,
> 
> I love your patch! Yet something to improve:

Thanks.

> [auto build test ERROR on linux/master]
> [also build test ERROR on hnaz-mm/master linus/master v5.15-rc7 next-20211027]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/delay-Replace-kernel-h-with-the-necessary-inclusions/20211027-230458
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2f111a6fd5b5297b4e92f53798ca086f7c7d33a4
> config: m68k-allmodconfig (attached as .config)
> compiler: m68k-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://github.com/0day-ci/linux/commit/fd321f3d5b18ccab48b82ee4099ae79961067fdc
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Andy-Shevchenko/delay-Replace-kernel-h-with-the-necessary-inclusions/20211027-230458
>         git checkout fd321f3d5b18ccab48b82ee4099ae79961067fdc
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/media/dvb-frontends/cxd2880/cxd2880_common.c: In function 'cxd2880_convert2s_complement':
> >> drivers/media/dvb-frontends/cxd2880/cxd2880_common.c:18:30: error: implicit declaration of function 'GENMASK' [-Werror=implicit-function-declaration]
>       18 |                 return (int)(GENMASK(31, bitlen) | value);
>          |                              ^~~~~~~

--- a/drivers/media/dvb-frontends/cxd2880/cxd2880_common.h~delay-replace-kernelh-with-the-necessary-inclusions-fix
+++ a/drivers/media/dvb-frontends/cxd2880/cxd2880_common.h
@@ -12,6 +12,7 @@
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/delay.h>
+#include <linux/bits.h>
 #include <linux/string.h>
 
 int cxd2880_convert2s_complement(u32 value, u32 bitlen);
_


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-27 15:03 [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions Andy Shevchenko
  2021-10-27 23:15 ` kernel test robot
@ 2021-10-28  2:36 ` kernel test robot
  2021-10-28 15:30 ` Guenter Roeck
  2 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2021-10-28  2:36 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel
  Cc: llvm, kbuild-all, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 2670 bytes --]

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.15-rc7 next-20211027]
[cannot apply to hnaz-mm/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/delay-Replace-kernel-h-with-the-necessary-inclusions/20211027-230458
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2f111a6fd5b5297b4e92f53798ca086f7c7d33a4
config: x86_64-randconfig-a004-20211027 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/fd321f3d5b18ccab48b82ee4099ae79961067fdc
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andy-Shevchenko/delay-Replace-kernel-h-with-the-necessary-inclusions/20211027-230458
        git checkout fd321f3d5b18ccab48b82ee4099ae79961067fdc
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/media/dvb-frontends/cxd2880/cxd2880_common.c:18:16: error: implicit declaration of function 'GENMASK' [-Werror,-Wimplicit-function-declaration]
                   return (int)(GENMASK(31, bitlen) | value);
                                ^
   1 error generated.


vim +/GENMASK +18 drivers/media/dvb-frontends/cxd2880/cxd2880_common.c

1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  11  
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  12  int cxd2880_convert2s_complement(u32 value, u32 bitlen)
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  13  {
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  14  	if (!bitlen || bitlen >= 32)
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  15  		return (int)value;
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  16  
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18  17  	if (value & (u32)(1 << (bitlen - 1)))
1a3ef038d09e66 Yasunari Takiguchi 2018-01-18 @18  		return (int)(GENMASK(31, bitlen) | value);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33334 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-27 15:03 [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions Andy Shevchenko
  2021-10-27 23:15 ` kernel test robot
  2021-10-28  2:36 ` kernel test robot
@ 2021-10-28 15:30 ` Guenter Roeck
  2021-10-28 15:58   ` Andy Shevchenko
  2 siblings, 1 reply; 13+ messages in thread
From: Guenter Roeck @ 2021-10-28 15:30 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andrew Morton

On Wed, Oct 27, 2021 at 06:03:24PM +0300, Andy Shevchenko wrote:
> When kernel.h is used in the headers it adds a lot into dependency hell,
> especially when there are circular dependencies are involved.
> 
> Replace kernel.h inclusion with the list of what is really being used.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

In next-20211028:

Building riscv32:defconfig ... failed
--------------
Error log:
arch/riscv/lib/delay.c: In function '__delay':
arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'

Building riscv:defconfig ... failed
--------------
Error log:
arch/riscv/lib/delay.c: In function '__delay':
arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'

Building s390:defconfig ... failed
--------------
Error log:
<stdin>:1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp]
In file included from arch/s390/pci/pci_insn.c:12:
arch/s390/include/asm/facility.h: In function '__stfle':
arch/s390/include/asm/facility.h:98:22: error: implicit declaration of function 'min_t'

bisect to this patch. Probably more, but it is difficult to find out
since -next is too badly broken and has build failures all over the place.

Guenter

> ---
>  include/linux/delay.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/delay.h b/include/linux/delay.h
> index 1d0e2ce6b6d9..8eacf67eb212 100644
> --- a/include/linux/delay.h
> +++ b/include/linux/delay.h
> @@ -19,7 +19,7 @@
>   *   https://lists.openwall.net/linux-kernel/2011/01/09/56
>   */
>  
> -#include <linux/kernel.h>
> +#include <linux/math.h>
>  
>  extern unsigned long loops_per_jiffy;
>  
> -- 
> 2.33.0
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-28 15:30 ` Guenter Roeck
@ 2021-10-28 15:58   ` Andy Shevchenko
  2021-10-28 16:28     ` Guenter Roeck
  0 siblings, 1 reply; 13+ messages in thread
From: Andy Shevchenko @ 2021-10-28 15:58 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, Andrew Morton

On Thu, Oct 28, 2021 at 08:30:55AM -0700, Guenter Roeck wrote:
> On Wed, Oct 27, 2021 at 06:03:24PM +0300, Andy Shevchenko wrote:
> > When kernel.h is used in the headers it adds a lot into dependency hell,
> > especially when there are circular dependencies are involved.
> > 
> > Replace kernel.h inclusion with the list of what is really being used.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> In next-20211028:
> 
> Building riscv32:defconfig ... failed
> --------------
> Error log:
> arch/riscv/lib/delay.c: In function '__delay':
> arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'
> 
> Building riscv:defconfig ... failed
> --------------
> Error log:
> arch/riscv/lib/delay.c: In function '__delay':
> arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'
> 
> Building s390:defconfig ... failed
> --------------
> Error log:
> <stdin>:1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp]
> In file included from arch/s390/pci/pci_insn.c:12:
> arch/s390/include/asm/facility.h: In function '__stfle':
> arch/s390/include/asm/facility.h:98:22: error: implicit declaration of function 'min_t'
> 
> bisect to this patch. Probably more, but it is difficult to find out
> since -next is too badly broken and has build failures all over the place.

Thanks for the report!

I have run it on x86_64 with `kcbench -m ...` and no failures.

Can you share all build errors you found so far? I believe none of them related
to x86* code.

Above just revealed the problematic places in the first place. Why the
programmers rely on delay.h to include full bloated header pile?! (Yeah, this
is rhetorical, so please share the errors, I'll try to address them)

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-28 15:58   ` Andy Shevchenko
@ 2021-10-28 16:28     ` Guenter Roeck
  2021-10-28 16:50       ` Andy Shevchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Guenter Roeck @ 2021-10-28 16:28 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andrew Morton

On Thu, Oct 28, 2021 at 06:58:13PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 28, 2021 at 08:30:55AM -0700, Guenter Roeck wrote:
> > On Wed, Oct 27, 2021 at 06:03:24PM +0300, Andy Shevchenko wrote:
> > > When kernel.h is used in the headers it adds a lot into dependency hell,
> > > especially when there are circular dependencies are involved.
> > > 
> > > Replace kernel.h inclusion with the list of what is really being used.
> > > 
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 
> > In next-20211028:
> > 
> > Building riscv32:defconfig ... failed
> > --------------
> > Error log:
> > arch/riscv/lib/delay.c: In function '__delay':
> > arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'
> > 
> > Building riscv:defconfig ... failed
> > --------------
> > Error log:
> > arch/riscv/lib/delay.c: In function '__delay':
> > arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'
> > 
> > Building s390:defconfig ... failed
> > --------------
> > Error log:
> > <stdin>:1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp]
> > In file included from arch/s390/pci/pci_insn.c:12:
> > arch/s390/include/asm/facility.h: In function '__stfle':
> > arch/s390/include/asm/facility.h:98:22: error: implicit declaration of function 'min_t'
> > 
> > bisect to this patch. Probably more, but it is difficult to find out
> > since -next is too badly broken and has build failures all over the place.
> 
> Thanks for the report!
> 
> I have run it on x86_64 with `kcbench -m ...` and no failures.
> 
> Can you share all build errors you found so far? I believe none of them related
> to x86* code.
> 
> Above just revealed the problematic places in the first place. Why the
> programmers rely on delay.h to include full bloated header pile?! (Yeah, this
> is rhetorical, so please share the errors, I'll try to address them)
> 

The ones listed above are the ones I was able to identify. As I said, there
are so many compile and runtime failures in linux-next that it is difficult
to track down individual failures. Just to give you an idea (this is for
next-20211028):

Build results:
	total: 153 pass: 115 fail: 38
Failed builds:
	alpha:allmodconfig
	arm:allmodconfig
	arm:omap2plus_defconfig
	arm:davinci_all_defconfig
	arm64:defconfig
	arm64:allmodconfig
	csky:allmodconfig
	h8300:allnoconfig
	h8300:tinyconfig
	h8300:edosk2674_defconfig
	h8300:h8300h-sim_defconfig
	h8300:h8s-sim_defconfig
	m68k:allmodconfig
	mips:defconfig
	mips:allmodconfig
	mips:allnoconfig
	mips:tinyconfig
	mips:bcm47xx_defconfig
	mips:bcm63xx_defconfig
	mips:ath79_defconfig
	mips:ar7_defconfig
	mips:e55_defconfig
	mips:cavium_octeon_defconfig
	mips:malta_defconfig
	mips:rt305x_defconfig
	nds32:allmodconfig
	parisc:allmodconfig
	parisc:generic-32bit_defconfig
	parisc64:generic-64bit_defconfig
	powerpc:allmodconfig
	riscv32:defconfig
	riscv32:allmodconfig
	riscv:defconfig
	riscv:allmodconfig
	s390:defconfig
	s390:allmodconfig
	sparc64:allmodconfig
	xtensa:allmodconfig
Qemu test results:
	total: 480 pass: 315 fail: 165
Failed tests:
	<too many to list them all>

Build and boot logs are as always at https://kerneltests.org/builders
in the 'next' column in case you want to do some digging yourself.

Guenter

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-28 16:28     ` Guenter Roeck
@ 2021-10-28 16:50       ` Andy Shevchenko
  2021-10-28 16:52         ` Andy Shevchenko
  2021-10-28 17:06         ` Guenter Roeck
  0 siblings, 2 replies; 13+ messages in thread
From: Andy Shevchenko @ 2021-10-28 16:50 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, Andrew Morton

On Thu, Oct 28, 2021 at 09:28:10AM -0700, Guenter Roeck wrote:
> On Thu, Oct 28, 2021 at 06:58:13PM +0300, Andy Shevchenko wrote:
> > On Thu, Oct 28, 2021 at 08:30:55AM -0700, Guenter Roeck wrote:
> > > On Wed, Oct 27, 2021 at 06:03:24PM +0300, Andy Shevchenko wrote:
> > > > When kernel.h is used in the headers it adds a lot into dependency hell,
> > > > especially when there are circular dependencies are involved.
> > > > 
> > > > Replace kernel.h inclusion with the list of what is really being used.
> > > > 
> > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > 
> > > In next-20211028:
> > > 
> > > Building riscv32:defconfig ... failed
> > > --------------
> > > Error log:
> > > arch/riscv/lib/delay.c: In function '__delay':
> > > arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'
> > > 
> > > Building riscv:defconfig ... failed
> > > --------------
> > > Error log:
> > > arch/riscv/lib/delay.c: In function '__delay':
> > > arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'
> > > 
> > > Building s390:defconfig ... failed
> > > --------------
> > > Error log:
> > > <stdin>:1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp]
> > > In file included from arch/s390/pci/pci_insn.c:12:
> > > arch/s390/include/asm/facility.h: In function '__stfle':
> > > arch/s390/include/asm/facility.h:98:22: error: implicit declaration of function 'min_t'
> > > 
> > > bisect to this patch. Probably more, but it is difficult to find out
> > > since -next is too badly broken and has build failures all over the place.
> > 
> > Thanks for the report!

I'll send the fix for above soon. Hope it will reduce amount of failures.

> > I have run it on x86_64 with `kcbench -m ...` and no failures.
> > 
> > Can you share all build errors you found so far? I believe none of them related
> > to x86* code.
> > 
> > Above just revealed the problematic places in the first place. Why the
> > programmers rely on delay.h to include full bloated header pile?! (Yeah, this
> > is rhetorical, so please share the errors, I'll try to address them)
> 
> The ones listed above are the ones I was able to identify. As I said, there
> are so many compile and runtime failures in linux-next that it is difficult
> to track down individual failures.

Yeah, for example, I looked into this: https://kerneltests.org/builders/next-mips-next/builds/698/steps/buildcommand/logs/stdio

I can't see how my patch is related to this...

> Just to give you an idea (this is for
> next-20211028):
> 
> Build results:
> 	total: 153 pass: 115 fail: 38
> Failed builds:
> 	alpha:allmodconfig
> 	arm:allmodconfig
> 	arm:omap2plus_defconfig
> 	arm:davinci_all_defconfig
> 	arm64:defconfig
> 	arm64:allmodconfig
> 	csky:allmodconfig
> 	h8300:allnoconfig
> 	h8300:tinyconfig
> 	h8300:edosk2674_defconfig
> 	h8300:h8300h-sim_defconfig
> 	h8300:h8s-sim_defconfig
> 	m68k:allmodconfig
> 	mips:defconfig
> 	mips:allmodconfig
> 	mips:allnoconfig
> 	mips:tinyconfig
> 	mips:bcm47xx_defconfig
> 	mips:bcm63xx_defconfig
> 	mips:ath79_defconfig
> 	mips:ar7_defconfig
> 	mips:e55_defconfig
> 	mips:cavium_octeon_defconfig
> 	mips:malta_defconfig
> 	mips:rt305x_defconfig
> 	nds32:allmodconfig
> 	parisc:allmodconfig
> 	parisc:generic-32bit_defconfig
> 	parisc64:generic-64bit_defconfig
> 	powerpc:allmodconfig
> 	riscv32:defconfig
> 	riscv32:allmodconfig
> 	riscv:defconfig
> 	riscv:allmodconfig
> 	s390:defconfig
> 	s390:allmodconfig
> 	sparc64:allmodconfig
> 	xtensa:allmodconfig
> Qemu test results:
> 	total: 480 pass: 315 fail: 165
> Failed tests:
> 	<too many to list them all>
> 
> Build and boot logs are as always at https://kerneltests.org/builders
> in the 'next' column in case you want to do some digging yourself.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-28 16:50       ` Andy Shevchenko
@ 2021-10-28 16:52         ` Andy Shevchenko
  2021-10-28 17:00           ` Andy Shevchenko
  2021-10-28 17:06         ` Guenter Roeck
  1 sibling, 1 reply; 13+ messages in thread
From: Andy Shevchenko @ 2021-10-28 16:52 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, Andrew Morton

On Thu, Oct 28, 2021 at 07:50:03PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 28, 2021 at 09:28:10AM -0700, Guenter Roeck wrote:
> > On Thu, Oct 28, 2021 at 06:58:13PM +0300, Andy Shevchenko wrote:

...

> > Build results:
> > 	total: 153 pass: 115 fail: 38

> > Qemu test results:
> > 	total: 480 pass: 315 fail: 165

FWIW, most of them on the first glance due to something like below

<stdin>:1517:2: warning: #warning syscall clone3 not implemented [-Wcpp]
samples/fanotify/fs-monitor.c:7:10: fatal error: errno.h: No such file or directory
7 | #include <errno.h>
  |          ^~~~~~~~~

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-28 16:52         ` Andy Shevchenko
@ 2021-10-28 17:00           ` Andy Shevchenko
  2021-10-28 17:16             ` Guenter Roeck
  2021-10-28 17:29             ` Guenter Roeck
  0 siblings, 2 replies; 13+ messages in thread
From: Andy Shevchenko @ 2021-10-28 17:00 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, Andrew Morton

On Thu, Oct 28, 2021 at 07:52:12PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 28, 2021 at 07:50:03PM +0300, Andy Shevchenko wrote:
> > On Thu, Oct 28, 2021 at 09:28:10AM -0700, Guenter Roeck wrote:
> > > On Thu, Oct 28, 2021 at 06:58:13PM +0300, Andy Shevchenko wrote:
> 
> ...
> 
> > > Build results:
> > > 	total: 153 pass: 115 fail: 38
> 
> > > Qemu test results:
> > > 	total: 480 pass: 315 fail: 165
> 
> FWIW, most of them on the first glance due to something like below
> 
> <stdin>:1517:2: warning: #warning syscall clone3 not implemented [-Wcpp]
> samples/fanotify/fs-monitor.c:7:10: fatal error: errno.h: No such file or directory
> 7 | #include <errno.h>
>   |          ^~~~~~~~~

I have briefly looked at the logs (stdio) and potentially my patch might brake
h8300 and parisc, the rest as pointed above (have no idea if my patch anyhow
may be involved to that).

Hence, will sent only fix for what you bisected.

Thanks!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-28 16:50       ` Andy Shevchenko
  2021-10-28 16:52         ` Andy Shevchenko
@ 2021-10-28 17:06         ` Guenter Roeck
  1 sibling, 0 replies; 13+ messages in thread
From: Guenter Roeck @ 2021-10-28 17:06 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andrew Morton

On 10/28/21 9:50 AM, Andy Shevchenko wrote:
> On Thu, Oct 28, 2021 at 09:28:10AM -0700, Guenter Roeck wrote:
>> On Thu, Oct 28, 2021 at 06:58:13PM +0300, Andy Shevchenko wrote:
>>> On Thu, Oct 28, 2021 at 08:30:55AM -0700, Guenter Roeck wrote:
>>>> On Wed, Oct 27, 2021 at 06:03:24PM +0300, Andy Shevchenko wrote:
>>>>> When kernel.h is used in the headers it adds a lot into dependency hell,
>>>>> especially when there are circular dependencies are involved.
>>>>>
>>>>> Replace kernel.h inclusion with the list of what is really being used.
>>>>>
>>>>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>>>
>>>> In next-20211028:
>>>>
>>>> Building riscv32:defconfig ... failed
>>>> --------------
>>>> Error log:
>>>> arch/riscv/lib/delay.c: In function '__delay':
>>>> arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'
>>>>
>>>> Building riscv:defconfig ... failed
>>>> --------------
>>>> Error log:
>>>> arch/riscv/lib/delay.c: In function '__delay':
>>>> arch/riscv/lib/delay.c:77:17: error: implicit declaration of function 'cpu_relax'
>>>>
>>>> Building s390:defconfig ... failed
>>>> --------------
>>>> Error log:
>>>> <stdin>:1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp]
>>>> In file included from arch/s390/pci/pci_insn.c:12:
>>>> arch/s390/include/asm/facility.h: In function '__stfle':
>>>> arch/s390/include/asm/facility.h:98:22: error: implicit declaration of function 'min_t'
>>>>
>>>> bisect to this patch. Probably more, but it is difficult to find out
>>>> since -next is too badly broken and has build failures all over the place.
>>>
>>> Thanks for the report!
> 
> I'll send the fix for above soon. Hope it will reduce amount of failures.
> 
>>> I have run it on x86_64 with `kcbench -m ...` and no failures.
>>>
>>> Can you share all build errors you found so far? I believe none of them related
>>> to x86* code.
>>>
>>> Above just revealed the problematic places in the first place. Why the
>>> programmers rely on delay.h to include full bloated header pile?! (Yeah, this
>>> is rhetorical, so please share the errors, I'll try to address them)
>>
>> The ones listed above are the ones I was able to identify. As I said, there
>> are so many compile and runtime failures in linux-next that it is difficult
>> to track down individual failures.
> 
> Yeah, for example, I looked into this: https://kerneltests.org/builders/next-mips-next/builds/698/steps/buildcommand/logs/stdio
> 
> I can't see how my patch is related to this...
> 

The missing errno.h in that log is due to missing dependencies in the
fanotify patch - it causes build failures whenever a toolchain without
C library support is used to build the kernel. I already reported this.

The unused variable error bisects to 'irq: mips: simplify do_domain_IRQ()'.
I'll send a report as response to that patch in a minute.

It all adds up ... there seem to be a lot of last minute changes in -next.

Guenter

>> Just to give you an idea (this is for
>> next-20211028):
>>
>> Build results:
>> 	total: 153 pass: 115 fail: 38
>> Failed builds:
>> 	alpha:allmodconfig
>> 	arm:allmodconfig
>> 	arm:omap2plus_defconfig
>> 	arm:davinci_all_defconfig
>> 	arm64:defconfig
>> 	arm64:allmodconfig
>> 	csky:allmodconfig
>> 	h8300:allnoconfig
>> 	h8300:tinyconfig
>> 	h8300:edosk2674_defconfig
>> 	h8300:h8300h-sim_defconfig
>> 	h8300:h8s-sim_defconfig
>> 	m68k:allmodconfig
>> 	mips:defconfig
>> 	mips:allmodconfig
>> 	mips:allnoconfig
>> 	mips:tinyconfig
>> 	mips:bcm47xx_defconfig
>> 	mips:bcm63xx_defconfig
>> 	mips:ath79_defconfig
>> 	mips:ar7_defconfig
>> 	mips:e55_defconfig
>> 	mips:cavium_octeon_defconfig
>> 	mips:malta_defconfig
>> 	mips:rt305x_defconfig
>> 	nds32:allmodconfig
>> 	parisc:allmodconfig
>> 	parisc:generic-32bit_defconfig
>> 	parisc64:generic-64bit_defconfig
>> 	powerpc:allmodconfig
>> 	riscv32:defconfig
>> 	riscv32:allmodconfig
>> 	riscv:defconfig
>> 	riscv:allmodconfig
>> 	s390:defconfig
>> 	s390:allmodconfig
>> 	sparc64:allmodconfig
>> 	xtensa:allmodconfig
>> Qemu test results:
>> 	total: 480 pass: 315 fail: 165
>> Failed tests:
>> 	<too many to list them all>
>>
>> Build and boot logs are as always at https://kerneltests.org/builders
>> in the 'next' column in case you want to do some digging yourself.
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-28 17:00           ` Andy Shevchenko
@ 2021-10-28 17:16             ` Guenter Roeck
  2021-10-28 17:29             ` Guenter Roeck
  1 sibling, 0 replies; 13+ messages in thread
From: Guenter Roeck @ 2021-10-28 17:16 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andrew Morton

On 10/28/21 10:00 AM, Andy Shevchenko wrote:
> On Thu, Oct 28, 2021 at 07:52:12PM +0300, Andy Shevchenko wrote:
>> On Thu, Oct 28, 2021 at 07:50:03PM +0300, Andy Shevchenko wrote:
>>> On Thu, Oct 28, 2021 at 09:28:10AM -0700, Guenter Roeck wrote:
>>>> On Thu, Oct 28, 2021 at 06:58:13PM +0300, Andy Shevchenko wrote:
>>
>> ...
>>
>>>> Build results:
>>>> 	total: 153 pass: 115 fail: 38
>>
>>>> Qemu test results:
>>>> 	total: 480 pass: 315 fail: 165
>>
>> FWIW, most of them on the first glance due to something like below
>>
>> <stdin>:1517:2: warning: #warning syscall clone3 not implemented [-Wcpp]
>> samples/fanotify/fs-monitor.c:7:10: fatal error: errno.h: No such file or directory
>> 7 | #include <errno.h>
>>    |          ^~~~~~~~~
> 
> I have briefly looked at the logs (stdio) and potentially my patch might brake
> h8300 and parisc, the rest as pointed above (have no idea if my patch anyhow
> may be involved to that).
> 

I am currently running a bisect on the parisc failure. You are right, h8300
looks suspicious as well. I'll bisect that as well after the parisc bisect
is complete. I'll let you know once I have results.

Guenter

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions
  2021-10-28 17:00           ` Andy Shevchenko
  2021-10-28 17:16             ` Guenter Roeck
@ 2021-10-28 17:29             ` Guenter Roeck
  1 sibling, 0 replies; 13+ messages in thread
From: Guenter Roeck @ 2021-10-28 17:29 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andrew Morton

On 10/28/21 10:00 AM, Andy Shevchenko wrote:
> On Thu, Oct 28, 2021 at 07:52:12PM +0300, Andy Shevchenko wrote:
>> On Thu, Oct 28, 2021 at 07:50:03PM +0300, Andy Shevchenko wrote:
>>> On Thu, Oct 28, 2021 at 09:28:10AM -0700, Guenter Roeck wrote:
>>>> On Thu, Oct 28, 2021 at 06:58:13PM +0300, Andy Shevchenko wrote:
>>
>> ...
>>
>>>> Build results:
>>>> 	total: 153 pass: 115 fail: 38
>>
>>>> Qemu test results:
>>>> 	total: 480 pass: 315 fail: 165
>>
>> FWIW, most of them on the first glance due to something like below
>>
>> <stdin>:1517:2: warning: #warning syscall clone3 not implemented [-Wcpp]
>> samples/fanotify/fs-monitor.c:7:10: fatal error: errno.h: No such file or directory
>> 7 | #include <errno.h>
>>    |          ^~~~~~~~~
> 
> I have briefly looked at the logs (stdio) and potentially my patch might brake
> h8300 and parisc, the rest as pointed above (have no idea if my patch anyhow
> may be involved to that).
> 
> Hence, will sent only fix for what you bisected.
> 

The h8300 failure bisects to "irqchip: Provide stronger type checking for
IRQCHIP_MATCH/IRQCHIP_DECLARE". I'll report that as reponse to that patch.

The parisc build failure bisects to "Merge branch 'for-next/kspp' of
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git"
which of course is always a bad sign. I may not be able to track that
down until it shows up in mainline.

Guenter

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-10-28 17:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-27 15:03 [PATCH v1 1/1] delay: Replace kernel.h with the necessary inclusions Andy Shevchenko
2021-10-27 23:15 ` kernel test robot
2021-10-27 23:43   ` Andrew Morton
2021-10-28  2:36 ` kernel test robot
2021-10-28 15:30 ` Guenter Roeck
2021-10-28 15:58   ` Andy Shevchenko
2021-10-28 16:28     ` Guenter Roeck
2021-10-28 16:50       ` Andy Shevchenko
2021-10-28 16:52         ` Andy Shevchenko
2021-10-28 17:00           ` Andy Shevchenko
2021-10-28 17:16             ` Guenter Roeck
2021-10-28 17:29             ` Guenter Roeck
2021-10-28 17:06         ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox