summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] mm: kill check_user_page_readableHugh Dickins2005-10-292-62/+22
| | | | | | | | | | | | | | | | | | | | | | | | | check_user_page_readable is a problematic variant of follow_page. It's used only by oprofile's i386 and arm backtrace code, at interrupt time, to establish whether a userspace stackframe is currently readable. This is problematic, because we want to push the page_table_lock down inside follow_page, and later split it; whereas oprofile is doing a spin_trylock on it (in the i386 case, forgotten in the arm case), and needs that to pin perhaps two pages spanned by the stackframe (which might be covered by different locks when we split). I think oprofile is going about this in the wrong way: it doesn't need to know the area is readable (neither i386 nor arm uses read protection of user pages), it doesn't need to pin the memory, it should simply __copy_from_user_inatomic, and see if that succeeds or not. Sorry, but I've not got around to devising the sparse __user annotations for this. Then we can eliminate check_user_page_readable, and return to a single follow_page without the __follow_page variants. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: flush_tlb_range outside ptlockHugh Dickins2005-10-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | There was one small but very significant change in the previous patch: mprotect's flush_tlb_range fell outside the page_table_lock: as it is in 2.4, but that doesn't prove it safe in 2.6. On some architectures flush_tlb_range comes to the same as flush_tlb_mm, which has always been called from outside page_table_lock in dup_mmap, and is so proved safe. Others required a deeper audit: I could find no reliance on page_table_lock in any; but in ia64 and parisc found some code which looks a bit as if it might want preemption disabled. That won't do any actual harm, so pending a decision from the maintainers, disable preemption there. Remove comments on page_table_lock from flush_tlb_mm, flush_tlb_range and flush_tlb_page entries in cachetlb.txt: they were rather misleading (what generic code does is different from what usually happens), the rules are now changing, and it's not yet clear where we'll end up (will the generic tlb_flush_mmu happen always under lock? never under lock? or sometimes under and sometimes not?). Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: arches skip ptlockHugh Dickins2005-10-295-39/+3
| | | | | | | | | | | | | | | Convert those few architectures which are calling pud_alloc, pmd_alloc, pte_alloc_map on a user mm, not to take the page_table_lock first, nor drop it after. Each of these can continue to use pte_alloc_map, no need to change over to pte_alloc_map_lock, they're neither racy nor swappable. In the sparc64 io_remap_pfn_range, flush_tlb_range then falls outside of the page_table_lock: that's okay, on sparc64 it's like flush_tlb_mm, and that has always been called from outside of page_table_lock in dup_mmap. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: init_mm without ptlockHugh Dickins2005-10-2923-77/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First step in pushing down the page_table_lock. init_mm.page_table_lock has been used throughout the architectures (usually for ioremap): not to serialize kernel address space allocation (that's usually vmlist_lock), but because pud_alloc,pmd_alloc,pte_alloc_kernel expect caller holds it. Reverse that: don't lock or unlock init_mm.page_table_lock in any of the architectures; instead rely on pud_alloc,pmd_alloc,pte_alloc_kernel to take and drop it when allocating a new one, to check lest a racing task already did. Similarly no page_table_lock in vmalloc's map_vm_area. Some temporary ugliness in __pud_alloc and __pmd_alloc: since they also handle user mms, which are converted only by a later patch, for now they have to lock differently according to whether or not it's init_mm. If sources get muddled, there's a danger that an arch source taking init_mm.page_table_lock will be mixed with common source also taking it (or neither take it). So break the rules and make another change, which should break the build for such a mismatch: remove the redundant mm arg from pte_alloc_kernel (ppc64 scrapped its distinct ioremap_mm in 2.6.13). Exceptions: arm26 used pte_alloc_kernel on user mm, now pte_alloc_map; ia64 used pte_alloc_map on init_mm, now pte_alloc_kernel; parisc had bad args to pmd_alloc and pte_alloc_kernel in unused USE_HPPA_IOREMAP code; ppc64 map_io_page forgot to unlock on failure; ppc mmu_mapin_ram and ppc64 im_free took page_table_lock for no good reason. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: ia64 use expand_upwardsHugh Dickins2005-10-292-28/+8
| | | | | | | | | | | | | | | ia64 has expand_backing_store function for growing its Register Backing Store vma upwards. But more complete code for this purpose is found in the CONFIG_STACK_GROWSUP part of mm/mmap.c. Uglify its #ifdefs further to provide expand_upwards for ia64 as well as expand_stack for parisc. The Register Backing Store vma should be marked VM_ACCOUNT. Implement the intention of growing it only a page at a time, instead of passing an address outside of the vma to handle_mm_fault, with unknown consequences. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] core remove PageReservedNick Piggin2005-10-293-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove PageReserved() calls from core code by tightening VM_RESERVED handling in mm/ to cover PageReserved functionality. PageReserved special casing is removed from get_page and put_page. All setting and clearing of PageReserved is retained, and it is now flagged in the page_alloc checks to help ensure we don't introduce any refcount based freeing of Reserved pages. MAP_PRIVATE, PROT_WRITE of VM_RESERVED regions is tentatively being deprecated. We never completely handled it correctly anyway, and is be reintroduced in future if required (Hugh has a proof of concept). Once PageReserved() calls are removed from kernel/power/swsusp.c, and all arch/ and driver code, the Set and Clear calls, and the PG_reserved bit can be trivially removed. Last real user of PageReserved is swsusp, which uses PageReserved to determine whether a struct page points to valid memory or not. This still needs to be addressed (a generic page_is_ram() should work). A last caveat: the ZERO_PAGE is now refcounted and managed with rmap (and thus mapcounted and count towards shared rss). These writes to the struct page could cause excessive cacheline bouncing on big systems. There are a number of ways this could be addressed if it is an issue. Signed-off-by: Nick Piggin <npiggin@suse.de> Refcount bug fix for filemap_xip.c Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: m68k kill stram swapHugh Dickins2005-10-292-926/+16
| | | | | | | | | | | | | | | | | | | | | Please, please now delete the Atari CONFIG_STRAM_SWAP code. It may be excellent and ingenious code, but its reference to swap_vfsmnt betrays that it hasn't been built since 2.5.1 (four years old come December), it's delving deep into matters which are the preserve of core mm code, its only purpose is to give the more conscientious mm guys an anxiety attack from time to time; yet we keep on breaking it more and more. If you want to use RAM for swap, then if the MTD driver does not already provide just what you need, I'm sure David could be persuaded to add the extra. But you'd also like to be able to allocate extents of that swap for other use: we can give you a core interface for that if you need. But unbuilt for four years suggests to me that there's no need at all. I cannot swear the patch below won't break your build, but believe so. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: sh64 hugetlbpage.cHugh Dickins2005-10-292-178/+12
| | | | | | | | | | | The sh64 hugetlbpage.c seems to be erroneous, left over from a bygone age, clashing with the common hugetlb.c. Replace it by a copy of the sh hugetlbpage.c. Except, delete that mk_pte_huge macro neither uses. Signed-off-by: Hugh Dickins <hugh@veritas.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: mm_init set_mm_countersHugh Dickins2005-10-293-3/+0
| | | | | | | | | | | | How is anon_rss initialized? In dup_mmap, and by mm_alloc's memset; but that's not so good if an mm_counter_t is a special type. And how is rss initialized? By set_mm_counter, all over the place. Come on, we just need to initialize them both at once by set_mm_counter in mm_init (which follows the memcpy when forking). Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: tlb_finish_mmu forget rssHugh Dickins2005-10-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | zap_pte_range has been counting the pages it frees in tlb->freed, then tlb_finish_mmu has used that to update the mm's rss. That got stranger when I added anon_rss, yet updated it by a different route; and stranger when rss and anon_rss became mm_counters with special access macros. And it would no longer be viable if we're relying on page_table_lock to stabilize the mm_counter, but calling tlb_finish_mmu outside that lock. Remove the mmu_gather's freed field, let tlb_finish_mmu stick to its own business, just decrement the rss mm_counter in zap_pte_range (yes, there was some point to batching the update, and a subsequent patch restores that). And forget the anal paranoia of first reading the counter to avoid going negative - if rss does go negative, just fix that bug. Remove the mmu_gather's flushes and avoided_flushes from arm and arm26: no use was being made of them. But arm26 alone was actually using the freed, in the way some others use need_flush: give it a need_flush. arm26 seems to prefer spaces to tabs here: respect that. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: tlb_is_full_mm was obscureHugh Dickins2005-10-291-2/+2
| | | | | | | | | | | | | | | | tlb_is_full_mm? What does that mean? The TLB is full? No, it means that the mm's last user has gone and the whole mm is being torn down. And it's an inline function because sparc64 uses a different (slightly better) "tlb_frozen" name for the flag others call "fullmm". And now the ptep_get_and_clear_full macro used in zap_pte_range refers directly to tlb->fullmm, which would be wrong for sparc64. Rather than correct that, I'd prefer to scrap tlb_is_full_mm altogether, and change sparc64 to just use the same poor name as everyone else - is that okay? Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: vm_stat_account unshackledHugh Dickins2005-10-292-2/+3
| | | | | | | | | | The original vm_stat_account has fallen into disuse, with only one user, and only one user of vm_stat_unaccount. It's easier to keep track if we convert them all to __vm_stat_account, then free it from its __shackles. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2005-10-299-66/+118
|\
| * [ARM] 3061/1: cleanup the XIP link address messNicolas Pitre2005-10-294-52/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Nicolas Pitre Since vmlinux.lds.S is preprocessed, we can use the defines already present in asm/memory.h (allowed by patch #3060) for the XIP kernel link address instead of relying on a duplicated Makefile hardcoded value, and also get rid of its dependency on awk to handle it at the same time. While at it let's clean XIP stuff even further and make things clearer in head.S with a nice code reduction. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [ARM] 3060/1: allow constants found in asm/memory.h to be used in asm codeNicolas Pitre2005-10-293-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Patch from Nicolas Pitre This patch allows for assorted type of cleanups by letting assembly code use the same set of defines for constant values and avoid duplicated definitions that might not always be in sync, or that might simply be confusing due to the different names for the same thing. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [ARM] 3059/1: fix XIP supportNicolas Pitre2005-10-291-11/+19
| | | | | | | | | | | | | | | | | | Patch from Nicolas Pitre Fix XIP support after recent bootmem code refactoring. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [ARM] Add support for SA1100 Jornada flash device supportRussell King2005-10-291-0/+64
| | | | | | | | | | | | | | This got dropped from the SA1100 flash driver a while back and never added to the platform support file. Add it back. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [ARM] Allow MTD device name to be passed via platform dataRussell King2005-10-291-0/+2
| | | | | | | | | | | | | | Allow SA1100 devices to pass the name of the flash device to the SA1100 map driver. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | Update MIPS defconfig files.Ralf Baechle2005-10-2946-5986/+17743
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | prom_free_prom_memory() returns unsigned longArthur Othieno2005-10-293-3/+6
| | | | | | | | | | | | | | | | | | | | Some boards declare prom_free_prom_memory as a void function but the caller free_initmem() expects a return value. Fix those up and return 0 instead, just like everyone else does. Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Get rid of SINGLE_ONLY_FPU. Linux does not support half FPU other thanRalf Baechle2005-10-291-62/+8
| | | | | | | | | | | | by emulation of a full FPU. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Fix all the get_user / put_user related sparse warnings.Ralf Baechle2005-10-291-15/+15
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Delete unused ieee754_cname[] and declaration.Ralf Baechle2005-10-292-11/+0
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Include for prototypes.Ralf Baechle2005-10-291-0/+2
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Protect against multiple inclusion.Ralf Baechle2005-10-291-0/+4
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Remove useless casts of kmalloc return values.Ralf Baechle2005-10-292-5/+2
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Hack to resolve longstanding prefetch issueRalf Baechle2005-10-291-0/+15
| | | | | | | | | | | | | | | | Prefetching may be fatal on some systems if we're prefetching beyond the end of memory on some systems. It's also a seriously bad idea on non dma-coherent systems. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | More foolproofing of the CPU configuration.Ralf Baechle2005-10-291-2/+149
| | | | | | | | | | | | | | Limit the number of cpu type options in the cpu menu to just those types that are actually available for the select platform. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | pci-expmem-hackAndrew Isaacson2005-10-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CFE 1.2.5 and earlier fails to turn on the ExpMemEn bit in the PCIFeatureControl register, which means that DMA does not work beyond physical address 01_0000_0000, ergo to DRAM beyond 1GB. With ExpMemEn turned on, 01_0000_0000-0f_ffff_ffff is mapped, so DMA works for up to 61 GB of DRAM. Will be fixed in CFE 1.2.6 (yet to be released). Signed-Off-By: Andy Isaacson <adi@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | BCM1480 HT supportAndrew Isaacson2005-10-295-17/+248
| | | | | | | | | | | | | | PCI support code for PLX 7250 PCI-X tunnel on BCM91480B BigSur board. Signed-Off-By: Andy Isaacson <adi@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Support for the BCM1480 on-chip PCI-X bridge.Andrew Isaacson2005-10-292-0/+257
| | | | | | | | | | Signed-Off-By: Andy Isaacson <adi@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | SB1 cache exception handling.Andrew Isaacson2005-10-293-8/+59
| | | | | | | | | | | | | | | | Expand SB1 cache error handling by adding SB1_CEX_ALWAYS_FATAL and SB1_CEX_STALL, allowing configurable behavior on cache errors. Signed-Off-By: Andy Isaacson <adi@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Support for BigSur board.Andrew Isaacson2005-10-292-0/+12
| | | | | | | | | | Signed-Off-By: Andy Isaacson <adi@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Add support for BCM1480 family of chips.Andrew Isaacson2005-10-2911-5/+1093
| | | | | | | | | | | | | | | | | | - Kconfig and Makefile changes - arch/mips/sibyte/bcm1480/ - changes to sibyte common code to support 1480 Signed-Off-By: Andy Isaacson <adi@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Add support for SB1A CPU.Andrew Isaacson2005-10-293-0/+5
| | | | | | | | | | Signed-Off-By: Andy Isaacson <adi@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Sibyte fixesAndrew Isaacson2005-10-291-1/+1
| | | | | | | | | | | | | | Fix typo in cpu_probe_sibyte. Signed-Off-By: Andy Isaacson <adi@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Fix zero length sys_cacheflushAtsushi Nemoto2005-10-291-0/+2
| | | | | | | | | | | | | | | | | | Cacheflush(0, 0, 0) was crashing the system. This is because flush_icache_range(start, end) tries to flushing whole address space (0 - ~0UL) if both start and end are zero. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Get 64-bit right in the kgdb stub.Ralf Baechle2005-10-291-3/+2
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Sys_lookup_dcookie arguments occupy 4 argument slots.Ralf Baechle2005-10-291-1/+1
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | FPU emulator garbage collection.Ralf Baechle2005-10-292-4/+4
| | | | | | | | | | | | First argument of fpu_emulator_cop1Handler() was unused. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Don't print file name and line in die and die_if_kernel.Ralf Baechle2005-10-291-14/+2
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Rename page argument of flush_cache_page to something more descriptive.Ralf Baechle2005-10-291-16/+17
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Sliceup Kconfig; it's grown too large.Ralf Baechle2005-10-2910-554/+610
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Date: Fri Jan 14 03:03:23 2005 +0000Ralf Baechle2005-10-291-1/+1
| | | | | | | | | | | | Locking cleanups. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Fix wrong comment.Ralf Baechle2005-10-291-1/+1
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Fixup a few lose ends in explicit support for MIPS R1/R2.Ralf Baechle2005-10-297-12/+12
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Document the meaning of the CPU_MIPS32, CPU_MIPS64, CPU_MIPSR1 andRalf Baechle2005-10-291-0/+6
| | | | | | | | | | | | CPU_MIPSR2. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Protect manipulation of c0_status against preemption and multithreading.Ralf Baechle2005-10-292-12/+47
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Detect 4KSD and treat it like 4KSc.Ralf Baechle2005-10-291-0/+1
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Convert the remaining SPIN_LOCK_UNLOCKED instances to DEFINE_SPINLOCK.Ralf Baechle2005-10-295-6/+6
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
OpenPOWER on IntegriCloud