Message ID | 20211013170417.87909-5-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1mahg6-000fjQ-Ix; Wed, 13 Oct 2021 17:04:30 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237972AbhJMRGb (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Wed, 13 Oct 2021 13:06:31 -0400 Received: from mga01.intel.com ([192.55.52.88]:17602 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237682AbhJMRG0 (ORCPT <rfc822;linux-media@vger.kernel.org>); Wed, 13 Oct 2021 13:06:26 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="250904586" X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="250904586" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 10:04:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="592250528" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 13 Oct 2021 10:04:16 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id BD8E837B; Wed, 13 Oct 2021 20:04:23 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-media@vger.kernel.org Cc: Brendan Higgins <brendanhiggins@google.com>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>, Waiman Long <longman@redhat.com>, Boqun Feng <boqun.feng@gmail.com>, Sakari Ailus <sakari.ailus@linux.intel.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>, jic23@kernel.org, linux@rasmusvillemoes.dk, Thorsten Leemhuis <regressions@leemhuis.info> Subject: [PATCH v5 4/7] list: Replace kernel.h with the necessary inclusions Date: Wed, 13 Oct 2021 20:04:14 +0300 Message-Id: <20211013170417.87909-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211013170417.87909-1-andriy.shevchenko@linux.intel.com> References: <20211013170417.87909-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -4.7 (----) X-LSpam-Report: No, score=-4.7 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no |
Series |
kernel.h further split
|
|
Commit Message
Andy Shevchenko
Oct. 13, 2021, 5:04 p.m. UTC
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/list.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/locking/core]
[also build test ERROR on media-tree/master linux/master linus/master v5.15-rc5 next-20211013]
[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/kernel-h-further-split/20211014-010532
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git dd0aa2cd2e9e3e49b8c3b43924dc1a1d4e22b4d1
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/4797f8ad0f7b6807a7af02543f77c0ee1b340537
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/kernel-h-further-split/20211014-010532
git checkout 4797f8ad0f7b6807a7af02543f77c0ee1b340537
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=x86_64 prepare
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 >>):
arch/x86/um/Makefile:44: FORCE prerequisite is missing
In file included from include/linux/rcupdate.h:28,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
from arch/um/kernel/asm-offsets.c:1:
include/linux/bottom_half.h: In function 'local_bh_disable':
>> include/linux/bottom_half.h:19:24: error: '_THIS_IP_' undeclared (first use in this function)
19 | __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
| ^~~~~~~~~
include/linux/bottom_half.h:19:24: note: each undeclared identifier is reported only once for each function it appears in
include/linux/bottom_half.h: In function 'local_bh_enable':
include/linux/bottom_half.h:32:23: error: '_THIS_IP_' undeclared (first use in this function)
32 | __local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
| ^~~~~~~~~
In file included from arch/um/kernel/asm-offsets.c:1:
arch/x86/um/shared/sysdep/kernel-offsets.h: At top level:
arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
9 | void foo(void)
| ^~~
make[2]: *** [scripts/Makefile.build:121: arch/um/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1225: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/_THIS_IP_ +19 include/linux/bottom_half.h
0bd3a173d71185 Peter Zijlstra 2013-11-19 16
0bd3a173d71185 Peter Zijlstra 2013-11-19 17 static inline void local_bh_disable(void)
0bd3a173d71185 Peter Zijlstra 2013-11-19 18 {
0bd3a173d71185 Peter Zijlstra 2013-11-19 @19 __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
0bd3a173d71185 Peter Zijlstra 2013-11-19 20 }
0bd3a173d71185 Peter Zijlstra 2013-11-19 21
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/locking/core]
[also build test ERROR on media-tree/master linux/master linus/master v5.15-rc5 next-20211013]
[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/kernel-h-further-split/20211014-010532
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git dd0aa2cd2e9e3e49b8c3b43924dc1a1d4e22b4d1
config: riscv-randconfig-r031-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a8c695542b2987eb9a203d5663a0740cb4725f)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/4797f8ad0f7b6807a7af02543f77c0ee1b340537
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/kernel-h-further-split/20211014-010532
git checkout 4797f8ad0f7b6807a7af02543f77c0ee1b340537
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv prepare
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 >>):
In file included from arch/riscv/kernel/asm-offsets.c:10:
In file included from include/linux/sched.h:14:
In file included from include/linux/pid.h:5:
In file included from include/linux/rculist.h:11:
In file included from include/linux/rcupdate.h:28:
>> include/linux/bottom_half.h:19:24: error: use of undeclared identifier '_THIS_IP_'
__local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
^
include/linux/bottom_half.h:32:23: error: use of undeclared identifier '_THIS_IP_'
__local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
^
2 errors generated.
make[2]: *** [scripts/Makefile.build:121: arch/riscv/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1225: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/_THIS_IP_ +19 include/linux/bottom_half.h
0bd3a173d71185 Peter Zijlstra 2013-11-19 16
0bd3a173d71185 Peter Zijlstra 2013-11-19 17 static inline void local_bh_disable(void)
0bd3a173d71185 Peter Zijlstra 2013-11-19 18 {
0bd3a173d71185 Peter Zijlstra 2013-11-19 @19 __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
0bd3a173d71185 Peter Zijlstra 2013-11-19 20 }
0bd3a173d71185 Peter Zijlstra 2013-11-19 21
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/include/linux/list.h b/include/linux/list.h index f2af4b4aa4e9..6636fc07f918 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -2,11 +2,13 @@ #ifndef _LINUX_LIST_H #define _LINUX_LIST_H +#include <linux/container_of.h> #include <linux/types.h> #include <linux/stddef.h> #include <linux/poison.h> #include <linux/const.h> -#include <linux/kernel.h> + +#include <asm/barrier.h> /* * Circular doubly linked list implementation.