Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 03:17:38PM -0800, Pallipadi, Venkatesh wrote:
> >#define X X
> >
> >is a no-op, yes?
> >
> 
> Later there is code in generic.h which is doing
> #ifndef ioremap_wc
> #define ioremap_wc ioremap_nocache
> #endif

Ah, that makes a bit more sense.

It'd be nice if there was less of a WTF factor there, though.

Jeff

-- 
Work email - jdike at linux dot intel dot com

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


RE: [-mm Patch] uml: fix a building error

2008-01-17 Thread Pallipadi, Venkatesh
 

>-Original Message-
>From: Jeff Dike [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, January 17, 2008 3:08 PM
>To: Pallipadi, Venkatesh
>Cc: Andrew Morton; Mariusz Kozlowski; WANG Cong; 
>linux-kernel@vger.kernel.org; 
>[EMAIL PROTECTED]; David Miller; 
>[EMAIL PROTECTED]; Ingo Molnar; Thomas Gleixner
>Subject: Re: [-mm Patch] uml: fix a building error
>
>On Thu, Jan 17, 2008 at 01:41:50PM -0800, Venki Pallipadi wrote:
>> > And while we're on the subject, what's the deal with these, in
>> > include/asm-x86/io.h?
>> > 
>> > #define ioremap_wc ioremap_wc
>> > #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
>> > 
>> 
>> If archs want to override the defaults for these two 
>functions, they define
>> the above and then include asm-generic/iomap.h.
>
>That wasn't really the question.
>
>#define X X
>
>is a no-op, yes?
>

Later there is code in generic.h which is doing
#ifndef ioremap_wc
#define ioremap_wc ioremap_nocache
#endif


Thanks,
Venki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 01:41:50PM -0800, Venki Pallipadi wrote:
> > And while we're on the subject, what's the deal with these, in
> > include/asm-x86/io.h?
> > 
> > #define ioremap_wc ioremap_wc
> > #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
> > 
> 
> If archs want to override the defaults for these two functions, they define
> the above and then include asm-generic/iomap.h.

That wasn't really the question.

#define X X

is a no-op, yes?

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Venki Pallipadi
On Thu, Jan 17, 2008 at 04:14:37PM -0500, Jeff Dike wrote:
> On Thu, Jan 17, 2008 at 11:38:53AM -0800, Pallipadi, Venkatesh wrote:
> > Apart from unxlate, there is also ioremap_wc which is defined in the
> > same way.
> 
> And while we're on the subject, what's the deal with these, in
> include/asm-x86/io.h?
> 
> #define ioremap_wc ioremap_wc
> #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
> 

If archs want to override the defaults for these two functions, they define
the above and then include asm-generic/iomap.h.

Archs which doesnt want to implement anything in these new funcs just have to
include asm-generic/iomap.h which has the proper stubs.

So, a patch like the below is what is required here for all archs to
include asm-generic iomap.h (without the other patch that
defines null unxlate in asm specific header).

Totally untested.

Thanks,
Venki

Signed-off-by: Venkatesh Pallipadi <[EMAIL PROTECTED]>

Index: linux-2.6.git/include/asm-arm/io.h
===
--- linux-2.6.git.orig/include/asm-arm/io.h 2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-arm/io.h  2008-01-17 06:39:13.0 -0800
@@ -27,6 +27,8 @@
 #include 
 #include 
 
+#include 
+
 /*
  * ISA I/O bus memory addresses are 1:1 with the physical address.
  */
Index: linux-2.6.git/include/asm-avr32/io.h
===
--- linux-2.6.git.orig/include/asm-avr32/io.h   2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-avr32/io.h2008-01-17 06:39:13.0 
-0800
@@ -10,6 +10,8 @@
 
 #include 
 
+#include 
+
 /* virt_to_phys will only work when address is in P1 or P2 */
 static __inline__ unsigned long virt_to_phys(volatile void *address)
 {
Index: linux-2.6.git/include/asm-blackfin/io.h
===
--- linux-2.6.git.orig/include/asm-blackfin/io.h2008-01-17 
06:28:06.0 -0800
+++ linux-2.6.git/include/asm-blackfin/io.h 2008-01-17 06:39:13.0 
-0800
@@ -8,6 +8,8 @@
 #endif
 #include 
 
+#include 
+
 /*
  * These are for ISA/PCI shared memory _only_ and should never be used
  * on any other type of memory, including Zorro memory. They are meant to
Index: linux-2.6.git/include/asm-cris/io.h
===
--- linux-2.6.git.orig/include/asm-cris/io.h2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-cris/io.h 2008-01-17 06:39:13.0 -0800
@@ -5,6 +5,8 @@
 #include 
 #include 
 
+#include 
+
 struct cris_io_operations
 {
u32 (*read_mem)(void *addr, int size);
Index: linux-2.6.git/include/asm-frv/io.h
===
--- linux-2.6.git.orig/include/asm-frv/io.h 2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-frv/io.h  2008-01-17 06:39:13.0 -0800
@@ -23,6 +23,8 @@
 #include 
 #include 
 
+#include 
+
 /*
  * swap functions are sometimes needed to interface little-endian hardware
  */
Index: linux-2.6.git/include/asm-h8300/io.h
===
--- linux-2.6.git.orig/include/asm-h8300/io.h   2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-h8300/io.h2008-01-17 06:39:13.0 
-0800
@@ -13,6 +13,8 @@
 #error UNKNOWN CPU TYPE
 #endif
 
+#include 
+
 
 /*
  * These are for ISA/PCI shared memory _only_ and should never be used
Index: linux-2.6.git/include/asm-m32r/io.h
===
--- linux-2.6.git.orig/include/asm-m32r/io.h2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-m32r/io.h 2008-01-17 06:39:13.0 -0800
@@ -5,6 +5,8 @@
 #include 
 #include   /* __va */
 
+#include 
+
 #ifdef __KERNEL__
 
 #define IO_SPACE_LIMIT  0x
Index: linux-2.6.git/include/asm-m68knommu/io.h
===
--- linux-2.6.git.orig/include/asm-m68knommu/io.h   2008-01-17 
06:28:06.0 -0800
+++ linux-2.6.git/include/asm-m68knommu/io.h2008-01-17 06:39:13.0 
-0800
@@ -1,6 +1,8 @@
 #ifndef _M68KNOMMU_IO_H
 #define _M68KNOMMU_IO_H
 
+#include 
+
 #ifdef __KERNEL__
 
 
Index: linux-2.6.git/include/asm-ppc/io.h
===
--- linux-2.6.git.orig/include/asm-ppc/io.h 2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-ppc/io.h  2008-01-17 06:39:13.0 -0800
@@ -10,6 +10,8 @@
 #include 
 #include 
 
+#include 
+
 #define SIO_CONFIG_RA  0x398
 #define SIO_CONFIG_RD  0x399
 
Index: linux-2.6.git/include/asm-s390/io.h
===
--- linux-2.6.git.orig/include/asm-s390/io.h2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-s390/io.h 2008-01-17 06:39:13.0 -0800
@@ -15,6 +15,8 @@
 
 

Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 11:38:53AM -0800, Pallipadi, Venkatesh wrote:
> Apart from unxlate, there is also ioremap_wc which is defined in the
> same way.

And while we're on the subject, what's the deal with these, in
include/asm-x86/io.h?

#define ioremap_wc ioremap_wc
#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Mariusz Kozlowski
Hello,

> >> > This patch fixes this building error:
> >> > ...
> >> > drivers/char/mem.c: In function 'read_mem':
> >> > drivers/char/mem.c:136: error: implicit declaration of 
> >function 'unxlate_dev_mem_ptr'
> >> > ...
> >> 
> >> I see this on sparc64 as well:
> >> 
> >>   CC  drivers/char/mem.o
> >> drivers/char/mem.c: In function 'read_mem':
> >> drivers/char/mem.c:136: error: implicit declaration of 
> >function 'unxlate_dev_mem_ptr'
> >> make[2]: *** [drivers/char/mem.o] Error 1
> >> make[1]: *** [drivers/char] Error 2
> >> make: *** [drivers] Error 2
> >> 
> >> Does sparc64 need similar fix?
> >> 
> >
> >The PAT patches strike again.
> >
> >Ingo, I think you might need to toss some cross-compilers into 
> >that build
> >test setup of yours.
> 
> These functions were defined for other archs in asm-generic/iomap.h.
> We need all archs including it in io.h. I now see only few archs are
> including it..
>
> Apart from unxlate, there is also ioremap_wc which is defined in the
> same way.
> 
> I can send a patch for this. But, I don't have cross compiler setup for
> all archs to test. Andrew, I will need your help.

I can confirm that this fixes the build problem for sparc64 here.

Regards,

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


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 11:38:53 -0800 "Pallipadi, Venkatesh" <[EMAIL PROTECTED]> 
wrote:

>  
> 
> >-Original Message-
> >From: Andrew Morton [mailto:[EMAIL PROTECTED] 
> >Sent: Thursday, January 17, 2008 10:56 AM
> >To: Mariusz Kozlowski
> >Cc: WANG Cong; linux-kernel@vger.kernel.org; Jeff Dike; 
> >[EMAIL PROTECTED]; David Miller; 
> >[EMAIL PROTECTED]; Ingo Molnar; Thomas Gleixner; 
> >Pallipadi, Venkatesh
> >Subject: Re: [-mm Patch] uml: fix a building error
> >
> >On Thu, 17 Jan 2008 19:11:13 +0100 Mariusz Kozlowski 
> ><[EMAIL PROTECTED]> wrote:
> >
> >> Hello,
> >> 
> >> > This patch fixes this building error:
> >> > ...
> >> > drivers/char/mem.c: In function 'read_mem':
> >> > drivers/char/mem.c:136: error: implicit declaration of 
> >function 'unxlate_dev_mem_ptr'
> >> > ...
> >> 
> >> I see this on sparc64 as well:
> >> 
> >>   CC  drivers/char/mem.o
> >> drivers/char/mem.c: In function 'read_mem':
> >> drivers/char/mem.c:136: error: implicit declaration of 
> >function 'unxlate_dev_mem_ptr'
> >> make[2]: *** [drivers/char/mem.o] Error 1
> >> make[1]: *** [drivers/char] Error 2
> >> make: *** [drivers] Error 2
> >> 
> >> Does sparc64 need similar fix?
> >> 
> >
> >The PAT patches strike again.
> >
> >Ingo, I think you might need to toss some cross-compilers into 
> >that build
> >test setup of yours.
> >
> 
> These functions were defined for other archs in asm-generic/iomap.h.
> We need all archs including it in io.h. I now see only few archs are
> including it..
> 
> Apart from unxlate, there is also ioremap_wc which is defined in the
> same way.
> 
> I can send a patch for this. But, I don't have cross compiler setup for
> all archs to test. Andrew, I will need your help.

Well.

- there are a bunch of cross-compiler binaries in
  http://userweb.kernel.org/~akpm/cross-compilers/

- I'll (again) encourage Ingo to add cross-compilation testing to his
  auto-testing setup. 

- I ran out of steam (and the selinux bug crashed my remote
  cross-compilation test box) so I didn't do much cross-compilation testing
  on rc8-mm1: just alpha and ia64 iirc.  

I'd suggest that you just prepare a best-effort patch and when I next get
around to doing more cross-compilation any problems shold get weeded out.

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


RE: [-mm Patch] uml: fix a building error

2008-01-17 Thread Pallipadi, Venkatesh
 

>-Original Message-
>From: Andrew Morton [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, January 17, 2008 10:56 AM
>To: Mariusz Kozlowski
>Cc: WANG Cong; linux-kernel@vger.kernel.org; Jeff Dike; 
>[EMAIL PROTECTED]; David Miller; 
>[EMAIL PROTECTED]; Ingo Molnar; Thomas Gleixner; 
>Pallipadi, Venkatesh
>Subject: Re: [-mm Patch] uml: fix a building error
>
>On Thu, 17 Jan 2008 19:11:13 +0100 Mariusz Kozlowski 
><[EMAIL PROTECTED]> wrote:
>
>> Hello,
>> 
>> > This patch fixes this building error:
>> > ...
>> > drivers/char/mem.c: In function 'read_mem':
>> > drivers/char/mem.c:136: error: implicit declaration of 
>function 'unxlate_dev_mem_ptr'
>> > ...
>> 
>> I see this on sparc64 as well:
>> 
>>   CC  drivers/char/mem.o
>> drivers/char/mem.c: In function 'read_mem':
>> drivers/char/mem.c:136: error: implicit declaration of 
>function 'unxlate_dev_mem_ptr'
>> make[2]: *** [drivers/char/mem.o] Error 1
>> make[1]: *** [drivers/char] Error 2
>> make: *** [drivers] Error 2
>> 
>> Does sparc64 need similar fix?
>> 
>
>The PAT patches strike again.
>
>Ingo, I think you might need to toss some cross-compilers into 
>that build
>test setup of yours.
>

These functions were defined for other archs in asm-generic/iomap.h.
We need all archs including it in io.h. I now see only few archs are
including it..

Apart from unxlate, there is also ioremap_wc which is defined in the
same way.

I can send a patch for this. But, I don't have cross compiler setup for
all archs to test. Andrew, I will need your help.

Thanks,
Venki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 07:11:13PM +0100, Mariusz Kozlowski wrote:
> I see this on sparc64 as well:
> 
>   CC  drivers/char/mem.o
> drivers/char/mem.c: In function 'read_mem':
> drivers/char/mem.c:136: error: implicit declaration of function 
> 'unxlate_dev_mem_ptr'
> make[2]: *** [drivers/char/mem.o] Error 1
> make[1]: *** [drivers/char] Error 2
> make: *** [drivers] Error 2
> 
> Does sparc64 need similar fix?

Probably - it seems that xlate_dev_mem_ptr can now introduce
side-effects which need to be undone with unxlate_dev_mem_ptr.

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 19:11:13 +0100 Mariusz Kozlowski <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> > This patch fixes this building error:
> > ...
> > drivers/char/mem.c: In function ‘read_mem’:
> > drivers/char/mem.c:136: error: implicit declaration of function 
> > ‘unxlate_dev_mem_ptr’
> > ...
> 
> I see this on sparc64 as well:
> 
>   CC  drivers/char/mem.o
> drivers/char/mem.c: In function 'read_mem':
> drivers/char/mem.c:136: error: implicit declaration of function 
> 'unxlate_dev_mem_ptr'
> make[2]: *** [drivers/char/mem.o] Error 1
> make[1]: *** [drivers/char] Error 2
> make: *** [drivers] Error 2
> 
> Does sparc64 need similar fix?
> 

The PAT patches strike again.

Ingo, I think you might need to toss some cross-compilers into that build
test setup of yours.

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


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Mariusz Kozlowski
Hello,

> This patch fixes this building error:
> ...
> drivers/char/mem.c: In function ‘read_mem’:
> drivers/char/mem.c:136: error: implicit declaration of function 
> ‘unxlate_dev_mem_ptr’
> ...

I see this on sparc64 as well:

  CC  drivers/char/mem.o
drivers/char/mem.c: In function 'read_mem':
drivers/char/mem.c:136: error: implicit declaration of function 
'unxlate_dev_mem_ptr'
make[2]: *** [drivers/char/mem.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2

Does sparc64 need similar fix?

Regards,

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


Re: [-mm Patch] UML: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 09:21:08PM +0800, WANG Cong wrote:
> Building uml failed in current -mm tree. ;(
> 
> The below patch fixes this building error:
> ...
> include/asm/arch/system.h:8:22: error: asm/nops.h: No such file or directory
> ...
> 
> Cc: Jeff Dike <[EMAIL PROTECTED]>
> Signed-off-by: WANG Cong <[EMAIL PROTECTED]>

ACK

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 09:56:41PM +0800, WANG Cong wrote:
> 
> This patch fixes this building error:
> ...
> drivers/char/mem.c: In function ‘read_mem’:
> drivers/char/mem.c:136: error: implicit declaration of function 
> ‘unxlate_dev_mem_ptr’
> ...
> 
> Cc: Jeff Dike <[EMAIL PROTECTED]>
> Signed-off-by: WANG Cong <[EMAIL PROTECTED]>

ACK

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[-mm Patch] uml: fix a building error

2008-01-17 Thread WANG Cong

This patch fixes this building error:
...
drivers/char/mem.c: In function ‘read_mem’:
drivers/char/mem.c:136: error: implicit declaration of function 
‘unxlate_dev_mem_ptr’
...

Cc: Jeff Dike <[EMAIL PROTECTED]>
Signed-off-by: WANG Cong <[EMAIL PROTECTED]>

---

Index: linux/include/asm-um/io.h
===
--- linux.orig/include/asm-um/io.h
+++ linux/include/asm-um/io.h
@@ -27,6 +27,7 @@ static inline void * phys_to_virt(unsign
  * access
  */
 #define xlate_dev_mem_ptr(p)   __va(p)
+#define unxlate_dev_mem_ptr(p, ptr)
 
 /*
  * Convert a virtual cached pointer to an uncached pointer
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[-mm Patch] UML: fix a building error

2008-01-17 Thread WANG Cong
On Thu, Jan 17, 2008 at 02:35:14AM -0800, Andrew Morton wrote:
>
>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc8/2.6.24-rc8-mm1/
>

Hi, Andrew!

Building uml failed in current -mm tree. ;(

The below patch fixes this building error:
...
include/asm/arch/system.h:8:22: error: asm/nops.h: No such file or directory
...

Cc: Jeff Dike <[EMAIL PROTECTED]>
Signed-off-by: WANG Cong <[EMAIL PROTECTED]>

---

Index: linux/include/asm-um/nops.h
===
--- /dev/null
+++ linux/include/asm-um/nops.h
@@ -0,0 +1,6 @@
+#ifndef __UM_NOPS_H
+#define __UM_NOPS_H
+
+#include "asm/arch/nops.h"
+
+#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[-mm Patch] UML: fix a building error

2008-01-17 Thread WANG Cong
On Thu, Jan 17, 2008 at 02:35:14AM -0800, Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc8/2.6.24-rc8-mm1/


Hi, Andrew!

Building uml failed in current -mm tree. ;(

The below patch fixes this building error:
...
include/asm/arch/system.h:8:22: error: asm/nops.h: No such file or directory
...

Cc: Jeff Dike [EMAIL PROTECTED]
Signed-off-by: WANG Cong [EMAIL PROTECTED]

---

Index: linux/include/asm-um/nops.h
===
--- /dev/null
+++ linux/include/asm-um/nops.h
@@ -0,0 +1,6 @@
+#ifndef __UM_NOPS_H
+#define __UM_NOPS_H
+
+#include asm/arch/nops.h
+
+#endif
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[-mm Patch] uml: fix a building error

2008-01-17 Thread WANG Cong

This patch fixes this building error:
...
drivers/char/mem.c: In function ‘read_mem’:
drivers/char/mem.c:136: error: implicit declaration of function 
‘unxlate_dev_mem_ptr’
...

Cc: Jeff Dike [EMAIL PROTECTED]
Signed-off-by: WANG Cong [EMAIL PROTECTED]

---

Index: linux/include/asm-um/io.h
===
--- linux.orig/include/asm-um/io.h
+++ linux/include/asm-um/io.h
@@ -27,6 +27,7 @@ static inline void * phys_to_virt(unsign
  * access
  */
 #define xlate_dev_mem_ptr(p)   __va(p)
+#define unxlate_dev_mem_ptr(p, ptr)
 
 /*
  * Convert a virtual cached pointer to an uncached pointer
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 07:11:13PM +0100, Mariusz Kozlowski wrote:
 I see this on sparc64 as well:
 
   CC  drivers/char/mem.o
 drivers/char/mem.c: In function 'read_mem':
 drivers/char/mem.c:136: error: implicit declaration of function 
 'unxlate_dev_mem_ptr'
 make[2]: *** [drivers/char/mem.o] Error 1
 make[1]: *** [drivers/char] Error 2
 make: *** [drivers] Error 2
 
 Does sparc64 need similar fix?

Probably - it seems that xlate_dev_mem_ptr can now introduce
side-effects which need to be undone with unxlate_dev_mem_ptr.

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 19:11:13 +0100 Mariusz Kozlowski [EMAIL PROTECTED] wrote:

 Hello,
 
  This patch fixes this building error:
  ...
  drivers/char/mem.c: In function ‘read_mem’:
  drivers/char/mem.c:136: error: implicit declaration of function 
  ‘unxlate_dev_mem_ptr’
  ...
 
 I see this on sparc64 as well:
 
   CC  drivers/char/mem.o
 drivers/char/mem.c: In function 'read_mem':
 drivers/char/mem.c:136: error: implicit declaration of function 
 'unxlate_dev_mem_ptr'
 make[2]: *** [drivers/char/mem.o] Error 1
 make[1]: *** [drivers/char] Error 2
 make: *** [drivers] Error 2
 
 Does sparc64 need similar fix?
 

The PAT patches strike again.

Ingo, I think you might need to toss some cross-compilers into that build
test setup of yours.

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


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Mariusz Kozlowski
Hello,

 This patch fixes this building error:
 ...
 drivers/char/mem.c: In function ‘read_mem’:
 drivers/char/mem.c:136: error: implicit declaration of function 
 ‘unxlate_dev_mem_ptr’
 ...

I see this on sparc64 as well:

  CC  drivers/char/mem.o
drivers/char/mem.c: In function 'read_mem':
drivers/char/mem.c:136: error: implicit declaration of function 
'unxlate_dev_mem_ptr'
make[2]: *** [drivers/char/mem.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2

Does sparc64 need similar fix?

Regards,

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


Re: [-mm Patch] UML: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 09:21:08PM +0800, WANG Cong wrote:
 Building uml failed in current -mm tree. ;(
 
 The below patch fixes this building error:
 ...
 include/asm/arch/system.h:8:22: error: asm/nops.h: No such file or directory
 ...
 
 Cc: Jeff Dike [EMAIL PROTECTED]
 Signed-off-by: WANG Cong [EMAIL PROTECTED]

ACK

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 09:56:41PM +0800, WANG Cong wrote:
 
 This patch fixes this building error:
 ...
 drivers/char/mem.c: In function ‘read_mem’:
 drivers/char/mem.c:136: error: implicit declaration of function 
 ‘unxlate_dev_mem_ptr’
 ...
 
 Cc: Jeff Dike [EMAIL PROTECTED]
 Signed-off-by: WANG Cong [EMAIL PROTECTED]

ACK

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 11:38:53 -0800 Pallipadi, Venkatesh [EMAIL PROTECTED] 
wrote:

  
 
 -Original Message-
 From: Andrew Morton [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 17, 2008 10:56 AM
 To: Mariusz Kozlowski
 Cc: WANG Cong; linux-kernel@vger.kernel.org; Jeff Dike; 
 [EMAIL PROTECTED]; David Miller; 
 [EMAIL PROTECTED]; Ingo Molnar; Thomas Gleixner; 
 Pallipadi, Venkatesh
 Subject: Re: [-mm Patch] uml: fix a building error
 
 On Thu, 17 Jan 2008 19:11:13 +0100 Mariusz Kozlowski 
 [EMAIL PROTECTED] wrote:
 
  Hello,
  
   This patch fixes this building error:
   ...
   drivers/char/mem.c: In function 'read_mem':
   drivers/char/mem.c:136: error: implicit declaration of 
 function 'unxlate_dev_mem_ptr'
   ...
  
  I see this on sparc64 as well:
  
CC  drivers/char/mem.o
  drivers/char/mem.c: In function 'read_mem':
  drivers/char/mem.c:136: error: implicit declaration of 
 function 'unxlate_dev_mem_ptr'
  make[2]: *** [drivers/char/mem.o] Error 1
  make[1]: *** [drivers/char] Error 2
  make: *** [drivers] Error 2
  
  Does sparc64 need similar fix?
  
 
 The PAT patches strike again.
 
 Ingo, I think you might need to toss some cross-compilers into 
 that build
 test setup of yours.
 
 
 These functions were defined for other archs in asm-generic/iomap.h.
 We need all archs including it in io.h. I now see only few archs are
 including it..
 
 Apart from unxlate, there is also ioremap_wc which is defined in the
 same way.
 
 I can send a patch for this. But, I don't have cross compiler setup for
 all archs to test. Andrew, I will need your help.

Well.

- there are a bunch of cross-compiler binaries in
  http://userweb.kernel.org/~akpm/cross-compilers/

- I'll (again) encourage Ingo to add cross-compilation testing to his
  auto-testing setup. 

- I ran out of steam (and the selinux bug crashed my remote
  cross-compilation test box) so I didn't do much cross-compilation testing
  on rc8-mm1: just alpha and ia64 iirc.  

I'd suggest that you just prepare a best-effort patch and when I next get
around to doing more cross-compilation any problems shold get weeded out.

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


RE: [-mm Patch] uml: fix a building error

2008-01-17 Thread Pallipadi, Venkatesh
 

-Original Message-
From: Andrew Morton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 17, 2008 10:56 AM
To: Mariusz Kozlowski
Cc: WANG Cong; linux-kernel@vger.kernel.org; Jeff Dike; 
[EMAIL PROTECTED]; David Miller; 
[EMAIL PROTECTED]; Ingo Molnar; Thomas Gleixner; 
Pallipadi, Venkatesh
Subject: Re: [-mm Patch] uml: fix a building error

On Thu, 17 Jan 2008 19:11:13 +0100 Mariusz Kozlowski 
[EMAIL PROTECTED] wrote:

 Hello,
 
  This patch fixes this building error:
  ...
  drivers/char/mem.c: In function 'read_mem':
  drivers/char/mem.c:136: error: implicit declaration of 
function 'unxlate_dev_mem_ptr'
  ...
 
 I see this on sparc64 as well:
 
   CC  drivers/char/mem.o
 drivers/char/mem.c: In function 'read_mem':
 drivers/char/mem.c:136: error: implicit declaration of 
function 'unxlate_dev_mem_ptr'
 make[2]: *** [drivers/char/mem.o] Error 1
 make[1]: *** [drivers/char] Error 2
 make: *** [drivers] Error 2
 
 Does sparc64 need similar fix?
 

The PAT patches strike again.

Ingo, I think you might need to toss some cross-compilers into 
that build
test setup of yours.


These functions were defined for other archs in asm-generic/iomap.h.
We need all archs including it in io.h. I now see only few archs are
including it..

Apart from unxlate, there is also ioremap_wc which is defined in the
same way.

I can send a patch for this. But, I don't have cross compiler setup for
all archs to test. Andrew, I will need your help.

Thanks,
Venki
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Mariusz Kozlowski
Hello,

   This patch fixes this building error:
   ...
   drivers/char/mem.c: In function 'read_mem':
   drivers/char/mem.c:136: error: implicit declaration of 
 function 'unxlate_dev_mem_ptr'
   ...
  
  I see this on sparc64 as well:
  
CC  drivers/char/mem.o
  drivers/char/mem.c: In function 'read_mem':
  drivers/char/mem.c:136: error: implicit declaration of 
 function 'unxlate_dev_mem_ptr'
  make[2]: *** [drivers/char/mem.o] Error 1
  make[1]: *** [drivers/char] Error 2
  make: *** [drivers] Error 2
  
  Does sparc64 need similar fix?
  
 
 The PAT patches strike again.
 
 Ingo, I think you might need to toss some cross-compilers into 
 that build
 test setup of yours.
 
 These functions were defined for other archs in asm-generic/iomap.h.
 We need all archs including it in io.h. I now see only few archs are
 including it..

 Apart from unxlate, there is also ioremap_wc which is defined in the
 same way.
 
 I can send a patch for this. But, I don't have cross compiler setup for
 all archs to test. Andrew, I will need your help.

I can confirm that this fixes the build problem for sparc64 here.

Regards,

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


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 11:38:53AM -0800, Pallipadi, Venkatesh wrote:
 Apart from unxlate, there is also ioremap_wc which is defined in the
 same way.

And while we're on the subject, what's the deal with these, in
include/asm-x86/io.h?

#define ioremap_wc ioremap_wc
#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Venki Pallipadi
On Thu, Jan 17, 2008 at 04:14:37PM -0500, Jeff Dike wrote:
 On Thu, Jan 17, 2008 at 11:38:53AM -0800, Pallipadi, Venkatesh wrote:
  Apart from unxlate, there is also ioremap_wc which is defined in the
  same way.
 
 And while we're on the subject, what's the deal with these, in
 include/asm-x86/io.h?
 
 #define ioremap_wc ioremap_wc
 #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
 

If archs want to override the defaults for these two functions, they define
the above and then include asm-generic/iomap.h.

Archs which doesnt want to implement anything in these new funcs just have to
include asm-generic/iomap.h which has the proper stubs.

So, a patch like the below is what is required here for all archs to
include asm-generic iomap.h (without the other patch that
defines null unxlate in asm specific header).

Totally untested.

Thanks,
Venki

Signed-off-by: Venkatesh Pallipadi [EMAIL PROTECTED]

Index: linux-2.6.git/include/asm-arm/io.h
===
--- linux-2.6.git.orig/include/asm-arm/io.h 2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-arm/io.h  2008-01-17 06:39:13.0 -0800
@@ -27,6 +27,8 @@
 #include asm/byteorder.h
 #include asm/memory.h
 
+#include asm-generic/iomap.h
+
 /*
  * ISA I/O bus memory addresses are 1:1 with the physical address.
  */
Index: linux-2.6.git/include/asm-avr32/io.h
===
--- linux-2.6.git.orig/include/asm-avr32/io.h   2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-avr32/io.h2008-01-17 06:39:13.0 
-0800
@@ -10,6 +10,8 @@
 
 #include asm/arch/io.h
 
+#include asm-generic/iomap.h
+
 /* virt_to_phys will only work when address is in P1 or P2 */
 static __inline__ unsigned long virt_to_phys(volatile void *address)
 {
Index: linux-2.6.git/include/asm-blackfin/io.h
===
--- linux-2.6.git.orig/include/asm-blackfin/io.h2008-01-17 
06:28:06.0 -0800
+++ linux-2.6.git/include/asm-blackfin/io.h 2008-01-17 06:39:13.0 
-0800
@@ -8,6 +8,8 @@
 #endif
 #include linux/compiler.h
 
+#include asm-generic/iomap.h
+
 /*
  * These are for ISA/PCI shared memory _only_ and should never be used
  * on any other type of memory, including Zorro memory. They are meant to
Index: linux-2.6.git/include/asm-cris/io.h
===
--- linux-2.6.git.orig/include/asm-cris/io.h2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-cris/io.h 2008-01-17 06:39:13.0 -0800
@@ -5,6 +5,8 @@
 #include asm/arch/io.h
 #include linux/kernel.h
 
+#include asm-generic/iomap.h
+
 struct cris_io_operations
 {
u32 (*read_mem)(void *addr, int size);
Index: linux-2.6.git/include/asm-frv/io.h
===
--- linux-2.6.git.orig/include/asm-frv/io.h 2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-frv/io.h  2008-01-17 06:39:13.0 -0800
@@ -23,6 +23,8 @@
 #include asm/mb-regs.h
 #include linux/delay.h
 
+#include asm-generic/iomap.h
+
 /*
  * swap functions are sometimes needed to interface little-endian hardware
  */
Index: linux-2.6.git/include/asm-h8300/io.h
===
--- linux-2.6.git.orig/include/asm-h8300/io.h   2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-h8300/io.h2008-01-17 06:39:13.0 
-0800
@@ -13,6 +13,8 @@
 #error UNKNOWN CPU TYPE
 #endif
 
+#include asm-generic/iomap.h
+
 
 /*
  * These are for ISA/PCI shared memory _only_ and should never be used
Index: linux-2.6.git/include/asm-m32r/io.h
===
--- linux-2.6.git.orig/include/asm-m32r/io.h2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-m32r/io.h 2008-01-17 06:39:13.0 -0800
@@ -5,6 +5,8 @@
 #include linux/compiler.h
 #include asm/page.h  /* __va */
 
+#include asm-generic/iomap.h
+
 #ifdef __KERNEL__
 
 #define IO_SPACE_LIMIT  0x
Index: linux-2.6.git/include/asm-m68knommu/io.h
===
--- linux-2.6.git.orig/include/asm-m68knommu/io.h   2008-01-17 
06:28:06.0 -0800
+++ linux-2.6.git/include/asm-m68knommu/io.h2008-01-17 06:39:13.0 
-0800
@@ -1,6 +1,8 @@
 #ifndef _M68KNOMMU_IO_H
 #define _M68KNOMMU_IO_H
 
+#include asm-generic/iomap.h
+
 #ifdef __KERNEL__
 
 
Index: linux-2.6.git/include/asm-ppc/io.h
===
--- linux-2.6.git.orig/include/asm-ppc/io.h 2008-01-17 06:28:06.0 
-0800
+++ linux-2.6.git/include/asm-ppc/io.h  2008-01-17 06:39:13.0 -0800
@@ -10,6 +10,8 @@
 #include asm/synch.h
 #include asm/mmu.h
 
+#include asm-generic/iomap.h
+
 #define SIO_CONFIG_RA  0x398
 #define 

Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 01:41:50PM -0800, Venki Pallipadi wrote:
  And while we're on the subject, what's the deal with these, in
  include/asm-x86/io.h?
  
  #define ioremap_wc ioremap_wc
  #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
  
 
 If archs want to override the defaults for these two functions, they define
 the above and then include asm-generic/iomap.h.

That wasn't really the question.

#define X X

is a no-op, yes?

Jeff

-- 
Work email - jdike at linux dot intel dot com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [-mm Patch] uml: fix a building error

2008-01-17 Thread Pallipadi, Venkatesh
 

-Original Message-
From: Jeff Dike [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 17, 2008 3:08 PM
To: Pallipadi, Venkatesh
Cc: Andrew Morton; Mariusz Kozlowski; WANG Cong; 
linux-kernel@vger.kernel.org; 
[EMAIL PROTECTED]; David Miller; 
[EMAIL PROTECTED]; Ingo Molnar; Thomas Gleixner
Subject: Re: [-mm Patch] uml: fix a building error

On Thu, Jan 17, 2008 at 01:41:50PM -0800, Venki Pallipadi wrote:
  And while we're on the subject, what's the deal with these, in
  include/asm-x86/io.h?
  
  #define ioremap_wc ioremap_wc
  #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
  
 
 If archs want to override the defaults for these two 
functions, they define
 the above and then include asm-generic/iomap.h.

That wasn't really the question.

#define X X

is a no-op, yes?


Later there is code in generic.h which is doing
#ifndef ioremap_wc
#define ioremap_wc ioremap_nocache
#endif


Thanks,
Venki
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [-mm Patch] uml: fix a building error

2008-01-17 Thread Jeff Dike
On Thu, Jan 17, 2008 at 03:17:38PM -0800, Pallipadi, Venkatesh wrote:
 #define X X
 
 is a no-op, yes?
 
 
 Later there is code in generic.h which is doing
 #ifndef ioremap_wc
 #define ioremap_wc ioremap_nocache
 #endif

Ah, that makes a bit more sense.

It'd be nice if there was less of a WTF factor there, though.

Jeff

-- 
Work email - jdike at linux dot intel dot com

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