summaryrefslogtreecommitdiff
path: root/arch/arm/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2005-11-091-1/+1
|\
| * [ARM] 3100/1: simplify a pointer computationNicolas Pitre2005-11-091-1/+1
| | | | | | | | | | | | | | | | | | Patch from Nicolas Pitre Looks clearer this way. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [PATCH] sched: resched and cpu_idle reworkNick Piggin2005-11-091-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make some changes to the NEED_RESCHED and POLLING_NRFLAG to reduce confusion, and make their semantics rigid. Improves efficiency of resched_task and some cpu_idle routines. * In resched_task: - TIF_NEED_RESCHED is only cleared with the task's runqueue lock held, and as we hold it during resched_task, then there is no need for an atomic test and set there. The only other time this should be set is when the task's quantum expires, in the timer interrupt - this is protected against because the rq lock is irq-safe. - If TIF_NEED_RESCHED is set, then we don't need to do anything. It won't get unset until the task get's schedule()d off. - If we are running on the same CPU as the task we resched, then set TIF_NEED_RESCHED and no further action is required. - If we are running on another CPU, and TIF_POLLING_NRFLAG is *not* set after TIF_NEED_RESCHED has been set, then we need to send an IPI. Using these rules, we are able to remove the test and set operation in resched_task, and make clear the previously vague semantics of POLLING_NRFLAG. * In idle routines: - Enter cpu_idle with preempt disabled. When the need_resched() condition becomes true, explicitly call schedule(). This makes things a bit clearer (IMO), but haven't updated all architectures yet. - Many do a test and clear of TIF_NEED_RESCHED for some reason. According to the resched_task rules, this isn't needed (and actually breaks the assumption that TIF_NEED_RESCHED is only cleared with the runqueue lock held). So remove that. Generally one less locked memory op when switching to the idle thread. - Many idle routines clear TIF_POLLING_NRFLAG, and only set it in the inner most polling idle loops. The above resched_task semantics allow it to be set until before the last time need_resched() is checked before going into a halt requiring interrupt wakeup. Many idle routines simply never enter such a halt, and so POLLING_NRFLAG can be always left set, completely eliminating resched IPIs when rescheduling the idle task. POLLING_NRFLAG width can be increased, to reduce the chance of resched IPIs. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Con Kolivas <kernel@kolivas.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] sched: disable preempt in idle tasksNick Piggin2005-11-092-3/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run idle threads with preempt disabled. Also corrected a bugs in arm26's cpu_idle (make it actually call schedule()). How did it ever work before? Might fix the CPU hotplugging hang which Nigel Cunningham noted. We think the bug hits if the idle thread is preempted after checking need_resched() and before going to sleep, then the CPU offlined. After calling stop_machine_run, the CPU eventually returns from preemption and into the idle thread and goes to sleep. The CPU will continue executing previous idle and have no chance to call play_dead. By disabling preemption until we are ready to explicitly schedule, this bug is fixed and the idle threads generally become more robust. From: alexs <ashepard@u.washington.edu> PPC build fix From: Yoichi Yuasa <yuasa@hh.iij4u.or.jp> MIPS build fix Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge with ARM SMP treeRussell King2005-11-083-0/+42
|\
| * [ARM SMP] Add core ARM support for local timersRussell King2005-11-083-0/+42
| | | | | | | | | | | | | | Add infrastructure for supporting per-cpu local timers to update the profiling information and update system time accounting. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [ARM] 3134/1: add missing EXPORT_SYMBOL for the ARM version of sha_transformNicolas Pitre2005-11-081-0/+4
|/ | | | | | | | | Patch from Nicolas Pitre Noticed by Woody Suwalski <woodys@xandros.com>. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] More sparse fixesRussell King2005-11-082-2/+2
| | | | | | | | | arch/arm/kernel/irq.c:998:26: warning: Using plain integer as NULL pointer arch/arm/kernel/smp.c:145:25: warning: Using plain integer as NULL pointer arch/arm/kernel/smp.c:362:5: warning: symbol 'smp_call_function_on_cpu' was not declared. Should it be static? drivers/video/amba-clcd.c:521:12: warning: symbol 'amba_clcdfb_init' was not declared. Should it be static? Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM SMP] Fix some sparse warnings in SMP codeRussell King2005-11-081-3/+3
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [PATCH] consolidate sys_ptrace()Christoph Hellwig2005-11-071-48/+1
| | | | | | | | | | | | | | | | | | | | | | The sys_ptrace boilerplate code (everything outside the big switch statement for the arch-specific requests) is shared by most architectures. This patch moves it to kernel/ptrace.c and leaves the arch-specific code as arch_ptrace. Some architectures have a too different ptrace so we have to exclude them. They continue to keep their implementations. For sh64 I had to add a sh64_ptrace wrapper because it does some initialization on the first call. For um I removed an ifdefed SUBARCH_PTRACE_SPECIAL block, but SUBARCH_PTRACE_SPECIAL isn't defined anywhere in the tree. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: Ralf Baechle <ralf@linux-mips.org> Acked-By: David Howells <dhowells@redhat.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [ARM] Fix /proc/cpuinfo format for ARM SMPRussell King2005-11-061-1/+6
| | | | | | | | glibc expects to count lines beginning with "processor" to determine the number of processors, not lines beginning with "Processor". So, give glibc the format it expects. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Don't call dump_cpu_info unless we're bootingRussell King2005-11-061-1/+2
| | | | | | | | We don't want to call dump_cpu_info() from cpu_init() after boot since it produces a lot of unnecessary noise - since cpu_init() gets called on resume and hotplug cpu insertion events. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Fix second missing declaration of cache_is_vivt()Russell King2005-11-061-1/+0
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Fix missing declaration of cache_is_vivt()Russell King2005-11-061-0/+1
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3115/1: small optimizations to exception vector entry codeNicolas Pitre2005-11-061-8/+7
| | | | | | | | | | Patch from Nicolas Pitre Since we know the value of cpsr on entry, we can replace the bic+orr with a single eor. Also remove a possible result delay (at least on XScale). Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM SMP] Add hotplug CPU infrastructureRussell King2005-11-023-0/+125
| | | | | | | This patch adds the infrastructure to support hotplug CPU on ARM platforms. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM SMP] Fix a couple of warningsRussell King2005-11-021-2/+2
| | | | | | Use *cpus_addr() to display the mask of pending/to be called CPUs. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM SMP] Track CPU idle threadsRussell King2005-11-021-7/+13
| | | | | | Track the idle thread task_struct for each CPU. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2005-10-301-12/+17
|\
| * [ARM] Re-organise die()Russell King2005-10-301-12/+17
| | | | | | | | | | | | | | Provide __die() which can be called from various contexts to provide an oops report. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [PATCH] fix missing includesTim Schmielau2005-10-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] jiffies_64 cleanupThomas Gleixner2005-10-301-4/+0
| | | | | | | | | | | | | | | | | | Define jiffies_64 in kernel/timer.c rather than having 24 duplicated defines in each architecture. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] unify sys_ptrace prototypeChristoph Hellwig2005-10-301-1/+1
|/ | | | | | | | | | Make sure we always return, as all syscalls should. Also move the common prototype to <linux/syscalls.h> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mm: arm ready for split ptlockHugh Dickins2005-10-292-83/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare arm for the split page_table_lock: three issues. Signal handling's preserve and restore of iwmmxt context currently involves reading and writing that context to and from user space, while holding page_table_lock to secure the user page(s) against kswapd. If we split the lock, then the structure might span two pages, secured by to read into and write from a kernel stack buffer, copying that out and in without locking (the structure is 160 bytes in size, and here we're near the top of the kernel stack). Or would the overhead be noticeable? arm_syscall's cmpxchg emulation use pte_offset_map_lock, instead of pte_offset_map and mm-wide page_table_lock; and strictly, it should now also take mmap_sem before descending to pmd, to guard against another thread munmapping, and the page table pulled out beneath this thread. Updated two comments in fault-armv.c. adjust_pte is interesting, since its modification of a pte in one part of the mm depends on the lock held when calling update_mmu_cache for a pte in some other part of that mm. This can't be done with a split page_table_lock (and we've already taken the lowest lock in the hierarchy here): so we'll have to disable split on arm, unless CONFIG_CPU_CACHE_VIPT to ensures adjust_pte never used. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [ARM] 3061/1: cleanup the XIP link address messNicolas Pitre2005-10-293-41/+26
| | | | | | | | | | | | | | | 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] 3035/1: RISCOS compat code fixNicolas Pitre2005-10-281-1/+3
| | | | | | | | | | | | | Patch from Nicolas Pitre From: Daniel Jacobowitz <dan@debian.org> > I also fixed a bug that confused me greatly while trying to debug: one > SIGILL has long been a SIGSEGV because of some broken RISCOS > compatibility code. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Fix sparse warningsRussell King2005-10-281-0/+1
| | | | | | | | Fix sparse warnings in arch/arm/kernel/module.c, arch/arm/mm/consistent.c, drivers/pcmcia/sa1111_generic.c, and platform support files. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3008/1: the exception table is not read-onlyNicolas Pitre2005-10-131-7/+8
| | | | | | | | | Patch from Nicolas Pitre ... and therefore should not live in the .text section. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2977/1: armksyms.c - make items in export table staticBen Dooks2005-10-121-2/+2
| | | | | | | | | | | Patch from Ben Dooks The items in the export table do not need to be exported elsehwere, so quash the sparse warning by making the symbol for the table entry static. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2974/1: fix ARM710 swi bug workaroundNicolas Pitre2005-10-121-6/+1
| | | | | | | | | | | | | Patch from Nicolas Pitre Either no one is using an ARM710 with recent kernels, or all ARM710s still in use are not afflicted by this swi bug. Nevertheless, the code to work around the ARM710 swi bug is itself currently buggy since it uses r8 as a pointer to S_PC while in fact it holds the spsr content these days. Fix that, and simplify the code as well. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2952/1: fix a register clobber listNicolas Pitre2005-10-041-1/+1
| | | | | | | | | Patch from Nicolas Pitre If gcc decides to assign lr to %0 we're screwed. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2951/1: fix wrong commentNicolas Pitre2005-10-041-1/+1
| | | | | | | | | Patch from Nicolas Pitre The cmpxchg emulation syscall needs write access. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Fix compiler warnings for memcpy_toio/memcpy_fromio/memset_ioRussell King2005-09-241-3/+3
| | | | | | | Add 'volatile' to the __iomem pointers for these functions as per x86. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Fix context switch with ARMv6 + TLSRussell King2005-09-231-1/+1
| | | | | | | We accidentally corrupted the TLS value when clearing out the ARMv6 exclusive monitor. Avoid doing so. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2932/1: Avoid the "noreturn" warning in arch/arm/kernel/traps.cCatalin Marinas2005-09-211-0/+3
| | | | | | | | | | Patch from Catalin Marinas This patch prevents the "noreturn function does return" warning in the __bug() function in arch/arm/kernel/traps.c Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2927/1: .arch.info - postfix section with .init for `make buildcheck`Ben Dooks2005-09-201-1/+1
| | | | | | | | | | | Patch from Ben Dooks The `make buildcheck` is erroneously reporting that the .arch.info list is referencing items in the .init section as it is not itself postfixed with .init Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2926/1: .proc.info - postfix section with .init for `make buildcheck`Ben Dooks2005-09-201-1/+1
| | | | | | | | | | | Patch from Ben Dooks The `make buildcheck` is erroneously reporting that the .proc.info list is referencing items in the .init section as it is not itself postfixed with .init Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2925/3: earlyparam - postfix section with .init for `make buildcheck`Ben Dooks2005-09-201-1/+1
| | | | | | | | | | | | | Patch from Ben Dooks The `make buildcheck` is erroneously reporting that the earlyparam list is referencing items in the .init section as it is not itself postfixed with .init Also, as per rmk's suggestion, rename the __early_param to .early_param to bring it into line with everything else Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2924/3: taglist - postfix section with .init for `make buildcheck`Ben Dooks2005-09-201-1/+1
| | | | | | | | | | | Patch from Ben Dooks The `make buildcheck` is erroneously reporting that the taglist is referencing items in the .init section as it is not itself postfixed with .init Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Fix warning in arch/arm/kernel/semaphore.cRussell King2005-09-181-1/+1
| | | | | | | | | Newer binutils complains: /tmp/cc07pbI9.s:146: Warning: ignoring changed section type for .sched.text Fix this warning by adding %progbits to the .section. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2896/1: Add sys_ipc_wrapper to pass 'fifth' argument on stackGeorge G. Davis2005-09-132-1/+5
| | | | | | | | | | | | Patch from George G. Davis As pointed out be Matthew Klahn <MKLAHN@motorola.com>, some sys_ipc() call options require six args, e.g. SEMTIMEDOP. This patch adds an ARM sys_ipc_wrapper to save the sys_ipc() 'fifth' arg on the stack. Signed-off-by: George G. Davis <gdavis@mvista.com> arch/arm/kernel/calls.S | 2 +- arch/arm/kernel/entry-common.S | 5 +++++ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge master.kernel.org:/home/rmk/linux-2.6-arm Linus Torvalds2005-09-102-1/+8
|\
| * [ARM] sys_mbind needs wrappingRussell King2005-09-092-1/+5
| | | | | | | | | | | | | | sys_mbind is a 6-arg syscall, hence needs wrapping to save the sixth argument. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [ARM] Add memory type based allocation syscallsRussell King2005-09-091-1/+4
| | | | | | | | | | | | | | Add syscall numbers and syscall table entries for mbind, set_mempolicy and get_mempolicy. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | kbuild: arm - use generic asm-offsets.h supportSam Ravnborg2005-09-093-3/+3
|/ | | | | | | Delete obsoleted stuff from arch Makefile and rename constants.h to asm-offsets.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* [PATCH] NTP: ntp-helper functionsjohn stultz2005-09-071-5/+2
| | | | | | | | | | | | | | | | This patch cleans up a commonly repeated set of changes to the NTP state variables by adding two helper inline functions: ntp_clear(): Clears the ntp state variables ntp_synced(): Returns 1 if the system is synced with a time server. This was compile tested for alpha, arm, i386, x86-64, ppc64, s390, sparc, sparc64. Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [ARM] Wrap calls to descriptor handlersRussell King2005-09-042-4/+4
| | | | | | | | | | This is part of Thomas Gleixner's generic IRQ patch, which converts ARM to use the generic IRQ subsystem. Here, we wrap calls to desc->handler() in an inline function, desc_handle_irq(). This reduces the size of Thomas' patch since the changes become more localised. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Change irq_chip wake/type methods to set_wake/set_typeRussell King2005-09-041-8/+8
| | | | | | | | This is part of Thomas Gleixner's generic IRQ patch, which converts ARM to use the generic IRQ subsystem. Here, we rename two of the irq_chip methods - wake becomes set_wake, and type becomes set_type. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Stack starts at THREAD_START_SP offset, not THREAD_SIZE-8Russell King2005-09-041-1/+1
| | | | | | Use the correct constants. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>