summaryrefslogtreecommitdiffstats
path: root/include/asm-parisc
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] Configurable NODES_SHIFTYasunori Goto2006-04-111-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementations define NODES_SHIFT in include/asm-xxx/numnodes.h for each arch. Its definition is sometimes configurable. Indeed, ia64 defines 5 NODES_SHIFT values in the current git tree. But it looks a bit messy. SGI-SN2(ia64) system requires 1024 nodes, and the number of nodes already has been changeable by config. Suitable node's number may be changed in the future even if it is other architecture. So, I wrote configurable node's number. This patch set defines just default value for each arch which needs multi nodes except ia64. But, it is easy to change to configurable if necessary. On ia64 the number of nodes can be already configured in generic ia64 and SN2 config. But, NODES_SHIFT is defined for DIG64 and HP'S machine too. So, I changed it so that all platforms can be configured via CONFIG_NODES_SHIFT. It would be simpler. See also: http://marc.theaimsgroup.com/?l=linux-kernel&m=114358010523896&w=2 Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Andi Kleen <ak@muc.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PARISC] Add atomic_sub_and_testKyle McMartin2006-03-301-0/+3
| | | | | | Define atomic_sub_and_test to fix build failures. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Make local_t use atomic_long_tKyle McMartin2006-03-301-8/+8
| | | | | | | As done in asm-generic/local.h in mainline. Otherwise local_t was 32-bit even on a 64-bit kernel. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Add PREEMPT supportKyle McMartin2006-03-301-1/+2
| | | | Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] More useful readwrite lock helpersKyle McMartin2006-03-301-4/+12
| | | | | | | spinlock.c needs _can_lock helpers. Rewrite _is_locked helpers to be _can_lock helpers. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Fixup CONFIG_EISA a bitHelge Deller2006-03-301-0/+5
| | | | | | | | | Fix up some ISA/EISA stuff. (Note: isa_ accessors have been removed from asm/io.h) Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Remove obsolete CONFIG_DEBUG_IOREMAPHelge Deller2006-03-301-33/+0
| | | | | | | | Remove CONFIG_DEBUG_IOREMAP, it's now obsolete and won't work anyway. Remove it from lib/KConfig since it was only available on parisc. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Enable ioremap functionality unconditionallyHelge Deller2006-03-301-57/+1
| | | | | | | Enable CONFIG_HPPA_IOREMAP by default and remove all now unnecessary code. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Add CONFIG_HPPA_IOREMAP to conditionally enable ioremapHelge Deller2006-03-301-11/+5
| | | | | | | | Instead of making it a #define in asm/io.h, allow user to select to turn on IOREMAP from the config menu. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Add STRICT_MM_TYPECHECKSHelge Deller2006-03-301-16/+40
| | | | | | | Add STRICT_MM_TYPECHECKS to page.h as other architectures do. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Add parisc implementation of flush_kernel_dcache_page()James Bottomley2006-03-303-3/+10
| | | | | | | | We need to do a little renaming of our original syntax because of the difference in arguments. Signed-off-by: James Bottomley <jejb@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Add parisc implementation of flush_anon_page()James Bottomley2006-03-301-0/+8
| | | | | | | | This should now allow SG_IO and fuse to function correctly on our platform. Signed-off-by: James Bottomley <jejb@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Clarify pdc_stable license termsThibaut VARENE2006-03-301-3/+2
| | | | | | | pdc_stable.c is explicitly licensed under GPL version 2. Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PATCH] Typo fixesAlexey Dobriyan2006-03-281-1/+1
| | | | | | | | Fix a lot of typos. Eyeballed by jmc@ in OpenBSD. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] parisc: add ptr_to_compat()Ingo Molnar2006-03-271-0/+5
| | | | | | | | | | Add ptr_to_compat() to parisc - needed by the new robust futex code. Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Grant Grundler <iod00d@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] unify pfn_to_page: parisc pfn_to_pageKAMEZAWA Hiroyuki2006-03-272-19/+1
| | | | | | | | | PARISC can use generic funcs. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] bitops: parisc: use generic bitopsAkinobu Mita2006-03-261-277/+9
| | | | | | | | | | | | | | | | - remove __{,test_and_}{set,clear,change}_bit() and test_bit() - remove ffz() - remove generic_fls64() - remove generic_hweight{32,16,8}() - remove generic_hweight64() - remove sched_find_first_bit() - remove find_{next,first}{,_zero}_bit() - remove ext2_{set,clear,test,find_first_zero,find_next_zero}_bit() Signed-off-by: Akinobu Mita <mita@miraclelinux.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] bitops: parisc: add ()-pair in __ffz() macroAkinobu Mita2006-03-261-1/+1
| | | | | | | | | | | Noticed by Michael Tokarev add missing ()-pair in __ffz() macro for parisc Signed-off-by: Akinobu Mita <mita@miraclelinux.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] POLLRDHUP/EPOLLRDHUP handling for half-closed devices notificationsDavide Libenzi2006-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the half-closed devices notifiation, by adding a new POLLRDHUP (and its alias EPOLLRDHUP) bit to the existing poll/select sets. Since the existing POLLHUP handling, that does not report correctly half-closed devices, was feared to be changed, this implementation leaves the current POLLHUP reporting unchanged and simply add a new bit that is set in the few places where it makes sense. The same thing was discussed and conceptually agreed quite some time ago: http://lkml.org/lkml/2003/7/12/116 Since this new event bit is added to the existing Linux poll infrastruture, even the existing poll/select system calls will be able to use it. As far as the existing POLLHUP handling, the patch leaves it as is. The pollrdhup-2.6.16.rc5-0.10.diff defines the POLLRDHUP for all the existing archs and sets the bit in the six relevant files. The other attached diff is the simple change required to sys/epoll.h to add the EPOLLRDHUP definition. There is "a stupid program" to test POLLRDHUP delivery here: http://www.xmailserver.org/pollrdhup-test.c It tests poll(2), but since the delivery is same epoll(2) will work equally. Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Michael Kerrisk <mtk-manpages@gmx.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] remove ISA legacy functions: remove the helpersAl Viro2006-03-241-18/+0
| | | | | | | | | | | | unused isa_...() helpers removed. Adrian Bunk: The asm-sh part was rediffed due to unrelated changes. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Move read_mostly definition to asm/cache.hKyle McMartin2006-03-231-0/+2
| | | | | | | | | | | | | | Seems like needless clutter having a bunch of #if defined(CONFIG_$ARCH) in include/linux/cache.h. Move the per architecture section definition to asm/cache.h, and keep the if-not-defined dummy case in linux/cache.h to catch architectures which don't implement the section. Verified that symbols still go in .data.read_mostly on parisc, and the compile doesn't break. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] add asm-generic/mman.hMichael S. Tsirkin2006-02-151-3/+5
| | | | | | | | | | | | | | Make new MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK consistent across all arches. The idea is to make it possible to use them portably even before distros include them in libc headers. Move common flags to asm-generic/mman.h Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Cc: Roland Dreier <rolandd@cisco.com> Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] madvise MADV_DONTFORK/MADV_DOFORKMichael S. Tsirkin2006-02-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Currently, copy-on-write may change the physical address of a page even if the user requested that the page is pinned in memory (either by mlock or by get_user_pages). This happens if the process forks meanwhile, and the parent writes to that page. As a result, the page is orphaned: in case of get_user_pages, the application will never see any data hardware DMA's into this page after the COW. In case of mlock'd memory, the parent is not getting the realtime/security benefits of mlock. In particular, this affects the Infiniband modules which do DMA from and into user pages all the time. This patch adds madvise options to control whether memory range is inherited across fork. Useful e.g. for when hardware is doing DMA from/into these pages. Could also be useful to an application wanting to speed up its forks by cutting large areas out of consideration. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Acked-by: Hugh Dickins <hugh@veritas.com> Cc: Michael Kerrisk <mtk-manpages@gmx.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PARISC] New syscalls (inotify, *at, pselect6/ppoll, migrate_pages)Kyle McMartin2006-01-301-1/+20
| | | | | | | | | | Wire up some new syscalls that have been merged upstream, o inotify o openat et al o pselect6/ppoll o migrate_pages Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Arch-specific compat signalsKyle McMartin2006-01-222-6/+1
| | | | | | | | | | Add enough arch-specific compat signals code to enable parisc64 to compile and boot out of the mainline tree. There are likely still many dragons here, but this is a start to squashing the last big difference between the mainline tree and the parisc-linux tree. The remaining bugs can be squashed as they come up. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Add CONFIG_DEBUG_RODATA to protect read-only dataHelge Deller2006-01-222-1/+7
| | | | | | | | | | Add the parisc version of the "mark rodata section read only" patches. Based on code from and Signed-off-by Arjan van de Ven <arjan@infradead.org>, Ingo Molnar <mingo@elte.hu>, Andi Kleen <ak@muc.de>, Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] atomic64 supportKyle McMartin2006-01-221-15/+69
| | | | | | | | Implement atomic64_t so atomic_long_t works on parisc. Also clean up some of the coding style in atomic.h, and make sure ATOMIC_INIT is cast properly. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Drop unused do_check_pgt_cache()Helge Deller2006-01-221-1/+0
| | | | | | | | Drop the unused do_check_pgt_cache routine from mm/init.c and its prototype in asm/pgalloc.h Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Remove unnecessary extern declarations from asm/pci.hGrant Grundler2006-01-221-2/+0
| | | | | | | | | Remove two unnecessary extern declarations from asm/pci.h. They collide with what gcc4.0 assumed was static (and should be static). Found by Joel Soete. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Use kzalloc and other janitor-style cleanupsHelge Deller2006-01-222-3/+14
| | | | | | | | | | | | | | | | Helge, o Convert a bunch of kmalloc/memset uses to kzalloc. o pci.c: Add some __read_mostly annotations. o pci.c: Move constant pci_post_reset_delay to asm/pci.h o grfioctl.h: Add A4450A to comment of CRT_ID_VISUALIZE_EG. o Add some consts to perf.c/perf_images.h Matthew, o sticore.c: Add some consts to suppress compile warnings. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PATCH] death of get_thread_info/put_thread_infoAl Viro2006-01-121-3/+0
| | | | | | | | | {get,put}_thread_info() were introduced in 2.5.4 and never had been called by anything in the tree. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] sched: add cacheflush() asmIngo Molnar2006-01-121-0/+9
| | | | | | | | | | Add per-arch sched_cacheflush() which is a write-back cacheflush used by the migration-cost calibration code at bootup time. Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PARISC] Use C99 initializers in asm-parisc/processor.hAlexey Dobriyan2006-01-101-9/+9
| | | | | | | | | Cleanup asm-parisc/processor.h to use C99 initializers in INIT_THREAD(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Make PCI_HOST_ADDR and PCI_BUS_ADDR symmetricalGrant Grundler2006-01-101-1/+7
| | | | | | | | Change to asm-parisc/pci.h makes the define of PCI_HOST_ADDR symmetrical with PCI_BUS_ADDR. Also add a comment about PA_VIEW and LMMIO/ELMMIO/GMMIO. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Add __iomem to __raw_check_addr()Alexey Dobriyan2006-01-101-1/+1
| | | | | | | | | Add __iomem to __raw_check_addr(), which nukes ~13809 sparse warnings on allmodconfig. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Add some defines for HugeTLB pagesHelge Deller2006-01-101-0/+7
| | | | | | | | Define some constants for HugeTLB pages, not that parisc-linux supports it yet. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Make local cache flushes take a void *Matthew Wilcox2006-01-102-4/+5
| | | | | | | | | | | | | Make flush_data_cache_local, flush_instruction_cache_local and flush_tlb_all_local take a void * so they don't have to be cast when using on_each_cpu(). This becomes a problem when on_each_cpu is a macro (as it is in current -mm). Also move the prototype of flush_tlb_all_local into tlbflush.h and remove its declaration from .c files. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PATCH] mutex subsystem, add default include/asm-*/mutex.h filesArjan van de Ven2006-01-091-0/+9
| | | | | | | | | | | | | add the per-arch mutex.h files for the remaining architectures. We default to asm-generic/mutex-dec.h, because that performs quite well on most arches. Arches that do not have atomic decrement/increment instructions should switch to mutex-xchg.h instead. Arches can also provide their own implementation for the mutex fastpath primitives. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* [PATCH] mutex subsystem, add atomic_xchg() to all archesIngo Molnar2006-01-091-0/+1
| | | | | | | add atomic_xchg() to all the architectures. Needed by the new mutex code. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@infradead.org>
* [PATCH] consolidate asm/futex.hJeff Dike2006-01-081-48/+1
| | | | | | | | | | | | | Most of the architectures have the same asm/futex.h. This consolidates them into asm-generic, with the arches including it from their own asm/futex.h. In the case of UML, this reverts the old broken futex.h and goes back to using the same one as almost everyone else. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Kill L1_CACHE_SHIFT_MAXRavikiran G Thirumalai2006-01-081-1/+0
| | | | | | | | | | | Kill L1_CACHE_SHIFT from all arches. Since L1_CACHE_SHIFT_MAX is not used anymore with the introduction of INTERNODE_CACHE, kill L1_CACHE_SHIFT_MAX. Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Signed-off-by: Shai Fultheim <shai@scalex86.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] atomic_long_t & include/asm-generic/atomic.h V2Christoph Lameter2006-01-061-0/+1
| | | | | | | | | | | | | | | | | | | Several counters already have the need to use 64 atomic variables on 64 bit platforms (see mm_counter_t in sched.h). We have to do ugly ifdefs to fall back to 32 bit atomic on 32 bit platforms. The VM statistics patch that I am working on will also make more extensive use of atomic64. This patch introduces a new type atomic_long_t by providing definitions in asm-generic/atomic.h that works similar to the c "long" type. Its 32 bits on 32 bit platforms and 64 bits on 64 bit platforms. Also cleans up the determination of the mm_counter_t in sched.h. 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] madvise(MADV_REMOVE): remove pages from tmpfs shm backing storeBadari Pulavarty2006-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is the patch to implement madvise(MADV_REMOVE) - which frees up a given range of pages & its associated backing store. Current implementation supports only shmfs/tmpfs and other filesystems return -ENOSYS. "Some app allocates large tmpfs files, then when some task quits and some client disconnect, some memory can be released. However the only way to release tmpfs-swap is to MADV_REMOVE". - Andrea Arcangeli Databases want to use this feature to drop a section of their bufferpool (shared memory segments) - without writing back to disk/swap space. This feature is also useful for supporting hot-plug memory on UML. Concerns raised by Andrew Morton: - "We have no plan for holepunching! If we _do_ have such a plan (or might in the future) then what would the API look like? I think sys_holepunch(fd, start, len), so we should start out with that." - Using madvise is very weird, because people will ask "why do I need to mmap my file before I can stick a hole in it?" - None of the other madvise operations call into the filesystem in this manner. A broad question is: is this capability an MM operation or a filesytem operation? truncate, for example, is a filesystem operation which sometimes has MM side-effects. madvise is an mm operation and with this patch, it gains FS side-effects, only they're really, really significant ones." Comments: - Andrea suggested the fs operation too but then it's more efficient to have it as a mm operation with fs side effects, because they don't immediatly know fd and physical offset of the range. It's possible to fixup in userland and to use the fs operation but it's more expensive, the vmas are already in the kernel and we can use them. Short term plan & Future Direction: - We seem to need this interface only for shmfs/tmpfs files in the short term. We have to add hooks into the filesystem for correctness and completeness. This is what this patch does. - In the future, plan is to support both fs and mmap apis also. This also involves (other) filesystem specific functions to be implemented. - Current patch doesn't support VM_NONLINEAR - which can be addressed in the future. Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Cc: Hugh Dickins <hugh@veritas.com> Cc: Andrea Arcangeli <andrea@suse.de> Cc: Michael Kerrisk <mtk-manpages@gmx.net> Cc: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [FLS64]: generic versionStephen Hemminger2006-01-031-0/+1
| | | | | Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PARISC] Always spinlock tlb flush operations to ensure preempt safetyMatthew Wilcox2005-11-171-12/+4
| | | | | | | | | Since taking a spinlock disables preempt, and we need to spinlock tlb flush on SMP for N class, we might as well just spinlock on uniprocessor machines too. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Fix our spinlock implementationJames Bottomley2005-11-171-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | We actually have two separate bad bugs 1. The read_lock implementation spins with disabled interrupts. This is completely wrong 2. Our spin_lock_irqsave should check to see if interrupts were enabled before the call and re-enable interrupts around the inner spin loop. The problem is that if we spin with interrupts off, we can't receive IPIs. This has resulted in a bug where SMP machines suddenly spit smp_call_function timeout messages and hang. The scenario I've caught is CPU0 does a flush_tlb_all holding the vmlist_lock for write. CPU1 tries a cat of /proc/meminfo which tries to acquire vmlist_lock for read CPU1 is now spinning with interrupts disabled CPU0 tries to execute a smp_call_function to flush the local tlb caches This is now a deadlock because CPU1 is spinning with interrupts disabled and can never receive the IPI Signed-off-by: James Bottomley <jejb@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Add IRQ affinitiesJames Bottomley2005-11-171-2/+3
| | | | | | | | | | | | This really only adds them for the machines I can check SMP on, which is CPU interrupts and IOSAPIC (so not any of the GSC based machines). With this patch, irqbalanced can be used to maintain irq balancing. Unfortunately, irqbalanced is a bit x86 centric, so it doesn't do an incredibly good job, but it does work. Signed-off-by: James Bottomley <jejb@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Fix uniprocessor build by dummying smp_send_all_nop()Kyle McMartin2005-11-171-1/+5
| | | | | | | | Since irq.c uses smp_send_all_nop, we must define it for UP builds as well. Make it a static inline so it gets optimized away. This forces irq.c to include <asm/smp.h> though. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] Fix our interrupts not to use smp_call_functionJames Bottomley2005-11-171-0/+1
| | | | | | | | | | | | | Fix our interrupts not to use smp_call_function On K and D class smp, the generic code calls this under an irq spinlock, which causes the WARN_ON() message in smp_call_function() (and is also illegal because it could deadlock). The fix is to use a new scheme based on the IPI_NOP. Signed-off-by: James Bottomley <jejb@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PATCH] atomic: inc_not_zeroNick Piggin2005-11-131-0/+19
| | | | | | | | | | | Introduce an atomic_inc_not_zero operation. Make this a special case of atomic_add_unless because lockless pagecache actually wants atomic_inc_not_negativeone due to its offset refcount. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
OpenPOWER on IntegriCloud