All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h
@ 2017-09-05 11:27 Tobias Klauser
  2017-09-05 15:11 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Tobias Klauser @ 2017-09-05 11:27 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arch, linux-kernel

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

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

* Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h
  2017-09-05 11:27 [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h Tobias Klauser
@ 2017-09-05 15:11 ` Arnd Bergmann
  2017-09-05 15:21   ` Tobias Klauser
  2017-11-07 10:24   ` Tobias Klauser
  2017-09-07 19:31 ` kbuild test robot
  2017-09-07 19:36 ` [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h kbuild test robot
  2 siblings, 2 replies; 18+ messages in thread
From: Arnd Bergmann @ 2017-09-05 15:11 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: linux-arch, Linux Kernel Mailing List

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

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

* Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h
  2017-09-05 15:11 ` Arnd Bergmann
@ 2017-09-05 15:21   ` Tobias Klauser
  2017-09-05 20:49     ` Arnd Bergmann
  2017-11-07 10:24   ` Tobias Klauser
  1 sibling, 1 reply; 18+ messages in thread
From: Tobias Klauser @ 2017-09-05 15:21 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arch, Linux Kernel Mailing List

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

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

* Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h
  2017-09-05 15:21   ` Tobias Klauser
@ 2017-09-05 20:49     ` Arnd Bergmann
  0 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2017-09-05 20:49 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: linux-arch, Linux Kernel Mailing List

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"

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

* Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h
  2017-09-05 11:27 [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h Tobias Klauser
  2017-09-05 15:11 ` Arnd Bergmann
@ 2017-09-07 19:31 ` kbuild test robot
  2017-09-08  8:25     ` [OpenRISC] " Tobias Klauser
  2017-09-07 19:36 ` [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h kbuild test robot
  2 siblings, 1 reply; 18+ messages in thread
From: kbuild test robot @ 2017-09-07 19:31 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: kbuild-all, Arnd Bergmann, linux-arch, linux-kernel

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

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

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

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

* Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h
  2017-09-05 11:27 [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h Tobias Klauser
  2017-09-05 15:11 ` Arnd Bergmann
  2017-09-07 19:31 ` kbuild test robot
@ 2017-09-07 19:36 ` kbuild test robot
  2017-09-08  8:22   ` Tobias Klauser
  2 siblings, 1 reply; 18+ messages in thread
From: kbuild test robot @ 2017-09-07 19:36 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: kbuild-all, Arnd Bergmann, linux-arch, linux-kernel

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

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)
                ^~~~~~~~~~~~~~~

vim +24 arch/arm/mach-shmobile/pm-r8a7779.c

f40aaf6da Magnus Damm        2012-01-10  23  
a662c0826 Magnus Damm        2012-01-10 @24  static void __init r8a7779_sysc_init(void)
a662c0826 Magnus Damm        2012-01-10  25  {
053239987 Geert Uytterhoeven 2016-06-28  26  	rcar_sysc_init(0xffd85000, 0x0131000e);
a662c0826 Magnus Damm        2012-01-10  27  }
a662c0826 Magnus Damm        2012-01-10  28  
f40aaf6da Magnus Damm        2012-01-10  29  #else /* CONFIG_PM || CONFIG_SMP */
f40aaf6da Magnus Damm        2012-01-10  30  
f40aaf6da Magnus Damm        2012-01-10  31  static inline void r8a7779_sysc_init(void) {}
f40aaf6da Magnus Damm        2012-01-10  32  
f40aaf6da Magnus Damm        2012-01-10  33  #endif /* CONFIG_PM || CONFIG_SMP */
f40aaf6da Magnus Damm        2012-01-10  34  
a662c0826 Magnus Damm        2012-01-10 @35  void __init r8a7779_pm_init(void)

:::::: The code at line 24 was first introduced by commit
:::::: a662c08260fac126059a148cbd1061e71e806b4a ARM: mach-shmobile: r8a7779 power domain support V2

:::::: TO: Magnus Damm <damm@opensource.se>
:::::: CC: Paul Mundt <lethal@linux-sh.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

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

* Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h
  2017-09-07 19:36 ` [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h kbuild test robot
@ 2017-09-08  8:22   ` Tobias Klauser
  0 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2017-09-08  8:22 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all, Arnd Bergmann, linux-arch, linux-kernel

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

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

* [PATCH] openrisc: add forward declaration for struct vm_area_struct
  2017-09-07 19:31 ` kbuild test robot
@ 2017-09-08  8:25     ` Tobias Klauser
  0 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2017-09-08  8:25 UTC (permalink / raw)
  To: Jonas Bonn, Stefan Kristiansson, Stafford Horne
  Cc: Arnd Bergmann, openrisc, linux-arch, kbuild-all, kbuild test robot

After removing linux/vmalloc.h from asm-generic/io.h, the following
warning occurs on openrisc:

   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

Reported-by: kbuild test robot <lkp@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 arch/openrisc/include/asm/pgtable.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/openrisc/include/asm/pgtable.h b/arch/openrisc/include/asm/pgtable.h
index ff97374ca069..71a6f08de8f2 100644
--- a/arch/openrisc/include/asm/pgtable.h
+++ b/arch/openrisc/include/asm/pgtable.h
@@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
 
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
 
+struct vm_area_struct;
+
 /*
  * or32 doesn't have any external MMU info: the kernel page
  * tables contain all the necessary information.
-- 
2.13.0

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

* [OpenRISC] [PATCH] openrisc: add forward declaration for struct vm_area_struct
@ 2017-09-08  8:25     ` Tobias Klauser
  0 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2017-09-08  8:25 UTC (permalink / raw)
  To: openrisc

After removing linux/vmalloc.h from asm-generic/io.h, the following
warning occurs on openrisc:

   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

Reported-by: kbuild test robot <lkp@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 arch/openrisc/include/asm/pgtable.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/openrisc/include/asm/pgtable.h b/arch/openrisc/include/asm/pgtable.h
index ff97374ca069..71a6f08de8f2 100644
--- a/arch/openrisc/include/asm/pgtable.h
+++ b/arch/openrisc/include/asm/pgtable.h
@@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
 
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
 
+struct vm_area_struct;
+
 /*
  * or32 doesn't have any external MMU info: the kernel page
  * tables contain all the necessary information.
-- 
2.13.0



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

* Re: [PATCH] openrisc: add forward declaration for struct vm_area_struct
  2017-09-08  8:25     ` [OpenRISC] " Tobias Klauser
@ 2017-09-08 15:29       ` Stafford Horne
  -1 siblings, 0 replies; 18+ messages in thread
From: Stafford Horne @ 2017-09-08 15:29 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Jonas Bonn, Stefan Kristiansson, Arnd Bergmann, openrisc,
	linux-arch, kbuild-all, kbuild test robot

On Fri, Sep 08, 2017 at 10:25:08AM +0200, Tobias Klauser wrote:
> After removing linux/vmalloc.h from asm-generic/io.h, the following
> warning occurs on openrisc:
> 
>    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)
>      ^
[..]
> @@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
>  
>  extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
>  
> +struct vm_area_struct;
> +

Acked-by: Stafford Horne <shorne@gmail.com>

I was kind of wondering whether is better to include linux/mm_types.h or
linux/vmalloc.h here instead of the forward declaration.  But looking at
how other architectures do it; about half do the forward declaration, and
half use an include.  So I guess this is fine.

I noticed you were getting a lot of these patches done for removing
linux/vmalloc.h from asm-generic/io.h.   Do you want me to push this
through my queue or are you planning sending them through another route?

-Stafford

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

* [OpenRISC] [PATCH] openrisc: add forward declaration for struct vm_area_struct
@ 2017-09-08 15:29       ` Stafford Horne
  0 siblings, 0 replies; 18+ messages in thread
From: Stafford Horne @ 2017-09-08 15:29 UTC (permalink / raw)
  To: openrisc

On Fri, Sep 08, 2017 at 10:25:08AM +0200, Tobias Klauser wrote:
> After removing linux/vmalloc.h from asm-generic/io.h, the following
> warning occurs on openrisc:
> 
>    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)
>      ^
[..]
> @@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
>  
>  extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
>  
> +struct vm_area_struct;
> +

Acked-by: Stafford Horne <shorne@gmail.com>

I was kind of wondering whether is better to include linux/mm_types.h or
linux/vmalloc.h here instead of the forward declaration.  But looking at
how other architectures do it; about half do the forward declaration, and
half use an include.  So I guess this is fine.

I noticed you were getting a lot of these patches done for removing
linux/vmalloc.h from asm-generic/io.h.   Do you want me to push this
through my queue or are you planning sending them through another route?

-Stafford

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

* Re: [PATCH] openrisc: add forward declaration for struct vm_area_struct
  2017-09-08 15:29       ` [OpenRISC] " Stafford Horne
@ 2017-09-12  7:42         ` Tobias Klauser
  -1 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2017-09-12  7:42 UTC (permalink / raw)
  To: Stafford Horne, Arnd Bergmann
  Cc: Jonas Bonn, Stefan Kristiansson, openrisc, linux-arch,
	kbuild-all, kbuild test robot

On 2017-09-08 at 17:29:11 +0200, Stafford Horne <shorne@gmail.com> wrote:
> On Fri, Sep 08, 2017 at 10:25:08AM +0200, Tobias Klauser wrote:
> > After removing linux/vmalloc.h from asm-generic/io.h, the following
> > warning occurs on openrisc:
> > 
> >    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)
> >      ^
> [..]
> > @@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
> >  
> >  extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
> >  
> > +struct vm_area_struct;
> > +
> 
> Acked-by: Stafford Horne <shorne@gmail.com>
> 
> I was kind of wondering whether is better to include linux/mm_types.h or
> linux/vmalloc.h here instead of the forward declaration.  But looking at
> how other architectures do it; about half do the forward declaration, and
> half use an include.  So I guess this is fine.
> 
> I noticed you were getting a lot of these patches done for removing
> linux/vmalloc.h from asm-generic/io.h.   Do you want me to push this
> through my queue or are you planning sending them through another route?

Arnd has applied the patch removing linux/vmalloc.h from
asm-generic/io.h to his testing tree to give it a good amount of testing
before it comes anywhere near linux-next.  I'd say it's fine if you push
this through your queue as long as it hits Linus' tree before my
patch (which Arnd will submit, I suppose?).

Arnd, what would you prefer?

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

* [OpenRISC] [PATCH] openrisc: add forward declaration for struct vm_area_struct
@ 2017-09-12  7:42         ` Tobias Klauser
  0 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2017-09-12  7:42 UTC (permalink / raw)
  To: openrisc

On 2017-09-08 at 17:29:11 +0200, Stafford Horne <shorne@gmail.com> wrote:
> On Fri, Sep 08, 2017 at 10:25:08AM +0200, Tobias Klauser wrote:
> > After removing linux/vmalloc.h from asm-generic/io.h, the following
> > warning occurs on openrisc:
> > 
> >    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)
> >      ^
> [..]
> > @@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
> >  
> >  extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
> >  
> > +struct vm_area_struct;
> > +
> 
> Acked-by: Stafford Horne <shorne@gmail.com>
> 
> I was kind of wondering whether is better to include linux/mm_types.h or
> linux/vmalloc.h here instead of the forward declaration.  But looking at
> how other architectures do it; about half do the forward declaration, and
> half use an include.  So I guess this is fine.
> 
> I noticed you were getting a lot of these patches done for removing
> linux/vmalloc.h from asm-generic/io.h.   Do you want me to push this
> through my queue or are you planning sending them through another route?

Arnd has applied the patch removing linux/vmalloc.h from
asm-generic/io.h to his testing tree to give it a good amount of testing
before it comes anywhere near linux-next.  I'd say it's fine if you push
this through your queue as long as it hits Linus' tree before my
patch (which Arnd will submit, I suppose?).

Arnd, what would you prefer?

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

* Re: [PATCH] openrisc: add forward declaration for struct vm_area_struct
  2017-09-12  7:42         ` [OpenRISC] " Tobias Klauser
@ 2017-09-12 10:37           ` Stafford Horne
  -1 siblings, 0 replies; 18+ messages in thread
From: Stafford Horne @ 2017-09-12 10:37 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Arnd Bergmann, Jonas Bonn, Stefan Kristiansson, openrisc,
	linux-arch, kbuild-all, kbuild test robot

On Tue, Sep 12, 2017 at 09:42:05AM +0200, Tobias Klauser wrote:
> On 2017-09-08 at 17:29:11 +0200, Stafford Horne <shorne@gmail.com> wrote:
> > On Fri, Sep 08, 2017 at 10:25:08AM +0200, Tobias Klauser wrote:
> > > After removing linux/vmalloc.h from asm-generic/io.h, the following
> > > warning occurs on openrisc:
> > > 
> > >    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)
> > >      ^
> > [..]
> > > @@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
> > >  
> > >  extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
> > >  
> > > +struct vm_area_struct;
> > > +
> > 
> > Acked-by: Stafford Horne <shorne@gmail.com>
> > 
> > I was kind of wondering whether is better to include linux/mm_types.h or
> > linux/vmalloc.h here instead of the forward declaration.  But looking at
> > how other architectures do it; about half do the forward declaration, and
> > half use an include.  So I guess this is fine.
> > 
> > I noticed you were getting a lot of these patches done for removing
> > linux/vmalloc.h from asm-generic/io.h.   Do you want me to push this
> > through my queue or are you planning sending them through another route?
> 
> Arnd has applied the patch removing linux/vmalloc.h from
> asm-generic/io.h to his testing tree to give it a good amount of testing
> before it comes anywhere near linux-next.  I'd say it's fine if you push
> this through your queue as long as it hits Linus' tree before my
> patch (which Arnd will submit, I suppose?).
> 
> Arnd, what would you prefer?

No worries,

I already have this queued up.  I dont have anything else on my queue
thought.  I will push this tomorrow.

-Stafford

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

* [OpenRISC] [PATCH] openrisc: add forward declaration for struct vm_area_struct
@ 2017-09-12 10:37           ` Stafford Horne
  0 siblings, 0 replies; 18+ messages in thread
From: Stafford Horne @ 2017-09-12 10:37 UTC (permalink / raw)
  To: openrisc

On Tue, Sep 12, 2017 at 09:42:05AM +0200, Tobias Klauser wrote:
> On 2017-09-08 at 17:29:11 +0200, Stafford Horne <shorne@gmail.com> wrote:
> > On Fri, Sep 08, 2017 at 10:25:08AM +0200, Tobias Klauser wrote:
> > > After removing linux/vmalloc.h from asm-generic/io.h, the following
> > > warning occurs on openrisc:
> > > 
> > >    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)
> > >      ^
> > [..]
> > > @@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
> > >  
> > >  extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
> > >  
> > > +struct vm_area_struct;
> > > +
> > 
> > Acked-by: Stafford Horne <shorne@gmail.com>
> > 
> > I was kind of wondering whether is better to include linux/mm_types.h or
> > linux/vmalloc.h here instead of the forward declaration.  But looking at
> > how other architectures do it; about half do the forward declaration, and
> > half use an include.  So I guess this is fine.
> > 
> > I noticed you were getting a lot of these patches done for removing
> > linux/vmalloc.h from asm-generic/io.h.   Do you want me to push this
> > through my queue or are you planning sending them through another route?
> 
> Arnd has applied the patch removing linux/vmalloc.h from
> asm-generic/io.h to his testing tree to give it a good amount of testing
> before it comes anywhere near linux-next.  I'd say it's fine if you push
> this through your queue as long as it hits Linus' tree before my
> patch (which Arnd will submit, I suppose?).
> 
> Arnd, what would you prefer?

No worries,

I already have this queued up.  I dont have anything else on my queue
thought.  I will push this tomorrow.

-Stafford

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

* Re: [PATCH] openrisc: add forward declaration for struct vm_area_struct
  2017-09-12 10:37           ` [OpenRISC] " Stafford Horne
@ 2017-09-12 11:16             ` Tobias Klauser
  -1 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2017-09-12 11:16 UTC (permalink / raw)
  To: Stafford Horne
  Cc: Arnd Bergmann, Jonas Bonn, Stefan Kristiansson, openrisc,
	linux-arch, kbuild-all, kbuild test robot

On 2017-09-12 at 12:37:16 +0200, Stafford Horne <shorne@gmail.com> wrote:
> On Tue, Sep 12, 2017 at 09:42:05AM +0200, Tobias Klauser wrote:
> > On 2017-09-08 at 17:29:11 +0200, Stafford Horne <shorne@gmail.com> wrote:
> > > On Fri, Sep 08, 2017 at 10:25:08AM +0200, Tobias Klauser wrote:
> > > > After removing linux/vmalloc.h from asm-generic/io.h, the following
> > > > warning occurs on openrisc:
> > > > 
> > > >    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)
> > > >      ^
> > > [..]
> > > > @@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
> > > >  
> > > >  extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
> > > >  
> > > > +struct vm_area_struct;
> > > > +
> > > 
> > > Acked-by: Stafford Horne <shorne@gmail.com>
> > > 
> > > I was kind of wondering whether is better to include linux/mm_types.h or
> > > linux/vmalloc.h here instead of the forward declaration.  But looking at
> > > how other architectures do it; about half do the forward declaration, and
> > > half use an include.  So I guess this is fine.
> > > 
> > > I noticed you were getting a lot of these patches done for removing
> > > linux/vmalloc.h from asm-generic/io.h.   Do you want me to push this
> > > through my queue or are you planning sending them through another route?
> > 
> > Arnd has applied the patch removing linux/vmalloc.h from
> > asm-generic/io.h to his testing tree to give it a good amount of testing
> > before it comes anywhere near linux-next.  I'd say it's fine if you push
> > this through your queue as long as it hits Linus' tree before my
> > patch (which Arnd will submit, I suppose?).
> > 
> > Arnd, what would you prefer?
> 
> No worries,
> 
> I already have this queued up.  I dont have anything else on my queue
> thought.  I will push this tomorrow.

Great, thank you!

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

* [OpenRISC] [PATCH] openrisc: add forward declaration for struct vm_area_struct
@ 2017-09-12 11:16             ` Tobias Klauser
  0 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2017-09-12 11:16 UTC (permalink / raw)
  To: openrisc

On 2017-09-12 at 12:37:16 +0200, Stafford Horne <shorne@gmail.com> wrote:
> On Tue, Sep 12, 2017 at 09:42:05AM +0200, Tobias Klauser wrote:
> > On 2017-09-08 at 17:29:11 +0200, Stafford Horne <shorne@gmail.com> wrote:
> > > On Fri, Sep 08, 2017 at 10:25:08AM +0200, Tobias Klauser wrote:
> > > > After removing linux/vmalloc.h from asm-generic/io.h, the following
> > > > warning occurs on openrisc:
> > > > 
> > > >    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)
> > > >      ^
> > > [..]
> > > > @@ -414,6 +414,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
> > > >  
> > > >  extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
> > > >  
> > > > +struct vm_area_struct;
> > > > +
> > > 
> > > Acked-by: Stafford Horne <shorne@gmail.com>
> > > 
> > > I was kind of wondering whether is better to include linux/mm_types.h or
> > > linux/vmalloc.h here instead of the forward declaration.  But looking at
> > > how other architectures do it; about half do the forward declaration, and
> > > half use an include.  So I guess this is fine.
> > > 
> > > I noticed you were getting a lot of these patches done for removing
> > > linux/vmalloc.h from asm-generic/io.h.   Do you want me to push this
> > > through my queue or are you planning sending them through another route?
> > 
> > Arnd has applied the patch removing linux/vmalloc.h from
> > asm-generic/io.h to his testing tree to give it a good amount of testing
> > before it comes anywhere near linux-next.  I'd say it's fine if you push
> > this through your queue as long as it hits Linus' tree before my
> > patch (which Arnd will submit, I suppose?).
> > 
> > Arnd, what would you prefer?
> 
> No worries,
> 
> I already have this queued up.  I dont have anything else on my queue
> thought.  I will push this tomorrow.

Great, thank you!

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

* Re: [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h
  2017-09-05 15:11 ` Arnd Bergmann
  2017-09-05 15:21   ` Tobias Klauser
@ 2017-11-07 10:24   ` Tobias Klauser
  1 sibling, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2017-11-07 10:24 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arch, Linux Kernel Mailing List

Hi Arnd

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.
> 
> 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 see any other breakages caused by this patch in your testing
queue besides the ones you alredy reported/fixed? Would this be
something appropriate to submit during the next merge window? Or at
least to be included in linux-next so it gets some more coverage?

Thanks
Tobias

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

end of thread, other threads:[~2017-11-07 10:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 11:27 [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h Tobias Klauser
2017-09-05 15:11 ` Arnd Bergmann
2017-09-05 15:21   ` Tobias Klauser
2017-09-05 20:49     ` Arnd Bergmann
2017-11-07 10:24   ` Tobias Klauser
2017-09-07 19:31 ` kbuild test robot
2017-09-08  8:25   ` [PATCH] openrisc: add forward declaration for struct vm_area_struct Tobias Klauser
2017-09-08  8:25     ` [OpenRISC] " Tobias Klauser
2017-09-08 15:29     ` Stafford Horne
2017-09-08 15:29       ` [OpenRISC] " Stafford Horne
2017-09-12  7:42       ` Tobias Klauser
2017-09-12  7:42         ` [OpenRISC] " Tobias Klauser
2017-09-12 10:37         ` Stafford Horne
2017-09-12 10:37           ` [OpenRISC] " Stafford Horne
2017-09-12 11:16           ` Tobias Klauser
2017-09-12 11:16             ` [OpenRISC] " Tobias Klauser
2017-09-07 19:36 ` [PATCH] asm-generic/io.h: remove unnecessary include of linux/vmalloc.h kbuild test robot
2017-09-08  8:22   ` Tobias Klauser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.