aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/mm
AgeCommit message (Collapse)AuthorFilesLines
2008-07-28sh: Add support for 16kB PAGE_SIZE.Paul Mundt1-0/+6
16kB is a useful size on nommu, while 64kB still tends to be too big to be useful. Newer MMUs are likely to support this as well, so plug it in in anticipation of those, too. Signed-off-by: Paul Mundt <[email protected]>
2008-07-28sh: Support variable page sizes on nommu.Paul Mundt1-3/+3
PAGE_SIZE doesn't need to be fixed at 4096 on nommu, so stub in a !MMU case for the various PAGE_SIZE Kconfig options. Signed-off-by: Paul Mundt <[email protected]>
2008-07-28sh: fix seq_file memory leakLi Zefan2-2/+2
When using single_open(), single_release() should be used instead of seq_release(), otherwise there is a memory leak. Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-07-26sh: use generic show_mem()Johannes Weiner1-41/+0
Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in slab, printed by show_free_areas() - free swap pages, printed by show_swap_cache_info() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Paul Mundt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-26SL*B: drop kmem cache argument from constructorAlexey Dobriyan1-1/+1
Kmem cache passed to constructor is only needed for constructors that are themselves multiplexeres. Nobody uses this "feature", nor does anybody uses passed kmem cache in non-trivial way, so pass only pointer to object. Non-trivial places are: arch/powerpc/mm/init_64.c arch/powerpc/mm/hugetlbpage.c This is flag day, yes. Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Pekka Enberg <[email protected]> Acked-by: Christoph Lameter <[email protected]> Cc: Jon Tollefson <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Matt Mackall <[email protected]> [[email protected]: fix arch/powerpc/mm/hugetlbpage.c] [[email protected]: fix mm/slab.c] [[email protected]: fix ubifs] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-24bootmem: replace node_boot_start in struct bootmem_dataJohannes Weiner1-1/+1
Almost all users of this field need a PFN instead of a physical address, so replace node_boot_start with node_min_pfn. [[email protected]: fix spurious BUG_ON() in mark_bootmem()] Signed-off-by: Johannes Weiner <[email protected]> Cc: <[email protected]> Signed-off-by: Lee Schermerhorn <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-24hugetlb: introduce pud_hugeAndi Kleen1-0/+5
Straight forward extensions for huge pages located in the PUD instead of PMDs. Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Nick Piggin <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-24hugetlb: modular state for hugetlb page sizeAndi Kleen1-1/+2
The goal of this patchset is to support multiple hugetlb page sizes. This is achieved by introducing a new struct hstate structure, which encapsulates the important hugetlb state and constants (eg. huge page size, number of huge pages currently allocated, etc). The hstate structure is then passed around the code which requires these fields, they will do the right thing regardless of the exact hstate they are operating on. This patch adds the hstate structure, with a single global instance of it (default_hstate), and does the basic work of converting hugetlb to use the hstate. Future patches will add more hstate structures to allow for different hugetlbfs mounts to have different page sizes. [[email protected]: coding-style fixes] Acked-by: Adam Litke <[email protected]> Acked-by: Nishanth Aravamudan <[email protected]> Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Nick Piggin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-24mm: move bootmem descriptors definition to a single placeJohannes Weiner1-3/+2
There are a lot of places that define either a single bootmem descriptor or an array of them. Use only one central array with MAX_NUMNODES items instead. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Ralf Baechle <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Russell King <[email protected]> Cc: Tony Luck <[email protected]> Cc: Hirokazu Takata <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Paul Mundt <[email protected]> Cc: David S. Miller <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-18Sh: use generic per-device coherent dma allocatorDmitry Baryshkov1-95/+3
Signed-off-by: Dmitry Baryshkov <[email protected]> Cc: Jesse Barnes <[email protected]> Cc: Paul Mundt <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-05-08sh: add memory resources to /proc/iomemMagnus Damm1-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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-05-08sh64: export onchip_remap/unmap() too.Paul Mundt1-0/+2
Signed-off-by: Paul Mundt <[email protected]>
2008-05-08sh64: Fixup the nommu build.Paul Mundt2-3/+6
Signed-off-by: Paul Mundt <[email protected]>
2008-04-28hotplug-memory: make online_page() commonJeremy Fitzhardinge1-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. [[email protected]: fix indenting] Signed-off-by: Jeremy Fitzhardinge <[email protected]> Acked-by: Dave Hansen <[email protected]> Reviewed-by: KAMEZAWA Hiroyuki <[email protected]> Tested-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Yasunori Goto <[email protected]> Cc: Christoph Lameter <[email protected]> Acked-by: Ingo Molnar <[email protected]> Acked-by: Yasunori Goto <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-18sh: Create an sh debugfs root.Paul Mundt2-3/+3
Signed-off-by: Paul Mundt <[email protected]>
2008-03-06sh: Flag PMB support as EXPERIMENTAL.Paul Mundt1-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 <[email protected]>
2008-03-06sh: replace remaining __FUNCTION__ occurrencesHarvey Harrison4-7/+7
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-03-06sh/mm/pg-sh7705.c must #include <linux/fs.h>Adrian Bunk1-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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-02-14sh: Fix multiple UTLB hit on UP SH-4.Hideo Saito1-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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-02-14sh: __uncached_start only on sh32.Paul Mundt1-0/+2
sh64 doesn't provide __uncached_start, so don't reference it unconditionally. Signed-off-by: Paul Mundt <[email protected]>
2008-02-14sh: Get SH-5 caches working again post-unification.Paul Mundt1-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 <[email protected]>
2008-02-14sh: Update SH-5 flush_cache_sigtramp() for API changes.Paul Mundt1-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 <[email protected]>
2008-02-14sh: trapped io support V2Magnus Damm1-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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-02-14sh: declared coherent memory support V2 fixMagnus Damm1-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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-02-07Introduce flags for reserve_bootmem()Bernhard Walle1-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(). [[email protected]: coding-style fixes] [[email protected]: fix powerpc build] Signed-off-by: Bernhard Walle <[email protected]> Cc: <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Vivek Goyal <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-01-28sh: declared coherent memory support V2Magnus Damm1-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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Correct pte size mismatch for X2 TLB.Paul Mundt1-1/+1
Fixes up a build warning/error in arch/sh/mm/fault_32.c. Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Provide a stubbed __set_fixmap() for nommu.Paul Mundt1-0/+4
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Stub in page_table_range_init() on nommu.Paul Mundt1-0/+6
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Populate swapper_pg_dir with fixmap range.Stuart Menefy1-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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Preparation for uncached jumps through PMB.Stuart Menefy6-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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Fix compile error of arch/sh/mm/pmb.cNobuhiro Iwamatsu1-1/+1
Signed-off-by: Nobuhiro Iwamatsu <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: comment tidying for sh64->sh migration.Paul Mundt3-25/+22
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Invalidate the TLB after applying PMB mappings.Stuart Menefy1-0/+6
Signed-off-by: Stuart Menefy <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: clear/copy_page renames in lib and lib64.Paul Mundt3-542/+1
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Rename the _32 and _64 TLB flush variants.Paul Mundt4-2/+2
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Copy over special CFLAGS for SH-5 TLB miss.Paul Mundt1-0/+25
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Move over SH-5 TLB and cache support code.Paul Mundt3-2/+1203
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Kill off a stray proc tlb reference in fault_64.Paul Mundt1-4/+0
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Bump the MEMORY_SIZE default to something reasonable.Paul Mundt1-2/+2
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Switch SH-5 to use CONFIG_PAGE_OFFSET.Paul Mundt1-1/+2
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Move in the SH-5 TLB miss.Paul Mundt4-2/+281
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Tidy up various clear_page()/copy_page() definitions.Paul Mundt3-20/+5
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: ioremap_64 needs after_bootmem.Paul Mundt1-0/+3
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Split out tlb-flush in to _32 and _64 variants.Paul Mundt4-2/+477
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Split out pgtable.h in to _32 and _64 variants.Paul Mundt1-12/+28
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: ioremap_64 needs proc_fs.h.Paul Mundt1-0/+1
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Split out ioremap in to _32 and _64 variants.Paul Mundt4-1/+393
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Fix up 64kB page size selection on SH-5.Paul Mundt1-2/+2
Signed-off-by: Paul Mundt <[email protected]>
2008-01-28sh: Split out extable.c _32 and _64 variants.Paul Mundt5-36/+132
Signed-off-by: Paul Mundt <[email protected]>