Commit Graph

1197 Commits (2a9effc67804102d6d5182eb0116520588ae2256)

Author SHA1 Message Date
Yoichi Yuasa 2a9effc678 [MIPS] Cobalt: Split PCI codes from setup.c
It's removed #ifdef CONFIG_PCI/#endif from cobalt setup.c .

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-27 16:20:23 +01:00
Yoichi Yuasa cc50b67dcd [MIPS] Cobalt: clean up include files
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
2007-04-27 16:20:23 +01:00
Ralf Baechle 7f5a7716dc [MIPS] Fix AP/SP to work in the reality of modern kernels.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-27 16:20:23 +01:00
Ralf Baechle 6f4c5bdef2 [MIPS] Fix oprofile logic to physical counter remapping
This did cause oprofile to fail on non-multithreaded systems with more
than 2 processors such as the BCM1480.

Reported by Manish Lachwani (mlachwani@mvista.com).

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-24 22:10:18 +01:00
Atsushi Nemoto ba755f8ec8 [MIPS] Fix BUG(), BUG_ON() handling
With commit 63dc68a8cf, kernel can not
handle BUG() and BUG_ON() properly since get_user() returns false for
kernel code.  Use __get_user() to skip unnecessary access_ok().  This
patch also make BRK_BUG code encoded in the TNE instruction.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-20 14:58:37 +01:00
Atsushi Nemoto faea623464 [MIPS] Retry {save,restore}_fp_context if failed in atomic context.
The save_fp_context()/restore_fp_context() might sleep on accessing
user stack and therefore might lose FPU ownership in middle of them.

If these function failed due to "in_atomic" test in do_page_fault,
touch the sigcontext area in non-atomic context and retry these
save/restore operation.

This is a replacement of a (broken) fix which was titled "Allow CpU
exception in kernel partially".

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-20 14:58:37 +01:00
Atsushi Nemoto 5323180db7 [MIPS] Disallow CpU exception in kernel again.
The commit 4d40bff7110e9e1a97ff8c01bdd6350e9867cc10 ("Allow CpU
exception in kernel partially") was broken.  The commit was to fix
theoretical problem but broke usual case.  Revert it for now.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-20 14:58:37 +01:00
Mark Mason 9a9943575a [MIPS] Add missing silicon revisions for BCM112x
Recent versions of the BCM112X processors aren't recognized by Linux
(preventing Linux from booting on those processors).  This patch adds
support for those that are missing.

Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-20 14:58:37 +01:00
Ralf Baechle 8a1e97ee2e [MIPS] SMTC: Fix recursion in instant IPI replay code.
local_irq_restore -> raw_local_irq_restore -> irq_restore_epilog ->
	smtc_ipi_replay -> smtc_ipi_dq -> spin_unlock_irqrestore ->
	_spin_unlock_irqrestore -> local_irq_restore

The recursion does abort when there is no more IPI queued for a CPU, so
this isn't usually fatal which is why we got away with this for so long
until this was discovered by code inspection.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:36 +01:00
Mark Mason 6c9fde4bff [MIPS] BCM1480: Fix setting of irq affinity.
Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:36 +01:00
Ralf Baechle d6f703602f [MIPS] do_page_fault() needs to use raw_smp_processor_id().
Original patch posted by Deepak Saxena <dsaxena@plexity.net>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:36 +01:00
Ralf Baechle 20bb25d10f [MIPS] SMTC: Fix false trigger of debug code on single VPE.
Make smtc_setup_irq() update the list of interrupts which need to be
watched by the debug code itself.  Also there is no need to initialize the
IPI swint when running with a single VPE, so don't initialize it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:36 +01:00
Ralf Baechle ae036b7908 [MIPS] SMTC: irq_{enter,leave} and kstats keeping for relayed timer ints.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:35 +01:00
Chris Dearman fe99f1b184 [MIPS] lockdep: Deal with interrupt disable hazard in TRACE_IRQFLAGS
Between the mtc0 or di instruction that disables interrupts and the
following hazard barrier a processor may still take interrupts.  If an
interrupt is taken after interrupts are disabled but before the state
is updated it will appear to restore_all that it is incorrectly returning
with interrupts disabled.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:35 +01:00
Chris Dearman cbde5ebc97 [MIPS] lockdep: Handle interrupts in R3000 style c0_status register.
Check the IEP bit for R3000 style processors when checking to see if
interrupts will be reenabled in restore_all.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:35 +01:00
Ralf Baechle 619af723ac [MIPS] MT: MIPS_MT_SMTC_INSTANT_REPLAY currently conflicts with PREEMPT.
So until MIPS_MT_SMTC_INSTANT_REPLAY has been rewritten to solve this
issue, don't allow selecting it with PREEMPT.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:35 +01:00
Ralf Baechle af2944ac54 [MIPS] EV64120: Include <asm/irq.h> to fix warning.
arch/mips/pci/pci-ev64120.c:10: warning: implicit declaration of function 'allocate_irqno'

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:35 +01:00
Ralf Baechle 9486d594ba [MIPS] Ocelot: Fix warning.
Remove unused variable.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:35 +01:00
Ralf Baechle 448f283c11 [MIPS] Ocelot: Give PMON_v1_setup a proper prototype.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29 23:46:34 +01:00
Ralf Baechle 8fb303c7f1 [MIPS] SB1250: Fix bugs/warnings by creative use of volatile.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24 17:01:50 +00:00
Ralf Baechle 41a8198f61 [MIPS] SB1: Fix pile of gcc's bogus format string warnings.
CC      arch/mips/mm/cerr-sb1.o
arch/mips/mm/cerr-sb1.c: In function 'sb1_cache_error':
arch/mips/mm/cerr-sb1.c:235: warning: format '%010llx' expects type 'long long unsigned int', but argument 2 has type 'uint64_t'
arch/mips/mm/cerr-sb1.c: In function 'extract_ic':
arch/mips/mm/cerr-sb1.c:385: warning: format '%016llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t'
arch/mips/mm/cerr-sb1.c:385: warning: format '%016llX' expects type 'long long unsigned int', but argument 6 has type 'uint64_t'
arch/mips/mm/cerr-sb1.c: In function 'extract_dc':
arch/mips/mm/cerr-sb1.c:523: warning: format '%010llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t'
arch/mips/mm/cerr-sb1.c:523: warning: format '%016llX' expects type 'long long unsigned int', but argument 7 has type 'uint64_t'
arch/mips/mm/cerr-sb1.c:570: warning: format '%016llX' expects type 'long long unsigned int', but argument 3 has type 'uint64_t'
  LD      arch/mips/mm/built-in.o

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24 17:01:50 +00:00
Ralf Baechle bf9f88a219 [MIPS] Jazz: Fix warning.
arch/mips/jazz/jazzdma.c:70: warning: assignment makes integer from pointer without a cast

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24 17:01:50 +00:00
Ralf Baechle e007566d13 [MIPS] R3000: local_flush_data_cache_page take a pointer argument.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24 17:01:50 +00:00
Ralf Baechle 7575a49f20 [MIPS] Implement flush_anon_page().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24 17:01:49 +00:00
Atsushi Nemoto 80e89593e5 [MIPS] SPARSEMEM: The first pfn of zone should be min_low_pfn, not 0.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24 17:01:49 +00:00
Franck Bui-Huu c9d0696223 [MIPS] Always use virt_to_phys() when translating kernel addresses
This patch fixes two places where we used plain 'x - PAGE_OFFSET' to
achieve virtual to physical address convertions. This type of convertion
is no more allowed since commit 6f284a2ce7.

Reported-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>

[Build fixes for machines that don't use the generic dma-coherence.h]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24 17:01:49 +00:00
Ralf Baechle 7df4246117 [MIPS] Export except_vec_vi_{mori,lui,ori} as text symbols.
Otherwise objdump will screw up disassembly.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19 20:22:44 +00:00
Thiemo Seufer 43e3c885d0 [MIPS] mips-boards: More liberal check for mips-board console
Allows overriding the MALTA/ATLAS/etc. default console setting with
non-serial console devices.

Signed-Off-By: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19 20:22:43 +00:00
Thiemo Seufer 119537c092 [MIPS] Misc fixes for plat_irq_dispatch functions
o adds missing ST0_IM masks, which caused the logging of valid interrupts
   as spurious
 o stops pnx8550 to log every interrupt as spurious
 o adds cause register masks for ip22/ip32, which caused handling of masked
   interrupts
 o removes some superfluous parentheses in the SNI interrupt code

Signed-Off-By: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19 20:22:43 +00:00
Atsushi Nemoto 72ede9b189 [MIPS] Qemu: Fix Symmetric Uniprocessor support.
Might be useful for SMP debugging.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

[Rewritten Kconfig bits to deal better fit in the usual pattern of doing
things - Ralf]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19 20:22:43 +00:00
Ralf Baechle 8c3644350f [MIPS] VI: TRACE_IRQS_OFF clobbers $v0, so save & restore around call.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19 20:22:43 +00:00
Ralf Baechle f510aa3bdb [MIPS] Kconfig: Move missplaced NR_CPUS default from SMTC to VSMP.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:29 +00:00
Ralf Baechle 46230aa6ea [MIPS] RTLX: Handle copy_*_user return values.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:29 +00:00
Ralf Baechle bc4809e939 [MIPS] RTLX: Protect rtlx_{read,write} with mutex.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:28 +00:00
Ralf Baechle 61dcc6f4d9 [MIPS] RTLX: Harden against compiler reordering and optimization.
RTLX communication is based on lock-free shared memory buffers.  It
happened to be working by luck so far but relies on the optimizer doing
certain optimizations but no reordering.

Fixed by inserting proper barriers in rtlx_read and rtlx_write, and careful
pointer dereferencing.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:27 +00:00
Ralf Baechle 9e34682026 [MIPS] RTLX: Don't use volatile; it's fragile.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:27 +00:00
Ralf Baechle 080e948c07 [MIPS] Lasat: Downgrade 64-bit kernel from experimental to broken.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:27 +00:00
Ralf Baechle 65f8ebe063 [MIPS] Compat: Fix build if CONFIG_SYSVIPC is disabled.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:26 +00:00
Atsushi Nemoto 53dc80287d [MIPS] FPU ownership management & preemption fixes
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:26 +00:00
Atsushi Nemoto c6a2f46793 [MIPS] Check FCSR for pending interrupts, alternative version
Commit 6d6671066a is incomplete and misses
non-r4k CPUs.  This patch reverts the commit and fixes in other way.

 o Do FCSR checking in caller of restore_fp_context.
 o Send SIGFPE if the signal handler set any FPU exception bits.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:25 +00:00
Ralf Baechle 0e6ee854e7 [MIPS] kspd: ioctl needs a translation entry.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-13 16:59:31 +00:00
Ralf Baechle aea0e582d3 [MIPS] Viper2: Remove defective support.
A defconfig file and the 10 lines of code (including comments ...) that
are rotting since lmo commit 6516a42dc8b40c6c00010346dd51496125b16644
don't quite make proper support, so let's trash it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-13 16:59:31 +00:00
Chris Dearman 795a22583b [MIPS] Oprofile: Reset all performance registers for MIPS_MT_SMP configs
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-13 16:59:31 +00:00
Ralf Baechle bb9b813bb6 [MIPS] Sibyte: Fix ZBbus profiler
o Fix build error.
 o Handle error returns.
 o Deal with signals received while sleeping.
 o Don't allow to be selected when we're not building the directory with
   the driver anyway.
 o Coding style cleanups.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-09 20:27:31 +00:00
Ralf Baechle ca6f5494f5 [MIPS] Sibyte: Do not allow enabling LDT support if PCI is disabled.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-09 20:27:30 +00:00
Ralf Baechle 8960909ca7 [MIPS] DEC: Remove call to register_prom_console.
Register_prom_console was removed when mips was converted to early printk.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-09 12:14:52 +00:00
Davide Libenzi f6dfb4fd7d [PATCH] Add epoll compat_ code to fs/compat.c
IA64 and ARM-OABI are currently using their own version of epoll compat_
code.

An architecture needs epoll_event translation if alignof(u64) in 32 bit
mode is different from alignof(u64) in 64 bit mode.  If an architecture
needs epoll_event translation, it must define struct compat_epoll_event in
asm/compat.h and set CONFIG_HAVE_COMPAT_EPOLL_EVENT and use
compat_sys_epoll_ctl and compat_sys_epoll_wait.

All 64 bit architecture should use compat_sys_epoll_pwait.

[sfr: restructure and move to fs/compat.c, remove MIPS version
of compat_sys_epoll_pwait, use __put_user_unaligned]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-08 07:38:22 -08:00
Ralf Baechle b2e569d876 [MIPS] ARC: Fix several compiler warnings.
CC      arch/mips/arc/init.o
arch/mips/arc/init.c: In function 'prom_init':
arch/mips/arc/init.c:27: warning: ISO C90 forbids mixed declarations and code
arch/mips/arc/init.c:35: warning: format ‘%08lx’ expects type ‘long unsigned int’, but argument 2 has type 'ULONG'
arch/mips/arc/init.c:28: warning: unused variable 'c'
arch/mips/arc/init.c:27: warning: unused variable ‘cnt’

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-08 01:10:30 +00:00
Linus Torvalds 185d84b4e1 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] IP27: Build fix
  [MIPS] Wire up ioprio_set and ioprio_get.
  [MIPS] Fix __raw_read_trylock() to allow multiple readers
  [MIPS] Export __copy_user_inatomic.
  [MIPS] R2 bitops compile fix for gcc < 4.0.
  [MIPS] TX39: Remove redundant tx39_blast_icache() calls
  [MIPS] Cobalt: Fix early printk
  [MIPS] SMTC: De-obscure Malta hooks.
  [MIPS] SMTC: Add fordward declarations for mm_struct and task_struct.
  [MIPS] SMTC: <asm/mips_mt.h> must include <linux/cpumask.h>
  [MIPS] SMTC: <asm/smtc_ipi.h> must include <linux/spinlock.h>
  [MIPS] Atlas, Malta: Fix build warning.
2007-03-06 18:02:46 -08:00
Ralf Baechle 063ea774b0 [MIPS] IP27: Build fix
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07 00:07:18 +00:00