Commit Graph

332 Commits (07b20889e3052c7e77d6a6a54e7e83446eb1ba84)

Author SHA1 Message Date
Linus Torvalds 3f00d3e8fb Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2005-11-07 11:15:23 -08:00
Atsushi Nemoto 16cd395136 Fix return type of setup_frame variants
Since 2.6.13-rc1 setup_frame and its variants return int.  But some bits
were missed in the conversion.
    
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-07 18:05:39 +00:00
Ralf Baechle 0d959c260e IRIX: Use schedule_timeout_interruptible.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-07 18:05:39 +00:00
Atsushi Nemoto 53c2df2f4e Use rtc_lock to protect RTC operations
Many RTC routines were not protected against each other, so there are
potential races, for example, ntp-update against /dev/rtc.  This patch
fixes them using rtc_lock.
    
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-07 18:05:38 +00:00
Ralf Baechle 15b96a4757 Add .gitignore files for MIPS. 2005-11-07 18:05:37 +00:00
Ralf Baechle 307bd284c2 VPE loader janitoring
o Switch to dynamic major
 o Remove duplicate SHN_MIPS_SCOMMON definition
 o Coding style: remove typedefs.
 o Coding style: reorder to avoid the need for forward declarations
 o Use kzalloc.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-07 18:05:36 +00:00
Ralf Baechle b8c2a77ce3 PNX8550 uses a MIPS32-like processor core, not R4xx0.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-07 18:05:36 +00:00
Ralf Baechle afc4841d8a Turn rtlx upside down.
o Coding style
 o Race condition on open
 o Switch to dynamic major
 o Header file cleanup
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-07 18:05:33 +00:00
Christoph Hellwig 481bed4542 [PATCH] consolidate sys_ptrace()
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>
2005-11-07 07:53:42 -08:00
Linus Torvalds 4fd5f8267d Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Manual #include fixups for clashes - there may be some unnecessary
2005-10-31 07:32:56 -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
Eric W. Biederman a928972864 [PATCH] Don't uselessly export task_struct to userspace in core dumps
task_struct is an internal structure to the kernel with a lot of good
information, that is probably interesting in core dumps.  However there is
no way for user space to know what format that information is in making it
useless.

I grepped the GDB 6.3 source code and NT_TASKSTRUCT while defined is not
used anywhere else.  So I would be surprised if anyone notices it is
missing.

In addition exporting kernel pointers to all the interesting kernel data
structures sounds like the very definition of an information leak.  I
haven't a clue what someone with evil intentions could do with that
information, but in any attack against the kernel it looks like this is the
perfect tool for aiming that attack.

So since NT_TASKSTRUCT is useless as currently defined and is potentially
dangerous, let's just not export it.

(akpm: Daniel Jacobowitz <dan@debian.org> "would be amazed" if anything was
using NT_TASKSTRUCT).

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:18 -08:00
Hugh Dickins 872fec16d9 [PATCH] mm: init_mm without ptlock
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>
2005-10-29 21:40:40 -07:00
Hugh Dickins 404351e67a [PATCH] mm: mm_init set_mm_counters
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>
2005-10-29 21:40:38 -07:00
Ralf Baechle 09af7b443c Update MIPS defconfig files.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:54 +01:00
Arthur Othieno 5ef66935c1 prom_free_prom_memory() returns unsigned long
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>
2005-10-29 19:32:53 +01:00
Ralf Baechle 4b724efdde Get rid of SINGLE_ONLY_FPU. Linux does not support half FPU other than
by emulation of a full FPU.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:52 +01:00
Ralf Baechle 3fccc0150e Fix all the get_user / put_user related sparse warnings.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:52 +01:00
Ralf Baechle 3c5c8f6748 Delete unused ieee754_cname[] and declaration.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:52 +01:00
Ralf Baechle efec3c4e96 Include for prototypes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:51 +01:00
Ralf Baechle a663bf906d Protect against multiple inclusion.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:51 +01:00
Ralf Baechle 030274ae03 Remove useless casts of kmalloc return values.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:50 +01:00
Ralf Baechle e5adb8770e Hack to resolve longstanding prefetch issue
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>
2005-10-29 19:32:50 +01:00
Ralf Baechle 7cf8053b8e More foolproofing of the CPU configuration.
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>
2005-10-29 19:32:49 +01:00
Andrew Isaacson cb4262481f pci-expmem-hack
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>
2005-10-29 19:32:49 +01:00
Andrew Isaacson 8a1417de9e BCM1480 HT support
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>
2005-10-29 19:32:49 +01:00
Andrew Isaacson dc41f94f77 Support for the BCM1480 on-chip PCI-X bridge.
Signed-Off-By: Andy Isaacson <adi@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:48 +01:00
Andrew Isaacson a4b5bd9abc SB1 cache exception handling.
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>
2005-10-29 19:32:48 +01:00
Andrew Isaacson 9a6dcea103 Support for BigSur board.
Signed-Off-By: Andy Isaacson <adi@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:47 +01:00
Andrew Isaacson f137e463b5 Add support for BCM1480 family of chips.
- 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>
2005-10-29 19:32:47 +01:00
Andrew Isaacson 93ce2f524e Add support for SB1A CPU.
Signed-Off-By: Andy Isaacson <adi@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:46 +01:00
Andrew Isaacson d121ced21d Sibyte fixes
Fix typo in cpu_probe_sibyte.
    
Signed-Off-By: Andy Isaacson <adi@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:45 +01:00
Atsushi Nemoto 750ccf687f Fix zero length sys_cacheflush
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>
2005-10-29 19:32:44 +01:00
Ralf Baechle f4c72cc737 Get 64-bit right in the kgdb stub.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:43 +01:00
Ralf Baechle 0d507d61cd Sys_lookup_dcookie arguments occupy 4 argument slots.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:43 +01:00
Ralf Baechle 12616ed202 FPU emulator garbage collection.
First argument of fpu_emulator_cop1Handler() was unused.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:43 +01:00
Ralf Baechle 178086c86a Don't print file name and line in die and die_if_kernel.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:42 +01:00
Ralf Baechle 6ec25809c1 Rename page argument of flush_cache_page to something more descriptive.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:42 +01:00
Ralf Baechle 5e83d43054 Sliceup Kconfig; it's grown too large.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:41 +01:00
Ralf Baechle 9383292f17 Date: Fri Jan 14 03:03:23 2005 +0000
Locking cleanups.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:39 +01:00
Ralf Baechle dbc571690e Fix wrong comment.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:38 +01:00
Ralf Baechle ec917c2c1a Fixup a few lose ends in explicit support for MIPS R1/R2.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:37 +01:00
Ralf Baechle f92c1759a4 Document the meaning of the CPU_MIPS32, CPU_MIPS64, CPU_MIPSR1 and
CPU_MIPSR2.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:37 +01:00
Ralf Baechle 101b3531a6 Protect manipulation of c0_status against preemption and multithreading.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:36 +01:00
Ralf Baechle 8afcb5d829 Detect 4KSD and treat it like 4KSc.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:36 +01:00
Ralf Baechle 2f69ddccb0 Convert the remaining SPIN_LOCK_UNLOCKED instances to DEFINE_SPINLOCK.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:35 +01:00
Ralf Baechle 57468af326 Define and initialize kdb_lock using DEFINE_SPINLOCK.
Convert kgdb_cpulock into a raw_spinlock_t.
    
SPIN_LOCK_UNLOCKED is deprecated and it's replacement DEFINE_SPINLOCK is
not suitable for arrays of spinlocks.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:35 +01:00
Ralf Baechle f8bb3af924 Make kgdb_wait static.
Nothing outside gdb-stub.c uses kgdb_wait, so change it's definition to
static.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:32:34 +01:00