]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
14 years ago[S390] xpram: Remove checksum validation for suspend/resume
Michael Holzheu [Fri, 11 Sep 2009 08:28:50 +0000 (10:28 +0200)]
[S390] xpram: Remove checksum validation for suspend/resume

Currently in the suspend process checksums for the XPRAM partitions are
created and stored. During the resume process it is checked,
if the checksums are still the same. If this is not the case, a kernel panic
is triggered. Unfortunately this prevents XPRAM from beeing used as suspend
device, because in this case after the checksum has been created, the
memory image is written to XPRAM and therefore the contents of the suspend
partition is changed. In order to allow XPRAM to be used as suspend device,
this patch removes the checksum validation.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] vmur: Invalid allocation sequence for vmur class
Michael Holzheu [Fri, 11 Sep 2009 08:28:49 +0000 (10:28 +0200)]
[S390] vmur: Invalid allocation sequence for vmur class

The vmur class is allocated after the CCW driver is registered
and it is destroyed before the CCW driver is unregistered.
This is not the correct sequence, because the vmur class can be used
via driver core callbacks that are triggered during the CCW driver
deregistration. For Example:

1. vmur device is online
2. vmur module is unloaded

This leads to the following function call stack:

    <4> [<0000000000387286>] device_destroy+0x36/0x5c
    <4> [<000003e000209714>] ur_set_offline_force+0x9c/0x10c [vmur]
    <4> [<000003e00020a928>] ur_remove+0x64/0xbc [vmur]
    <4> [<00000000003e4d2e>] ccw_device_remove+0x42/0x1ac
    <4> [<000000000038a1aa>] __device_release_driver+0x9a/0xe4
    <4> [<000000000038a2da>] driver_detach+0xe6/0xec
    <4> [<0000000000388ee4>] bus_remove_driver+0xc0/0x108
    <4> [<000003e00020ad5a>] ur_exit+0x52/0x84 [vmur]

In device_destroy() the vmur class is used. Since it is already freed,
this can lead to a kernel panic.

To fix the problem, the vmur class has to be allocated before the CCW
driver is registered and destroyed after the CCW driver has ben unregistered.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] hypfs: remove useless variable qname
Vitaliy Gusev [Fri, 11 Sep 2009 08:28:48 +0000 (10:28 +0200)]
[S390] hypfs: remove useless variable qname

Local variable 'qname' in the function hypfs_create_file() really is not
used for any purpose.

Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Cc: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] add call home support
Hans-Joachim Picht [Fri, 11 Sep 2009 08:28:47 +0000 (10:28 +0200)]
[S390] add call home support

Signed-off-by: Hans-Joachim Picht <hans@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] remove unused irq_cpustat_t defintion
Christoph Hellwig [Fri, 11 Sep 2009 08:28:46 +0000 (10:28 +0200)]
[S390] remove unused irq_cpustat_t defintion

No need to defined a irq_cpustat_t type if __ARCH_IRQ_STAT is defined.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] kernel: always keep machine flags in lowcore
Heiko Carstens [Fri, 11 Sep 2009 08:28:45 +0000 (10:28 +0200)]
[S390] kernel: always keep machine flags in lowcore

Eleminate the local variable machine_flags and always change machine
flags directly in the lowcore.
This avoids confusion about when and why the two variables have to be
synchronized.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] clean up linker script using new linker script macros.
Nelson Elhage [Fri, 11 Sep 2009 08:28:44 +0000 (10:28 +0200)]
[S390] clean up linker script using new linker script macros.

Note that this patch moves .data.init_task inside _edata.  In
addition, the alignment of .init.ramfs changes: It is now PAGE_ALIGNED
and __initramfs_end is arbitrarily aligned; Previously it was
only aligned to a 0x100-byte boundary, and always ended on an even
byte.

This change results in fewer output sections and in some data being
reordered, but should have no functional effect.

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] Use macros for .data.page_aligned.
Tim Abbott [Fri, 11 Sep 2009 08:28:43 +0000 (10:28 +0200)]
[S390] Use macros for .data.page_aligned.

.data.page_aligned should not need a separate output section, so as
part of this cleanup I moved into the .data output section in the
linker scripts in order to eliminate unnecessary references to the
section name.

Remove the reference to .data.idt, since nothing is put into the
.data.idt section on the s390 architecture.  It looks like Cyrill
Gorcunov posted a patch to remove the .data.idt code on s390
previously:

<http://lkml.indiana.edu/hypermail/linux/kernel/0802.2/2536.html>

CCing him and the people who acked that patch in case there's a reason
it wasn't applied.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] move (io|sysc)_restore_trace_psw into .data section
Hendrik Brueckner [Fri, 11 Sep 2009 08:28:42 +0000 (10:28 +0200)]
[S390] move (io|sysc)_restore_trace_psw into .data section

The sysc_restore_trace_psw and io_restore_trace_psw storage locations
are created in the .text section. When creating and IPLing from a named
saved system (NSS), writing to these locations causes a protection exception
(because the .text section is mapped as shared read-only in the NSS).

To permit write access, move the storage locations into the .data section.

The problem occurs only when CONFIG_TRACE_IRQFLAGS is set.
The git commmit that has introduced these variables is:
411788ea7fca01ee803af8225ac35807b4d02050

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] kernel: Convert upper case scpdata to lower case
Hendrik Brueckner [Fri, 11 Sep 2009 08:28:41 +0000 (10:28 +0200)]
[S390] kernel: Convert upper case scpdata to lower case

If the CP SET LOADDEV on the 3215 console has been used to specify
SCPdata, all data is converted to upper case letters.

When scpdata contains upper case letters only, convert all letters
to lower case.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] kernel: Append scpdata to kernel boot command line
Hendrik Brueckner [Fri, 11 Sep 2009 08:28:40 +0000 (10:28 +0200)]
[S390] kernel: Append scpdata to kernel boot command line

Append scpdata to the kernel boot command line. If scpdata starts
with the equal sign (=), the kernel boot command line is replaced.
(For consistency with zIPL and IPL PARM parameters.)

To use scpdata for the kernel boot command line, scpdata must consist
of ascii characters only. If scpdata contains other characters,
scpdata is not appended to the kernel boot command line.
In addition, re-IPL is extended for setting scpdata for the next
Linux reboot.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] tape: use init_timer_on_stack() rather than init_timer()
Frank Munzert [Fri, 11 Sep 2009 08:28:39 +0000 (10:28 +0200)]
[S390] tape: use init_timer_on_stack() rather than init_timer()

With CONFIG_DEBUG_OBJECTS_TIMERS=y "chccwdev --online" for a tape device
will fail with message "ODEBUG: object is on stack, but not annotated".
We now use init_timer_on_stack.

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] proper use of device register
Sebastian Ott [Fri, 11 Sep 2009 08:28:38 +0000 (10:28 +0200)]
[S390] proper use of device register

Don't use kfree directly after device registration started.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] hibernation: merge files and move to kernel/
Heiko Carstens [Fri, 11 Sep 2009 08:28:37 +0000 (10:28 +0200)]
[S390] hibernation: merge files and move to kernel/

Merge the nearly empty C files and move everything from power/ to
kernel/. That way the files are easier to handle.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] hibernation: remove dead file
Heiko Carstens [Fri, 11 Sep 2009 08:28:36 +0000 (10:28 +0200)]
[S390] hibernation: remove dead file

There is no caller of do_after_copyback() anywhere. Remove it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] atomic ops: small cleanups
Heiko Carstens [Fri, 11 Sep 2009 08:28:35 +0000 (10:28 +0200)]
[S390] atomic ops: small cleanups

Couple of coding style fixes, replace __inline__ with inline and
remove #ifdef __KERNEL_- since the header file isn't exported.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] atomic ops: add effecient atomic64 support for 31 bit
Heiko Carstens [Fri, 11 Sep 2009 08:28:34 +0000 (10:28 +0200)]
[S390] atomic ops: add effecient atomic64 support for 31 bit

Use compare double and swap to implement efficient atomic64 ops for 31 bit.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] improve mcount code
Martin Schwidefsky [Fri, 11 Sep 2009 08:28:33 +0000 (10:28 +0200)]
[S390] improve mcount code

Move the 64 bit mount code from mcount.S into mcount64.S and avoid
code duplication.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] convert/optimize csum_fold() to C
Heiko Carstens [Fri, 11 Sep 2009 08:28:32 +0000 (10:28 +0200)]
[S390] convert/optimize csum_fold() to C

In the meantime gcc generates better code than the old inline
assemblies do. Original inline assembly results in:

lr %r1,%r2
sr %r3,%r3
lr %r2,%r1
srdl %r2,16
alr %r2,%r3
alr %r1,%r2
srl %r1,16
xilf %r1,65535
llghr %r2,%r1
br %r14

Out of the C code gcc generates this:

rll %r1,%r2,16
ar %r1,%r2
srl %r1,16
xilf %r1,65535
llghr %r2,%r1
br %r14

In addition we don't have any static register allocations anymore and
gcc is free to shuffle instructions around for better pipeline usage.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] introduce get_clock_monotonic
Heiko Carstens [Fri, 11 Sep 2009 08:28:31 +0000 (10:28 +0200)]
[S390] introduce get_clock_monotonic

Introduce get_clock_monotonic() function which can be used to get a
(fast) timestamp. Resolution is the same as for get_clock(). The
only difference is that the timestamps are monotonic and don't jump
backward or forward.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: fix message naming
Stefan Haberland [Fri, 11 Sep 2009 08:28:30 +0000 (10:28 +0200)]
[S390] dasd: fix message naming

This patch fixes message naming so that generic dasd messages do not
contain the device discipline. For this purpose the dev_ makros are
replaced by pr_ makros for generic dasd messages.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: optimize cpu usage in goodcase
Stefan Haberland [Fri, 11 Sep 2009 08:28:29 +0000 (10:28 +0200)]
[S390] dasd: optimize cpu usage in goodcase

remove unnecessary dbf call, remove string operations for magic

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: fail requests when device state is less then ready
Stefan Weinhuber [Fri, 11 Sep 2009 08:28:28 +0000 (10:28 +0200)]
[S390] dasd: fail requests when device state is less then ready

A DASD device that is not ready or online has no defined disk layout,
so all requests that arrive in such a state need to be returned as
failed.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: remove ccw_device init_name
Sebastian Ott [Fri, 11 Sep 2009 08:28:27 +0000 (10:28 +0200)]
[S390] cio: remove ccw_device init_name

We used the init_name to set the console ccw_device's name early
at the boot stage. This patch moves the name setting (for all ccw
devices) to the point where we actually register the device. At this
time we can do dynamic allocations and therefore use dev_set_name.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: move final put_device to ccw_device_unregister
Sebastian Ott [Fri, 11 Sep 2009 08:28:26 +0000 (10:28 +0200)]
[S390] cio: move final put_device to ccw_device_unregister

We use a test_and_clear_bit to prevent a device from being
unregistered twice. Unfortunately in this cases the "final"
put_device (from device_initialize) was issued more than once,
resulting in an use after free error. Fix this by moving this
put_device to ccw_device_unregister.

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 subchannel init_name
Sebastian Ott [Fri, 11 Sep 2009 08:28:25 +0000 (10:28 +0200)]
[S390] cio: remove subchannel init_name

We used the init_name to set the console subchannels name early
at the boot stage. With the patch cio: fix memleak in subchannel validation
we moved the name setting to the point where we actually register the
console subchannel. At this time we can do dynamic allocations and therefore
use dev_set_name.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: fix memleak in subchannel validation
Sebastian Ott [Fri, 11 Sep 2009 08:28:24 +0000 (10:28 +0200)]
[S390] cio: fix memleak in subchannel validation

When scanning for new subchannels we have a code path where we allocate
memory for a struct subchannel, set the device name (which is dynamically
allocated now) and do a check if the underlying device is blacklisted - if
so we free the subchannel structure.
Since we have not set up refcounting at this stage, the device name's memory
is lost. Fix this by moving the dev_set_name after the blacklist test.

Note: With this patch the init_name for the console subchannel becomes
virtually obsolete.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: fix use after free in s390 debug feature
Sebastian Ott [Fri, 11 Sep 2009 08:28:23 +0000 (10:28 +0200)]
[S390] cio: fix use after free in s390 debug feature

When using s390dbf with "%s" in sprintf format strings the string itself
is not copied to the dbf buffer.
Since in this case only pointers are stored in the s390dbf, we should
not use dev_name - which is bound to the lifetime of the device.
Reading this entry from s390dbf after the device was released will cause
an use after free error.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] qdio: remove limited number of debugfs entries
Jan Glauber [Fri, 11 Sep 2009 08:28:22 +0000 (10:28 +0200)]
[S390] qdio: remove limited number of debugfs entries

The number of qdio debugfs entries was limited. Remove this limit
and group the queue files in a per device directory.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: failing set online/offline processing.
Michael Ernst [Fri, 11 Sep 2009 08:28:21 +0000 (10:28 +0200)]
[S390] cio: failing set online/offline processing.

When unit checks trigger sensing the device state is set to W4SENSE
until sense completion; then the device state is set back to
ONLINE. If a unit check occurs while set online or set offline
requests are processed then it might happen that the device's
temporary W4SENSE state causes these functions to terminate,
leaving the device in an inconsistent state when the state is set
back to ONLINE later on so that the device cannot be set online or
offline any longer.
To solve this, set online/offline and related rollback or error
routines are processed only if the device is in a final or
DISCONNECTED state.

Signed-off-by: Michael Ernst <mernst@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: ensure to hold a reference for deferred deregistration
Sebastian Ott [Fri, 11 Sep 2009 08:28:20 +0000 (10:28 +0200)]
[S390] cio: ensure to hold a reference for deferred deregistration

Ensure to always hold an extra device reference for scheduling a
subchannel deregistration, by moving the get_device to
ccw_device_schedule_sch_unregister. This fixes an use after free
error in ccw_device_call_sch_unregister where put_device was called
on an already freed device structure.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] qdio: continue polling if the queue is not finished
Jan Glauber [Fri, 11 Sep 2009 08:28:19 +0000 (10:28 +0200)]
[S390] qdio: continue polling if the queue is not finished

With commit c38f96080955854e54df9cb392bc674e1ae330e1 polling was
stopped for the queue even if new data is available.

Return immediately after scheduling the queue tasklet if the queue
is not done.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: increase trace level
Sebastian Ott [Fri, 11 Sep 2009 08:28:18 +0000 (10:28 +0200)]
[S390] cio: increase trace level

Move debug traces for start I/O and interrupt events to exclusive
trace levels. Also change tracing in hot-path from sprintf (costly)
to hex.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: fix not oper handling after failed [on|off]line processing
Sebastian Ott [Fri, 11 Sep 2009 08:28:17 +0000 (10:28 +0200)]
[S390] cio: fix not oper handling after failed [on|off]line processing

If online/offline processing of a ccw device fails, resulting in not
operational state, notify the driver and unregister the device in case
the driver dosn't want to keep it.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: consolidate subchannel intparm reset
Peter Oberparleiter [Fri, 11 Sep 2009 08:28:16 +0000 (10:28 +0200)]
[S390] cio: consolidate subchannel intparm reset

Ensure that the hardware interruption parameter for a subchannel is
reset when the associated subchannel data structure is freed.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: move scsw helper functions to header file
Heiko Carstens [Fri, 11 Sep 2009 08:28:15 +0000 (10:28 +0200)]
[S390] cio: move scsw helper functions to header file

All scsw helper functions are very short and usage of them shouldn't
result in function calls. Therefore we move them to a separate header
file.
Also saves a lot of EXPORT_SYMBOLs.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] cio: fix ineffective verify event
Peter Oberparleiter [Fri, 11 Sep 2009 08:28:14 +0000 (10:28 +0200)]
[S390] cio: fix ineffective verify event

Path verification events occurring for offline devices are currently
ignored. As a result, offline devices are not removed, even though
they might no longer be accessible (for example because the last path
to the device was varied offline). Fix this by scheduling a status
evaluation for the affected subchannel when a path verification event
occurs.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years agowriteback: check for registered bdi in flusher add and inode dirty
Jens Axboe [Wed, 9 Sep 2009 07:10:25 +0000 (09:10 +0200)]
writeback: check for registered bdi in flusher add and inode dirty

Also a debugging aid. We want to catch dirty inodes being added to
backing devices that don't do writeback.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agowriteback: add name to backing_dev_info
Jens Axboe [Fri, 12 Jun 2009 12:45:52 +0000 (14:45 +0200)]
writeback: add name to backing_dev_info

This enables us to track who does what and print info. Its main use
is catching dirty inodes on the default_backing_dev_info, so we can
fix that up.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agowriteback: add some debug inode list counters to bdi stats
Jens Axboe [Mon, 25 May 2009 07:08:21 +0000 (09:08 +0200)]
writeback: add some debug inode list counters to bdi stats

Add some debug entries to be able to inspect the internal state of
the writeback details.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agowriteback: get rid of pdflush completely
Jens Axboe [Mon, 18 May 2009 06:20:32 +0000 (08:20 +0200)]
writeback: get rid of pdflush completely

It is now unused, so kill it off.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agowriteback: switch to per-bdi threads for flushing data
Jens Axboe [Wed, 9 Sep 2009 07:08:54 +0000 (09:08 +0200)]
writeback: switch to per-bdi threads for flushing data

This gets rid of pdflush for bdi writeout and kupdated style cleaning.
pdflush writeout suffers from lack of locality and also requires more
threads to handle the same workload, since it has to work in a
non-blocking fashion against each queue. This also introduces lumpy
behaviour and potential request starvation, since pdflush can be starved
for queue access if others are accessing it. A sample ffsb workload that
does random writes to files is about 8% faster here on a simple SATA drive
during the benchmark phase. File layout also seems a LOT more smooth in
vmstat:

 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 0  1      0 608848   2652 375372    0    0     0 71024  604    24  1 10 48 42
 0  1      0 549644   2712 433736    0    0     0 60692  505    27  1  8 48 44
 1  0      0 476928   2784 505192    0    0     4 29540  553    24  0  9 53 37
 0  1      0 457972   2808 524008    0    0     0 54876  331    16  0  4 38 58
 0  1      0 366128   2928 614284    0    0     4 92168  710    58  0 13 53 34
 0  1      0 295092   3000 684140    0    0     0 62924  572    23  0  9 53 37
 0  1      0 236592   3064 741704    0    0     4 58256  523    17  0  8 48 44
 0  1      0 165608   3132 811464    0    0     0 57460  560    21  0  8 54 38
 0  1      0 102952   3200 873164    0    0     4 74748  540    29  1 10 48 41
 0  1      0  48604   3252 926472    0    0     0 53248  469    29  0  7 47 45

where vanilla tends to fluctuate a lot in the creation phase:

 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 1  1      0 678716   5792 303380    0    0     0 74064  565    50  1 11 52 36
 1  0      0 662488   5864 319396    0    0     4   352  302   329  0  2 47 51
 0  1      0 599312   5924 381468    0    0     0 78164  516    55  0  9 51 40
 0  1      0 519952   6008 459516    0    0     4 78156  622    56  1 11 52 37
 1  1      0 436640   6092 541632    0    0     0 82244  622    54  0 11 48 41
 0  1      0 436640   6092 541660    0    0     0     8  152    39  0  0 51 49
 0  1      0 332224   6200 644252    0    0     4 102800  728    46  1 13 49 36
 1  0      0 274492   6260 701056    0    0     4 12328  459    49  0  7 50 43
 0  1      0 211220   6324 763356    0    0     0 106940  515    37  1 10 51 39
 1  0      0 160412   6376 813468    0    0     0  8224  415    43  0  6 49 45
 1  1      0  85980   6452 886556    0    0     4 113516  575    39  1 11 54 34
 0  2      0  85968   6452 886620    0    0     0  1640  158   211  0  0 46 54

A 10 disk test with btrfs performs 26% faster with per-bdi flushing. A
SSD based writeback test on XFS performs over 20% better as well, with
the throughput being very stable around 1GB/sec, where pdflush only
manages 750MB/sec and fluctuates wildly while doing so. Random buffered
writes to many files behave a lot better as well, as does random mmap'ed
writes.

A separate thread is added to sync the super blocks. In the long term,
adding sync_supers_bdi() functionality could get rid of this thread again.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agowriteback: move dirty inodes from super_block to backing_dev_info
Jens Axboe [Wed, 2 Sep 2009 07:19:46 +0000 (09:19 +0200)]
writeback: move dirty inodes from super_block to backing_dev_info

This is a first step at introducing per-bdi flusher threads. We should
have no change in behaviour, although sb_has_dirty_inodes() is now
ridiculously expensive, as there's no easy way to answer that question.
Not a huge problem, since it'll be deleted in subsequent patches.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agowriteback: get rid of generic_sync_sb_inodes() export
Jens Axboe [Wed, 2 Sep 2009 10:34:32 +0000 (12:34 +0200)]
writeback: get rid of generic_sync_sb_inodes() export

This adds two new exported functions:

- writeback_inodes_sb(), which only attempts to writeback dirty inodes on
  this super_block, for WB_SYNC_NONE writeout.
- sync_inodes_sb(), which writes out all dirty inodes on this super_block
  and also waits for the IO to complete.

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agopata_rz1000: use printk_once
Marcin Slusarz [Sun, 23 Aug 2009 18:23:34 +0000 (20:23 +0200)]
pata_rz1000: use printk_once

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoahci: kill @force_restart and refine CLO for ahci_kick_engine()
Shane Huang [Fri, 7 Aug 2009 07:05:52 +0000 (15:05 +0800)]
ahci: kill @force_restart and refine CLO for ahci_kick_engine()

This patch refines ahci_kick_engine() after discussion with Tejun about
FBS(FIS-based switching) support preparation:
a. Kill @force_restart and always kick the engine. The only case where
   @force_restart is zero is when it's called from ahci_p5wdh_hardreset()
   Actually at that point, BSY is pretty much guaranteed to be set.
b. If PMP is attached, ignore busy and always do CLO. (AHCI-1.3 9.2)

Signed-off-by: Shane Huang <shane.huang@amd.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_cs5535: add pci id for AMD based CS5535 controllers
Otavio Salvador [Fri, 3 Jul 2009 14:22:42 +0000 (11:22 -0300)]
pata_cs5535: add pci id for AMD based CS5535 controllers

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoahci: Add AMD SB900 SATA/IDE controller device IDs
Shane Huang [Wed, 29 Jul 2009 03:34:49 +0000 (11:34 +0800)]
ahci: Add AMD SB900 SATA/IDE controller device IDs

Add AMD SB900 SATA/IDE controller device IDs.

Signed-off-by: Shane Huang <shane.huang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agodrivers/ata: use resource_size
Julia Lawall [Thu, 6 Aug 2009 23:05:08 +0000 (16:05 -0700)]
drivers/ata: use resource_size

Use the function resource_size, which reduces the chance of introducing
off-by-one errors in calculating the resource size.

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

// <smpl>
@@
struct resource *res;
@@

- (res->end - res->start) + 1
+ resource_size(res)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoMerge branch 'mad' into for-linus
Roland Dreier [Fri, 11 Sep 2009 04:19:45 +0000 (21:19 -0700)]
Merge branch 'mad' into for-linus

Conflicts:
drivers/infiniband/core/mad.c

14 years agoMerge branches 'cxgb3', 'ehca', 'ipath', 'ipoib', 'misc', 'mlx4', 'mthca' and 'nes...
Roland Dreier [Fri, 11 Sep 2009 04:18:07 +0000 (21:18 -0700)]
Merge branches 'cxgb3', 'ehca', 'ipath', 'ipoib', 'misc', 'mlx4', 'mthca' and 'nes' into for-linus

14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Fri, 11 Sep 2009 01:17:09 +0000 (18:17 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6

14 years agox86: Fix code patching for paravirt-alternatives on 486
Ben Hutchings [Thu, 10 Sep 2009 01:53:50 +0000 (02:53 +0100)]
x86: Fix code patching for paravirt-alternatives on 486

As reported in <http://bugs.debian.org/511703> and
<http://bugs.debian.org/515982>, kernels with paravirt-alternatives
enabled crash in text_poke_early() on at least some 486-class
processors.

The problem is that text_poke_early() itself uses inline functions
affected by paravirt-alternatives and so will modify instructions that
have already been prefetched.  Pentium and later processors will
invalidate the prefetched instructions in this case, but 486-class
processors do not.

Change sync_core() to limit prefetching on 486-class (and 386-class)
processors, and move the call to sync_core() above the call to the
modifiable local_irq_restore().

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
LKML-Reference: <1252547631.3423.134.camel@localhost>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agoMerge branch 'next' into for-linus
James Morris [Thu, 10 Sep 2009 22:04:49 +0000 (08:04 +1000)]
Merge branch 'next' into for-linus

14 years agomd: Fix "strchr" [drivers/md/dm-log-userspace.ko] undefined!
Geert Uytterhoeven [Thu, 10 Sep 2009 21:13:28 +0000 (23:13 +0200)]
md: Fix "strchr" [drivers/md/dm-log-userspace.ko] undefined!

Commit b8313b6da7e2e7c7f47d93d8561969a3ff9ba0ea ("dm log: remove incorrect
field from userspace table output") added a call to strstr() with a
single-character "needle" string parameter.

Unfortunately some versions of gcc replace such calls to strstr() by calls
to strchr() behind our back.  This causes linking errors if strchr() is
defined as an inline function in <asm/string.h> (e.g. on m68k):

| WARNING: "strchr" [drivers/md/dm-log-userspace.ko] undefined!

Avoid this by explicitly calling strchr() instead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosched: Fix sched::sched_stat_wait tracepoint field
Ingo Molnar [Thu, 10 Sep 2009 18:52:09 +0000 (20:52 +0200)]
sched: Fix sched::sched_stat_wait tracepoint field

This weird perf trace output:

  cc1-9943  [001]  2802.059479616: sched_stat_wait: task: as:9944 wait: 2801938766276 [ns]

Is caused by setting one component field of the delta to zero
a bit too early. Move it to later.

( Note, this does not affect the NEW_FAIR_SLEEPERS interactivity bug,
  it's just a reporting bug in essence. )

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Nikos Chantziaras <realnc@arcor.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <4AA93D34.8040500@arcor.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86: split __phys_addr out into separate file
Jeremy Fitzhardinge [Thu, 10 Sep 2009 17:09:38 +0000 (10:09 -0700)]
x86: split __phys_addr out into separate file

Split __phys_addr out into its own file so we can disable
-fstack-protector in a fine-grained fashion.  Also it doesn't
have terribly much to do with the rest of ioremap.c.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
14 years agosched: Disable NEW_FAIR_SLEEPERS for now
Ingo Molnar [Thu, 10 Sep 2009 18:34:48 +0000 (20:34 +0200)]
sched: Disable NEW_FAIR_SLEEPERS for now

Nikos Chantziaras and Jens Axboe reported that turning off
NEW_FAIR_SLEEPERS improves desktop interactivity visibly.

Nikos described his experiences the following way:

  " With this setting, I can do "nice -n 19 make -j20" and
    still have a very smooth desktop and watch a movie at
    the same time.  Various other annoyances (like the
    "logout/shutdown/restart" dialog of KDE not appearing
    at all until the background fade-out effect has finished)
    are also gone.  So this seems to be the single most
    important setting that vastly improves desktop behavior,
    at least here. "

Jens described it the following way, referring to a 10-seconds
xmodmap scheduling delay he was trying to debug:

  " Then I tried switching NO_NEW_FAIR_SLEEPERS on, and then
    I get:

    Performance counter stats for 'xmodmap .xmodmap-carl':

         9.009137  task-clock-msecs         #      0.447 CPUs
               18  context-switches         #      0.002 M/sec
                1  CPU-migrations           #      0.000 M/sec
              315  page-faults              #      0.035 M/sec

    0.020167093  seconds time elapsed

    Woot! "

So disable it for now. In perf trace output i can see weird
delta timestamps:

  cc1-9943  [001]  2802.059479616: sched_stat_wait: task: as:9944 wait: 2801938766276 [ns]

That nsec field is not supposed to be that large. More digging
is needed - but lets turn it off while the real bug is found.

Reported-by: Nikos Chantziaras <realnc@arcor.de>
Tested-by: Nikos Chantziaras <realnc@arcor.de>
Reported-by: Jens Axboe <jens.axboe@oracle.com>
Tested-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <4AA93D34.8040500@arcor.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosparc64: Initial niagara2 perf counter support.
David S. Miller [Thu, 10 Sep 2009 14:22:18 +0000 (07:22 -0700)]
sparc64: Initial niagara2 perf counter support.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Perf counter 'nop' event is not constant.
David S. Miller [Thu, 10 Sep 2009 14:13:26 +0000 (07:13 -0700)]
sparc64: Perf counter 'nop' event is not constant.

On Niagara-2, for example, it's going to be different.  So make
it something specified in sparc_pmu.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Provide a way to specify a perf counter overflow IRQ enable bit.
David S. Miller [Thu, 10 Sep 2009 14:10:59 +0000 (07:10 -0700)]
sparc64: Provide a way to specify a perf counter overflow IRQ enable bit.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Provide hypervisor tracing bit support for perf counters.
David S. Miller [Thu, 10 Sep 2009 14:09:06 +0000 (07:09 -0700)]
sparc64: Provide hypervisor tracing bit support for perf counters.

A PMU need only specify which bit in the PCR enabled hypervisor
tracing in order to enable this.

This will be used in Niagara-2 perf counter support.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'topic/ymfpci' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:33:09 +0000 (15:33 +0200)]
Merge branch 'topic/ymfpci' into for-linus

* topic/ymfpci:
  sound: ymfpci: increase timer resolution to 96 kHz

14 years agoMerge branch 'topic/usb-audio' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:33:07 +0000 (15:33 +0200)]
Merge branch 'topic/usb-audio' into for-linus

* topic/usb-audio:
  ALSA: usb-audio - Fix types taken in min()
  sound: usb-audio: do not make URBs longer than sync packet interval
  sound: usb-audio: add MIDI drain callback
  sound: usb-audio: use multiple output URBs
  sound: usb-audio: use multiple input URBs
  sound: usb-audio: Xonar U1 digital output support

14 years agoMerge branch 'topic/tlv-minmax' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:33:06 +0000 (15:33 +0200)]
Merge branch 'topic/tlv-minmax' into for-linus

* topic/tlv-minmax:
  ALSA: usb-audio - Correct bogus volume dB information
  ALSA: usb-audio - Use the new TLV_DB_MINMAX type
  ALSA: Add new TLV types for dBwith min/max

14 years agoMerge branch 'topic/soundcore-preclaim' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:33:04 +0000 (15:33 +0200)]
Merge branch 'topic/soundcore-preclaim' into for-linus

* topic/soundcore-preclaim:
  sound: make OSS device number claiming optional and schedule its removal
  sound: request char-major-* module aliases for missing OSS devices
  chrdev: implement __[un]register_chrdev()

14 years agoMerge branch 'topic/snd-printk' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:33:03 +0000 (15:33 +0200)]
Merge branch 'topic/snd-printk' into for-linus

* topic/snd-printk:
  ALSA: Fixed a typo of printk()
  ALSA: Add debug module option
  ALSA: core - strip too long file names in snd_print*()

14 years agoMerge branch 'topic/pcm-estrpipe-in-pm' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:33:02 +0000 (15:33 +0200)]
Merge branch 'topic/pcm-estrpipe-in-pm' into for-linus

* topic/pcm-estrpipe-in-pm:
  ALSA: pcm - Tell user that stream to be rewound is suspended

14 years agoMerge branch 'topic/pcm-drain-nonblock' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:33:00 +0000 (15:33 +0200)]
Merge branch 'topic/pcm-drain-nonblock' into for-linus

* topic/pcm-drain-nonblock:
  ALSA: pcm - Increase protocol version
  ALSA: pcm - Fix drain behavior in non-blocking mode

14 years agoMerge branch 'topic/oxygen' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:59 +0000 (15:32 +0200)]
Merge branch 'topic/oxygen' into for-linus

* topic/oxygen:
  sound: oxygen: work around MCE when changing volume

14 years agoMerge branch 'topic/oss' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:58 +0000 (15:32 +0200)]
Merge branch 'topic/oss' into for-linus

* topic/oss:
  ALSA: allocation may fail in snd_pcm_oss_change_params()
  sound: vwsnd: Fix setting of cfgval and ctlval in li_setup_dma()
  sound: fix OSS MIDI output data loss

14 years agoMerge branch 'topic/misc' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:57 +0000 (15:32 +0200)]
Merge branch 'topic/misc' into for-linus

* topic/misc:
  ALSA: Remove unneeded ifdef from sound/core.h
  ALSA: Remove struct snd_monitor_file from public sound/core.h
  ALSA: Release v1.0.21

14 years agoMerge branch 'topic/midi' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:56 +0000 (15:32 +0200)]
Merge branch 'topic/midi' into for-linus

* topic/midi:
  sound: rawmidi: disable active-sensing-on-close by default
  sound: seq_oss_midi: remove magic numbers
  sound: seq_midi: do not send MIDI reset when closing
  seq-midi: always log message on output overrun

14 years agoMerge branch 'topic/ice1724-pm' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:55 +0000 (15:32 +0200)]
Merge branch 'topic/ice1724-pm' into for-linus

* topic/ice1724-pm:
  ALSA: ice1724 - Fix section mismatch
  ALSA: ice1724 - Patch for suspend/resume for Audiotrak Prodigy HD2

14 years agoMerge branch 'topic/hdsp' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:54 +0000 (15:32 +0200)]
Merge branch 'topic/hdsp' into for-linus

* topic/hdsp:
  ALSA: hdsp - allow proc reporting with disconnected io box

14 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:52 +0000 (15:32 +0200)]
Merge branch 'topic/hda' into for-linus

* topic/hda: (92 commits)
  ALSA: hda - Use auto model for HP laptops with ALC268 codec
  ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital
  ALSA: hda - Add support of Alienware M17x laptop
  ALSA: hda - Remove dead codes from patch_sigmatel.c
  ALSA: hda - Fix input source selection of IDT92HD73xx
  ALSA: hda - Fix obsolete CONFIG_SND_DEBUG_DETECT
  ALSA: hda - Unmute docking line-out as default with AD1984A codec
  ALSA: hda - Add another entry for Nvidia HDMI device
  ALSA: hda - Add missing GPIO initialization for AD1984A laptop model
  ALSA: hda - Add support of docking auto-mute/mic for AD1984A laptop model
  ALSA: hda - Fix ALC268/ALC269 headphone pin routing
  ALSA: hda - Create "Digital Mic Capture Volume" correctly for IDT codecs
  ALSA: hda - Add more quirk for HP laptops with AD1984A
  ALSA: hda - Add / fix model entries for HD-audio driver
  ALSA: hda - Add full audio support on Acer Aspire 7730G notebook
  ALSA: hda - Improve auto-cfg mixer name for ALC662
  ALSA: hda - Improve auto-cfg mixer name for ALC861-VD
  ALSA: hda - Improve auto-cfg mixer name for ALC262
  ALSA: hda - Improve auto-cfg mixer name for ALC260
  ALSA: hda - Improve auto-cfg mixer name for ALC880
  ...

14 years agoMerge branch 'topic/dummy' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:51 +0000 (15:32 +0200)]
Merge branch 'topic/dummy' into for-linus

* topic/dummy:
  ALSA: dummy - Increase MAX_PCM_SUBSTREAMS to 128
  ALSA: dummy - Add debug proc file
  ALSA: Add const prefix to proc helper functions
  ALSA: Re-export snd_pcm_format_name() function
  ALSA: dummy - Fake buffer allocations
  ALSA: dummy - Fix the timer calculation in systimer mode
  ALSA: dummy - Add more description
  ALSA: dummy - Better jiffies handling
  ALSA: dummy - Support high-res timer mode

14 years agoMerge branch 'topic/dma-sgbuf' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:50 +0000 (15:32 +0200)]
Merge branch 'topic/dma-sgbuf' into for-linus

* topic/dma-sgbuf:
  ALSA: Fix SG-buffer DMA with non-coherent architectures

14 years agoMerge branch 'topic/ctxfi' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:48 +0000 (15:32 +0200)]
Merge branch 'topic/ctxfi' into for-linus

* topic/ctxfi:
  ALSA: ctxfi - Simple code clean up
  ALSA: ctxfi - Native timer support for emu20k2

14 years agoMerge branch 'topic/ctl-add-remove-fixes' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:47 +0000 (15:32 +0200)]
Merge branch 'topic/ctl-add-remove-fixes' into for-linus

* topic/ctl-add-remove-fixes:
  sound: snd_ctl_remove_user_ctl: prevent removal of kernel controls
  sound: snd_ctl_remove_unlocked_id: simplify user control counting
  sound: snd_ctl_remove_unlocked_id: simplify error paths
  sound: snd_ctl_elem_add: fix value count check

14 years agoMerge branch 'topic/cs46xx' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:46 +0000 (15:32 +0200)]
Merge branch 'topic/cs46xx' into for-linus

* topic/cs46xx:
  ALSA: cs46xx - Fix minimum period size

14 years agoMerge branch 'topic/cmi8330' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:45 +0000 (15:32 +0200)]
Merge branch 'topic/cmi8330' into for-linus

* topic/cmi8330:
  ALSA: cmi8330: Allow MPU-401-less operation
  ALSA: cmi8330: find OPL3 port automatically
  cmi8330: Add basic CMI8329 support
  ALSA: cmi8330: revert comments about AD1848 back

14 years agoMerge branch 'topic/cleanup' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:43 +0000 (15:32 +0200)]
Merge branch 'topic/cleanup' into for-linus

* topic/cleanup:
  ALSA: info - Use krealloc()

14 years agoMerge branch 'topic/azt3328' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:41 +0000 (15:32 +0200)]
Merge branch 'topic/azt3328' into for-linus

* topic/azt3328:
  ALSA: azt3328: fix previous breakage, improve suspend, cleanups
  ALSA: azt3328: large codec cleanup, add I2S port etc.
  ALSA: azt3328: fix Kconfig entry

14 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:40 +0000 (15:32 +0200)]
Merge branch 'topic/asoc' into for-linus

* topic/asoc: (226 commits)
  ASoC: au1x: PSC-AC97 bugfixes
  ASoC: Fix WM835x Out4 capture enumeration
  ASoC: Remove unuused hw_read_t
  ASoC: fix pxa2xx-ac97.c breakage
  ASoC: Fully specify DC servo bits to update in wm_hubs
  ASoC: Debugged improper setting of PLL fields in WM8580 driver
  ASoC: new board driver to connect bfin-5xx with ad1836 codec
  ASoC: OMAP: Add functionality to set CLKR and FSR sources in McBSP DAI
  ASoC: davinci: i2c device creation moved into board files
  ASoC: Don't reconfigure WM8350 FLL if not needed
  ASoC: Fix s3c-i2s-v2 build
  ASoC: Make platform data optional for TLV320AIC3x
  ASoC: Add S3C24xx dependencies for Simtec machines
  ASoC: SDP3430: Fix TWL GPIO6 pin mux request
  ASoC: S3C platform: Fix s3c2410_dma_started() called at improper time
  ARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stop
  ASoC: OMAP: Fix setup of XCCR and RCCR registers in McBSP DAI
  OMAP: McBSP: Use textual values in DMA operating mode sysfs files
  ARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510
  ASoC: Select core DMA when building for S3C64xx
  ...

14 years agoMerge branch 'topic/ali5451-cleanup' into for-linus
Takashi Iwai [Thu, 10 Sep 2009 13:32:38 +0000 (15:32 +0200)]
Merge branch 'topic/ali5451-cleanup' into for-linus

* topic/ali5451-cleanup:
  ALSA: ali5451: remove dead code

14 years agosparc64: Initial hw perf counter support.
David S. Miller [Thu, 10 Sep 2009 13:28:20 +0000 (06:28 -0700)]
sparc64: Initial hw perf counter support.

Only supports one simple counter and only UltraSPARC-IIIi chips.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Implement a real set_perf_counter_pending().
David S. Miller [Thu, 10 Sep 2009 12:59:24 +0000 (05:59 -0700)]
sparc64: Implement a real set_perf_counter_pending().

When the perf counter subsystem needs to reschedule work out
from an NMI, it invokes set_perf_counter_pending().

This triggers a non-NMI irq which should invoke
perf_counter_do_pending().

Currently this won't trigger because sparc64 won't trigger
the perf counter subsystem from NMIs, but when the HW counter
support is added it will.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Use nmi_enter() and nmi_exit(), as needed.
David S. Miller [Thu, 10 Sep 2009 12:56:16 +0000 (05:56 -0700)]
sparc64: Use nmi_enter() and nmi_exit(), as needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Provide extern decls for sparc_??u_type strings.
David S. Miller [Thu, 10 Sep 2009 12:55:17 +0000 (05:55 -0700)]
sparc64: Provide extern decls for sparc_??u_type strings.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobinfmt_elf: fix PT_INTERP bss handling
Roland McGrath [Wed, 9 Sep 2009 02:49:40 +0000 (19:49 -0700)]
binfmt_elf: fix PT_INTERP bss handling

In fs/binfmt_elf.c, load_elf_interp() calls padzero() for .bss even if
the PT_LOAD has no PROT_WRITE and no .bss.  This generates EFAULT.

Here is a small test case.  (Yes, there are other, useful PT_INTERP
which have only .text and no .data/.bss.)

----- ptinterp.S
_start: .globl _start
 nop
 int3
-----
$ gcc -m32 -nostartfiles -nostdlib -o ptinterp ptinterp.S
$ gcc -m32 -Wl,--dynamic-linker=ptinterp -o hello hello.c
$ ./hello
Segmentation fault  # during execve() itself

After applying the patch:
$ ./hello
Trace trap  # user-mode execution after execve() finishes

If the ELF headers are actually self-inconsistent, then dying is fine.
But having no PROT_WRITE segment is perfectly normal and correct if
there is no segment with p_memsz > p_filesz (i.e. bss).  John Reiser
suggested checking for PROT_WRITE in the bss logic.  I think it makes
most sense to simply apply the bss logic only when there is bss.

This patch looks less trivial than it is due to some reindentation.
It just moves the "if (last_bss > elf_bss) {" test up to include the
partial-page bss logic as well as the more-pages bss logic.

Reported-by: John Reiser <jreiser@bitwagon.com>
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
14 years agoTPM: Fixup boot probe timeout for tpm_tis driver
Jason Gunthorpe [Wed, 9 Sep 2009 23:22:18 +0000 (17:22 -0600)]
TPM: Fixup boot probe timeout for tpm_tis driver

When probing the device in tpm_tis_init the call request_locality
uses timeout_a, which wasn't being initalized until after
request_locality. This results in request_locality falsely timing
out if the chip is still starting. Move the initialization to before
request_locality.

This probably only matters for embedded cases (ie mine), a BIOS likely
gets the TPM into a state where this code path isn't necessary.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Acked-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
14 years agoMerge branch 'lookup-permissions-cleanup'
Linus Torvalds [Thu, 10 Sep 2009 03:04:54 +0000 (20:04 -0700)]
Merge branch 'lookup-permissions-cleanup'

* lookup-permissions-cleanup:
  jffs2/jfs/xfs: switch over to 'check_acl' rather than 'permission()'
  ext[234]: move over to 'check_acl' permission model
  shmfs: use 'check_acl' instead of 'permission'
  Make 'check_acl()' a first-class filesystem op
  Simplify exec_permission_lite(), part 3
  Simplify exec_permission_lite() further
  Simplify exec_permission_lite() logic
  Do not call 'ima_path_check()' for each path component

14 years agobinfmt_elf: fix PT_INTERP bss handling
Roland McGrath [Wed, 9 Sep 2009 02:49:40 +0000 (19:49 -0700)]
binfmt_elf: fix PT_INTERP bss handling

In fs/binfmt_elf.c, load_elf_interp() calls padzero() for .bss even if
the PT_LOAD has no PROT_WRITE and no .bss.  This generates EFAULT.

Here is a small test case.  (Yes, there are other, useful PT_INTERP
which have only .text and no .data/.bss.)

----- ptinterp.S
_start: .globl _start
 nop
 int3
-----
$ gcc -m32 -nostartfiles -nostdlib -o ptinterp ptinterp.S
$ gcc -m32 -Wl,--dynamic-linker=ptinterp -o hello hello.c
$ ./hello
Segmentation fault  # during execve() itself

After applying the patch:
$ ./hello
Trace trap  # user-mode execution after execve() finishes

If the ELF headers are actually self-inconsistent, then dying is fine.
But having no PROT_WRITE segment is perfectly normal and correct if
there is no segment with p_memsz > p_filesz (i.e. bss).  John Reiser
suggested checking for PROT_WRITE in the bss logic.  I think it makes
most sense to simply apply the bss logic only when there is bss.

This patch looks less trivial than it is due to some reindentation.
It just moves the "if (last_bss > elf_bss) {" test up to include the
partial-page bss logic as well as the more-pages bss logic.

Reported-by: John Reiser <jreiser@bitwagon.com>
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodm9000: Use resource_size instead of private macro
Tobias Klauser [Wed, 9 Sep 2009 01:07:43 +0000 (01:07 +0000)]
dm9000: Use resource_size instead of private macro

The macro res_size in drivers/net/dm9000.c is a copy of resource_size in
linux/ioport.h. Remove the function and use resource_size instead.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodm9000: Remove unnecessary memset of netdev private data
Tobias Klauser [Wed, 9 Sep 2009 01:07:44 +0000 (01:07 +0000)]
dm9000: Remove unnecessary memset of netdev private data

The memory for the private data is allocated using kzalloc in
alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to
set it to 0 again.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix tx descriptor structure
Amit Kumar Salecha [Thu, 10 Sep 2009 01:12:59 +0000 (18:12 -0700)]
netxen: fix tx descriptor structure

Fix the offset of vlan_TCI field in cmd_desc_type0.

Signed-off-by: Amit Kumar Salecha <amit@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix check for ip addr hashing support
Amit Kumar Salecha [Thu, 10 Sep 2009 01:12:37 +0000 (18:12 -0700)]
netxen: fix check for ip addr hashing support

Fix typo in checking dest ip has support before
programming destip addresses.

Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet_sched: fix estimator lock selection for mq child qdiscs
Patrick McHardy [Thu, 10 Sep 2009 01:11:23 +0000 (18:11 -0700)]
net_sched: fix estimator lock selection for mq child qdiscs

When new child qdiscs are attached to the mq qdisc, they are actually
attached as root qdiscs to the device queues. The lock selection for
new estimators incorrectly picks the root lock of the existing and
to be replaced qdisc, which results in a use-after-free once the old
qdisc has been destroyed.

Mark mq qdisc instances with a new flag and treat qdiscs attached to
mq as children similar to regular root qdiscs.

Additionally prevent estimators from being attached to the mq qdisc
itself since it only updates its byte and packet counters during dumps.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 10 Sep 2009 00:33:45 +0000 (17:33 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6