]> Pileus Git - ~andy/linux/log
~andy/linux
15 years agosh: fix sh-sci / early printk build on sh7723
Magnus Damm [Tue, 20 Jan 2009 03:18:22 +0000 (12:18 +0900)]
sh: fix sh-sci / early printk build on sh7723

This patch adds the SCSPTR register to the sh-sci driver in
the case of sh7723 to make sure early printk builds properly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: export the sh7343 JPU to user space
Magnus Damm [Thu, 25 Dec 2008 09:55:26 +0000 (18:55 +0900)]
sh: export the sh7343 JPU to user space

This patch exports the sh7343 JPU to user space using uio_pdrv_genirq,
very similar to the sh7722 JPU patch by Hayama-san.

While at it fix up the end of the sh7722 JPU iomem resource.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: update defconfigs.
Paul Mundt [Tue, 13 Jan 2009 03:38:06 +0000 (12:38 +0900)]
sh: update defconfigs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoserial: sh-sci: Fix up SH7720/SH7721 SCI build.
Paul Mundt [Fri, 9 Jan 2009 07:32:08 +0000 (16:32 +0900)]
serial: sh-sci: Fix up SH7720/SH7721 SCI build.

Missing definitions for PORT_xxx defs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off obsolete busses from arch/sh/Kconfig.
Paul Mundt [Fri, 9 Jan 2009 06:12:30 +0000 (15:12 +0900)]
sh: Kill off obsolete busses from arch/sh/Kconfig.

ISA can go away now that the hd6446x PCMCIA drivers no longer exist
in-tree. The rationale for enabling CONFIG_ISA in the first place is
likewise no longer valid given that the subsystem has changed since
the time that assertion was valid.

While we are at it, kill off SBUS, MCA, EISA, and so on. These are
not supported and never will be.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh7785lcr/highlander/hp6xx need linux/irq.h.
Paul Mundt [Fri, 9 Jan 2009 06:11:58 +0000 (15:11 +0900)]
sh: sh7785lcr/highlander/hp6xx need linux/irq.h.

More build fixes..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Migo-R MMC support using spi_gpio and mmc_spi.
Magnus Damm [Wed, 7 Jan 2009 11:36:10 +0000 (20:36 +0900)]
sh: Migo-R MMC support using spi_gpio and mmc_spi.

This patch adds CN9 MMC support for MigoR using the mmc_spi
driver on top of the bitbanging spi_gpio driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoRevert "x86: signal: change type of paramter for sys_rt_sigreturn()"
Ingo Molnar [Tue, 20 Jan 2009 08:31:49 +0000 (09:31 +0100)]
Revert "x86: signal: change type of paramter for sys_rt_sigreturn()"

This reverts commit 4217458dafaa57d8e26a46f5d05ab8c53cf64191.

Justin Madru bisected this commit, it was causing weird Firefox
crashes.

The reason is that GCC mis-optimizes (re-uses) the on-stack parameters of
the calling frame, which corrupts the syscall return pt_regs state and
thus corrupts user-space register state.

So we go back to the slightly less clean but more optimization-safe
method of getting to pt_regs. Also add a comment to explain this.

Resolves: http://bugzilla.kernel.org/show_bug.cgi?id=12505

Reported-and-bisected-by: Justin Madru <jdm64@gawab.com>
Tested-by: Justin Madru <jdm64@gawab.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: use early clobbers in usercopy*.c
Andi Kleen [Fri, 16 Jan 2009 14:22:11 +0000 (15:22 +0100)]
x86: use early clobbers in usercopy*.c

Impact: fix rare (but currently harmless) miscompile with certain configs and gcc versions

Hugh Dickins noticed that strncpy_from_user() was miscompiled
in some circumstances with gcc 4.3.

Thanks to Hugh's excellent analysis it was easy to track down.

Hugh writes:

> Try building an x86_64 defconfig 2.6.29-rc1 kernel tree,
> except not quite defconfig, switch CONFIG_PREEMPT_NONE=y
> and CONFIG_PREEMPT_VOLUNTARY off (because it expands a
> might_fault() there, which hides the issue): using a
> gcc 4.3.2 (I've checked both openSUSE 11.1 and Fedora 10).
>
> It generates the following:
>
0000000000000000 <__strncpy_from_user>:
>    0:   48 89 d1                mov    %rdx,%rcx
>    3:   48 85 c9                test   %rcx,%rcx
>    6:   74 0e                   je     16 <__strncpy_from_user+0x16>
>    8:   ac                      lods   %ds:(%rsi),%al
>    9:   aa                      stos   %al,%es:(%rdi)
>    a:   84 c0                   test   %al,%al
>    c:   74 05                   je     13 <__strncpy_from_user+0x13>
>    e:   48 ff c9                dec    %rcx
>   11:   75 f5                   jne    8 <__strncpy_from_user+0x8>
>   13:   48 29 c9                sub    %rcx,%rcx
>   16:   48 89 c8                mov    %rcx,%rax
>   19:   c3                      retq
>
> Observe that "sub %rcx,%rcx; mov %rcx,%rax", whereas gcc 4.2.1
> (and many other configs) say "sub %rcx,%rdx; mov %rdx,%rax".
> Isn't it returning 0 when it ought to be returning strlen?

The asm constraints for the strncpy_from_user() result were missing an
early clobber, which tells gcc that the last output arguments
are written before all input arguments are read.

Also add more early clobbers in the rest of the file and fix 32-bit
usercopy.c in the same way.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
[ since this API is rarely used and no in-kernel user relies on a 'len'
  return value (they only rely on negative return values) this miscompile
  was never noticed in the field. But it's worth fixing it nevertheless. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosh: ap325rxa MMC support using spi_gpio and mmc_spi
Magnus Damm [Wed, 7 Jan 2009 11:35:21 +0000 (20:35 +0900)]
sh: ap325rxa MMC support using spi_gpio and mmc_spi

This patch adds CN3 MMC support for ap325rxa using the mmc_spi
driver on top of the bitbanging spi_gpio driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-x3proto: needs linux/irq.h.
Paul Mundt [Wed, 7 Jan 2009 08:45:02 +0000 (17:45 +0900)]
sh: mach-x3proto: needs linux/irq.h.

Since commit ba84be2338d3a2b6020d39279335bb06fcd332e1
("remove linux/hardirq.h from asm-generic/local.h"), the asm/irq.h
definitions that mach-x3proto/setup.c depends on are no longer available,
causing the build to die. So, include linux/irq.h explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Drop the BKL from sys_execve() on SH-5.
Paul Mundt [Wed, 7 Jan 2009 08:42:32 +0000 (17:42 +0900)]
sh: Drop the BKL from sys_execve() on SH-5.

Brings it in line with the SH implementation, the BKL is not
necessary here.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: convert rsk7203 to use smsc911x.
Steve Glendinning [Wed, 7 Jan 2009 08:22:24 +0000 (17:22 +0900)]
sh: convert rsk7203 to use smsc911x.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: convert magicpanelr2 platform to use smsc911x.
Steve Glendinning [Wed, 7 Jan 2009 08:21:29 +0000 (17:21 +0900)]
sh: convert magicpanelr2 platform to use smsc911x.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: convert ap325rxa platform to use smsc911x.
Steve Glendinning [Wed, 7 Jan 2009 08:20:07 +0000 (17:20 +0900)]
sh: convert ap325rxa platform to use smsc911x.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-migor: Add tw9910 support.
Kuninori Morimoto [Mon, 5 Jan 2009 07:25:16 +0000 (16:25 +0900)]
sh: mach-migor: Add tw9910 support.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-migor: Delete soc_camera_platform setup.
Kuninori Morimoto [Tue, 2 Dec 2008 07:42:24 +0000 (16:42 +0900)]
sh: mach-migor: Delete soc_camera_platform setup.

Migo-R can use ov772x camera driver in Linux 2.6.29.
Therefore, soc_camera_platform setting is no longer needed.
This patch removes it.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-migor: Add ov772x support.
Kuninori Morimoto [Tue, 2 Dec 2008 07:38:34 +0000 (16:38 +0900)]
sh: mach-migor: Add ov772x support.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoasm-sh/posix_types_{32,64}.h: drop __GLIBC__/__USE_ALL usage
Mike Frysinger [Fri, 2 Jan 2009 07:52:57 +0000 (02:52 -0500)]
asm-sh/posix_types_{32,64}.h: drop __GLIBC__/__USE_ALL usage

Bring sh in line with all the other ports.  Not sure how sh missed this
change as all the other arches were being updated ...

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoarch/sh/mm: Move a dereference below a NULL test
Julia Lawall [Fri, 26 Dec 2008 07:27:24 +0000 (08:27 +0100)]
arch/sh/mm: Move a dereference below a NULL test

If the NULL test is necessary, then the dereference should be moved below
the NULL test.

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

// <smpl>
@disable is_null@
identifier f;
expression E;
identifier fld;
statement S;
@@

+ if (E == NULL) S
  f(...,E->fld,...);
- if (E == NULL) S

@@
identifier f;
expression E;
identifier fld;
statement S;
@@

+ if (!E) S
  f(...,E->fld,...);
- if (!E) S
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoklist.c: bit 0 in pointer can't be used as flag
Jesper Nilsson [Wed, 14 Jan 2009 10:19:08 +0000 (11:19 +0100)]
klist.c: bit 0 in pointer can't be used as flag

The commit a1ed5b0cffe4b16a93a6a3390e8cee0fbef94f86
(klist: don't iterate over deleted entries) introduces use of the
low bit in a pointer to indicate if the knode is dead or not,
assuming that this bit is always free.

This is not true for all architectures, CRIS for example may align data
on byte borders.

The result is a bunch of warnings on bootup, devices not being
added correctly etc, reported by Hinko Kocevar <hinko.kocevar@cetrtapot.si>:

------------[ cut here ]------------
WARNING: at lib/klist.c:62 ()
Modules linked in:

Stack from c1fe1cf0:
       c01cc7f4 c1fe1d11 c000eb4e c000e4de 00000000 00000000 c1f4f78f c1f50c2d
       c01d008c c1fdd1a0 c1fdd1a0 c1fe1d38 c0192954 c1fe0000 00000000 c1fe1dc0
       00000002 7fffffff c1fe1da8 c0192d50 c1fe1dc0 00000002 7fffffff c1ff9fcc
Call Trace: [<c000eb4e>] [<c000e4de>] [<c0192954>] [<c0192d50>] [<c001d49e>] [<c000b688>] [<c0192a3c>]
       [<c000b63e>] [<c000b63e>] [<c001a542>] [<c00b55b0>] [<c00411c0>] [<c00b559c>] [<c01918e6>] [<c0191988>]
       [<c01919d0>] [<c00cd9c8>] [<c00cdd6a>] [<c0034178>] [<c000409a>] [<c0015576>] [<c0029130>] [<c0029078>]
       [<c0029170>] [<c0012336>] [<c00b4076>] [<c00b4770>] [<c006d6e4>] [<c006d974>] [<c006dca0>] [<c0028d6c>]
       [<c0028e12>] [<c0006424>] <4>---[ end trace 4eaa2a86a8e2da22 ]---
------------[ cut here ]------------
Repeat ad nauseam.

Wed, Jan 14, 2009 at 12:11:32AM +0100, Bastien ROUCARIES wrote:
> Perhaps using a pointerhackalign trick on this structure where
> #define pointerhackalign(x) __attribute__ ((aligned (x)))
> and declare
> struct klist_node {
> ...
> }  pointerhackalign(2);
>
> Because  __attribute__ ((aligned (x))) could only increase alignment
> it will safe to do that and serve as documentation purpose :)

That works, but we need to do it not for the struct klist_node,
but for the struct we insert into the void * in klist_node,
which is struct klist.

Reported-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si
Cc: Bastien ROUCARIES <roucaries.bastien@gmail.com>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodebugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n
Inaky Perez-Gonzalez [Tue, 20 Jan 2009 20:17:28 +0000 (12:17 -0800)]
debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n

Toralf Förster <toralf.foerster@gmx.de> reported a build failure in
the WiMAX stack when CONFIG_DEBUG_FS=n

http://linuxwimax.org/pipermail/wimax/2009-January/000449.html

This is due to debugfs_create_size_t() missing an stub that returns
-ENODEV when the DEBUGFS subsystem is not configured in (like the rest
of the debugfs API).

This patch adds said stub.

Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosysfs: fix problems with binary files
Greg Kroah-Hartman [Tue, 20 Jan 2009 23:51:16 +0000 (15:51 -0800)]
sysfs: fix problems with binary files

Some sysfs binary files don't like having 0 passed to them as a size.
Fix this up at the root by just returning to the vfs if userspace asks
us for a zero sized buffer.

Thanks to Pavel Roskin for pointing this out.

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoPNP: fix broken pnp lowercasing for acpi module aliases
Kay Sievers [Thu, 8 Jan 2009 02:06:42 +0000 (03:06 +0100)]
PNP: fix broken pnp lowercasing for acpi module aliases

Based on a patch from Brian, who identified the issue.

Signed-off-by: Bryan Kadzban <bryan@kadzban.is-a-geek.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver core: Convert '/' to '!' in dev_set_name()
Roland Dreier [Sat, 10 Jan 2009 06:27:42 +0000 (22:27 -0800)]
driver core: Convert '/' to '!' in dev_set_name()

Commit 3ada8b7e ("block: struct device - replace bus_id with dev_name(),
dev_set_name()") deleted the code in register_disk() that changed a '/'
to a '!' in the device name when registering a disk, but dev_set_name()
does not perform this conversion.

This leads to amusing problems with disks that have '/' in their names:
for example a failure to boot with the root partition on a cciss device,
even though the kernel says it knows about the root device:

    VFS: Cannot open root device "cciss/c0d0p6" or unknown-block(0,0)
    Please append a correct "root=" boot option; here are the available partitions:
    6800        71652960 cciss/c0d0 driver: cciss
      6802               1 cciss/c0d0p2
      6805         2931831 cciss/c0d0p5
      6806        34354908 cciss/c0d0p6
    6810        71652960 cciss/c0d1 driver: cciss

Fix this by adding code to change '/' to '!' in dev_set_name() to handle
this until dev_set_name() is converted to use kobject_set_name().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda: 83xxx port 0xe DAC selection
Matthew Ranostay [Tue, 20 Jan 2009 21:50:25 +0000 (16:50 -0500)]
ALSA: hda: 83xxx port 0xe DAC selection

On the 92hd8xxx codecs port 0xe needs the connection selected to be the
last DAC in the list.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Timur Tabi [Mon, 19 Jan 2009 23:14:24 +0000 (17:14 -0600)]
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers

The Freescale MPC8610 driver was defining two SOC card (snd_soc_card)
structures, partially initializing each one, but registering only one of
them with ASoC.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agox86: remove kernel_physical_mapping_init() from init section
Gary Hade [Mon, 19 Jan 2009 21:46:41 +0000 (13:46 -0800)]
x86: remove kernel_physical_mapping_init() from init section

Impact: fix crash with memory hotplug enabled

kernel_physical_mapping_init() is called during memory hotplug
so it does not belong in the init section.

If the kernel is built with CONFIG_DEBUG_SECTION_MISMATCH=y on
the make command line, arch/x86/mm/init_64.c is compiled with
the -fno-inline-functions-called-once gcc option defeating
inlining of kernel_physical_mapping_init() within init_memory_mapping().

When kernel_physical_mapping_init() is not inlined it is placed
in the .init.text section according to the __init in it's current
declaration.  A later call to kernel_physical_mapping_init() during
a memory hotplug operation encounters an int3 trap because the
.init.text section memory has been freed.

This patch eliminates the crash caused by the int3 trap by moving the
non-inlined kernel_physical_mapping_init() from .init.text to .meminit.text.

Signed-off-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agofix: crash: IP: __bitmap_intersects+0x48/0x73
Ingo Molnar [Thu, 15 Jan 2009 14:46:08 +0000 (15:46 +0100)]
fix: crash: IP: __bitmap_intersects+0x48/0x73

-tip testing found this crash:

> [   35.258515] calling  acpi_cpufreq_init+0x0/0x127 @ 1
> [   35.264127] BUG: unable to handle kernel NULL pointer dereference at (null)
> [   35.267554] IP: [<ffffffff80478092>] __bitmap_intersects+0x48/0x73
> [   35.267554] PGD 0
> [   35.267554] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC

arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c is still broken: there's no
allocation of the variable mask, so we pass in an uninitialized cmd.mask
field to drv_read(), which then passes it to the scheduler which then
crashes ...

Switch it over to the much simpler constant-cpumask-pointers approach.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoi.MX31: Image Processing Unit DMA and IRQ drivers
Guennadi Liakhovetski [Mon, 19 Jan 2009 22:36:21 +0000 (15:36 -0700)]
i.MX31: Image Processing Unit DMA and IRQ drivers

i.MX3x SoCs contain an Image Processing Unit, consisting of a Control
Module (CM), Display Interface (DI), Synchronous Display Controller (SDC),
Asynchronous Display Controller (ADC), Image Converter (IC), Post-Filter
(PF), Camera Sensor Interface (CSI), and an Image DMA Controller (IDMAC).
CM contains, among other blocks, an Interrupt Generator (IG) and a Clock
and Reset Control Unit (CRCU). This driver serves IDMAC and IG. They are
supported over dmaengine and irq-chip APIs respectively.

IDMAC is a specialised DMA controller, its DMA channels cannot be used for
general-purpose operations, even though it might be possible to configure
a memory-to-memory channel for memcpy operation. This driver will not work
with generic dmaengine clients, clients, wishing to use it must use
respective wrapper structures, they also must specify which channels they
require, as channels are hard-wired to specific IPU functions.

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agodmaengine: add async_tx_clear_ack() macro
Guennadi Liakhovetski [Mon, 19 Jan 2009 22:36:21 +0000 (15:36 -0700)]
dmaengine: add async_tx_clear_ack() macro

To complete the DMA_CTRL_ACK handling API add a async_tx_clear_ack() macro.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agodmaengine: dma_issue_pending_all == nop when CONFIG_DMA_ENGINE=n
Dan Williams [Mon, 19 Jan 2009 22:33:14 +0000 (15:33 -0700)]
dmaengine: dma_issue_pending_all == nop when CONFIG_DMA_ENGINE=n

The device list will always be empty in this configuration, so no need
to walk the list.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agodmaengine: kill some dubious WARN_ONCEs
Dan Williams [Mon, 19 Jan 2009 21:39:10 +0000 (14:39 -0700)]
dmaengine: kill some dubious WARN_ONCEs

dma_find_channel and dma_issue_pending_all are good places to warn about
improper api usage.  However, warning correctly means synchronizing with
dma_list_mutex, i.e. too much overhead for these fast-path calls.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agocpufreq: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write
Mike Travis [Fri, 16 Jan 2009 23:31:15 +0000 (15:31 -0800)]
cpufreq: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write

Impact: use new work_on_cpu function to reduce stack usage

Replace the saving of current->cpus_allowed and set_cpus_allowed_ptr() with
a work_on_cpu function for drv_read() and drv_write().

Basically converts do_drv_{read,write} into "work_on_cpu" functions that
are now called by drv_read and drv_write.

Note: This patch basically reverts 50c668d6 which reverted 7503bfba, now
that the work_on_cpu() function is more stable.

Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Dieter Ries <clip2@gmx.de>
Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Cc: Dave Jones <davej@redhat.com>
Cc: <cpufreq@vger.kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agowork_on_cpu: Use our own workqueue.
Rusty Russell [Fri, 16 Jan 2009 23:31:15 +0000 (15:31 -0800)]
work_on_cpu: Use our own workqueue.

Impact: remove potential clashes with generic kevent workqueue

Annoyingly, some places we want to use work_on_cpu are already in
workqueues.  As per Ingo's suggestion, we create a different workqueue
for work_on_cpu.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agowork_on_cpu: don't try to get_online_cpus() in work_on_cpu.
Rusty Russell [Fri, 16 Jan 2009 23:31:15 +0000 (15:31 -0800)]
work_on_cpu: don't try to get_online_cpus() in work_on_cpu.

Impact: remove potential circular lock dependency with cpu hotplug lock

This has caused more problems than it solved, with a pile of cpu
hotplug locking issues.

Followup patches will get_online_cpus() in callers that need it, but
if they don't do it they're no worse than before when they were using
set_cpus_allowed without locking.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoPCI hotplug: fix lock imbalance in pciehp
Jiri Slaby [Sat, 17 Jan 2009 15:23:55 +0000 (16:23 +0100)]
PCI hotplug: fix lock imbalance in pciehp

set_lock_status omits mutex_unlock in fail path. Add the omitted
unlock.

As a result a lockup caused by this can be triggered from userspace
by writing 1 to /sys/bus/pci/slots/.../lock often enough.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoMerge branch 'topic/virtuoso' into for-linus
Takashi Iwai [Mon, 19 Jan 2009 13:08:25 +0000 (14:08 +0100)]
Merge branch 'topic/virtuoso' into for-linus

15 years agosound: virtuoso: document HDAV1.3 driver status
Clemens Ladisch [Mon, 19 Jan 2009 09:08:38 +0000 (10:08 +0100)]
sound: virtuoso: document HDAV1.3 driver status

Mention in the Kconfig help text that the HDAV1.3 code is rather
experimental.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agosound: virtuoso: add newline
Clemens Ladisch [Mon, 19 Jan 2009 09:07:58 +0000 (10:07 +0100)]
sound: virtuoso: add newline

Add a missing newline.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agosound: virtuoso: enable UART on Xonar HDAV1.3
Clemens Ladisch [Mon, 19 Jan 2009 09:07:21 +0000 (10:07 +0100)]
sound: virtuoso: enable UART on Xonar HDAV1.3

This hardware has a better chance of working correctly if we don't
forget to enable it.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agodrivers/ide/palm_bk3710.c buildfix
David Brownell [Mon, 19 Jan 2009 12:46:57 +0000 (13:46 +0100)]
drivers/ide/palm_bk3710.c buildfix

CC      drivers/ide/palm_bk3710.o
drivers/ide/palm_bk3710.c: In function 'palm_bk3710_probe':
drivers/ide/palm_bk3710.c:382: warning: assignment makes integer from pointer without a cast

Someone should fix hw_regs_t to neither be a typedef, nor
use "unsigned long" where it should use "void __iomem *".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: fix Falcon IDE breakage
Michael Schmitz [Mon, 19 Jan 2009 12:46:56 +0000 (13:46 +0100)]
ide: fix Falcon IDE breakage

[m68k] Falcon IDE: always serialize, in order to force execution of
       ide_get_lock() and friends.

Signed-off-By: Michael Schmitz <schmitz@debian.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
[bart: set flag in falconide_port_info instead of falconide_init()]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: fix IDE PMAC breakage
Andreas Schwab [Mon, 19 Jan 2009 12:46:56 +0000 (13:46 +0100)]
ide: fix IDE PMAC breakage

Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> writes:

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
>  drivers/ide/ide-probe.c |    9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> Index: b/drivers/ide/ide-probe.c
> ===================================================================
> --- a/drivers/ide/ide-probe.c
> +++ b/drivers/ide/ide-probe.c
> @@ -640,14 +640,9 @@ static int ide_register_port(ide_hwif_t
>   /* register with global device tree */
>   dev_set_name(&hwif->gendev, hwif->name);
>   hwif->gendev.driver_data = hwif;
> - if (hwif->gendev.parent == NULL) {
> - if (hwif->dev)
> - hwif->gendev.parent = hwif->dev;
> - else
> - /* Would like to do = &device_legacy */
> - hwif->gendev.parent = NULL;
> - }
> + hwif->gendev.parent = hwif->dev;

This [bart: commit 96d40941236722777c259775640b8880b7dc6f33 ("ide: small
ide_register_port() cleanup")] breaks ide-pmac.  It overwrites the parent
that pmac_ide_macio_attach has set.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agodrm: fix leak of device mappings since multi-master changes.
Dave Airlie [Mon, 19 Jan 2009 07:17:58 +0000 (17:17 +1000)]
drm: fix leak of device mappings since multi-master changes.

Device maps now contain a link to the master that created them, so
when cleaning up the master, remove any maps that are connected to it.
Also delete any remaining maps at driver unload time.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years ago[XFS] Remove the rest of the macro-to-function indirections.
Eric Sandeen [Thu, 15 Jan 2009 05:22:07 +0000 (23:22 -0600)]
[XFS] Remove the rest of the macro-to-function indirections.

Remove the last of the macros-defined-to-static-functions.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years agoxfs: sanity check attr fork size
Christoph Hellwig [Mon, 19 Jan 2009 01:04:16 +0000 (02:04 +0100)]
xfs: sanity check attr fork size

Recently we have quite a few kerneloops reports about dereferencing a NULL
if_data in the attribute fork.  From looking over the code this can only
happen if we pass a 0 size argument to xfs_iformat_local.  This implies some
sort of corruption and in fact the only mailinglist report about this from
earlier this year was after a powerfail presumably on a system with write
cache and without barriers.

Add a quick sanity check for the attr fork size in xfs_iformat to catch
these early and without an oops.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
15 years agoxfs: fix bad_features2 fixups for the root filesystem
Christoph Hellwig [Mon, 19 Jan 2009 01:04:07 +0000 (02:04 +0100)]
xfs: fix bad_features2 fixups for the root filesystem

Currently the bad_features2 fixup and the alignment updates in the superblock
are skipped if we mount a filesystem read-only.  But for the root filesystem
the typical case is to mount read-only first and only later remount writeable
so we'll never perform this update at all.  It's not a big problem but means
the logs of people needing the fixup get spammed at every boot because they
never happen on disk.

Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
15 years agoxfs: add a lock class for group/project dquots
Christoph Hellwig [Mon, 19 Jan 2009 01:03:25 +0000 (02:03 +0100)]
xfs: add a lock class for group/project dquots

We can have both a user and a group/project dquot locked at the same time,
as long as the user dquot is locked first.  Tell lockdep about that fact
by making the group/project dquots a different lock class.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
15 years agoxfs: lockdep annotations for xfs_dqlock2
Christoph Hellwig [Mon, 19 Jan 2009 01:03:19 +0000 (02:03 +0100)]
xfs: lockdep annotations for xfs_dqlock2

xfs_dqlock2 locks two xfs_dquots, which is fine as it always locks the
dquot with the lower id first.  Use mutex_lock_nested to tell lockdep
about this fact.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
15 years agoxfs: add a separate lock class for the per-mount list of dquots
Christoph Hellwig [Mon, 19 Jan 2009 01:03:11 +0000 (02:03 +0100)]
xfs: add a separate lock class for the per-mount list of dquots

We can have both a a quota hash chain and the per-mount list locked at
the same time.  But given that both use the same struct dqhash as list
head we have to tell lockdep that they are different lock classes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
15 years agoxfs: use mnt_want_write in compat_attrmulti ioctl
Christoph Hellwig [Mon, 19 Jan 2009 01:03:03 +0000 (02:03 +0100)]
xfs: use mnt_want_write in compat_attrmulti ioctl

The compat version of the attrmulti ioctl needs to ask for and then
later release write access to the mount just like the native version,
otherwise we could potentially write to read-only mounts.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
15 years agoxfs: fix dentry aliasing issues in open_by_handle
Christoph Hellwig [Mon, 19 Jan 2009 01:02:57 +0000 (02:02 +0100)]
xfs: fix dentry aliasing issues in open_by_handle

Open by handle just grabs an inode by handle and then creates itself
a dentry for it.  While this works for regular files it is horribly
broken for directories, where the VFS locking relies on the fact that
there is only just one single dentry for a given inode, and that
these are always connected to the root of the filesystem so that
it's locking algorithms work (see Documentations/filesystems/Locking)

Remove all the existing open by handle code and replace it with a small
wrapper around the exportfs code which deals with all these issues.
At the same time we also make the checks for a valid handle strict
enough to reject all not perfectly well formed handles - given that
we never hand out others that's okay and simplifies the code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
15 years agox86: fix section mismatch warnings in kernel/setup_percpu.c
Leonardo Potenza [Sun, 18 Jan 2009 22:03:56 +0000 (23:03 +0100)]
x86: fix section mismatch warnings in kernel/setup_percpu.c

The function setup_cpu_local_masks() has been marked __init, in
order to remove the following section mismatch messages:

WARNING: vmlinux.o(.text+0x3c2c7): Section mismatch in reference from the function setup_cpu_local_masks() to the function .init.text:alloc_bootmem_cpumask_var()
The function setup_cpu_local_masks() references
the function __init alloc_bootmem_cpumask_var().
This is often because setup_cpu_local_masks lacks a __init
annotation or the annotation of alloc_bootmem_cpumask_var is wrong.

WARNING: vmlinux.o(.text+0x3c2d3): Section mismatch in reference from the function setup_cpu_local_masks() to the function .init.text:alloc_bootmem_cpumask_var()
The function setup_cpu_local_masks() references
the function __init alloc_bootmem_cpumask_var().
This is often because setup_cpu_local_masks lacks a __init
annotation or the annotation of alloc_bootmem_cpumask_var is wrong.

WARNING: vmlinux.o(.text+0x3c2df): Section mismatch in reference from the function setup_cpu_local_masks() to the function .init.text:alloc_bootmem_cpumask_var()
The function setup_cpu_local_masks() references
the function __init alloc_bootmem_cpumask_var().
This is often because setup_cpu_local_masks lacks a __init
annotation or the annotation of alloc_bootmem_cpumask_var is wrong.

WARNING: vmlinux.o(.text+0x3c2eb): Section mismatch in reference from the function setup_cpu_local_masks() to the function .init.text:alloc_bootmem_cpumask_var()
The function setup_cpu_local_masks() references
the function __init alloc_bootmem_cpumask_var().
This is often because setup_cpu_local_masks lacks a __init
annotation or the annotation of alloc_bootmem_cpumask_var is wrong.

Signed-off-by: Leonardo Potenza <lpotenza@inwind.it>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agohrtimers: fix inconsistent lock state on resume in hres_timers_resume
Peter Zijlstra [Sun, 18 Jan 2009 15:39:29 +0000 (16:39 +0100)]
hrtimers: fix inconsistent lock state on resume in hres_timers_resume

Andrey Borzenkov reported this lockdep assert:

> [17854.688347] =================================
> [17854.688347] [ INFO: inconsistent lock state ]
> [17854.688347] 2.6.29-rc2-1avb #1
> [17854.688347] ---------------------------------
> [17854.688347] inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
> [17854.688347] pm-suspend/18240 [HC0[0]:SC0[0]:HE1:SE1] takes:
> [17854.688347]  (&cpu_base->lock){++..}, at: [<c0136fcc>] retrigger_next_event+0x5c/0xa0
> [17854.688347] {in-hardirq-W} state was registered at:
> [17854.688347]   [<c01443cd>] __lock_acquire+0x79d/0x1930
> [17854.688347]   [<c01455bc>] lock_acquire+0x5c/0x80
> [17854.688347]   [<c03092e5>] _spin_lock+0x35/0x70
> [17854.688347]   [<c0136e61>] hrtimer_run_queues+0x31/0x140
> [17854.688347]   [<c0128d98>] run_local_timers+0x8/0x20
> [17854.688347]   [<c0128dd3>] update_process_times+0x23/0x60
> [17854.688347]   [<c013e274>] tick_periodic+0x24/0x80
> [17854.688347]   [<c013e2e2>] tick_handle_periodic+0x12/0x70
> [17854.688347]   [<c0104e24>] timer_interrupt+0x14/0x20
> [17854.688347]   [<c01607b9>] handle_IRQ_event+0x29/0x60
> [17854.688347]   [<c0161c59>] handle_level_irq+0x69/0xe0
> [17854.688347]   [<ffffffff>] 0xffffffff
> [17854.688347] irq event stamp: 55771
> [17854.688347] hardirqs last  enabled at (55771): [<c0309125>] _spin_unlock_irqrestore+0x35/0x60
> [17854.688347] hardirqs last disabled at (55770): [<c0309419>] _spin_lock_irqsave+0x19/0x80
> [17854.688347] softirqs last  enabled at (54836): [<c0124f54>] __do_softirq+0xc4/0x110
> [17854.688347] softirqs last disabled at (54831): [<c01049ae>] do_softirq+0x8e/0xe0
> [17854.688347]
> [17854.688347] other info that might help us debug this:
> [17854.688347] 3 locks held by pm-suspend/18240:
> [17854.688347]  #0:  (&buffer->mutex){--..}, at: [<c01dd4c5>] sysfs_write_file+0x25/0x100
> [17854.688347]  #1:  (pm_mutex){--..}, at: [<c015056f>] enter_state+0x4f/0x140
> [17854.688347]  #2:  (dpm_list_mtx){--..}, at: [<c027880f>] device_pm_lock+0xf/0x20
> [17854.688347]
> [17854.688347] stack backtrace:
> [17854.688347] Pid: 18240, comm: pm-suspend Not tainted 2.6.29-rc2-1avb #1
> [17854.688347] Call Trace:
> [17854.688347]  [<c0306248>] ? printk+0x18/0x20
> [17854.688347]  [<c0141fac>] print_usage_bug+0x16c/0x1d0
> [17854.688347]  [<c0142bcf>] mark_lock+0x8bf/0xc90
> [17854.688347]  [<c0106b8f>] ? pit_next_event+0x2f/0x40
> [17854.688347]  [<c01441b0>] __lock_acquire+0x580/0x1930
> [17854.688347]  [<c030916d>] ? _spin_unlock+0x1d/0x20
> [17854.688347]  [<c0106b8f>] ? pit_next_event+0x2f/0x40
> [17854.688347]  [<c013dd38>] ? clockevents_program_event+0x98/0x160
> [17854.688347]  [<c0142fe8>] ? mark_held_locks+0x48/0x90
> [17854.688347]  [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
> [17854.688347]  [<c0143229>] ? trace_hardirqs_on_caller+0x139/0x190
> [17854.688347]  [<c014328b>] ? trace_hardirqs_on+0xb/0x10
> [17854.688347]  [<c01455bc>] lock_acquire+0x5c/0x80
> [17854.688347]  [<c0136fcc>] ? retrigger_next_event+0x5c/0xa0
> [17854.688347]  [<c03092e5>] _spin_lock+0x35/0x70
> [17854.688347]  [<c0136fcc>] ? retrigger_next_event+0x5c/0xa0
> [17854.688347]  [<c0136fcc>] retrigger_next_event+0x5c/0xa0
> [17854.688347]  [<c013711a>] hres_timers_resume+0xa/0x10
> [17854.688347]  [<c013aa8e>] timekeeping_resume+0xee/0x150
> [17854.688347]  [<c0273384>] __sysdev_resume+0x14/0x50
> [17854.688347]  [<c0273407>] sysdev_resume+0x47/0x80
> [17854.688347]  [<c02791ab>] device_power_up+0xb/0x20
> [17854.688347]  [<c015043f>] suspend_devices_and_enter+0xcf/0x150
> [17854.688347]  [<c0150c2f>] ? freeze_processes+0x3f/0x90
> [17854.688347]  [<c0150614>] enter_state+0xf4/0x140
> [17854.688347]  [<c01506dd>] state_store+0x7d/0xc0
> [17854.688347]  [<c0150660>] ? state_store+0x0/0xc0
> [17854.688347]  [<c0202da4>] kobj_attr_store+0x24/0x30
> [17854.688347]  [<c01dd53c>] sysfs_write_file+0x9c/0x100
> [17854.688347]  [<c019916c>] vfs_write+0x9c/0x160
> [17854.688347]  [<c0103494>] ? restore_nocheck_notrace+0x0/0xe
> [17854.688347]  [<c01dd4a0>] ? sysfs_write_file+0x0/0x100
> [17854.688347]  [<c01992ed>] sys_write+0x3d/0x70
> [17854.688347]  [<c0103371>] sysenter_do_call+0x12/0x31

Andrey's analysis:

> timekeeping_resume() is called via class ->resume
> method; and according to comments in sysdev_resume() and
> device_power_up(), they are called with interrupts disabled.
>
> Looking at suspend_enter, irqs *are* disabled at this point.
>
> So it actually looks like something (may be some driver)
> unconditionally enabled irqs in resume path.

Add a debug check to test this theory. If it triggers then it
triggers because the resume code calls it with irqs enabled,
which is a no-no not just for timekeeping_resume(), but also
bad for a number of other resume handlers.

Reported-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: put trigger in to detect mismatched apic versions
Mike Travis [Fri, 16 Jan 2009 23:22:16 +0000 (15:22 -0800)]
x86: put trigger in to detect mismatched apic versions

Impact: add debug warning

Fire off one message if two apic's discovered with different
apic versions. (this code is only called during CPU init)

The goal of this is to pave the way of the removal of the apic_version[]
array. We dont expect any apic version incompatibilities in the x86
landscape of systems [if so we dont handle them very well and probably
never will handle deep apic version assymetries well], but it's prudent
to have a debug check for one kernel cycle nevertheless.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: define ARCH_WANT_FRAME_POINTERS
Jeff Mahoney [Fri, 16 Jan 2009 18:23:35 +0000 (13:23 -0500)]
x86: define ARCH_WANT_FRAME_POINTERS

Commit da4276b8299a6544dc41ac2485d3ffca5811b3fb changed a dependency
for FRAME_POINTER from X86 to ARCH_WANT_FRAME_POINTERS, but didn't
actually define it.

This patch adds the definition for ARCH_WANT_FRAME_POINTERS. Without it,
FRAME_POINTER can't be enabled on x86.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agorelay: fix lock imbalance in relay_late_setup_files
Jiri Slaby [Sat, 17 Jan 2009 11:04:36 +0000 (12:04 +0100)]
relay: fix lock imbalance in relay_late_setup_files

One fail path in relay_late_setup_files() omits
mutex_unlock(&relay_channels_mutex);
Add it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'topic/oss-cleanup' into for-linus
Takashi Iwai [Sun, 18 Jan 2009 10:06:41 +0000 (11:06 +0100)]
Merge branch 'topic/oss-cleanup' into for-linus

15 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Sun, 18 Jan 2009 10:06:37 +0000 (11:06 +0100)]
Merge branch 'topic/hda' into for-linus

15 years agosound: Remove removed OSS kernel parameters from doc
Henrik Kretzschmar [Sun, 18 Jan 2009 09:40:24 +0000 (10:40 +0100)]
sound: Remove removed OSS kernel parameters from doc

Remove removed OSS kernel parameters from kernel-parameters.txt

Remove the kernel parameters from the OSS drivers of the chips
es1371 (removed 10-2007/2.6.24) and
cs4232 (removed 02-2008/2.6.25) from the kernel parameters documentation.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: fix invalid power mapping masks
Matthew Ranostay [Sat, 17 Jan 2009 23:47:27 +0000 (18:47 -0500)]
ALSA: hda: fix invalid power mapping masks

Fixed invalid power mappings for ports 0xd and 0xe on 93hd83xxx codecs.
They were shifted right one too many bits.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Sat, 17 Jan 2009 22:28:53 +0000 (14:28 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ehca: Use consistent types for ehca_plpar_hcall9()
  IB/ehca: Fix printk format warnings from u64 type change
  IPoIB: Do not print error messages for multicast join retries
  IB/mlx4: Fix memory ordering problem when posting LSO sends
  mlx4_core: Fix min() warning
  IPoIB: Fix deadlock between ipoib_open() and child interface create
  IPoIB: Fix hang in napi_disable() if P_Key is never found

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Sat, 17 Jan 2009 22:28:23 +0000 (14:28 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  move wm8400-regulator's probe function to .devinit.text

15 years agodell_rbu: use scnprintf() instead of less secure sprintf()
Pavel Roskin [Sat, 17 Jan 2009 18:33:03 +0000 (13:33 -0500)]
dell_rbu: use scnprintf() instead of less secure sprintf()

Reading 0 bytes from /sys/devices/platform/dell_rbu/image_type or
/sys/devices/platform/dell_rbu/packet_size by an ordinary user causes an
oops.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosecurity: introduce missing kfree
Vegard Nossum [Sat, 17 Jan 2009 16:45:45 +0000 (17:45 +0100)]
security: introduce missing kfree

Plug this leak.

Acked-by: David Howells <dhowells@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: <stable@kernel.org>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agooprofile: fix uninitialized use of struct op_entry
Robert Richter [Sat, 17 Jan 2009 16:13:27 +0000 (17:13 +0100)]
oprofile: fix uninitialized use of struct op_entry

Impact: fix crash

In case of losing samples struct op_entry could have been used
uninitialized causing e.g. a wrong preemption count or NULL pointer
access. This patch fixes this.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agomove wm8400-regulator's probe function to .devinit.text
Uwe Kleine-König [Mon, 12 Jan 2009 22:25:05 +0000 (23:25 +0100)]
move wm8400-regulator's probe function to .devinit.text

A pointer to wm8400_regulator_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded.  Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Sat, 17 Jan 2009 11:10:17 +0000 (12:10 +0100)]
Merge branch 'topic/hda' into for-linus

15 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Sat, 17 Jan 2009 11:10:13 +0000 (12:10 +0100)]
Merge branch 'topic/asoc' into for-linus

15 years agoMerge branches 'ehca', 'ipoib' and 'mlx4' into for-linus
Roland Dreier [Fri, 16 Jan 2009 23:05:54 +0000 (15:05 -0800)]
Merge branches 'ehca', 'ipoib' and 'mlx4' into for-linus

15 years agoIB/ehca: Use consistent types for ehca_plpar_hcall9()
Stephen Rothwell [Fri, 16 Jan 2009 22:55:40 +0000 (14:55 -0800)]
IB/ehca: Use consistent types for ehca_plpar_hcall9()

ehca_plpar_hcall9() takes an unsigned long array, so make all callers
pass that in.  This fixes warnings introduced by commit fe333321
("powerpc: Change u64/s64 to a long long integer type"), which changed
u64 from unsigned long to unsigned long long.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoIB/ehca: Fix printk format warnings from u64 type change
Stephen Rothwell [Fri, 16 Jan 2009 22:55:28 +0000 (14:55 -0800)]
IB/ehca: Fix printk format warnings from u64 type change

Commit fe333321 ("powerpc: Change u64/s64 to a long long integer
type") changed u64 from unsigned long to unsigned long long, which
means that printk formats for printing u64 values should use "ll"
instead of "l" to avoid warnings.  Fix all the places affected by this
in ehca.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoIPoIB: Do not print error messages for multicast join retries
Yossi Etigin [Fri, 16 Jan 2009 21:42:59 +0000 (13:42 -0800)]
IPoIB: Do not print error messages for multicast join retries

When IPoIB tries to join a multicast group, and the SA module's SM
address handle is NULL (because of an SM change, etc), the join
returns with -EAGAIN status.  In that case, don't print an error
message unless multicast debugging is enabled.

Signed-off-by: Yossi Etigin <yosefe@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoPCI PM: Restore standard config registers of all devices early
Rafael J. Wysocki [Fri, 16 Jan 2009 20:54:43 +0000 (21:54 +0100)]
PCI PM: Restore standard config registers of all devices early

There is a problem in our handling of suspend-resume of PCI devices that
many of them have their standard config registers restored with
interrupts enabled and they are put into the full power state with
interrupts enabled as well.  This may lead to the following scenario:
  * an interrupt vector is shared between two or more devices
  * one device is resumed earlier and generates an interrupt
  * the interrupt handler of another device tries to handle it and
    attempts to access the device the config space of which hasn't been
    restored yet and/or which still is in a low power state
  * the system crashes as a result

To prevent this from happening we should restore the standard
configuration registers of all devices with interrupts disabled and we
should put them into the D0 power state right after that.
Unfortunately, this cannot be done using the existing
pci_set_power_state(), because it can sleep.  Also, to do it we have to
make sure that the config spaces of all devices were actually saved
during suspend.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoIB/mlx4: Fix memory ordering problem when posting LSO sends
Roland Dreier [Fri, 16 Jan 2009 20:47:47 +0000 (12:47 -0800)]
IB/mlx4: Fix memory ordering problem when posting LSO sends

The current work request posting code writes the LSO segment before
writing any data segments.  This leaves a window where the LSO segment
overwrites the stamping in one cacheline that the HCA prefetches
before the rest of the cacheline is filled with the correct data
segments.  When the HCA processes this work request, a local
protection error may result.

Fix this by saving the LSO header size field off and writing it only
after all data segments are written.  This fix is a cleaned-up version
of a patch from Jack Morgenstein <jackm@dev.mellanox.co.il>.

This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=1383>.

Reported-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoLinux 2.6.29-rc2 v2.6.29-rc2
Linus Torvalds [Fri, 16 Jan 2009 20:43:00 +0000 (12:43 -0800)]
Linux 2.6.29-rc2

15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Fri, 16 Jan 2009 20:40:37 +0000 (12:40 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (23 commits)
  ACPI PCI hotplug: harden against panic regression
  ACPI: rename main.c to sleep.c
  dell-laptop: move to drivers/platform/x86/ from drivers/misc/
  eeepc-laptop: enable Bluetooth ACPI details
  ACPI: fix ACPI_FADT_S4_RTC_WAKE comment
  kprobes: check CONFIG_FREEZER instead of CONFIG_PM
  PM: Fix freezer compilation if PM_SLEEP is unset
  thermal fixup for broken BIOS which has invalid trip points.
  ACPI: EC: Don't trust ECDT tables from ASUS
  ACPI: EC: Limit workaround for ASUS notebooks even more
  ACPI: thinkpad-acpi: bump up version to 0.22
  ACPI: thinkpad-acpi: handle HKEY event 6030
  ACPI: thinkpad-acpi: clean-up fan subdriver quirk
  ACPI: thinkpad-acpi: start the event hunt season
  ACPI: thinkpad-acpi: handle HKEY thermal and battery alarms
  ACPI: thinkpad-acpi: clean up hotkey_notify()
  ACPI: thinkpad-acpi: use killable instead of interruptible mutexes
  ACPI: thinkpad-acpi: add UWB radio support
  ACPI: thinkpad-acpi: preserve radio state across shutdown
  ACPI: thinkpad-acpi: resume with radios disabled
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 16 Jan 2009 20:40:11 +0000 (12:40 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  netxen: include ipv6.h (fixes build failure)
  netxen: avoid invalid iounmap

15 years agoPCI/MSI: bugfix/utilize for msi_capability_init()
Hidetoshi Seto [Wed, 24 Dec 2008 08:27:04 +0000 (17:27 +0900)]
PCI/MSI: bugfix/utilize for msi_capability_init()

This patch fix a following bug and does a cleanup.

bug:
commit 5993760f7fc75b77e4701f1e56dc84c0d6cf18d5
had a wrong change (since is_64 is boolean[0|1]):

-               pci_write_config_dword(dev,
-                       msi_mask_bits_reg(pos, is_64bit_address(control)),
-                       maskbits);
+               pci_write_config_dword(dev, entry->msi_attrib.is_64, maskbits);

utilize:
Unify separated if (entry->msi_attrib.maskbit) statements.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Acked-by: "Jike Song" <albcamus@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoACPI PCI hotplug: harden against panic regression
James Bottomley [Thu, 15 Jan 2009 20:12:27 +0000 (15:12 -0500)]
ACPI PCI hotplug: harden against panic regression

ACPI hotplug panic with current git head
http://lkml.org/lkml/2009/1/10/136

Rather than reverting the entire commit that causes the crash:
e8c331e963c58b83db24b7d0e39e8c07f687dbc6
"PCI hotplug: introduce functions for ACPI slot detection"

simply harden against it while the changes to
the hotplug code on this particularl machine are understood.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoMerge branch 'misc' into release
Len Brown [Fri, 16 Jan 2009 19:45:34 +0000 (14:45 -0500)]
Merge branch 'misc' into release

15 years agoMerge branch 'thinkpad-acpi' into release
Len Brown [Fri, 16 Jan 2009 19:45:24 +0000 (14:45 -0500)]
Merge branch 'thinkpad-acpi' into release

15 years agoMerge branches 'bugzilla-11884' and 'bugzilla-8544' into release
Len Brown [Fri, 16 Jan 2009 19:45:11 +0000 (14:45 -0500)]
Merge branches 'bugzilla-11884' and 'bugzilla-8544' into release

15 years agoACPI: rename main.c to sleep.c
Len Brown [Fri, 16 Jan 2009 18:52:03 +0000 (13:52 -0500)]
ACPI: rename main.c to sleep.c

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agodell-laptop: move to drivers/platform/x86/ from drivers/misc/
Len Brown [Fri, 9 Jan 2009 22:23:38 +0000 (17:23 -0500)]
dell-laptop: move to drivers/platform/x86/ from drivers/misc/

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoeeepc-laptop: enable Bluetooth ACPI details
Jonathan McDowell [Wed, 3 Dec 2008 20:31:11 +0000 (20:31 +0000)]
eeepc-laptop: enable Bluetooth ACPI details

Although rfkill support for the EEE bluetooth device has been added to
2.6.28-rc the appropriate ACPI accessor definitions were not added, so
the support was non functional. The patch below adds the get and set
accessors and has been verified to work on an EEE 901.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Acked-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI: fix ACPI_FADT_S4_RTC_WAKE comment
David Brownell [Fri, 9 Jan 2009 20:17:08 +0000 (12:17 -0800)]
ACPI: fix ACPI_FADT_S4_RTC_WAKE comment

Make the comment for ACPI_FADT_S4_RTC_WAKE match the ACPI spec;
that bit has nothing to do with status bits.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agokprobes: check CONFIG_FREEZER instead of CONFIG_PM
Masami Hiramatsu [Tue, 6 Jan 2009 20:15:32 +0000 (21:15 +0100)]
kprobes: check CONFIG_FREEZER instead of CONFIG_PM

Check CONFIG_FREEZER instead of CONFIG_PM because kprobe booster
depends on freeze_processes() and thaw_processes() when CONFIG_PREEMPT=y.

This fixes a linkage error which occurs when CONFIG_PREEMPT=y, CONFIG_PM=y
and CONFIG_FREEZER=n.

Reported-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoPM: Fix freezer compilation if PM_SLEEP is unset
Rafael J. Wysocki [Tue, 6 Jan 2009 20:14:04 +0000 (21:14 +0100)]
PM: Fix freezer compilation if PM_SLEEP is unset

Freezer fails to compile if with the following configuration
settings:

CONFIG_CGROUPS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_MODULES=y
CONFIG_FREEZER=y
CONFIG_PM=y
CONFIG_PM_SLEEP=n

Fix this by making process.o compilation depend on CONFIG_FREEZER.

Reported-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agothermal fixup for broken BIOS which has invalid trip points.
Zhang Rui [Fri, 16 Jan 2009 17:53:42 +0000 (12:53 -0500)]
thermal fixup for broken BIOS which has invalid trip points.

ACPI thermal driver only re-evaluate VALID trip points.

For the broken BIOS show in
http://bugzilla.kernel.org/show_bug.cgi?id=8544
the active[0] is set to invalid at boot time
and it will not be re-evaluated again.
We can still get a single warning message at boot time.

http://marc.info/?l=linux-kernel&m=120496222629983&w=2

http://bugzilla.kernel.org/show_bug.cgi?id=12203

Signed-off-by: Zhang Rui<rui.zhang@intel.com>
Tested-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agonetxen: include ipv6.h (fixes build failure)
Dhananjay Phadke [Fri, 16 Jan 2009 19:03:25 +0000 (11:03 -0800)]
netxen: include ipv6.h (fixes build failure)

Fixes a build error in absence of CONFIG_IPV6:

drivers/net/netxen/netxen_nic_main.c:1189: error: implicit declaration of function 'ipv6_hdr'
drivers/net/netxen/netxen_nic_main.c:1189: error: invalid type argument of '->'

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoACPI: EC: Don't trust ECDT tables from ASUS
Alexey Starikovskiy [Tue, 13 Jan 2009 23:57:53 +0000 (02:57 +0300)]
ACPI: EC: Don't trust ECDT tables from ASUS

http://bugzilla.kernel.org/show_bug.cgi?id=9399
http://bugzilla.kernel.org/show_bug.cgi?id=11880

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agonetxen: avoid invalid iounmap
Dhananjay Phadke [Fri, 16 Jan 2009 19:03:01 +0000 (11:03 -0800)]
netxen: avoid invalid iounmap

For NX3031 only one I/O range is mapped, so unmapping other
two which are used by older chips, causes this warning on
ppc64.

"Attempt to iounmap early bolted mapping at 0x0000000000000000"

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoACPI: EC: Limit workaround for ASUS notebooks even more
Alexey Starikovskiy [Tue, 13 Jan 2009 23:57:47 +0000 (02:57 +0300)]
ACPI: EC: Limit workaround for ASUS notebooks even more

References: http://bugzilla.kernel.org/show_bug.cgi?id=11884

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Fri, 16 Jan 2009 17:32:33 +0000 (09:32 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: fix ioctl arg size (userland incompatible change!)
  Btrfs: Clear the device->running_pending flag before bailing on congestion

15 years agoBtrfs: fix ioctl arg size (userland incompatible change!)
Chris Mason [Fri, 16 Jan 2009 16:59:08 +0000 (11:59 -0500)]
Btrfs: fix ioctl arg size (userland incompatible change!)

The structure used to send device in btrfs ioctl calls was not
properly aligned, and so 32 bit ioctls would not work properly on
64 bit kernels.

We could fix this with compat ioctls, but we're just one byte away
and it doesn't make sense at this stage to carry about the compat ioctls
forever at this stage in the project.

This patch brings the ioctl arg up to an evenly aligned 4k.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: Clear the device->running_pending flag before bailing on congestion
Chris Mason [Fri, 16 Jan 2009 16:58:19 +0000 (11:58 -0500)]
Btrfs: Clear the device->running_pending flag before bailing on congestion

Btrfs maintains a queue of async bio submissions so the checksumming
threads don't have to wait on get_request_wait.  In order to avoid
extra wakeups, this code has a running_pending flag that is used
to tell new submissions they don't need to wake the thread.

When the threads notice congestion on a single device, they
may decide to requeue the job and move on to other devices.  This
makes sure the running_pending flag is cleared before the
job is requeued.

It should help avoid IO stalls by making sure the task is woken up
when new submissions come in.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Fri, 16 Jan 2009 16:41:09 +0000 (08:41 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  serial: Add 16850 uart type support to OF uart driver
  hvc_console: Remove tty->low_latency
  powerpc: Get the number of SLBs from "slb-size" property
  powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices
  powerpc/ps3: printing fixups for l64 to ll64 conversion drivers/video
  powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/scsi
  powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/ps3
  powerpc/ps3: Printing fixups for l64 to ll64 conversion sound/ppc
  powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/char
  powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/block
  powerpc/ps3: Printing fixups for l64 to ll64 conversion arch/powerpc
  powerpc/ps3: ps3_repository_read_mm_info() takes u64 * arguments
  powerpc/ps3: clear_bit()/set_bit() operate on unsigned longs
  powerpc/ps3: The lv1_ routines have u64 parameters
  powerpc/ps3: Use dma_addr_t down through the stack
  powerpc/ps3: set_dabr() takes an unsigned long
  powerpc: Cleanup from l64 to ll64 change drivers/scsi

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 16 Jan 2009 16:40:57 +0000 (08:40 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_fsl: Return non-zero on error in probe()
  drivers/ata/pata_ali.c: s/isa_bridge/ali_isa_bridge/ to fix alpha build
  libata: New driver for OCTEON SOC Compact Flash interface (v7).
  libata: Add another column to the ata_timing table.
  sata_via: Add VT8261 support
  pata_atiixp: update port enabledness test handling
  [libata] get-identity ioctl: Fix use of invalid memory pointer