2011-05-20 06:18:28

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the final tree

Hi all,

After merging the final tree, today's linux-next build (sparc32 defconfig)
failed like this:

mm/page_alloc.c: In function '__free_pages_bootmem':
mm/page_alloc.c:704: error: implicit declaration of function 'prefetchw'
fs/dcache.c: In function '__d_lookup_rcu':
fs/dcache.c:1810: error: implicit declaration of function 'prefetch'
fs/inode.c: In function 'new_inode':
fs/inode.c:894: error: implicit declaration of function 'spin_lock_prefetch'
net/core/skbuff.c: In function '__alloc_skb':
net/core/skbuff.c:184: error: implicit declaration of function 'prefetchw'
In file included from net/ipv4/ip_forward.c:32:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
In file included from net/ipv6/af_inet6.c:48:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
net/unix/af_unix.c: In function 'unix_ioctl':
net/unix/af_unix.c:2066: error: implicit declaration of function 'prefetch'
In file included from net/sunrpc/xprtsock.c:44:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
kernel/rcutiny.c: In function 'rcu_process_callbacks':
kernel/rcutiny.c:180: error: implicit declaration of function 'prefetch'

Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
iterators").

I added the following patch for today:

>From 1a101eb2766057372006b1b487d05f40fe899478 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <[email protected]>
Date: Fri, 20 May 2011 16:08:48 +1000
Subject: [PATCH] include prefetch.h where needed

Commit e66eed651fd1 ("list: remove prefetching from regular list
iterators") removed the include of prefetch.h from list.h.

fixes these build errors on sparc:

mm/page_alloc.c: In function '__free_pages_bootmem':
mm/page_alloc.c:704: error: implicit declaration of function 'prefetchw'
fs/dcache.c: In function '__d_lookup_rcu':
fs/dcache.c:1810: error: implicit declaration of function 'prefetch'
fs/inode.c: In function 'new_inode':
fs/inode.c:894: error: implicit declaration of function 'spin_lock_prefetch'
net/core/skbuff.c: In function '__alloc_skb':
net/core/skbuff.c:184: error: implicit declaration of function 'prefetchw'
In file included from net/ipv4/ip_forward.c:32:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
In file included from net/ipv6/af_inet6.c:48:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
net/unix/af_unix.c: In function 'unix_ioctl':
net/unix/af_unix.c:2066: error: implicit declaration of function 'prefetch'
In file included from net/sunrpc/xprtsock.c:44:
include/net/udp.h: In function 'udp_csum_outgoing':
include/net/udp.h:141: error: implicit declaration of function 'prefetch'
kernel/rcutiny.c: In function 'rcu_process_callbacks':
kernel/rcutiny.c:180: error: implicit declaration of function 'prefetch'

Signed-off-by: Stephen Rothwell <[email protected]>
---
fs/dcache.c | 1 +
fs/inode.c | 1 +
include/linux/skbuff.h | 1 +
kernel/rcutiny.c | 1 +
mm/page_alloc.c | 1 +
net/core/skbuff.c | 1 +
6 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 22a0ef4..18b2a1f 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -35,6 +35,7 @@
#include <linux/hardirq.h>
#include <linux/bit_spinlock.h>
#include <linux/rculist_bl.h>
+#include <linux/prefetch.h>
#include "internal.h"

/*
diff --git a/fs/inode.c b/fs/inode.c
index 33c963d..c77081f 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -26,6 +26,7 @@
#include <linux/posix_acl.h>
#include <linux/ima.h>
#include <linux/cred.h>
+#include <linux/prefetch.h>
#include "internal.h"

/*
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 79aafbb..f963b8f 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -29,6 +29,7 @@
#include <linux/rcupdate.h>
#include <linux/dmaengine.h>
#include <linux/hrtimer.h>
+#include <linux/prefetch.h>

/* Don't change this without changing skb_csum_unnecessary! */
#define CHECKSUM_NONE 0
diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index 421abfd..7bbac7d 100644
--- a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -35,6 +35,7 @@
#include <linux/init.h>
#include <linux/time.h>
#include <linux/cpu.h>
+#include <linux/prefetch.h>

/* Controls for rcu_kthread() kthread, replacing RCU_SOFTIRQ used previously. */
static struct task_struct *rcu_kthread_task;
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 44b3d7b..9d5498e 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -54,6 +54,7 @@
#include <trace/events/kmem.h>
#include <linux/ftrace_event.h>
#include <linux/memcontrol.h>
+#include <linux/prefetch.h>

#include <asm/tlbflush.h>
#include <asm/div64.h>
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 3e934fe..46cbd28 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -57,6 +57,7 @@
#include <linux/init.h>
#include <linux/scatterlist.h>
#include <linux/errqueue.h>
+#include <linux/prefetch.h>

#include <net/protocol.h>
#include <net/dst.h>
--
1.7.5.1

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


2011-05-24 02:07:04

by Mike Frysinger

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

On Fri, May 20, 2011 at 02:18, Stephen Rothwell wrote:
> Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
> iterators").
>
> I added the following patch for today:

probably should get added to whatever tree that commit is coming from
so we dont have bisect hell ?

more failures:
drivers/usb/host/isp1362-hcd.c: In function 'isp1362_write_ptd':
drivers/usb/host/isp1362-hcd.c:355: error: implicit declaration of
function 'prefetch'
drivers/usb/host/isp1362-hcd.c: In function 'isp1362_read_ptd':
drivers/usb/host/isp1362-hcd.c:377: error: implicit declaration of
function 'prefetchw'
make[3]: *** [drivers/usb/host/isp1362-hcd.o] Error 1

drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
drivers/usb/musb/musb_core.c:219: error: implicit declaration of
function 'prefetch'
make[3]: *** [drivers/usb/musb/musb_core.o] Error 1

although it seems like it should be fairly trivial to look at the
funcs in linux/prefetch.h, grep the tree, and find a pretty good list
of the files that are missing the include
-mike

2011-05-24 02:52:24

by Greg KH

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

On Mon, May 23, 2011 at 10:06:40PM -0400, Mike Frysinger wrote:
> On Fri, May 20, 2011 at 02:18, Stephen Rothwell wrote:
> > Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
> > iterators").
> >
> > I added the following patch for today:
>
> probably should get added to whatever tree that commit is coming from
> so we dont have bisect hell ?
>
> more failures:
> drivers/usb/host/isp1362-hcd.c: In function 'isp1362_write_ptd':
> drivers/usb/host/isp1362-hcd.c:355: error: implicit declaration of
> function 'prefetch'
> drivers/usb/host/isp1362-hcd.c: In function 'isp1362_read_ptd':
> drivers/usb/host/isp1362-hcd.c:377: error: implicit declaration of
> function 'prefetchw'
> make[3]: *** [drivers/usb/host/isp1362-hcd.o] Error 1
>
> drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
> drivers/usb/musb/musb_core.c:219: error: implicit declaration of
> function 'prefetch'
> make[3]: *** [drivers/usb/musb/musb_core.o] Error 1
>
> although it seems like it should be fairly trivial to look at the
> funcs in linux/prefetch.h, grep the tree, and find a pretty good list
> of the files that are missing the include

How did this not show up in linux-next? Where did the patch that caused
this show up from?

totally confused,

greg k-h

2011-05-24 03:59:46

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

Hi Greg,

On Mon, 23 May 2011 19:51:51 -0700 Greg KH <[email protected]> wrote:
>
> On Mon, May 23, 2011 at 10:06:40PM -0400, Mike Frysinger wrote:
> > On Fri, May 20, 2011 at 02:18, Stephen Rothwell wrote:
> > > Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
> > > iterators").
> > >
> > > I added the following patch for today:
> >
> > probably should get added to whatever tree that commit is coming from
> > so we dont have bisect hell ?
> >
> > more failures:
> > drivers/usb/host/isp1362-hcd.c: In function 'isp1362_write_ptd':
> > drivers/usb/host/isp1362-hcd.c:355: error: implicit declaration of
> > function 'prefetch'
> > drivers/usb/host/isp1362-hcd.c: In function 'isp1362_read_ptd':
> > drivers/usb/host/isp1362-hcd.c:377: error: implicit declaration of
> > function 'prefetchw'
> > make[3]: *** [drivers/usb/host/isp1362-hcd.o] Error 1
> >
> > drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
> > drivers/usb/musb/musb_core.c:219: error: implicit declaration of
> > function 'prefetch'
> > make[3]: *** [drivers/usb/musb/musb_core.o] Error 1
> >
> > although it seems like it should be fairly trivial to look at the
> > funcs in linux/prefetch.h, grep the tree, and find a pretty good list
> > of the files that are missing the include
>
> How did this not show up in linux-next? Where did the patch that caused
> this show up from?
>
> totally confused,

:-)

sfr said above:
> Caused by commit e66eed651fd1 ("list: remove prefetching from regular
> list iterators").

The cause was a patch from Linus ...

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (1.63 kB)
(No filename) (490.00 B)
Download all attachments

2011-05-24 04:02:35

by Linus Torvalds

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

On Mon, May 23, 2011 at 7:06 PM, Mike Frysinger <[email protected]> wrote:
>
> more failures:

Is this blackfin or something?

I did an allyesconfig with a special x86 patch that should have caught
everything that didn't have the proper prefetch.h include, but non-x86
drivers would have passed that.

And I guess I didn't do my "force staging drivers on" hack for that test either.

Linus

2011-05-24 04:10:59

by Mike Frysinger

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

On Tue, May 24, 2011 at 00:01, Linus Torvalds wrote:
> On Mon, May 23, 2011 at 7:06 PM, Mike Frysinger wrote:
>>
>> more failures:
>
> Is this blackfin or something?

let's go with "something" ...

> I did an allyesconfig with a special x86 patch that should have caught
> everything that didn't have the proper prefetch.h include, but non-x86
> drivers would have passed that.

the isp1362-hcd failure probably is before your
268bb0ce3e87872cb9290c322b0d35bce230d88f. i think i was reading a log
that is a few days old (ive been traveling and am playing catch up
atm). i'll refresh and see what's what still.

the common musb code only allows it to be built if the arch glue is
available, and there is no x86 glue. so an allyesconfig on x86
wouldnt have picked up the failure. it'll bomb though for any target
which does have the glue.
-mike

2011-05-24 12:57:41

by Greg KH

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

On Tue, May 24, 2011 at 01:59:30PM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> On Mon, 23 May 2011 19:51:51 -0700 Greg KH <[email protected]> wrote:
> >
> > On Mon, May 23, 2011 at 10:06:40PM -0400, Mike Frysinger wrote:
> > > On Fri, May 20, 2011 at 02:18, Stephen Rothwell wrote:
> > > > Caused by commit e66eed651fd1 ("list: remove prefetching from regular list
> > > > iterators").
> > > >
> > > > I added the following patch for today:
> > >
> > > probably should get added to whatever tree that commit is coming from
> > > so we dont have bisect hell ?
> > >
> > > more failures:
> > > drivers/usb/host/isp1362-hcd.c: In function 'isp1362_write_ptd':
> > > drivers/usb/host/isp1362-hcd.c:355: error: implicit declaration of
> > > function 'prefetch'
> > > drivers/usb/host/isp1362-hcd.c: In function 'isp1362_read_ptd':
> > > drivers/usb/host/isp1362-hcd.c:377: error: implicit declaration of
> > > function 'prefetchw'
> > > make[3]: *** [drivers/usb/host/isp1362-hcd.o] Error 1
> > >
> > > drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
> > > drivers/usb/musb/musb_core.c:219: error: implicit declaration of
> > > function 'prefetch'
> > > make[3]: *** [drivers/usb/musb/musb_core.o] Error 1
> > >
> > > although it seems like it should be fairly trivial to look at the
> > > funcs in linux/prefetch.h, grep the tree, and find a pretty good list
> > > of the files that are missing the include
> >
> > How did this not show up in linux-next? Where did the patch that caused
> > this show up from?
> >
> > totally confused,
>
> :-)
>
> sfr said above:
> > Caused by commit e66eed651fd1 ("list: remove prefetching from regular
> > list iterators").
>
> The cause was a patch from Linus ...

Ah, ok, that makes more sense, sorry for the noise.

greg k-h

2011-05-24 17:11:06

by Mike Frysinger

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

On Tue, May 24, 2011 at 00:10, Mike Frysinger wrote:
> On Tue, May 24, 2011 at 00:01, Linus Torvalds wrote:
>> On Mon, May 23, 2011 at 7:06 PM, Mike Frysinger wrote:
>>>
>>> more failures:
>>
>> Is this blackfin or something?
>
> let's go with "something" ...
>
>> I did an allyesconfig with a special x86 patch that should have caught
>> everything that didn't have the proper prefetch.h include, but non-x86
>> drivers would have passed that.
>
> the isp1362-hcd failure probably is before your
> 268bb0ce3e87872cb9290c322b0d35bce230d88f.  i think i was reading a log
> that is a few days old (ive been traveling and am playing catch up
> atm).  i'll refresh and see what's what still.
>
> the common musb code only allows it to be built if the arch glue is
> available, and there is no x86 glue.  so an allyesconfig on x86
> wouldnt have picked up the failure.  it'll bomb though for any target
> which does have the glue.

latest tree seems to only fail for me now on the musb driver. i can
send out a patch later today if no one else has gotten to it yet.
-mike

2011-05-24 17:35:27

by Linus Torvalds

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

On Tue, May 24, 2011 at 10:10 AM, Mike Frysinger <[email protected]> wrote:
>
> latest tree seems to only fail for me now on the musb driver. ?i can
> send out a patch later today if no one else has gotten to it yet.

Please do.

I did a

grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')

but there are drivers out there that have that "prefetch()" pattern
without being about actual CPU prefetching at all (see for example
drivers/ide/cmd640.c), so once I got allyesconfig with my x86
detection hack going, I didn't bother with the few odd men out.

Linus

2011-05-24 21:52:59

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

Hi Greg,

On Tue, 24 May 2011 05:48:33 -0700 Greg KH <[email protected]> wrote:
>
> On Tue, May 24, 2011 at 01:59:30PM +1000, Stephen Rothwell wrote:
> >
> > The cause was a patch from Linus ...
>
> Ah, ok, that makes more sense, sorry for the noise.

And it doesn't show up in many builds because musb depends on ARM ||
(BF54x && !BF544) || (BF52x && !BF522 && !BF523). So it probably appears
in some of the overnight builds, but not the ones I do while creating
linux-next.

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (580.00 B)
(No filename) (490.00 B)
Download all attachments

2011-05-25 09:25:08

by Felipe Balbi

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

On Tue, May 24, 2011 at 01:10:42PM -0400, Mike Frysinger wrote:
> On Tue, May 24, 2011 at 00:10, Mike Frysinger wrote:
> > On Tue, May 24, 2011 at 00:01, Linus Torvalds wrote:
> >> On Mon, May 23, 2011 at 7:06 PM, Mike Frysinger wrote:
> >>>
> >>> more failures:
> >>
> >> Is this blackfin or something?
> >
> > let's go with "something" ...
> >
> >> I did an allyesconfig with a special x86 patch that should have caught
> >> everything that didn't have the proper prefetch.h include, but non-x86
> >> drivers would have passed that.
> >
> > the isp1362-hcd failure probably is before your
> > 268bb0ce3e87872cb9290c322b0d35bce230d88f. ?i think i was reading a log
> > that is a few days old (ive been traveling and am playing catch up
> > atm). ?i'll refresh and see what's what still.
> >
> > the common musb code only allows it to be built if the arch glue is
> > available, and there is no x86 glue. ?so an allyesconfig on x86
> > wouldnt have picked up the failure. ?it'll bomb though for any target
> > which does have the glue.

anyone with a PCI OPT card to help adding a PCI glue layer for MUSB ?

> latest tree seems to only fail for me now on the musb driver. i can
> send out a patch later today if no one else has gotten to it yet.

please do send out, but what was the compile breakage with musb ?

--
balbi


Attachments:
(No filename) (1.29 kB)
signature.asc (490.00 B)
Digital signature
Download all attachments

2011-05-25 12:13:44

by Mike Frysinger

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree

On Wed, May 25, 2011 at 05:24, Felipe Balbi wrote:
> On Tue, May 24, 2011 at 01:10:42PM -0400, Mike Frysinger wrote:
>> latest tree seems to only fail for me now on the musb driver.  i can
>> send out a patch later today if no one else has gotten to it yet.
>
> please do send out, but what was the compile breakage with musb ?

i logged it earlier in the thread:
drivers/usb/musb/musb_core.c: In function 'musb_write_fifo':
drivers/usb/musb/musb_core.c:219: error: implicit declaration of
function 'prefetch'
make[3]: *** [drivers/usb/musb/musb_core.o] Error 1

patch sent out now
-mike