Commit graph

95 commits

Author SHA1 Message Date
Russell King 4fe15ba08f [ARM] Fix second missing declaration of cache_is_vivt()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-06 19:47:04 +00:00
Russell King 4299051ebe [ARM] Fix missing declaration of cache_is_vivt()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-06 15:46:57 +00:00
Nicolas Pitre b7ec479553 [ARM] 3115/1: small optimizations to exception vector entry code
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>
2005-11-06 14:42:37 +00:00
Russell King a054a81159 [ARM SMP] Add hotplug CPU infrastructure
This patch adds the infrastructure to support hotplug CPU on ARM
platforms.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-02 22:24:33 +00:00
Russell King 273c2cdb2b [ARM SMP] Fix a couple of warnings
Use *cpus_addr() to display the mask of pending/to be called CPUs.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-02 21:54:14 +00:00
Russell King 71f512e897 [ARM SMP] Track CPU idle threads
Track the idle thread task_struct for each CPU.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-02 21:51:40 +00:00
Linus Torvalds 1480d0a31d Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-10-30 17:48:00 -08:00
Tim Schmielau 4e57b68178 [PATCH] fix missing includes
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>
2005-10-30 17:37:32 -08:00
Thomas Gleixner ecea8d19c9 [PATCH] jiffies_64 cleanup
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>
2005-10-30 17:37:25 -08:00
Christoph Hellwig dfb7dac3af [PATCH] unify sys_ptrace prototype
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>
2005-10-30 17:37:20 -08:00
Russell King d362979aa2 [ARM] Re-organise die()
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>
2005-10-30 19:01:43 +00:00
Hugh Dickins 69b0475456 [PATCH] mm: arm ready for split ptlock
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>
2005-10-29 21:40:42 -07:00
Nicolas Pitre 37d07b72ef [ARM] 3061/1: cleanup the XIP link address mess
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>
2005-10-29 21:44:56 +01:00
Nicolas Pitre f09b997999 [ARM] 3060/1: allow constants found in asm/memory.h to be used in asm code
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>
2005-10-29 21:44:55 +01:00
Nicolas Pitre a999cb04b4 [ARM] 3035/1: RISCOS compat code fix
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>
2005-10-28 16:35:46 +01:00
Russell King f339ab3d6c [ARM] Fix sparse warnings
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>
2005-10-28 14:29:43 +01:00
Nicolas Pitre 13b1f64c16 [ARM] 3008/1: the exception table is not read-only
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>
2005-10-13 22:04:37 +01:00
Ben Dooks a7b1bbbc89 [ARM] 2977/1: armksyms.c - make items in export table static
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>
2005-10-12 19:58:07 +01:00
Nicolas Pitre 60ac133aac [ARM] 2974/1: fix ARM710 swi bug workaround
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>
2005-10-12 19:51:24 +01:00
Nicolas Pitre c2f480869f [ARM] 2952/1: fix a register clobber list
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>
2005-10-04 23:17:53 +01:00
Nicolas Pitre 74f8849496 [ARM] 2951/1: fix wrong comment
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>
2005-10-04 23:17:52 +01:00
Russell King d2f607484f [ARM] Fix compiler warnings for memcpy_toio/memcpy_fromio/memset_io
Add 'volatile' to the __iomem pointers for these functions as
per x86.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-24 10:42:06 +01:00
Russell King 73394322a4 [ARM] Fix context switch with ARMv6 + TLS
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>
2005-09-23 21:49:58 +01:00
Catalin Marinas 6a1ced59b3 [ARM] 2932/1: Avoid the "noreturn" warning in arch/arm/kernel/traps.c
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>
2005-09-21 22:14:05 +01:00
Ben Dooks 9d0fd1eb8a [ARM] 2927/1: .arch.info - postfix section with .init for make buildcheck
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>
2005-09-20 16:45:20 +01:00
Ben Dooks 02b7dd1244 [ARM] 2926/1: .proc.info - postfix section with .init for make buildcheck
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>
2005-09-20 16:35:03 +01:00
Ben Dooks bfe6815e04 [ARM] 2925/3: earlyparam - postfix section with .init for make buildcheck
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>
2005-09-20 16:25:12 +01:00
Ben Dooks 9506057fca [ARM] 2924/3: taglist - postfix section with .init for make buildcheck
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>
2005-09-20 16:20:49 +01:00
Russell King 63150fcf73 [ARM] Fix warning in arch/arm/kernel/semaphore.c
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>
2005-09-18 21:49:29 +01:00
George G. Davis 34f521fd55 [ARM] 2896/1: Add sys_ipc_wrapper to pass 'fifth' argument on stack
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>
2005-09-13 22:55:00 +01:00
Linus Torvalds abf914208a Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-09-10 10:16:47 -07:00
Sam Ravnborg e6ae744dd2 kbuild: arm - use generic asm-offsets.h support
Delete obsoleted stuff from arch Makefile and rename
constants.h to asm-offsets.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-09-09 21:08:59 +02:00
Russell King 9b9eb8c061 [ARM] sys_mbind needs wrapping
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>
2005-09-09 18:35:12 +01:00
Russell King 9c2c389307 [ARM] Add memory type based allocation syscalls
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>
2005-09-09 11:12:51 +01:00
john stultz b149ee2233 [PATCH] NTP: ntp-helper functions
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>
2005-09-07 16:57:34 -07:00
Russell King 664399e1fb [ARM] Wrap calls to descriptor handlers
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>
2005-09-04 19:45:00 +01:00
Russell King 7801907b8c [ARM] Change irq_chip wake/type methods to set_wake/set_type
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>
2005-09-04 19:43:13 +01:00
Russell King 7db078be19 [ARM] Stack starts at THREAD_START_SP offset, not THREAD_SIZE-8
Use the correct constants.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-04 11:03:15 +01:00
Nicolas Pitre 68d9102f76 [ARM] 2865/2: fix fadvise64_64 syscall argument passing
Patch from Nicolas Pitre

The prototype for sys_fadvise64_64() is:
    long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
The argument list is therefore as follows on legacy ABI:
	fd: type int (r0)
	offset: type long long (r1-r2)
	len: type long long (r3-sp[0])
	advice: type int (sp[4])
With EABI this becomes:
	fd: type int (r0)
	offset: type long long (r2-r3)
	len: type long long (sp[0]-sp[4])
	advice: type int (sp[8])
Not only do we have ABI differences here, but the EABI version requires
one additional word on the syscall stack.
To avoid the ABI mismatch and the extra stack space required with EABI
this syscall is now defined with a different argument ordering
on ARM as follows:
    long sys_arm_fadvise64_64(int fd, int advice, loff_t offset, loff_t len)
This gives us the following ABI independent argument distribution:
	fd: type int (r0)
	advice: type int (r1)
	offset: type long long (r2-r3)
	len: type long long (sp[0]-sp[4])
Now, since the syscall entry code takes care of 5 registers only by
default including the store of r4 to the stack, we need a wrapper to
store r5 to the stack as well.  Because that wrapper was missing and was
always required this means that sys_fadvise64_64 never worked on ARM and
therefore we can safely reuse its syscall number for our new
sys_arm_fadvise64_64 interface.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-01 12:37:13 +01:00
Ben Dooks 3618886f64 [ARM] 2857/2: Dynamic tick - fix OOPS if configured and not provided
Patch from Ben Dooks

timer_dyn_reprogram() fails with an OOPS if the
configuration for CONFIG_NO_IDLE_HZ is enabled, and
the system has no support for it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-31 09:42:14 +01:00
Steven Rostedt 69be8f1896 [PATCH] convert signal handling of NODEFER to act like other Unix boxes.
It has been reported that the way Linux handles NODEFER for signals is
not consistent with the way other Unix boxes handle it.  I've written a
program to test the behavior of how this flag affects signals and had
several reports from people who ran this on various Unix boxes,
confirming that Linux seems to be unique on the way this is handled.

The way NODEFER affects signals on other Unix boxes is as follows:

1) If NODEFER is set, other signals in sa_mask are still blocked.

2) If NODEFER is set and the signal is in sa_mask, then the signal is
still blocked. (Note: this is the behavior of all tested but Linux _and_
NetBSD 2.0 *).

The way NODEFER affects signals on Linux:

1) If NODEFER is set, other signals are _not_ blocked regardless of
sa_mask (Even NetBSD doesn't do this).

2) If NODEFER is set and the signal is in sa_mask, then the signal being
handled is not blocked.

The patch converts signal handling in all current Linux architectures to
the way most Unix boxes work.

Unix boxes that were tested:  DU4, AIX 5.2, Irix 6.5, NetBSD 2.0, SFU
3.5 on WinXP, AIX 5.3, Mac OSX, and of course Linux 2.6.13-rcX.

* NetBSD was the only other Unix to behave like Linux on point #2. The
main concern was brought up by point #1 which even NetBSD isn't like
Linux.  So with this patch, we leave NetBSD as the lonely one that
behaves differently here with #2.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-29 10:03:11 -07:00
Al Viro 33215652e4 [PATCH] qualifiers in return types - easy cases
a bunch of functions switched from volatile to __attribute__((noreturn)) and
from const to __attribute_pure__

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-23 18:43:45 -07:00
Robert Love 498de0cc5e [ARM] Add syscall stubs for inotify and ioprio system calls
Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-15 10:57:08 +01:00
Russell King b876386ee4 [ARM SMP] Clear the exclusive monitor on ARMv6 CPUs on context switch
Ensure that the exclusive monitor is cleared on context switch with
ARMv6 CPUs.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-10 14:52:52 +01:00
Dominik Brodowski 43c3473552 [PATCH] pci and yenta: pcibios_bus_to_resource
In yenta_socket, we default to using the resource setting of the CardBus
bridge.  However, this is a PCI-bus-centric view of resources and thus needs
to be converted to generic resources first.  Therefore, add a call to
pcibios_bus_to_resource() call in between.  This function is a mere wrapper on
x86 and friends, however on some others it already exists, is added in this
patch (alpha, arm, ppc, ppc64) or still needs to be provided (parisc -- where
is its pcibios_resource_to_bus() ?).

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-04 21:32:46 -07:00
Russell King 505d7b1931 [ARM SMP] Ensure secondary CPUs have a clean TLB
Since ARMv6 CPUs will not flush the TLB on context switches, it is
possible that we may end up with some global TLB entries remaining
present, eventually upsetting userspace.  Explicitly flush the
entire TLB on secondary CPUs as they startup, after we have switched
to the init_mm page tables.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-07-28 20:32:47 +01:00
Eric W. Biederman 59586e5a26 [PATCH] Don't export machine_restart, machine_halt, or machine_power_off.
machine_restart, machine_halt and machine_power_off are machine
specific hooks deep into the reboot logic, that modules
have no business messing with.  Usually code should be calling
kernel_restart, kernel_halt, kernel_power_off, or
emergency_restart. So don't export machine_restart,
machine_halt, and machine_power_off so we can catch buggy users.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:42 -07:00
Russell King bd6f68af29 [PATCH] ARM SMP: Mark CPU init functions/data with __cpuinit/...data
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-07-17 21:35:41 +01:00
Russell King 109d89ca0e [PATCH] ARM: Allow register_undef_hook to be called with IRQs off
Preserve the interrupt status across a call to register_undef_hook.
This allows it to be called while interrupts are disabled.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-07-16 16:43:33 +01:00
Russell King 73eb7d9e8c [PATCH] ARM SMP: Initialise cpu_present_map
Rather than relying on the fixup code in init/main.c, explicitly
initialise cpu_present_map.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-07-11 19:42:58 +01:00