pandora-kernel.git
17 years agoMerge branches 'armv7', 'at91', 'misc' and 'omap' into devel
Russell King [Wed, 9 May 2007 09:41:28 +0000 (10:41 +0100)]
Merge branches 'armv7', 'at91', 'misc' and 'omap' into devel

17 years agoARM: OMAP: Fix GCC-reported compile time bug
David Brownell [Wed, 28 Mar 2007 23:38:14 +0000 (16:38 -0700)]
ARM: OMAP: Fix GCC-reported compile time bug

Fix GCC-reported compile time bug which prevents booting
when the framebuffer code is disabled.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: restore CONFIG_GENERIC_TIME
David Brownell [Wed, 28 Mar 2007 20:21:20 +0000 (13:21 -0700)]
ARM: OMAP: restore CONFIG_GENERIC_TIME

Somehow this got lost in a merge ...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: partial LED fixes
David Brownell [Wed, 28 Mar 2007 20:09:36 +0000 (13:09 -0700)]
ARM: OMAP: partial LED fixes

Partial fix for CONFIG_LEDS breakage ... at least allow platforms
using the debug-leds support (H4 for now) to build with the generic
LED support, and default the LED that would be the timer LED to
trigger using the "heartbeat" (timer driven, rate depends on load).

Right now only H2 and P2 seem to have working LED support; this
at least makes H4 less broken.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: add SoSSI clock (call propagate_rate for childrens)
Imre Deak [Tue, 6 Mar 2007 11:52:01 +0000 (03:52 -0800)]
ARM: OMAP: add SoSSI clock (call propagate_rate for childrens)

Clocks with the follow parent rate mode were not updating their
children at propagate rate time.

Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: FB sync with N800 tree (support for dynamic SRAM allocations)
Imre Deak [Tue, 6 Mar 2007 11:16:36 +0000 (03:16 -0800)]
ARM: OMAP: FB sync with N800 tree (support for dynamic SRAM allocations)

- in addition to fixed FB regions - as passed by the bootloader -
  allow dynamic allocations
- do some more checking against overlapping / reserved regions
- move the FB specific parts out from sram.c to fb.c

Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: Sync framebuffer headers with N800 tree
Kai Svahn [Fri, 2 Feb 2007 00:19:15 +0000 (16:19 -0800)]
ARM: OMAP: Sync framebuffer headers with N800 tree

This patch syncs framebuffer headers with N800 tree.

Signed-off-by: Kai Svahn <kai.svahn@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: Mostly cosmetic to sync up with linux-omap tree
Tony Lindgren [Fri, 26 Jan 2007 20:01:17 +0000 (12:01 -0800)]
ARM: OMAP: Mostly cosmetic to sync up with linux-omap tree

Mostly cosmetic to sync up with linux-omap tree

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: Fix gpmc header
Tony Lindgren [Wed, 13 Dec 2006 07:02:43 +0000 (23:02 -0800)]
ARM: OMAP: Fix gpmc header

Fix gpmc header

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: Add mailbox support for IVA
Hiroshi DOYU [Thu, 7 Dec 2006 23:43:59 +0000 (15:43 -0800)]
ARM: OMAP: Add mailbox support for IVA

This patch adds a generic mailbox interface for for DSP and IVA
(Image Video Accelerator). This patch itself doesn't contain
any IVA driver.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] armv7: add Makefile and Kconfig entries
Catalin Marinas [Tue, 8 May 2007 21:45:26 +0000 (22:45 +0100)]
[ARM] armv7: add Makefile and Kconfig entries

This patch adds the necessary lines to the Makefile and Kconfig files for
enabling the compilation of the ARMv7 CPU support.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] armv7: add support for asid-tagged VIVT I-cache
Catalin Marinas [Wed, 9 May 2007 08:50:23 +0000 (09:50 +0100)]
[ARM] armv7: add support for asid-tagged VIVT I-cache

ARMv7 can have VIPT, PIPT or ASID-tagged VIVT I-cache. This patch
adds the necessary invalidation of the I-cache when the ASID numbers
are re-used.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] armv7: add dedicated ARMv7 barrier instructions
Catalin Marinas [Tue, 8 May 2007 21:53:44 +0000 (22:53 +0100)]
[ARM] armv7: add dedicated ARMv7 barrier instructions

Starting with ARMv7, there are dedicated instruction for the ISB, DSB
and DMB barriers and there is no need to execute them as CP15
operations.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] armv7: Add ARMv7 cacheid macros
Catalin Marinas [Tue, 8 May 2007 21:38:40 +0000 (22:38 +0100)]
[ARM] armv7: Add ARMv7 cacheid macros

This patch renames the old __cacheid_* macros to __cacheid_*_prev7 and adds
support for the new format.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] armv7: add support for ARMv7 cores.
Catalin Marinas [Tue, 8 May 2007 21:27:46 +0000 (22:27 +0100)]
[ARM] armv7: add support for ARMv7 cores.

This patch adds support for the ARMv7 cores.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] Fix ARM branch relocation range
Kevin Welton [Tue, 8 May 2007 21:05:25 +0000 (22:05 +0100)]
[ARM] Fix ARM branch relocation range

Branches in the ARM architecture are restricted to a range of +/- 32MB.
However, the code in .../arch/arm/kernel/module.c::apply_relocate() was
checking offset against a range of +/- 64MB.

Signed-off-by: Kevin Welton <Kevin.Welton@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4363/1: AT91: Remove legacy PIO definitions
Andrew Victor [Tue, 8 May 2007 06:51:23 +0000 (07:51 +0100)]
[ARM] 4363/1: AT91: Remove legacy PIO definitions

Remove the legacy PIO pin definitions for the AT91 processors.
The standard (and portable between the different AT91 processors) method
is to use the AT91_PIN_* defines and the GPIO API.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4361/1: AT91: Build error
Andrew Victor [Mon, 7 May 2007 14:17:47 +0000 (15:17 +0100)]
[ARM] 4361/1: AT91: Build error

Fix a build error due to a missing semicolon.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: Sync core code with linux-omap
Tony Lindgren [Thu, 7 Dec 2006 21:58:10 +0000 (13:58 -0800)]
ARM: OMAP: Sync core code with linux-omap

This patch syncs omap specific core code with linux-omap.
Most of the changes are needed to fix bitrot caused by
driver updates in linux-omap tree.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: Sync headers with linux-omap
Tony Lindgren [Thu, 7 Dec 2006 21:57:38 +0000 (13:57 -0800)]
ARM: OMAP: Sync headers with linux-omap

This patch syncs omap specific headers with linux-omap.
Most of the changes needed because of bitrot caused by
driver changes in linux-omap tree. Integrating this
is needed for adding support for various omap drivers.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: h4 must have blinky leds!!
David Brownell [Thu, 7 Dec 2006 01:14:03 +0000 (17:14 -0800)]
ARM: OMAP: h4 must have blinky leds!!

This adds generic support for the "debug board" LEDs used by most of
TI's OMAP reference boards, and board-specific support for the H4.

It's derived from the not-as-generic stuff used by OMAP1 H2/H3/P2.
Those should be able to switch easily to this version, and clean up
some of the omap1-specific code.

In addition to H4 support, one key improvement is supporting not just
the "old" ARM debug LED API (with timer and idle LEDs, plus four that
can be handy for kernel debugging), but it also supports the "new"
generic LED API (most useful for usermode stuff IMO).  Either or both
APIs can be enabled.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: FB: add controller platform data
Imre Deak [Thu, 7 Dec 2006 01:13:50 +0000 (17:13 -0800)]
ARM: OMAP: FB: add controller platform data

Add controller platform data

Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: Add function to print clock usecounts
Juha Yrjola [Thu, 7 Dec 2006 01:13:49 +0000 (17:13 -0800)]
ARM: OMAP: Add function to print clock usecounts

Useful for debugging power management code.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: Add DMA IRQ sanity checks
Juha Yrjola [Thu, 7 Dec 2006 01:13:47 +0000 (17:13 -0800)]
ARM: OMAP: Add DMA IRQ sanity checks

Add DMA IRQ sanity checks

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoARM: OMAP: gpio init section cleanups
David Brownell [Thu, 7 Dec 2006 01:13:59 +0000 (17:13 -0800)]
ARM: OMAP: gpio init section cleanups

Minor GPIO cleanups:  remove needless #include, and omap_gpio_init()
should be __init, as well as all the board init code calling it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] Fix ASID version switch
Russell King [Tue, 8 May 2007 19:03:09 +0000 (20:03 +0100)]
[ARM] Fix ASID version switch

Close a hole in the ASID version switch, particularly the following
scenario:

CPU0 MM PID CPU1 MM PID
idle
  A pid(A)
  A idle(lazy tlb)
* new asid version triggered by B *
  B pid(B)
  A pid(A)
* MM A gets new asid version *
  A idle(lazy tlb)
  A pid(A)
* CPU1 doesn't see the new ASID *

The result is that CPU1 continues running with the hardware set
for the original (stale) ASID value, but mm->context.id contains
the new ASID value.  The result is that the next MM fault on CPU1
updates the page table entries, but flush_tlb_page() fails due to
wrong ASID.

There is a related case with a threaded application is allocated
a new ASID on one CPU while another of its threads is running on
some different CPU.  This scenario is not fixed by this commit.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] Ensure head text is always placed at the start of kernel
Russell King [Tue, 8 May 2007 14:15:45 +0000 (15:15 +0100)]
[ARM] Ensure head text is always placed at the start of kernel

Commit 86c0baf123e474b6eb404798926ecf62b426bf3a highlighted that we
may end up with the head text placed elsewhere in the kernel image.
Introduce a new .text.head section to contain the initial kernel
startup code, and always place this section at the beginning of the
kernel image.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] Shut up warning about init_thread_union
Russell King [Tue, 8 May 2007 11:39:37 +0000 (12:39 +0100)]
[ARM] Shut up warning about init_thread_union

Fix false warning:

WARNING: arch/arm/kernel/init_task.o - Section mismatch:
 reference to .init.task:init_thread_union from .data between
 'init_task' (at offset 0x4) and 'init_sighand'

caused by the section name starting with ".init".

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] Mark SMP local timer and IPI as exception entries
Russell King [Tue, 8 May 2007 10:31:07 +0000 (11:31 +0100)]
[ARM] Mark SMP local timer and IPI as exception entries

This allows the backtrace to dump the exception stack contents.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Tue, 8 May 2007 00:35:42 +0000 (17:35 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SCSI] esp_scsi: Fix section mismatch warnings.
  [VIDEO] sunxvr2500: Fix PCI device ID table.

17 years agoFix bluetooth HCI sysfs compile
Linus Torvalds [Tue, 8 May 2007 00:32:08 +0000 (17:32 -0700)]
Fix bluetooth HCI sysfs compile

More fallout from the removal of "struct subsystem" from the core device
model.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[SCSI] esp_scsi: Fix section mismatch warnings.
Martin Habets [Mon, 7 May 2007 21:05:03 +0000 (14:05 -0700)]
[SCSI] esp_scsi: Fix section mismatch warnings.

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[VIDEO] sunxvr2500: Fix PCI device ID table.
David S. Miller [Mon, 7 May 2007 21:02:51 +0000 (14:02 -0700)]
[VIDEO] sunxvr2500: Fix PCI device ID table.

Noticed by Meelis Roos.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Mon, 7 May 2007 19:34:57 +0000 (12:34 -0700)]
Merge git://git./linux/kernel/git/aegl/linux-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] update memory attribute aliasing documentation & test cases
  [IA64] fail mmaps that span areas with incompatible attributes
  [IA64] allow WB /sys/.../legacy_mem mmaps
  [IA64] make ioremap avoid unsupported attributes
  [IA64] rename ioremap variables to match i386
  [IA64] relax per-cpu TLB requirement to DTC
  [IA64] remove per-cpu ia64_phys_stacked_size_p8
  [IA64] Fix example error injection program
  [IA64] Itanium MC Error Injection Tool: pal_mc_error_inject() interface
  [IA64] Itanium MC Error Injection Tool: Makefile changes
  [IA64] Itanium MC Error Injection Tool: Driver sysfs interface
  [IA64] Itanium MC Error Injection Tool: Doc and sample application
  [IA64] Itanium MC Error Injection Tool: Kernel configuration

17 years agoMerge branch 'server-cluster-locking-api' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Mon, 7 May 2007 19:34:24 +0000 (12:34 -0700)]
Merge branch 'server-cluster-locking-api' of git://linux-nfs.org/~bfields/linux

* 'server-cluster-locking-api' of git://linux-nfs.org/~bfields/linux:
  gfs2: nfs lock support for gfs2
  lockd: add code to handle deferred lock requests
  lockd: always preallocate block in nlmsvc_lock()
  lockd: handle test_lock deferrals
  lockd: pass cookie in nlmsvc_testlock
  lockd: handle fl_grant callbacks
  lockd: save lock state on deferral
  locks: add fl_grant callback for asynchronous lock return
  nfsd4: Convert NFSv4 to new lock interface
  locks: add lock cancel command
  locks: allow {vfs,posix}_lock_file to return conflicting lock
  locks: factor out generic/filesystem switch from setlock code
  locks: factor out generic/filesystem switch from test_lock
  locks: give posix_test_lock same interface as ->lock
  locks: make ->lock release private data before returning in GETLK case
  locks: create posix-to-flock helper functions
  locks: trivial removal of unnecessary parentheses

17 years agoFix up SLUB compile
Linus Torvalds [Mon, 7 May 2007 19:31:58 +0000 (12:31 -0700)]
Fix up SLUB compile

The newly merged SLUB allocator patches had been generated before the
removal of "struct subsystem", and ended up applying fine, but wouldn't
build based on the current tree as a result.

Fix up that merge error - not that SLUB is likely really ready for
showtime yet, but at least I can fix the trivial stuff.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
Linus Torvalds [Mon, 7 May 2007 19:26:27 +0000 (12:26 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-nmw

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (34 commits)
  [GFS2] Uncomment sprintf_symbol calling code
  [DLM] lowcomms style
  [GFS2] printk warning fixes
  [GFS2] Patch to fix mmap of stuffed files
  [GFS2] use lib/parser for parsing mount options
  [DLM] Lowcomms nodeid range & initialisation fixes
  [DLM] Fix dlm_lowcoms_stop hang
  [DLM] fix mode munging
  [GFS2] lockdump improvements
  [GFS2] Patch to detect corrupt number of dir entries in leaf and/or inode blocks
  [GFS2] bz 236008: Kernel gpf doing cat /debugfs/gfs2/xxx (lock dump)
  [DLM] fs/dlm/ast.c should #include "ast.h"
  [DLM] Consolidate transport protocols
  [DLM] Remove redundant assignment
  [GFS2] Fix bz 234168 (ignoring rgrp flags)
  [DLM] change lkid format
  [DLM] interface for purge (2/2)
  [DLM] add orphan purging code (1/2)
  [DLM] split create_message function
  [GFS2] Set drop_count to 0 (off) by default
  ...

17 years agoMerge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Mon, 7 May 2007 19:24:07 +0000 (12:24 -0700)]
Merge branch 'drm-patches' of /linux/kernel/git/airlied/drm-2.6

* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: Add 965GM pci id update
  drm: just use io_remap_pfn_range on all archs..
  drm: fix DRM_CONSISTENT mapping
  drm: fix up mmap locking in preparation for ttm changes
  drm: fix driver deadlock with AIGLX and reclaim_buffers_locked
  drm: fix warning in drm_fops.c
  drm: allow for more generic drm ioctls
  drm: fix alpha domain handling
  via: fix CX700 pci id
  drm: make drm_io_prot static.
  drm: remove via_mm.h
  drm: add missing NULL assignment
  drm/radeon: Fix u32 overflows when determining AGP base address in card space.
  drm: port over use_vmalloc code from git hashtab
  drm: fix crash with fops lock and fixup sarea/page size locking
  drm: bring bufs code from git tree.
  drm: move protection stuff into separate function
  drm: Use ARRAY_SIZE macro when appropriate
  drm: update README.drm (bugzilla #7933)
  drm: remove unused exports

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 7 May 2007 19:23:31 +0000 (12:23 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET]: rfkill: add support for input key to control wireless radio
  [NET] net/core: Fix error handling
  [TG3]: Update version and reldate.
  [TG3]: Eliminate spurious interrupts.
  [TG3]: Add ASPM workaround.
  [Bluetooth] Correct SCO buffer for another Broadcom based dongle
  [Bluetooth] Add support for Targus ACB10US USB dongle
  [Bluetooth] Disconnect L2CAP connection after last RFCOMM DLC
  [Bluetooth] Check that device is in rfcomm_dev_list before deleting
  [Bluetooth] Use in-kernel sockets API
  [Bluetooth] Attach host adapters to the Bluetooth bus
  [Bluetooth] Fix L2CAP and HCI setsockopt() information leaks

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 7 May 2007 19:22:48 +0000 (12:22 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SERIAL] sunsu: Fix section mismatch warnings.
  [SPARC64]: pgtable_cache_init() should be __init.
  [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/prom.c
  [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/pci.c
  [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/console.c
  [MM]: sparse_init() should be __init.
  [SPARC64]: Update defconfig.
  [VIDEO]: Add Sun XVR-2500 framebuffer driver.
  [VIDEO]: Add Sun XVR-500 framebuffer driver.
  [SPARC64]: SUN4U PCI-E controller support.
  [SPARC]: Fix comment typo in smp4m_blackbox_current().
  [SCSI] SUNESP: sun_esp.c needs linux/delay.h

Fix up conflict in arch/sparc64/mm/init.c manually due to removal of
pgtable_cache_init() through the -mm patches (even though that patch was
also by David ;)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
Linus Torvalds [Mon, 7 May 2007 19:18:21 +0000 (12:18 -0700)]
Merge branch 'for-linus' of /linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB: Convert to NAPI
  IB: Return "maybe missed event" hint from ib_req_notify_cq()
  IB: Add CQ comp_vector support
  IB/ipath: Fix a race condition when generating ACKs
  IB/ipath: Fix two more spin lock problems
  IB/fmr_pool: Add prefix to all printks
  IB/srp: Set proc_name
  IB/srp: Add orig_dgid sysfs attribute to scsi_host
  IPoIB/cm: Don't crash if remote side uses one QP for both directions
  RDMA/cxgb3: Support for new abort logic
  RDMA/cxgb3: Initialize cpu_idx field in cpl_close_listserv_req message
  RDMA/cxgb3: Fail qp creation if the requested max_inline is too large
  RDMA/cxgb3: Fix TERM codes
  IPoIB/cm: Fix error handling in ipoib_cm_dev_open()
  IB/ipath: Don't corrupt pending mmap list when unmapped objects are freed
  IB/mthca: Work around kernel QP starvation
  IB/ipath: Don't put QP in timeout queue if waiting to send
  IB/ipath: Don't call spin_lock_irq() from interrupt context

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Mon, 7 May 2007 19:17:40 +0000 (12:17 -0700)]
Merge /pub/scm/linux/kernel/git/lethal/sh-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (38 commits)
  sh: R7785RP board updates.
  sh: Update r7780rp defconfig.
  sh: Add die chain notifiers.
  sh: Fix APM emulation on hp6xx.
  sh: Wire up more IRQs for SH7709.
  sh: Solution Engine 7722 board support.
  sh: Fix r7780rp build.
  sh: kdump support.
  sh: Move clock reporting to its own proc entry.
  sh: Solution Engine SH7705 board and CPU updates.
  serial: sh-sci: Fix module clock refcount for serial console.
  serial: sh-sci: Fix module clock refcounting.
  sh: SH7722 clock framework support.
  sh: hp6xx pata_platform support.
  sh: Obey CONFIG_HZ for HZ definition.
  sh: Fix fstatat64() syscall.
  sh: se7780 PCI support.
  sh: SH7780 Solution Engine board support.
  sh: Add a dummy SH-4 PCIC fixup.
  sh: Tidy up L-BOX area5 addresses.
  ...

17 years agospi_s3c24xx.c: Fix build
Arnaud Patard [Sun, 6 May 2007 21:52:00 +0000 (14:52 -0700)]
spi_s3c24xx.c: Fix build

Commit a836f5856ae46ccb2464ea76031ea05ae967b832 removes the shutdown
member of the bitbang structure, breaking the build of spi_s3c24xx.c.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agorename TANBAC TB0219 config
Yoichi Yuasa [Sun, 6 May 2007 21:51:58 +0000 (14:51 -0700)]
rename TANBAC TB0219 config

Rename config for TANBAC TB0219 GPIO support to something more appropriate.

Fixes this:

drivers/char/Kconfig:906:warning: type of 'TANBAC_TB0219' redefined from 'boolean' to 'tristate'
drivers/char/Kconfig:907:warning: choice values currently only support a single
prompt

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoehci-ps3, ohci-ps3: fix compilation
Geoff Levand [Sun, 6 May 2007 21:51:57 +0000 (14:51 -0700)]
ehci-ps3, ohci-ps3: fix compilation

As seen on powerpc-cell et al:

  CC [M]  drivers/usb/host/ehci-hcd.o
In file included from drivers/usb/host/ehci-hcd.c:941:
drivers/usb/host/ehci-ps3.c:79: error: conflicting types for 'dev_dbg'
include/linux/device.h:576: error: previous definition of 'dev_dbg' was here
make[4]: *** [drivers/usb/host/ehci-hcd.o] Error 1
  CC [M]  drivers/usb/host/ohci-hcd.o
In file included from drivers/usb/host/ohci-hcd.c:921:
drivers/usb/host/ohci-ps3.c:83: error: conflicting types for 'dev_dbg'
include/linux/device.h:576: error: previous definition of 'dev_dbg' was here

dev_dbg() will check format string for you in dummy case also, so remove
buggers.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg KH <greg@kroah.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix ppp_deflate issues with recent zlib_inflate changes
Richard Purdie [Sun, 6 May 2007 21:51:56 +0000 (14:51 -0700)]
Fix ppp_deflate issues with recent zlib_inflate changes

The last zlib_inflate update broke certain corner cases for ppp_deflate
decompression handling.  This patch fixes some logic to make things work
properly again.  Users other than ppp_deflate (the only Z_PACKET_FLUSH
user) should be unaffected.

Fixes bug 8405 (confirmed by Stefan)

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Stefan Wenk <stefan.wenk@gmx.at>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocx88-video build fix
Andrew Morton [Sun, 6 May 2007 21:51:55 +0000 (14:51 -0700)]
cx88-video build fix

alpha:

drivers/media/video/cx88/cx88-video.c: In function 'cx8800_initdev':
drivers/media/video/cx88/cx88-video.c:1782: error: 'DMA_32BIT_MASK' undeclared (first use in this function)
drivers/media/video/cx88/cx88-video.c:1782: error: (Each undeclared identifier is reported only once
drivers/media/video/cx88/cx88-video.c:1782: error: for each function it appears in.)

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoxtensa: strlcpy is smart enough
Jean Delvare [Sun, 6 May 2007 21:51:54 +0000 (14:51 -0700)]
xtensa: strlcpy is smart enough

strlcpy already accounts for the trailing zero in its length
computation, so there is no need to substract one to the buffer size.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agov850: generic timekeeping conversion
john stultz [Sun, 6 May 2007 21:51:53 +0000 (14:51 -0700)]
v850: generic timekeeping conversion

Convert an arch that does not currently implement sub-jiffy timekeeping to
use the generic timekeeping code.

v850 looks like it has some intent to implement sub-jiffy timekeeping, so
it may not yet be appropriate to try to convert, but I figured I'd get the
maintainer's input and submit the patch for comment.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: fix prototypes
Paolo 'Blaisorblade' Giarrusso [Sun, 6 May 2007 21:51:52 +0000 (14:51 -0700)]
uml: fix prototypes

Declare strlcpy and strlcat more correctly.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: virtualized time fix
Jeff Dike [Sun, 6 May 2007 21:51:51 +0000 (14:51 -0700)]
uml: virtualized time fix

With the current timekeeping, !CONFIG_UML_REAL_TIME_CLOCK has
inconsistent behavior.  Previously, gettimeofday could be (and was)
isolated from the clock ticking.  Now, it's not, so when
CONFIG_UML_REAL_TIME_CLOCK is disabled, gettimeofday must progress in
lockstep with the clock, making it fully virtual.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: out of tmpfs space error clarification
Jeff Dike [Sun, 6 May 2007 21:51:50 +0000 (14:51 -0700)]
uml: out of tmpfs space error clarification

It turns out that the message complaining about a lack of tmpfs space
on the host can be misunderstood as referring to the UML.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: only flush areas covered by VMA
Jeff Dike [Sun, 6 May 2007 21:51:49 +0000 (14:51 -0700)]
uml: only flush areas covered by VMA

When doing a full address space flush, only look at areas covered by a VMA.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: more page fault path trimming
Jeff Dike [Sun, 6 May 2007 21:51:48 +0000 (14:51 -0700)]
uml: more page fault path trimming

More trimming of the page fault path.

Permissions are passed around in a single int rather than one bit per
int.  The permission values are copied from libc so that they can be
passed to mmap and mprotect without any further conversion.

The register sets used by do_syscall_stub and copy_context_skas0 are
initialized once, at boot time, rather than once per call.

wait_stub_done checks whether it is getting the signals it expects by
comparing the wait status to a mask containing bits for the signals of
interest rather than comparing individually to the signal numbers.  It
also has one check for a wait failure instead of two.  The caller is
expected to do the initial continue of the stub.  This gets rid of an
argument and some logic.  The fname argument is gone, as that can be
had from a stack trace.

user_signal() is collapsed into userspace() as it is basically one or
two lines of code afterwards.

The physical memory remapping stuff is gone, as it is unused.

flush_tlb_page is inlined.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: eliminate a piece of debugging code
Jeff Dike [Sun, 6 May 2007 21:51:47 +0000 (14:51 -0700)]
uml: eliminate a piece of debugging code

I missed removing another piece of debugging in an earlier patch.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: speed page fault path
Jeff Dike [Sun, 6 May 2007 21:51:45 +0000 (14:51 -0700)]
uml: speed page fault path

Give the page fault code a specialized path.  There is only one page to look
at, so there's no point in going into the general page table walking code.
There's only going to be one host operation, so there are no opportunities for
merging.  So, we go straight to the pte we want, figure out what needs doing,
and do it.

While I was in here, I fixed the wart where the address passed to unmap was a
void *, but an unsigned long to map and protect.

This gives me just under 10% on a kernel build.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: aIO deadlock avoidance
Jeff Dike [Sun, 6 May 2007 21:51:44 +0000 (14:51 -0700)]
uml: aIO deadlock avoidance

Allow deadlocks to be avoided in the AIO code by setting the pipe to the I/O
thread non-blocking.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: rename os_{read_write}_file_k back to os_{read_write}_file
Jeff Dike [Sun, 6 May 2007 21:51:43 +0000 (14:51 -0700)]
uml: rename os_{read_write}_file_k back to os_{read_write}_file

Rename os_{read_write}_file_k back to os_{read_write}_file, delete
the originals and their bogus infrastructure, and fix all the callers.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: remove debugging remnants
Jeff Dike [Sun, 6 May 2007 21:51:42 +0000 (14:51 -0700)]
uml: remove debugging remnants

I accidentally left the remnants of some debugging in an earlier patch.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: formatting fixes around os_{read_write}_file callers
Jeff Dike [Sun, 6 May 2007 21:51:41 +0000 (14:51 -0700)]
uml: formatting fixes around os_{read_write}_file callers

Formatting fixes ahead of renaming os_{read_write}_file_k to
os_{read_write}_file and fixing all the callers.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: change remaining callers of os_{read_write}_file
Jeff Dike [Sun, 6 May 2007 21:51:41 +0000 (14:51 -0700)]
uml: change remaining callers of os_{read_write}_file

Convert all remaining os_{read_write}_file users to use the simple
{read,write} wrappers, os_{read_write}_file_k.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: don't try to handle signals on initial process stack
Jeff Dike [Sun, 6 May 2007 21:51:40 +0000 (14:51 -0700)]
uml: don't try to handle signals on initial process stack

Code running on the initial UML stack can't receive or process signals since
current must be valid when IRQs are handled, and there is no current for this
stack.

So, instead of using UML_LONGJMP and UML_SETJMP, which are careful to save and
restore signal state, and, as a side-effect, handle any deferred signals,
start_idle_thread must use the bare equivalents, which don't do anything with
signals.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: dump core on panic
Jeff Dike [Sun, 6 May 2007 21:51:39 +0000 (14:51 -0700)]
uml: dump core on panic

Dump core after a panic.  This will provide better debugging information than
is currently available.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: fixup allocation in the ubd driver
Peter Zijlstra [Sun, 6 May 2007 21:51:38 +0000 (14:51 -0700)]
uml: fixup allocation in the ubd driver

Sanitise gfp flags; it actually is an atomic context, so drop the
GFP_KERNEL part.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: send pointers instead of structures to I/O thread
Jeff Dike [Sun, 6 May 2007 21:51:37 +0000 (14:51 -0700)]
uml: send pointers instead of structures to I/O thread

Instead of writing entire structures between UML and the I/O thread, we send
pointers.  This cuts down on the amount of data being copied and possibly
allows more requests to be pending between the two.

This requires that the requests be kmalloced and freed instead of living on
the stack.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: batch I/O requests
Jeff Dike [Sun, 6 May 2007 21:51:36 +0000 (14:51 -0700)]
uml: batch I/O requests

Send as many I/O requests to the I/O thread as possible, even though it will
still only handle one at a time.  This provides an opportunity to reduce
latency by starting one request before the previous one has been finished in
the driver.

Request handling is somewhat modernized by requesting sg pieces of a request
and handling them separately, finishing off the entire request after all the
pieces are done.

When a request queue stalls, normally because its pipe to the I/O thread is
full, it is put on the restart list.  This list is processed by starting up
the queues on it whenever there is some indication that progress might be
possible again.  Currently, this happens in the driver interrupt routine.
Some requests have been finished, so there is likely to be room in the pipe
again.

This almost doubles throughput when copying data between devices, but made no
noticable difference on anything else I tried.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: convert libc layer to call read and write
Jeff Dike [Sun, 6 May 2007 21:51:35 +0000 (14:51 -0700)]
uml: convert libc layer to call read and write

This patch converts calls in the os layer to os_{read,write}_file to calls
directly to libc read() and write() where it is clear that the I/O buffer is
in the kernel.

We can do that here instead of calling os_{read,write}_file_k since we are in
libc code and can call libc directly.

With the change in the calls, error handling needs to be changed to refer to
errno directly rather than the return value of the call.

CATCH_EINTR wrappers were also added where needed.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: tidy libc code
Jeff Dike [Sun, 6 May 2007 21:51:33 +0000 (14:51 -0700)]
uml: tidy libc code

This patch lays some groundwork for the next one, which converts calls to
os_{read,write}_file into {read,write}, by doing some tidying in the affected
areas.

do_not_aio gets restructured to make the final result a bit cleaner.

There are also whitespace and other formatting fixes, fixes in error messages,
and a typo fix.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: start fixing os_read_file and os_write_file
Jeff Dike [Sun, 6 May 2007 21:51:32 +0000 (14:51 -0700)]
uml: start fixing os_read_file and os_write_file

This patch starts the removal of a very old, very broken piece of code.  This
stems from the problem of passing a userspace buffer into read() or write() on
the host.  If that buffer had not yet been faulted in, read and write will
return -EFAULT.

To avoid this problem, the solution was to fault the buffer in before the
system call by touching the pages that hold the buffer by doing a copy-user of
a byte to each page.  This is obviously bogus, but it does usually work, in tt
mode, since the kernel and process are in the same address space and userspace
addresses can be accessed directly in the kernel.

In skas mode, where the kernel and process are in separate address spaces, it
is completely bogus because the userspace address, which is invalid in the
kernel, is passed into the system call instead of the corresponding physical
address, which would be valid.  Here, it appears that this code, on every host
read() or write(), tries to fault in a random process page.  This doesn't seem
to cause any correctness problems, but there is a performance impact.  This
patch, and the ones following, result in a 10-15% performance gain on a kernel
build.

This code can't be immediately tossed out because when it is, you can't log
in.  Apparently, there is some code in the console driver which depends on
this somehow.

However, we can start removing it by switching the code which does I/O using
kernel addresses to using plain read() and write().  This patch introduces
os_read_file_k and os_write_file_k for use with kernel buffers and converts
all call locations which use obvious kernel buffers to use them.  These
include I/O using buffers which are local variables which are on the stack or
kmalloc-ed.  Later patches will handle the less obvious cases, followed by a
mass conversion back to the original interface.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: remove unused x86_64 code
Jeff Dike [Sun, 6 May 2007 21:51:31 +0000 (14:51 -0700)]
uml: remove unused x86_64 code

It turns out that essentially none of the x86_64 bugs.c is needed.  So, we can
delete most of it.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: speed up page table walking
Jeff Dike [Sun, 6 May 2007 21:51:30 +0000 (14:51 -0700)]
uml: speed up page table walking

The previous page table walking code was horribly inefficient.  This patch
replaces it with code taken from elsewhere in the kernel.

Forking from bash is now ~5% faster and page faults are handled ~10% faster.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: dump registers on ptrace or wait failure
Jeff Dike [Sun, 6 May 2007 21:51:29 +0000 (14:51 -0700)]
uml: dump registers on ptrace or wait failure

Provide a register dump if handle_trap fails.  Abstract out ptrace_dump_regs
since it now has two callers.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: drivers get release methods
Jeff Dike [Sun, 6 May 2007 21:51:29 +0000 (14:51 -0700)]
uml: drivers get release methods

Define release methods for the ubd and net drivers.  They contain as much of
the remove methods as make sense.  All error checking must have already been
done as well as anything else that might be holding a reference on the device
kobject.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: delete HOST_FRAME_SIZE
Jeff Dike [Sun, 6 May 2007 21:51:28 +0000 (14:51 -0700)]
uml: delete HOST_FRAME_SIZE

HOST_FRAME_SIZE isn't used any more.  It has been replaced with MAX_REG_NR.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: irq locking commentary
Jeff Dike [Sun, 6 May 2007 21:51:27 +0000 (14:51 -0700)]
uml: irq locking commentary

Locking commentary.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: comment early boot locking
Jeff Dike [Sun, 6 May 2007 21:51:26 +0000 (14:51 -0700)]
uml: comment early boot locking

Commentary about missing locking.

Also got rid of uml_start because it was pointless.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: kernel segfaults should dump proper registers
Jeff Dike [Sun, 6 May 2007 21:51:25 +0000 (14:51 -0700)]
uml: kernel segfaults should dump proper registers

If there's a segfault inside the kernel, we want a dump of the registers at
the point of the segfault, not the registers at the point of calling panic or
the last userspace registers.

sig_handler_common_skas now uses a static register set in the case of a
SIGSEGV to avoid messing up the process registers if the segfault turns out to
be non-fatal.

The architecture sigcontext-to-pt_regs copying code was repurposed to copy
data out of the SEGV stack frame.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: tidy fault code
Jeff Dike [Sun, 6 May 2007 21:51:24 +0000 (14:51 -0700)]
uml: tidy fault code

Tidying in preparation for the segfault register dumping patch which follows.

void * pointers are changed to union uml_pt_regs *.  This makes the types
match reality, except in arch_fixup, which is changed to operate on a union
uml_pt_regs.  This fixes a bug in the call from segv_handler, which passes a
union uml_pt_regs, to segv, which expects to pass a struct sigcontext to
arch_fixup.

Whitespace and other style fixes.

There's also a errno printk fix.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: kernel_thread shouldn't panic
Jeff Dike [Sun, 6 May 2007 21:51:23 +0000 (14:51 -0700)]
uml: kernel_thread shouldn't panic

kernel_thread() should just return an error value on do_fork failure, not
panic.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: remove page_size()
Jeff Dike [Sun, 6 May 2007 21:51:22 +0000 (14:51 -0700)]
uml: remove page_size()

userspace code used to have to call the kernelspace function page_size() in
order to determine the value of the kernel's PAGE_SIZE.  Since this is now
available directly from kern_constants.h as UM_KERN_PAGE_SIZE, page_size() can
be deleted and calls changed to use the constant.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: tidy process.c
Jeff Dike [Sun, 6 May 2007 21:51:21 +0000 (14:51 -0700)]
uml: tidy process.c

Clean up arch/um/kernel/process.c:

- lots of return(x); -> return x; conversions

- a number of the small functions are either unused, in which case they are
  gone, along any declarations in a header, or could be made static.

- current_pid is ifdefed on CONFIG_MODE_TT and its declaration is ifdefed on
  both CONFIG_MODE_TT and UML_CONFIG_MODE_TT because we don't know whether
  it's being used in a userspace or kernel file.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: no locking needed in tls.c
Jeff Dike [Sun, 6 May 2007 21:51:20 +0000 (14:51 -0700)]
uml: no locking needed in tls.c

Comment the lack of locking on a couple of globals.

Also fix the formatting of __setup_host_supports_tls.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: speed up exec
Jeff Dike [Sun, 6 May 2007 21:51:19 +0000 (14:51 -0700)]
uml: speed up exec

flush_thread doesn't need to do a full page table walk in order to clear the
address space.  It knows what the end result needs to be, so it can call unmap
directly.

This results in a 10-20% speedup in an exec from bash.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: fix umid in xterm titles
Davide Brini [Sun, 6 May 2007 21:51:16 +0000 (14:51 -0700)]
uml: fix umid in xterm titles

Calls lines_init() *after* xterm_title is modified to include umid.

Signed-off-by: Davide Brini <davide.brini@unibo.it>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: Replace one-element array with zero-element array
Paolo 'Blaisorblade' Giarrusso [Sun, 6 May 2007 21:51:15 +0000 (14:51 -0700)]
uml: Replace one-element array with zero-element array

To look at users I did:
$ find arch/um/ include/asm-um -name '*.[ch]'|xargs grep -r 'net_kern\.h'
+-l|xargs grep '\<user\>'

Most users just cast user to the appropriate pointer, the remaining ones are
fixed here.  In net_kern.c, I'm almost sure that save trick is not needed
anymore, but I've not verified it.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: Eliminate temporary buffer in eth_configure
Paolo 'Blaisorblade' Giarrusso [Sun, 6 May 2007 21:51:14 +0000 (14:51 -0700)]
uml: Eliminate temporary buffer in eth_configure

Avoid using the temporary buffer introduced by previous patch to hold the
device name.

Btw, avoid leaking device on an error path.  Other error paths may need
cleanup.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: improve checking and diagnostics of ethernet MACs
Paolo 'Blaisorblade' Giarrusso [Sun, 6 May 2007 21:51:13 +0000 (14:51 -0700)]
uml: improve checking and diagnostics of ethernet MACs

Improve checking and diagnostics for broadcast and multicast Ethernet MAC
addresses, and distinguish between those cases in output; also make sure the
device is assigned a MAC address valid only locally to avoid collisions.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoremove unused header file: arch/um/kernel/tt/include/mode_kern-tt.h
Robert P. J. Day [Sun, 6 May 2007 21:51:12 +0000 (14:51 -0700)]
remove unused header file: arch/um/kernel/tt/include/mode_kern-tt.h

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: add missing __init declarations
Jeff Dike [Sun, 6 May 2007 21:51:11 +0000 (14:51 -0700)]
uml: add missing __init declarations

The build started finding calls from non-init to init functions.  These are
just cases of init functions not being properly marked, so this patch fixes
that.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: remove user_util.h
Jeff Dike [Sun, 6 May 2007 21:51:10 +0000 (14:51 -0700)]
uml: remove user_util.h

user_util.h isn't needed any more, so delete it and remove all includes of it.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: move remaining useful contents of user_util.h
Jeff Dike [Sun, 6 May 2007 21:51:09 +0000 (14:51 -0700)]
uml: move remaining useful contents of user_util.h

Rescue the useful contents of the soon-to-be-gone user-util.h.

pty.c now gets ptsname from stdlib.h like it should have always done.

CATCH_EINTR is now in os.h, although perhaps all usage should be under
os-Linux at some point.

get_pty is also in os.h.

This patch restores the old definition of ARRAY_SIZE in user.h.  This file is
included only in userspace files, so there will be no conflict with the
kernel's new ARRAY_SIZE.  The copy of the kernel's ARRAY_SIZE and associated
infrastructure is now gone.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: create as-layout.h
Jeff Dike [Sun, 6 May 2007 21:51:08 +0000 (14:51 -0700)]
uml: create as-layout.h

This patch moves all the the symbols defined in um_arch.c, which are mostly
boundaries between different parts of the UML kernel address space, to a new
header, as-layout.h.  There are also a few things here which aren't really
related to address space layout, but which don't really have a better place to
go.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: create arch.h
Jeff Dike [Sun, 6 May 2007 21:51:07 +0000 (14:51 -0700)]
uml: create arch.h

This patch moves the declarations of the architecture hooks from user_util.h
to a new header, arch.c, and adds the necessary includes to files which need
those declarations.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: move SIGIO testing to sigio.c
Jeff Dike [Sun, 6 May 2007 21:51:06 +0000 (14:51 -0700)]
uml: move SIGIO testing to sigio.c

This patch narrows the sigio interface.  The boot-time SIGIO testing used to
be in start_up.c, which meant that pty_output_sigio and pty_close_sigio needed
to be global.  By moving that code here, those can become static and the
declarations moved from user_util.h.

os_check_bugs is also here because it only does the SIGIO checking.  If it
does more, it'll probably move back to start_up.c.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoARRAY_SIZE: check for type
Rusty Russell [Sun, 6 May 2007 21:51:05 +0000 (14:51 -0700)]
ARRAY_SIZE: check for type

We can use a gcc extension to ensure that ARRAY_SIZE() is handed an array,
not a pointer.  This is especially important when code is changed from a
fixed array to a pointer.  I assume the Intel compiler doesn't support
__builtin_types_compatible_p.

[jdike@addtoit.com: uml: update UML definition of ARRAY_SIZE]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: network interface hotplug error handling
Jeff Dike [Sun, 6 May 2007 21:51:04 +0000 (14:51 -0700)]
uml: network interface hotplug error handling

This fixes a number of problems associated with network interface hotplug.

The userspace initialization function can fail in some cases, but the
failure was never passed back to eth_configure, which proceeded with the
configuration.  This results in a zombie device that is present, but can't
work.  This is fixed by allowing the initialization routines to return an
error, which is checked, and the configuration aborted on failure.

eth_configure failed to check for many failures.  Even when it did check,
it didn't undo whatever initializations has already happened, so a present,
but partially initialized and non-working device could result.  It now
checks everything that can fail, and bails out, undoing whatever had been
done.

The return value of eth_configure was always ignored, so it is now just
void.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml-driver-formatting-fixes-fix
Andrew Morton [Sun, 6 May 2007 21:51:03 +0000 (14:51 -0700)]
uml-driver-formatting-fixes-fix

Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: driver formatting fixes
Jeff Dike [Sun, 6 May 2007 21:51:02 +0000 (14:51 -0700)]
uml: driver formatting fixes

Fix a bunch of formatting violations in the drivers:
return(n) -> return n
whitespace fixes
emacs formatting comment removal
breaking if(foo) return(n) into two lines

There are also a couple of errno use bugs:
using errno in a printk when the failure put errno into a local variable
saving errno after a printk, which can change it

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: handle block device hotplug errors
Jeff Dike [Sun, 6 May 2007 21:51:01 +0000 (14:51 -0700)]
uml: handle block device hotplug errors

If a disk fails to open, i.e.  its host file doesn't exist, it won't be
removable because the hot-unplug code checks the existence of its gendisk.
This won't exist because it is only allocated for successfully opened disks.
Thus, a typo on the command line can result in a unusable and unfixable disk.

This is fixed by freeing the gendisk if it's there, but not letting that
affect the removal.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: print coredump limits
Jeff Dike [Sun, 6 May 2007 21:51:00 +0000 (14:51 -0700)]
uml: print coredump limits

Print out core dump limits at boot time.  This is to allow core dumps
to be collected if something goes very wrong and to tell if a core
dump isn't going to happen because of a resource limit.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>