]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agoudf: udf_CS0toUTF8 cleanup
marcin.slusarz@gmail.com [Wed, 30 Jan 2008 21:03:51 +0000 (22:03 +0100)]
udf: udf_CS0toUTF8 cleanup

- fix error handling - always zero output variable
- don't zero explicitely fields zeroed by memset
- mark "in" paramater as const
- remove outdated comment

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
17 years agomake udf_error() static
Adrian Bunk [Sun, 17 Feb 2008 08:19:55 +0000 (10:19 +0200)]
make udf_error() static

This patch makes the needlessly global udf_error() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
17 years agofs/udf: Use DIV_ROUND_UP
Julia Lawall [Thu, 14 Feb 2008 15:15:45 +0000 (16:15 +0100)]
fs/udf: Use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

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

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jan Kara <jack@suse.cz>
17 years agoudf: move headers out include/linux/
Christoph Hellwig [Fri, 22 Feb 2008 11:39:12 +0000 (12:39 +0100)]
udf: move headers out include/linux/

There's really no reason to keep udf headers in include/linux as they're
not used by anything but fs/udf/.

This patch merges most of include/linux/udf_fs_i.h into fs/udf/udf_i.h,
include/linux/udf_fs_sb.h into fs/udf/udf_sb.h and
include/linux/udf_fs.h into fs/udf/udfdecl.h.

The only thing remaining in include/linux/ is a stub of udf_fs_i.h
defining the four user-visible udf ioctls.  It's also moved from
unifdef-y to headers-y because it can be included unconditionally now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
17 years agoudf: kill useless file header comments for vfs method implementations
Christoph Hellwig [Fri, 22 Feb 2008 11:38:48 +0000 (12:38 +0100)]
udf: kill useless file header comments for vfs method implementations

There's not need to document vfs method invocation rules, we have
Documentation/filesystems/vfs.txt and Documentation/filesystems/Locking
for that.  Also a lot of these comments where either plain wrong or
horrible out of date.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
17 years agoudf: kill udf_set_blocksize
Christoph Hellwig [Fri, 22 Feb 2008 11:38:02 +0000 (12:38 +0100)]
udf: kill udf_set_blocksize

This helper has been quite useless since sb_min_blocksize was introduced
and is misnamed while we're at it.  Just opencode the few lines in the
caller instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
17 years agoclocksource: make clocksource watchdog cycle through online CPUs
Andi Kleen [Wed, 30 Jan 2008 12:30:02 +0000 (13:30 +0100)]
clocksource: make clocksource watchdog cycle through online CPUs

This way it checks if the clocks are synchronized between CPUs too.
This might be able to detect slowly drifting TSCs which only
go wrong over longer time.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoDocumentation: move timer related documentation to a single place
Thomas Gleixner [Wed, 5 Mar 2008 17:28:15 +0000 (18:28 +0100)]
Documentation: move timer related documentation to a single place

We have two directories with timer related information in
Documentation/: hrtimers/ and hrtimer/. timer_stats are not restricted
to hrtimers. Move all those files into Documentation/timers where we
can pile up other timer related docs as well.

Pointed-out-by: Randy Dunlap <randy@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoclockevents: optimise tick_nohz_stop_sched_tick() a bit
Karsten Wiese [Thu, 28 Feb 2008 14:10:50 +0000 (15:10 +0100)]
clockevents: optimise tick_nohz_stop_sched_tick() a bit

Call
ts = &per_cpu(tick_cpu_sched, cpu);
and
cpu = smp_processor_id();
once instead of twice.

No functional change done, as changed code runs with local irq off.
Reduces source lines and text size (20bytes on x86_64).

[ akpm@linux-foundation.org: Build fix ]

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agolocking: remove unused double_spin_lock()
Oleg Nesterov [Fri, 4 Apr 2008 18:54:10 +0000 (20:54 +0200)]
locking: remove unused double_spin_lock()

double_spin_lock() has no callers, and it can't be used without additional
lockdep annotations, remove it.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agohrtimers: simplify lockdep handling
Oleg Nesterov [Fri, 4 Apr 2008 18:54:10 +0000 (20:54 +0200)]
hrtimers: simplify lockdep handling

In order to avoid the false positive from lockdep, each per-cpu base->lock has
the separate lock class and migrate_hrtimers() uses double_spin_lock().

This is overcomplicated: except for migrate_hrtimers() we never take 2 locks
at once, and migrate_hrtimers() can use spin_lock_nested().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agotimers: simplify lockdep handling
Oleg Nesterov [Fri, 4 Apr 2008 18:54:10 +0000 (20:54 +0200)]
timers: simplify lockdep handling

In order to avoid the false positive from lockdep, each per-cpu base->lock has
the separate lock class and migrate_timers() uses double_spin_lock().

This all is overcomplicated: except for migrate_timers() we never take 2 locks
at once, and migrate_timers() can use spin_lock_nested().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoposix-timers: fix shadowed variables
WANG Cong [Fri, 4 Apr 2008 18:54:10 +0000 (20:54 +0200)]
posix-timers: fix shadowed variables

Fix sparse warnings like this:
kernel/posix-cpu-timers.c:1090:25: warning: symbol 't' shadows an earlier one
kernel/posix-cpu-timers.c:1058:21: originally declared here

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agotimer_list: add annotations to workqueue.c
Pavel Machek [Mon, 4 Feb 2008 23:48:13 +0000 (00:48 +0100)]
timer_list: add annotations to workqueue.c

Add timer list annotations to workqueue.c so we can see the call site
in the timer stats.

Signed-off-by: Pavel Machek <Pavel@suse.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agohrtimer: use nanosleep specific restart_block fields
Thomas Gleixner [Sun, 10 Feb 2008 08:17:43 +0000 (09:17 +0100)]
hrtimer: use nanosleep specific restart_block fields

Convert all the nanosleep related users of restart_block to the
new nanosleep specific restart_block fields.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agohrtimer: add nanosleep specific restart_block member
Thomas Gleixner [Sun, 10 Feb 2008 08:04:12 +0000 (09:04 +0100)]
hrtimer: add nanosleep specific restart_block member

The back and forth typecasting of restart_block->args is horrible. We
added a separate union member for futex already. Do the same for
nanosleep.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoUBI: initialize static volumes with vol->used_bytes
Jan Altenberg [Fri, 28 Mar 2008 15:13:53 +0000 (16:13 +0100)]
UBI: initialize static volumes with vol->used_bytes

I came across a problem which seems to be present since:

commit 941dfb07ed91451b1c58626a0d258dfdf468b593
UBI: set correct gluebi device size

ubi_create_gluebi() leaves mtd->size = 0 for static volumes. So even
existing static volumes are initialized with a size of 0.

Signed-off-by: Jan Altenberg <jan.altenberg@linutronix.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: improve Kconfig documentation
Artem Bityutskiy [Thu, 27 Mar 2008 15:18:45 +0000 (17:18 +0200)]
UBI: improve Kconfig documentation

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: fix error printing
Artem Bityutskiy [Tue, 12 Feb 2008 14:36:41 +0000 (16:36 +0200)]
UBI: fix error printing

Use existing ubi_err() as the rest of the code does.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: make ubi-header.h local
Artem Bityutskiy [Sat, 16 Feb 2008 13:42:52 +0000 (15:42 +0200)]
UBI: make ubi-header.h local

The new trend in linux is not to store headers which define
on-media format in the include/ directory, but instead, store
them locally. This is because these headers "do not define any
kernel<->userspace interface".

Do so for UBI as well.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: be verbose when debuggin is enabled
Artem Bityutskiy [Tue, 12 Feb 2008 11:26:31 +0000 (13:26 +0200)]
UBI: be verbose when debuggin is enabled

Make I/O function to be always verbose when about CRC errors
and magic number errors when I/O debugging is enabled.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoDocumentation: add UBI sysfs ABI docs
Artem Bityutskiy [Fri, 8 Feb 2008 10:13:08 +0000 (12:13 +0200)]
Documentation: add UBI sysfs ABI docs

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Greg KH <greg@kroah.com>
17 years ago[POWERPC] 85xx: minor .dts cleanups
Kumar Gala [Thu, 17 Apr 2008 06:29:14 +0000 (01:29 -0500)]
[POWERPC] 85xx: minor .dts cleanups

* remove #cpus from mpc8544ds.dts (not used anywhere else)
* remove memreserve from mpc8568mds.dts (not needed)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 85xx: Convert dts to v1 syntax
Kumar Gala [Thu, 17 Apr 2008 06:28:15 +0000 (01:28 -0500)]
[POWERPC] 85xx: Convert dts to v1 syntax

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 85xx: Fix compile warning
Kumar Gala [Wed, 16 Apr 2008 04:35:47 +0000 (23:35 -0500)]
[POWERPC] 85xx: Fix compile warning

arch/powerpc/platforms/85xx/mpc85xx_ads.c: In function ‘init_ioports’:
arch/powerpc/platforms/85xx/mpc85xx_ads.c:168: warning: initialization discards qualifiers from pointer target type

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: Enable FCM NAND and OF partitions in defconfig
Kumar Gala [Tue, 15 Apr 2008 23:13:30 +0000 (18:13 -0500)]
[POWERPC] 83xx: Enable FCM NAND and OF partitions in defconfig

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 86xx: Add device tree source for Wind River SBC8641D
Paul Gortmaker [Tue, 15 Apr 2008 22:41:31 +0000 (18:41 -0400)]
[POWERPC] 86xx: Add device tree source for Wind River SBC8641D

This adds in the device tree source for the SBC8641D, based
largely on the mpc8641_hpcn.dts.  The biggest differences are
the lack of a complex IRQ mapping (since no Uli/i8259 cascade)
and the different layout of devices on the localbus node.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 86xx: Add defconfig for Wind River SBC8641D board
Paul Gortmaker [Tue, 15 Apr 2008 22:41:32 +0000 (18:41 -0400)]
[POWERPC] 86xx: Add defconfig for Wind River SBC8641D board

This adds a sample defconfig for the Wind River SBC8641D
board, with SMP, PCI and NFS root enabled.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 86xx: Add support for Wind River SBC8641D board
Paul Gortmaker [Tue, 15 Apr 2008 22:41:30 +0000 (18:41 -0400)]
[POWERPC] 86xx: Add support for Wind River SBC8641D board

This adds support for the Wind River SBC8641D board, based
largely on the mpc86xx_hpcn support.  The biggest difference is
the lack of the Uli and the i8259 cascade, which simplifies things.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: mpc8313erdb - Enable FCM NAND and OF partitions in defconfig
Scott Wood [Tue, 15 Apr 2008 16:03:38 +0000 (11:03 -0500)]
[POWERPC] 83xx: mpc8313erdb - Enable FCM NAND and OF partitions in defconfig

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] cuboot-pq2: PCI fixes
Scott Wood [Tue, 15 Apr 2008 16:02:31 +0000 (11:02 -0500)]
[POWERPC] cuboot-pq2: PCI fixes

1. Detect (and bail out on) more conditions that violate the
assumptions of the setup code -- we assume in such cases that the device
tree is correct and reflects what the firmware did.

2. The inbound memory mask calculation was wrong.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] fsl_soc: Factor fsl_get_sys_freq() out of the wdt and spi inits.
Scott Wood [Tue, 15 Apr 2008 18:52:34 +0000 (13:52 -0500)]
[POWERPC] fsl_soc: Factor fsl_get_sys_freq() out of the wdt and spi inits.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: mpc837x_rdb: add simple-bus compatible matching
Anton Vorontsov [Tue, 18 Mar 2008 15:43:59 +0000 (18:43 +0300)]
[POWERPC] 83xx: mpc837x_rdb: add simple-bus compatible matching

This is needed to probe nor and nand flashes on the localbus.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Make Book-E debug handling SMP safe
Kumar Gala [Wed, 9 Apr 2008 21:15:40 +0000 (16:15 -0500)]
[POWERPC] Make Book-E debug handling SMP safe

global_dbcr0 needs to be a per cpu set of save areas instead of a single
global on all processors.

Also, we switch to using DBCR0_IDM to determine if the user space app is
being debugged as its a more consistent way.  In the future we should
support features like hardware breakpoint and watchpoints which will
have DBCR0_IDM set but not necessarily DBCR0_IC (single step).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] CPM: Always use new binding.
Scott Wood [Thu, 10 Apr 2008 20:45:02 +0000 (15:45 -0500)]
[POWERPC] CPM: Always use new binding.

The kconfig entry can go away once arch/ppc and references to the config in
drivers are removed.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] QE: fix sparse warnings
Anton Vorontsov [Tue, 11 Mar 2008 17:24:50 +0000 (20:24 +0300)]
[POWERPC] QE: fix sparse warnings

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] QE: export qe_get_brg_clk()
Anton Vorontsov [Tue, 11 Mar 2008 17:24:24 +0000 (20:24 +0300)]
[POWERPC] QE: export qe_get_brg_clk()

qe_get_brg_clk() will be used by the fsl_gtm routines.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] QE: immap_qe.h should include asm/io.h
Anton Vorontsov [Tue, 11 Mar 2008 17:24:21 +0000 (20:24 +0300)]
[POWERPC] QE: immap_qe.h should include asm/io.h

Headers should include prototypes they use, otherwise build will
break if we use it without explicitly including io.h:

  CC      arch/powerpc/sysdev/qe_lib/gtm.o
In file included from include/asm/qe.h:20,
                 from arch/powerpc/sysdev/qe_lib/gtm.c:18:
include/asm/immap_qe.h: In function ‘immrbar_virt_to_phys’:
include/asm/immap_qe.h:480: error: implicit declaration of function ‘virt_to_phys’
make[2]: *** [arch/powerpc/sysdev/qe_lib/gtm.o] Error 1
make[1]: *** [arch/powerpc/sysdev/qe_lib] Error 2

gtm.c needs qe.h (which includes immap_qe.h) to use qe_get_brg_clk().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] QE: implement qe_muram_offset
Anton Vorontsov [Tue, 11 Mar 2008 17:24:13 +0000 (20:24 +0300)]
[POWERPC] QE: implement qe_muram_offset

qe_muram_offset is the reverse of the qe_muram_addr, will be
used for the Freescale QE USB Host Controller driver.

This patch also moves qe_muram_addr into the qe.h header, plus
adds __iomem hints to use with sparse.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] fsl_lbc: implement few UPM routines
Anton Vorontsov [Fri, 11 Apr 2008 17:03:40 +0000 (21:03 +0400)]
[POWERPC] fsl_lbc: implement few UPM routines

Freescale UPM can be used to adjust localbus timings or to generate
orbitrary, pre-programmed "patterns" on the external Localbus signals.
This patch implements few routines so drivers could work with UPMs in
safe and generic manner.

So far there is just one user of these routines: Freescale UPM NAND
driver.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] fsl_elbc_nand: factor out localbus defines
Anton Vorontsov [Tue, 11 Mar 2008 17:23:28 +0000 (20:23 +0300)]
[POWERPC] fsl_elbc_nand: factor out localbus defines

This is needed to support other localbus peripherals, such as
NAND on FSL UPM.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] QE: UCC nodes cleanup
Anton Vorontsov [Fri, 11 Apr 2008 16:06:54 +0000 (20:06 +0400)]
[POWERPC] QE: UCC nodes cleanup

- get rid of `model = "UCC"' in the ucc nodes
  It isn't used anywhere, so remove it. If we'll ever need something
  like this, we'll use compatible property instead.
- replace last occurrences of device-id with cell-index.
  Drivers are modified for backward compatibility's sake.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] CPM: Move opcodes common to CPM1 and CPM2 to include/asm-powerpc/cpm.h
Laurent Pinchart [Thu, 10 Apr 2008 15:00:53 +0000 (17:00 +0200)]
[POWERPC] CPM: Move opcodes common to CPM1 and CPM2 to include/asm-powerpc/cpm.h

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] CPM2: Reset the CPM when early debugging is not enabled.
Laurent Pinchart [Thu, 10 Apr 2008 15:02:38 +0000 (17:02 +0200)]
[POWERPC] CPM2: Reset the CPM when early debugging is not enabled.

Similarly to what is done for PQ1-based platforms, this patch resets the
PQ2 Communication Processor Module in cpm2_reset() when early debugging is
not enabled. This helps avoiding conflicts when the boot loader configured
the CPM in an unexpected way.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] ep8248e: Reference SMC parameter RAM base in the device tree.
Laurent Pinchart [Thu, 10 Apr 2008 15:02:25 +0000 (17:02 +0200)]
[POWERPC] ep8248e: Reference SMC parameter RAM base in the device tree.

This patch modifies the Embedded Planet EP8248E device tree to reference the
SMC paramater RAM base register instead of the parameter RAM allocated by the
boot loader.

The cpm_uart driver will allocate parameter RAM itself, making the serial port
initialisation independent of the boot loader.

The patch adds the parameter RAM allocated by the boot loader in the CPM muram
node, making it available to the kernel.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] cpm-serial: Relocate CPM buffer descriptors and SMC parameter ram.
Laurent Pinchart [Thu, 10 Apr 2008 15:01:59 +0000 (17:01 +0200)]
[POWERPC] cpm-serial: Relocate CPM buffer descriptors and SMC parameter ram.

This patch relocates the buffer descriptors and the SMC parameter RAM at the
end of the first CPM muram chunk, as described in the device tree. This allows
device trees to stop excluding SMC parameter ram allocated by the boot loader
from the CPM muram node.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Add bootwrapper function to get virtual reg from the device tree.
Laurent Pinchart [Thu, 10 Apr 2008 15:03:04 +0000 (17:03 +0200)]
[POWERPC] Add bootwrapper function to get virtual reg from the device tree.

This patch adds a new generic device tree processing function that retrieves
virtual reg addresses from the device tree to the bootwrapper code. It also
updates the bootwrapper code to use the new function.

dt_get_virtual_reg() retrieves the virtual reg addresses from the
"virtual-reg" property. If the property can't be found, it uses the "reg"
property and walks the tree to translate it to absolute addresses.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] cpm_uart: Allocate DPRAM memory for SMC ports on CPM2-based platforms.
Laurent Pinchart [Thu, 10 Apr 2008 15:01:27 +0000 (17:01 +0200)]
[POWERPC] cpm_uart: Allocate DPRAM memory for SMC ports on CPM2-based platforms.

This patch allocates parameter RAM for SMC serial ports without relying on
previous initialisation by a boot loader or a wrapper layer.

SMC parameter RAM on CPM2-based platforms can be allocated anywhere in the
general-purpose areas of the dual-port RAM. The current code relies on the
boot loader to allocate a section of general-purpose CPM RAM and gets the
section address from the device tree.

This patch modifies the device tree address usage to reference the SMC
parameter RAM base pointer instead of a pre-allocated RAM section and
allocates memory from the CPM dual-port RAM when initialising the SMC port.
CPM1-based platforms are not affected.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 85xx: Enable DMA engine on the MPC8544 DS
Sebastian Siewior [Fri, 14 Mar 2008 23:01:30 +0000 (00:01 +0100)]
[POWERPC] 85xx: Enable DMA engine on the MPC8544 DS

Add the device tree node for the DMA engine on 8544, publish
the device and enable the driver in the defconfig.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx/85xx: Reorganize defconfigs
Kumar Gala [Wed, 9 Apr 2008 15:16:42 +0000 (10:16 -0500)]
[POWERPC] 83xx/85xx: Reorganize defconfigs

Board specific defconfigs are useful, however with the ability to do
multi-board defconfigs they aren't needed in the top level configs directory

Move the 83xx/85xx board specific defconfigs to individual directories under
arch/powerpc/configs.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Rework Book-E debug exception handling
Kumar Gala [Wed, 9 Apr 2008 11:06:11 +0000 (06:06 -0500)]
[POWERPC] Rework Book-E debug exception handling

The architecture allows for "Book-E" style debug interrupts to either go
to critial interrupts of their own debug interrupt level.  To allow for
a dynamic kernel to support machines of either type we want to be able to
compile in the interrupt handling code for both exception levels.

Towards this goal we renamed the debug handling macros to specify the
interrupt level in their name (DEBUG_CRIT_EXCEPTION/DebugCrit and
DEBUG_DEBUG_EXCEPTION/DebugDebug).

Additionally, on the Freescale Book-e parts we expanded the exception
stacks to cover the maximum case of needing three exception stacks (normal,
machine check and debug).

There is some kernel text space optimization to be gained if a kernel is
configured for a specific Freescale implementation but we aren't handling
that now to allow for the single kernel image support.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[S390] Remove code duplication from monreader / dcssblk.
Martin Schwidefsky [Thu, 17 Apr 2008 05:46:31 +0000 (07:46 +0200)]
[S390] Remove code duplication from monreader / dcssblk.

Move the function that prints the segment warning messages found in the
monreader driver and the dcssblk driver to the extmem base code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] kernel: show last breaking-event-address on oops
Christian Borntraeger [Thu, 17 Apr 2008 05:46:30 +0000 (07:46 +0200)]
[S390] kernel: show last breaking-event-address on oops

Newer s390 models have a breaking-event-address-recording register.
Each time an instruction causes a break in the sequential instruction
execution, the address is saved in that hardware register. On a program
interrupt the address is copied to the lowcore address 272-279, which
makes it software accessible.

This patch changes the program check handler and the stack overflow
checker to copy the value into the pt_regs argument.
The oops output is enhanced to show the last known breaking address.
It might give additional information if the stack trace is corrupted.

The feature is only available on 64 bit.

The new oops output looks like:

[---------snip----------]
Modules linked in: vmcp sunrpc qeth_l2 dm_mod qeth ccwgroup
CPU: 2 Not tainted 2.6.24zlive-host #8
Process modprobe (pid: 4788, task: 00000000bf3d8718, ksp: 00000000b2b0b8e0)
Krnl PSW : 0704200180000000 000003e000020028 (vmcp_init+0x28/0xe4 [vmcp])
           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
Krnl GPRS: 0000000004000002 000003e000020000 0000000000000000 0000000000000001
           000000000015734c ffffffffffffffff 000003e0000b3b00 0000000000000000
           000003e00007ca30 00000000b5bb5d40 00000000b5bb5800 000003e0000b3b00
           000003e0000a2000 00000000003ecf50 00000000b2b0bd50 00000000b2b0bcb0
Krnl Code: 000003e000020018c0c000040ff4       larl    %r12,3e0000a2000
           000003e00002001ee3e0f0000024       stg     %r14,0(%r15)
           000003e000020024a7f40001           brc     15,3e000020026
          >000003e000020028e310c0100004       lg      %r1,16(%r12)
           000003e00002002ec020000413dc       larl    %r2,3e0000a27e6
           000003e000020034c0a00004aee6       larl    %r10,3e0000b5e00
           000003e00002003aa7490001           lghi    %r4,1
           000003e00002003ea75900f0           lghi    %r5,240
Call Trace:
([<000000000014b300>] blocking_notifier_call_chain+0x2c/0x40)
 [<000000000015735c>] sys_init_module+0x19d8/0x1b08
 [<0000000000110afc>] sysc_noemu+0x10/0x16
 [<000002000011cda2>] 0x2000011cda2
Last Breaking-Event-Address:
 [<000003e000020024>] vmcp_init+0x24/0xe4 [vmcp]
[---------snip----------]

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] lowcore: Change type of lowcores softirq_pending to __u32.
Heiko Carstens [Thu, 17 Apr 2008 05:46:29 +0000 (07:46 +0200)]
[S390] lowcore: Change type of lowcores softirq_pending to __u32.

As noted by akpm:

> kernel/time/tick-sched.c: In function 'tick_nohz_stop_sched_tick':
> kernel/time/tick-sched.c:229: warning: format '%02x' expects type 'unsigned int', but argument 2 has type '__u64'
>
> I don't think the architecture's local_softirq_pending() should return u64.
> This is the sort of thing which should be consistent across architectures.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] zcrypt: Comments and kernel-doc cleanup
Felix Beck [Thu, 17 Apr 2008 05:46:28 +0000 (07:46 +0200)]
[S390] zcrypt: Comments and kernel-doc cleanup

Comments, which suggested to be kernel-doc but were not in the right
formatting, have been corrected. Additionally some minor cleanup in
the comments has been done.

Signed-off-by: Felix Beck <felix.beck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] uaccess: Always access the correct address space.
Heiko Carstens [Thu, 17 Apr 2008 05:46:27 +0000 (07:46 +0200)]
[S390] uaccess: Always access the correct address space.

The current uaccess page table walk code assumes at a few places that
any access is a user space access. This is not correct if somebody
has issued a set_fs(KERNEL_DS) in advance.
Add code which checks which address space we are in and with this make
sure we access the correct address space. This way we get also rid of
the dirty
if (!currrent-mm)
return -EFAULT;
hack in futex_atomic_cmpxchg_pt.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Fix a lot of sparse warnings.
Heiko Carstens [Thu, 17 Apr 2008 05:46:26 +0000 (07:46 +0200)]
[S390] Fix a lot of sparse warnings.

Most noteable part of this commit is the new local header file entry.h
which contains all the function declarations of functions that get only
called from asm code or are arch internal. That way we can avoid extern
declarations in C files.
This is more or less the same that was done for sparc64.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Convert s390 to GENERIC_CLOCKEVENTS.
Heiko Carstens [Thu, 17 Apr 2008 05:46:25 +0000 (07:46 +0200)]
[S390] Convert s390 to GENERIC_CLOCKEVENTS.

This way we get rid of s390's NO_IDLE_HZ and use the generic dynticks
variant instead. In addition we get high resolution timers for free.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] genirq/clockevents: move irq affinity prototypes/inlines to interrupt.h
Russell King [Thu, 17 Apr 2008 05:46:24 +0000 (07:46 +0200)]
[S390] genirq/clockevents: move irq affinity prototypes/inlines to interrupt.h

> Generic code is not supposed to include irq.h. Replace this include
> by linux/hardirq.h instead and add/replace an include of linux/irq.h
> in asm header files where necessary.
> This change should only matter for architectures that make use of
> GENERIC_CLOCKEVENTS.
> Architectures in question are mips, x86, arm, sh, powerpc, uml and sparc64.
>
> I did some cross compile tests for mips, x86_64, arm, powerpc and sparc64.
> This patch fixes also build breakages caused by the include replacement in
> tick-common.h.

I generally dislike adding optional linux/* includes in asm/* includes -
I'm nervous about this causing include loops.

However, there's a separate point to be discussed here.

That is, what interfaces are expected of every architecture in the kernel.
If generic code wants to be able to set the affinity of interrupts, then
that needs to become part of the interfaces listed in linux/interrupt.h
rather than linux/irq.h.

So what I suggest is this approach instead (against Linus' tree of a
couple of days ago) - we move irq_set_affinity() and irq_can_set_affinity()
to linux/interrupt.h, change the linux/irq.h includes to linux/interrupt.h
and include asm/irq_regs.h where needed (asm/irq_regs.h is supposed to be
rarely used include since not much touches the stacked parent context
registers.)

Build tested on ARM PXA family kernels and ARM's Realview platform
kernels which both use genirq.

[ tglx@linutronix.de: add GENERIC_HARDIRQ dependencies ]

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Convert monitor calls to function calls.
Heiko Carstens [Thu, 17 Apr 2008 05:46:23 +0000 (07:46 +0200)]
[S390] Convert monitor calls to function calls.

Remove the program check generating monitor calls and use function
calls instead. Theres is no real advantage in using monitor calls,
but they do make debugging harder, because of all the program checks
it generates.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] qdio (new feature): enhancing info-retrieval from QDIO-adapters
Ursula Braun [Thu, 17 Apr 2008 05:46:22 +0000 (07:46 +0200)]
[S390] qdio (new feature): enhancing info-retrieval from QDIO-adapters

Next generation of OSA adapters allows retrieval of further self-describing
infos. This is the preparational infrastructure patch for further exploitation
in the qeth driver.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] replace remaining __FUNCTION__ occurrences
Harvey Harrison [Thu, 17 Apr 2008 05:46:21 +0000 (07:46 +0200)]
[S390] replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] remove redundant display of free swap space in show_mem()
Johannes Weiner [Thu, 17 Apr 2008 05:46:20 +0000 (07:46 +0200)]
[S390] remove redundant display of free swap space in show_mem()

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] qdio: remove outdated developerworks link.
Ursula Braun [Thu, 17 Apr 2008 05:46:19 +0000 (07:46 +0200)]
[S390] qdio: remove outdated developerworks link.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Add debug_register_mode() function to debug feature API
Michael Holzheu [Thu, 17 Apr 2008 05:46:18 +0000 (07:46 +0200)]
[S390] Add debug_register_mode() function to debug feature API

The new function supports setting of permissions for the debugfs files
created by the debug feature. In addition to that, the function provides
uid and gid as parameters for future use. Currently only root is allowed
for uid and gid.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] crypto: use more descriptive function names for init/exit routines.
Heiko Carstens [Thu, 17 Apr 2008 05:46:17 +0000 (07:46 +0200)]
[S390] crypto: use more descriptive function names for init/exit routines.

Not very helpful when code dies in "init".
See also http://lkml.org/lkml/2008/3/26/557 .

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] switch sched_clock to store-clock-extended.
Jan Glauber [Thu, 17 Apr 2008 05:46:16 +0000 (07:46 +0200)]
[S390] switch sched_clock to store-clock-extended.

Add get_clock_xt to read an 8 byte clock value using store clock
extended (STCKE) and use get_clock_xt for sched_clock. STCKE should
be faster than STCK on newer machines.

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] zcrypt: add support for large random numbers
Ralph Wuerthner [Thu, 17 Apr 2008 05:46:15 +0000 (07:46 +0200)]
[S390] zcrypt: add support for large random numbers

This patch allows user space applications to access large amounts of
truly random data. The random data source is the build-in hardware
random number generator on the CEX2C cards.

Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] hw_random: allow rng_dev_read() to return hardware errors.
Ralph Wuerthner [Thu, 17 Apr 2008 05:46:14 +0000 (07:46 +0200)]
[S390] hw_random: allow rng_dev_read() to return hardware errors.

The api for hardware random number generators is currently limited to
devices that never fail. If the hardware is registered as a source for
random numbers it has to work. This prevents the use of i/o based
random number devices where the i/o might fail.

Add a check for errors after the read from a hardware random number device.

This patch is required to support large random numbers retrieved
from the CEX2C cards on System z.

Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Vertical cpu management.
Heiko Carstens [Thu, 17 Apr 2008 05:46:13 +0000 (07:46 +0200)]
[S390] Vertical cpu management.

If vertical cpu polarization is active then the hypervisor will
dispatch certain cpus for a longer time than other cpus for maximum
performance. For example if a guest would have three virtual cpus,
each of them with a share of 33 percent, then in case of vertical
cpu polarization all of the processing time would be combined to a
single cpu which would run all the time, while the other two cpus
would get nearly no cpu time.

There are three different types of vertical cpus: high, medium and
low. Low cpus hardly get any real cpu time, while high cpus get a
full real cpu. Medium cpus get something in between.

In order to switch between the two possible modes (default is
horizontal) a 0 for horizontal polarization or a 1 for vertical
polarization must be written to the dispatching sysfs attribute:

/sys/devices/system/cpu/dispatching

The polarization of each single cpu can be figured out by the
polarization sysfs attribute of each cpu:

/sys/devices/system/cpu/cpuX/polarization

horizontal, vertical:high, vertical:medium, vertical:low or unknown.

When switching polarization the polarization attribute may contain
the value unknown until the configuration change is done and the
kernel has figured out the new polarization of each cpu.

Note that running a system with different types of vertical cpus may
result in significant performance regressions. If possible only one
type of vertical cpus should be used. All other cpus should be
offlined.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] cpu topology support for s390.
Heiko Carstens [Thu, 17 Apr 2008 05:46:12 +0000 (07:46 +0200)]
[S390] cpu topology support for s390.

Add s390 backend so we can give the scheduler some hints about the
cpu topology.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Export stfle.
Heiko Carstens [Thu, 17 Apr 2008 05:46:11 +0000 (07:46 +0200)]
[S390] Export stfle.

Make stfle visible so other code can call this.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Add new fields for System z10 to /proc/sysinfo
Martin Schwidefsky [Thu, 17 Apr 2008 05:46:10 +0000 (07:46 +0200)]
[S390] Add new fields for System z10 to /proc/sysinfo

Add permanent and temporary model capacity and the corresponding
capacity value fields for the three capacity identifiers to the
output of /proc/sysinfo.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] KVM preparation: split sysinfo definitions for kvm use
Christian Borntraeger [Thu, 17 Apr 2008 05:46:09 +0000 (07:46 +0200)]
[S390] KVM preparation: split sysinfo definitions for kvm use

drivers/s390/sysinfo.c uses the store system information intruction to query
the system about information of the machine, the LPAR and additional
hypervisors. KVM has to implement the host part for this instruction.

To avoid code duplication, this patch splits the common definitions from
sysinfo.c into a separate header file include/asm-s390/sysinfo.h for KVM use.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] dasd: add sim handling.
Stefan Haberland [Thu, 17 Apr 2008 05:46:08 +0000 (07:46 +0200)]
[S390] dasd: add sim handling.

Now the system reports system information messages (SIM) to the user.
The System Reference Code (SRC) which is reported to the user gives
the abbility to lookup the reason of the SIM online in the
documentation of the storage server.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] exec_protect: Fix incorrect extern declarations.
Heiko Carstens [Thu, 17 Apr 2008 05:46:07 +0000 (07:46 +0200)]
[S390] exec_protect: Fix incorrect extern declarations.

sys_sigreturn and sys_rt_sigreturn don't take any arguments. So luckily
this resulted only in unneeded instead of incorrect code.
But still this clearly shows why one should not put extern declarations
in C files (will be fixed with a larger sparse patch).

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] vmur: Use wait queue instead of mutex to serialize open
Frank Munzert [Thu, 17 Apr 2008 05:46:06 +0000 (07:46 +0200)]
[S390] vmur: Use wait queue instead of mutex to serialize open

If user space opens a unit record device node then vmur is leaving the kernel
with lock open_mutex still held to prevent other processes from opening the
device simultaneously. This causes lockdep to complain about a lock held when
returning to user space.
Now the mutex is replaced by a wait queue to serialize device open.

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>
17 years ago[S390] tape: duplicate sysfs filename when setting tape device online
Michael Holzheu [Thu, 17 Apr 2008 05:46:05 +0000 (07:46 +0200)]
[S390] tape: duplicate sysfs filename when setting tape device online

When a tape device is set online, offline and online again, the following
error message is printed on the console: "sysfs: duplicate filename
'non-rewinding' can not be created". The reason is that when setting a
device online, the tape driver creates a sysfs symlink from the tape device
to the tape class device. Unfortunately the symlink is not removed
correctly, when the device is set offline. Instead of passing the
tape device object to sysfs_remove_link, the class device object is used.
This patch fixes this problem and uses the correct tape device object now.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] dasd: use GFP_DMA for fba private data allocation
Stefan Haberland [Thu, 17 Apr 2008 05:46:04 +0000 (07:46 +0200)]
[S390] dasd: use GFP_DMA for fba private data allocation

allocating dasd_fba_private without GFP_DMA results in IO error
during read device characteristics of a FBA disk

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] qdio: Unrecognized inbound traffic if many FCP devices are online
Ursula Braun [Thu, 17 Apr 2008 05:46:03 +0000 (07:46 +0200)]
[S390] qdio: Unrecognized inbound traffic if many FCP devices are online

Problem:
Usually every FCP device has its own indicator field the adapter
uses to signal outstanding work. Once a certain limit of devices
is reached, a common indicator field is used. In certain scenarios
qdio resets this common indicator field, but handles only part of
the FCP-devices sharing the common indicator field. Thus inbound
traffic on the non-processed shared FCP-devices is not recognized
immediately.

Solution:
Make sure common indicator field is reset only, if all FCP-devices
sharing the indicator are processed.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] sclp: Get rid of in_atomic() use.
Heiko Carstens [Thu, 17 Apr 2008 05:46:02 +0000 (07:46 +0200)]
[S390] sclp: Get rid of in_atomic() use.

Reintroduces in_interrupt() check in sclp_tty code. Add may_schedule
parameter to vt220 write function, so we can let the write function
know if it may schedule or not. So we disallow scheduling for all
console calls and may allow them for tty calls.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] cio: fix parallel cm_enable processing.
Michael Ernst [Thu, 17 Apr 2008 05:46:01 +0000 (07:46 +0200)]
[S390] cio: fix parallel cm_enable processing.

It is now possible to trigger cm_enable processing several times in
parallel without causing a kernel panic.

Signed-off-by: Michael Ernst <mernst@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] cio: Trigger verification on device/path not operational.
Cornelia Huck [Thu, 17 Apr 2008 05:46:00 +0000 (07:46 +0200)]
[S390] cio: Trigger verification on device/path not operational.

Currently, we don't do much on no path or no device situations during
normal user I/O, since we rely on reports regarding those events by
the machine. If we trigger a path verification to bring our device
state up-to-date, we (a) may recover from path failures earlier and
(b) better handle situations where the hardware/hypervisor doesn't
give us enough notifications.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] cio: Fix race for "fast" path gone/path back situations.
Cornelia Huck [Thu, 17 Apr 2008 05:45:59 +0000 (07:45 +0200)]
[S390] cio: Fix race for "fast" path gone/path back situations.

Make sure we wait for previous evaluations triggered by path state
changes to have settled before we manipulate path states again.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] allnoconfig build error.
Martin Schwidefsky [Thu, 17 Apr 2008 05:45:58 +0000 (07:45 +0200)]
[S390] allnoconfig build error.

Fix the following link error with allnoconfig:

vmem.c:(.text+0x175c): undefined reference to `smp_ptlb_all'
vmem.c:(.text+0x1b24): undefined reference to `smp_ptlb_all'
fork.c:(.text+0x4190): undefined reference to `smp_ptlb_all'
: undefined reference to `smp_ptlb_all'
: undefined reference to `smp_ptlb_all'
mm/built-in.o:: more undefined references to `smp_ptlb_all' follow
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Protect against sigaltstack wraparound.
Heiko Carstens [Thu, 17 Apr 2008 05:45:57 +0000 (07:45 +0200)]
[S390] Protect against sigaltstack wraparound.

This is just a port of 83bd01024b1fdfc41d9b758e5669e80fca72df66
"x86: protect against sigaltstack wraparound".

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] dasd: fix double elevator_exit call when deadline iosched fails to load
Josef 'Jeff' Sipek [Thu, 17 Apr 2008 05:45:56 +0000 (07:45 +0200)]
[S390] dasd: fix double elevator_exit call when deadline iosched fails to load

I compiled the kernel without deadline, and the dasd code exits the old
scheduler (CFQ), fails to load the new one (deadline), and then things just
hang - with one of these (sorry about the weird chars - I copy & pasted it
from a 3270 console):

dasd(eckd): 0.0.0151: 3390/0A(CU:3990/01) Cyl:3338 Head:15 Sec:224
------------ cut here ------------
Badness at kernel/mutex.c:134
Modules linked in: dasd_eckd_mod dasd_mod
CPU: 0 Not tainted 2.6.25-rc3 #9
Process exe (pid: 538, task: 000000000d172000, ksp: 000000000d21ef88)
Krnl PSW : 0404000180000000 000000000022fb5c (mutex_lock_nested+0x2a4/0x2cc)
           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0 EA:3
Krnl GPRS: 0000000000024218 000000000076fc78 0000000000000000 000000000000000f
           000000000022f92e 0000000000449898 000000000f921c00 000003e000162590
           00000000001539c4 000000000d172000 070000007fffffff 000000000d21f400
           000000000f8f2560 00000000002413f8 000000000022fb44 000000000d21f400
Krnl Code: 000000000022fb50bf2f1000           icm     %r2,15,0(%r1)
           000000000022fb54a774fef6           brc     7,22f940
           000000000022fb58a7f40001           brc     15,22fb5a
          >000000000022fb5ca7f4fef2           brc     15,22f940
           000000000022fb60c0e5fffa112a       brasl   %r14,171db4
           000000000022fb66: 1222               ltr     %r2,%r2
           000000000022fb68a784fedb           brc     8,22f91e
           000000000022fb6cc010002a0086       larl    %r1,76fc78
Call Trace:
(<000000000022f92e> mutex_lock_nested+0x76/0x2cc)
 <00000000001539c4> elevator_exit+0x38/0x80
 <0000000000156ffe> blk_cleanup_queue+0x62/0x7c
 <000003e0001d5414> dasd_change_state+0xe0/0x8ec
 <000003e0001d5cae> dasd_set_target_state+0x8e/0x9c
 <000003e0001d5f74> dasd_generic_set_online+0x160/0x284
 <000003e00011e83a> dasd_eckd_set_online+0x2e/0x40
 <0000000000199bf4> ccw_device_set_online+0x170/0x2c0
 <0000000000199d9e> online_store_recog_and_online+0x5a/0x14c
 <000000000019a08a> online_store+0xbe/0x2ec
 <000000000018456c> dev_attr_store+0x38/0x58
 <000000000010efbc> sysfs_write_file+0x130/0x190
 <00000000000af582> vfs_write+0xb2/0x160
 <00000000000afc7c> sys_write+0x54/0x9c
 <0000000000025e16> sys32_write+0x2e/0x50
 <0000000000024218> sysc_noemu+0x10/0x16
 <0000000077e82bd2> 0x77e82bd2

Set elevator pointer to NULL in order to avoid double elevator_exit
calls when elevator_init call for deadline iosched fails.
Also make sure the dasd device driver depends on IOSCHED_DEADLINE so
the default IO scheduler of the dasd driver is present.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years agoIB/iser: Don't change itt endianness
Erez Zilber [Thu, 17 Apr 2008 04:09:35 +0000 (21:09 -0700)]
IB/iser: Don't change itt endianness

The itt field in struct iscsi_data is not defined with any particular
endianness.  open-iscsi should use it as-is without byte-swapping it.
This fixes sparse warnings coming from doing ntohl(hdr->itt).

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mlx4: Update module version and release date
Jack Morgenstein [Thu, 17 Apr 2008 04:09:35 +0000 (21:09 -0700)]
IB/mlx4: Update module version and release date

The mlx4_ib driver is stable enough for production use, so bump the
version number to 1.0 to indicate this.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIPoIB: Handle case when P_Key is deleted and re-added at same index
Roland Dreier [Thu, 17 Apr 2008 04:09:35 +0000 (21:09 -0700)]
IPoIB: Handle case when P_Key is deleted and re-added at same index

If a P_Key is deleted and then re-added at the same index, then IPoIB
gets confused because __ipoib_ib_dev_flush() only checks whether the
index is the same without checking whether the P_Key was present, so
the interface is stopped when the P_Key is deleted, but the event when
the P_Key is re-added gets ignored and the interface never gets
restarted.

Also, switch to using ib_find_pkey() instead of ib_find_cached_pkey()
everywhere in IPoIB, since none of the places that look for P_Keys are
in a fast path or in non-sleeping context, and in general we want to
kill off the whole caching infrastructure eventually.  This also fixes
consistency problems caused because some IPoIB queries were cached and
some were uncached during the window where the cache was not updated.

Thanks to Venkata Subramonyam <vsubramo@cisco.com> for debugging this
problem and testing this fix.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/iser: Release connection resources on RDMA_CM_EVENT_DEVICE_REMOVAL event
Erez Zilber [Thu, 17 Apr 2008 04:09:35 +0000 (21:09 -0700)]
IB/iser: Release connection resources on RDMA_CM_EVENT_DEVICE_REMOVAL event

When a RDMA_CM_EVENT_DEVICE_REMOVAL event is raised, iSER should
release the connection resources.

This is necessary when the IB HCA module is unloaded while open-iscsi
is still running.  Currently, iSER just BUG()s.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mlx4: Fix incorrect comment
Eli Cohen [Thu, 17 Apr 2008 04:09:35 +0000 (21:09 -0700)]
IB/mlx4: Fix incorrect comment

mlx4 hardware does not support external DDR memory.  Moreover, UAR
area (BAR 2) can change depending on FW version.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mlx4: Fix race when detaching a QP from a multicast group
Eli Cohen [Thu, 17 Apr 2008 04:09:35 +0000 (21:09 -0700)]
IB/mlx4: Fix race when detaching a QP from a multicast group

When detaching the last QP from an MCG entry, we need to make
sure that at any time, there will be no entry with zero number of
QPs which is linked to the list of the MCGs of the corresponding
hash index.  So don't write back the MCG entry if we are removing the
last QP; just unlink the entry.

Also, remove an unnecessary MCG read when attaching a QP requires
allocation of a new entry in the AMGM.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/ehca: Support all ibv_devinfo values in query_device() and query_port()
Stefan Roscher [Thu, 17 Apr 2008 04:09:35 +0000 (21:09 -0700)]
IB/ehca: Support all ibv_devinfo values in query_device() and query_port()

Also, introduce a few inline helper functions to make the code more readable.

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoRDMA/nes: Free IRQ before killing tasklet
Roland Dreier [Thu, 17 Apr 2008 04:09:34 +0000 (21:09 -0700)]
RDMA/nes: Free IRQ before killing tasklet

Move the free_irq() call in nes_remove() to before the tasklet_kill();
otherwise there is a window after tasklet_kill() where a new interrupt
can be handled and reschedule the tasklet, leading to a use-after-free
crash.

Cc: <stable@kernel.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mthca: Update module version and release date
Jack Morgenstein [Thu, 17 Apr 2008 04:09:34 +0000 (21:09 -0700)]
IB/mthca: Update module version and release date

The ib_mthca driver has been stable for a while, so bump the version
number to 1.0 to indicate this.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mlx4: Update QP state if query QP succeeds
Dotan Barak [Thu, 17 Apr 2008 04:09:34 +0000 (21:09 -0700)]
IB/mlx4: Update QP state if query QP succeeds

If the QP was moved to another state (such as SQE) by the hardware,
then after this change the user won't have to set the IBV_QP_CUR_STATE
mask in order to execute modify QP in order to recover from this state.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mthca: Update QP state if query QP succeeds
Dotan Barak [Thu, 17 Apr 2008 04:09:34 +0000 (21:09 -0700)]
IB/mthca: Update QP state if query QP succeeds

If the QP was moved to another state (such as SQE) by the hardware,
then after this change the user won't have to set the IBV_QP_CUR_STATE
mask in order to execute modify QP in order to recover from this state.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoRDMA/amso1100: Add check for NULL reply_msg in c2_intr()
Tom Tucker [Thu, 17 Apr 2008 04:09:34 +0000 (21:09 -0700)]
RDMA/amso1100: Add check for NULL reply_msg in c2_intr()

Fix a place where we might dereference a NULL pointer; this fixes
Coverity CID 1392.  On inspection I also found a place where we could
attempt to kmem_cache_free() a NULL pointer, so fix this too.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mlx4: Add support for resizing CQs
Vladimir Sokolovsky [Thu, 17 Apr 2008 04:09:33 +0000 (21:09 -0700)]
IB/mlx4: Add support for resizing CQs

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>