3.8-rc4 build regression (was: Re: 3.8-rc1 build failure with MIPS/SPARSEMEM)

2013-01-18 Thread David Daney

Linus, Andrew and Ralf,

3.8 doesn't build on MIPS any more.

Please consider this patch ...

On 12/25/2012 04:34 PM, Kirill A. Shutemov wrote:

On Sat, Dec 22, 2012 at 02:27:57PM +0200, Aaro Koskinen wrote:

Hi,

It looks like commit 816422ad76474fed8052b6f7b905a054d082e59a
(asm-generic, mm: pgtable: consolidate zero page helpers) broke
MIPS/SPARSEMEM build in 3.8-rc1:

   CHK include/generated/uapi/linux/version.h
   CHK include/generated/utsrelease.h
   Checking missing-syscalls for N32
   CC  arch/mips/kernel/asm-offsets.s
In file included from 
/home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: In function 'my_zero_pfn':
include/asm-generic/pgtable.h:462:9: error: implicit declaration of function 
'page_to_section' [-Werror=implicit-function-declaration]
In file included from arch/mips/kernel/asm-offsets.c:14:0:
include/linux/mm.h: At top level:
include/linux/mm.h:708:29: error: conflicting types for 'page_to_section'
In file included from 
/home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h:462:9: note: previous implicit declaration of 
'page_to_section' was here
cc1: some warnings being treated as errors
make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1
make: *** [archprepare] Error 2


The patch below works for me. Could you try?

 From a123a406fdc3aee7ca0eae04b6b4a231872dbb51 Mon Sep 17 00:00:00 2001
From: "Kirill A. Shutemov" 
Date: Wed, 26 Dec 2012 03:19:55 +0300
Subject: [PATCH] asm-generic, mm: pgtable: convert my_zero_pfn() to macros to
  fix build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On MIPS if SPARSEMEM is enabled we've got this:

In file included from 
/home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
include/asm-generic/pgtable.h:466: error: implicit declaration of function 
‘page_to_section’
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/mm.h: At top level:
include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
‘page_to_section’ was here

Due header files inter-dependencies, the only way I see to fix it is
convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.

Signed-off-by: Kirill A. Shutemov 


I arrived (independently) at the identical solution.

Acked-by: David Daney 



---
  include/asm-generic/pgtable.h | 6 ++
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 701beab..5cf680a 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -461,10 +461,8 @@ static inline int is_zero_pfn(unsigned long pfn)
return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT);
  }

-static inline unsigned long my_zero_pfn(unsigned long addr)
-{
-   return page_to_pfn(ZERO_PAGE(addr));
-}
+#define my_zero_pfn(addr)  page_to_pfn(ZERO_PAGE(addr))
+
  #else
  static inline int is_zero_pfn(unsigned long pfn)
  {



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


3.8-rc4 build regression (was: Re: 3.8-rc1 build failure with MIPS/SPARSEMEM)

2013-01-18 Thread David Daney

Linus, Andrew and Ralf,

3.8 doesn't build on MIPS any more.

Please consider this patch ...

On 12/25/2012 04:34 PM, Kirill A. Shutemov wrote:

On Sat, Dec 22, 2012 at 02:27:57PM +0200, Aaro Koskinen wrote:

Hi,

It looks like commit 816422ad76474fed8052b6f7b905a054d082e59a
(asm-generic, mm: pgtable: consolidate zero page helpers) broke
MIPS/SPARSEMEM build in 3.8-rc1:

   CHK include/generated/uapi/linux/version.h
   CHK include/generated/utsrelease.h
   Checking missing-syscalls for N32
   CC  arch/mips/kernel/asm-offsets.s
In file included from 
/home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: In function 'my_zero_pfn':
include/asm-generic/pgtable.h:462:9: error: implicit declaration of function 
'page_to_section' [-Werror=implicit-function-declaration]
In file included from arch/mips/kernel/asm-offsets.c:14:0:
include/linux/mm.h: At top level:
include/linux/mm.h:708:29: error: conflicting types for 'page_to_section'
In file included from 
/home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h:462:9: note: previous implicit declaration of 
'page_to_section' was here
cc1: some warnings being treated as errors
make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1
make: *** [archprepare] Error 2


The patch below works for me. Could you try?

 From a123a406fdc3aee7ca0eae04b6b4a231872dbb51 Mon Sep 17 00:00:00 2001
From: Kirill A. Shutemov kir...@shutemov.name
Date: Wed, 26 Dec 2012 03:19:55 +0300
Subject: [PATCH] asm-generic, mm: pgtable: convert my_zero_pfn() to macros to
  fix build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On MIPS if SPARSEMEM is enabled we've got this:

In file included from 
/home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
include/asm-generic/pgtable.h:466: error: implicit declaration of function 
‘page_to_section’
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/mm.h: At top level:
include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
‘page_to_section’ was here

Due header files inter-dependencies, the only way I see to fix it is
convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.

Signed-off-by: Kirill A. Shutemov kir...@shutemov.name


I arrived (independently) at the identical solution.

Acked-by: David Daney david.da...@cavium.com



---
  include/asm-generic/pgtable.h | 6 ++
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 701beab..5cf680a 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -461,10 +461,8 @@ static inline int is_zero_pfn(unsigned long pfn)
return offset_from_zero_pfn = (zero_page_mask  PAGE_SHIFT);
  }

-static inline unsigned long my_zero_pfn(unsigned long addr)
-{
-   return page_to_pfn(ZERO_PAGE(addr));
-}
+#define my_zero_pfn(addr)  page_to_pfn(ZERO_PAGE(addr))
+
  #else
  static inline int is_zero_pfn(unsigned long pfn)
  {



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2013-01-14 Thread David Daney

On 01/14/2013 07:16 AM, Kirill A. Shutemov wrote:

On Sun, Dec 30, 2012 at 12:38:50PM +0200, Kirill A. Shutemov wrote:

On Thu, Dec 27, 2012 at 02:16:07PM +0200, Aaro Koskinen wrote:

Hi,

On Wed, Dec 26, 2012 at 02:34:35AM +0200, Kirill A. Shutemov wrote:

On MIPS if SPARSEMEM is enabled we've got this:

In file included from 
/home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
include/asm-generic/pgtable.h:466: error: implicit declaration of function 
‘page_to_section’
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/mm.h: At top level:
include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
‘page_to_section’ was here

Due header files inter-dependencies, the only way I see to fix it is
convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.

Signed-off-by: Kirill A. Shutemov 


Thanks, this works.

Tested-by: Aaro Koskinen 


Andrew, could you take the patch?


I found the same problem and arrived at an equivalent solution.

Acked-by: David Daney 



ping?



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2013-01-14 Thread Kirill A. Shutemov
On Sun, Dec 30, 2012 at 12:38:50PM +0200, Kirill A. Shutemov wrote:
> On Thu, Dec 27, 2012 at 02:16:07PM +0200, Aaro Koskinen wrote:
> > Hi,
> > 
> > On Wed, Dec 26, 2012 at 02:34:35AM +0200, Kirill A. Shutemov wrote:
> > > On MIPS if SPARSEMEM is enabled we've got this:
> > > 
> > > In file included from 
> > > /home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
> > >  from include/linux/mm.h:44,
> > >  from arch/mips/kernel/asm-offsets.c:14:
> > > include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
> > > include/asm-generic/pgtable.h:466: error: implicit declaration of 
> > > function ‘page_to_section’
> > > In file included from arch/mips/kernel/asm-offsets.c:14:
> > > include/linux/mm.h: At top level:
> > > include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
> > > include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
> > > ‘page_to_section’ was here
> > > 
> > > Due header files inter-dependencies, the only way I see to fix it is
> > > convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.
> > > 
> > > Signed-off-by: Kirill A. Shutemov 
> > 
> > Thanks, this works.
> > 
> > Tested-by: Aaro Koskinen 
> 
> Andrew, could you take the patch?

ping?

-- 
 Kirill A. Shutemov


signature.asc
Description: Digital signature


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2013-01-14 Thread Kirill A. Shutemov
On Sun, Dec 30, 2012 at 12:38:50PM +0200, Kirill A. Shutemov wrote:
 On Thu, Dec 27, 2012 at 02:16:07PM +0200, Aaro Koskinen wrote:
  Hi,
  
  On Wed, Dec 26, 2012 at 02:34:35AM +0200, Kirill A. Shutemov wrote:
   On MIPS if SPARSEMEM is enabled we've got this:
   
   In file included from 
   /home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
from include/linux/mm.h:44,
from arch/mips/kernel/asm-offsets.c:14:
   include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
   include/asm-generic/pgtable.h:466: error: implicit declaration of 
   function ‘page_to_section’
   In file included from arch/mips/kernel/asm-offsets.c:14:
   include/linux/mm.h: At top level:
   include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
   include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
   ‘page_to_section’ was here
   
   Due header files inter-dependencies, the only way I see to fix it is
   convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.
   
   Signed-off-by: Kirill A. Shutemov kir...@shutemov.name
  
  Thanks, this works.
  
  Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 
 Andrew, could you take the patch?

ping?

-- 
 Kirill A. Shutemov


signature.asc
Description: Digital signature


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2013-01-14 Thread David Daney

On 01/14/2013 07:16 AM, Kirill A. Shutemov wrote:

On Sun, Dec 30, 2012 at 12:38:50PM +0200, Kirill A. Shutemov wrote:

On Thu, Dec 27, 2012 at 02:16:07PM +0200, Aaro Koskinen wrote:

Hi,

On Wed, Dec 26, 2012 at 02:34:35AM +0200, Kirill A. Shutemov wrote:

On MIPS if SPARSEMEM is enabled we've got this:

In file included from 
/home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
include/asm-generic/pgtable.h:466: error: implicit declaration of function 
‘page_to_section’
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/mm.h: At top level:
include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
‘page_to_section’ was here

Due header files inter-dependencies, the only way I see to fix it is
convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.

Signed-off-by: Kirill A. Shutemov kir...@shutemov.name


Thanks, this works.

Tested-by: Aaro Koskinen aaro.koski...@iki.fi


Andrew, could you take the patch?


I found the same problem and arrived at an equivalent solution.

Acked-by: David Daney david.da...@cavium.com



ping?



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-30 Thread Kirill A. Shutemov
On Thu, Dec 27, 2012 at 02:16:07PM +0200, Aaro Koskinen wrote:
> Hi,
> 
> On Wed, Dec 26, 2012 at 02:34:35AM +0200, Kirill A. Shutemov wrote:
> > On MIPS if SPARSEMEM is enabled we've got this:
> > 
> > In file included from 
> > /home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
> >  from include/linux/mm.h:44,
> >  from arch/mips/kernel/asm-offsets.c:14:
> > include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
> > include/asm-generic/pgtable.h:466: error: implicit declaration of function 
> > ‘page_to_section’
> > In file included from arch/mips/kernel/asm-offsets.c:14:
> > include/linux/mm.h: At top level:
> > include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
> > include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
> > ‘page_to_section’ was here
> > 
> > Due header files inter-dependencies, the only way I see to fix it is
> > convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.
> > 
> > Signed-off-by: Kirill A. Shutemov 
> 
> Thanks, this works.
> 
> Tested-by: Aaro Koskinen 

Andrew, could you take the patch?

-- 
 Kirill A. Shutemov


signature.asc
Description: Digital signature


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-30 Thread Kirill A. Shutemov
On Thu, Dec 27, 2012 at 02:16:07PM +0200, Aaro Koskinen wrote:
 Hi,
 
 On Wed, Dec 26, 2012 at 02:34:35AM +0200, Kirill A. Shutemov wrote:
  On MIPS if SPARSEMEM is enabled we've got this:
  
  In file included from 
  /home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
   from include/linux/mm.h:44,
   from arch/mips/kernel/asm-offsets.c:14:
  include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
  include/asm-generic/pgtable.h:466: error: implicit declaration of function 
  ‘page_to_section’
  In file included from arch/mips/kernel/asm-offsets.c:14:
  include/linux/mm.h: At top level:
  include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
  include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
  ‘page_to_section’ was here
  
  Due header files inter-dependencies, the only way I see to fix it is
  convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.
  
  Signed-off-by: Kirill A. Shutemov kir...@shutemov.name
 
 Thanks, this works.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi

Andrew, could you take the patch?

-- 
 Kirill A. Shutemov


signature.asc
Description: Digital signature


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-27 Thread Aaro Koskinen
Hi,

On Wed, Dec 26, 2012 at 02:34:35AM +0200, Kirill A. Shutemov wrote:
> On MIPS if SPARSEMEM is enabled we've got this:
> 
> In file included from 
> /home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
>  from include/linux/mm.h:44,
>  from arch/mips/kernel/asm-offsets.c:14:
> include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
> include/asm-generic/pgtable.h:466: error: implicit declaration of function 
> ‘page_to_section’
> In file included from arch/mips/kernel/asm-offsets.c:14:
> include/linux/mm.h: At top level:
> include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
> include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
> ‘page_to_section’ was here
> 
> Due header files inter-dependencies, the only way I see to fix it is
> convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.
> 
> Signed-off-by: Kirill A. Shutemov 

Thanks, this works.

Tested-by: Aaro Koskinen 

A.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-27 Thread Aaro Koskinen
Hi,

On Wed, Dec 26, 2012 at 02:34:35AM +0200, Kirill A. Shutemov wrote:
 On MIPS if SPARSEMEM is enabled we've got this:
 
 In file included from 
 /home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
 include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
 include/asm-generic/pgtable.h:466: error: implicit declaration of function 
 ‘page_to_section’
 In file included from arch/mips/kernel/asm-offsets.c:14:
 include/linux/mm.h: At top level:
 include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
 include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
 ‘page_to_section’ was here
 
 Due header files inter-dependencies, the only way I see to fix it is
 convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.
 
 Signed-off-by: Kirill A. Shutemov kir...@shutemov.name

Thanks, this works.

Tested-by: Aaro Koskinen aaro.koski...@iki.fi

A.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-25 Thread Kirill A. Shutemov
On Sat, Dec 22, 2012 at 02:27:57PM +0200, Aaro Koskinen wrote:
> Hi,
> 
> It looks like commit 816422ad76474fed8052b6f7b905a054d082e59a
> (asm-generic, mm: pgtable: consolidate zero page helpers) broke
> MIPS/SPARSEMEM build in 3.8-rc1:
> 
>   CHK include/generated/uapi/linux/version.h
>   CHK include/generated/utsrelease.h
>   Checking missing-syscalls for N32
>   CC  arch/mips/kernel/asm-offsets.s
> In file included from 
> /home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
>  from include/linux/mm.h:44,
>  from arch/mips/kernel/asm-offsets.c:14:
> include/asm-generic/pgtable.h: In function 'my_zero_pfn':
> include/asm-generic/pgtable.h:462:9: error: implicit declaration of function 
> 'page_to_section' [-Werror=implicit-function-declaration]
> In file included from arch/mips/kernel/asm-offsets.c:14:0:
> include/linux/mm.h: At top level:
> include/linux/mm.h:708:29: error: conflicting types for 'page_to_section'
> In file included from 
> /home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
>  from include/linux/mm.h:44,
>  from arch/mips/kernel/asm-offsets.c:14:
> include/asm-generic/pgtable.h:462:9: note: previous implicit declaration of 
> 'page_to_section' was here
> cc1: some warnings being treated as errors
> make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1
> make: *** [archprepare] Error 2

The patch below works for me. Could you try?

From a123a406fdc3aee7ca0eae04b6b4a231872dbb51 Mon Sep 17 00:00:00 2001
From: "Kirill A. Shutemov" 
Date: Wed, 26 Dec 2012 03:19:55 +0300
Subject: [PATCH] asm-generic, mm: pgtable: convert my_zero_pfn() to macros to
 fix build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On MIPS if SPARSEMEM is enabled we've got this:

In file included from 
/home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
 from include/linux/mm.h:44,
 from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
include/asm-generic/pgtable.h:466: error: implicit declaration of function 
‘page_to_section’
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/mm.h: At top level:
include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
‘page_to_section’ was here

Due header files inter-dependencies, the only way I see to fix it is
convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.

Signed-off-by: Kirill A. Shutemov 
---
 include/asm-generic/pgtable.h | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 701beab..5cf680a 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -461,10 +461,8 @@ static inline int is_zero_pfn(unsigned long pfn)
return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT);
 }
 
-static inline unsigned long my_zero_pfn(unsigned long addr)
-{
-   return page_to_pfn(ZERO_PAGE(addr));
-}
+#define my_zero_pfn(addr)  page_to_pfn(ZERO_PAGE(addr))
+
 #else
 static inline int is_zero_pfn(unsigned long pfn)
 {
-- 
1.8.0.2

-- 
 Kirill A. Shutemov


signature.asc
Description: Digital signature


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-25 Thread Kirill A. Shutemov
On Sat, Dec 22, 2012 at 02:27:57PM +0200, Aaro Koskinen wrote:
 Hi,
 
 It looks like commit 816422ad76474fed8052b6f7b905a054d082e59a
 (asm-generic, mm: pgtable: consolidate zero page helpers) broke
 MIPS/SPARSEMEM build in 3.8-rc1:
 
   CHK include/generated/uapi/linux/version.h
   CHK include/generated/utsrelease.h
   Checking missing-syscalls for N32
   CC  arch/mips/kernel/asm-offsets.s
 In file included from 
 /home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
 include/asm-generic/pgtable.h: In function 'my_zero_pfn':
 include/asm-generic/pgtable.h:462:9: error: implicit declaration of function 
 'page_to_section' [-Werror=implicit-function-declaration]
 In file included from arch/mips/kernel/asm-offsets.c:14:0:
 include/linux/mm.h: At top level:
 include/linux/mm.h:708:29: error: conflicting types for 'page_to_section'
 In file included from 
 /home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
  from include/linux/mm.h:44,
  from arch/mips/kernel/asm-offsets.c:14:
 include/asm-generic/pgtable.h:462:9: note: previous implicit declaration of 
 'page_to_section' was here
 cc1: some warnings being treated as errors
 make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1
 make: *** [archprepare] Error 2

The patch below works for me. Could you try?

From a123a406fdc3aee7ca0eae04b6b4a231872dbb51 Mon Sep 17 00:00:00 2001
From: Kirill A. Shutemov kir...@shutemov.name
Date: Wed, 26 Dec 2012 03:19:55 +0300
Subject: [PATCH] asm-generic, mm: pgtable: convert my_zero_pfn() to macros to
 fix build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On MIPS if SPARSEMEM is enabled we've got this:

In file included from 
/home/kas/git/public/linux/arch/mips/include/asm/pgtable.h:552,
 from include/linux/mm.h:44,
 from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: In function ‘my_zero_pfn’:
include/asm-generic/pgtable.h:466: error: implicit declaration of function 
‘page_to_section’
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/mm.h: At top level:
include/linux/mm.h:738: error: conflicting types for ‘page_to_section’
include/asm-generic/pgtable.h:466: note: previous implicit declaration of 
‘page_to_section’ was here

Due header files inter-dependencies, the only way I see to fix it is
convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros.

Signed-off-by: Kirill A. Shutemov kir...@shutemov.name
---
 include/asm-generic/pgtable.h | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 701beab..5cf680a 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -461,10 +461,8 @@ static inline int is_zero_pfn(unsigned long pfn)
return offset_from_zero_pfn = (zero_page_mask  PAGE_SHIFT);
 }
 
-static inline unsigned long my_zero_pfn(unsigned long addr)
-{
-   return page_to_pfn(ZERO_PAGE(addr));
-}
+#define my_zero_pfn(addr)  page_to_pfn(ZERO_PAGE(addr))
+
 #else
 static inline int is_zero_pfn(unsigned long pfn)
 {
-- 
1.8.0.2

-- 
 Kirill A. Shutemov


signature.asc
Description: Digital signature


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-22 Thread Aaro Koskinen
Hi,

On Sat, Dec 22, 2012 at 03:10:23PM +0200, Kirill A. Shutemov wrote:
> On Sat, Dec 22, 2012 at 02:27:57PM +0200, Aaro Koskinen wrote:
> > It looks like commit 816422ad76474fed8052b6f7b905a054d082e59a
> > (asm-generic, mm: pgtable: consolidate zero page helpers) broke
> > MIPS/SPARSEMEM build in 3.8-rc1:
> 
> Could you try this:
> 
> http://permalink.gmane.org/gmane.linux.kernel/1410981

It's not helping. And if you look at the error, it shows linux/mm.h is
already there?

[...]
In file included from 
/home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
 from include/linux/mm.h:44,
 from arch/mips/kernel/asm-offsets.c:14:
[...]

A.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-22 Thread Kirill A. Shutemov
On Sat, Dec 22, 2012 at 02:27:57PM +0200, Aaro Koskinen wrote:
> Hi,
> 
> It looks like commit 816422ad76474fed8052b6f7b905a054d082e59a
> (asm-generic, mm: pgtable: consolidate zero page helpers) broke
> MIPS/SPARSEMEM build in 3.8-rc1:

Could you try this:

http://permalink.gmane.org/gmane.linux.kernel/1410981

?
-- 
 Kirill A. Shutemov


signature.asc
Description: Digital signature


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-22 Thread Kirill A. Shutemov
On Sat, Dec 22, 2012 at 02:27:57PM +0200, Aaro Koskinen wrote:
 Hi,
 
 It looks like commit 816422ad76474fed8052b6f7b905a054d082e59a
 (asm-generic, mm: pgtable: consolidate zero page helpers) broke
 MIPS/SPARSEMEM build in 3.8-rc1:

Could you try this:

http://permalink.gmane.org/gmane.linux.kernel/1410981

?
-- 
 Kirill A. Shutemov


signature.asc
Description: Digital signature


Re: 3.8-rc1 build failure with MIPS/SPARSEMEM

2012-12-22 Thread Aaro Koskinen
Hi,

On Sat, Dec 22, 2012 at 03:10:23PM +0200, Kirill A. Shutemov wrote:
 On Sat, Dec 22, 2012 at 02:27:57PM +0200, Aaro Koskinen wrote:
  It looks like commit 816422ad76474fed8052b6f7b905a054d082e59a
  (asm-generic, mm: pgtable: consolidate zero page helpers) broke
  MIPS/SPARSEMEM build in 3.8-rc1:
 
 Could you try this:
 
 http://permalink.gmane.org/gmane.linux.kernel/1410981

It's not helping. And if you look at the error, it shows linux/mm.h is
already there?

[...]
In file included from 
/home/aaro/git/linux/arch/mips/include/asm/pgtable.h:388:0,
 from include/linux/mm.h:44,
 from arch/mips/kernel/asm-offsets.c:14:
[...]

A.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/