9 years agovirtio: set pci bus master enable bit
Michael S. Tsirkin [Sun, 29 Nov 2009 15:52:00 +0000]
virtio: set pci bus master enable bit

As all virtio devices perform DMA, we
must enable bus mastering for them to be
spec compliant.

This patch fixes hotplug of virtio devices
with Linux guests and qemu 0.11-0.12.

Tested-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

9 years agovirtio: fix out of range array access
Michael S. Tsirkin [Thu, 25 Feb 2010 17:08:55 +0000]
virtio: fix out of range array access

I have observed the following error on virtio-net module unload:

------------[ cut here ]------------
WARNING: at kernel/irq/manage.c:858 __free_irq+0xa0/0x14c()
Hardware name: Bochs
Trying to free already-free IRQ 0
Modules linked in: virtio_net(-) virtio_blk virtio_pci virtio_ring
virtio af_packet e1000 shpchp aacraid uhci_hcd ohci_hcd ehci_hcd [last
unloaded: scsi_wait_scan]
Pid: 1957, comm: rmmod Not tainted 2.6.33-rc8-vhost #24
Call Trace:
 [<ffffffff8103e195>] warn_slowpath_common+0x7c/0x94
 [<ffffffff8103e204>] warn_slowpath_fmt+0x41/0x43
 [<ffffffff810a7a36>] ? __free_pages+0x5a/0x70
 [<ffffffff8107cc00>] __free_irq+0xa0/0x14c
 [<ffffffff8107cceb>] free_irq+0x3f/0x65
 [<ffffffffa0081424>] vp_del_vqs+0x81/0xb1 [virtio_pci]
 [<ffffffffa0091d29>] virtnet_remove+0xda/0x10b [virtio_net]
 [<ffffffffa0075200>] virtio_dev_remove+0x22/0x4a [virtio]
 [<ffffffff812709ee>] __device_release_driver+0x66/0xac
 [<ffffffff81270ab7>] driver_detach+0x83/0xa9
 [<ffffffff8126fc66>] bus_remove_driver+0x91/0xb4
 [<ffffffff81270fcf>] driver_unregister+0x6c/0x74
 [<ffffffffa0075418>] unregister_virtio_driver+0xe/0x10 [virtio]
 [<ffffffffa0091c4d>] fini+0x15/0x17 [virtio_net]
 [<ffffffff8106997b>] sys_delete_module+0x1c3/0x230
 [<ffffffff81007465>] ? old_ich_force_enable_hpet+0x117/0x164
 [<ffffffff813bb720>] ? do_page_fault+0x29c/0x2cc
 [<ffffffff81028e58>] sysenter_dispatch+0x7/0x27
---[ end trace 15e88e4c576cc62b ]---

The bug is in virtio-pci: we use msix_vector as array index to get irq
entry, but some vqs do not have a dedicated vector so this causes an out
of bounds access.  By chance, we seem to often get 0 value, which
results in this error.

Fix by verifying that vector is legal before using it as index.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Shirley Ma <xma@us.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Sun, 28 Feb 2010 00:22:47 +0000]
Merge branch 'for-linus' of git://git./linux/kernel/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (24 commits)
  m68k: Define sigcontext ABI of ColdFire
  m68knommu: NPTL support for uClinux
  m68k: Add NPTL support
  m68k: Eliminate unused variable in page_to_phys()
  m68k: Switch to generic siginfo layout
  macfb: fix 24-bit visual and stuff
  macfb: cleanup
  fbdev: add some missing mac modes
  mac68k: start CUDA early
  valkyriefb: various fixes
  fbdev: mac_var_to_mode() fix
  mac68k: move macsonic and macmace platform devices
  mac68k: move mac_esp platform device
  mac68k: replace mac68k SCC code with platform device
  pmac-zilog: add platform driver
  pmac-zilog: cleanup
  mac68k: rework SWIM platform device
  mac68k: cleanup
  ataflop: Killl warning about unused variable flags
  m68k: Use DIV_ROUND_CLOSEST
  ...

9 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sun, 28 Feb 2010 00:20:17 +0000]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (35 commits)
  [S390] time: remove unused code
  [S390] zcore: Add prefix registers to dump header
  [S390] correct vdso version string
  [S390] add support for compressed kernels
  [S390] Define new s390 ELF note sections in elf.h
  [S390] codepage conversion of kernel parameter line
  [S390] seq_file: convert drivers/s390/
  [S390] add z9-ec/z10 instruction to kernel disassembler
  [S390] dasd: correct offline processing
  [S390] dasd: fix refcounting.
  [S390] dasd: fix online/offline race
  [S390] use kprobes_built_in() in mm/fault code
  [S390] bug: use relative pointers in bug table entries
  [S390] Cleanup struct _lowcore usage and defines.
  [S390] free_initmem: reduce code duplication
  [S390] Replace ENOTSUPP usage with EOPNOTSUPP
  [S390] spinlock: check virtual cpu running status
  [S390] sysinfo: fix SYSIB 3,2,2 structure
  [S390] add MACHINE_IS_LPAR flag
  [S390] qdio: optimize cache line usage of struct qdio_irq
  ...

9 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Sun, 28 Feb 2010 00:19:22 +0000]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (141 commits)
  MIPS: Alchemy: defconfig updates
  MIPS: Alchemy: Fix Au1100 ethernet build failure
  MIPS: Alchemy: Repair db1500/bosporus builds
  MIPS: ARC: Cleanup unused definitions from sgialib.h
  MIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses
  MIPS: Alchemy: use 36bit addresses for PCMCIA resources.
  MIPS: Cobalt: Fix theoretical port aliasing issue
  MIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1)
  MIPS: Crazy spinlock speed test.
  MIPS: Optimize spinlocks.
  MIPS: Alchemy: devboard PM needs to save CPLD registers.
  MIPS: PowerTV: Eliminate duplicate opcode definition macros
  MIPS: Lemote 2F: Move printks out of port_access_lock.
  MIPS: PNX833x: Convert IRQ controller locks to raw spinlocks.
  MIPS: Octeon: Replace spinlock with raw_spinlocks in dma-octeon.c.
  MIPS: Octeon: Replace rwlocks in irq_chip handlers with raw_spinlocks.
  MIPS: Octeon: Convert octeon_irq_msi_lock to raw spinlock.
  MIPS: Loongson: Remove pointless sample_lock from oprofile code.
  MIPS: SNI: Convert sni_rm200_i8259A_lock to raw spinlock.
  MIPS: i8259: Convert IRQ controller lock to raw spinlock.
  ...

9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
Linus Torvalds [Sun, 28 Feb 2010 00:18:30 +0000]
Merge git://git./linux/kernel/git/brodo/pcmcia-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (49 commits)
  pcmcia: validate late-added resources
  pcmcia: allow for extension of resource interval
  pcmcia: remove useless msleep in ds.c
  pcmcia: use read_cis_mem return value
  pcmcia: handle error in serial_cs config calls
  pcmcia: add locking to pcmcia_{read,write}_cis_mem
  pcmcia: avoid prod_id memleak
  pcmcia: avoid sysfs-related lockup for cardbus
  pcmcia: use state machine for extended requery
  pcmcia: delay re-scanning and re-querying of PCMCIA bus
  pcmcia: use pccardd to handle eject, insert, suspend and resume requests
  pcmcia: use ops_mutex for rsrc_{mgr,nonstatic} locking
  pcmcia: use mutex for dynid lock
  pcmcia: assert locking to struct pcmcia_device
  pcmcia: add locking documentation
  pcmcia: simplify locking
  pcmcia: add locking to struct pcmcia_socket->pcmcia_state()
  pcmcia: protect s->device_count
  pcmcia: properly lock skt->irq, skt->irq_mask
  pcmcia: lock ops->set_socket
  ...

9 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Sat, 27 Feb 2010 21:26:18 +0000]
Merge branch 'next' of git://git./linux/kernel/git/benh/powerpc

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (88 commits)
  powerpc: Fix lwsync feature fixup vs. modules on 64-bit
  powerpc: Convert pmc_owner_lock to raw_spinlock
  powerpc: Convert die.lock to raw_spinlock
  powerpc: Convert tlbivax_lock to raw_spinlock
  powerpc: Convert mpic locks to raw_spinlock
  powerpc: Convert pmac_pic_lock to raw_spinlock
  powerpc: Convert big_irq_lock to raw_spinlock
  powerpc: Convert feature_lock to raw_spinlock
  powerpc: Convert i8259_lock to raw_spinlock
  powerpc: Convert beat_htab_lock to raw_spinlock
  powerpc: Convert confirm_error_lock to raw_spinlock
  powerpc: Convert ipic_lock to raw_spinlock
  powerpc: Convert native_tlbie_lock to raw_spinlock
  powerpc: Convert beatic_irq_mask_lock to raw_spinlock
  powerpc: Convert nv_lock to raw_spinlock
  powerpc: Convert context_lock to raw_spinlock
  powerpc/85xx: Add NOR, LEDs and PIB support for MPC8568E-MDS boards
  powerpc/86xx: Enable VME driver on the GE SBC610
  powerpc/86xx: Enable VME driver on the GE PPC9A
  powerpc/86xx: Add MSI section to GE PPC9A DTS
  ...

9 years agom68k: Define sigcontext ABI of ColdFire
Maxim Kuvyrkov [Tue, 22 Sep 2009 21:22:43 +0000]
m68k: Define sigcontext ABI of ColdFire

The following patch defines sigcontext ABI of ColdFire.  Due to ISA
restrictions ColdFire needs different rt_sigreturn trampoline.

And due to ColdFire FP registers being 8-bytes instead of 12-bytes on
m68k, sigcontext and fpregset structures should be updated.

Regarding the sc_fpstate[16+6*8] field, it would've been enough 16
bytes to store ColdFire's FP state.  To accomodate GLIBC's libSegFault
it would'be been enough 6*8 bytes (room for the 6 non-call-clobbered
FP registers).  I set it to 16+6*8 to provide some extra space for any
future changes in the ColdFire FPU.

Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agom68knommu: NPTL support for uClinux
Maxim Kuvyrkov [Sun, 6 Dec 2009 18:08:14 +0000]
m68knommu: NPTL support for uClinux

Port syscalls for NPTL support to m68knommu.

Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agom68k: Add NPTL support
Maxim Kuvyrkov [Mon, 7 Dec 2009 08:24:27 +0000]
m68k: Add NPTL support

This patch adds several syscalls, that provide necessary
functionality to support NPTL on m68k/ColdFire.
The syscalls are get_thread_area, set_thread_area, atomic_cmpxchg_32 and
atomic_barrier.
The cmpxchg syscall is required for ColdFire as it doesn't support 'cas'
instruction.

Also a ptrace call PTRACE_GET_THREAD_AREA is added to allow debugger to
inspect the TLS storage.

Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agom68k: Eliminate unused variable in page_to_phys()
Geert Uytterhoeven [Tue, 12 Jan 2010 07:32:18 +0000]
m68k: Eliminate unused variable in page_to_phys()

"pgdat" is unused, so we can eliminate it and turn page_to_phys()
into a single-line macro.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agom68k: Switch to generic siginfo layout
Maxim Kuvyrkov [Wed, 23 Dec 2009 19:28:42 +0000]
m68k: Switch to generic siginfo layout

This patch switches m68k to generic siginfo layout.  The custom layout
of m68k's `struct siginfo' had several issues due to not considering
aliasing of members in the union, e.g., _uid32 was at different offsets
in ._kill, ._rt and ._sigchld.

Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agomacfb: fix 24-bit visual and stuff
Finn Thain [Tue, 3 Nov 2009 13:51:18 +0000]
macfb: fix 24-bit visual and stuff

Lots of changes. Remove volatile keywords. Take the advice in the comments
and change video_slot to slot_addr. Factor out fifteen or so "channel >>
8" shifts into three shifts higher up the call graph. Make
csc_setpalette() atomic, pass the correct color values. Check for
ioremap() failure. Add missing break statement, thus fixing 24 bit console
visual (blue background bug). Remove some uninformative printk() noise.
Add a description for powerbook 140/170 graphics.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agomacfb: cleanup
Finn Thain [Tue, 3 Nov 2009 13:47:28 +0000]
macfb: cleanup

Cleanup whitespace and code style. Remove unused #includes and prototypes.
Remove obsolete, redundant or misleading comments. Remove dead code and
redundant initialisers.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agofbdev: add some missing mac modes
Finn Thain [Tue, 3 Nov 2009 13:47:02 +0000]
fbdev: add some missing mac modes

Add the missing mac video modes for the Portrait and 12" RGB displays. The
specs come from the Mac LC III developer note.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agomac68k: start CUDA early
Finn Thain [Tue, 17 Nov 2009 09:03:05 +0000]
mac68k: start CUDA early

The valkyriefb driver needs the CUDA to work in order to set the video
mode at boot. So initialise the device earlier, and bring the m68k code
closer to the powermac code.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agovalkyriefb: various fixes
Finn Thain [Tue, 3 Nov 2009 13:43:52 +0000]
valkyriefb: various fixes

Valkyriefb and macfb will adopt the same card if they get the chance, so
remove valkyrie support from macfb. Also fix the "valkyriefb: can't do
832x624x8" problem reported by Raylynn Knight some time ago, by adding
vmode 13 support for CONFIG_MAC. Also add vmode 11 since that works too.
Make use of the monitor sense lines on 68k Macs too. Also some cleanups.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agofbdev: mac_var_to_mode() fix
Finn Thain [Tue, 3 Nov 2009 13:43:16 +0000]
fbdev: mac_var_to_mode() fix

The valkyriefb driver assumes that this logic holds:

mac_vmode_to_var(X, cmode, &var);
mac_var_to_vmode(&var, &vmode, &cmode);
assert(vmode == X);

But it doesn't hold because mac_var_to_vmode() can return a mode with a
slower pixel clock, even when a match is available. So we end up with this
failure:

using video mode 11 and color mode 0.
valkyriefb: vmode 12 not valid.
valkyriefb: can't set default video mode
valkyriefb: vmode 12 not valid.

Rather than have mac_var_to_mode() return the first reasonable mode it
finds, have it return the mode that is closest to the requested one (or
the mode with the closest longer pixel clock period if there is no exact
match).

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agomac68k: move macsonic and macmace platform devices
Finn Thain [Tue, 3 Nov 2009 13:42:02 +0000]
mac68k: move macsonic and macmace platform devices

Move platform device code from the drivers to the platform init function.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agomac68k: move mac_esp platform device
Finn Thain [Tue, 3 Nov 2009 13:41:35 +0000]
mac68k: move mac_esp platform device

Move platform device code from the driver to the platform init function.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agomac68k: replace mac68k SCC code with platform device
Finn Thain [Tue, 17 Nov 2009 09:06:48 +0000]
mac68k: replace mac68k SCC code with platform device

Remove the old 68k Mac serial port code and a lot of related cruft. Add
new SCC platform devices to mac 68k platform.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agopmac-zilog: add platform driver
Finn Thain [Tue, 17 Nov 2009 09:04:44 +0000]
pmac-zilog: add platform driver

Add platform driver support to the pmac-zilog driver, for m68k macs.
Place the powermac-specific code inside #ifdef CONFIG_PPC_PMAC.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agopmac-zilog: cleanup
Finn Thain [Tue, 3 Nov 2009 13:40:23 +0000]
pmac-zilog: cleanup

Whitespace cleanups and comment typo fix.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agomac68k: rework SWIM platform device
Finn Thain [Tue, 3 Nov 2009 13:39:56 +0000]
mac68k: rework SWIM platform device

Adjust the platform device code to conform with the code style used in the
rest of this patch series. No need to name resources nor to register
devices which are not applicable.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agomac68k: cleanup
Finn Thain [Tue, 3 Nov 2009 13:39:09 +0000]
mac68k: cleanup

Cleanup whitespace and comments. Remove some dead code.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agoataflop: Killl warning about unused variable flags
Geert Uytterhoeven [Fri, 11 Dec 2009 16:12:09 +0000]
ataflop: Killl warning about unused variable flags

After commit e0c0978699a83f26f2341f7eedc1463b79e31aff ("ataflop: remove
buggy/commented-out IRQ disable from do_fd_request()") the `flags' variable
became unused:

drivers/block/ataflop.c:1473: warning: unused variable 'flags'

Hence remove it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agom68k: Use DIV_ROUND_CLOSEST
Julia Lawall [Sun, 2 Aug 2009 08:47:47 +0000]
m68k: Use DIV_ROUND_CLOSEST

The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

@depends on haskernel@
expression x,__divisor;
@@

- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agom68k: vme_scc - __init annotations
Peter Huewe [Thu, 20 Aug 2009 20:42:31 +0000]
m68k: vme_scc - __init annotations

Trivial patch which adds the __init macro to the module_init
function and all of its helper functions of drivers/char/vme_scc.c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agom68k{,nommu}/h8300: Remove obsolete comment about map_chunk
Philippe De Muyter [Thu, 22 Oct 2009 14:07:17 +0000]
m68k{,nommu}/h8300: Remove obsolete comment about map_chunk

Remove the comments referring to a function map_chunk that no longer exists.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agom68k: Allow ioremapping top of memory
Philippe De Muyter [Sun, 6 Dec 2009 19:28:41 +0000]
m68k: Allow ioremapping top of memory

The test in __ioremap to reject memory ranges crossing the 0 boundary
rejects also memory ranges ending at the end of the memory.  Fix that.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agom68k: Fix asm/swab.h for ColdFire
Maxim Kuvyrkov [Fri, 2 Oct 2009 08:32:18 +0000]
m68k: Fix asm/swab.h for ColdFire

Make asm/swab.h compatible with ColdFire ISA_B CPUs.

Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

9 years agoMIPS: Alchemy: defconfig updates
Manuel Lauss [Fri, 26 Feb 2010 16:32:45 +0000]
MIPS: Alchemy: defconfig updates

Updated, leaner defconfig for the alchemy development boards.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1005/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Alchemy: Fix Au1100 ethernet build failure
Manuel Lauss [Fri, 26 Feb 2010 16:22:02 +0000]
MIPS: Alchemy: Fix Au1100 ethernet build failure

Don't define platform info for second mac on au1100 (which only has a
single mac).

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1004/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Alchemy: Repair db1500/bosporus builds
Manuel Lauss [Fri, 26 Feb 2010 16:22:01 +0000]
MIPS: Alchemy: Repair db1500/bosporus builds

A few hunks somehow ended up outside their #ifdef/endif blocks,
leading to -Werror-induces build failures.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1003/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: ARC: Cleanup unused definitions from sgialib.h
Yoichi Yuasa [Sat, 20 Feb 2010 12:20:34 +0000]
MIPS: ARC: Cleanup unused definitions from sgialib.h

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/979/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses
Bjorn Helgaas [Wed, 24 Feb 2010 20:53:27 +0000]
MIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses

The GT-64111 PCI host bridge has no address translation mechanism, so
it can't generate legacy port accesses.  This quirk fixes legacy device
port resources to contain the bus addresses actually generated by the
GT-64111.

I think this is the approach Ben Herrenschmidt suggested long ago:
    http://marc.info/?l=linux-kernel&m=119733290624544&w=2

This allows us to remove the IORESOURCE_PCI_FIXED hack from
pcibios_fixup_device_resources(), which converts bus addresses to CPU
addresses.  IORESOURCE_PCI_FIXED denotes resources that can't be moved;
it has nothing to do with converting bus to CPU addresses.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-mips@linux-mips.org
Tested-by: Yoichi Yuasa <yuasa@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/998/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Alchemy: use 36bit addresses for PCMCIA resources.
Manuel Lauss [Wed, 24 Feb 2010 16:40:21 +0000]
MIPS: Alchemy: use 36bit addresses for PCMCIA resources.

On Alchemy the PCMCIA area lies at the end of the chips 36bit system bus
area.  Currently, addresses at the far end of the 32bit area are assumed
to belong to the PCMCIA area and fixed up to the real 36bit address before
being passed to ioremap().

A previous commit enabled 64 bit physical size for the resource datatype on
Alchemy and this allows to use the correct 36bit addresses when registering
the PCMCIA sockets.

This patch removes the 32-to-36bit address fixup and registers the Alchemy
demo board pcmcia socket with the correct 36bit physical addresses.

Tested on DB1200, with a CF card (ide-cs driver) and a 3c589 PCMCIA ethernet
card.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Manuel Lauss <manuel.lauss@gmail.com>
Patchwork: http://patchwork.linux-mips.org/patch/994/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Cobalt: Fix theoretical port aliasing issue
Ralf Baechle [Wed, 24 Feb 2010 16:41:00 +0000]
MIPS: Cobalt: Fix theoretical port aliasing issue

Because the VIA SuperIO chip only decodes 24 bits of address space but port
address space currently being configured as 32MB there is the theoretical
possibility of aliases within the I/O port address range.

The complicated solution is to reserve all address range that potencially
could cause such aliases.  But with the PCI spec limiting port allocations
for devices to a maximum of 256 bytes 16MB of port address space already is
way more than one would ever expect to be used so we just reduce the port
space to 16MB.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
To: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: linux-mips@linux-mips.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Patchwork: http://patchwork.linux-mips.org/patch/995/

9 years agoMIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1)
Matt Turner [Thu, 25 Feb 2010 04:30:14 +0000]
MIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1)

ALIGN(x, bytes) expands to __ALIGN_MASK(x, bytes - 1), so use the one
that is most clear.

Signed-off-by: Matt Turner <mattst88@gmail.com>
To: linux-mips@linux-mips.org
Cc: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/999/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Crazy spinlock speed test.
David Daney [Tue, 16 Feb 2010 23:26:35 +0000]
MIPS: Crazy spinlock speed test.

This is just a test program for raw_spinlocks.  The main reason I
wrote it is to validate my spinlock changes that I sent in a previous
patch.

To use it enable CONFIG_DEBUG_FS and CONFIG_SPINLOCK_TEST then at run
time do:

# mount -t debugfs none /sys/kernel/debug/
# cat /sys/kernel/debug/mips/spin_single
# cat /sys/kernel/debug/mips/spin_multi

On my 600MHz octeon cn5860 (16 CPUs) I get

spin_single spin_multi
base 106885 247941
spinlock_patch 75194 219465

This shows that for uncontended locks the spinlock patch gives 41%
improvement and for contended locks 12% improvement (1/time).

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/969/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Optimize spinlocks.
David Daney [Thu, 4 Feb 2010 19:31:49 +0000]
MIPS: Optimize spinlocks.

The current locking mechanism uses a ll/sc sequence to release a
spinlock.  This is slower than a wmb() followed by a store to unlock.

The branching forward to .subsection 2 on sc failure slows down the
contended case.  So we get rid of that part too.

Since we are now working on naturally aligned u16 values, we can get
rid of a masking operation as the LHU already does the right thing.
The ANDI are reversed for better scheduling on multi-issue CPUs

On a 12 CPU 750MHz Octeon cn5750 this patch improves ipv4 UDP packet
forwarding rates from 3.58*10^6 PPS to 3.99*10^6 PPS, or about 11%.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/937/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Alchemy: devboard PM needs to save CPLD registers.
Manuel Lauss [Tue, 23 Feb 2010 17:57:43 +0000]
MIPS: Alchemy: devboard PM needs to save CPLD registers.

Save/restore CPLD registers when doing suspend-to-ram; this fixes issues
with harddisk and ethernet not working correctly when resuming on DB1200.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/986/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: PowerTV: Eliminate duplicate opcode definition macros
David VomLehn [Tue, 23 Feb 2010 00:31:13 +0000]
MIPS: PowerTV: Eliminate duplicate opcode definition macros

Change to different macros for assembler macros since the old names in
powertv_setup.c were co-opted for use in asm/asm.h. This broken the
build for the powertv platform. This patch introduces new macros based on
the new macros in asm.h to take the place of the old macro values.

Signed-off-by: David VomLehn <dvomlehn@cisco.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/985/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Lemote 2F: Move printks out of port_access_lock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:41 +0000]
MIPS: Lemote 2F: Move printks out of port_access_lock.

No point in protecting them and printks are sloow.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: PNX833x: Convert IRQ controller locks to raw spinlocks.
Ralf Baechle [Sat, 27 Feb 2010 11:53:41 +0000]
MIPS: PNX833x: Convert IRQ controller locks to raw spinlocks.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Octeon: Replace spinlock with raw_spinlocks in dma-octeon.c.
David Daney [Thu, 18 Feb 2010 19:48:20 +0000]
MIPS: Octeon: Replace spinlock with raw_spinlocks in dma-octeon.c.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/973/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Octeon: Replace rwlocks in irq_chip handlers with raw_spinlocks.
David Daney [Thu, 18 Feb 2010 19:47:40 +0000]
MIPS: Octeon: Replace rwlocks in irq_chip handlers with raw_spinlocks.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/972/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Octeon: Convert octeon_irq_msi_lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:40 +0000]
MIPS: Octeon: Convert octeon_irq_msi_lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Loongson: Remove pointless sample_lock from oprofile code.
Ralf Baechle [Sat, 27 Feb 2010 11:53:39 +0000]
MIPS: Loongson: Remove pointless sample_lock from oprofile code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: SNI: Convert sni_rm200_i8259A_lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:39 +0000]
MIPS: SNI: Convert sni_rm200_i8259A_lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: i8259: Convert IRQ controller lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:38 +0000]
MIPS: i8259: Convert IRQ controller lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: IP27: Convert nmi_lock lock to arch spinlock;
Ralf Baechle [Sat, 27 Feb 2010 11:53:38 +0000]
MIPS: IP27: Convert nmi_lock lock to arch spinlock;

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: IP27: Remove code obfuscation by enter_panic_mode().
Ralf Baechle [Sat, 27 Feb 2010 11:53:38 +0000]
MIPS: IP27: Remove code obfuscation by enter_panic_mode().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: GT641xx: Convert timer lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:37 +0000]
MIPS: GT641xx: Convert timer lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Alchemy: Simplify DMA channel allocation code.
Ralf Baechle [Sat, 27 Feb 2010 11:53:37 +0000]
MIPS: Alchemy: Simplify DMA channel allocation code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>

9 years agoMIPS: Yosemite: Convert SMP startup lock to arch spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:37 +0000]
MIPS: Yosemite: Convert SMP startup lock to arch spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Alchemy: Remove time_lock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:36 +0000]
MIPS: Alchemy: Remove time_lock.

The sole user is au1xxx_calc_clock() which is only used in early bootup
where the is no paralellism thus no race condition to protect against.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>

9 years agoMIPS: DEC: Convert KN01 lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:36 +0000]
MIPS: DEC: Convert KN01 lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: BCM63xx: Convert timer locks to raw spinlocks.
Ralf Baechle [Sat, 27 Feb 2010 11:53:35 +0000]
MIPS: BCM63xx: Convert timer locks to raw spinlocks.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: PowerTV: Convert IRQ controller lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:34 +0000]
MIPS: PowerTV: Convert IRQ controller lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: David VomLehn <dvomlehn@cisco.com>

9 years agoMIPS: Malta: Convert IRQ controller lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:32 +0000]
MIPS: Malta: Convert IRQ controller lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: SB1480: Convert IRQ controller lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:32 +0000]
MIPS: SB1480: Convert IRQ controller lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: SB1250: Convert IRQ controller lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:32 +0000]
MIPS: SB1250: Convert IRQ controller lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: GT641xx: Convert IRQ controller lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:31 +0000]
MIPS: GT641xx: Convert IRQ controller lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Jazz: Convert irq controller lock to raw spinlock.
Ralf Baechle [Sat, 27 Feb 2010 11:53:31 +0000]
MIPS: Jazz: Convert irq controller lock to raw spinlock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Make various locks static.
Ralf Baechle [Sat, 27 Feb 2010 11:53:30 +0000]
MIPS: Make various locks static.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoStaging: Octeon: Remove /proc/octeon_ethernet_stats
David Daney [Wed, 17 Feb 2010 01:25:33 +0000]
Staging: Octeon: Remove /proc/octeon_ethernet_stats

This file shouldn't be in /proc, so we remove it.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
To: netdev@vger.kernel.org
To: gregkh@suse.de
Patchwork: http://patchwork.linux-mips.org/patch/970/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoStaging: Octeon: Reformat a bunch of comments.
David Daney [Wed, 17 Feb 2010 01:25:32 +0000]
Staging: Octeon: Reformat a bunch of comments.

Many of the comments didn't follow kerneldoc guidlines.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
To: netdev@vger.kernel.org
To: gregkh@suse.de
Patchwork: http://patchwork.linux-mips.org/patch/971/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoStaging: Octeon: Free transmit SKBs in a timely manner
David Daney [Mon, 15 Feb 2010 23:06:47 +0000]
Staging: Octeon:  Free transmit SKBs in a timely manner

If we wait for the once-per-second cleanup to free transmit SKBs,
sockets with small transmit buffer sizes might spend most of their
time blocked waiting for the cleanup.

Normally we do a cleanup for each transmitted packet.  We add a
watchdog type timer so that we also schedule a timeout for 150uS after
a packet is transmitted.  The watchdog is reset for each transmitted
packet, so for high packet rates, it never expires.  At these high
rates, the cleanups are done for each packet so the extra watchdog
initiated cleanups are neither needed nor triggered.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
To: netdev@vger.kernel.org
To: gregkh@suse.de
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Patchwork: http://patchwork.linux-mips.org/patch/968/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

This version has spelling and comment changes based on feedback from
Eric Dumazet.

9 years agoMIPS: Octeon: Do proper acknowledgment of CIU timer interrupts.
David Daney [Mon, 15 Feb 2010 20:13:18 +0000]
MIPS: Octeon: Do proper acknowledgment of CIU timer interrupts.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
To: netdev@vger.kernel.org
To: gregkh@suse.de
Patchwork: http://patchwork.linux-mips.org/patch/967/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoStaging: Octeon: Run phy bus accesses on a workqueue.
David Daney [Mon, 15 Feb 2010 20:13:17 +0000]
Staging: Octeon:  Run phy bus accesses on a workqueue.

When directly accessing a phy, we must acquire the mdio bus lock.  To
do that we cannot be in interrupt context, so we need to move these
operations to a workqueue.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
To: netdev@vger.kernel.org
To: gregkh@suse.de
Patchwork: http://patchwork.linux-mips.org/patch/965/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoStaging: octeon: remove unneeded includes
David Daney [Mon, 15 Feb 2010 20:13:16 +0000]
Staging: octeon: remove unneeded includes

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
To: netdev@vger.kernel.org
To: gregkh@suse.de
Patchwork: http://patchwork.linux-mips.org/patch/964/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Use generic ucontext.h
Yoichi Yuasa [Fri, 12 Feb 2010 12:35:04 +0000]
MIPS: Use generic ucontext.h

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/959/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Use generic serial.h
Yoichi Yuasa [Fri, 12 Feb 2010 12:33:56 +0000]
MIPS: Use generic serial.h

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/960/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Use generic parport.h
Yoichi Yuasa [Fri, 12 Feb 2010 12:29:14 +0000]
MIPS: Use generic parport.h

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/958/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Use generic current.h
Yoichi Yuasa [Fri, 12 Feb 2010 12:27:59 +0000]
MIPS: Use generic current.h

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/957/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Enable Read Inhibit/eXecute Inhibit for Octeon+ CPUs
David Daney [Wed, 10 Feb 2010 23:12:49 +0000]
MIPS: Enable Read Inhibit/eXecute Inhibit for Octeon+ CPUs

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/955/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Give Octeon+ CPUs their own cputype.
David Daney [Wed, 10 Feb 2010 23:12:48 +0000]
MIPS: Give Octeon+ CPUs their own cputype.

This allows us to treat them differently at runtime.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/951/
Patchwork: http://patchwork.linux-mips.org/patch/987/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Implement Read Inhibit/eXecute Inhibit
David Daney [Wed, 10 Feb 2010 23:12:47 +0000]
MIPS: Implement Read Inhibit/eXecute Inhibit

The SmartMIPS ASE specifies how Read Inhibit (RI) and eXecute Inhibit
(XI) bits in the page tables work.  The upper two bits of EntryLo{0,1}
are RI and XI when the feature is enabled in the PageGrain register.
SmartMIPS only covers 32-bit systems.  Cavium Octeon+ extends this to
64-bit systems by continuing to place the RI and XI bits in the top of
EntryLo even when EntryLo is 64-bits wide.

Because we need to carry the RI and XI bits in the PTE, the layout of
the PTE is changed.  There is a two instruction overhead in the TLB
refill hot path to get the EntryLo bits into the proper position.
Also the TLB load exception has to probe the TLB to check if RI or XI
caused the exception.

Also of note is that the layout of the PTE bits is done at compile and
runtime rather than statically.  In the 32-bit case this allows for
the same number of PFN bits as before the patch as the _PAGE_HUGE is
not supported in 32-bit kernels (we have _PAGE_NO_EXEC and
_PAGE_NO_READ instead of _PAGE_READ and _PAGE_HUGE).

The patch is tested on Cavium Octeon+, but should also work on 32-bit
systems with the Smart-MIPS ASE.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/952/
Patchwork: http://patchwork.linux-mips.org/patch/956/
Patchwork: http://patchwork.linux-mips.org/patch/962/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Add TLBR and ROTR to uasm.
David Daney [Wed, 10 Feb 2010 23:12:46 +0000]
MIPS: Add TLBR and ROTR to uasm.

The soon to follow Read Inhibit/eXecute Inhibit patch needs TLBR and
ROTR support in uasm.  We also add a UASM_i_ROTR macro.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/953/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Add accessor functions and bit definitions for c0_PageGrain
David Daney [Wed, 10 Feb 2010 23:12:45 +0000]
MIPS: Add accessor functions and bit definitions for c0_PageGrain

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/950/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Use 64-bit stores to c0_entrylo on 64-bit kernels.
David Daney [Wed, 10 Feb 2010 23:12:44 +0000]
MIPS: Use 64-bit stores to c0_entrylo on 64-bit kernels.

64-bit CPUs have 64-bit c0_entrylo{0,1} registers.  We should use the
64-bit dmtc0 instruction to set them.  This becomes important if we
want to set the RI and XI bits present in some processors.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/954/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Remove trailing space in messages
Frans Pop [Sat, 6 Feb 2010 17:47:13 +0000]
MIPS: Remove trailing space in messages

Signed-off-by: Frans Pop <elendil@planet.nl>
To: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/946/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Make the debugging of compressed kernel configurable
Wu Zhangjin [Sun, 31 Jan 2010 12:39:40 +0000]
MIPS: Make the debugging of compressed kernel configurable

This patch adds a new DEBUG_ZBOOT option to allow the users to enable it
to debug the compressed kernel support for a new board and this optoin
should be disabled to reduce the kernel image size and speed up the
kernel booting procedure when the compressed kernel support is stable.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/918/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Remove #if 0 r4k_update_mmu_cache_hwbug
David Daney [Wed, 3 Feb 2010 01:19:38 +0000]
MIPS: Remove #if 0 r4k_update_mmu_cache_hwbug

The function is #if 0ed out.  There are no other occurrences of its
name in the tree.  It is safe to remove.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/936/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: TXx9: Remove forced serial console setting
Yoichi Yuasa [Tue, 2 Feb 2010 09:40:04 +0000]
MIPS: TXx9: Remove forced serial console setting

It is not always used, even if it is available.

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/933/
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: AR7: Make ar7_register_devices much more durable
Alexander Clouter [Sun, 31 Jan 2010 19:39:57 +0000]
MIPS: AR7: Make ar7_register_devices much more durable

[Ralf: Fixed up the rejects and changed all the new printk(KERN_...); to
pr_xxx() as suggested by Wu.]

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/920/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: AR7: Fix USB slave mem range typo
Alexander Clouter [Sun, 31 Jan 2010 19:38:52 +0000]
MIPS: AR7: Fix USB slave mem range typo

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/919/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: AR7: Whitespace hacking
Alexander Clouter [Sun, 31 Jan 2010 19:38:19 +0000]
MIPS: AR7: Whitespace hacking

[Ralf: Fixed up reject and Wu's complaints about comment style.]

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/921/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Alchemy: Use strlcat() for the command line arguments
Yoichi Yuasa [Mon, 1 Feb 2010 13:06:56 +0000]
MIPS: Alchemy: Use strlcat() for the command line arguments

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/928/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Alchemy: Remove prom_getcmdline()
Yoichi Yuasa [Mon, 1 Feb 2010 13:05:57 +0000]
MIPS: Alchemy: Remove prom_getcmdline()

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/927/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Alchemy: Remove forced command line setting
Yoichi Yuasa [Fri, 29 Jan 2010 08:49:52 +0000]
MIPS: Alchemy: Remove forced command line setting

It is not always used, even if it is available.

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/893/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Set __elf_platform for Octeon.
David Daney [Fri, 29 Jan 2010 00:52:13 +0000]
MIPS: Set __elf_platform for Octeon.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/892/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Allow the auxv's elf_platform entry to be set.
David Daney [Fri, 29 Jan 2010 00:52:12 +0000]
MIPS: Allow the auxv's elf_platform entry to be set.

The userspace runtime linker uses the elf_platform to find the libraries
optimized for the current CPU archecture variant.  First we need to allow it
to be set to something other than NULL.  Follow-on patches will set some
values for specific CPUs.

GLIBC already does the right thing.  The kernel just needs to supply good
data.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/891/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMMC: AU1xMMC: Allow platforms to disable host capabilities
Manuel Lauss [Wed, 14 Oct 2009 07:38:06 +0000]
MMC: AU1xMMC: Allow platforms to disable host capabilities

Although the hardware supports a 4/8bit SD interface and the driver
unconditionally advertises all hardware caps to the MMC core, not all
datalines may actually be wired up.  This patch introduces another
field to au1xmmc platform data allowing platforms to disable certain
advanced host controller features.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: linux-mmc@vger.kernel.org
CC: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/460/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Deal with larger physical offsets
Florian Fainelli [Thu, 28 Jan 2010 14:22:37 +0000]
MIPS: Deal with larger physical offsets

AR7 has a larger physical offset than other MIPS based systems and therefore
needs to setup its handlers beyond the usual KSEG0 range. When running the
kernel in mapped mode this modification is also required. Remove function
comment which is now incorrect.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Eugene Konev <ejka@imfi.kspu.ru>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/889/
Patchwork: http://patchwork.linux-mips.org/patch/932/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Annotate set_except_vector with __init
Florian Fainelli [Thu, 28 Jan 2010 14:21:42 +0000]
MIPS: Annotate set_except_vector with __init

All call sites of set_except_vector are already annotated with __init, so
annotate that one too.

Signed-off-by: Regards, Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
To: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/888/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: Move arch/mips/mm/uasm.h to arch/mips/include/asm/uasm.h
Florian Fainelli [Thu, 28 Jan 2010 14:21:24 +0000]
MIPS: Move arch/mips/mm/uasm.h to arch/mips/include/asm/uasm.h

Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
To: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/887/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: PNX8550: Remove unnecessary export prom_getcmdline()
Yoichi Yuasa [Thu, 28 Jan 2010 13:52:50 +0000]
MIPS: PNX8550: Remove unnecessary export prom_getcmdline()

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/886/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

9 years agoMIPS: PNX833x: Remove unused prom_getcmdline()
Yoichi Yuasa [Thu, 28 Jan 2010 13:51:50 +0000]
MIPS: PNX833x: Remove unused prom_getcmdline()

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/885/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>