summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
Commit message (Collapse)AuthorAgeFilesLines
* sh: add memory resources to /proc/iomemMagnus Damm2008-05-081-1/+1
| | | | | | | | Add physical memory resources such as System RAM, Kernel code/data/bss and reserved crash dump area to /proc/iomem. Same strategy as on x86. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh64: export onchip_remap/unmap() too.Paul Mundt2008-05-081-0/+2
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh64: Fixup the nommu build.Paul Mundt2008-05-082-3/+6
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* hotplug-memory: make online_page() commonJeremy Fitzhardinge2008-04-281-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | All architectures use an effectively identical definition of online_page(), so just make it common code. x86-64, ia64, powerpc and sh are actually identical; x86-32 is slightly different. x86-32's differences arise because it puts its hotplug pages in the highmem zone. We can handle this in the generic code by inspecting the page to see if its in highmem, and update the totalhigh_pages count appropriately. This leaves init_32.c:free_new_highpage with a single caller, so I folded it into add_one_highpage_init. I also removed an incorrect comment referring to the NUMA case; any NUMA details have already been dealt with by the time online_page() is called. [akpm@linux-foundation.org: fix indenting] Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: Dave Hansen <dave@linux.vnet.ibm.com> Reviewed-by: KAMEZAWA Hiroyuki <kamez.hiroyu@jp.fujitsu.com> Tested-by: KAMEZAWA Hiroyuki <kamez.hiroyu@jp.fujitsu.com> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: Christoph Lameter <clameter@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sh: Create an sh debugfs root.Paul Mundt2008-04-182-3/+3
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Flag PMB support as EXPERIMENTAL.Paul Mundt2008-03-061-1/+1
| | | | | | | There's still work that needs to be done here, and this should not be enabled by default on existing boards. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-03-064-7/+7
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh/mm/pg-sh7705.c must #include <linux/fs.h>Adrian Bunk2008-03-061-0/+1
| | | | | | | | | | | | | | | | | This patch fixes the following compile error: <-- snip --> ... CC arch/sh/mm/pg-sh7705.o /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/sh/mm/pg-sh7705.c: In function 'ptep_get_and_clear': /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/sh/mm/pg-sh7705.c:130: error: implicit declaration of function 'mapping_writably_mapped' make[2]: *** [arch/sh/mm/pg-sh7705.o] Error 1 <-- snip --> Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix multiple UTLB hit on UP SH-4.Hideo Saito2008-02-141-0/+8
| | | | | | | | | This acts as a reversion of 1c6b2ca5e0939bf8b5d1a11f1646f25189ecd447 in the case of UP SH-4, where we still have the risk of a multiple hit between the slow and fast paths. As seen on SH7780. Signed-off-by: Hideo Saito <saito@densan.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: __uncached_start only on sh32.Paul Mundt2008-02-141-0/+2
| | | | | | | sh64 doesn't provide __uncached_start, so don't reference it unconditionally. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Get SH-5 caches working again post-unification.Paul Mundt2008-02-141-610/+411
| | | | | | | A number of cleanups to get the SH-5 cache management code in line with the rest of the SH backend. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Update SH-5 flush_cache_sigtramp() for API changes.Paul Mundt2008-02-141-3/+5
| | | | | | | | Previously this took an explicit range, update this to use the same behaviour as the rest of the SH parts where we simply flush out a line from the start address. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: trapped io support V2Magnus Damm2008-02-141-0/+3
| | | | | | | | | | | | | | | | | | | The idea is that we want to get rid of the in/out/readb/writeb callbacks from the machvec and replace that with simple inline read and write operations to memory. Fast and simple for most hardware devices (think pci). Some devices require special treatment though - like 16-bit only CF devices - so we need to have some method to hook in callbacks. This patch makes it possible to add a per-device trap generating filter. This way we can get maximum performance of sane hardware - which doesn't need this filter - and crappy hardware works but gets punished by a performance hit. V2 changes things around a bit and replaces io access callbacks with a simple minimum_bus_width value. In the future we can add stride as well. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: declared coherent memory support V2 fixMagnus Damm2008-02-141-12/+20
| | | | | | | | | | | | This patch fixes the recently introduced declared coherent memory support. Without this fix a cached memory area is returned by dma_alloc_coherent() - unless dma_declare_coherent_memory() has setup a separate area. This patch makes sure an uncached memory area is returned. With this patch it is now possible to ping through an rtl8139 interface on r2d-plus. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Introduce flags for reserve_bootmem()Bernhard Walle2008-02-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patchset adds a flags variable to reserve_bootmem() and uses the BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions between crashkernel area and already used memory. This patch: Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE. If that flag is set, the function returns with -EBUSY if the memory already has been reserved in the past. This is to avoid conflicts. Because that code runs before SMP initialisation, there's no race condition inside reserve_bootmem_core(). [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: fix powerpc build] Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: <linux-arch@vger.kernel.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sh: declared coherent memory support V2Magnus Damm2008-01-281-46/+128
| | | | | | | | | | | | This patch adds declared coherent memory support to the sh architecture. All functions are based on the x86 implementation. Header files are adjusted to use the new functions instead of the former consistent_alloc() code. This version includes the few changes what were included in the fix patch together with modifications based on feedback from Paul. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Correct pte size mismatch for X2 TLB.Paul Mundt2008-01-281-1/+1
| | | | | | Fixes up a build warning/error in arch/sh/mm/fault_32.c. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Provide a stubbed __set_fixmap() for nommu.Paul Mundt2008-01-281-0/+4
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Stub in page_table_range_init() on nommu.Paul Mundt2008-01-281-0/+6
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Populate swapper_pg_dir with fixmap range.Stuart Menefy2008-01-281-0/+36
| | | | | | | | This saves us from having to use kmalloc() for the fixmap entries, which is needed early for the uncached fixmap. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Preparation for uncached jumps through PMB.Stuart Menefy2008-01-286-30/+46
| | | | | | | | | | | | Presently most of the 29-bit physical parts do P1/P2 segmentation with a 1:1 cached/uncached mapping, jumping between the two to control the caching behaviour. This provides the basic infrastructure to maintain this behaviour on 32-bit physical parts that don't map P1/P2 at all, using a shiny new linker section and corresponding fixmap entry. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix compile error of arch/sh/mm/pmb.cNobuhiro Iwamatsu2008-01-281-1/+1
| | | | | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: comment tidying for sh64->sh migration.Paul Mundt2008-01-283-25/+22
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Invalidate the TLB after applying PMB mappings.Stuart Menefy2008-01-281-0/+6
| | | | | Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clear/copy_page renames in lib and lib64.Paul Mundt2008-01-283-542/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Rename the _32 and _64 TLB flush variants.Paul Mundt2008-01-284-2/+2
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Copy over special CFLAGS for SH-5 TLB miss.Paul Mundt2008-01-281-0/+25
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Move over SH-5 TLB and cache support code.Paul Mundt2008-01-283-2/+1203
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off a stray proc tlb reference in fault_64.Paul Mundt2008-01-281-4/+0
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Bump the MEMORY_SIZE default to something reasonable.Paul Mundt2008-01-281-2/+2
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Switch SH-5 to use CONFIG_PAGE_OFFSET.Paul Mundt2008-01-281-1/+2
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Move in the SH-5 TLB miss.Paul Mundt2008-01-284-2/+281
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Tidy up various clear_page()/copy_page() definitions.Paul Mundt2008-01-283-20/+5
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: ioremap_64 needs after_bootmem.Paul Mundt2008-01-281-0/+3
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Split out tlb-flush in to _32 and _64 variants.Paul Mundt2008-01-284-2/+477
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Split out pgtable.h in to _32 and _64 variants.Paul Mundt2008-01-281-12/+28
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: ioremap_64 needs proc_fs.h.Paul Mundt2008-01-281-0/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Split out ioremap in to _32 and _64 variants.Paul Mundt2008-01-284-1/+393
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up 64kB page size selection on SH-5.Paul Mundt2008-01-281-2/+2
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Split out extable.c _32 and _64 variants.Paul Mundt2008-01-285-36/+132
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add SH-5 support to the consistent DMA impl.Paul Mundt2008-01-281-18/+28
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Split out 29-bit and 32-bit physical mode definitions.Paul Mundt2008-01-282-1/+12
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Switch Kconfig.sh64 to use arch/sh/mm/Kconfig.Paul Mundt2008-01-281-3/+7
| | | | | | Consolidates the HUGETLB definitions and others. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Move CPU subtypes to Kconfig.sh.Paul Mundt2008-01-281-190/+0
| | | | | | | We intend to share the mm options, so move the SH-only subtypes up a level. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: lockless UTLB miss fast-path.Paul Mundt2007-11-191-18/+7
| | | | | | | | | | | | With the refactored update_mmu_cache() introduced in older kernels, there's no longer any need to take the page_table_lock in this path, so simply drop it completely. Without this, performance degradation is seen on SMP on heavily threaded workloads that don't use the split ptlock, and ultimately we have no reason to contend for the lock in the first place. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off UTLB flush in fast-path.Paul Mundt2007-11-191-8/+0
| | | | | | | | | | | The __do_page_fault() fast-path contains a UTLB flush in order to force an ITLB reload, this isn't needed in practice as the ITLB is auto-reloaded from the UTLB anyways, which is already displaced by the manual 'ldtlb' in the update_mmu_cache() path. This provides a measurable speed up in the TLB miss fast-path. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off __{copy,clear}_user_page().Paul Mundt2007-11-072-106/+0
| | | | | | | | | Now that copy_to_user_page()/copy_from_user_page() are wired up, we can drop the old __copy_xxx() implementations. Now that the page colouring scheme has changed via kmap_coherent(), we can avoid the flush in these specific helpers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Optimized copy_{to,from}_user_page() for SH-4.Paul Mundt2007-11-071-23/+29
| | | | | | | | This moves copy_{to,from}_user_page() out-of-line on SH-4 and converts for the kmap_coherent() API. Based on the MIPS implementation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Wire up clear_user_highpage().Paul Mundt2007-11-071-0/+23
| | | | | | | With the kmap_coherent() API in place, this is trivial to implement, and lets us avoid the cache flush in certain cases. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off the remaining ST40 cruft.Paul Mundt2007-11-071-20/+1
| | | | | | | | | | | | | The ST40 stuff in-tree hasn't built for some time, and hasn't been updated for over 3 years. ST maintains their own out-of-tree changes and rebases occasionally, and that's ultimately where all of the ST40 users go anyways. In order for the ST40 code to be brought up to date most of the stuff removed in this changeset would have to be rewritten anyways, so there's very little benefit in keeping the remnants around either. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
OpenPOWER on IntegriCloud