Commit Graph

311251 Commits (9e303f228c24d529bf479196d290eedc2a04cd5e)

Author SHA1 Message Date
Linus Torvalds 1bea57f5f3 A few relatively-small remoteproc fixes for 3.5: two error path fixes,
and one -Wformat warning fix.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP3cUtAAoJELLolMlTRIoMVSUP/2K+/6SSiZUy15BsWpQI7v0i
 Neh4g8HwGQ9dgST261WOFuqdYIK1dQcB2nCjTyoT2k+VqrYYtswzNBSquGADjiVR
 YgUwh1ebGeQh/NBqzaGjrWfLJzgnrMkZxVwgLtm179TkdbhrupwtL9WIUOuNuUTO
 /3Ov33Nxv1u6KkzwKJMVcS3CKO+4EsQSvDoie+fWhaxsp0j+2h37FpxLaMdprDBC
 eyJQnhncqffGzG3joUhKbzed4sO8igBjNH6fHTiZ+jiIzzZ2XrzbIHBY5Bgiw1lI
 +Fd318vT0BvsUfiog6Oq8Bmcgs7qOGJEErBKB9MUHsYIRInCoPlkdr6e9Z98Ouvr
 LyPtZen4Az31vYpN1t6EM9EnQyoTDQ9NzYMs22WTNp2SLoqELtA+x0kWwMLn3NFw
 RlWfUlKXAu8AprViK9Nt2OcjcPCKqJXyUGGpZUd7berT7kMNx74XET30qNWwpVbf
 QVwb43RnauFwByoqDa4Ly8xdYV3sC3kjRnl9X+RdAzEZgXmLJd1QGN39/B7YcKO9
 b1q92jBIdDcaK+/DVuastnzER6zcsa1QiOp7m/S3YSbLhcEd/qpvXgS0fZVmicEu
 NjlWXeOFCVSVesdGiOqjUfC1TVRk0S/0qZiciw1JKUpYhrGaBwMPeGartAZadzqn
 8SvQysOKeV+88iEFklZb
 =Zm/p
 -----END PGP SIGNATURE-----

Merge tag 'rproc-fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc

Pull remoteproc fixes from Ohad Ben-Cohen:
 "A few relatively-small remoteproc fixes for 3.5: two error path fixes,
  and one -Wformat warning fix."

* tag 'rproc-fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
  remoteproc/omap: fix dev_err typo
  remoteproc: fix missing fault indication in error-path
  remoteproc: fix print format warnings
2012-06-18 11:52:25 -07:00
Linus Torvalds 4005af65c9 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull hwmon subsystem fixes from Jean Delvare.

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (coretemp) Drop needless initialization
  hwmon: (coretemp) Document TjMax for 3rd generation i5/i7 processors
  hwmon: (coretemp) Improve support for TjMax detection on Atom CPUs
  hwmon: (coretemp) Add support for Atom D2000 and N2000 series CPU models
  hwmon: (coretemp) Improve support of recent Atom CPU models
2012-06-18 11:51:10 -07:00
Paul Mundt 2603efa31a bug.h: Fix up powerpc build regression.
The asm-generic/bug.h __ASSEMBLY__ guarding is completely bogus, which
tripped up the powerpc build when the kernel.h include was added:

	In file included from include/asm-generic/bug.h:5:0,
			 from arch/powerpc/include/asm/bug.h:127,
			 from arch/powerpc/kernel/head_64.S:31:
	include/linux/kernel.h:44:0: warning: "ALIGN" redefined [enabled by default]
	include/linux/linkage.h:57:0: note: this is the location of the previous definition
	include/linux/sysinfo.h: Assembler messages:
	include/linux/sysinfo.h:7: Error: Unrecognized opcode: `struct'
	include/linux/sysinfo.h:8: Error: Unrecognized opcode: `__kernel_long_t'

Moving the __ASSEMBLY__ guard up and stashing the kernel.h include under
it fixes this up, as well as covering the case the original fix was
attempting to handle.

Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-18 11:10:59 -07:00
Paul Mundt a1f42beb8e Makefile: fix up CROSS_COMPILE and READABLE_ASM interaction.
When the READABLE_ASM cc-option tests were added they were done so prior
to the arch Makefile include, resulting in cc-option being run on the
host cc instead of the factoring in the cross prefix set up by the
architecture.

This bumps the include back up so that cc-option actually runs on the
compiler that we're building with.

Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-18 11:10:58 -07:00
Guenter Roeck 2355375efd hwmon: (emc2103) Fix use of an uninitilized variable in error case
Fix:

emc2103.c: In function set_pwm_enable:
emc2103.c:463:12: warning: conf_reg may be used uninitialized in this function

by checking the return value from read_u8_from_i2c(). This fixes a real problem,
as conf_reg is really uninitialized if read_u8_from_i2c returns an error.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-06-18 08:48:00 -07:00
Henrik Rydberg ac852edb47 hwmon: (applesmc) Limit key length in warning messages
Key lookups may call read_smc() with a fixed-length key string,
and if the lookup fails, trailing stack content may appear in the
kernel log. Fixed with this patch.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-06-18 08:48:00 -07:00
Steven Rostedt 93b3cca1cc ftrace: Make all inline tags also include notrace
Commit 5963e317b1 ("ftrace/x86: Do not change stacks in DEBUG when
calling lockdep") prevented lockdep calls from the int3 breakpoint handler
from reseting the stack if a function that was called was in the process
of being converted for tracing and had a breakpoint on it. The idea is,
before calling the lockdep code, do a load_idt() to the special IDT that
kept the breakpoint stack from reseting. This worked well as a quick fix
for this kernel release, until a certain config caused a lockup in the
function tracer start up tests.

Investigating it, I found that the load_idt that was used to prevent
the int3 from changing stacks was itself being traced!

Even though the config had CONFIG_OPTIMIZE_INLINING disabled, and
all 'inline' tags were set to always inline, there were still cases that
it did not inline! This was caused by CONFIG_PARAVIRT_GUEST, where it
would add a pointer to the native_load_idt() which made that function
to be traced.

Commit 45959ee7aa ("ftrace: Do not function trace inlined functions")
only touched the 'inline' tags when CONFIG_OPMITIZE_INLINING was enabled.
PARAVIRT_GUEST shows that this was not enough and we need to also
mark always_inline with notrace as well.

Reported-by: Fengguang Wu <wfg@linux.intel.com>
Tested-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-06-18 09:47:00 -04:00
Trond Myklebust 2a4c8994ee NFSv4.1: Fix umount when filelayout DS is also the MDS
Currently there is a 'chicken and egg' issue when the DS is also the mounted
MDS. The nfs_match_client() reference from nfs4_set_ds_client bumps the
cl_count, the nfs_client is not freed at umount, and nfs4_deviceid_purge_client
is not called to dereference the MDS usage of a deviceid which holds a
reference to the DS nfs_client.  The result is the umount program returns,
but the nfs_client is not freed, and the cl_session hearbeat continues.

The MDS (and all other nfs mounts) lose their last nfs_client reference in
nfs_free_server when the last nfs_server (fsid) is umounted.
The file layout DS lose their last nfs_client reference in destroy_ds
when the last deviceid referencing the data server is put and destroy_ds is
called. This is triggered by a call to nfs4_deviceid_purge_client which
removes references to a pNFS deviceid used by an MDS mount.

The fix is to track how many pnfs enabled filesystems are mounted from
this server, and then to purge the device id cache once that count reaches
zero.

Reported-by: Jorge Mora <Jorge.Mora@netapp.com>
Reported-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-06-18 08:45:16 -04:00
Russell King 10aa5a35e3 SPI: fix over-eager devm_xxx() conversion
1a77b127ae (OMAP : SPI : use devm_* functions) converted the SPI
device controller state to use devm_kzalloc().  Unfortunately, this
is used against an unbound struct device, which results in the
following when the device is bound to its driver:

------------[ cut here ]------------
WARNING: at /home/rmk/git/linux-rmk/drivers/base/dd.c:257 driver_probe_device+0x78/0x21c()
Modules linked in:
Backtrace:
[<c0017d0c>] (dump_backtrace+0x0/0x10c) from [<c033e208>] (dump_stack+0x18/0x1c) r7:00000000 r6:c01ff28c r5:c040050c r4:00000101
[<c033e1f0>] (dump_stack+0x0/0x1c) from [<c00337ec>] (warn_slowpath_common+0x58/0x70)
[<c0033794>] (warn_slowpath_common+0x0/0x70) from [<c0033828>] (warn_slowpath_null+0x24/0x2c)
[<c0033804>] (warn_slowpath_null+0x0/0x2c) from [<c01ff28c>] (driver_probe_device+0x78/0x21c)
[<c01ff214>] (driver_probe_device+0x0/0x21c) from [<c01ff49c>] (__driver_attach+0x6c/0x90)
[<c01ff430>] (__driver_attach+0x0/0x90) from [<c01fda70>] (bus_for_each_dev+0x58/0x98)
[<c01fda18>] (bus_for_each_dev+0x0/0x98) from [<c01ff0f4>] (driver_attach+0x20/0x28)
[<c01ff0d4>] (driver_attach+0x0/0x28) from [<c01fe2f4>] (bus_add_driver+0xb4/0x230)
[<c01fe240>] (bus_add_driver+0x0/0x230) from [<c01ffb24>] (driver_register+0xac/0x138)
[<c01ffa78>] (driver_register+0x0/0x138) from [<c0215d4c>] (spi_register_driver+0x4c/0x60)
[<c0215d00>] (spi_register_driver+0x0/0x60) from [<c045414c>] (ks8851_init+0x14/0x1c)
[<c0454138>] (ks8851_init+0x0/0x1c) from [<c0008770>] (do_one_initcall+0x9c/0x164)
[<c00086d4>] (do_one_initcall+0x0/0x164) from [<c0436410>] (kernel_init+0x128/0x210)
[<c04362e8>] (kernel_init+0x0/0x210) from [<c0038754>] (do_exit+0x0/0x72c)
---[ end trace 4dcda79f5e89dd84 ]---
ks8851 spi1.0: message enable is 0
ks8851 spi1.0: eth0: revision 0, MAC 08:00:28:01:4d:c6, IRQ 194, has EEPROM

Fix this by partially reverting the original commit.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-06-18 11:27:04 +01:00
Salman Qazi 9c5da09d26 perf: Use css_tryget() to avoid propping up css refcount
An rmdir pushes css's ref count to zero.  However, if the associated
directory is open at the time, the dentry ref count is non-zero.  If
the fd for this directory is then passed into perf_event_open, it
does a css_get().  This bounces the ref count back up from zero.  This
is a problem by itself.  But what makes it turn into a crash is the
fact that we end up doing an extra dput, since we perform a dput
when css_put sees the ref count go down to zero.

css_tryget() does not fall into that trap. So, we use that instead.

Reproduction test-case for the bug:

 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <linux/unistd.h>
 #include <linux/perf_event.h>
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>

 #define PERF_FLAG_PID_CGROUP    (1U << 2)

 int perf_event_open(struct perf_event_attr *hw_event_uptr,
                     pid_t pid, int cpu, int group_fd, unsigned long flags) {
         return syscall(__NR_perf_event_open,hw_event_uptr, pid, cpu,
                 group_fd, flags);
 }

 /*
  * Directly poke at the perf_event bug, since it's proving hard to repro
  * depending on where in the kernel tree.  what moved?
  */
 int main(int argc, char **argv)
 {
        int fd;
        struct perf_event_attr attr;
        memset(&attr, 0, sizeof(attr));
        attr.exclude_kernel = 1;
        attr.size = sizeof(attr);
        mkdir("/dev/cgroup/perf_event/blah", 0777);
        fd = open("/dev/cgroup/perf_event/blah", O_RDONLY);
        perror("open");
        rmdir("/dev/cgroup/perf_event/blah");
        sleep(2);
        perf_event_open(&attr, fd, 0, -1,  PERF_FLAG_PID_CGROUP);
        perror("perf_event_open");
        close(fd);
        return 0;
 }

Signed-off-by: Salman Qazi <sqazi@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/20120614223108.1025.2503.stgit@dungbeetle.mtv.corp.google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-06-18 11:45:57 +02:00
Daniel Mack 0b1d8e0908 ALSA: 6fire: use NULL instead of 0 for pointer assignment
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-18 09:36:38 +02:00
Dylan Reid b4a91cf05c ALSA: hda - Handle open while transitioning to D3.
This addresses an issue encountered when a pcm is opened while
transitioning to low power state (codec->power_on == 1 &&
codec->power_transition == -1).  Add snd_pcm_power_up_d3wait to
hda_codec.  This function is used to power up from azx_open as opposed
to snd_hda_power_up used from codec_exec_verb. When powering up from
azx_open, wait for pending power downs to complete, avoiding the power
up continuing in parallel with the power down on the work queue.

The specific issue seen was with the CS4210 codec, it powers off the ADC
and DAC nid in its suspend handler.  If it is re-opened before the
~100ms power down process completes, the ADC and DAC nid are initialized
while powered down and audio is lost until another suspend/resume cycle.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-18 09:35:21 +02:00
Daniel Mack afe25967ec ALSA: snd-usb: make snd_usb_substream_capture_trigger static
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-18 09:32:53 +02:00
Daniel Mack 7fb75db139 ALSA: snd-usb: fix sync pipe check
Fix a bogus sanity check for sync pipe in pcm.c. This flaw was
introduced during the streaming logic refactorization.

While at it, improve the error messages that are generated in such cases.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: <ben@b1c1l1.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-18 08:36:36 +02:00
Takashi Iwai ef890ae9b3 ASoC: Updates for 3.5
All driver specific and fairly small.  The pxa-ssp changes are larger
 than I'd like but they're build failures and are pretty clear to
 inspection.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP3kOeAAoJEBus8iNuMP3dpf0QAJLZjq1Ttzcm2ZrtYkr6edgm
 axHhApj6ptOlLqb16zCJ+zjgmjUy/GteJg766KZqAkvMJxWSPRaPr/aTQnWlxUAE
 CU/WjdywbVPKIkn5/r+jpEOifsHNTzj14/gF1Cn9V+58pN6YgflmfElV2vFe3rdX
 IrNxGfRBHDgHwqDbHTi2OL8xUTE4oJnnhQZxk7FcsYKiwpwB2hVkbrTTKGNBPL4d
 DoV8Xcy+Zb12iDQwh9BvzYAznQTQwCjGsF11UVAb0ChTV14XExQTABNZnAL3hgfj
 AhBtm/coDmym61AvQMddsbg8Hrlp/d9Qzmr+0Fxj9HBb+SGVt9XlHY3ETePBM4hQ
 wIjhedCed4Pv/Jb9IYDzQ1wJD/9iDG+Xuyj1iQC1QQKaoKg6eI9QgTLoVwRHCssg
 DVTzFPOFEFiIfI+eH2cLyZZZlWL1LDbeVmH+KvWthb6+mbfOXo/VPlely2Odl+b7
 NErfdjbggoc4Oy8o4Lo0XMb/6HxE7tHd/AzbKHdeHjNk8BCn5NCrdOLSuJb3xrr5
 8fLP/0T9Z955R6YsHNg88rhQ74QhWSLGvs9TjUw7sRHN9xkC4gQIwcJ5i0dZcXjC
 zIdP0Lj8XB0FdDGYNALdy2B48jU1uKs0cGW+xV/Z0uA0QllB0pfFy+O49z+jRKzJ
 d/cIeM8hsxyOHWS4y+BJ
 =67R8
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for 3.5

All driver specific and fairly small.  The pxa-ssp changes are larger
than I'd like but they're build failures and are pretty clear to
inspection.
2012-06-18 08:36:00 +02:00
Linus Torvalds 39a50b42f7 Merge branch 'hfsplus'
Merge hfsplus fixes from Christoph Hellwig:
 "Two small hfsplus fixes:

   - a one liner regression fix for large volume handling from Janne
     Kalliomäki.
   - a fixup for the boot image blessing feature to make it work with
     the fake "hardlinks" in hfsplus from Matthew Garrett."

* branch 'hfsplus':
  hfsplus: fix bless ioctl when used with hardlinks
  hfsplus: fix overflow in sector calculations in hfsplus_submit_bio
2012-06-17 14:40:35 -07:00
Matthew Garrett 7dea9665fe hfsplus: fix bless ioctl when used with hardlinks
HFS+ doesn't really implement hard links - instead, hardlinks are indicated
by a magic file type which refers to an indirect node in a hidden
directory. The spec indicates that stat() should return the inode number
of the indirect node, but it turns out that this doesn't satisfy the
firmware when it's looking for a bootloader - it wants the catalog ID of
the hardlink file instead. Fix up this case.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-17 14:39:59 -07:00
Janne Kalliomäki a6dc8c0421 hfsplus: fix overflow in sector calculations in hfsplus_submit_bio
The variable io_size was unsigned int, which caused the wrong sector number
to be calculated after aligning it. This then caused mount to fail with big
volumes, as backup volume header information was searched from a
wrong sector.

Signed-off-by: Janne Kalliomäki <janne@tuxera.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-17 14:39:45 -07:00
Roland Stigge 2805b9ab7c ARM: 7427/1: mmc: mmci: Defer probe() in case of yet uninitialized GPIOs
If the GPIOs used by the MMCI driver are not registered yet when the driver is
probe()d, they can't be used. This happens if the mmci driver is probed before
the respective GPIO controller (e.g. on the LPC32xx EA3250 board, the PCA9532
GPIO controller would be initialized via DT after mmci). Therefore, we defer
mmci in this case.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-06-17 22:24:36 +01:00
Roland Stigge f433809817 ARM: 7426/1: mmc: mmci: Remove wrong error handling of gpio 0
Zero is a valid GPIO and shouldn't be handled as an error return code from
of_get_named_gpio(). It was a leftover from old code before getting
pdata->gpio_*() was modified.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-06-17 22:24:32 +01:00
Todd Poynor 6bc07d6afa ARM: OMAP: PM: Lock clocks list while generating summary
Commit a530257240 (OMAP: Add debugfs
node to show the summary of all clocks) introduced clock summary,
however, we are interested in seeing snapshot of the clock state, not
in dynamically changing clock configurations as the data provided by
clock summary will then be useless for debugging configuration
issues. So, hold the common lock when dumping the clock summary.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
[nm@ti.com: added commit message]
Signed-off-by: Nishanth Menon <nm@ti.com>
[paul@pwsan.com: minor edits to commit message]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-06-17 11:57:50 -06:00
Andrew Lunn 22cec7ca02 ARM: iconnect: Remove include of removed linux/spi/orion_spi.h
v3.5-rc1 fails to build when DT and iconnect is enabled because of
this now none existant include file.

Also remove the other two SPI include files, which are not needed
with the move to DT.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-06-17 10:51:49 -07:00
Linus Walleij daf731748f pinctrl/nomadik: document Alt-C glitch
This documentation comment existed in an earlier patch set for
GPIO consolidation, so I'm saving it for maintainability of the
code.

Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-06-17 19:44:44 +02:00
Fabio Estevam 14e1e9f5ca pinctrl: mxs: Use kfree to fix build error
commit 0bf7481 (pinctrl: pinctrl-mxs: Take care of frees if the kzalloc fails)
introduced the following build error:

drivers/pinctrl/pinctrl-mxs.c:140:3: error: implicit declaration of function 'free'

Use kfree function instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-06-17 19:44:44 +02:00
Lee Jones ea851f4f08 regulator: Change db8500-prcmu match names to reflect Device Tree
The 'name' field in 'struct of_regulator_match' expects to match with
its corresponding regulator device node in the Device Tree. This patch
renames each of the regulators in the db8500-prcum regulator driver so
this is true.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-17 18:27:49 +01:00
Lee Jones f7f3f1ad9e regulator: Change ab8500 match names to reflect Device Tree
The 'name' field in 'struct of_regulator_match' expects to match with
its corresponding regulator device node in the Device Tree. This patch
renames each of the regulators in the ab8500 regulator driver so this
is true.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-17 18:27:47 +01:00
Sangbeom Kim 9d88fc0b35 regulator: Fix the s5m8767a problem of the division by null
If ramp_delay is 0, delay value can be divided by zero.
This patch can fix the problem.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-17 18:27:20 +01:00
Jean Delvare 1268a172cd hwmon: (coretemp) Drop needless initialization
The value is overridden a few lines later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-06-17 18:05:06 +02:00
Guenter Roeck 813441f16e hwmon: (coretemp) Document TjMax for 3rd generation i5/i7 processors
Tjmax values from Intel datasheets.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-06-17 18:05:06 +02:00
Guenter Roeck 41e58a1f2b hwmon: (coretemp) Improve support for TjMax detection on Atom CPUs
Atom CPUs don't have a register to retrieve TjMax. Detection so far was
incomplete. Use the X86 model ID to improve it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-06-17 18:05:05 +02:00
Guenter Roeck 5592906f8b hwmon: (coretemp) Add support for Atom D2000 and N2000 series CPU models
Document the Atom series D2000 and N2000 (Cedar Trail) as being supported.
List and set TjMax for those series.

Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: "R, Durgadoss" <durgadoss.r@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-06-17 18:05:05 +02:00
Jean Delvare fcc14ac1a8 hwmon: (coretemp) Improve support of recent Atom CPU models
Document the new Atom series (Tunnel Creek and Medfield) as being
supported, and list TjMax for the Atom E600 series.

Also enable the Atom tjmax heuristic for these Atom CPU models.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: "R, Durgadoss" <durgadoss.r@intel.com>
2012-06-17 18:05:05 +02:00
Linus Torvalds fb09185a88 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Radeon is most of the work, one regression, one BUG fix in the new
  prime code, some fixes to init code to make streamout not lock up the
  hardware, and just some code to enable users to test HDMI audio on
  later hw (its off by default).

  Intel adds edp edid caching for some strange Dell Vostros that black
  screen on startup if keep reading their EDID, and a fix for a DP
  regression.

  Otherwise fix for via/sis and one to stop udl binding to multiple
  non-video usb."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: cache the EDID for eDP panels
  Revert "drm/i915/dp: Use auxch precharge value of 5 everywhere"
  drm/i915: eDP aux needs vdd
  drm/i915: don't enumerate HDMID if an eDP panel is already active on the port
  drm/radeon: add support for STRMOUT_BASE_UPDATE on 7xx
  drm/radeon: add some additional 6xx/7xx/EG register init
  drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
  drm sis: initialize object_idr
  drm via: initialize object_idr
  drm/radeon/prime: reserve/unreserve around pin
  drm/radeon: fix regression in dynpm due to multi-ring rework
  vga_switcheroo.h: fix pci_dev warning
  drm/udl: only bind to the video devices on the hub.
2012-06-17 01:44:41 -07:00
Ohad Ben-Cohen 6b03976288 remoteproc/omap: fix dev_err typo
For some reason one of the dev_err invocations is using a wrong
device so fix that.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Cc: stable@vger.kernel.org
2012-06-17 10:31:03 +03:00
Linus Torvalds 41a328b95c ARM: SoC fixes
A bit larger set than usual, unfortunately -- I've been sitting on them
 longer than I meant to so it's really more like 2 -rc pull requests in
 one, volume-wise.
 
 Nearly everything is fixes for fallout from the merge window, or other
 fixes for bugs. The one exception is the highbank L2-enablement patch,
 but it was contained enough that I picked it up anyway:
 
 - i.MX fixes, mostly for clock and pinctrl changes
 - OMAP fixes, mostly PM-related
 - A patch to enable L2 on highbank
 - A couple of fixes for PXA, Kirkwood, Versatile
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP3WJDAAoJEIwa5zzehBx30kAP/11IlrLsylMgkjWNTCLaTv0X
 03akBEy8NlfQrB4VL0gogo9UyJ6Y/NkcMftqdL217wBzWIOoeStj/gtW9CJutbd7
 dD3Eldt1eojIcmPjANVNj0gHiT3FqBToRzRdONk2XK42D2D2IujA341uN4acAZP3
 eeM5WhNAR+K+F2Yc8SrH93XjvnT6EwTlFnZ/fX4MV0Hee4wN0ajbGGl6lK8IXNN9
 AIBjYY++fYSfnsbUr9KmAxcXwlAjmbl0VKCxWPhjSTsGFXVgf03JJdqejm+ZC8a8
 i2fRmAYxaexyT72iIT5AGGEFQhSfAkDQJRKq3SBH21XXJKma4cxxsFNREkzJAx/Y
 VFZ7W+o8WbykFi0Q4tCUfryrZWNbE+JZX1wsf1Jv5rPjLl0VJB8UuepRPAQjfApI
 pNz64qo9xvBxXuI4gCFRP+xWmW88osN28Acv9ECi+cEeZ3H/nVWUHyAfjWaQyfqB
 VbNvfHgbABjSRlrY51iIAJPp/zT9GiZwLigIGrqVk3iB/JHaDXCQ/yyELVOI7LtQ
 sVCs9OvING/ZZtLKWdIEKBMxQVDTvn+DmHdnlD0xmGedKMw+OOfgeD74VLzwm5nK
 OrPB1covGDEnp1yVP49xNocuSo9W/fqRnnHAIIuW0ZSdr24uHWOzf0/WYP3WQijB
 sPz9l79iLSgKYh/r44s8
 =x9VX
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A bit larger set than usual, unfortunately -- I've been sitting on
  them longer than I meant to so it's really more like 2 -rc pull
  requests in one, volume-wise.

  Nearly everything is fixes for fallout from the merge window, or other
  fixes for bugs.  The one exception is the highbank L2-enablement
  patch, but it was contained enough that I picked it up anyway:

   - i.MX fixes, mostly for clock and pinctrl changes
   - OMAP fixes, mostly PM-related
   - A patch to enable L2 on highbank
   - A couple of fixes for PXA, Kirkwood, Versatile"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (30 commits)
  ARM: Kirkwood: Fix clk problems modular ethernet driver
  arm: versatile: fix and enable PCI I/O space
  ARM: highbank: Add smc calls to enable/disable the L2
  ARM i.MX imx21ads: Fix overlapping static i/o mappings
  ARM: imx6: exit coherency when shutting down a cpu
  ARM: mx51: Add pinctrl_provide_dummies()
  ARM: mx31: Add pinctrl_provide_dummies()
  ARM: OMAP2+: Fix compile for CONFIG_TIDSPBRIDGE platform init code
  ARM: OMAP3: Fix omap3_l3_block_irq warning when CONFIG_BUG is not set
  ARM: OMAP: Fix MMC_OMAP build when only MMC_OMAP_HS is selected
  OMAP2+: UART: Add mechanism to probe uart pins and configure rx wakeup
  ARM: mmp: fix missing cascade_irq in irq handler
  ARM: dts: update memory size on brownstone
  ARM i.MX27 Visstrim M10: fix gpio handling.
  ARM i.MX53: Fix PLL4 base address
  ARM i.MX pllv2: make round_rate accurate
  ARM i.MX pllv2: use standard register set unconditionally
  ARM: OMAP: Fix lis3lv02d accelerometer to use gpio_to_irq
  ARM: imx: only call l2x0_init if it's available
  ARM: imx: only specify i2c device type once
  ...
2012-06-17 00:20:47 -07:00
Andrew Lunn 128789a829 ARM: Kirkwood: Fix clk problems modular ethernet driver
When the ethernet driver was built as a module, it would lock the
machine when loaded. At boot the ethernet clks are unused, so get
turned off.  Later, when the module is loaded, the probe function
would access the hardware before the clock was restarted, and the
machine would lock. It has also been determined that when the clk is
turned off, the interface forgets its MAC address, which for most
systems, is set by the boot loader.

When the machine setup file creates a platform device for the
interface, prepare and enable the clock for the interface. This will
ensure it is not turned off. However, if the setup file only
instantiates one platform device, the other will have its clk
disabled, thus maybe saving a little power.

Report-by: Simon Baatz <gmbnomis@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Simon Baatz <gmbnomis@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-06-16 18:45:20 -07:00
Arnd Bergmann 9b0f7e3992 arm: versatile: fix and enable PCI I/O space
With commit 4d5fc58dbe (ARM: remove bunch of now unused
mach/io.h files), the I/O space setup was completely broken on
versatile. This patch fixes that and prepares for further
I/O space clean-up.

I/O space handling on the versatile platform is currently
broken in multiple ways. Most importantly, the ports do
not get mapped into the virtual address space at all.

Also, there is some amount of confusion between PCI I/O
space and other statically mapped MMIO registers in the
platform code:

* The __io_address() macro that is used to access the
  platform register maps to the same __io macro that gets
  used for I/O space.

* The IO_SPACE_LIMIT is set to a value that is much larger
  than the total available space.

* The I/O resource of the PCI bus is set to the physical
  address of the mapping, which is way outside of the
  actual I/O space limit as well as the address range that
  gets decoded by traditional PCI cards.

* No attempt is made to stay outside of the ISA port range
  that some device drivers try access.

* No resource gets requested as a child of ioport_resource,
  but an IORESOURCE_IO type mapping gets requested
  as a child of iomem_resource.

This patch attempts to correct all of the above. This makes
it possible to use virtio-pci based virtual devices as well
as actual PCI cards including those with legacy ISA port
ranges like VGA.

Some of the issues seem to be duplicated on other platforms.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[rob: update to 3.5-rc2 and io.h cleanup related changes]
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-06-16 18:41:35 -07:00
Olof Johansson 7dea9e7361 Merge branch 'fixes' of git://github.com/hzhuang1/linux into fixes
* 'fixes' of git://github.com/hzhuang1/linux:
  ARM: mmp: fix missing cascade_irq in irq handler
  ARM: dts: update memory size on brownstone
2012-06-16 18:36:52 -07:00
Linus Torvalds 485802a6c5 Linux 3.5-rc3 2012-06-16 17:25:17 -07:00
Linus Torvalds d865983292 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs compile warning fixes from Chris Mason.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: cast devid to unsigned long long for printk %llu
  Btrfs: init old_generation in get_old_root
2012-06-16 17:01:41 -07:00
Linus Torvalds c458175eb6 Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile update from Chris Metcalf:
 "This one-line bug fix unbreaks glibc robust mutexes (among other
  things no doubt), from code merged in during the 3.5 merge window but
  which we had been running internally at Tilera for almost a year."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: fix bug in get_user() for 4-byte values
2012-06-16 17:00:15 -07:00
Linus Torvalds 88c144b12a fbdev fixes for 3.5
- two fixes for s3c-fb by Jingoo Han
   (including a fix for a potential division by zero)
 - a couple of randconfig fixes by Arnd Bergmann
 - a cleanup for bfin_adv7393fb by Emil Goode
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP3OVbAAoJECSVL5KnPj1P+BoP/jf20UvGevLHaKYLxjB6elWP
 cutoJFgfPWWdJcu6qwk4thR3fAZkB9R1vorFEp0EP7m8EkB8poP7pdPK7xGzbLKT
 iGhWUy4pENcleyPu0mXE2kqLfq5g3fnPc9M0aiIySwfGAgjop24duP9NYMBL5sfr
 GHs7JcrcyqWWVDHQLK3gx7JpVzoQOlN44yy64Su2GR8hfLUiSHC35AVnmK8svkra
 S5dTa9RJJwVFowF8/o5bUzFuuMctKc22CbXA2NkR+PUHHc0zAqaRo0XedTr02C8u
 bM9w7RWxQ71ZprJJeaBJgUbDev0JO9QxX7kA6eN3MRTHimi2wz9n2jy95R+H3ITm
 EXhCl6F2kf+xzOfl9Ta9lB4eUthj2O1yBHGArpc5iJOuWHip2ggW4SrEyjKLrOpn
 7AyB+D9gbZppnms4z5kCPM0Q/i/flyMoEccuaV4D3AaWw1miA4leQUtfjL/SGavl
 9t6N6Zo2OT/h+Z36GauFnH3ap4lXNGZo3I03sFGp7E4VC0MDA8UnqG70zzdzm7BM
 CO/c34HVpNBS0MH6blsUn+64aftJampqVzlQ0uj++5R1fpDGBCo+p+WEkIx9GGqN
 bhJbmXR0HPnHtNQtf/LCPv98V/OAnWpfC98EeewPAQ3MTAexpdS8JduuY3PjhdhD
 TkLBbb6A5UCU90SV32AD
 =0Zkc
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6

Pull fbdev fixes from Florian Tobias Schandinat:

 - two fixes for s3c-fb by Jingoo Han (including a fix for a potential
   division by zero)

 - a couple of randconfig fixes by Arnd Bergmann

 - a cleanup for bfin_adv7393fb by Emil Goode

* tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6:
  video: s3c-fb: fix possible division by zero in s3c_fb_calc_pixclk
  video: s3c-fb: clear SHADOWCON register when clearing hardware window registers
  drivers/tosa: driver needs I2C and SPI to compile
  drivers/savagefb: use mdelay instead of udelay
  video/console: automatically select a font
  video/ili9320: do not mark exported functions __devexit
  drivers/video: use correct __devexit_p annotation
  video: bfin_adv7393fb: Convert to kstrtouint_from_user
2012-06-16 16:59:05 -07:00
Chris Metcalf 6699c8cda3 tile: fix bug in get_user() for 4-byte values
The definition of 32-bit values in the 64-bit tilegx architecture is that
they should be sign-extended regardless of whether they are considered
signed or unsigned by the compiler.  Accordingly, we need to use an
"ld4s" rather than "ld4u" to load and sign-extend for get_user().

This fixes glibc bug 14238 (see http://sourceware.org/bugzilla),
introduced during the 3.5 merge window.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-06-16 16:56:13 -04:00
Yuanhan Liu b56a39ac26 printk: return -EINVAL if the message len is bigger than the buf size
Just like what devkmsg_read() does, return -EINVAL if the message len is
bigger than the buf size, or it will trigger a segfault error.

Acked-by: Kay Sievers <kay@vrfy.org>
Acked-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-16 08:36:03 -07:00
Yuanhan Liu 4a77a5a06e printk: use mutex lock to stop syslog_seq from going wild
Although syslog_seq and log_next_seq stuff are protected by logbuf_lock
spin log, it's not enough. Say we have two processes A and B, and let
syslog_seq = N, while log_next_seq = N + 1, and the two processes both
come to syslog_print at almost the same time. And No matter which
process get the spin lock first, it will increase syslog_seq by one,
then release spin lock; thus later, another process increase syslog_seq
by one again. In this case, syslog_seq is bigger than syslog_next_seq.
And latter, it would make:
   wait_event_interruptiable(log_wait, syslog != log_next_seq)
don't wait any more even there is no new write comes. Thus it introduce
a infinite loop reading.

I can easily see this kind of issue by the following steps:
  # cat /proc/kmsg # at meantime, I don't kill rsyslog
                   # So they are the two processes.
  # xinit          # I added drm.debug=6 in the kernel parameter line,
                   # so that it will produce lots of message and let that
                   # issue happen

It's 100% reproducable on my side. And my disk will be filled up by
/var/log/messages in a quite short time.

So, introduce a mutex_lock to stop syslog_seq from going wild just like
what devkmsg_read() does. It does fix this issue as expected.

v2: use mutex_lock_interruptiable() instead (comments from Kay)

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-By: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-16 08:36:02 -07:00
Will Deacon 667d1b48bc ARM: 7425/1: extable: ensure fixup entries are 4-byte aligned
Fixup entries in the kernel exception tables should be 4-byte aligned
since we return directly to them when handling a faulting instruction in
the kernel.

This patch adds the missing align directives to the fixup entries.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-06-16 16:30:25 +01:00
Dave Airlie c4af5c4597 Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes
* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: cache the EDID for eDP panels
  Revert "drm/i915/dp: Use auxch precharge value of 5 everywhere"
  drm/i915: eDP aux needs vdd
  drm/i915: don't enumerate HDMID if an eDP panel is already active on the port
2012-06-16 14:45:17 +01:00
Jesse Barnes d6f24d0fa6 drm/i915: cache the EDID for eDP panels
They aren't going anywhere, and probing on DDC can cause the panel to
blank briefly, so read them up front and cache them for later queries.

v2: fix potential NULL derefs in intel_dp_get_edid_modes and
    intel_dp_get_edid (Jani)
    copy full EDID length, including extension blocks (Takashi)
    free EDID on teardown (Takashi)
v3: malloc a new EDID buffer that's big enough for the memcpy (Chris)
v4: change handling of NULL EDIDs, just preserve the NULL behavior
    across detects and mode list fetches rather than trying to re-fetch
    the EDID (Chris)
v5: be glad that Chris is around to remind me to hit C-x C-s before
    committing.

References: https://bugs.freedesktop.org/show_bug.cgi?id=46856
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-06-16 15:39:02 +02:00
Daniel Vetter 6b4e0a93ff Revert "drm/i915/dp: Use auxch precharge value of 5 everywhere"
This reverts commit 092945e11c.

This commit prevents a DP screen from properly training the link.
Oddly enough it works, once the machine has been warm-booted with an
older kernel.

According to DP docs this _should_ have been the right precharge time.
Also, the commit that originally introduces this was just general snb
DP enabling and didn't mention any specific reason for this special
value. Whatever, trust the reporter that this makes things worse and
let's just revert it.

v2: Less spelling fail.

Cc: Adam Jackson <ajax@redhat.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reported-by: "Wouter M. Koolen" <W.M.Koolen-Wijkstra@cwi.nl>
Buglink: https://lkml.org/lkml/2012/6/14/301
Cc: stable@vger.kernel.org (only for 3.4)
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-06-16 15:39:02 +02:00
Daniel Vetter 351cfc34db drm/i915: eDP aux needs vdd
The new oui probe has been missing these.

This issue has been introduce in

commit 0d19832853
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon May 14 16:05:47 2012 -0400

    drm/i915/dp: Probe branch/sink OUIs

v2: Do the eDP vdd dance of simply not probing the OUI on eDP panels
as suggested by Chris Wilson.

v3: Fix up the error path fail - I suck.

Cc: Adam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50808
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Bugreport: http://permalink.gmane.org/gmane.comp.video.dri.devel/69695
Tested-by: Yang Guang <guang.a.yang@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-06-16 15:39:02 +02:00