mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] m68k allow ioremapping top of memory
@ 2009-10-22 13:54 Philippe De Muyter
  2009-10-22 14:07 ` [PATCH] cleanup remove obsolete comment about map_chunk Philippe De Muyter
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe De Muyter @ 2009-10-22 13:54 UTC (permalink / raw)
  To: linux-kernel, linux-m68k

Hi all,

The test in __ioremap to reject memory ranges crossing the 0 boundary
rejects also memory ranges at the end of the memory.  Fix that.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>

diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -116,7 +115,7 @@ void __iomem *__ioremap(unsigned long ph
 	/*
 	 * Don't allow mappings that wrap..
 	 */
-	if (!size || size > physaddr + size)
+	if (!size || physaddr > (unsigned long)(-size))
 		return NULL;
 
 #ifdef CONFIG_AMIGA

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] cleanup remove obsolete comment about map_chunk
@ 2009-10-22 14:08 Philippe De Muyter
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe De Muyter @ 2009-10-22 14:08 UTC (permalink / raw)
  To: linux-kernel

Hi all,

[resent to remove the wrong Re: in the subject line]

Remove the comments referring to a function map_chunk that no longer exists.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>

diff --git a/arch/h8300/mm/memory.c b/arch/h8300/mm/memory.c
--- a/arch/h8300/mm/memory.c
+++ b/arch/h8300/mm/memory.c
@@ -44,8 +44,8 @@ void cache_push_v (unsigned long vaddr, 
 {
 }
 
-/* Map some physical address range into the kernel address space. The
- * code is copied and adapted from map_chunk().
+/*
+ * Map some physical address range into the kernel address space.
  */
 
 unsigned long kernel_map(unsigned long paddr, unsigned long size,
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -99,8 +99,7 @@ static inline void free_io_area(void *ad
 #endif
 
 /*
- * Map some physical address range into the kernel address space. The
- * code is copied and adapted from map_chunk().
+ * Map some physical address range into the kernel address space.
  */
 /* Rewritten by Andreas Schwab to remove all races. */
 
diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c
--- a/arch/m68knommu/mm/memory.c
+++ b/arch/m68knommu/mm/memory.c
@@ -24,7 +24,6 @@
 
 /*
  * Map some physical address range into the kernel address space.
- * The code is copied and adapted from map_chunk().
  */
 
 unsigned long kernel_map(unsigned long paddr, unsigned long size,

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

end of thread, other threads:[~2009-12-22 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-22 13:54 [PATCH] m68k allow ioremapping top of memory Philippe De Muyter
2009-10-22 14:07 ` [PATCH] cleanup remove obsolete comment about map_chunk Philippe De Muyter
2009-12-22 19:07   ` Geert Uytterhoeven
2009-10-22 14:08 Philippe De Muyter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®