summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2012-06-18Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
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-18bug.h: Fix up powerpc build regression.Paul Mundt
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-18Makefile: fix up CROSS_COMPILE and READABLE_ASM interaction.Paul Mundt
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-18hwmon: (emc2103) Fix use of an uninitilized variable in error caseGuenter Roeck
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-18hwmon: (applesmc) Limit key length in warning messagesHenrik Rydberg
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-18ftrace: Make all inline tags also include notraceSteven Rostedt
Commit 5963e317b1e9d2a ("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 45959ee7aa645815a ("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-18NFSv4.1: Fix umount when filelayout DS is also the MDSTrond Myklebust
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-18SPI: fix over-eager devm_xxx() conversionRussell King
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-18perf: Use css_tryget() to avoid propping up css refcountSalman Qazi
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-18ALSA: 6fire: use NULL instead of 0 for pointer assignmentDaniel Mack
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-18ALSA: hda - Handle open while transitioning to D3.Dylan Reid
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-18ALSA: snd-usb: make snd_usb_substream_capture_trigger staticDaniel Mack
Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-18ALSA: snd-usb: fix sync pipe checkDaniel Mack
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-18Merge tag 'asoc-3.5' of ↵Takashi Iwai
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-17Merge branch 'hfsplus'Linus Torvalds
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-17hfsplus: fix bless ioctl when used with hardlinksMatthew Garrett
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-17hfsplus: fix overflow in sector calculations in hfsplus_submit_bioJanne Kalliomäki
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-17ARM: 7427/1: mmc: mmci: Defer probe() in case of yet uninitialized GPIOsRoland Stigge
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-17ARM: 7426/1: mmc: mmci: Remove wrong error handling of gpio 0Roland Stigge
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-17ARM: OMAP: PM: Lock clocks list while generating summaryTodd Poynor
Commit a53025724052b2b1edbc982a4a248784638f563d (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-17ARM: iconnect: Remove include of removed linux/spi/orion_spi.hAndrew Lunn
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-17pinctrl/nomadik: document Alt-C glitchLinus Walleij
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-17pinctrl: mxs: Use kfree to fix build errorFabio Estevam
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-17regulator: Change db8500-prcmu match names to reflect Device TreeLee Jones
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-17regulator: Change ab8500 match names to reflect Device TreeLee Jones
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-17regulator: Fix the s5m8767a problem of the division by nullSangbeom Kim
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-17hwmon: (coretemp) Drop needless initializationJean Delvare
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-17hwmon: (coretemp) Document TjMax for 3rd generation i5/i7 processorsGuenter Roeck
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-17hwmon: (coretemp) Improve support for TjMax detection on Atom CPUsGuenter Roeck
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-17hwmon: (coretemp) Add support for Atom D2000 and N2000 series CPU modelsGuenter Roeck
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-17hwmon: (coretemp) Improve support of recent Atom CPU modelsJean Delvare
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-17Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
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-17remoteproc/omap: fix dev_err typoOhad Ben-Cohen
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-17Merge tag 'fixes-for-linus' of ↵Linus Torvalds
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-16ARM: Kirkwood: Fix clk problems modular ethernet driverAndrew Lunn
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-16arm: versatile: fix and enable PCI I/O spaceArnd Bergmann
With commit 4d5fc58dbe34b (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-16Merge branch 'fixes' of git://github.com/hzhuang1/linux into fixesOlof Johansson
* '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-16Linux 3.5-rc3v3.5-rc3Linus Torvalds
2012-06-16Merge branch 'for-linus' of ↵Linus Torvalds
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-16Merge branch 'stable' of ↵Linus Torvalds
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-16Merge tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6Linus Torvalds
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-16tile: fix bug in get_user() for 4-byte valuesChris Metcalf
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-16printk: return -EINVAL if the message len is bigger than the buf sizeYuanhan Liu
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-16printk: use mutex lock to stop syslog_seq from going wildYuanhan Liu
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-16ARM: 7425/1: extable: ensure fixup entries are 4-byte alignedWill Deacon
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-16Merge branch 'drm-intel-fixes' of ↵Dave Airlie
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-16drm/i915: cache the EDID for eDP panelsJesse Barnes
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-16Revert "drm/i915/dp: Use auxch precharge value of 5 everywhere"Daniel Vetter
This reverts commit 092945e11c5b84f66dd08f0b87fb729715d377bc. 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-16drm/i915: eDP aux needs vddDaniel Vetter
The new oui probe has been missing these. This issue has been introduce in commit 0d198328538276c4459ef5de081e68ae60e6c4c2 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-16drm/i915: don't enumerate HDMID if an eDP panel is already active on the portJesse Barnes
This prevents the HDMI detect functions from poking at an eDP connected panel, which can lead to trouble. [danvet: Note that we have some other reports of DP vs. HDMI fighting, but the general case is a much bigger fish to fry.] References: https://bugs.freedesktop.org/show_bug.cgi?id=42278 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>