lkml.org 
[lkml]   [2005]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [BUG] 2.6.11- sym53c8xx Broken on pp64
From
Date
On Wed, 2005-03-09 at 19:47 -0800, Linus Torvalds wrote:
>
> On Wed, 9 Mar 2005, Omkhar Arasaratnam wrote:
> >
> > I confirmed that this occurs with the 2.6.11 code straight from
> > kernel.org Here is an error from the bringup:
>
> So if 2.6.9 works, and 2.6.11 does not, can you check 2.6.10? And perhaps
> hunt it down even more, to a -rc release?
>
> > sym0: No NVRAM, ID 7, Fast-80 LVD, parity checking
> > CACHE TEST FAILED: DMA error (dstat=0xa0) .sym0: CACHE INCORRECTLY CONFIGURED
> > sym0: giving up ...
>
> There are certainly sym changes in there too since 2.6.9, let's see if
> James or Willy have any suggestions. It might not be ppc64-specific.

Ok, we have it working here on a similar machine with 2.6.11 and failing
in a similar way with bk which is why I asked ;)

The bk problem is found & fixed here tho. I'll send a patch later, it's
a bug with ppc64 iounmap() not properly flushing the hash table after
the set_pte_at() patch due to some crap in our custom implementation of
that guy.

Here's the patch, but I want to get rid of that stuff anyway (at least
make unmap_vm_area take the "mm", or rather make an unmap_vm_area_mm()
and make unmap_vm_area() just call it and then use that instead of our
own implementation, but I'm waiting for Hugh cleanup to get in before
touching any of this).

--

This patch fixes a bug in ppc64 local implementation of iounmap() that
would cause it to incorrectly flush the hash table since the changes to
set_pte have been applied.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Index: working-2.6/arch/ppc64/mm/init.c
===================================================================
--- working-2.6.orig/arch/ppc64/mm/init.c 2005-03-07 13:06:23.000000000 +1100
+++ working-2.6/arch/ppc64/mm/init.c 2005-03-10 12:59:50.000000000 +1100
@@ -288,7 +288,7 @@
static void unmap_im_area_pte(pmd_t *pmd, unsigned long address,
unsigned long size)
{
- unsigned long end;
+ unsigned long base, end;
pte_t *pte;

if (pmd_none(*pmd))
@@ -300,6 +300,7 @@
}

pte = pte_offset_kernel(pmd, address);
+ base = address & PMD_MASK;
address &= ~PMD_MASK;
end = address + size;
if (end > PMD_SIZE)
@@ -307,7 +308,7 @@

do {
pte_t page;
- page = ptep_get_and_clear(&ioremap_mm, address, pte);
+ page = ptep_get_and_clear(&ioremap_mm, base + address, pte);
address += PAGE_SIZE;
pte++;
if (pte_none(page))
@@ -321,7 +322,7 @@
static void unmap_im_area_pmd(pgd_t *dir, unsigned long address,
unsigned long size)
{
- unsigned long end;
+ unsigned long base, end;
pmd_t *pmd;

if (pgd_none(*dir))
@@ -333,13 +334,14 @@
}

pmd = pmd_offset(dir, address);
+ base = address & PGDIR_MASK;
address &= ~PGDIR_MASK;
end = address + size;
if (end > PGDIR_SIZE)
end = PGDIR_SIZE;

do {
- unmap_im_area_pte(pmd, address, end - address);
+ unmap_im_area_pte(pmd, base + address, end - address);
address = (address + PMD_SIZE) & PMD_MASK;
pmd++;
} while (address < end);



Ben.

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:11    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site