]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] powerpc/iseries: Fix double phys_to_abs bug in htab_bolt_mapping
authorMichael Ellerman <michael@ellerman.id.au>
Tue, 28 Feb 2006 03:54:26 +0000 (14:54 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 28 Feb 2006 05:25:55 +0000 (16:25 +1100)
commit6eaa5a7436672c615ee2b78c92cb1c5dcdd2ed9c
treeb2e63269452da95da566d5f675f1f8b277f7f72d
parent310d6dc1857fe6ed257aa45114c35a547dc6cac0
[PATCH] powerpc/iseries: Fix double phys_to_abs bug in htab_bolt_mapping

Before the merge I updated create_pte_mapping() to work for iSeries, by
calling iSeries_hpte_bolt_or_insert. (bc7bac2e58689fb4374f7153f6153b8f9c810342)

Later we changed iSeries_hpte_insert to cope with the bolting case, and called
that instead from create_pte_mapping() (which was renamed to htab_bolt_mapping)
(ef05bdc6b76c86ad6d571d49a2fa8e61d680b7ab).

Unfortunately that change introduced a subtle bug, where we pass an absolute
address to iSeries_hpte_insert() where it expects a physical address. This
leads to us calling phys_to_abs() twice on the physical address, which is
seriously bogus.

This only causes a problem if the absolute address from the first translation
can be looked up again in the chunk_map, which depends on the size and layout
of memory. I've seen it fail on one box, but not others.

The minimal fix is to pass the physical address to iSeries_hpte_insert(). For
2.6.17 we should make phys_to_abs() BUG if we try to double-translate an
address.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/mm/hash_utils_64.c