* [PATCH] x86: ioremap: fix wrong physical address handling in PAT code
@ 2010-07-22 5:57 Yasuaki Ishimatsu
2010-07-22 15:13 ` Kenji Kaneshige
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yasuaki Ishimatsu @ 2010-07-22 5:57 UTC (permalink / raw)
To: linux-kernel, hpa, tglx, mingo; +Cc: kaneshige.kenji
From: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
The following two commits fixed a problem that x86 ioremap() doesn't handle
physical address higher than 32-bit properly in X86_32 PAE mode.
ffa71f33a820d1ab3f2fc5723819ac60fb76080b (x86, ioremap: Fix incorrect physical address handling in
PAE mode)
35be1b716a475717611b2dc04185e9d80b9cb693 (x86, ioremap: Fix normal ram range check)
But these fixes are not enough, since pat_pagerange_is_ram() in PAT code
also has a same problem. This patch fixes it.
Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
---
It is for -tip tree.
Index: linux-2.6-x86/arch/x86/mm/pat.c
===================================================================
--- linux-2.6-x86.orig/arch/x86/mm/pat.c 2010-07-22 03:04:38.000000000 +0900
+++ linux-2.6-x86/arch/x86/mm/pat.c 2010-07-22 03:47:36.000000000 +0900
@@ -158,7 +158,7 @@ static unsigned long pat_x_mtrr_type(u64
return req_type;
}
-static int pat_pagerange_is_ram(unsigned long start, unsigned long end)
+static int pat_pagerange_is_ram(resource_size_t start, resource_size_t end)
{
int ram_page = 0, not_rampage = 0;
unsigned long page_nr;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: ioremap: fix wrong physical address handling in PAT code
2010-07-22 5:57 [PATCH] x86: ioremap: fix wrong physical address handling in PAT code Yasuaki Ishimatsu
@ 2010-07-22 15:13 ` Kenji Kaneshige
2010-07-29 5:58 ` Yasuaki Ishimatsu
2010-07-29 13:27 ` [tip:x86/mm] x86: Ioremap: " tip-bot for Yasuaki Ishimatsu
2 siblings, 0 replies; 4+ messages in thread
From: Kenji Kaneshige @ 2010-07-22 15:13 UTC (permalink / raw)
To: Yasuaki Ishimatsu; +Cc: linux-kernel, hpa, tglx, mingo
Good catch!
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
(2010/07/22 14:57), Yasuaki Ishimatsu wrote:
> From: Yasuaki Ishimatsu<isimatu.yasuaki@jp.fujitsu.com>
>
> The following two commits fixed a problem that x86 ioremap() doesn't handle
> physical address higher than 32-bit properly in X86_32 PAE mode.
>
> ffa71f33a820d1ab3f2fc5723819ac60fb76080b (x86, ioremap: Fix incorrect physical address handling in
> PAE mode)
> 35be1b716a475717611b2dc04185e9d80b9cb693 (x86, ioremap: Fix normal ram range check)
>
> But these fixes are not enough, since pat_pagerange_is_ram() in PAT code
> also has a same problem. This patch fixes it.
>
> Signed-off-by: Yasuaki Ishimatsu<isimatu.yasuaki@jp.fujitsu.com>
>
> ---
>
> It is for -tip tree.
>
> Index: linux-2.6-x86/arch/x86/mm/pat.c
> ===================================================================
> --- linux-2.6-x86.orig/arch/x86/mm/pat.c 2010-07-22 03:04:38.000000000 +0900
> +++ linux-2.6-x86/arch/x86/mm/pat.c 2010-07-22 03:47:36.000000000 +0900
> @@ -158,7 +158,7 @@ static unsigned long pat_x_mtrr_type(u64
> return req_type;
> }
>
> -static int pat_pagerange_is_ram(unsigned long start, unsigned long end)
> +static int pat_pagerange_is_ram(resource_size_t start, resource_size_t end)
> {
> int ram_page = 0, not_rampage = 0;
> unsigned long page_nr;
>
> --
> 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/
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: ioremap: fix wrong physical address handling in PAT code
2010-07-22 5:57 [PATCH] x86: ioremap: fix wrong physical address handling in PAT code Yasuaki Ishimatsu
2010-07-22 15:13 ` Kenji Kaneshige
@ 2010-07-29 5:58 ` Yasuaki Ishimatsu
2010-07-29 13:27 ` [tip:x86/mm] x86: Ioremap: " tip-bot for Yasuaki Ishimatsu
2 siblings, 0 replies; 4+ messages in thread
From: Yasuaki Ishimatsu @ 2010-07-29 5:58 UTC (permalink / raw)
To: linux-kernel, hpa, tglx, mingo; +Cc: kaneshige.kenji
Hi,
Does anybody see the following patch? It's obviously a bug. Please apply it.
Thanks,
Yasuaki Ishimatsu
> From: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
>
> The following two commits fixed a problem that x86 ioremap() doesn't handle
> physical address higher than 32-bit properly in X86_32 PAE mode.
>
> ffa71f33a820d1ab3f2fc5723819ac60fb76080b (x86, ioremap: Fix incorrect physical address handling in
> PAE mode)
> 35be1b716a475717611b2dc04185e9d80b9cb693 (x86, ioremap: Fix normal ram range check)
>
> But these fixes are not enough, since pat_pagerange_is_ram() in PAT code
> also has a same problem. This patch fixes it.
>
> Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
>
> ---
>
> It is for -tip tree.
>
> Index: linux-2.6-x86/arch/x86/mm/pat.c
> ===================================================================
> --- linux-2.6-x86.orig/arch/x86/mm/pat.c 2010-07-22 03:04:38.000000000 +0900
> +++ linux-2.6-x86/arch/x86/mm/pat.c 2010-07-22 03:47:36.000000000 +0900
> @@ -158,7 +158,7 @@ static unsigned long pat_x_mtrr_type(u64
> return req_type;
> }
>
> -static int pat_pagerange_is_ram(unsigned long start, unsigned long end)
> +static int pat_pagerange_is_ram(resource_size_t start, resource_size_t end)
> {
> int ram_page = 0, not_rampage = 0;
> unsigned long page_nr;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:x86/mm] x86: Ioremap: fix wrong physical address handling in PAT code
2010-07-22 5:57 [PATCH] x86: ioremap: fix wrong physical address handling in PAT code Yasuaki Ishimatsu
2010-07-22 15:13 ` Kenji Kaneshige
2010-07-29 5:58 ` Yasuaki Ishimatsu
@ 2010-07-29 13:27 ` tip-bot for Yasuaki Ishimatsu
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Yasuaki Ishimatsu @ 2010-07-29 13:27 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, isimatu.yasuaki, kaneshige.kenji, tglx
Commit-ID: 3709c857350976408953831f0cf89d19951394a1
Gitweb: http://git.kernel.org/tip/3709c857350976408953831f0cf89d19951394a1
Author: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
AuthorDate: Thu, 22 Jul 2010 14:57:35 +0900
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 29 Jul 2010 15:26:11 +0200
x86: Ioremap: fix wrong physical address handling in PAT code
The following two commits fixed a problem that x86 ioremap() doesn't handle
physical address higher than 32-bit properly in X86_32 PAE mode.
ffa71f33a820d1ab3f2fc5723819ac60fb76080b (x86, ioremap: Fix incorrect
physical address handling in PAE mode)
35be1b716a475717611b2dc04185e9d80b9cb693 (x86, ioremap: Fix normal
ram range check)
But these fixes are not enough, since pat_pagerange_is_ram() in PAT code
also has a same problem. This patch fixes it.
Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
LKML-Reference: <4C47DDCF.80300@jp.fujitsu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/mm/pat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index acc15b2..03b48c8 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -158,7 +158,7 @@ static unsigned long pat_x_mtrr_type(u64 start, u64 end, unsigned long req_type)
return req_type;
}
-static int pat_pagerange_is_ram(unsigned long start, unsigned long end)
+static int pat_pagerange_is_ram(resource_size_t start, resource_size_t end)
{
int ram_page = 0, not_rampage = 0;
unsigned long page_nr;
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-29 13:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 5:57 [PATCH] x86: ioremap: fix wrong physical address handling in PAT code Yasuaki Ishimatsu
2010-07-22 15:13 ` Kenji Kaneshige
2010-07-29 5:58 ` Yasuaki Ishimatsu
2010-07-29 13:27 ` [tip:x86/mm] x86: Ioremap: " tip-bot for Yasuaki Ishimatsu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.