2008-02-06 15:18:31

by Adrian Bunk

[permalink] [raw]
Subject: blackfin compile error

Commit 698dd4ba6b12e34e1e432c944c01478c0b2cd773 broke blackfin:

<-- snip -->

...
CC mm/vmscan.o
In file included from
/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
make[2]: *** [mm/vmscan.o] Error 1

<-- snip -->

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed


2008-02-06 16:24:56

by Matt Mackall

[permalink] [raw]
Subject: Re: blackfin compile error


On Wed, 2008-02-06 at 17:18 +0200, Adrian Bunk wrote:
> Commit 698dd4ba6b12e34e1e432c944c01478c0b2cd773 broke blackfin:
>
> <-- snip -->
>
> ...
> CC mm/vmscan.o
> In file included from
> /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
> /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
> /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
> /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
> make[2]: *** [mm/vmscan.o] Error 1

This suggests that no one's tried to compile -mm on Blackfin since
before September, I think.

Is there somewhere more appropriate to move it? I can't find one.
Failing that, we can wrap it in CONFIG_MMU, I suppose.

Signed-off-by: Matt Mackall <[email protected]>

diff -r 50a6e531a9f2 include/linux/swapops.h
--- a/include/linux/swapops.h Mon Feb 04 20:23:02 2008 -0600
+++ b/include/linux/swapops.h Wed Feb 06 10:21:32 2008 -0600
@@ -42,11 +42,13 @@
return entry.val & SWP_OFFSET_MASK(entry);
}

+#ifdef CONFIG_MMU
/* check whether a pte points to a swap entry */
static inline int is_swap_pte(pte_t pte)
{
return !pte_none(pte) && !pte_present(pte) && !pte_file(pte);
}
+#endif

/*
* Convert the arch-dependent pte representation of a swp_entry_t into an

--
Mathematics is the supreme nostalgia of our time.

2008-02-06 19:11:39

by Robin Getz

[permalink] [raw]
Subject: Re: blackfin compile error

On Wed 6 Feb 2008 11:23, Matt Mackall pondered:
>
> On Wed, 2008-02-06 at 17:18 +0200, Adrian Bunk wrote:
> > Commit 698dd4ba6b12e34e1e432c944c01478c0b2cd773 broke blackfin:
> >
> > <-- snip -->
> >
> > ...
> > CC mm/vmscan.o
> > In file included from
> > /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
> > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
> > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
> > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
> > make[2]: *** [mm/vmscan.o] Error 1
>
> This suggests that no one's tried to compile -mm on Blackfin since
> before September, I think.

Or any other nommu arch's either, since looking at the include files, FRV
(when configured as noMMU) and m68knommu does not include it either...

> Is there somewhere more appropriate to move it? I can't find one.
> Failing that, we can wrap it in CONFIG_MMU, I suppose.

Or just add to the the following:

./include/asm-blackfin
./include/asm-frv/ (only when configured as !MMU)
./include/asm-h8300
./include/asm-m68knommu
./include/asm-v850

Others seem to have it in include/asm-xxxxx/pgtable.h as #define, inline
function, or extern.

> Signed-off-by: Matt Mackall <[email protected]>
>
> diff -r 50a6e531a9f2 include/linux/swapops.h
> --- a/include/linux/swapops.h Mon Feb 04 20:23:02 2008 -0600
> +++ b/include/linux/swapops.h Wed Feb 06 10:21:32 2008 -0600
> @@ -42,11 +42,13 @@
> return entry.val & SWP_OFFSET_MASK(entry);
> }
>
> +#ifdef CONFIG_MMU
> /* check whether a pte points to a swap entry */
> static inline int is_swap_pte(pte_t pte)
> {
> return !pte_none(pte) && !pte_present(pte) && !pte_file(pte);
> }
> +#endif
>
> /*
> * Convert the arch-dependent pte representation of a swp_entry_t into
> an
>

2008-02-06 19:39:55

by Andrew Morton

[permalink] [raw]
Subject: Re: blackfin compile error

On Wed, 6 Feb 2008 14:12:50 -0500
Robin Getz <[email protected]> wrote:

> On Wed 6 Feb 2008 11:23, Matt Mackall pondered:
> >
> > On Wed, 2008-02-06 at 17:18 +0200, Adrian Bunk wrote:
> > > Commit 698dd4ba6b12e34e1e432c944c01478c0b2cd773 broke blackfin:
> > >
> > > <-- snip -->
> > >
> > > ...
> > > CC mm/vmscan.o
> > > In file included from
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
> > > make[2]: *** [mm/vmscan.o] Error 1
> >
> > This suggests that no one's tried to compile -mm on Blackfin since
> > before September, I think.
>
> Or any other nommu arch's either, since looking at the include files, FRV
> (when configured as noMMU) and m68knommu does not include it either...

sh is the only nommu arch which I test-compile for.

The world would be a better place if arch maintainers (or their helpers)
were to build and test -mm once a month or so.

2008-02-07 07:26:38

by Bryan Wu

[permalink] [raw]
Subject: Re: blackfin compile error

On Feb 7, 2008 3:37 AM, Andrew Morton <[email protected]> wrote:
> On Wed, 6 Feb 2008 14:12:50 -0500
> Robin Getz <[email protected]> wrote:
>
> > On Wed 6 Feb 2008 11:23, Matt Mackall pondered:
> > >
> > > On Wed, 2008-02-06 at 17:18 +0200, Adrian Bunk wrote:
> > > > Commit 698dd4ba6b12e34e1e432c944c01478c0b2cd773 broke blackfin:
> > > >
> > > > <-- snip -->
> > > >
> > > > ...
> > > > CC mm/vmscan.o
> > > > In file included from
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
> > > > make[2]: *** [mm/vmscan.o] Error 1
> > >
> > > This suggests that no one's tried to compile -mm on Blackfin since
> > > before September, I think.
> >
> > Or any other nommu arch's either, since looking at the include files, FRV
> > (when configured as noMMU) and m68knommu does not include it either...
>
> sh is the only nommu arch which I test-compile for.
>
> The world would be a better place if arch maintainers (or their helpers)
> were to build and test -mm once a month or so.
>

I will be here for Blackfin. Actually, we got some patches in -mm, it
is necessary to built and test -mm on Blackfin.

Thanks
-Bryan

2008-02-07 16:03:29

by Mike Frysinger

[permalink] [raw]
Subject: Re: blackfin compile error

On Feb 7, 2008 2:26 AM, Bryan Wu <[email protected]> wrote:
> On Feb 7, 2008 3:37 AM, Andrew Morton <[email protected]> wrote:
> > The world would be a better place if arch maintainers (or their helpers)
> > were to build and test -mm once a month or so.
>
> I will be here for Blackfin. Actually, we got some patches in -mm, it
> is necessary to built and test -mm on Blackfin.

ive setup one of our internal machines to auto build all the Blackfin
defconfigs found in mainline git and the mm tree

just need to find a way to publish/notify people upon failure ...
-mike

2008-02-07 19:37:23

by Bryan Wu

[permalink] [raw]
Subject: Re: blackfin compile error

On Feb 8, 2008 12:03 AM, Mike Frysinger <[email protected]> wrote:
> On Feb 7, 2008 2:26 AM, Bryan Wu <[email protected]> wrote:
> > On Feb 7, 2008 3:37 AM, Andrew Morton <[email protected]> wrote:
> > > The world would be a better place if arch maintainers (or their helpers)
> > > were to build and test -mm once a month or so.
> >
> > I will be here for Blackfin. Actually, we got some patches in -mm, it
> > is necessary to built and test -mm on Blackfin.
>
> ive setup one of our internal machines to auto build all the Blackfin
> defconfigs found in mainline git and the mm tree
>

Thanks a lot, it makes life easier.

> just need to find a way to publish/notify people upon failure ...

Maybe Grace can help to setup some cruisecontrol auto test machine
with email notification.

-Bryan

2008-02-07 20:31:35

by Mike Frysinger

[permalink] [raw]
Subject: Re: blackfin compile error

On Feb 7, 2008 2:37 PM, Bryan Wu <[email protected]> wrote:
> On Feb 8, 2008 12:03 AM, Mike Frysinger <[email protected]> wrote:
> > On Feb 7, 2008 2:26 AM, Bryan Wu <[email protected]> wrote:
> > > On Feb 7, 2008 3:37 AM, Andrew Morton <[email protected]> wrote:
> > > > The world would be a better place if arch maintainers (or their helpers)
> > > > were to build and test -mm once a month or so.
> > >
> > > I will be here for Blackfin. Actually, we got some patches in -mm, it
> > > is necessary to built and test -mm on Blackfin.
> >
> > ive setup one of our internal machines to auto build all the Blackfin
> > defconfigs found in mainline git and the mm tree
>
> Thanks a lot, it makes life easier.
>
> > just need to find a way to publish/notify people upon failure ...
>
> Maybe Grace can help to setup some cruisecontrol auto test machine
> with email notification.

i'm thinking i'll post the linux-2.6.git/blackfin-2.6.git/linux-mm
tree results to the Blackfin kernel list
-mike

2008-02-07 21:31:18

by Robin Getz

[permalink] [raw]
Subject: Re: blackfin compile error

On Wed 6 Feb 2008 14:37, Andrew Morton pondered:
> On Wed, 6 Feb 2008 14:12:50 -0500
> Robin Getz <[email protected]> wrote:
>
> > On Wed 6 Feb 2008 11:23, Matt Mackall pondered:
> > >
> > > On Wed, 2008-02-06 at 17:18 +0200, Adrian Bunk wrote:
> > > > Commit 698dd4ba6b12e34e1e432c944c01478c0b2cd773 broke blackfin:
> > > >
> > > > <-- snip -->
> > > >
> > > > ...
> > > > CC mm/vmscan.o
> > > > In file included from
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
> > > > make[2]: *** [mm/vmscan.o] Error 1
> > >
> > > This suggests that no one's tried to compile -mm on Blackfin since
> > > before September, I think.
> >
> > Or any other nommu arch's either, since looking at the include files,
> > FRV (when configured as noMMU) and m68knommu does not include it either...
>
> sh is the only nommu arch which I test-compile for.
>
> The world would be a better place if arch maintainers (or their helpers)
> were to build and test -mm once a month or so.

OK - now that we have that fixed (Mike/Bryan will do this on the mm tree and
at least fix up compile issues as soon as we notice) - how do we want to fix
this specific issue?

Add the missing entries into include/asm-xxxxx/pgtable.h or wrap the callers
in ifdefs?

-Robin

-Robin

2008-02-08 05:25:44

by Mike Frysinger

[permalink] [raw]
Subject: Re: blackfin compile error

On Feb 6, 2008 2:12 PM, Robin Getz <[email protected]> wrote:
> On Wed 6 Feb 2008 11:23, Matt Mackall pondered:
> > On Wed, 2008-02-06 at 17:18 +0200, Adrian Bunk wrote:
> > > Commit 698dd4ba6b12e34e1e432c944c01478c0b2cd773 broke blackfin:
> > >
> > > <-- snip -->
> > >
> > > ...
> > > CC mm/vmscan.o
> > > In file included from
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
> > > make[2]: *** [mm/vmscan.o] Error 1
> >
> > This suggests that no one's tried to compile -mm on Blackfin since
> > before September, I think.
>
> Or any other nommu arch's either, since looking at the include files, FRV
> (when configured as noMMU) and m68knommu does not include it either...
>
> > Is there somewhere more appropriate to move it? I can't find one.
> > Failing that, we can wrap it in CONFIG_MMU, I suppose.
>
> Or just add to the the following:
>
> ./include/asm-blackfin
> ./include/asm-frv/ (only when configured as !MMU)
> ./include/asm-h8300
> ./include/asm-m68knommu
> ./include/asm-v850
>
> Others seem to have it in include/asm-xxxxx/pgtable.h as #define, inline
> function, or extern.

looks like only MMU code currently uses the function, but to keep
things nice, we may want something like:
static inline int is_swap_pte(pte_t pte)
{
#ifdef CONFIG_MMU
return !pte_none(pte) && !pte_present(pte) && !pte_file(pte);
#else
return 0;
#endif
}

the header is also lacking an #include <asm/pgtable.h> at the top ...
-mike

2008-02-08 18:53:50

by Bryan Wu

[permalink] [raw]
Subject: Re: blackfin compile error

On Feb 8, 2008 1:25 PM, Mike Frysinger <[email protected]> wrote:
>
> On Feb 6, 2008 2:12 PM, Robin Getz <[email protected]> wrote:
> > On Wed 6 Feb 2008 11:23, Matt Mackall pondered:
> > > On Wed, 2008-02-06 at 17:18 +0200, Adrian Bunk wrote:
> > > > Commit 698dd4ba6b12e34e1e432c944c01478c0b2cd773 broke blackfin:
> > > >
> > > > <-- snip -->
> > > >
> > > > ...
> > > > CC mm/vmscan.o
> > > > In file included from
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
> > > > make[2]: *** [mm/vmscan.o] Error 1
> > >
> > > This suggests that no one's tried to compile -mm on Blackfin since
> > > before September, I think.
> >
> > Or any other nommu arch's either, since looking at the include files, FRV
> > (when configured as noMMU) and m68knommu does not include it either...
> >
> > > Is there somewhere more appropriate to move it? I can't find one.
> > > Failing that, we can wrap it in CONFIG_MMU, I suppose.
> >
> > Or just add to the the following:
> >
> > ./include/asm-blackfin
> > ./include/asm-frv/ (only when configured as !MMU)
> > ./include/asm-h8300
> > ./include/asm-m68knommu
> > ./include/asm-v850
> >
> > Others seem to have it in include/asm-xxxxx/pgtable.h as #define, inline
> > function, or extern.
>
> looks like only MMU code currently uses the function, but to keep
> things nice, we may want something like:
> static inline int is_swap_pte(pte_t pte)
> {
> #ifdef CONFIG_MMU
> return !pte_none(pte) && !pte_present(pte) && !pte_file(pte);
> #else
> return 0;
> #endif
> }
>
> the header is also lacking an #include <asm/pgtable.h> at the top ...
> -mike
>

Did you submit a patch to mainline? It should be merged to fix this
compiling error.

Thanks a lot
-Bryan

2008-02-08 20:04:51

by Mike Frysinger

[permalink] [raw]
Subject: Re: blackfin compile error

On Feb 8, 2008 1:53 PM, Bryan Wu <[email protected]> wrote:
> On Feb 8, 2008 1:25 PM, Mike Frysinger <[email protected]> wrote:
> > looks like only MMU code currently uses the function, but to keep
> > things nice, we may want something like:
> > static inline int is_swap_pte(pte_t pte)
> > {
> > #ifdef CONFIG_MMU
> > return !pte_none(pte) && !pte_present(pte) && !pte_file(pte);
> > #else
> > return 0;
> > #endif
> > }
> >
> > the header is also lacking an #include <asm/pgtable.h> at the top ...
>
> Did you submit a patch to mainline? It should be merged to fix this
> compiling error.

posted
-mike