linux/arch/sh/mm
Paul Mundt 920efaabcb sh: Correct iounmap fixmap teardown.
iounmap_fixed() had a couple of bugs in it that caused it to effectively
fail at life. The total number of pages to unmap factored in the mapping
offset and aligned up to the next page boundary, which doesn't match the
ioremap_fixed() behaviour.

When ioremap_fixed() pegs a slot, the address in the mapping data already
contains the offset displacement, and the size is recorded verbatim given
that we're only interested in total number of pages required. As such, we
need to calculate the total number from the original size in the unmap
path as well.

At the same time, there was also an off-by-1 problem in the fixmap index
calculation which has also been corrected.

Previously subsequent remaps of an identical fixmap index would trigger
the pte_ERROR() in set_pte_phys():

	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).

With this patch in place, the iounmap-driven fixmap teardown actually
does what it's supposed to do.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-20 18:10:30 +09:00
..
alignment.c sh64: Fix up PC casting in unaligned fixup notifier with 32bit ABI. 2010-01-19 15:41:50 +09:00
asids-debugfs.c sh: Update debugfs ASID dumping for 16-bit ASID support. 2009-03-17 17:59:31 +09:00
cache-debugfs.c Fix debugfs_create_file's error checking method for arch/sh/mm/ 2008-10-20 10:40:21 +09:00
cache-sh2.c sh: Convert SH-2 to new cacheflush interface. 2009-08-15 12:35:15 +09:00
cache-sh2a.c Revert "sh: Kill off now redundant local irq disabling." 2009-09-01 21:12:55 +09:00
cache-sh3.c sh: Convert SH-3 to new cacheflush interface. 2009-08-15 12:42:55 +09:00
cache-sh4.c sh: Optimise flush_dcache_page() on SH4 2010-01-02 00:51:52 +00:00
cache-sh5.c sh64: Fix up reworked cache op build. 2009-11-12 17:03:28 +09:00
cache-sh7705.c sh: Obliterate the P1 area macros 2009-10-10 21:51:02 +09:00
cache.c sh: Guard against early IPIs in flush_cache_all(). 2010-01-15 14:21:37 +09:00
consistent.c sh: Bump up dma_ops initialization far earlier in the boot process. 2009-10-27 17:07:45 +09:00
extable_32.c sh: Split out extable.c _32 and _64 variants. 2008-01-28 13:18:44 +09:00
extable_64.c sh: comment tidying for sh64->sh migration. 2008-01-28 13:18:58 +09:00
fault_32.c sh: Definitions for 3-level page table layout 2009-12-17 14:31:20 +09:00
fault_64.c sh: Tidy up NEFF-based sign extension for SH-5. 2009-08-04 17:14:39 +09:00
flush-sh4.c sh: Fix up the SH-5 build with caches enabled. 2009-08-16 01:50:17 +09:00
hugetlbpage.c hugetlb: introduce pud_huge 2008-07-24 10:47:18 -07:00
init.c sh: Make 29/32-bit mode check helper generally available. 2010-01-20 16:40:48 +09:00
ioremap_fixed.c sh: Correct iounmap fixmap teardown. 2010-01-20 18:10:30 +09:00
ioremap.c sh: Kill off duplicate address alignment in ioremap_fixed(). 2010-01-19 13:49:19 +09:00
Kconfig sh: Add fixed ioremap support 2010-01-16 14:31:36 +00:00
kmap.c sh: Factor in cpu id for selection of cache colour fixmap. 2009-09-09 17:14:19 +09:00
Makefile sh: Split out MMUCR.URB based entry wiring in to shared helper. 2010-01-19 15:20:35 +09:00
mmap.c fix broken aliasing checks for MAP_FIXED on sparc32, mips, arm and sh 2009-12-11 06:44:59 -05:00
nommu.c sh: Fix up nommu build for out-of-line pgtable changes. 2010-01-06 14:45:14 +09:00
numa.c sh: NUMA lmb fixes 2009-12-09 12:40:44 +09:00
pgtable.c sh: default to extended TLB support. 2010-01-13 19:11:14 +09:00
pmb.c sh: Make 29/32-bit mode check helper generally available. 2010-01-20 16:40:48 +09:00
tlb-pteaex.c sh: Split out MMUCR.URB based entry wiring in to shared helper. 2010-01-19 15:20:35 +09:00
tlb-sh3.c sh: Handle a NULL vma in __update_tlb() for the fast-path. 2009-07-29 22:06:58 +09:00
tlb-sh4.c sh: Split out MMUCR.URB based entry wiring in to shared helper. 2010-01-19 15:20:35 +09:00
tlb-sh5.c sh: Split out MMUCR.URB based entry wiring in to shared helper. 2010-01-19 15:20:35 +09:00
tlb-urb.c sh: Split out MMUCR.URB based entry wiring in to shared helper. 2010-01-19 15:20:35 +09:00
tlbflush_32.c sh: Rename the _32 and _64 TLB flush variants. 2008-01-28 13:18:54 +09:00
tlbflush_64.c sh: Acquire some more page flags for SH-5. 2010-01-16 14:29:06 +00:00