summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
Commit message (Collapse)AuthorAgeFilesLines
* sh: ioremap() through PMB needs asm/mmu.h.Paul Mundt2007-06-041-0/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix page size alignment in __copy_user_page().Paul Mundt2007-05-211-0/+1
| | | | | | | | | | | SH-3 comes up with the PAGE_SIZE on a misaligned boundary: arch/sh/mm/copy_page.S: Assembler messages: arch/sh/mm/copy_page.S:132: Warning: misaligned data fix it up with explicit alignment. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up various compile warnings for SE boards.Paul Mundt2007-05-211-0/+1
| | | | | | | | | | | | - setup-sh7750.c only defines the sh7751_ipr_map when building with SH7751 support. - 7722 Solution Engine was missing a mach-type entry, causing the macro in cf-enabler to be undefined. - arch/sh/mm/init.c needs linux/pagemap.h. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: revert addition of page fault notifiersChristoph Hellwig2007-05-211-37/+0Star
| | | | | | | | | | | | Just at the time you added them on sh we're removing them from other architectures. As there's no user yet this patch just removes them completely. Once you actually have a kprobes patch it should follow the direct call to kprobes_fault_handler model that powerpc, s390 and sparc64 employ in 2.6.22-rc1 and that I'm updating other architectures to. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* spelling fixes: arch/sh/Simon Arlott2007-05-211-1/+1
| | | | | | | Spelling fixes in arch/sh/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off pmb slab cache destructor.Paul Mundt2007-05-141-41/+38Star
| | | | | | | | | | | | | | | This is the last remaining slab destructor in the kernel, which we kill off and move the resultant list tracking logic up to the pmb_alloc()/pmb_free() paths. As Christoph Lameter pointed out, it's potentially unsafe to be taking the list lock in the destructor anyways, so this is also more fundamentally correct. With this in place, we're all set for killing off slab destructors from the kernel entirely. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Shut up compiler warnings in __do_page_fault().Paul Mundt2007-05-141-1/+1
| | | | | | | | | | | GCC doesn't seem to be able to figure this one out for itself, so just shut it up.. CC arch/sh/mm/fault.o arch/sh/mm/fault.c: In function '__do_page_fault': arch/sh/mm/fault.c:288: warning: 'ptl' may be used uninitialized in this function Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Truncate MAX_ACTIVE_REGIONS for the common case.Paul Mundt2007-05-091-0/+4
| | | | | | | Most SH platforms aren't going to need more than a single active region, ones that need more can pad this out as necessary. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Convert to common die chain.Paul Mundt2007-05-091-1/+1
| | | | | | | This went in immediately after SH added the die chain notifiers, so move over to that instead.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: generic quicklist support.Paul Mundt2007-05-092-0/+5
| | | | | | | | This moves SH over to the generic quicklists. As per x86_64, we have special mappings for the PGDs, so these go on their own list.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* header cleaning: don't include smp_lock.h when not usedRandy Dunlap2007-05-082-2/+0Star
| | | | | | | | | | | | Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* use SLAB_PANIC flag cleanupAkinobu Mita2007-05-081-3/+3
| | | | | | | | | | | | | | Use SLAB_PANIC and delete duplicated panic(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Ian Molton <spyro@f2s.com> Cc: David Howells <dhowells@redhat.com> Cc: Andi Kleen <ak@suse.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sh: Add die chain notifiers.Paul Mundt2007-05-071-2/+37
| | | | | | Add the atomic die chains in, kprobes needs these. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Solution Engine SH7705 board and CPU updates.Nobuhiro Iwamatsu2007-05-071-0/+1
| | | | | | | | This fixes up SH7705 CPU support and the SE7705 board for some of the recent changes. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: bootmem tidying for discontig/sparsemem preparation.Paul Mundt2007-05-072-105/+103Star
| | | | | | | | | This reworks some of the node 0 bootmem initialization in preparation for discontigmem and sparsemem support. ARCH_POPULATES_NODE_MAP is switched to as a result of this. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: MS7712SE01 board support.Nobuhiro Iwamatsu2007-05-071-0/+8
| | | | | | | Support the SH7712 (SH3-DSP) Solution Engine reference board. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Revert lazy dcache writeback changes.Paul Mundt2007-03-057-75/+185
| | | | | | | These ended up causing too many problems on older parts, revert for now.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Revert TLB miss fast-path changes that broke PTEA parts.Paul Mundt2007-02-141-0/+87
| | | | | | | | This ended up causing problems for older parts (particularly ones using PTEA). Revert this for now, it can be added back in once it's had some more testing. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill dead/unused ISA code from __ioremap().Paul Mundt2007-02-131-6/+0Star
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Switch to local TLB flush variants in additional callsites.Paul Mundt2007-02-131-3/+3
| | | | | | | Convert some of the global flush users over to using the local variants that don't need to use the global routines. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Local TLB flushing variants for SMP prep.Paul Mundt2007-02-136-28/+21Star
| | | | | | | Rename the existing flush routines to local_ variants for use by the IPI-backed global flush routines on SMP. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixup cpu_data references for the non-boot CPUs.Paul Mundt2007-02-137-53/+54
| | | | | | | There are a lot of bogus cpu_data-> references that only end up working for the boot CPU, convert these to current_cpu_data to fixup SMP. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Use a per-cpu ASID cache.Paul Mundt2007-02-132-15/+16
| | | | | | | | Previously this was implemented using a global cache, cache this per-CPU instead and bump up the number of context IDs to match NR_CPUS. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: add SH7760 IPR IRQ dataManuel Lauss2007-02-131-0/+1
| | | | | | | Add SH7760 IPR IRQ data; makes 2.6.20-rc bootable again. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Don't set reserved _PAGE_WT bit on SH-3.Paul Mundt2007-02-131-1/+1
| | | | | | | | Only SH-4 needs to set _PAGE_WT when using write-through caching, don't attempt to set it on SH-3 where it ends up being a reserved bit. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Lazy dcache writeback optimizations.Paul Mundt2007-02-138-186/+76Star
| | | | | | | | | | | | | | | This converts the lazy dcache handling to the model described in Documentation/cachetlb.txt and drops the ptep_get_and_clear() hacks used for the aliasing dcaches on SH-4 and SH7705 in 32kB mode. As a bonus, this slightly cuts down on the cache flushing frequency. With that and the PTEA handling out of the way, the update_mmu_cache() implementations can be consolidated, and we no longer have to worry about which configuration the cache is in for the SH7705 case. And finally, explicitly disable the lazy writeback on SMP (SH-4A). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: shmin updates.Takashi YOSHII2007-02-131-0/+2
| | | | | | | | This fixes up shmin (and SH7706/SH7708) IPR support for some of the recent API changes. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* [PATCH] mark struct file_operations const 2Arjan van de Ven2007-02-122-2/+2
| | | | | | | | | | | | Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. [akpm@osdl.org: sparc64 fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] optional ZONE_DMA: remove ZONE_DMA remains from sh/sh64Christoph Lameter2007-02-111-16/+1Star
| | | | | | | | | | | sh / sh64: Remove ZONE_DMA remains. Both arches do not need ZONE_DMA Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sh: SH-MobileR SH7722 CPU support.Paul Mundt2006-12-121-1/+11
| | | | | | This adds CPU support for the SH7722. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Convert remaining remap_area_pages() users to ioremap_page_range().Paul Mundt2006-12-121-1/+1
| | | | | | A couple of these were missed. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Trivial build fixes for SH-2 support.Yoshinori Sato2006-12-121-0/+2
| | | | | Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* [PATCH] Generic ioremap_page_range: sh conversionHaavard Skinnemoen2006-12-081-86/+4Star
| | | | | | | | | Convert SH to use generic ioremap_page_range() Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] slab: remove kmem_cache_tChristoph Lameter2006-12-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all uses of kmem_cache_t with struct kmem_cache. The patch was generated using the following script: #!/bin/sh # # Replace one string by another in all the kernel sources. # set -e for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do quilt add $file sed -e "1,\$s/$1/$2/g" $file >/tmp/$$ mv /tmp/$$ $file quilt refresh done The script was run like this sh replace kmem_cache_t "struct kmem_cache" Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] shared page table for hugetlb pageChen, Kenneth W2006-12-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following up with the work on shared page table done by Dave McCracken. This set of patch target shared page table for hugetlb memory only. The shared page table is particular useful in the situation of large number of independent processes sharing large shared memory segments. In the normal page case, the amount of memory saved from process' page table is quite significant. For hugetlb, the saving on page table memory is not the primary objective (as hugetlb itself already cuts down page table overhead significantly), instead, the purpose of using shared page table on hugetlb is to allow faster TLB refill and smaller cache pollution upon TLB miss. With PT sharing, pte entries are shared among hundreds of processes, the cache consumption used by all the page table is smaller and in return, application gets much higher cache hit ratio. One other effect is that cache hit ratio with hardware page walker hitting on pte in cache will be higher and this helps to reduce tlb miss latency. These two effects contribute to higher application performance. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Acked-by: Hugh Dickins <hugh@veritas.com> Cc: Dave McCracken <dmccr@us.ibm.com> Cc: William Lee Irwin III <wli@holomorphy.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Adam Litke <agl@us.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* sh: sh775x/titan fixes for irq header changes.Jamie Lenehan2006-12-061-0/+5
| | | | | | | | | | | | | | | | | | | | | The following moves the creation of IPR interupts into setup-7750.c and updates a few other things to make it all work after the "Drop CPU subtype IRQ headers" commit. It boots and runs fine on my titan board. - adds an ipr_idx to the ipr_data and uses a function in the subtype code to calculate the address of the IPR registers - adds a function to enable individual interrupt mode for externals in the subtype code and calls that from the titan board code instead of doing it directly. - I changed the shift in the ipr_data to be the actual # of bits to shift, instead of the numnber / 4 - made it easier to match with the manual. Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: stacktrace/lockdep/irqflags tracing support.Paul Mundt2006-12-061-0/+3
| | | | | | Wire up all of the essentials for lockdep.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Get the PGD right in oops case with 64-bit PTEs.Paul Mundt2006-12-061-4/+2Star
| | | | | | | | | | | | Previously this was using a static pgd shift in the reporting code, simply flip this to PGDIR_SHIFT which does the right thing depending on varying PTE magnitudes on the SH-X2 MMU. While we're at it, and since it's been recently added, use get_TTB() for fetching the TTB, rather than the open coded instructions. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixup various PAGE_SIZE == 4096 assumptions.Paul Mundt2006-12-065-22/+19Star
| | | | | | | | | | | | | | | | | | | | | | There were a number of places that made evil PAGE_SIZE == 4k assumptions that ended up breaking when trying to play with 8k and 64k page sizes, this fixes those up. The most significant change is the way we load THREAD_SIZE, previously this was done via: mov #(THREAD_SIZE >> 8), reg shll8 reg to avoid a memory access and allow the immediate load. With a 64k PAGE_SIZE, we're out of range for the immediate load size without resorting to special instructions available in later ISAs (movi20s and so on). The "workaround" for this is to bump up the shift to 10 and insert a shll2, which gives a bit more flexibility while still being much cheaper than a memory access. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: TLB miss fast-path optimizations.Stuart Menefy2006-12-062-86/+1Star
| | | | | | | | Handle simple TLB miss faults which can be resolved completely from the page table in assembler. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: pmd rework.Stuart Menefy2006-12-062-17/+49
| | | | | | | | | Remove extra bits from the pmd structure and store a kernel logical address rather than a physical address. This allows it to be directly dereferenced. Another piece of wierdness inherited from x86. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Use MMU.TTB register as pointer to current pgd.Stuart Menefy2006-12-061-10/+8Star
| | | | | | | | | Add TTB accessor functions and give it a sensible default value. We will use this later for optimizing the fault path. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Set up correct siginfo structures for page faults.Stuart Menefy2006-12-061-9/+17
| | | | | | | | Remove the previous saving of fault codes into the thread_struct as they are never used, and appeared to be inherited from x86. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: p3map_sem sem2mutex conversion.Paul Mundt2006-12-062-26/+11Star
| | | | | | Simple sem2mutex conversion for the p3map semaphores. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Preliminary support for SH-X2 MMU.Paul Mundt2006-12-064-17/+52
| | | | | | | | | | | | | | | | | | | This adds some preliminary support for the SH-X2 MMU, used by newer SH-4A parts (particularly SH7785). This MMU implements a 'compat' mode with SH-X MMUs and an 'extended' mode for SH-X2 extended features. Extended features include additional page sizes (8kB, 4MB, 64MB), as well as the addition of page execute permissions. The extended mode attributes are placed in a second data array, which requires us to switch to 64-bit PTEs when in X2 mode. With the addition of the exec perms, we also overhaul the mmap prots somewhat, now that it's possible to handle them more intelligently. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Hook SH7785 in to the build system.Paul Mundt2006-12-061-0/+5
| | | | | | Simple 7785 placeholders to start hooking up other bits of code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add support for SH7206 and SH7619 CPU subtypes.Yoshinori Sato2006-12-062-33/+53
| | | | | | | | This implements initial support for the SH7206 (SH-2A) and SH7619 (SH-2) MMU-less CPUs. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Zero-out coherent buffer in consistent_alloc().Paul Mundt2006-10-101-0/+1
| | | | | | | Be sure to zero out the buffer, this was causing occasional problems under heavier PCI tests. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: build fixes for defconfigs.Paul Mundt2006-10-031-1/+1
| | | | | | Get all of the defconfigs building again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* [PATCH] pidspace: is_init()Sukadev Bhattiprolu2006-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an updated version of Eric Biederman's is_init() patch. (http://lkml.org/lkml/2006/2/6/280). It applies cleanly to 2.6.18-rc3 and replaces a few more instances of ->pid == 1 with is_init(). Further, is_init() checks pid and thus removes dependency on Eric's other patches for now. Eric's original description: There are a lot of places in the kernel where we test for init because we give it special properties. Most significantly init must not die. This results in code all over the kernel test ->pid == 1. Introduce is_init to capture this case. With multiple pid spaces for all of the cases affected we are looking for only the first process on the system, not some other process that has pid == 1. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Serge Hallyn <serue@us.ibm.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: <lxc-devel@lists.sourceforge.net> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>