]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years ago[S390] kernel: Disable switch_amode by default
Gerald Schaefer [Thu, 26 Mar 2009 14:24:22 +0000 (15:24 +0100)]
[S390] kernel: Disable switch_amode by default

Disable switch_amode by default because pagetable walk on pre z9
hardware has negative performance impact.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] clock sync mode flags
Martin Schwidefsky [Thu, 26 Mar 2009 14:24:21 +0000 (15:24 +0100)]
[S390] clock sync mode flags

The clock sync mode flag CLOCK_SYNC_STP is not cleared when stp
is set offline. In this case the get_sync_clock() function returns
-EACCESS and the dasd driver will block all i/o until stp is enabled
again. In addition get_sync_clock can return -EACCESS if the clock is
not in sync instead of -EAGAIN.

Rework the stp/etr online handling to fix these problems.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: prevent workqueue deadlock
Peter Oberparleiter [Thu, 26 Mar 2009 14:24:20 +0000 (15:24 +0100)]
[S390] cio: prevent workqueue deadlock

Subchannel reprobing can block the kslowcrw workqueue indefinitely
while waiting for device recognition to finish which is also scheduled
to run on kslowcrw. Prevent this deadlock by moving the waiting
portion of subchannel reprobing to the cio workqueue.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: remove unused local variable
Sebastian Ott [Thu, 26 Mar 2009 14:24:19 +0000 (15:24 +0100)]
[S390] cio: remove unused local variable

Remove unused subchannel pointer in io_subchannel_recog_done.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: incorrect status check in interrogate function
Peter Oberparleiter [Thu, 26 Mar 2009 14:24:18 +0000 (15:24 +0100)]
[S390] cio: incorrect status check in interrogate function

Fix incorrect check for active I/O in interrogate function.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: fix rc generation after chsc call
Sebastian Ott [Thu, 26 Mar 2009 14:24:17 +0000 (15:24 +0100)]
[S390] cio: fix rc generation after chsc call

In some situations a rc in __chsc_do_secm will be overwritten
by another one. This shouldn't do harm since todays callers
don't check for _specific_ errors but fix it for the sake of
correctness.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: fix wrong buffer access in cio_ignore_write
Sebastian Ott [Thu, 26 Mar 2009 14:24:16 +0000 (15:24 +0100)]
[S390] cio: fix wrong buffer access in cio_ignore_write

Writing only spaces to /proc/cio_ignore will cause a buffer overflow
since the size_t value i will not become negative and so buf[-1UL] is
accessed. Change the value of i to ssize_t.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: ccw group fix unbind behaviour.
Sebastian Ott [Thu, 26 Mar 2009 14:24:15 +0000 (15:24 +0100)]
[S390] cio: ccw group fix unbind behaviour.

For a ccw group device unbinding it from its driver should do the
same as a call to ungroup, since this virtual device can not exist
without a driver.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: fix sanity checks in ccwgroup driver.
Sebastian Ott [Thu, 26 Mar 2009 14:24:14 +0000 (15:24 +0100)]
[S390] cio: fix sanity checks in ccwgroup driver.

Some sanity checks in the ccw group driver test the output of
container_of macros to be !NULL. Test the input parameters instead.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: ccw group online store - report rcs to the caller.
Sebastian Ott [Thu, 26 Mar 2009 14:24:13 +0000 (15:24 +0100)]
[S390] cio: ccw group online store - report rcs to the caller.

In case the ccw group driver refuses to set a device [on|off]line,
we should transmit the return code to the caller.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: airq - fix array boundary
Sebastian Ott [Thu, 26 Mar 2009 14:24:12 +0000 (15:24 +0100)]
[S390] cio: airq - fix array boundary

MAX_ISC is a valid isc number, so arrays with an index of isc
need to have a length of MAX_ISC+1

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: device scan oom fallback.
Sebastian Ott [Thu, 26 Mar 2009 14:24:11 +0000 (15:24 +0100)]
[S390] cio: device scan oom fallback.

Since some callers rely on for_each_subchannel_staged to not fail,
fall back to brute force scanning using get_subchannel_by_schid in
case of a oom situation.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: ensure single load of irq handler pointer
Heiko Carstens [Thu, 26 Mar 2009 14:24:10 +0000 (15:24 +0100)]
[S390] cio: ensure single load of irq handler pointer

Add barrier to prevent compiler from reloading pointer to irq handler.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio/crw: add/fix locking
Heiko Carstens [Thu, 26 Mar 2009 14:24:09 +0000 (15:24 +0100)]
[S390] cio/crw: add/fix locking

The crw_unregister_handler uses xchg + synchronize_sched when
unregistering a crw_handler.
This doesn't protect crw_collect_info to potentially jump to NULL since
it has unlocked code like this:

if (crw_handlers[i])
        crw_handlers[i](NULL, NULL, 1);

So add a mutex which protects the crw handler array for changes.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: ccw device online store - report rc from ccw driver.
Sebastian Ott [Thu, 26 Mar 2009 14:24:08 +0000 (15:24 +0100)]
[S390] cio: ccw device online store - report rc from ccw driver.

In case the ccw driver refuses to set a device offline, we should
transmit the return code to the caller.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Use ccw_device_set_notoper().
Cornelia Huck [Thu, 26 Mar 2009 14:24:07 +0000 (15:24 +0100)]
[S390] cio: Use ccw_device_set_notoper().

Use ccw_device_set_notoper() (which also deletes the device
timer and disables the subchannel) instead of simply setting
the state to DEV_STATE_NOT_OPER in the generic not operational
handling code. This prevents unexpected interrupts popping up
for devices that are deemed not operational.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Try harder to disable subchannel.
Cornelia Huck [Thu, 26 Mar 2009 14:24:06 +0000 (15:24 +0100)]
[S390] cio: Try harder to disable subchannel.

Acting upon the assumption that cio_disable_subchannel()
is only called when we really want to disable the subchannel
(a) remove the check for activity (it is already done in
    ccw_device_offline(), which is the place where it matters)
(b) collect pending status via tsch() and ignore it (it
    can't matter anymore since the subchannel will be disabled).

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Use unbind/bind instead of unregister/register.
Cornelia Huck [Thu, 26 Mar 2009 14:24:05 +0000 (15:24 +0100)]
[S390] cio: Use unbind/bind instead of unregister/register.

The common I/O layer may encounter a situation where the
device number of a ccw device has changed or a device
driver doesn't want to keep a formerly disconnected device
becoming operational again. Instead of using device_del()/
device_add() as now, we can just unbind the driver from the
device and rebind it to get the desired effect (rebinding)
with less overhead.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] move EXPORT_SYMBOLs to definitions
Heiko Carstens [Thu, 26 Mar 2009 14:24:04 +0000 (15:24 +0100)]
[S390] move EXPORT_SYMBOLs to definitions

Move all EXPORT_SYMBOLs to their corresponding definitions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert bitmap definitions to C
Heiko Carstens [Thu, 26 Mar 2009 14:24:03 +0000 (15:24 +0100)]
[S390] convert bitmap definitions to C

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Remove CONFIG_MACHCHK_WARNING.
Heiko Carstens [Thu, 26 Mar 2009 14:24:02 +0000 (15:24 +0100)]
[S390] Remove CONFIG_MACHCHK_WARNING.

Everybody enables it so there is no point for an extra config option.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] split/move machine check handler code
Heiko Carstens [Thu, 26 Mar 2009 14:24:01 +0000 (15:24 +0100)]
[S390] split/move machine check handler code

Split machine check handler code and move it to cio and kernel code
where it belongs to. No functional change.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Fix appldata build break with !NET
Sachin Sant [Thu, 26 Mar 2009 14:24:00 +0000 (15:24 +0100)]
[S390] Fix appldata build break with !NET

With CONFIG_NET not set appldata build breaks on s390.

arch/s390/appldata/built-in.o: In function appldata_get_net_sum_data:
appldata_net_sum.c:(.text+0x2684): undefined reference to dev_get_stats
appldata_net_sum.c:(.text+0x2688): undefined reference to init_net
appldata_net_sum.c:(.text+0x268c): undefined reference to init_net
appldata_net_sum.c:(.text+0x2694): undefined reference to dev_base_lock

The following patch fixes the issue for me.

Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] ftrace: dont trace machine check handler
Heiko Carstens [Thu, 26 Mar 2009 14:23:59 +0000 (15:23 +0100)]
[S390] ftrace: dont trace machine check handler

The ftrace code is currently not reentrant, so we better don't trace
our machine check handler. Machine checks are handled like NMIs on s390.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Fix hypervisor detection for KVM
Christian Borntraeger [Thu, 26 Mar 2009 14:23:58 +0000 (15:23 +0100)]
[S390] Fix hypervisor detection for KVM

Currently we use the cpuid (via STIDP instruction) to recognize LPAR,
z/VM and KVM.
The architecture states, that bit 0-7 of STIDP returns all zero, and
if STIDP is executed in a virtual machine, the VM operating system
will replace bits 0-7 with FF.

KVM should not use FE to distinguish z/VM from KVM for interested
guests. The proper way to detect the hypervisor is the STSI (Store
System Information) instruction, which return information about the
hypervisors via function code 3, selector1=2, selector2=2.

This patch changes the detection routine of Linux to use STSI instead
of STIDP. This detection is earlier than bootmem, we have to use a
static buffer. Since STSI expects a 4kb block (4kb aligned) this
patch also changes the init.data alignment for s390. As this section
will be freed during boot, this should be no problem.

Patch is tested with LPAR, z/VM, KVM on LPAR, and KVM under z/VM.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] check addressing mode in s390_enable_sie
Carsten Otte [Thu, 26 Mar 2009 14:23:57 +0000 (15:23 +0100)]
[S390] check addressing mode in s390_enable_sie

The sie instruction requires address spaces to be switched
to run proper. This patch verifies that this is the case
in s390_enable_sie, otherwise the kernel would crash badly
as soon as the process runs into sie.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] lockdep: trace hardirq off in smp_send_stop
Christian Borntraeger [Thu, 26 Mar 2009 14:23:56 +0000 (15:23 +0100)]
[S390] lockdep: trace hardirq off in smp_send_stop

With lockdep we got the following trace after a panic:

Badness at /home/autobuild/BUILD/linux-2.6.28-20090204/kernel/lockdep.c:2878
[...]
Call Trace:
 [<0000000000176334>] lock_acquire+0x54/0xbc
 [<000000000050b4fe>] __atomic_notifier_call_chain+0x6e/0xdc
 [<000000000050b59c>] atomic_notifier_call_chain+0x30/0x44
 [<0000000000504274>] panic+0xd0/0x1e8
[...]
INFO: lockdep is turned off.
Last Breaking-Event-Address:
 [<0000000000170e62>] check_flags+0xae/0x15c
possible reason: unannotated irqs-off.

lockdep is right. We missed a trace_hardirq_off in our smp_send_stop
function and smp_send_stop is called before the panic call chain.

Reported-by: Mijo <Safradin mijo@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] hvc_iucv: Provide IUCV z/VM user ID filtering
Hendrik Brueckner [Thu, 26 Mar 2009 14:23:55 +0000 (15:23 +0100)]
[S390] hvc_iucv: Provide IUCV z/VM user ID filtering

This patch introduces the kernel parameter hvc_iucv_allow= that specifies
a comma-separated list of z/VM user IDs.
If specified, the z/VM IUCV hypervisor console device driver accepts IUCV
connections from listed z/VM user IDs only.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] hvc_iucv: Update and add missing kernel messages
Hendrik Brueckner [Thu, 26 Mar 2009 14:23:54 +0000 (15:23 +0100)]
[S390] hvc_iucv: Update and add missing kernel messages

If the hvc_iucv= kernel parameter specifies a value that is not
valid, display an error message.
Minor changes to existing kernel messages.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cputime: initialize per thread timer values on fork
Heiko Carstens [Thu, 26 Mar 2009 14:23:53 +0000 (15:23 +0100)]
[S390] cputime: initialize per thread timer values on fork

Initialize per thread timer values instead of just copying them from
the parent. That way it is easily possible to tell how much time a
thread spent in user/system context.
Doesn't fix a bug, this is just for debugging purposes.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] arch/s390/kernel/process.c: fix whitespace damage
Heiko Carstens [Thu, 26 Mar 2009 14:23:52 +0000 (15:23 +0100)]
[S390] arch/s390/kernel/process.c: fix whitespace damage

Fix all the whitespace damage in process.c, especially copy_thread().
Next patch will add code to copy_thread() which needs to 'fixed' first.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] delete drivers/s390/ebcdic.c
Heiko Carstens [Thu, 26 Mar 2009 14:23:51 +0000 (15:23 +0100)]
[S390] delete drivers/s390/ebcdic.c

Dead file. Seems to be a leftover from the 2.4->2.5 conversion.
The used and uptodate version of this file is in arch/s390/kernel.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] move sysinfo.c from drivers/s390 to arch/s390/kernel
Heiko Carstens [Thu, 26 Mar 2009 14:23:50 +0000 (15:23 +0100)]
[S390] move sysinfo.c from drivers/s390 to arch/s390/kernel

All in sysinfo.c is core kernel code and not driver code. So move it
to arch/s390/kernel. Also includes some small cleanups.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: message cleanup
Stefan Haberland [Thu, 26 Mar 2009 14:23:49 +0000 (15:23 +0100)]
[S390] dasd: message cleanup

Moved some Messages into s390 debug feature and changed remaining
messages to use the dev_xxx and pr_xxx macros.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: add High Performance FICON support
Stefan Weinhuber [Thu, 26 Mar 2009 14:23:48 +0000 (15:23 +0100)]
[S390] dasd: add High Performance FICON support

To support High Performance FICON, the DASD device driver has to
translate I/O requests into the new transport mode control words (TCW)
instead of the traditional (command mode) CCW requests.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: add large volume support
Stefan Weinhuber [Thu, 26 Mar 2009 14:23:47 +0000 (15:23 +0100)]
[S390] dasd: add large volume support

The dasd device driver will now support ECKD devices with more then
65520 cylinders.
In the traditional ECKD adressing scheme each track is addressed
by a 16-bit cylinder and 16-bit head number. The new addressing
scheme makes use of the fact that the actual number of heads is
never larger then 15, so 12 bits of the head number can be redefined
to be part of the cylinder address.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd_eckd / Write format R0 is now allowed BB
Jean-Baptiste Joret [Thu, 26 Mar 2009 14:23:46 +0000 (15:23 +0100)]
[S390] dasd_eckd / Write format R0 is now allowed BB

Permission is now granted to the subsystem to format write R0 with:
* an ID = CCHHR, where CC = physical cylinder number,
  HH = physical head number, and R = 0
* a key length of zero
* a data length of eight
* a data field containing all zeros

Signed-off-by: Jean-Baptiste Joret <joret@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] dasd: enable compat ioctls
Heiko Carstens [Thu, 26 Mar 2009 14:23:45 +0000 (15:23 +0100)]
[S390] dasd: enable compat ioctls

All of the ioctls are compatible. Just enable them.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] page fault: invoke oom-killer
Heiko Carstens [Thu, 26 Mar 2009 14:23:44 +0000 (15:23 +0100)]
[S390] page fault: invoke oom-killer

s390 arch backend for 1c0fe6e3bda0464728c23c8d84aa47567e8b716c
"mm: invoke oom-killer from page fault".

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Automatic IPL after dump
Frank Munzert [Thu, 26 Mar 2009 14:23:43 +0000 (15:23 +0100)]
[S390] Automatic IPL after dump

Provide new shutdown action "dump_reipl" for automatic ipl after dump.

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
15 years ago[S390] fix dump_stack vs. %p and (null)
Christian Borntraeger [Thu, 26 Mar 2009 14:23:42 +0000 (15:23 +0100)]
[S390] fix dump_stack vs. %p and (null)

The s390 implemenation of dump_stack uses %p to display stack content.
Since d97106ab53f812910a62d18afb9dbe882819c1ba (Make %p print '(null)'
for NULL pointers) this causes a strange output for dump_stack:

[...]
Process basename (pid: 8822, task: 00000000b2ece038, ksp: 00000000b24d7b38)
04000000b5685c00 00000000b24d7760 0000000000000002 (null)
00000000b24d7800 00000000b24d7778 00000000b24d7778 00000000001052fe
(null) 00000000b24d7b38 (null) 000000000000000a
000000000000000d (null) 00000000b24d7760 00000000b24d77d8
000000000051a7e8 00000000001052fe 00000000b24d7760 00000000b24d77b0
Call Trace:
[...]

This patch changes our dump_stack to use the appropriate %x format.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years agoGet rid of pdflush_operation() in emergency sync and remount
Jens Axboe [Tue, 17 Mar 2009 08:38:40 +0000 (09:38 +0100)]
Get rid of pdflush_operation() in emergency sync and remount

Opencode a cheasy approach with kevent. The idea here is that we'll
add some generic delayed work infrastructure, which probably wont be
based on pdflush (or maybe it will, in which case we can just add it
back).

This is in preparation for getting rid of pdflush completely.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agobtrfs: get rid of current_is_pdflush() in btrfs_btree_balance_dirty
Jens Axboe [Tue, 17 Mar 2009 08:36:37 +0000 (09:36 +0100)]
btrfs: get rid of current_is_pdflush() in btrfs_btree_balance_dirty

Chris says it's safe to kill.

Acked-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoMove the default_backing_dev_info out of readahead.c and into backing-dev.c
Jens Axboe [Tue, 17 Mar 2009 08:35:06 +0000 (09:35 +0100)]
Move the default_backing_dev_info out of readahead.c and into backing-dev.c

It really makes no sense to have it in readahead.c, so move it where
it belongs.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Repeated lines in switching-sched.txt
Avishay Traeger [Tue, 24 Mar 2009 11:40:18 +0000 (12:40 +0100)]
block: Repeated lines in switching-sched.txt

These lines appear in this file twice - removed one occurrence.

Signed-off-by: Avishay Traeger <avishay@il.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agobsg: Remove bogus check against request_queue->max_sectors
Boaz Harrosh [Tue, 24 Mar 2009 11:37:50 +0000 (12:37 +0100)]
bsg: Remove bogus check against request_queue->max_sectors

bsg submits REQ_TYPE_BLOCK_PC so the right check is max_hw_sectors.
But I've removed this check because right after, bsg proceeds with
calling blk_rq_map_user() which does all the right checks.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: WARN in __blk_put_request() for potential bio leak
Boaz Harrosh [Tue, 24 Mar 2009 11:35:07 +0000 (12:35 +0100)]
block: WARN in __blk_put_request() for potential bio leak

Put a WARN_ON in __blk_put_request if it is about to
leak bio(s). This is a serious bug that can happen in error
handling code paths.

For this to work I have fixed a couple of places in block/ where
request->bio != NULL ownership was not honored. And a small cleanup
at sg_io() while at it.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoloop: fix circular locking in loop_clr_fd()
Nikanth Karthikesan [Tue, 24 Mar 2009 11:33:41 +0000 (12:33 +0100)]
loop: fix circular locking in loop_clr_fd()

With CONFIG_PROVE_LOCKING enabled

$ losetup /dev/loop0 file
$ losetup -o 32256 /dev/loop1 /dev/loop0

$ losetup -d /dev/loop1
$ losetup -d /dev/loop0

triggers a [ INFO: possible circular locking dependency detected ]

I think this warning is a false positive.

Open/close on a loop device acquires bd_mutex of the device before
acquiring lo_ctl_mutex of the same device. For ioctl(LOOP_CLR_FD) after
acquiring lo_ctl_mutex, fput on the backing_file might acquire the bd_mutex of
a device, if backing file is a device and this is the last reference to the
file being dropped . But it is guaranteed that it is impossible to have a
circular list of backing devices.(say loop2->loop1->loop0->loop2 is not
possible), which guarantees that this can never deadlock.

So this warning should be suppressed. It is very difficult to annotate lockdep
not to warn here in the correct way. A simple way to silence lockdep could be
to mark the lo_ctl_mutex in ioctl to be a sub class, but this might mask some
other real bugs.

@@ -1164,7 +1164,7 @@ static int lo_ioctl(struct block_device *bdev, fmode_t mode,
  struct loop_device *lo = bdev->bd_disk->private_data;
  int err;

- mutex_lock(&lo->lo_ctl_mutex);
+ mutex_lock_nested(&lo->lo_ctl_mutex, 1);
  switch (cmd) {
  case LOOP_SET_FD:
  err = loop_set_fd(lo, mode, bdev, arg);

Or actually marking the bd_mutex after lo_ctl_mutex as a sub class could be
a better solution.

Luckily it is easy to avoid calling fput on backing file with lo_ctl_mutex
held, so no lockdep annotation is required.

If you do not like the special handling of the lo_ctl_mutex just for the
LOOP_CLR_FD ioctl in lo_ioctl(), the mutex handling could be moved inside
each of the individual ioctl handlers and I could send you another patch.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agosparc64: Flush TLB before releasing pages.
David S. Miller [Thu, 26 Mar 2009 08:54:46 +0000 (01:54 -0700)]
sparc64: Flush TLB before releasing pages.

tlb_flush_mmu() needs to flush pending TLB entries before
processing the mmu_gather ->pages list.

Noticed by Benjamin Herrenschmidt.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Thu, 26 Mar 2009 08:22:01 +0000 (01:22 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

15 years agoixgbe: Allow Priority Flow Control settings to survive a device reset
PJ Waskiewicz [Wed, 25 Mar 2009 22:10:42 +0000 (22:10 +0000)]
ixgbe: Allow Priority Flow Control settings to survive a device reset

When changing DCB parameters, ixgbe needs to have the MAC reset.  The way
the flow control code is setup today, PFC will be disabled on a reset.
This patch adds a new flow control type for PFC, and then has the netlink
layer take care of toggling which type of flow control to enable.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: core: remove unneeded include in net/core/utils.c.
Rami Rosen [Thu, 26 Mar 2009 08:11:48 +0000 (01:11 -0700)]
net: core: remove unneeded include in net/core/utils.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: update version number
Jesse Brandeburg [Wed, 25 Mar 2009 22:06:01 +0000 (22:06 +0000)]
e1000e: update version number

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: fix close interrupt race
Jesse Brandeburg [Wed, 25 Mar 2009 22:05:41 +0000 (22:05 +0000)]
e1000e: fix close interrupt race

As noticed by Alan Cox, it is possible for e1000e to exit its interrupt
handler or NAPI with interrupts enabled even when the driver is unloading or
being configured administratively down.

fix related to fix for: http://bugzilla.kernel.org/show_bug.cgi?id=12876

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: fix loss of multicast packets
Jesse Brandeburg [Wed, 25 Mar 2009 22:05:21 +0000 (22:05 +0000)]
e1000e: fix loss of multicast packets

e1000e (and e1000, igb, ixgbe, ixgb) all do a series of operations each
time a multicast address is added.  The flow goes something like

1) stack adds one multicast address
2) stack passes whole current list of unicast and multicast addresses to
   driver
3) driver clears entire list in hardware
4) driver programs each multicast address using iomem in a loop

This was causing multicast packets to be lost during the reprogramming
process.

reference with test program:
http://kerneltrap.org/mailarchive/linux-netdev/2009/3/14/5160514/thread

Thanks to Dave Boutcher for his report and test program.

This driver fix prepares an array all at once in memory and programs it in
one shot to the hardware, not requiring an "erase" cycle.  It would still
be possible for packets to be dropped while the receiver is off during
reprogramming.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Dave Boutcher <daveboutcher@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: commonize tx cleanup routine to match e1000 & igb
Alexander Duyck [Wed, 25 Mar 2009 22:05:03 +0000 (22:05 +0000)]
e1000e: commonize tx cleanup routine to match e1000 & igb

This change updates the e1000e tx cleanup routine to more closely match
what already exists in igb and e1000.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: fix nf_logger name in ebt_ulog.
Eric Leblond [Thu, 26 Mar 2009 08:04:28 +0000 (01:04 -0700)]
netfilter: fix nf_logger name in ebt_ulog.

This patch renames the ebt_ulog nf_logger from "ulog" to "ebt_ulog" to
be in sync with other modules naming. As this name was currently only
used for informational purpose, the renaming should be harmless.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: fix warning in ebt_ulog init function.
Eric Leblond [Thu, 26 Mar 2009 08:04:02 +0000 (01:04 -0700)]
netfilter: fix warning in ebt_ulog init function.

The ebt_ulog module does not follow the fixed convention about function
return. Loading the module is triggering the following message:

sys_init_module: 'ebt_ulog'->init suspiciously returned 1, it should follow 0/-E convention
sys_init_module: loading module anyway...
Pid: 2334, comm: modprobe Not tainted 2.6.29-rc5edenwall0-00883-g199e57b #146
Call Trace:
 [<c0441b81>] ? printk+0xf/0x16
 [<c02311af>] sys_init_module+0x107/0x186
 [<c0202cfa>] syscall_call+0x7/0xb

The following patch fixes the return treatment in ebt_ulog_init()
function.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: fix warning about invalid const usage
Eric Leblond [Thu, 26 Mar 2009 08:03:23 +0000 (01:03 -0700)]
netfilter: fix warning about invalid const usage

This patch fixes the declaration of the logger structure in ebt_log
and ebt_ulog: I forgot to remove the const option from their declaration
in the commit ca735b3aaa945626ba65a3e51145bfe4ecd9e222 ("netfilter:
use a linked list of loggers").

Pointed-out-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: fix close race with interrupt
Jesse Brandeburg [Wed, 25 Mar 2009 21:59:22 +0000 (21:59 +0000)]
e1000: fix close race with interrupt

this is in regards to
http://bugzilla.kernel.org/show_bug.cgi?id=12876

where it appears that e1000 can leave its interrupt enabled after
exiting the driver.  Fix the bug by making the interrupt enable
paths more aware of the driver exiting.

Thanks to Alan Cox for the poke and initial investigation.

CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: cleanup clean_tx_irq routine so that it completely cleans ring
Alexander Duyck [Wed, 25 Mar 2009 21:59:04 +0000 (21:59 +0000)]
e1000: cleanup clean_tx_irq routine so that it completely cleans ring

The tx cleanup routine was stopping after 64 packets and this was causing
issues resulting in the ring not being completely cleaned.

This change updates the driver to clean the entire ring and if it doesn't
it then will retry on the next pass.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: fix tx hang detect logic and address dma mapping issues
Alexander Duyck [Wed, 25 Mar 2009 21:58:45 +0000 (21:58 +0000)]
e1000: fix tx hang detect logic and address dma mapping issues

This patch changes the dma mapping to better support
skb_dma_map/skb_dma_unmap and addresses and redefines the tx hang logic to
be based off of time stamp instead of if the dma field is populated

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobridge: bad error handling when adding invalid ether address
Stephen Hemminger [Thu, 26 Mar 2009 04:01:47 +0000 (21:01 -0700)]
bridge: bad error handling when adding invalid ether address

This fixes an crash when empty bond device is added to a bridge.
If an interface with invalid ethernet address (all zero) is added
to a bridge, then bridge code detects it when setting up the forward
databas entry. But the error unwind is broken, the bridge port object
can get freed twice: once when ref count went to zeo, and once by kfree.
Since object is never really accessible, just free it.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobonding: select current active slave when enslaving device for mode tlb and alb
Jiri Pirko [Thu, 26 Mar 2009 00:23:38 +0000 (17:23 -0700)]
bonding: select current active slave when enslaving device for mode tlb and alb

I've hit an issue on my system when I've been using RealTek RTL8139D cards in
bonding interface in mode balancing-alb. When I enslave a card, the current
active slave (bond->curr_active_slave) is not set and the link is therefore
not functional.

----
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: None
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1f:1f:01:2f:22
----

The thing that gets it right is when I unplug the cable and then I put it back
into the NIC. Then the current active slave is set to eth1 and link is working
just fine. Here is dmesg log with bonding DEBUG messages turned on:
----
ADDRCONF(NETDEV_UP): bond0: link is not ready
event_dev: bond0, event: 1
IFF_MASTER
event_dev: bond0, event: 8
IFF_MASTER
bond_ioctl: master=bond0, cmd=35216
slave_dev=cac5d800:
slave_dev->name=eth1:
eth1: ! NETIF_F_VLAN_CHALLENGED
event_dev: eth1, event: 8
eth1: link up, 100Mbps, full-duplex, lpa 0xC5E1
event_dev: eth1, event: 1
event_dev: eth1, event: 8
IFF_SLAVE
Initial state of slave_dev is BOND_LINK_UP
bonding: bond0: enslaving eth1 as an active interface with an up link.
ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
event_dev: bond0, event: 4
IFF_MASTER
bond0: no IPv6 routers present

<<<<cable unplug>>>>

eth1: link down
event_dev: eth1, event: 4
IFF_SLAVE
bonding: bond0: link status definitely down for interface eth1, disabling it
event_dev: bond0, event: 4
IFF_MASTER

<<<<cable plug>>>>

eth1: link up, 100Mbps, full-duplex, lpa 0xC5E1
event_dev: eth1, event: 4
IFF_SLAVE
bonding: bond0: link status definitely up for interface eth1.
bonding: bond0: making interface eth1 the new active one.
event_dev: eth1, event: 8
IFF_SLAVE
event_dev: eth1, event: 8
IFF_SLAVE
bonding: bond0: first active interface up!
event_dev: bond0, event: 4
IFF_MASTER
----

The current active slave is set by calling bond_select_active_slave() function
from bond_miimon_commit() function when the slave (eth1) link goes to state up.

I also tested this on other machine with Broadcom NetXtreme II BCM5708
1000Base-T NIC and there all works fine. The thing is that this adapter is down
and goes up after few seconds after it is enslaved.

This patch calls bond_select_active_slave() in bond_enslave() function for modes
alb and tlb and makes sure that the current active slave is set up properly even
when the slave state is already up. Tested on both systems, works fine.

Notice: The same problem can maybe also occrur in mode 8023AD but I'm unable to
test that.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogianfar: reallocate skb when headroom is not enough for fcb
Li Yang [Tue, 24 Mar 2009 23:15:33 +0000 (23:15 +0000)]
gianfar: reallocate skb when headroom is not enough for fcb

Gianfar uses a hardware header FCB for offloading.  However when used
with bridging or IP forwarding, TX skb might not have enough headroom
for the FCB.  Reallocate skb for such cases.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoBump release date to 25Mar2009 and version to 0.22
Florian Fainelli [Tue, 24 Mar 2009 23:34:38 +0000 (23:34 +0000)]
Bump release date to 25Mar2009 and version to 0.22

This patch bumps the driver release date to March 25th 2009
and release version to 0.22.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor6040: Fix second PHY address
Florian Fainelli [Tue, 24 Mar 2009 23:34:35 +0000 (23:34 +0000)]
r6040: Fix second PHY address

This patch fixes the second PHY address which is strapped
to be at PHY address 3 instead of 2.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosched: Add comments to find_busiest_group() function
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:27 +0000 (14:44 +0530)]
sched: Add comments to find_busiest_group() function

Impact: cleanup

Add /** style comments around find_busiest_group(). Also add a few
explanatory comments.

This concludes the find_busiest_group() cleanup. The function is
now down to 72 lines from the original 313 lines.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091427.13992.18933.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Refactor the power savings balance code
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:22 +0000 (14:44 +0530)]
sched: Refactor the power savings balance code

Impact: cleanup

Create seperate helper functions to initialize the
power-savings-balance related variables, to update them and
to check if we have a scope for performing power-savings balance.

Add no-op inline functions for the !(CONFIG_SCHED_MC || CONFIG_SCHED_SMT)
case.

This will eliminate all the #ifdef jungle in find_busiest_group() and the
other helper functions.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091422.13992.73616.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Optimize the !power_savings_balance during fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:17 +0000 (14:44 +0530)]
sched: Optimize the !power_savings_balance during fbg()

Impact: cleanup, micro-optimization

We don't need to perform power_savings balance if either the
cpu is NOT_IDLE or if the sched_domain doesn't contain the
SD_POWERSAVINGS_BALANCE flag set.

Currently, we check for these conditions multiple number of
times, even though these variables don't change over the scope
of find_busiest_group().

Check once, and store the value in the already exiting
"power_savings_balance" variable.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091417.13992.2657.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Create a helper function to calculate imbalance
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:12 +0000 (14:44 +0530)]
sched: Create a helper function to calculate imbalance

Move all the imbalance calculation out of find_busiest_group()
through this helper function.

With this change, the structure of find_busiest_group() will be
as follows:

- update_sched_domain_statistics.

- check if imbalance exits.

- update imbalance and return busiest.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091411.13992.43293.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Create helper to calculate small_imbalance in fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:06 +0000 (14:44 +0530)]
sched: Create helper to calculate small_imbalance in fbg()

Impact: cleanup

We have two places in find_busiest_group() where we need to calculate
the minor imbalance before returning the busiest group. Encapsulate
this functionality into a seperate helper function.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091406.13992.54316.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Create a helper function to calculate sched_domain stats for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:01 +0000 (14:44 +0530)]
sched: Create a helper function to calculate sched_domain stats for fbg()

Impact: cleanup

Create a helper function named update_sd_lb_stats() to update the
various sched_domain related statistics in find_busiest_group().

With this we would have moved all the statistics computation out of
find_busiest_group().

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091401.13992.88737.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Define structure to store the sched_domain statistics for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:56 +0000 (14:43 +0530)]
sched: Define structure to store the sched_domain statistics for fbg()

Impact: cleanup

Currently we use a lot of local variables in find_busiest_group()
to capture the various statistics related to the sched_domain.
Group them together into a single data structure.

This will help us to offload the job of updating the sched_domain
statistics to a helper function.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091356.13992.25970.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Create a helper function to calculate sched_group stats for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:51 +0000 (14:43 +0530)]
sched: Create a helper function to calculate sched_group stats for fbg()

Impact: cleanup

Create a helper function named update_sg_lb_stats() which
can be invoked to calculate the individual group's statistics
in find_busiest_group().

This reduces the lenght of find_busiest_group() considerably.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Aked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091351.13992.43461.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Define structure to store the sched_group statistics for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:46 +0000 (14:43 +0530)]
sched: Define structure to store the sched_group statistics for fbg()

Impact: cleanup

Currently a whole bunch of variables are used to store the
various statistics pertaining to the groups we iterate over
in find_busiest_group().

Group them together in a single data structure and add
appropriate comments.

This will be useful later on when we create helper functions
to calculate the sched_group statistics.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091345.13992.20099.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Fix indentations in find_busiest_group() using gotos
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:40 +0000 (14:43 +0530)]
sched: Fix indentations in find_busiest_group() using gotos

Impact: cleanup

Some indentations in find_busiest_group() can minimized by using
early exits with the help of gotos. This improves readability in
a couple of cases.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091340.13992.45062.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: Simple helper functions for find_busiest_group()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:35 +0000 (14:43 +0530)]
sched: Simple helper functions for find_busiest_group()

Impact: cleanup

Currently the load idx calculation code is in find_busiest_group().
Move that to a static inline helper function.

Similary, to find the first cpu of a sched_group we use
cpumask_first(sched_group_cpus(group))

Use a helper to that. It improves readability in some cases.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091335.13992.55424.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'sched/cleanups'; commit 'v2.6.29' into sched/core
Ingo Molnar [Wed, 25 Mar 2009 09:26:51 +0000 (10:26 +0100)]
Merge branch 'sched/cleanups'; commit 'v2.6.29' into sched/core

15 years ago[WATCHDOG] i6300esb.c: start locking
Wim Van Sebroeck [Mon, 23 Mar 2009 13:50:38 +0000 (13:50 +0000)]
[WATCHDOG] i6300esb.c: start locking

Change the start function in preparation of the generic watchdog code.
Also make sure that locking of the start function is OK.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] i6300esb.c: convert to platform device driver
Wim Van Sebroeck [Thu, 19 Mar 2009 19:02:44 +0000 (19:02 +0000)]
[WATCHDOG] i6300esb.c: convert to platform device driver

Convert the Intel 6300ESB watchdog timer to a platform device driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] wdt.c: remove #ifdef CONFIG_WDT_501
Alan Cox [Sun, 22 Mar 2009 10:46:42 +0000 (10:46 +0000)]
[WATCHDOG] wdt.c: remove #ifdef CONFIG_WDT_501

Change the wdt.c watchdog driver so that the code is the same for
both the WDT500 as the WDT501-P card. The selection of the card
is now being done via the module parameter: 'type' instead of the
config option CONFIG_WDT_501.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] Fix io.h & uaccess.h includes.
Wim Van Sebroeck [Wed, 18 Mar 2009 09:09:26 +0000 (09:09 +0000)]
[WATCHDOG] Fix io.h & uaccess.h includes.

Fix following includes:
* #include <asm/io.h> should be #include <linux/io.h>
* #include <asm/uaccess.h> should be #include <linux/uaccess.h>

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] More coding-style and trivial clean-up
Wim Van Sebroeck [Wed, 18 Mar 2009 08:35:09 +0000 (08:35 +0000)]
[WATCHDOG] More coding-style and trivial clean-up

Some more cleaning-up of the watchdog drivers.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] struct file_operations should be const
Wim Van Sebroeck [Wed, 18 Mar 2009 08:18:43 +0000 (08:18 +0000)]
[WATCHDOG] struct file_operations should be const

Fix following warnings:
WARNING: struct file_operations should normally be const

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] cpwd.c: Coding style - Clean-up
Wim Van Sebroeck [Wed, 18 Mar 2009 08:05:24 +0000 (08:05 +0000)]
[WATCHDOG] cpwd.c: Coding style - Clean-up

This brings the cpwd.c watchdog driver in line with the kernel's coding style.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] hpwdt.c: Add new HP BMC controller.
Thomas Mingarelli [Tue, 3 Mar 2009 00:17:16 +0000 (00:17 +0000)]
[WATCHDOG] hpwdt.c: Add new HP BMC controller.

Add the PCI-ID for the upcoming new BMC controller for HP hardware.

Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[PATCH 13/13] drivers/watchdog: use USB API functions rather than constants
Julia Lawall [Mon, 29 Dec 2008 10:23:47 +0000 (11:23 +0100)]
[PATCH 13/13] drivers/watchdog: use USB API functions rather than constants

This set of patches introduces calls to the following set of functions:

usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)

In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:

USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC

An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)

@r5@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@inc@
@@

#include <linux/usb.h>

@depends on !inc && (r1||r5)@
@@

+ #include <linux/usb.h>
  #include <linux/usb/...>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] orion5x_wdt: fix compile issue by providing tclk as platform data
Thomas Reitmayr [Tue, 24 Feb 2009 22:59:22 +0000 (14:59 -0800)]
[WATCHDOG] orion5x_wdt: fix compile issue by providing tclk as platform data

The orion5x-wdt driver is now registered as a platform device and
receives the tclk value as platform data. This fixes a compile issue
cause by a previously removed define "ORION5X_TCLK".

Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at>
Acked-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Kristof Provost <kristof@sigsegv.be>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Martin Michlmayr <tbm@cyrius.com>
Cc: Sylver Bruneau <sylver.bruneau@googlemail.com>
Cc: Kunihiko IMAI <bak@d2.dion.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 years ago[WATCHDOG] rc32434_wdt: make sure watchdog is not running at startup
Wim Van Sebroeck [Mon, 23 Feb 2009 13:08:37 +0000 (13:08 +0000)]
[WATCHDOG] rc32434_wdt: make sure watchdog is not running at startup

Make sure that the watchdog is not running after loading
and before it is started by opening /dev/watchdog.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] rc32434_wdt: add spin_locking
Wim Van Sebroeck [Mon, 23 Feb 2009 13:08:36 +0000 (13:08 +0000)]
[WATCHDOG] rc32434_wdt: add spin_locking

Add spin_locks to prevent races.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] rc32434_wdt: add shutdown method
Wim Van Sebroeck [Mon, 23 Feb 2009 13:08:35 +0000 (13:08 +0000)]
[WATCHDOG] rc32434_wdt: add shutdown method

Add shutdown method to the platform driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] rc32434_wdt: add timeout module parameter
Phil Sutter [Sun, 8 Feb 2009 15:44:42 +0000 (16:44 +0100)]
[WATCHDOG] rc32434_wdt: add timeout module parameter

The WDT timer ticks quite fast (half of the CPU clock speed, which may
be between 198MHz and 330MHz (or 400MHz on newer boards)). Given it's
size of 32Bit, the maximum timeout value ranges from about 21s to 43s,
depending on the configured CPU clock speed.

This patch add's the timeout module parameter and checks that it's not
bigger then the maximum timeout for the given clock speed.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] rc32434_wdt: clean-up driver
Phil Sutter [Sun, 8 Feb 2009 15:44:42 +0000 (16:44 +0100)]
[WATCHDOG] rc32434_wdt: clean-up driver

Clean-up the rc32434 driver code:
- name the platform driver rc32434_wdt_driver
- Replace KBUILD_MODNAME ": " with PFX define.
- Cleanup include files
- Order the ioctl's

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] davinci: convert to ioremap() + io[read|write]
Kevin Hilman [Thu, 29 Jan 2009 22:14:30 +0000 (14:14 -0800)]
[WATCHDOG] davinci: convert to ioremap() + io[read|write]

Remove davinci platform-specific IO accessor macros in favor
of standard ioremap + io[read|write]* functions.

Also, convert printk(KERN_ERR ....) into dev_err(...)

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] w83697ug: add error checking
Eric Lammerts [Tue, 3 Feb 2009 22:45:56 +0000 (17:45 -0500)]
[WATCHDOG] w83697ug: add error checking

I noticed the W83697UG driver tries to register a watchdog even though
it already noticed the chip isn't there.

WDT driver for the Winbond(TM) W83697UG/UF Super I/O chip initialising.
w83697ug/uf WDT: No W83697UG/UF could be found
w83697ug/uf WDT: Watchdog already running. Resetting timeout to 60 sec
w83697ug/uf WDT: cannot register miscdev on minor=130 (err=-16)

Patch propagates the error back to wdt_init().

Signed-off-by: Eric Lammerts <eric@lammerts.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] cpwd.c & riowd.c - unlocked_ioctl
Wim Van Sebroeck [Wed, 21 Jan 2009 11:13:11 +0000 (11:13 +0000)]
[WATCHDOG] cpwd.c & riowd.c - unlocked_ioctl

Switch to unlocked_ioctl

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years agoqeth: fix wait_event_timeout handling
Heiko Carstens [Tue, 24 Mar 2009 20:57:19 +0000 (20:57 +0000)]
qeth: fix wait_event_timeout handling

wait_event_timeout just takes the numnber of jiffies to wait as
an argument. That value does not include jiffies itself.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqeth: check for completion of a running recovery
Ursula Braun [Tue, 24 Mar 2009 20:57:18 +0000 (20:57 +0000)]
qeth: check for completion of a running recovery

When a recovery is started for a qeth device, additional invocations
to change a mac address, to configure a VLAN interface on top, or to
add multicast addresses should wait till recovery is finished,
otherwise recovery might fail.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqeth: unregister MAC addresses during recovery.
Klaus-Dieter Wacker [Tue, 24 Mar 2009 20:57:17 +0000 (20:57 +0000)]
qeth: unregister MAC addresses during recovery.

qeth: Unregister MAC addresses from device (layer 2) during
recovery cycle. When the device is set online the MAC
addresses are registered again on the device.

Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>