]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
14 years ago[S390] cio: fix quiesce state
Sebastian Ott [Mon, 7 Dec 2009 11:51:35 +0000 (12:51 +0100)]
[S390] cio: fix quiesce state

DEV_STATE_QUIESCE is used to stop all IO on a busy subchannel.
This patch fixes the following problems related to the QUIESCE
state:

* Fix a potential race condition which could occur when the
resulting state was DEV_STATE_OFFLINE.

* Add missing locking around cio_disable_subchannel,
ccw_device_cancel_halt_clear and the cdev's handler.

* Loop until we know for sure that the subchannel is disabled.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: add per device initialization status flag
Sebastian Ott [Mon, 7 Dec 2009 11:51:34 +0000 (12:51 +0100)]
[S390] cio: add per device initialization status flag

The function ccw_device_unregister has to ensure to remove
all references obtained by device_add and device_initialize.
Unfortunately it gets called for devices which are
1) uninitialized, 2) initialized but unregistered, and
3) registered devices. To distinguish 1) and 2) this patch
introduces a new flag "initialized", which is 1 as long as we
hold the initial device reference.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: remove registered flag from ccw_device_private
Sebastian Ott [Mon, 7 Dec 2009 11:51:33 +0000 (12:51 +0100)]
[S390] cio: remove registered flag from ccw_device_private

We used to maintain a "registered" flag in our ccw_device_private
structure. This patch removes the "registered" flag and converts
all users of it to device_is_registered which has the exact same
meaning.

Note: The usage the atomic operation test_and_clear_bit is replaced
by the non-atomic if (device_is_registered()) device_del(). This
will not do harm, since we serialize calls to ccw_device_unregister
with a single-threaded workqueue.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: make steal lock procedure more robust
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:32 +0000 (12:51 +0100)]
[S390] cio: make steal lock procedure more robust

An Unconditional Reserve + Release operation (steal lock) for a
boxed device may fail when encountering special error cases
(e.g. unit checks or path errors). Fix this by using the more
robust ccw_request infrastructure for performing the steal lock
CCW program.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: use sense-pgid operation for path verification
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:31 +0000 (12:51 +0100)]
[S390] cio: use sense-pgid operation for path verification

Set-pgid operations fail for some device types under z/VM for which
the hypervisor has already set the pgid. Also reserved devices or
changed pgids are not correctly recognized. Fix these problems by
using a combination of sense-pgid and set-pgid and by also accepting
pre-defined pgid settings.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: split PGID settings and status
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:30 +0000 (12:51 +0100)]
[S390] cio: split PGID settings and status

Split setting (driver wants feature enabled) and status (feature
setup was successful) for PGID related ccw device features so that
setup errors can be detected. Previously, incorrectly handled setup
errors could in rare cases lead to erratic I/O behavior and
permanently unusuable devices.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: remove intretry flag
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:29 +0000 (12:51 +0100)]
[S390] cio: remove intretry flag

After changing all internal I/O functions to use the newly introduced
ccw request infrastructure, retries are handled automatically after a
clear operation. Therefore remove the internal retry flag and
associated code.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: allow setting not-operational devices offline
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:28 +0000 (12:51 +0100)]
[S390] cio: allow setting not-operational devices offline

Accept a request for setting a not-operational device offline.
This way, users can remove devices from Linux which would otherwise
remain unusable until reboot.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: use ccw request infrastructure for pgid
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:27 +0000 (12:51 +0100)]
[S390] cio: use ccw request infrastructure for pgid

Use the newly introduced ccw request infrastructure to implement
pgid related operations: sense pgid, set pgid and disband pg.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: use ccw request infrastructure for sense id
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:26 +0000 (12:51 +0100)]
[S390] cio: use ccw request infrastructure for sense id

Use the newly introduced ccw request infrastructure to implement
the sense id operation.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: consistent infrastructure for internal I/O requests
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:25 +0000 (12:51 +0100)]
[S390] cio: consistent infrastructure for internal I/O requests

Reduce code duplication by introducing a central infrastructure to
perform an internal I/O operation on a CCW device.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: dont panic in non-fatal conditions
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:24 +0000 (12:51 +0100)]
[S390] cio: dont panic in non-fatal conditions

Remove the call to BUG() for situations which are unexpected
but do not cause actual problems.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: ensure proper locking during device recognition
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:23 +0000 (12:51 +0100)]
[S390] cio: ensure proper locking during device recognition

Device recognition needs to be started with the ccw device lock
held to prevent race conditions between I/O starting and interrupt
reception.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: handle error during path verification consistently
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:22 +0000 (12:51 +0100)]
[S390] cio: handle error during path verification consistently

Handle verification errors consistently through the existing
callback ccw_device_done to reduce cleanup code duplication.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: handle error during device recognition consistently
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:21 +0000 (12:51 +0100)]
[S390] cio: handle error during device recognition consistently

Remove the return code from ccw_device_recognition and handle
recognition errors through the existing callback
ccw_device_recog_done to reduce cleanup code duplication.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: inform user when online/offline processing fails
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:20 +0000 (12:51 +0100)]
[S390] cio: inform user when online/offline processing fails

Print a warning message in case a ccw device enters boxed or
not operational state during online/offline processing.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: introduce ccw device todos
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:19 +0000 (12:51 +0100)]
[S390] cio: introduce ccw device todos

Introduce a central mechanism for performing delayed ccw device work
to ensure that different types of work do not overwrite each other.
Prioritization ensures that the most important work is always
performed while less important tasks are either obsoleted or repeated
later.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: introduce subchannel todos
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:18 +0000 (12:51 +0100)]
[S390] cio: introduce subchannel todos

Ensure that current and future users of sch->work do not overwrite
each other by introducing a single mechanism for delayed subchannel
work.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: introduce parent-initiated device move
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:17 +0000 (12:51 +0100)]
[S390] cio: introduce parent-initiated device move

Change the initiative to update subchannel-ccw device associations
to the subchannel: when there is an indication that the internal
association no longer reflects the current hardware state, mark
each affected subchannel as requiring attention. Once processing
reaches a subchannel, determine the correct association for that
subchannel at that time and perform the necessary device_move
operations.

This change fixes problems with the previous approach which would
leave devices in an inconsistent state when a new hardware change
occurred while a device_move was already scheduled.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: fix repeat setting of cdev parent association
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:16 +0000 (12:51 +0100)]
[S390] cio: fix repeat setting of cdev parent association

sch_create_and_recog_new_device() associates a parent subchannel
with its ccw device child even though this is already done by
the subsequently called io_subchannel_recog(). Also make sure
io_subchannel_recog() sets the association under lock.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: fix double free in case of probe failure
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:15 +0000 (12:51 +0100)]
[S390] cio: fix double free in case of probe failure

io_subchannel_probe() frees memory for sch->private which is later
freed again when io_subchannel_remove() is called. Fix this problem
by removing the cleanup in io_subchannel_probe().

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] s390: clear high-order bits of registers after sam64
Hendrik Brueckner [Mon, 7 Dec 2009 11:44:42 +0000 (12:44 +0100)]
[S390] s390: clear high-order bits of registers after sam64

When the kernel is IPLed without the CLEAR option and switches
to 64-bit, the high-order half of the registers might contain
random values.  This can cause addressing exceptions and the
kernel enters an interrupt loop.

Initialize the high-order half of the general purpose registers
with zeros after switching to 64-bit mode.

Cc: <stable@kernel.org>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years agoblock: include linux/err.h to use ERR_PTR
Stephen Rothwell [Mon, 7 Dec 2009 08:29:39 +0000 (19:29 +1100)]
block: include linux/err.h to use ERR_PTR

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoMerge branch 'sa1100' into devel
Russell King [Sun, 6 Dec 2009 17:00:33 +0000 (17:00 +0000)]
Merge branch 'sa1100' into devel

14 years agoFix soc_common PCMCIA configuration
Russell King [Sun, 6 Dec 2009 16:58:50 +0000 (16:58 +0000)]
Fix soc_common PCMCIA configuration

Jonathan Cameron reports that building PCMCIA as modules doesn't work:

As module get a load of undefined symbols:
ERROR: "soc_pcmcia_request_irqs" [drivers/pcmcia/pxa2xx_stargate2.ko] undefined!
ERROR: "soc_pcmcia_free_irqs" [drivers/pcmcia/pxa2xx_stargate2.ko] undefined!
ERROR: "soc_pcmcia_enable_irqs" [drivers/pcmcia/pxa2xx_stargate2.ko] undefined!
ERROR: "soc_pcmcia_disable_irqs" [drivers/pcmcia/pxa2xx_stargate2.ko] undefined!
ERROR: "soc_pcmcia_add_one" [drivers/pcmcia/pxa2xx_base.ko] undefined!
ERROR: "soc_common_pcmcia_get_timing" [drivers/pcmcia/pxa2xx_base.ko] undefined!
ERROR: "soc_pcmcia_remove_one" [drivers/pcmcia/pxa2xx_base.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

This is because soc_common tries to be built-in, but it should be a module.
Allow soc_common to be a module.

Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMerge branch 'for-lak' of git://git.linuxtogo.org/home/thesing/collie into sa1100
Russell King [Sun, 6 Dec 2009 16:53:09 +0000 (16:53 +0000)]
Merge branch 'for-lak' of git://git.linuxtogo.org/home/thesing/collie into sa1100

14 years agoARM: 5827/1: SA1100: h3100/h3600: emit messages on failed gpio_request
Dmitry Artamonow [Fri, 27 Nov 2009 11:22:32 +0000 (12:22 +0100)]
ARM: 5827/1: SA1100: h3100/h3600: emit messages on failed gpio_request

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5826/1: SA1100: h3100/h3600: always build htc-egpio driver
Dmitry Artamonow [Fri, 27 Nov 2009 11:18:43 +0000 (12:18 +0100)]
ARM: 5826/1: SA1100: h3100/h3600: always build htc-egpio driver

Many features of h3100/h3600 (LCD, PCMCIA, Flash write, etc.)
depend on correct functioning of GPIO expander handled by htc-egpio
driver, so force its building in Kconfig.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5825/1: SA1100: h3600: update defconfig
Dmitry Artamonow [Fri, 27 Nov 2009 11:15:01 +0000 (12:15 +0100)]
ARM: 5825/1: SA1100: h3600: update defconfig

Update defconfig to current kernel, enable support for iPAQ H3100
and following drivers: gpio-keys, htc-egpio, ide_cs.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5824/1: SA1100: reuse h3600 PCMCIA driver on h3100
Dmitry Artamonow [Fri, 27 Nov 2009 11:13:47 +0000 (12:13 +0100)]
ARM: 5824/1: SA1100: reuse h3600 PCMCIA driver on h3100

Both iPAQs h3600 and h3100 share the same control
GPIOs for PCMCIA, so driver can be reused.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5823/1: SA1100: h3100/h3600: add support for gpio-keys
Dmitry Artamonow [Fri, 27 Nov 2009 11:13:01 +0000 (12:13 +0100)]
ARM: 5823/1: SA1100: h3100/h3600: add support for gpio-keys

Add support for "Power" and "Action" (joystick center) buttons -
the only buttons on iPaq h3100/h3600 connected to GPIOs
(other buttons are controlled by microcontroller)
Also remove setting PWER for wakeup on Power button press -
gpio-keys driver will handle it.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5822/1: SA1100: h3100/h3600: clean up #includes
Dmitry Artamonow [Fri, 27 Nov 2009 11:12:25 +0000 (12:12 +0100)]
ARM: 5822/1: SA1100: h3100/h3600: clean up #includes

After a code reorganization and following split, there's some #includes
now unused. Clean them up and sort remaining alphabetticaly where possible.

Compile tested.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5821/1: SA1100: h3100/h3600: revise copyright boilerplates
Dmitry Artamonow [Fri, 27 Nov 2009 11:11:48 +0000 (12:11 +0100)]
ARM: 5821/1: SA1100: h3100/h3600: revise copyright boilerplates

Correct boilerplates after files split. Also shorten them a bit - use
standart GPL wording (as per http://lkml.org/lkml/2007/5/1/220) and
drop changelog, which only entry about h3800 support and abstracted
EGPIOs is just confusing now, as both of these features are gone.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5820/1: SA1100: h3100/h3600: split h3600.c
Dmitry Artamonow [Fri, 27 Nov 2009 11:10:55 +0000 (12:10 +0100)]
ARM: 5820/1: SA1100: h3100/h3600: split h3600.c

Split common h3600.c into three separate files: h3100.c, h3600.c and
h3xxx.c (the latter contains common code for h3100/h3600)
Copyright boilerplates and #includes are copied intact and will be
cleaned up later.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5819/1: SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h
Dmitry Artamonow [Fri, 27 Nov 2009 11:09:25 +0000 (12:09 +0100)]
ARM: 5819/1: SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h

Combine both headers into one, rename to h3xxx.h and change all
users accordingly.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5818/1: SA1100: h3100/h3600: drop old GPIO definitions
Dmitry Artamonow [Fri, 27 Nov 2009 11:07:47 +0000 (12:07 +0100)]
ARM: 5818/1: SA1100: h3100/h3600: drop old GPIO definitions

As all existing code was converted to gpiolib, drop no more
used pre-gpiolib (bit-shifted) GPIO definintions.
Supply new gpiolib-friendly definitions for GPIOs which
don't have them yet.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5817/1: SA1100: h3100/h3600: configure all unused gpios as inputs
Dmitry Artamonow [Fri, 27 Nov 2009 11:07:11 +0000 (12:07 +0100)]
ARM: 5817/1: SA1100: h3100/h3600: configure all unused gpios as inputs

After conversion to gpiolib there's still some GPIOs left, that get
configured in *_mach_init() as outputs (using direct operations
on GPCR/GPDR registers), but otherwise unused. These GPIOs are mainly
sound related and should be configured by corresponding driver once
it is written.

Drop this initialisation and configure all GPIOs as input.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5816/1: SA1100: h3600: remove IRQ_GPIO_* definitions
Dmitry Artamonow [Fri, 27 Nov 2009 11:05:28 +0000 (12:05 +0100)]
ARM: 5816/1: SA1100: h3600: remove IRQ_GPIO_* definitions

As all the remaining users of these definitions
(in pcmcia/sa1100_h3600 driver) were converted to gpio_to_irq(),
they can be safely removed.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5815/1: SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers
Dmitry Artamonow [Fri, 27 Nov 2009 11:03:52 +0000 (12:03 +0100)]
ARM: 5815/1: SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers

As all users of assign_h3600_egpio now converted to gpiolib, we
can safely remove all assign_h3600_egpio handling code and
definitions.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5814/1: SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib
Dmitry Artamonow [Fri, 27 Nov 2009 11:02:28 +0000 (12:02 +0100)]
ARM: 5814/1: SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib

Use of gpio_request/gpio_free in some callbacks may look ugly, but
corresponding drivers (sa1100_serial and sa1100_fb) don't provide (yet)
init/exit hooks and registering these gpios in *_mach_init is also
not possible, because htc-gpio driver starts a bit later...

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5813/1: SA1100: h3100/h3600: add htc-egpio driver
Dmitry Artamonow [Fri, 27 Nov 2009 11:00:00 +0000 (12:00 +0100)]
ARM: 5813/1: SA1100: h3100/h3600: add htc-egpio driver

It will be used for future conversion of assign_h3600_egpio calls to
gpiolib.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5812/1: SA1100: h3100/h3600: separate machine-specific LCD helpers
Dmitry Artamonow [Fri, 27 Nov 2009 10:58:35 +0000 (11:58 +0100)]
ARM: 5812/1: SA1100: h3100/h3600: separate machine-specific LCD helpers

h3100 and h3600 have different sets of LCD-controlling gpios,
which mapped to the same "abstracted" EGPIO.
As we plan to get rid of those abstracted egpios completely, we
need to separate these helper functions.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5811/2: pcmcia: convert sa1100_h3600 driver to gpiolib
Dmitry Artamonow [Sun, 6 Dec 2009 16:12:49 +0000 (17:12 +0100)]
ARM: 5811/2: pcmcia: convert sa1100_h3600 driver to gpiolib

Convert all operations with GPLR/GPCR/GPSR to gpiolibs calls.
Also change all IRQ_GPIO* to gpio_to_irq(*GPIO*)

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5799/1: SA1100: h3600: stop setting direction for LCD pins
Dmitry Artamonow [Fri, 27 Nov 2009 10:11:00 +0000 (11:11 +0100)]
ARM: 5799/1: SA1100: h3600: stop setting direction for LCD pins

sa1100_fb driver handles this

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5798/1: SA1100: h3600: remove unused cruft from h3600.h
Dmitry Artamonow [Fri, 27 Nov 2009 10:10:59 +0000 (11:10 +0100)]
ARM: 5798/1: SA1100: h3600: remove unused cruft from h3600.h

PM_SUSPEND, PM_RESUME and machine_is_h3xxx() are not used anywhere in
kernel (checked with git grep), so it's safe to remove them.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5796/1: SA1100: h3600: remove IRDA bits from serial PM callback
Dmitry Artamonow [Fri, 27 Nov 2009 10:10:58 +0000 (11:10 +0100)]
ARM: 5796/1: SA1100: h3600: remove IRDA bits from serial PM callback

IRDA is handled by separate sa1100-ir driver and has
nothing to do with sa1100_serial

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5797/1: SA1100: h3100/h3600: remove dead links from Kconfig help text
Dmitry Artamonow [Fri, 27 Nov 2009 10:10:57 +0000 (11:10 +0100)]
ARM: 5797/1: SA1100: h3100/h3600: remove dead links from Kconfig help text

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5795/1: SA1100: h3100/h3600: mark *_mach_init functions as __init
Dmitry Artamonow [Fri, 27 Nov 2009 10:06:46 +0000 (11:06 +0100)]
ARM: 5795/1: SA1100: h3100/h3600: mark *_mach_init functions as __init

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: no need to set PWER_RTC
Russell King [Tue, 6 Oct 2009 15:40:24 +0000 (16:40 +0100)]
ARM: iPAQ: no need to set PWER_RTC

The rtc-sa1100 driver takes care of this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: move serial port support functions
Russell King [Tue, 6 Oct 2009 14:16:27 +0000 (15:16 +0100)]
ARM: iPAQ: move serial port support functions

No point calling sa1100_register_uart_fns early - these aren't
used until late in the boot sequence.  Also convert to gpiolib
support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: convert H3100 IrDA to use generic gpio support
Russell King [Tue, 6 Oct 2009 13:36:05 +0000 (14:36 +0100)]
ARM: iPAQ: convert H3100 IrDA to use generic gpio support

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: provide a way to setup platform-controlled GPIOs
Russell King [Tue, 6 Oct 2009 13:35:16 +0000 (14:35 +0100)]
ARM: iPAQ: provide a way to setup platform-controlled GPIOs

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: separate IrDA machine specifics
Russell King [Tue, 6 Oct 2009 13:22:23 +0000 (14:22 +0100)]
ARM: iPAQ: separate IrDA machine specifics

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: h3600: provide each iPAQ machine type with own init function
Russell King [Tue, 6 Oct 2009 13:19:44 +0000 (14:19 +0100)]
ARM: h3600: provide each iPAQ machine type with own init function

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: sa11x0: convert set_xxx_data() to register_xxx()
Russell King [Tue, 6 Oct 2009 13:55:53 +0000 (14:55 +0100)]
ARM: sa11x0: convert set_xxx_data() to register_xxx()

Only register devices if we have platform data for those which require
platform data.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoi2c-stub: Documentation update
Jean Delvare [Sun, 6 Dec 2009 16:06:30 +0000 (17:06 +0100)]
i2c-stub: Documentation update

There is nothing sensors-specific to i2c-stub.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c-stub: Allow user to disable some commands
Jean Delvare [Sun, 6 Dec 2009 16:06:29 +0000 (17:06 +0100)]
i2c-stub: Allow user to disable some commands

Add a module parameter to override the functionality bitfield. This
lets the user disable some commands. This can be used to force a chip
driver to take different code paths.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c-stub: Implement I2C block support
Jean Delvare [Sun, 6 Dec 2009 16:06:28 +0000 (17:06 +0100)]
i2c-stub: Implement I2C block support

This is required to test some drivers, for example at24.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Refactor for_each callbacks
Jean Delvare [Sun, 6 Dec 2009 16:06:27 +0000 (17:06 +0100)]
i2c: Refactor for_each callbacks

Functions i2c_do_add_adapter() and __attach_adapter() do essentially
the same thing, differing only in how the parameters are passed. Same
for i2c_do_add_adapter() and __detach_adapter(). Introduce wrappers to
normalize the parameters, so that we do not have to duplicate the
code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
14 years agoi2c-i801: Retry on lost arbitration
Jean Delvare [Sun, 6 Dec 2009 16:06:27 +0000 (17:06 +0100)]
i2c-i801: Retry on lost arbitration

The Intel 82801 is sometimes used on systems with a BMC connected. The
BMC can access the SMBus, resulting in lost arbitration for the 82801.
We should let i2c-core retry transactions for us in this case.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Remove big kernel lock from i2cdev_open
Vincent Sanders [Sun, 6 Dec 2009 16:06:26 +0000 (17:06 +0100)]
i2c: Remove big kernel lock from i2cdev_open

The BKL is held over a kmalloc so cannot protect anything beyond that.
The two calls before the kmalloc have their own locking.
Improve device open function by removing the now unnecessary ret variable

Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoics932s401: Clean up detect function
Jean Delvare [Sun, 6 Dec 2009 16:06:26 +0000 (17:06 +0100)]
ics932s401: Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: "Darrick J. Wong" <djwong@us.ibm.com>
14 years agoi2c: Simplify i2c_detect_address
Jean Delvare [Sun, 6 Dec 2009 16:06:25 +0000 (17:06 +0100)]
i2c: Simplify i2c_detect_address

The kind parameter of i2c_detect_address() always has value -1, so we
can get rid of it.

Next step is to update all i2c detect callback functions to get rid of
this now useless parameter.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Drop probe, ignore and force module parameters
Jean Delvare [Sun, 6 Dec 2009 16:06:24 +0000 (17:06 +0100)]
i2c: Drop probe, ignore and force module parameters

The legacy probe and force module parameters are obsolete now, the
same can be achieved using the new_device sysfs interface, which is
both more flexible and cheaper (it is implemented by i2c-core rather
than replicated in every driver module.)

The legacy ignore module parameters can be dropped as well. Ignoring
can be done by instantiating a "dummy" device at the problematic
address.

This is the first step of a huge cleanup to i2c-core's i2c_detect
function, i2c.h's I2C_CLIENT_INSMOD* macros, and all drivers that made
use of them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Add missing __devinit markers to old i2c adapter drivers
Jean Delvare [Sun, 6 Dec 2009 16:06:23 +0000 (17:06 +0100)]
i2c: Add missing __devinit markers to old i2c adapter drivers

These _setup functions are called from _probe so they can be marked
__devinit.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR
Jean Delvare [Sun, 6 Dec 2009 16:06:22 +0000 (17:06 +0100)]
i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR

I2C bus drivers don't have to support I2C_M_REV_DIR_ADDR. It is a
deviation from the I2C specification, which only makes sense to
implement when really needed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: Prevent priority inversion on top of bus lock
Mika Kuoppala [Sun, 6 Dec 2009 16:06:22 +0000 (17:06 +0100)]
i2c: Prevent priority inversion on top of bus lock

Low priority thread holding the i2c bus mutex could block higher
priority threads to access the bus resulting in unacceptable
latencies. Change the mutex type to rt_mutex preventing priority
inversion.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@nokia.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c-voodoo3: Delete
Jean Delvare [Sun, 6 Dec 2009 16:06:21 +0000 (17:06 +0100)]
i2c-voodoo3: Delete

Superseded by tdfxfb. I2C/DDC support used to live in a separate
driver but this caused driver conflicts.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
14 years agoi2c-powermac: Drop temporary name buffer
Jean Delvare [Sun, 6 Dec 2009 16:06:20 +0000 (17:06 +0100)]
i2c-powermac: Drop temporary name buffer

We no longer need to write the adapter name to a temporary buffer.
We can write it directly to the i2c_adapter's name field. This is
more efficient.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoi2c-powermac: Include the i2c_adapter in struct pmac_i2c_bus
Jean Delvare [Sun, 6 Dec 2009 16:06:19 +0000 (17:06 +0100)]
i2c-powermac: Include the i2c_adapter in struct pmac_i2c_bus

Include the i2c_adapter in struct pmac_i2c_bus. This avoids memory
fragmentation and allows for several code cleanups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoi2c-powermac: Log errors
Jean Delvare [Sun, 6 Dec 2009 16:06:18 +0000 (17:06 +0100)]
i2c-powermac: Log errors

Log errors when they happen, otherwise we have no idea what went
wrong.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoi2c-powermac: Refactor i2c_powermac_smbus_xfer
Jean Delvare [Sun, 6 Dec 2009 16:06:17 +0000 (17:06 +0100)]
i2c-powermac: Refactor i2c_powermac_smbus_xfer

I wanted to add some error logging to the i2c-powermac driver, but
found that it was very difficult due to the way the
i2c_powermac_smbus_xfer function is organized. Refactor the code in
this function so that each low-level function is only called once.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoi2c-powermac: Reject unsupported I2C transactions
Jean Delvare [Sun, 6 Dec 2009 16:06:17 +0000 (17:06 +0100)]
i2c-powermac: Reject unsupported I2C transactions

The i2c-powermac driver doesn't support arbitrary multi-message I2C
transactions, only SMBus ones. Make it clear by returning an error if
a multi-message I2C transaction is attempted. This is better than only
processing the first message, because most callers won't recover from
the short transaction. Anyone wishing to issue multi-message
transactions should use the SMBus API instead of the raw I2C API.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoi2c/chips: Move ds1682 to drivers/misc
Wolfram Sang [Sun, 6 Dec 2009 16:06:16 +0000 (17:06 +0100)]
i2c/chips: Move ds1682 to drivers/misc

As i2c/chips is deprecated, move ds1682 to a more apropriate location.
Build tested.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoPM: Add flag for devices capable of generating run-time wake-up events
Rafael J. Wysocki [Thu, 3 Dec 2009 20:19:18 +0000 (21:19 +0100)]
PM: Add flag for devices capable of generating run-time wake-up events

Apparently, there are devices that can wake up the system from sleep
states and yet are incapable of generating wake-up events at run
time.  Thus, introduce a flag indicating if given device is capable
of generating run-time wake-up events.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Runtime: Remove unnecessary braces in __pm_runtime_set_status()
Rafael J. Wysocki [Thu, 3 Dec 2009 20:04:41 +0000 (21:04 +0100)]
PM / Runtime: Remove unnecessary braces in __pm_runtime_set_status()

Some braces in __pm_runtime_set_status() are not necessary, so
remove them.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Runtime: Make documentation of runtime_idle() agree with the code
Rafael J. Wysocki [Thu, 3 Dec 2009 20:04:08 +0000 (21:04 +0100)]
PM / Runtime: Make documentation of runtime_idle() agree with the code

Currently the ->runtime_idle() callback is documented as having no
return value, but in fact it returns int.  Although its return value
is ignored at the PM core level, it may be used by bus type routines
executing the drivers' ->runtime_idle() callbacks.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
14 years agoPM / Runtime: Ensure timer_expires is nonzero in pm_schedule_suspend()
Rafael J. Wysocki [Thu, 3 Dec 2009 20:03:57 +0000 (21:03 +0100)]
PM / Runtime: Ensure timer_expires is nonzero in pm_schedule_suspend()

The runtime PM core code assumes that dev->power.timer_expires is
nonzero when the timer is scheduled, but it may become zero
incidentally in pm_schedule_suspend().  Prevent this from happening
by bumping dev->power.timer_expires up to 1 if it's 0 before calling
mod_timer().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
14 years agoPM / Runtime: Use deferred_resume flag in pm_request_resume
Alan Stern [Thu, 3 Dec 2009 19:22:34 +0000 (20:22 +0100)]
PM / Runtime: Use deferred_resume flag in pm_request_resume

This patch (as1307) adds a small optimization to
__pm_request_resume().  If the device is currently being suspended,
there's no need to queue a work routine to resume it.  Setting the
deferred_resume flag will suffice.  (There's also a minor improvement
to the function's code layout: An unnecessary "else" is removed.)

Also, the patch clarifies the usage of the deferred_resume flag.  It
is meaningful only while a suspend is in progress, so it should be
cleared just before a suspend starts, not just after one ends.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Runtime: Export the PM runtime workqueue
Alan Stern [Thu, 3 Dec 2009 19:22:21 +0000 (20:22 +0100)]
PM / Runtime: Export the PM runtime workqueue

This patch (as1306) exports the PM runtime workqueue for use by
loadable modules.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Runtime: Fix lockdep warning in __pm_runtime_set_status()
Rafael J. Wysocki [Thu, 3 Dec 2009 19:21:21 +0000 (20:21 +0100)]
PM / Runtime: Fix lockdep warning in __pm_runtime_set_status()

Lockdep complains about taking the parent lock in
__pm_runtime_set_status(), so mark it as nested.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@kernel.org
14 years agoPM / Hibernate: Swap, use KERN_CONT
Jiri Slaby [Sun, 6 Dec 2009 15:16:24 +0000 (16:16 +0100)]
PM / Hibernate: Swap, use KERN_CONT

Use KERN_CONT in save_image() for printks, so that anybody won't
try to add a loglevel.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Hibernate: Shift remaining code from swsusp.c to hibernate.c
Nigel Cunningham [Sun, 6 Dec 2009 15:16:07 +0000 (16:16 +0100)]
PM / Hibernate: Shift remaining code from swsusp.c to hibernate.c

Shift the remaining declaration of the variable in_suspend and the
function swsusp_show_speed from swsusp.c to hibernate.c, and delete
swsusp.c.

Signed-off-by: Nigel Cunningham <nigel@tuxonice.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Hibernate: Move swap functions to kernel/power/swap.c.
Nigel Cunningham [Sun, 6 Dec 2009 15:15:53 +0000 (16:15 +0100)]
PM / Hibernate: Move swap functions to kernel/power/swap.c.

Move hibernation code's functions for allocating and freeing swap
from swsusp.c to swap.c, which is where you'd expect to find them.

Signed-off-by: Nigel Cunningham <nigel@tuxonice.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoMerge branch 'master' into for-linus
Rafael J. Wysocki [Sun, 6 Dec 2009 15:06:11 +0000 (16:06 +0100)]
Merge branch 'master' into for-linus

14 years agom68k: parport_mfc3 - Not makes it a bool before the comparison.
Roel Kluin [Wed, 18 Nov 2009 22:54:12 +0000 (23:54 +0100)]
m68k: parport_mfc3 - Not makes it a bool before the comparison.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agom68k: don't export static inline functions
Stephen Rothwell [Sat, 14 Nov 2009 07:20:28 +0000 (18:20 +1100)]
m68k: don't export static inline functions

These now cause errors due to changes present in linux-next:

(__ksymtab_sorted+0x1258): undefined reference to `dio_dev_driver'
(__ksymtab_sorted+0x4d48): undefined reference to `zorro_dev_driver'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agofbdev: atafb - add palette register check
Krzysztof Helt [Sat, 24 Oct 2009 15:18:23 +0000 (17:18 +0200)]
fbdev: atafb - add palette register check

Add check if palette register number is in correct range
for few drivers which miss it. The regno value comes
indirectly from user space.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agom68k: Remove the BKL from sys_execve
John Kacur [Mon, 12 Oct 2009 21:09:24 +0000 (23:09 +0200)]
m68k: Remove the BKL from sys_execve

This seems like a copy-and-paste from code that no-longer needs the BKL
Just remove it.

Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agom68k: Cleanup linker scripts using new linker script macros.
Tim Abbott [Sun, 27 Sep 2009 17:57:55 +0000 (13:57 -0400)]
m68k: Cleanup linker scripts using new linker script macros.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Tested-by: Andreas Schwab <schwab@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agom68k: Make thread_info.h usable from assembly.
Tim Abbott [Wed, 16 Sep 2009 16:44:25 +0000 (12:44 -0400)]
m68k: Make thread_info.h usable from assembly.

[Geert] <asm/thread_info_mm.h> pulls in <asm/current.h>, which contains C only.
So the include must be moved inside #ifndef __ASSEMBLY__.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agom68knommu: define arch_has_single_step() and friends
Greg Ungerer [Tue, 7 Jul 2009 05:54:54 +0000 (15:54 +1000)]
m68knommu: define arch_has_single_step() and friends

Towards adding CONFIG_UTRACE support for non-mmu m68k add
arch_has_single_step, and its support functions user_enable_single_step()
and user_disable_single_step().
[Geert] m68k conflict resolution from linux-next

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agocfq-iosched: use call_rcu() instead of doing grace period stall on queue exit
Jens Axboe [Sun, 6 Dec 2009 08:54:19 +0000 (09:54 +0100)]
cfq-iosched: use call_rcu() instead of doing grace period stall on queue exit

After the merge of the IO controller patches, booting on my megaraid
box ran much slower. Vivek Goyal traced it down to megaraid discovery
creating tons of devices, each suffering a grace period when they later
kill that queue (if no device is found).

So lets use call_rcu() to batch these deferred frees, instead of taking
the grace period hit for each one.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agosparc: Set UTS_MACHINE correctly.
David S. Miller [Sun, 6 Dec 2009 01:17:55 +0000 (17:17 -0800)]
sparc: Set UTS_MACHINE correctly.

"ARCH" can be just about anything, so we shouldn't end up
with UTS_MACHINE of "sparc" in a 64-bit kernel build just
because someone set the personality using 'sparc32' or
similar.  CONFIG_SPARC64 drives the compilation and
therefore provides the definitive value, not "ARCH".

This mirrors commit 8c6531f7a99f29ba8817ffb12cc9ecf190049bd6
(x86: correctly set UTS_MACHINE for "make ARCH=x86")

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Dec 2009 23:33:27 +0000 (15:33 -0800)]
Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Limit number of per cpu TSC sync messages
  x86: dumpstack, 64-bit: Disable preemption when walking the IRQ/exception stacks
  x86: dumpstack: Clean up the x86_stack_ids[][] initalization and other details
  x86, cpu: mv display_cacheinfo -> cpu_detect_cache_sizes
  x86: Suppress stack overrun message for init_task
  x86: Fix cpu_devs[] initialization in early_cpu_init()
  x86: Remove CPU cache size output for non-Intel too
  x86: Minimise printk spew from per-vendor init code
  x86: Remove the CPU cache size printk's
  cpumask: Avoid cpumask_t in arch/x86/kernel/apic/nmi.c
  x86: Make sure we also print a Code: line for show_regs()

14 years agoMerge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Dec 2009 23:32:35 +0000 (15:32 -0800)]
Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, msr, cpumask: Use struct cpumask rather than the deprecated cpumask_t
  x86, cpuid: Simplify the code in cpuid_open
  x86, cpuid: Remove the bkl from cpuid_open()
  x86, msr: Remove the bkl from msr_open()
  x86: AMD Geode LX optimizations
  x86, msr: Unify rdmsr_on_cpus/wrmsr_on_cpus

14 years agoMerge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Dec 2009 23:32:18 +0000 (15:32 -0800)]
Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Fix a section mismatch in arch/x86/kernel/setup.c
  x86: Fixup last users of irq_chip->typename
  x86: Remove BKL from apm_32
  x86: Remove BKL from microcode
  x86: use kernel_stack_pointer() in kprobes.c
  x86: use kernel_stack_pointer() in kgdb.c
  x86: use kernel_stack_pointer() in dumpstack.c
  x86: use kernel_stack_pointer() in process_32.c

14 years agoMerge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Dec 2009 23:32:03 +0000 (15:32 -0800)]
Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  include/linux/compiler-gcc4.h: Fix build bug - gcc-4.0.2 doesn't understand __builtin_object_size
  x86/alternatives: No need for alternatives-asm.h to re-invent stuff already in asm.h
  x86/alternatives: Check replacementlen <= instrlen at build time
  x86, 64-bit: Set data segments to null after switching to 64-bit mode
  x86: Clean up the loadsegment() macro
  x86: Optimize loadsegment()
  x86: Add missing might_fault() checks to copy_{to,from}_user()
  x86-64: __copy_from_user_inatomic() adjustments
  x86: Remove unused thread_return label from switch_to()
  x86, 64-bit: Fix bstep_iret jump
  x86: Don't use the strict copy checks when branch profiling is in use
  x86, 64-bit: Move K8 B step iret fixup to fault entry asm
  x86: Generate cmpxchg build failures
  x86: Add a Kconfig option to turn the copy_from_user warnings into errors
  x86: Turn the copy_from_user check into an (optional) compile time warning
  x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy
  x86: Use __builtin_object_size() to validate the buffer size for copy_from_user()

14 years agoMerge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Dec 2009 23:31:25 +0000 (15:31 -0800)]
Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (30 commits)
  x86, apic: Enable lapic nmi watchdog on AMD Family 11h
  x86: Remove unnecessary mdelay() from cpu_disable_common()
  x86, ioapic: Document another case when level irq is seen as an edge
  x86, ioapic: Fix the EOI register detection mechanism
  x86, io-apic: Move the effort of clearing remoteIRR explicitly before migrating the irq
  x86: SGI UV: Map low MMR ranges
  x86: apic: Print out SRAT table APIC id in hex
  x86: Re-get cfg_new in case reuse/move irq_desc
  x86: apic: Remove not needed #ifdef
  x86: io-apic: IO-APIC MMIO should not fail on resource insertion
  x86: Remove asm/apicnum.h
  x86: apic: Do not use stacked physid_mask_t
  x86, apic: Get rid of apicid_to_cpu_present assign on 64-bit
  x86, ioapic: Use snrpintf while set names for IO-APIC resourses
  x86, apic: Use PAGE_SIZE instead of numbers
  x86: Remove local_irq_enable()/local_irq_disable() in fixup_irqs()
  x86: Use EOI register in io-apic on intel platforms
  x86: Force irq complete move during cpu offline
  x86: Remove move_cleanup_count from irq_cfg
  x86, intr-remap: Avoid irq_chip mask/unmask in fixup_irqs() for intr-remapping
  ...

14 years agoMerge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Dec 2009 23:30:49 +0000 (15:30 -0800)]
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (35 commits)
  sched, cputime: Introduce thread_group_times()
  sched, cputime: Cleanups related to task_times()
  Revert "sched, x86: Optimize branch hint in __switch_to()"
  sched: Fix isolcpus boot option
  sched: Revert 498657a478c60be092208422fefa9c7b248729c2
  sched, time: Define nsecs_to_jiffies()
  sched: Remove task_{u,s,g}time()
  sched: Introduce task_times() to replace task_{u,s}time() pair
  sched: Limit the number of scheduler debug messages
  sched.c: Call debug_show_all_locks() when dumping all tasks
  sched, x86: Optimize branch hint in __switch_to()
  sched: Optimize branch hint in context_switch()
  sched: Optimize branch hint in pick_next_task_fair()
  sched_feat_write(): Update ppos instead of file->f_pos
  sched: Sched_rt_periodic_timer vs cpu hotplug
  sched, kvm: Fix race condition involving sched_in_preempt_notifers
  sched: More generic WAKE_AFFINE vs select_idle_sibling()
  sched: Cleanup select_task_rq_fair()
  sched: Fix granularity of task_u/stime()
  sched: Fix/add missing update_rq_clock() calls
  ...