From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Adrian Bunk <bunk@kernel.org>,
linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
Robert Reif <reif@earthlink.net>
Subject: Re: [patch] sparc: fix build
Date: Tue, 12 Feb 2008 18:46:54 -0800 [thread overview]
Message-ID: <20080212184654.85d5ae20.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0802101529310.17892@chino.kir.corp.google.com>
On Sun, 10 Feb 2008 15:30:51 -0800 (PST) David Rientjes <rientjes@google.com> wrote:
> Fix build failures on sparc:
>
> In file included from include/linux/mm.h:39,
> from include/linux/memcontrol.h:24,
> from include/linux/swap.h:8,
> from include/linux/suspend.h:7,
> from init/do_mounts.c:6:
> include/asm/pgtable.h:344: warning: parameter names (without
> types) in function declaration
> include/asm/pgtable.h:345: warning: parameter names (without
> types) in function declaration
> include/asm/pgtable.h:346: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '___f___swp_entry'
>
> and
>
> arch/sparc/kernel/led.c: In function 'led_blink':
> arch/sparc/kernel/led.c:35: error: invalid use of undefined type
> 'struct timer_list'
> arch/sparc/kernel/led.c:35: error: 'jiffies' undeclared (first use
> in this function)
> arch/sparc/kernel/led.c:35: error: (Each undeclared identifier is
> reported only once
> arch/sparc/kernel/led.c:35: error: for each function it appears
> in.)
> arch/sparc/kernel/led.c:36: error: 'avenrun' undeclared (first use
> in this function)
> arch/sparc/kernel/led.c:36: error: 'FSHIFT' undeclared (first use
> in this function)
> arch/sparc/kernel/led.c:36: error: 'HZ' undeclared (first use in
> this function)
> arch/sparc/kernel/led.c:37: error: invalid use of undefined type
> 'struct timer_list'
> arch/sparc/kernel/led.c:39: error: invalid use of undefined type
> 'struct timer_list'
> arch/sparc/kernel/led.c:40: error: invalid use of undefined type
> 'struct timer_list'
> arch/sparc/kernel/led.c:42: error: implicit declaration of
> function 'add_timer'
> arch/sparc/kernel/led.c: In function 'led_write_proc':
> arch/sparc/kernel/led.c:70: error: implicit declaration of
> function 'copy_from_user'
> arch/sparc/kernel/led.c:84: error: implicit declaration of
> function 'del_timer_sync'
> arch/sparc/kernel/led.c: In function 'led_init':
> arch/sparc/kernel/led.c:109: error: implicit declaration of
> function 'init_timer'
> arch/sparc/kernel/led.c:110: error: invalid use of undefined type
> 'struct timer_list'
>
> ...
>
> diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c
> --- a/arch/sparc/kernel/led.c
> +++ b/arch/sparc/kernel/led.c
> @@ -1,8 +1,9 @@
> -#include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/proc_fs.h>
> #include <linux/string.h>
> +#include <linux/sched.h>
> +#include <linux/uaccess.h>
>
> #include <asm/auxio.h>
OK, that'll fix one error.
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -20,9 +20,6 @@
> #ifndef _LINUX_MEMCONTROL_H
> #define _LINUX_MEMCONTROL_H
>
> -#include <linux/rcupdate.h>
> -#include <linux/mm.h>
> -
> struct mem_cgroup;
> struct page_cgroup;
> struct page;
This really should have been in a separate patch and extensively tested.
Have we checked that every file which directly or indirectly includes
memcontrol.h does not have an requirement for rcupdate.h and mm.h, where
that requirement was satisfied only via this nested inclusion? For all
architectures and for all config selections? Think not.
Sadly, removal of nested includes is a *big* deal, and it takes quite a lot
of time to get it all shaken down.
If we can confirm that all files (.c and .h) which include memcontrol.h
also directly include rcupdate.h and mm.h then we're _probably_ ok (modulo
ordering issues).
Otherwise we should perhaps be taking a second look at how to fix the sparc
problem.
next prev parent reply other threads:[~2008-02-13 2:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-07 23:12 sparc compile error Adrian Bunk
2008-02-07 23:38 ` David Rientjes
2008-02-10 15:33 ` Martin Habets
2008-02-10 19:19 ` David Rientjes
2008-02-10 21:44 ` Robert Reif
2008-02-10 23:30 ` [patch] sparc: fix build David Rientjes
2008-02-11 9:37 ` Balbir Singh
2008-02-13 2:46 ` Andrew Morton [this message]
2008-02-13 2:57 ` Al Viro
2008-02-13 3:08 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080212184654.85d5ae20.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bunk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=reif@earthlink.net \
--cc=rientjes@google.com \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox