* [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
* Re: [PATCH] cleanup remove obsolete comment about map_chunk
2009-10-22 13:54 [PATCH] m68k allow ioremapping top of memory Philippe De Muyter
@ 2009-10-22 14:07 ` Philippe De Muyter
2009-12-22 19:07 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Philippe De Muyter @ 2009-10-22 14:07 UTC (permalink / raw)
To: linux-kernel
Hi all,
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
* Re: [PATCH] cleanup remove obsolete comment about map_chunk
2009-10-22 14:07 ` [PATCH] cleanup remove obsolete comment about map_chunk Philippe De Muyter
@ 2009-12-22 19:07 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2009-12-22 19:07 UTC (permalink / raw)
To: Philippe De Muyter; +Cc: linux-kernel, Yoshinori Sato
On Thu, Oct 22, 2009 at 15:07, Philippe De Muyter <phdm@macqel.be> wrote:
> Remove the comments referring to a function map_chunk that no longer exists.
Thanks!
I'll take it through the m68k tree. The h8300 case was copied from m68k anyway.
> 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,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ 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®