linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -mm] define empty unxlate_dev_mem_ptr on AVR32
@ 2008-01-23 11:53 Ben Nizette
  2008-01-24 10:29 ` Haavard Skinnemoen
  2008-01-27  6:40 ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: Ben Nizette @ 2008-01-23 11:53 UTC (permalink / raw)
  To: akpm; +Cc: Haavard Skinnemoen, linux-kernel


Defined as a NOP on AVR32 as per the asm-generic implementation.
This keeps /dev/mem happy.

Signed-Off-By: Ben Nizette <bn@niasdigital.com>

---
Index: linux-2.6.24-rc8-mm1/include/asm-avr32/io.h
===================================================================
--- linux-2.6.24-rc8-mm1.orig/include/asm-avr32/io.h
+++ linux-2.6.24-rc8-mm1/include/asm-avr32/io.h
@@ -305,6 +305,12 @@ extern void __iounmap(void __iomem *addr
 #define xlate_dev_mem_ptr(p)    __va(p)

 /*
+ * We just keep an empty definition of this around (a-la the asm-generic
+ * implementation) to keep /dev/mem happy
+ */
+#define unxlate_dev_mem_ptr(p, a) {}
+
+/*
  * Convert a virtual cached pointer to an uncached pointer
  */
 #define xlate_dev_kmem_ptr(p)   p

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -mm] define empty unxlate_dev_mem_ptr on AVR32
  2008-01-23 11:53 [PATCH -mm] define empty unxlate_dev_mem_ptr on AVR32 Ben Nizette
@ 2008-01-24 10:29 ` Haavard Skinnemoen
  2008-01-24 10:38   ` Ben Nizette
  2008-01-27  6:40 ` Ingo Molnar
  1 sibling, 1 reply; 4+ messages in thread
From: Haavard Skinnemoen @ 2008-01-24 10:29 UTC (permalink / raw)
  To: Ben Nizette; +Cc: akpm, linux-kernel

On Wed, 23 Jan 2008 22:53:54 +1100
Ben Nizette <bn@niasdigital.com> wrote:

>  /*
> + * We just keep an empty definition of this around (a-la the asm-generic
> + * implementation) to keep /dev/mem happy
> + */
> +#define unxlate_dev_mem_ptr(p, a) {}

Thanks, but this should be either

#define unxlate_dev_mem_ptr(p, a) do { } while (0)

or

static inline void unxlate_dev_mem_ptr(unsigned long phys, void *addr)
{
}

I prefer the latter.

Btw, the breakage was introduced by git-x86.patch. Should I take the
fix through my avr32 tree?

Haavard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -mm] define empty unxlate_dev_mem_ptr on AVR32
  2008-01-24 10:29 ` Haavard Skinnemoen
@ 2008-01-24 10:38   ` Ben Nizette
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Nizette @ 2008-01-24 10:38 UTC (permalink / raw)
  To: Haavard Skinnemoen; +Cc: akpm, linux-kernel

Haavard Skinnemoen wrote:
> On Wed, 23 Jan 2008 22:53:54 +1100
> Ben Nizette <bn@niasdigital.com> wrote:
> 
>>  /*
>> + * We just keep an empty definition of this around (a-la the asm-generic
>> + * implementation) to keep /dev/mem happy
>> + */
>> +#define unxlate_dev_mem_ptr(p, a) {}
> 
> Thanks, but this should be either
> 
> #define unxlate_dev_mem_ptr(p, a) do { } while (0)
> 
> or
> 
> static inline void unxlate_dev_mem_ptr(unsigned long phys, void *addr)
> {
> }
> 
> I prefer the latter.

Yeah I don't know what came over me; Mia culpa :-)

I prefer the latter too, though I think I was striving for consistency with the xlate_dev_mem_ptr #define.

--Ben

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -mm] define empty unxlate_dev_mem_ptr on AVR32
  2008-01-23 11:53 [PATCH -mm] define empty unxlate_dev_mem_ptr on AVR32 Ben Nizette
  2008-01-24 10:29 ` Haavard Skinnemoen
@ 2008-01-27  6:40 ` Ingo Molnar
  1 sibling, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2008-01-27  6:40 UTC (permalink / raw)
  To: Ben Nizette; +Cc: akpm, Haavard Skinnemoen, linux-kernel


* Ben Nizette <bn@niasdigital.com> wrote:

> + * We just keep an empty definition of this around (a-la the asm-generic
> + * implementation) to keep /dev/mem happy
> + */
> +#define unxlate_dev_mem_ptr(p, a) {}

We havent had the PAT patches in x86.git for some time so there's no 
unxlate_dev_mem_ptr() introduced. Perhaps this is for older -mm?

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-27  6:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-23 11:53 [PATCH -mm] define empty unxlate_dev_mem_ptr on AVR32 Ben Nizette
2008-01-24 10:29 ` Haavard Skinnemoen
2008-01-24 10:38   ` Ben Nizette
2008-01-27  6:40 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).