* [PATCH] Revert fixrange_init() limiting to the FIXMAP region.
@ 2012-04-09 16:14 Steven J. Hill
2012-04-10 2:52 ` Kevin Cernekee
2012-04-10 11:55 ` Sergei Shtylyov
0 siblings, 2 replies; 6+ messages in thread
From: Steven J. Hill @ 2012-04-09 16:14 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Steven J. Hill, Leonid Yegoshin
From: "Steven J. Hill" <sjhill@mips.com>
This patch reverts 464fd83e841a16f4ea1325b33eb08170ef5cd1f4 which
may not take calculate the right length while taking into account
page table alignment by PMD.
Signed-off-by: Leonid Yegoshin <yegoshin@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
---
arch/mips/mm/init.c | 6 +++---
arch/mips/mm/pgtable-32.c | 2 +-
arch/mips/mm/pgtable-64.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 1a85ba9..75f2724 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -277,11 +277,11 @@ void __init fixrange_init(unsigned long start, unsigned long end,
k = __pmd_offset(vaddr);
pgd = pgd_base + i;
- for ( ; (i < PTRS_PER_PGD) && (vaddr < end); pgd++, i++) {
+ for ( ; (i < PTRS_PER_PGD) && (vaddr != end); pgd++, i++) {
pud = (pud_t *)pgd;
- for ( ; (j < PTRS_PER_PUD) && (vaddr < end); pud++, j++) {
+ for ( ; (j < PTRS_PER_PUD) && (vaddr != end); pud++, j++) {
pmd = (pmd_t *)pud;
- for (; (k < PTRS_PER_PMD) && (vaddr < end); pmd++, k++) {
+ for (; (k < PTRS_PER_PMD) && (vaddr != end); pmd++, k++) {
if (pmd_none(*pmd)) {
pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
set_pmd(pmd, __pmd((unsigned long)pte));
diff --git a/arch/mips/mm/pgtable-32.c b/arch/mips/mm/pgtable-32.c
index adc6911..575e401 100644
--- a/arch/mips/mm/pgtable-32.c
+++ b/arch/mips/mm/pgtable-32.c
@@ -52,7 +52,7 @@ void __init pagetable_init(void)
* Fixed mappings:
*/
vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
- fixrange_init(vaddr, vaddr + FIXADDR_SIZE, pgd_base);
+ fixrange_init(vaddr, 0, pgd_base);
#ifdef CONFIG_HIGHMEM
/*
diff --git a/arch/mips/mm/pgtable-64.c b/arch/mips/mm/pgtable-64.c
index cda4e30..78eaa4f 100644
--- a/arch/mips/mm/pgtable-64.c
+++ b/arch/mips/mm/pgtable-64.c
@@ -76,5 +76,5 @@ void __init pagetable_init(void)
* Fixed mappings:
*/
vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
- fixrange_init(vaddr, vaddr + FIXADDR_SIZE, pgd_base);
+ fixrange_init(vaddr, 0, pgd_base);
}
--
1.7.9.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert fixrange_init() limiting to the FIXMAP region.
2012-04-09 16:14 [PATCH] Revert fixrange_init() limiting to the FIXMAP region Steven J. Hill
@ 2012-04-10 2:52 ` Kevin Cernekee
2012-04-10 2:59 ` Yegoshin, Leonid
2012-04-10 11:55 ` Sergei Shtylyov
1 sibling, 1 reply; 6+ messages in thread
From: Kevin Cernekee @ 2012-04-10 2:52 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf, Leonid Yegoshin
On Mon, Apr 9, 2012 at 9:14 AM, Steven J. Hill <sjhill@mips.com> wrote:
> This patch reverts 464fd83e841a16f4ea1325b33eb08170ef5cd1f4 which
> may not take calculate the right length while taking into account
> page table alignment by PMD.
If the logic is incorrect, I'd like to fix it. Would you be able to
provide a test case that breaks the current head of tree?
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert fixrange_init() limiting to the FIXMAP region.
2012-04-10 2:52 ` Kevin Cernekee
@ 2012-04-10 2:59 ` Yegoshin, Leonid
2012-04-10 3:58 ` Kevin Cernekee
0 siblings, 1 reply; 6+ messages in thread
From: Yegoshin, Leonid @ 2012-04-10 2:59 UTC (permalink / raw)
To: Kevin Cernekee
Cc: Hill, Steven, linux-mips@linux-mips.org, ralf@linux-mips.org
Sorry, it was a couple of months ago while I worked on HIGHMEM with cache aliasing. I got a soak test failure and rollback of this patch helped. Besides that it is clearly wrong to add unmodified memory area length to aligned start address of that memory. It seems easy to fix but I hadn't time.
- Leonid.
Kevin Cernekee <cernekee@gmail.com> wrote:
On Mon, Apr 9, 2012 at 9:14 AM, Steven J. Hill <sjhill@mips.com> wrote:
> This patch reverts 464fd83e841a16f4ea1325b33eb08170ef5cd1f4 which
> may not take calculate the right length while taking into account
> page table alignment by PMD.
If the logic is incorrect, I'd like to fix it. Would you be able to
provide a test case that breaks the current head of tree?
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert fixrange_init() limiting to the FIXMAP region.
2012-04-10 2:59 ` Yegoshin, Leonid
@ 2012-04-10 3:58 ` Kevin Cernekee
2012-04-10 4:36 ` Yegoshin, Leonid
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Cernekee @ 2012-04-10 3:58 UTC (permalink / raw)
To: Yegoshin, Leonid
Cc: Hill, Steven, linux-mips@linux-mips.org, ralf@linux-mips.org
On Mon, Apr 9, 2012 at 7:59 PM, Yegoshin, Leonid <yegoshin@mips.com> wrote:
> Sorry, it was a couple of months ago while I worked on HIGHMEM with cache aliasing. I got a soak test failure and rollback of this patch helped.
Is it possible that HIGHMEM / kmap was using pages above the PKMAP
range, and the bug was masked by re-enabling the old behavior (create
PMDs all the way up to the top of the virtual address space)?
>Besides that it is clearly wrong to add unmodified memory area length to aligned start address of that memory. It seems easy to fix but I hadn't time.
On the pre-464fd83e implementation, that would have been a problem
because of the "vaddr != end" terminating condition.
On the post-464fd83e implementation, it should be fine because we are
checking for "vaddr < end" instead. This means we should get just
enough PMDs to cover the requested range.
I just checked one of my systems and it is calling
fixrange_init(0xff000000, 0xff039000, pgd_base). This creates a
single PMD covering a 4MB range, as expected.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert fixrange_init() limiting to the FIXMAP region.
2012-04-10 3:58 ` Kevin Cernekee
@ 2012-04-10 4:36 ` Yegoshin, Leonid
0 siblings, 0 replies; 6+ messages in thread
From: Yegoshin, Leonid @ 2012-04-10 4:36 UTC (permalink / raw)
To: Kevin Cernekee
Cc: Hill, Steven, linux-mips@linux-mips.org, ralf@linux-mips.org
Yes, MIPS HIGHMEM patch for cache aliasing systems (published today) works beyond PKMAP region - extended kmap_atomic.
- Leonid.
On Apr 9, 2012, at 8:58 PM, "Kevin Cernekee" <cernekee@gmail.com> wrote:
> On Mon, Apr 9, 2012 at 7:59 PM, Yegoshin, Leonid <yegoshin@mips.com> wrote:
>> Sorry, it was a couple of months ago while I worked on HIGHMEM with cache aliasing. I got a soak test failure and rollback of this patch helped.
>
> Is it possible that HIGHMEM / kmap was using pages above the PKMAP
> range, and the bug was masked by re-enabling the old behavior (create
> PMDs all the way up to the top of the virtual address space)?
>
>> Besides that it is clearly wrong to add unmodified memory area length to aligned start address of that memory. It seems easy to fix but I hadn't time.
>
> On the pre-464fd83e implementation, that would have been a problem
> because of the "vaddr != end" terminating condition.
>
> On the post-464fd83e implementation, it should be fine because we are
> checking for "vaddr < end" instead. This means we should get just
> enough PMDs to cover the requested range.
>
> I just checked one of my systems and it is calling
> fixrange_init(0xff000000, 0xff039000, pgd_base). This creates a
> single PMD covering a 4MB range, as expected.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert fixrange_init() limiting to the FIXMAP region.
2012-04-09 16:14 [PATCH] Revert fixrange_init() limiting to the FIXMAP region Steven J. Hill
2012-04-10 2:52 ` Kevin Cernekee
@ 2012-04-10 11:55 ` Sergei Shtylyov
1 sibling, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2012-04-10 11:55 UTC (permalink / raw)
To: Steven J. Hill; +Cc: linux-mips, ralf, Leonid Yegoshin
Hello.
On 09-04-2012 20:14, Steven J. Hill wrote:
> From: "Steven J. Hill"<sjhill@mips.com>
> This patch reverts 464fd83e841a16f4ea1325b33eb08170ef5cd1f4 which
> may not take calculate the right length while taking into account
So, take or calculate?
> page table alignment by PMD.
> Signed-off-by: Leonid Yegoshin<yegoshin@mips.com>
> Signed-off-by: Steven J. Hill<sjhill@mips.com>
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-04-10 11:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 16:14 [PATCH] Revert fixrange_init() limiting to the FIXMAP region Steven J. Hill
2012-04-10 2:52 ` Kevin Cernekee
2012-04-10 2:59 ` Yegoshin, Leonid
2012-04-10 3:58 ` Kevin Cernekee
2012-04-10 4:36 ` Yegoshin, Leonid
2012-04-10 11:55 ` Sergei Shtylyov
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.