Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1726646 > unrolled thread
| Started by | Tobias Klauser <tklauser@distanz.ch> |
|---|---|
| First post | 2017-09-05 13:40 +0200 |
| Last post | 2017-09-08 10:30 +0200 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h Tobias Klauser <tklauser@distanz.ch> - 2017-09-05 13:40 +0200
Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h Arnd Bergmann <arnd@arndb.de> - 2017-09-05 17:20 +0200
Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h Tobias Klauser <tklauser@distanz.ch> - 2017-09-05 17:30 +0200
Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h Arnd Bergmann <arnd@arndb.de> - 2017-09-05 22:50 +0200
Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h kbuild test robot <lkp@intel.com> - 2017-09-07 21:40 +0200
Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h Tobias Klauser <tklauser@distanz.ch> - 2017-09-08 10:30 +0200
| From | Tobias Klauser <tklauser@distanz.ch> |
|---|---|
| Date | 2017-09-05 13:40 +0200 |
| Subject | [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h |
| Message-ID | <umkmZ-24T-1@gated-at.bofh.it> |
Including linux/vmalloc.h in asm-generic/io.h isn't necessary since none of the definitions are used in the header itself. Remove the include in order to avoid potential header dependency problems if other headers rely on implict inclusion of linux/vmalloc.h which means that changes there could break unrelated parts. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> --- include/asm-generic/io.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index b4531e3b2120..d2d3bd163f5f 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -764,7 +764,6 @@ static inline void iowrite64_rep(volatile void __iomem *addr, #ifdef __KERNEL__ -#include <linux/vmalloc.h> #define __io_virt(x) ((void __force *)(x)) #ifndef CONFIG_GENERIC_IOMAP -- 2.13.0
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-09-05 17:20 +0200 |
| Message-ID | <umnNU-4n9-1@gated-at.bofh.it> |
| In reply to | #1726646 |
On Tue, Sep 5, 2017 at 1:27 PM, Tobias Klauser <tklauser@distanz.ch> wrote:
> Including linux/vmalloc.h in asm-generic/io.h isn't necessary since none
> of the definitions are used in the header itself. Remove the include in
> order to avoid potential header dependency problems if other headers
> rely on implict inclusion of linux/vmalloc.h which means that changes
> there could break unrelated parts.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
> include/asm-generic/io.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
> index b4531e3b2120..d2d3bd163f5f 100644
> --- a/include/asm-generic/io.h
> +++ b/include/asm-generic/io.h
> @@ -764,7 +764,6 @@ static inline void iowrite64_rep(volatile void __iomem *addr,
>
> #ifdef __KERNEL__
>
> -#include <linux/vmalloc.h>
> #define __io_virt(x) ((void __force *)(x))
>
> #ifndef CONFIG_GENERIC_IOMAP
This seems like a good idea in principle, but I think it needs to be tested
well before we apply it, to avoid breaking random drivers that forgot to
add their own includes of that header.
I've added your patch to my testing queue, but not to the asm-generic
tree now. We should see if it leads to any randconfig build regressions
on the architectures I normally test.
Did you run into a specific problem with the #include, or did it just occur
to you that it might help in general?
Arnd
[toc] | [prev] | [next] | [standalone]
| From | Tobias Klauser <tklauser@distanz.ch> |
|---|---|
| Date | 2017-09-05 17:30 +0200 |
| Subject | Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h |
| Message-ID | <umnXA-4qV-11@gated-at.bofh.it> |
| In reply to | #1726813 |
On 2017-09-05 at 17:11:50 +0200, Arnd Bergmann <arnd@arndb.de> wrote: > On Tue, Sep 5, 2017 at 1:27 PM, Tobias Klauser <tklauser@distanz.ch> wrote: > > Including linux/vmalloc.h in asm-generic/io.h isn't necessary since none > > of the definitions are used in the header itself. Remove the include in > > order to avoid potential header dependency problems if other headers > > rely on implict inclusion of linux/vmalloc.h which means that changes > > there could break unrelated parts. > > > > Signed-off-by: Tobias Klauser <tklauser@distanz.ch> > > --- > > include/asm-generic/io.h | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h > > index b4531e3b2120..d2d3bd163f5f 100644 > > --- a/include/asm-generic/io.h > > +++ b/include/asm-generic/io.h > > @@ -764,7 +764,6 @@ static inline void iowrite64_rep(volatile void __iomem *addr, > > > > #ifdef __KERNEL__ > > > > -#include <linux/vmalloc.h> > > #define __io_virt(x) ((void __force *)(x)) > > > > #ifndef CONFIG_GENERIC_IOMAP > > This seems like a good idea in principle, but I think it needs to be tested > well before we apply it, to avoid breaking random drivers that forgot to > add their own includes of that header. Yes, this certainly needs extensive testing. I already did several randconfig builds on multiple platforms locally. Also, I sent the same patch a while ago to LKML already as a fix (which wasn't sufficient) [1] in order to get the kbuild test bot to test it ;) [1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1392578.html And indeed, the kbuild test bot failed on multiple drivers as a result of me submitting this patch back then and I successively sent patches to fix the fallout. Now all of them are merged. > I've added your patch to my testing queue, but not to the asm-generic > tree now. We should see if it leads to any randconfig build regressions > on the architectures I normally test. Thanks! > Did you run into a specific problem with the #include, or did it just occur > to you that it might help in general? See above. Sorry, I should have mentioned it in the original patch submission but I forgot about the full history and only tried to reconstruct it now that you asked ;) Tobias
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-09-05 22:50 +0200 |
| Message-ID | <umsXf-7Mz-3@gated-at.bofh.it> |
| In reply to | #1726818 |
On Tue, Sep 5, 2017 at 5:21 PM, Tobias Klauser <tklauser@distanz.ch> wrote:
> On 2017-09-05 at 17:11:50 +0200, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Tue, Sep 5, 2017 at 1:27 PM, Tobias Klauser <tklauser@distanz.ch> wrote:
>> > Including linux/vmalloc.h in asm-generic/io.h isn't necessary since none
>> > of the definitions are used in the header itself. Remove the include in
>> > order to avoid potential header dependency problems if other headers
>> > rely on implict inclusion of linux/vmalloc.h which means that changes
>> > there could break unrelated parts.
>> >
>> > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
>> > ---
>> > include/asm-generic/io.h | 1 -
>> > 1 file changed, 1 deletion(-)
>> >
>> > diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
>> > index b4531e3b2120..d2d3bd163f5f 100644
>> > --- a/include/asm-generic/io.h
>> > +++ b/include/asm-generic/io.h
>> > @@ -764,7 +764,6 @@ static inline void iowrite64_rep(volatile void __iomem *addr,
>> >
>> > #ifdef __KERNEL__
>> >
>> > -#include <linux/vmalloc.h>
>> > #define __io_virt(x) ((void __force *)(x))
>> >
>> > #ifndef CONFIG_GENERIC_IOMAP
>>
>> This seems like a good idea in principle, but I think it needs to be tested
>> well before we apply it, to avoid breaking random drivers that forgot to
>> add their own includes of that header.
>
> Yes, this certainly needs extensive testing. I already did several
> randconfig builds on multiple platforms locally. Also, I sent the same
> patch a while ago to LKML already as a fix (which wasn't sufficient) [1]
> in order to get the kbuild test bot to test it ;)
>
> [1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1392578.html
>
> And indeed, the kbuild test bot failed on multiple drivers as a result
> of me submitting this patch back then and I successively sent patches to
> fix the fallout. Now all of them are merged.
I've done around 200 randconfig builds (x86, arm and arm64) now and
found two new issues so far, there will probably be a couple more, but
I can take care of the ones in arch/arm/mach-*/.
Arnd
commit ac5fa2421993e6372214b95b533592a8be65fb49
Author: Arnd Bergmann <arnd@arndb.de>
Date: Tue Sep 5 21:13:58 2017 +0200
ARM: add missing include statements
After removing linux/vmalloc.h from asm-generic/io.h, a few other
files fail:
arch/arm/mach-shmobile/pm-r8a7779.c:35:13: error: expected '=',
',', ';', 'asm' or '__attribute__' before 'r8a7779_pm_init'
void __init r8a7779_pm_init(void)
^~~~~~~~~~~~~~~
scripts/Makefile.build:311: recipe for target
'arch/arm/mach-shmobile/pm-r8a7779.o' failed
In file included from arch/arm/mach-imx/devices/../mx3x.h:146:0,
from arch/arm/mach-imx/devices/../hardware.h:109,
from arch/arm/mach-imx/devices/platform-flexcan.c:8:
arch/arm/include/asm/irq.h:39:50: error: unknown type name 'cpumask_t'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index e53638c8ed8a..6095a1649865 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -22,6 +22,8 @@
#endif
#ifndef __ASSEMBLY__
+#include <linux/cpumask.h>
+
struct irqaction;
struct pt_regs;
extern void migrate_irqs(void);
diff --git a/arch/arm/mach-shmobile/pm-r8a7779.c
b/arch/arm/mach-shmobile/pm-r8a7779.c
index 5c9a93f5e650..a891101e0a85 100644
--- a/arch/arm/mach-shmobile/pm-r8a7779.c
+++ b/arch/arm/mach-shmobile/pm-r8a7779.c
@@ -10,7 +10,7 @@
*/
#include <linux/soc/renesas/rcar-sysc.h>
-
+#include <linux/init.h>
#include <asm/io.h>
#include "r8a7779.h"
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2017-09-07 21:40 +0200 |
| Subject | Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h |
| Message-ID | <unaOC-4wU-7@gated-at.bofh.it> |
| In reply to | #1726646 |
[Multipart message — attachments visible in raw view] — view raw
Hi Tobias,
[auto build test WARNING on v4.13]
[also build test WARNING on next-20170907]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Tobias-Klauser/asm-generic-io-h-remove-unnecessary-include-of-linux-vmalloc-h/20170908-012111
config: openrisc-or1ksim_defconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 5.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=openrisc
All warnings (new ones prefixed by >>):
In file included from arch/openrisc/include/asm/io.h:33:0,
from include/linux/io.h:25,
from drivers/tty/serial/earlycon.c:19:
>> arch/openrisc/include/asm/pgtable.h:424:2: warning: 'struct vm_area_struct' declared inside parameter list
unsigned long address, pte_t *pte)
^
>> arch/openrisc/include/asm/pgtable.h:424:2: warning: its scope is only this definition or declaration, which is probably not what you want
vim +424 arch/openrisc/include/asm/pgtable.h
61e85e36 Jonas Bonn 2011-06-04 416
61e85e36 Jonas Bonn 2011-06-04 417 /*
61e85e36 Jonas Bonn 2011-06-04 418 * or32 doesn't have any external MMU info: the kernel page
61e85e36 Jonas Bonn 2011-06-04 419 * tables contain all the necessary information.
61e85e36 Jonas Bonn 2011-06-04 420 *
61e85e36 Jonas Bonn 2011-06-04 421 * Actually I am not sure on what this could be used for.
61e85e36 Jonas Bonn 2011-06-04 422 */
61e85e36 Jonas Bonn 2011-06-04 423 static inline void update_mmu_cache(struct vm_area_struct *vma,
61e85e36 Jonas Bonn 2011-06-04 @424 unsigned long address, pte_t *pte)
61e85e36 Jonas Bonn 2011-06-04 425 {
61e85e36 Jonas Bonn 2011-06-04 426 }
61e85e36 Jonas Bonn 2011-06-04 427
:::::: The code at line 424 was first introduced by commit
:::::: 61e85e367535a7b6385b404bef93928768140f96 OpenRISC: Memory management
:::::: TO: Jonas Bonn <jonas@southpole.se>
:::::: CC: Jonas Bonn <jonas@southpole.se>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Tobias Klauser <tklauser@distanz.ch> |
|---|---|
| Date | 2017-09-08 10:30 +0200 |
| Subject | Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h |
| Message-ID | <unmPL-4eF-5@gated-at.bofh.it> |
| In reply to | #1726646 |
On 2017-09-07 at 21:36:45 +0200, kbuild test robot <lkp@intel.com> wrote: > Hi Tobias, > > [auto build test ERROR on v4.13] > [also build test ERROR on next-20170907] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Tobias-Klauser/asm-generic-io-h-remove-unnecessary-include-of-linux-vmalloc-h/20170908-012111 > config: arm-shmobile_defconfig (attached as .config) > compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=arm > > All errors (new ones prefixed by >>): > > >> arch/arm/mach-shmobile/pm-r8a7779.c:24:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'r8a7779_sysc_init' > static void __init r8a7779_sysc_init(void) > ^~~~~~~~~~~~~~~~~ > >> arch/arm/mach-shmobile/pm-r8a7779.c:35:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'r8a7779_pm_init' > void __init r8a7779_pm_init(void) > ^~~~~~~~~~~~~~~ This warning/error is fixed by Arnd's patch posted in https://marc.info/?l=linux-kernel&m=150464459009788&w=2
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web