aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-03-29[MIPS] SMTC: Fix recursion in instant IPI replay code.Ralf Baechle2-35/+36
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[MIPS] MV64340: Add missing prototype for mv64340_irq_init().Ralf Baechle1-0/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] SB1250: Fix bugs/warnings by creative use of volatile.Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] ARC: Fix warning.Ralf Baechle1-1/+1
The missing cast did result a warning when calling an 32-bit ARC firmware function that takes 5 arguments where the 5th argument is a pointer from a 64-bit kernel. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] Implement flush_anon_page().Ralf Baechle1-0/+12
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] Fix pipeline hazard.Ralf Baechle1-0/+1
In the the sequence: ei .. mfc0 $x, $status the mfc0 may not see the SR_IE bit set. This was a deliberate bug in the kernel code because we knew this was a safe thing to do on all R2 silicon so far but new silicon is changing this. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] Make MIPS udelay() preempt safe under DEBUG_PREEMPTDeepak Saxena1-1/+1
Signed-off-by: Manish Lachwani <mlachwani@mvista.com> Signed-off-by: Deepak Saxena <dsaxena@mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] Always use virt_to_phys() when translating kernel addressesFranck Bui-Huu2-2/+2
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 6f284a2ce7b8bc49cb8455b1763357897a899abb. 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-17ide: remove static prototypes from include/asm-mips/mach-au1x00/au1xxx_ide.hDaniel Mack1-34/+0
This patch removes the static prototypes from the au1xxx_ide.h, some of them were not even implemented. Also, they caused build breakage since they differed from the functions actually implemented in drivers/ide/mips/au1xxx-ide.c. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-17[MIPS] Lockdep: Fix recursion bug.Ralf Baechle3-40/+40
trace_hardirqs_off -> atomic_inc -> local_irq_restore -> trace_hardirqs_off Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] RTLX: Handle copy_*_user return values.Ralf Baechle1-2/+2
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] FPU ownership management & preemption fixesAtsushi Nemoto4-11/+48
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] IP27, IP35: Fix warnings.Ralf Baechle2-4/+6
include/asm-mips/mach-ip27/dma-coherence.h:22: warning: 'plat_map_dma_mem' defined but not used include/asm-mips/mach-ip27/dma-coherence.h:41: warning: 'plat_unmap_dma_mem' defined but not used include/asm-mips/mach-ip32/dma-coherence.h:30: warning: 'plat_map_dma_mem' defined but not used include/asm-mips/mach-ip32/dma-coherence.h:63: warning: 'plat_unmap_dma_mem' defined but not used These functions are meant to be inlined anyway. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-09[MIPS] Sibyte: Fix ZBbus profilerRalf Baechle1-110/+0
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-08[MIPS] ISA: Fix typoRalf Baechle1-1/+1
Lost CONFIG_ prefix discovered by Robert P. J. Day <rpjday@mindspring.com>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07[MIPS] Wire up ioprio_set and ioprio_get.Ralf Baechle1-6/+12
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07[MIPS] Fix __raw_read_trylock() to allow multiple readersDave Johnson1-2/+2
A deadlock can occur for mixed irq and non-irq rwlock readers if a 2nd reader attempts to take lock by looping around __raw_read_trylock(). Signed-off-by: Dave Johnson <djohnson+linux-mips@sw.starentnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07[MIPS] Export __copy_user_inatomic.Ralf Baechle1-0/+2
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07[MIPS] R2 bitops compile fix for gcc < 4.0.Ralf Baechle1-23/+33
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07[MIPS] SMTC: Add fordward declarations for mm_struct and task_struct.Ralf Baechle1-0/+3
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07[MIPS] SMTC: <asm/mips_mt.h> must include <linux/cpumask.h>Ralf Baechle1-0/+2
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07[MIPS] SMTC: <asm/smtc_ipi.h> must include <linux/spinlock.h>Ralf Baechle1-0/+2
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-05[PATCH] sched: remove SMT niceCon Kolivas1-1/+0
Remove the SMT-nice feature which idles sibling cpus on SMT cpus to facilitiate nice working properly where cpu power is shared. The idling of cpus in the presence of runnable tasks is considered too fragile, easy to break with outside code, and the complexity of managing this system if an architecture comes along with many logical cores sharing cpu power will be unworkable. Remove the associated per_cpu_gain variable in sched_domains used only by this code. Also: The reason is that with dynticks enabled, this code breaks without yet further tweaks so dynticks brought on the rapid demise of this code. So either we tweak this code or kill it off entirely. It was Ingo's preference to kill it off. Either way this needs to happen for 2.6.21 since dynticks has gone in. Signed-off-by: Con Kolivas <kernel@kolivas.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-04[MIPS] DMA: Fix a bunch of warnings due to missing inline keywords.Ralf Baechle1-4/+6
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] RM: It should be #ifdef CONFIG_FOO not #if CONFIG_FOO ...Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] Fix and cleanup the mess that a dozen prom_printf variants are.Ralf Baechle4-9/+0
early_printk is a so much saner thing. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] Convert to RTC-class ds1742 driverAtsushi Nemoto4-35/+18
The generic rtc-ds1742 driver can be used for RBTX4927 and JMR3927 (with __swizzle_addr trick). This patch also removes MIPS local DS1742 stuff. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] SNI: Fix mc146818_decode_yearThomas Bogendoerfer4-6/+10
Big endian RMs uses a different mc146818_decode_year than little endian RMs Correct mc146818_decode_year for years before 2000 Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26[MIPS] Remove unreferenced _IOC_SLMASK macro in ioctl.h.Robert P. J. Day1-5/+0
Delete the definition of the apparently unreferenced macro _IOC_SLMASK. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26[MIPS] SNI: MIPS_CPU_IRQ_BASE cleanupThomas Bogendoerfer1-5/+4
Use MIPS_CPU_IRQ_BASE instead of own define. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-22[MIPS] Add basic SMARTMIPS ASE supportFranck Bui-Huu3-8/+30
This patch adds trivial support for SMARTMIPS extension. This extension is currently implemented by 4KS[CD] CPUs. Basically it saves/restores ACX register, which is part of the SMARTMIPS ASE, when needed. This patch does *not* add any support for Smartmips MMU features. Futhermore this patch does not add explicit support for 4KS[CD] CPUs since they are respectively mips32 and mips32r2 compliant. So with the current processor configuration, a platform that has such CPUs needs to select both configs: CPU_HAS_SMARTMIPS SYS_HAS_CPU_MIPS32_R[12] This is due to the processor configuration which is mixing up all the architecture variants and the processor types. The drawback of this, is that we currently pass '-march=mips32' option to gcc when building a kernel instead of '-march=4ksc' for 4KSC case. This can lead to a kernel image a little bit bigger than required. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-20[MIPS] Fixup copy_from_user_inatomicRalf Baechle1-2/+49
From the 01408c4939479ec46c15aa7ef6e2406be50eeeca log message: The problem is that when we write to a file, the copy from userspace to pagecache is first done with preemption disabled, so if the source address is not immediately available the copy fails *and* *zeros* *the* *destination*. This is a problem because a concurrent read (which admittedly is an odd thing to do) might see zeros rather that was there before the write, or what was there after, or some mixture of the two (any of these being a reasonable thing to see). If the copy did fail, it will immediately be retried with preemption re-enabled so any transient problem with accessing the source won't cause an error. The first copying does not need to zero any uncopied bytes, and doing so causes the problem. It uses copy_from_user_atomic rather than copy_from_user so the simple expedient is to change copy_from_user_atomic to *not* zero out bytes on failure. < --- end cite --- > This patch finally implements at least a not so pretty solution by duplicating the relevant part of __copy_user. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-20[MIPS] Fix struct sigcontext for N32 userlandAtsushi Nemoto1-17/+16
The kernel use 64-bit for sc_regs[0], and both N32/N64 userland expects it was 64-bit. But size of 'long' on N32 is actually 32-bit. So this definition make some confusion. Use __u32 and __u64 for N32/N64 sigcontext to get rid of this confusion. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] Support for several more SNI RM models.Thomas Bogendoerfer3-13/+155
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] Add external declaration of pagetable_init() to pgalloc.hAtsushi Nemoto1-0/+2
This fixes some sparse warnings. pgtable-32.c:15:6: warning: symbol 'pgd_init' was not declared. Should it be static? pgtable-32.c:32:13: warning: symbol 'pagetable_init' was not declared. Should it be static? Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] Use MIPS R2 instructions for bitops.Ralf Baechle1-1/+51
Add R2 optimized variants of clear_bit, set_bit and test_and_clear_bit. With gcc 4.1.1 this saves 1592 bytes on a defconfig (minus IPv6) kernel. Turns out that R2 bitop instructions are no gain for the other bitop functions. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] signals: Share even more code.Ralf Baechle3-18/+4
native and compat do_signal and handle_signal are identical and can easily be unified. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] Iomap implementation.Ralf Baechle2-28/+2
This implementation has support for the concept of one separate ioport address space by PCI domain. A pointer to the virtual address where the port space of a domain has been mapped has been added to struct pci_controller and systems should be fixed to fill in this value. For single domain systems this will be the same value as passed to set_io_port_base(). Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] <asm/compat-signal.h> needs to include <asm/uaccess.h>.Ralf Baechle1-0/+2
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.Atsushi Nemoto1-3/+0
access_ok in compat-signal.h is wrong (checking destination instead of source) and redundant (already checked before calling this function). Also sf_mask in struct sigframe32 should be compat_sigset_t type. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.Ralf Baechle1-0/+55
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] Remove stray instruction from __get_user_asm_ll32.Ralf Baechle1-1/+0
This did result in double clearing of the error return value on success only but should make a meassurable overhead for sigreturn. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] 32-bit: Fix warning about cast for fetching pointer from userspace.Ralf Baechle1-3/+7
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13Revert "[MIPS] Fix warning in get_user when fetching pointer object from userspace."Ralf Baechle1-1/+4
This reverts commit 4ed3a77f38c023658784804cb39a7ce18063dc88.
2007-02-13[MIPS] Don't claim we support dma_declare_coherent_memory - we don't.Ralf Baechle1-0/+2
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] Unify dma-{coherent,noncoherent.ip27,ip32}Ralf Baechle5-0/+204
Platforms will now have to supply a function dma_device_is_coherent which returns if a particular device participates in the coherence domain. For most platforms this function will always return 0 or 1. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] Improve branch prediction in ll/sc atomic operations.Ralf Baechle4-32/+127
Now that finally all supported versions of binutils have functioning support for .subsection use .subsection to tweak the branch prediction I did not modify the R10000 errata variants because it seems unclear if this will invalidate the workaround which actually relies on the cheesy prediction of branch likely to cause a misspredict if the sc was successful. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-11Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds3-6/+6
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] signal: do not inline handle_signal() [MIPS] signal: do not use save_static_function() anymore [MIPS] signal32: no need to save c0_status register in setup_sigcontext32() [MIPS] signal32: reduce {setup,restore}_sigcontext32 sizes [MIPS] signal: factorize debug code [MIPS] signal: test return value of install_sigtramp() [MIPS] signal32: remove duplicate code [MIPS] signal: clean up sigframe structure [MIPS] signal: do not inline functions in signal-common.h [MIPS] signals: reduce {setup,restore}_sigcontext sizes [MIPS] Fix warning in get_user when fetching pointer object from userspace. [MIPS] Fix eth2 platform device id for jaguar_atx and ocelot_3 platforms [MIPS] JMR3927 and RBTX49x7 support little endian [MIPS] RBTX49x7: declare prom_getcmdline() [MIPS] RTLX: Sprinkle device model code into code to make udev happier. [MIPS] VPE: Sprinkle device model code into code to make udev happier.
2007-02-11[PATCH] consolidate line discipline number definitionsTilman Schmidt1-18/+0
The line discipline numbers N_* are currently defined for each architecture individually, but (except for a seeming mistake) identically, in asm/termios.h. There is no obvious reason why these numbers should be architecture specific, nor any apparent relationship with the termios structure. The total number of these, NR_LDISCS, is defined in linux/tty.h anyway. So I propose the following patch which moves the definitions of the individual line disciplines to linux/tty.h too. Three of these numbers (N_MASC, N_PROFIBUS_FDL, and N_SMSBLOCK) are unused in the current kernel, but the patch still keeps the complete set in case there are plans to use them yet. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Remove final references to deprecated "MAP_ANON" page protection flagRobert P. J. Day1-1/+0
Remove the last vestiges of the long-deprecated "MAP_ANON" page protection flag: use "MAP_ANONYMOUS" instead. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>