Olof Johansson [Mon, 12 Mar 2012 17:15:07 +0000 (10:15 -0700)]
CHROMIUM: config: turn off some rtl wifi drivers on chromeos configs
Sync up RTL wifi driver options with the 32-bit 3.0 config, only enabling
RTL8192CE as a module.
Keep more drivers enabled on chromiumos, but not chromeos.
BUG=chromium-os:27639
TEST=build
Change-Id: I0a7cd322389d45bd251875079c5b91c5b44bd285
Signed-off-by: Olof Johansson <olof@lixom.net>
Reviewed-on: https://gerrit.chromium.org/gerrit/17842
Tested-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Olof Johansson [Wed, 18 Apr 2012 21:00:47 +0000 (14:00 -0700)]
CHROMIUM: config: re-normalize split configs
No changes, just running "kernelconfig oldconfig", no questions were
asked.
BUG=none
TEST=none
Change-Id: I5f7e7dee8063a3941c4cb4340462539f75bd5890
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/20497
Reviewed-by: Anush Elangovan <anush@chromium.org>
Andrew de los Reyes [Thu, 29 Mar 2012 16:51:48 +0000 (09:51 -0700)]
CHROMIUM: config: enable Logitech Unifying Receiver support.
This is needed for many Logitech wireless mice to work. We supported
it in earlier kernels, but accidentally disabled it with the switch to
3.2.
BUG=chromium-os:28672
TEST=built; tested problematic devices; saw them function correctly.
Change-Id: I0582a5c90e36db74016521e772d285bad40bb76e
Signed-off-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/19304
Reviewed-by: Grant Grundler <grundler@chromium.org>
Joseph Hwang [Tue, 21 Feb 2012 09:55:44 +0000 (17:55 +0800)]
CHROMIUM: config: base.config: enable uinput driver
Enable uinput driver for all platforms so that we could
emulate input devices when needed. Note that only test
images will be installed with this driver.
BUG=chromium-os:26707
TEST=On test images, install the uinput module by executing
$ modprobe uinput
and check the module by
$ lsmod | grep uinput
There should be no uinput module on non-test images.
Change-Id: Ie96242c4d56403866a2298db2ba3bd6459248c1b
Signed-off-by: Joseph Hwang <josephsih@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/18942
Reviewed-on: https://gerrit.chromium.org/gerrit/19063
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Dylan Reid [Wed, 21 Mar 2012 16:36:52 +0000 (09:36 -0700)]
CHROMIUM: config: Disable USB audio.
We don't support this yet. With it enabled, the behavior of the
system is random, often getting to a state where no audio is output
when booted with a USB device attached. Turn off for R19, will
re-enable when full USB device support is merged for R20.
BUG=chrome-os-partner:8412, chromium-os:20085
TEST=build and run kernel on stumpy/lumpy/alex, plug and unplug audio devices.
Change-Id: I79a761120e5840a85f512f5583f8c1fd6d99e665
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/18665
Reviewed-by: Taylor Hutt <thutt@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Simon Que [Tue, 8 May 2012 15:30:51 +0000 (15:30 +0000)]
CHROMIUM: drm/i915: Reeneable FB compression and semaphores for kernel 3.2
marcheu added these changes in kernel 3.0:
https://gerrit.chromium.org/gerrit/12367
https://gerrit.chromium.org/gerrit/12368
They were undone in kernel 3.2. This patch restores them.
BUG=chromium-os:27468
TEST=power_x86Settings autotest passes with kernel 3.2
Change-Id: Ic5a104eb73697cfa9a437ae2c4868051a77ad91f
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/18687
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Sean Paul [Fri, 16 Mar 2012 16:43:22 +0000 (12:43 -0400)]
CHERRY-PICK: drm/i915: Add wait_for in init_ring_common
I have seen a number of "blt ring initialization failed" messages
where the ctl or start registers are not the correct value. Upon further
inspection, if the code just waited a little bit, it would read the
correct value. Adding the wait_for to these reads should eliminate the
issue.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit
f01db988ef6f6c70a6cc36ee71e4a98a68901229)
TEST=Tested on lumpy with 1000's of suspend/resume cycles
BUG=chrome-os-partner:8366
Change-Id: I9544a5a65efb0775302ccf001d4dc1b43a429963
Reviewed-on: https://gerrit.chromium.org/gerrit/18459
Tested-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>
Olof Johansson [Mon, 12 Mar 2012 18:50:26 +0000 (11:50 -0700)]
CHROMIUM: config: turn on XZ ramdisk support
This reduces the initramdisk size on factory images by a whole lot.
BUG=chromium-os:27639
TEST=needs to go through a test factory run
Change-Id: I548df8d7a2a7d257600bfef578a02746c9cb23ac
Signed-off-by: Olof Johansson <olof@lixom.net>
Reviewed-on: https://gerrit.chromium.org/gerrit/17850
Tested-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Daniel Kurtz [Thu, 16 Feb 2012 03:17:14 +0000 (11:17 +0800)]
CHROMIUM: config: x86_64: build ATMEL_MXT as module
This module is used with atmel touchpads and touchscreens.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:27448
TEST=emerge-amd-generic chromeos-kernel
atmel_mxt_ts.ko is built cleanly
Change-Id: Ia6071b8dd33b842624ce18080c2bb8de32c94b56
Reviewed-on: https://gerrit.chromium.org/gerrit/16006
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Daniel Kurtz [Thu, 16 Feb 2012 03:16:21 +0000 (11:16 +0800)]
CHROMIUM: config: i386: build ATMEL_MXT as module
This module is used with atmel touchpads and touchscreens.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:27448
TEST=emerge-x86-* chromeos-kernel
atmel_mxt_ts.ko is built cleanly
Change-Id: I2a6d096805fc6de80552cc8d0e3dcb68cbd77180
Reviewed-on: https://gerrit.chromium.org/gerrit/15674
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Olof Johansson [Thu, 8 Mar 2012 19:39:16 +0000 (11:39 -0800)]
CHROMIUM: config: rerun oldconfig, enable low mem notification and fix ARM
BUG=none
TEST=none
Change-Id: Ia9d8283594441b237f3a970ec79738059bf01a2e
Signed-off-by: Olof Johansson <olof@lixom.net>
Reviewed-on: https://gerrit.chromium.org/gerrit/17603
Tested-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Grant Grundler [Thu, 8 Mar 2012 20:53:03 +0000 (20:53 +0000)]
CHROMIUM:drivers:acpi: REWRITE "Do not clear ASPM for Mario and Alex" for 3.2.7
The handling for ASPM bit in PCIe 1.1 compliant devices was rewritten
and pulled into linux-stable for 3.2.x kernels. So the original work
around for Mario/Alex doesn't work on Mario. I tested the UPSTREAM code on
Alex (without this patch AND the original reverted). The result for Alex
was ASPM was left enabled. This patch forces the same behavior for
Mario.
BUG=chromium-os:27496
TEST=boot and "lspci -vvv | fgrep ASPM" should show "enabled" for WIFI.
Change-Id: Ia9aa4f099515bb656399a894d7fdb3f47a46dfec
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/17622
Benson Leung [Wed, 29 Feb 2012 07:47:09 +0000 (23:47 -0800)]
CHROMIUM: config: build in cyapa related configs
Build in i801_smbus, chromeos_laptop, and cyapa
to speed up time to trackpad functional.
BUG=chrome-os-partner:7760
TEST=boot lumpy with cyapa trackpad.
check dmesg.
Look for cyapa initialization. Check that it occurs at ~1.4s.
Change-Id: If5392f1aad7395141e4a3e49c1d568376b87fdf8
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/17045
Reviewed-by: Olof Johansson <olofj@chromium.org>
Olof Johansson [Fri, 24 Feb 2012 01:24:19 +0000 (17:24 -0800)]
CHROMIUM: config: create chromiumos-x86_64 config placeholder
No contents yet; will be added over time.
BUG=none
TEST=none
Change-Id: Ica62b903c52fa66de3083eb2a1e0405c27e99094
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/16573
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Olof Johansson [Mon, 20 Feb 2012 05:57:13 +0000 (21:57 -0800)]
CHROMIUM: config: x86: switch to IO_DELAY using port 0xED
BUG=chromium-os:26131
TEST=Previous testcase was to attempt EC firmware upgrade, should still be accurate. Regression testcase is planned.
Change-Id: Ia8bbecc01f192cff7e7a9820634d45e4472a9631
Signed-off-by: Olof Johansson <olof@lixom.net>
Reviewed-on: https://gerrit.chromium.org/gerrit/16231
Tested-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Grant Grundler [Fri, 17 Feb 2012 18:24:29 +0000 (18:24 +0000)]
CHROMIUM: add ARM_PHYS_OFFSET to arm configs
Change-Id: Iff143fd8c2eefd2c66f7ebda4abd95e926d34b69
Signed-off-by: Grant Grundler <grundler@chromium.org>
Kees Cook [Thu, 9 Feb 2012 00:53:31 +0000 (16:53 -0800)]
CHROMIUM: config: enable DM_CRYPT target
The dm "crypt" target is needed for encrypted /var support. Additionally, since the
expected hash alg will be sha256, built it in, and ready future support for sha512
as a module.
BUG=chromium-os:22172
TEST=build, boot amd64-generic, verify target listed in "dmsetup targets"
Signed-off-by: Kees Cook <keescook@chromium.org>
Change-Id: I0f2396fdf613de9acf9d905177ffc00c5af6224c
Reviewed-on: https://gerrit.chromium.org/gerrit/15548
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Commit-Ready: Kees Cook <keescook@chromium.org>
Grant Grundler [Mon, 6 Feb 2012 18:12:47 +0000 (18:12 +0000)]
CHROMIUM: update chromeos/config for x86 (32 and 64-bit) v3.2 kernel
Ran scripts/kernelconfig and hand edits to cleanup/update configs.
. ~/buildall-cros
cleaning [00:00] done
chromeos-intel-pineview [01:25] passed, 16 warnings
chromeos-intel-menlow [01:19] passed, 32 warnings
chromeos-pinetrail-i386 [01:19] passed, 32 warnings
chromiumos-i386 [01:35] passed, 32 warnings
Additional builds for alex/zgb/stumpy all boot on those respective
machines. Used alex and while chrome is 'crashy', platform seems stable.
BUG=none
TEST=builds all x86 "flavours" and boots on 3 common machines.
Change-Id: I94b7632d4a140844d598233ce88416697803ccff
Signed-off-by: Grant Grundler <grundler@chromium.org>
Sean Paul [Wed, 25 Jan 2012 21:16:45 +0000 (16:16 -0500)]
CHROMIUM: drm/i915: Enable LVDS downclocking
Enable LVDS downclocking in the intel i915 graphics driver. This
will save approximately 200mW when the screen is idle.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
BUG=chromium-os:9803
TEST=Tested on alex and lumpy
Change-Id: I6fe403c8d9d520901a01549ad6b5eff80de318f3
Reviewed-on: https://gerrit.chromium.org/gerrit/14815
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>
Tested-by: Sean Paul <seanpaul@chromium.org>
Mike Frysinger [Wed, 18 Jan 2012 20:53:56 +0000 (15:53 -0500)]
CHROMIUM: config: enable joystick support
We want to be able to use USB joysticks with games, so enable the
driver by default in our builds.
BUG=None
TEST=build kernel, packages, and image for x86-alex; boot it up; plug in USB gamepad and see /dev/input/js0
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Change-Id: I494672a08d307d7268f9d5f0b2e06e68c4dedc5a
Reviewed-on: https://gerrit.chromium.org/gerrit/14398
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Doug Anderson [Thu, 12 Jan 2012 23:16:09 +0000 (15:16 -0800)]
CHROMIUM: config: enable ARM errata 720789
This errata claims to be relevant to all Tegra Cortex A9 systems
prior to r2p0. We haven't necessarily verified that the problem
that the errata is addressing hits us, but we know that it is
relevant to the tegra ARM code and the hope is that this will
give us a tad bit more stability.
There were some claims on the mailing list thinking that this
errata wasn't needed because it was already fixed in gcc, but
the cited reference appears to be talking about something else
(TLS vs. TLB), so we're going to go ahead and turn this on.
BUG=chromium-os:23418
TEST=Build and boot kaen
Change-Id: Id65006e886886c65699fd5673105f5b7b00fc99b
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/14098
Reviewed-by: Olof Johansson <olofj@chromium.org>
Brian Harring [Sat, 24 Dec 2011 02:16:15 +0000 (18:16 -0800)]
CHROMIUM: make-3.82: hack to fix differing behaviour between 3.81 and 3.82
BUG=chromium-os:19882
TEST=emerge make-3.82 via I7d0a6e25, emerge-x86-alex chromeos-kernel
Change-Id: I6accabc10e93fe12debba42667900e4e0463cb41
Signed-off-by: Brian Harring <ferringb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13474
Reviewed-by: Olof Johansson <olofj@chromium.org>
Sean Paul [Wed, 4 Jan 2012 19:11:23 +0000 (14:11 -0500)]
CHROMIUM: i915: Tweak idle timeouts to improve power usage
Reduce the idle timeouts in the i915 driver to improve power usage. By being
slightly more aggresive with the timeouts, we can get the GPU to sleep a bit
faster without significantly increasing the misfires (times when the timer
expires and the stack is still busy).
BUG=chromium-os:9803
TEST=Tried various values, found the times that maximized idling while not
significantly increasing the missed idles.
Change-Id: Ia0c5835aa0f801b965bc85f8cbc7d15d415c2dac
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13651
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Sean Paul [Fri, 16 Dec 2011 20:22:31 +0000 (15:22 -0500)]
CHROMIUM: i915: Send flush request regardless of domain
This sends a flush request to the GPU regardless of the memory domain. There is
a bug in the driver that hangs on to a gem object, keeping it active forever.
This prevents the GPU from going idle and saving power.
BUG=chromium-os:6774,chromium-os:9803
TEST=Run aura on SNB machine. Login as guest and ensure the cursor is inactive.
Look at /sys/kernel/debug/dri/0/i915_gem_active and ensure it's empty.
Change-Id: Ibbef8b95413231d502a750d5561377989896305c
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13094
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Kees Cook [Mon, 28 Nov 2011 23:39:36 +0000 (15:39 -0800)]
CHROMIUM: config: enable Yama
Enable the Yama LSM, gaining symlink, hardlink, and ptrace restrictions.
BUG=chromium-os:22137
TEST=x86-alex build, boot, suite_Smoke passes, logging_UserCrash passes,
security_SymlinkRestrictions, security_HardlinkRestrictions,
security_ptraceRestriction.
STATUS=Fixed
Change-Id: If55aaff3e6f79a6cc839fca1377d701f2cb0d169
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/12409
Reviewed-by: Olof Johansson <olofj@chromium.org>
Todd Broch [Wed, 30 Nov 2011 19:26:26 +0000 (11:26 -0800)]
CHROMIUM: enable i915 power-saving render C-state 6 by default.
BUG=chrome-os-partner:6768
TEST=manual,
- boot kernel
1. cat /sys/module/i915/parameters/i915_enable_rc6
- should equal 1
2. start powertop, goto 'Idle Stats' tab
- make sure that the Package c-states (C6, C7) are entered at some
non-trivial percentage when system is idle
Signed-off-by: Todd Broch <tbroch@chromium.org>
Change-Id: Ib557a14e3cf20b55a6670808e681ef21b1e0ed1b
Reviewed-on: https://gerrit.chromium.org/gerrit/12280
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Bryan Freed [Fri, 2 Dec 2011 19:00:27 +0000 (11:00 -0800)]
CHROMIUM: iio: light sensor: Improve granularity of tsl2583 lux values.
When illuminance0_calibbias gets 4000 (for a 4x multiplier), we see lux
granularity of 4. Reversing the order of the right shift and multiplication
retains the precision of the unadjusted lux value.
BUG=chromium-os:23451
TEST='while :;do cat illuminance0_input;done' gives granularity of 1.
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Change-Id: I92667cb04007ac17e91e0e3da10d691f774a753d
Reviewed-on: https://gerrit.chromium.org/gerrit/12394
Reviewed-by: Benson Leung <bleung@chromium.org>
Stéphane Marchesin [Thu, 10 Nov 2011 20:19:05 +0000 (12:19 -0800)]
CHROMIUM: Add the dfixed_frac() macro back.
It's gone from upstream kernel, but tegra uses it.
Change-Id: Ifaa6401d308fbe7086877934a495951630cfe1a8
Reviewed-on: https://gerrit.chromium.org/gerrit/11502
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Simon Que [Thu, 6 Oct 2011 00:37:52 +0000 (17:37 -0700)]
CHROMIUM: drivers: i915: Default backlight PWM frequency
If the firmware did not initialize the backlight PWM registers, set up a
default PWM frequency of 200 Hz. This is determined using the following
formula:
freq = refclk / (128 * pwm_max)
The PWM register allows the max PWM value to be set. So we want to use
the formula, where freq = 200:
pwm_max = refclk / (128 * freq)
This patch will, in the case of missing PWM register initialization
values, look for the reference clock frequency. Based on that, it sets
an appropriate max PWM value for a frequency of 200 Hz.
If no refclk frequency is found, the max PWM will be zero, which results
in no change to the PWM registers.
BUG=chrome-os-partner:5570
TEST=x86 backlight works smoothly w/o dev mode
Change-Id: I4219ab8a2481afbcc3586288594b066fcc6c8294
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/11629
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Simon Que [Thu, 15 Sep 2011 21:53:10 +0000 (14:53 -0700)]
CHROMIUM: drivers: i915: select non-alternate SSC frequency for some systems
When initializing VBT default values, the alternate BIOS SSC frequency
is selected. This patch allows the non-alternate frequency to be
selected as a default, for specified systems. There is a DMI match list
for systems that are to use the non-alternate frequency. Currently,
only Lumpy is on the list.
BUG=chrome-os-partner:5525
TEST=Run on Lumpy with dev switch off. The display should be working,
even if the backlight is not -- something should be visible.
Change-Id: I6c5c57ab38cfb21731a6d56b143c7906b8c85360
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/11339
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Olof Johansson [Fri, 23 Sep 2011 00:09:56 +0000 (17:09 -0700)]
CHROMIUM: config: squash config changes for v3.2 rebase
Change-Id: I6d9faba11506467cd3800cda520e2924bc18b9ea
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Olof Johansson [Fri, 2 Sep 2011 18:00:45 +0000 (11:00 -0700)]
CHROMIUM: add empty .scmversion for stable version id
This is a local hack to avoid setlocalversion to pick up and add a +
when you use cros_workon_make.
BUG=none
TEST=none
Change-Id: Iae311e2d1f5dd8216d52ce1113b0549556e273ac
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/7178
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Sonny Rao [Mon, 12 Sep 2011 22:37:35 +0000 (15:37 -0700)]
CHROMIUM: x86: print out initial usec value calculated from TSC and CPU HZ
This is to give an idea of how much time was spent in firmware and kernel
prior to timekeeping initialization in the kernel. We print out TSC now,
but printing out usec is more portable across architectures. We can
remove the raw TSC print once the scripts have been changed over to use
usec.
BUG=chromium-os:4900
TEST=boot on an x86 platform, verify that there is a line in the
kernel log saying "Initial usec timer"
Change-Id: I0a90643f383a937821f8a6439e994ffdaf43d454
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/7584
Reviewed-by: Olof Johansson <olofj@chromium.org>
Olof Johansson [Fri, 26 Aug 2011 20:16:45 +0000 (13:16 -0700)]
CHROMIUM: enable ATH9K_PCI for i386 and x86_64
Change-Id: I3edfefd870ab50e241185d02ee9d2b3f9c1160ae
Signed-off-by: Olof Johansson <olof@lixom.net>
Sergiu Iordache [Thu, 4 Aug 2011 23:22:30 +0000 (16:22 -0700)]
CHROMIUM: config: enable ramoops
BUG=chromium-os:12059
TEST=Tested manually, run autotests on both Mario and Alex
Change-Id: I780c80bc07b8ee8113ffa4267e55daddc23103ff
Signed-off-by: Sergiu Iordache <sergiu@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/5427
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
[olofj: Split up config change in separate commit]
Signed-off-by: Olof Johansson <olof@lixom.net>
Elly Jones [Fri, 1 Jul 2011 15:02:40 +0000 (11:02 -0400)]
CHROMIUM: dm: Add support for devices by PARTUUID/PARTNROFF.
This is a special hack for the chromium-os bootloader, which knows its own
partition UUID easily but not that of its targets.
BUG=chromium-os:17184
TEST=Adhoc
Booted a kaen with dm-verity, and 'dmesg | grep verity'. Look in particular for
verity finding a root device, and for 'adding target' with a PARTUUID line in
it.
Change-Id: Idc2791db1b9cc376090c188062c675c8dd173fd4
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/3900
Bryan Freed [Wed, 8 Jun 2011 22:54:33 +0000 (15:54 -0700)]
CHROMIUM: light sensor: Add a calibration file to the isl29018 driver.
Backport a patch recently accepted upstream.
Defaulting to 1, this gives a way to amplify the lux value before being
reduced by the programmed adc_bit shift.
Only support whole numbers right now. When this driver is converted to the new
IIO_CHAN framework, it will be easy to support the framework's pseudo float.
Add illuminance0_calibscale documentation to sysfs-bus-iio-light.
BUG=chrome-os-partner:1959
TEST=Confirm illuminance0_calibscale amplifies illuminance0_input values.
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Change-Id: I003d0ce2fac78eadeb8e0d39ab4916105c9aabe9
Reviewed-on: http://gerrit.chromium.org/gerrit/2458
Tested-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Todd Broch [Mon, 2 Apr 2012 06:34:54 +0000 (23:34 -0700)]
CHROMIUM: ALSA: hda: Add fixup for alex model
create fixup function for the alex model and override amp capabilities
for NID 0x2 to remove clipping of audio to built-in speakers
related CL(s):
http://codereview.chromium.org/
6544026/
http://codereview.chromium.org/
6469065/
BUG=chrome-os-partner:2273
TEST=manual,
1. Build kernel and install on device
2. Edit /etc/modprobe.d/alsa.conf to include 'options snd_hda_intel model=alex'
3. Reboot
4. shell>amixer -c 0 sget Speaker | grep -i limit
Should produce 'Limits: Playback 0 - N' where N < 64 (max gain)
Change-Id: Ib4efa3db95955e95421ec55bc77699d6a9faeb62
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/3140
Reviewed-by: Olof Johansson <olofj@chromium.org>
Conflicts:
sound/pci/hda/patch_realtek.c
[anush: fixup for 3.4]
Signed-off-by: Anush Elangovan <anush@chromium.org>
Sonny Rao [Thu, 26 May 2011 21:34:33 +0000 (14:34 -0700)]
CHROMIUM: Make tsl2583 do async suspend/resume
The i2c based tsl2583 must re-write all registers after suspend
which can take a considerable portion of kernel resume time.
Make this device fully asynchronous for suspend/resume
BUG=15489
TEST=suspend/resume and make sure light sensor works afterward
Change-Id: I3334ef3313694889da409b3b9e1ecccee79e4387
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/1662
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Todd Broch [Fri, 20 May 2011 23:21:34 +0000 (16:21 -0700)]
CHROMIUM: ALSA: hda: delay EAPD de-assert for alex system
With power savings (CONFIG_SND_HDA_POWER_SAVE) enabled the EAPD GPIO de-asserts
prior to proper biasing of the speaker inputs into the external amplifier
causing a 'pop'. Delaying EAPD by 25ms provides necessary setup time to avoid
the pop.
BUG=chrome-os-partner:3971
TEST=manual, see tracker re:#6 for
Change-Id: I7f6a57ebf65ef42df47250772df29d383ff4892e
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/1316
Reviewed-by: Mark Hayter <mdhayter@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Mandeep Singh Baines [Mon, 23 May 2011 18:22:12 +0000 (11:22 -0700)]
CHROMIUM: ata: remove 200 ms sleep in sata_link_resume
This saves us 200 ms on boot (once other changes are applied).
BUG=chromium-os:15409,chromium-os:12110,chromium-os:15653
TEST=Booted x86-generic on Mario.
Change-Id: I419622c7329d30e39809f6d08972034a1ac6d3dc
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/1372
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Olof Johansson [Wed, 11 May 2011 22:21:45 +0000 (15:21 -0700)]
CHROMIUM: drm: drm_fixed.h: include asm/div64.h
Change-Id: I59769e37c46bea22e7b0ed8452a14b3beb6f81dc
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/721
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Mandeep Singh Baines [Thu, 12 May 2011 01:48:04 +0000 (18:48 -0700)]
CHROMIUM: breakme: add hungtask support to /proc/breakme
Adding this so that we can test the hung_task detector.
BUG=chromium-os:15086
TEST=see below
$ echo hungtask > /proc/breakme &
[1] 3755
$ dmesg
...
[ 240.844119] INFO: task bash:3755 blocked for more than 120 seconds.
[ 240.844130] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 240.844139] bash D
b6d629b8 7188 3755 3753 0x00000000
[ 240.844165]
ac207ea4 00000082 795b6004 b6d629b8 79633f40 ac222780 79633f40 ac2229f4
[ 240.844185]
ac2229f0 ac2229f0 79633f40 79633f40 dfec48db 00000015 dfe6517e 00000015
[ 240.844204]
ac222780 ac3c46e4 00000002 01000041 795b59c0 00000002 000000d0 ac222780
[ 240.844223] Call Trace:
[ 240.844247] [<
793c9371>] schedule_timeout+0x1b/0x95
[ 240.844262] [<
790980ff>] ? lru_cache_add_lru+0x3d/0x3f
[ 240.844275] [<
790ac8c6>] ? page_add_new_anon_rmap+0x61/0x6f
[ 240.844287] [<
790a554e>] ? handle_pte_fault+0x248/0x984
[ 240.844301] [<
79199f30>] ? _copy_from_user+0x32/0x6e
[ 240.844312] [<
793c9405>] schedule_timeout_uninterruptible+0x1a/0x1c
[ 240.844325] [<
790f92d6>] write_breakme+0x9e/0x124
[ 240.844337] [<
790a6a99>] ? handle_mm_fault+0x131/0x143
[ 240.844350] [<
790f3996>] proc_reg_write+0x5f/0x73
[ 240.844361] [<
790f9238>] ? write_breakme+0x0/0x124
[ 240.844374] [<
790bd9e8>] vfs_write+0x8f/0x12c
[ 240.844385] [<
790f3937>] ? proc_reg_write+0x0/0x73
[ 240.844396] [<
790bdb26>] sys_write+0x40/0x65
[ 240.844408] [<
790028cc>] sysenter_do_call+0x12/0x22
Change-Id: Iff031f084c4a12349e37ecea1319e2ed069f3592
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/739
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Olof Johansson [Wed, 11 May 2011 20:01:00 +0000 (13:01 -0700)]
CHROMOUM: scripts: de-debianize kernel config script
BUG=none
TEST=build kernel, make sure version string looks sane still
Change-Id: I690379c6abf8cc9ccd750f9b86bc362f0abf2120
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/697
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Chris Wolfe [Wed, 30 Mar 2011 13:31:04 +0000 (09:31 -0400)]
CHROMIUM: scripts: Abort with error if an unknown flavour is passed to prepareconfig
Depends-on: http://codereview.chromium.org/
6676055/
Signed-off-by: Chris Wolfe <cwolfe@chromium.org>
BUG=chromium-os:13213
TEST=Ran prepareconfig with known and unknown flavors across x86 and arm.
Change-Id: I5e9011ee6a691e11de528bca8896611e36c5c1c7
Review URL: http://codereview.chromium.org/
6667064
Olof Johansson [Wed, 20 Oct 2010 00:26:49 +0000 (19:26 -0500)]
CHROMIUM: config: add configuration files and infrastructure
Change-Id: I278e56e1014c19eac845fa39ca61f1f68c43c7e3
Signed-off-by: Olof Johansson <olofj@chromium.org>
Hugh Dickins [Thu, 19 Aug 2010 20:07:08 +0000 (13:07 -0700)]
CHROMIUM: drm: drm_fb_helper_panic hangs panic
One of the notifiers called on panic, drm_fb_helper_panic(), hinders
rather than helps the panic: I've never seen it do other than hang
the machine, before all the messages were shown, preventing reboot.
Jesse Barnes posted 3 patches to linux-kernel on 9 April 2010, to
make it "a little more likely we'll get panic output onto the screen
even when X is running" with Kernel Mode Switching:
http://lkml.org/lkml/2010/4/9/359
One small uncommented fragment from those improves our chance of
rebooting from never to often (and I believe my test timing tended
to lower its chance of success): get out early if !crtc->enabled.
The rest of his patches (console stuff and mutex avoidance) may well
make sense, but in practice did not appear to help us at all - would
need more work to be worthwhile in our context.
And if we want to reboot immediately, we shall prefer to avoid this
mode switching complexity altogether (a subsequent patch): so merge
the most valuable fragment but forget the rest.
BUG=chromium-os:2269
TEST=manual
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Hugh Dickins <hughd@chromium.org>
[olofj: fixups for 3.0]
Signed-off-by: Olof Johansson <olofj@chromium.org>
Review URL: http://codereview.chromium.org/
2836086
Change-Id: Ic097364d0c717bd56eb14349b08ebd5bf593de7b
vbendeb [Thu, 3 Jun 2010 17:06:55 +0000 (10:06 -0700)]
CHROMIUM: Ignore the top level build/ directory tree.
This tree is generated by gentoo tools and should be ignored by git.
Tested by observing that git does ignore the top level build/ tree,
but does report build/ subtrees within the kernel tree.
Review URL: http://codereview.chromium.org/
2512002
Change-Id: Ic631c4f151f3ecaa1112b0129bf5841e9e1b3ba0
Mandeep Singh Baines [Thu, 1 Apr 2010 00:56:50 +0000 (17:56 -0700)]
CHROMIUM: config: fix splitconfig to work with python2.5
set.intersection only began to support multiple iterables after python2.6
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/
1593004
Olof Johansson [Wed, 20 Oct 2010 00:18:34 +0000 (19:18 -0500)]
CHROMIUM: config: fix splitconfig to skip emacs backups
Review URL: http://codereview.chromium.org/
1540007
Martin Bligh [Thu, 4 Mar 2010 22:32:45 +0000 (14:32 -0800)]
CHROMIUM: Add /proc/breakme support
Signed-off-by: Martin Bligh <mbligh@google.com>
[olofj: fix compilation error for 3.0]
Signed-off-by: Olof Johansson <olofj@chromium.org>
Ken Mixter [Mon, 1 Mar 2010 23:58:59 +0000 (15:58 -0800)]
CHROMIUM: Write the initial TSC at early kernel init
BUG=1344
Signed-off-by: Ken Mixter <kmixter@google.com>
Review URL: http://codereview.chromium.org/581008
Tim Gardner [Wed, 10 Feb 2010 21:31:50 +0000 (14:31 -0700)]
CHROMIUM: Lay the foundation for chromeos third party drivers
All third party drivers should go under the chromeos/drivers
directory.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Review URL: http://codereview.chromium.org/604005
[olof: removed references to rtl8103 driver]
Signed-off-by: Olof Johansson <olof@lixom.net>
Linus Torvalds [Sun, 20 May 2012 22:29:13 +0000 (15:29 -0700)]
Linux 3.4
Linus Torvalds [Sat, 19 May 2012 22:30:15 +0000 (15:30 -0700)]
Merge tag 'parisc-fixes' of git://git./linux/kernel/git/jejb/parisc-2.6
Pull PA-RISC fixes from James Bottomley:
"This is a set of three bug fixes that gets parisc running again on
systems with PA1.1 processors.
Two fix regressions introduced in 2.6.39 and one fixes a prefetch bug
that only affects PA7300LC processors. We also have another pending
fix to do with the sectional arrangement of vmlinux.lds, but there's a
query on it during testing on one particular system type, so I'll hold
off sending it in for now."
* tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
[PARISC] fix panic on prefetch(NULL) on PA7300LC
[PARISC] fix crash in flush_icache_page_asm on PA1.1
[PARISC] fix PA1.1 oops on boot
Linus Torvalds [Sat, 19 May 2012 22:28:22 +0000 (15:28 -0700)]
Merge branch 'x86/ld-fix' of git://git./linux/kernel/git/tip/tip
Pull x86 linker bug workarounds from Peter Anvin.
GNU ld-2.22.52.0.[12] (*) has an unfortunate bug where it incorrectly
turns certain relocation entries absolute. Section-relative symbols
that are part of otherwise empty sections are silently changed them to
absolute. We rely on section-relative symbols staying section-relative,
and actually have several sections in the linker script solely for this
purpose.
See for example
http://sourceware.org/bugzilla/show_bug.cgi?id=14052
We could just black-list the buggy linker, but it appears that it got
shipped in at least F17, and possibly other distros too, so it's sadly
not some rare unusual case.
This backports the workaround from the x86/trampoline branch, and as
Peter says: "This is not a minimal fix, not at all, but it is a tested
code base."
* 'x86/ld-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, relocs: When printing an error, say relative or absolute
x86, relocs: Workaround for binutils 2.22.52.0.1 section bug
x86, realmode: 16-bit real-mode code support for relocs tool
(*) That's a manly release numbering system. Stupid, sure. But manly.
Linus Torvalds [Sat, 19 May 2012 17:12:17 +0000 (10:12 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
"A few small, but important fixes. Most of them are marked for stable
as well
- Fix failure to release a semaphore on error path in mtip32xx.
- Fix crashable condition in bio_get_nr_vecs().
- Don't mark end-of-disk buffers as mapped, limit it to i_size.
- Fix for build problem with CONFIG_BLOCK=n on arm at least.
- Fix for a buffer overlow on UUID partition printing.
- Trivial removal of unused variables in dac960."
* 'for-linus' of git://git.kernel.dk/linux-block:
block: fix buffer overflow when printing partition UUIDs
Fix blkdev.h build errors when BLOCK=n
bio allocation failure due to bio_get_nr_vecs()
block: don't mark buffers beyond end of disk as mapped
mtip32xx: release the semaphore on an error path
dac960: Remove unused variables from DAC960_CreateProcEntries()
Linus Torvalds [Sat, 19 May 2012 17:10:59 +0000 (10:10 -0700)]
Merge git://git./linux/kernel/git/davem/net
Pull one more networking bug-fix from David Miller:
"One last straggler.
Eric Dumazet's pktgen unload oops fix was not entirely complete, but
all the cases should be handled properly now.... fingers crossed."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
pktgen: fix module unload for good
Hugh Dickins [Fri, 18 May 2012 18:28:34 +0000 (11:28 -0700)]
memcg,thp: fix res_counter:96 regression
Occasionally, testing memcg's move_charge_at_immigrate on rc7 shows
a flurry of hundreds of warnings at kernel/res_counter.c:96, where
res_counter_uncharge_locked() does WARN_ON(counter->usage < val).
The first trace of each flurry implicates __mem_cgroup_cancel_charge()
of mc.precharge, and an audit of mc.precharge handling points to
mem_cgroup_move_charge_pte_range()'s THP handling in commit
12724850e806
("memcg: avoid THP split in task migration").
Checking !mc.precharge is good everywhere else, when a single page is to
be charged; but here the "mc.precharge -= HPAGE_PMD_NR" likely to
follow, is liable to result in underflow (a lot can change since the
precharge was estimated).
Simply check against HPAGE_PMD_NR: there's probably a better
alternative, trying precharge for more, splitting if unsuccessful; but
this one-liner is safer for now - no kernel/res_counter.c:96 warnings
seen in 26 hours.
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
H. Peter Anvin [Fri, 18 May 2012 16:52:01 +0000 (09:52 -0700)]
x86, relocs: When printing an error, say relative or absolute
When the relocs tool throws an error, let the error message say if it
is an absolute or relative symbol. This should make it a lot more
clear what action the programmer needs to take and should help us find
the reason if additional symbol bugs show up.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@vger.kernel.org>
H. Peter Anvin [Fri, 18 May 2012 07:24:09 +0000 (00:24 -0700)]
x86, relocs: Workaround for binutils 2.22.52.0.1 section bug
GNU ld 2.22.52.0.1 has a bug that it blindly changes symbols from
section-relative to absolute if they are in a section of zero length.
This turns the symbols __init_begin and __init_end into absolute
symbols. Let the relocs program know that those should be treated as
relative symbols.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: <stable@vger.kernel.org>
Cc: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
H. Peter Anvin [Tue, 8 May 2012 18:22:24 +0000 (21:22 +0300)]
x86, realmode: 16-bit real-mode code support for relocs tool
A new option is added to the relocs tool called '--realmode'.
This option causes the generation of 16-bit segment relocations
and 32-bit linear relocations for the real-mode code. When
the real-mode code is moved to the low-memory during kernel
initialization, these relocation entries can be used to
relocate the code properly.
In the assembly code 16-bit segment relocations must be relative
to the 'real_mode_seg' absolute symbol. Linear relocations must be
relative to a symbol prefixed with 'pa_'.
16-bit segment relocation is used to load cs:ip in 16-bit code.
Linear relocations are used in the 32-bit code for relocatable
data references. They are declared in the linker script of the
real-mode code.
The relocs tool is moved to arch/x86/tools/relocs.c, and added new
target archscripts that can be used to build scripts needed building
an architecture. be compiled before building the arch/x86 tree.
[ hpa: accelerating this because it detects invalid absolute
relocations, a serious bug in binutils 2.22.52.0.x which currently
produces bad kernels. ]
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1336501366-28617-2-git-send-email-jarkko.sakkinen@intel.com
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@vger.kernel.org>
Linus Torvalds [Sat, 19 May 2012 01:22:45 +0000 (18:22 -0700)]
Merge tag 'dm-3.4-fixes-2' of git://git./linux/kernel/git/agk/linux-dm
Pull a dm fix from Alasdair G Kergon:
"A fix to the thin provisioning userspace interface."
* tag 'dm-3.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
dm thin: fix table output when pool target disables discard passdown internally
Mike Snitzer [Sat, 19 May 2012 00:01:01 +0000 (01:01 +0100)]
dm thin: fix table output when pool target disables discard passdown internally
When the thin pool target clears the discard_passdown parameter
internally, it incorrectly changes the table line reported to userspace.
This breaks dumb string comparisons on these table lines in generic
userspace device-mapper library code and leads to tables being reloaded
repeatedly when nothing is actually meant to be changing.
This patch corrects this by no longer changing the table line when
discard passdown was disabled.
We can still tell when discard passdown is overridden by looking for the
message "Discard unsupported by data device (sdX): Disabling discard passdown."
This automatic detection is also moved from the 'load' to the 'resume'
so that it is re-evaluated should the properties of underlying devices
change.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Linus Torvalds [Fri, 18 May 2012 23:19:59 +0000 (16:19 -0700)]
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md
Pull one more md bugfix from NeilBrown:
"Fix bug in recent fix to RAID10.
Without this patch, recovery will crash"
* tag 'md-3.4-fixes' of git://neil.brown.name/md:
md/raid10: fix transcription error in calc_sectors conversion.
Linus Torvalds [Fri, 18 May 2012 23:16:42 +0000 (16:16 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile
Pull tile tree bugfix from Chris Metcalf:
"This fixes a security vulnerability (and correctness bug) in tilegx"
* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
tilegx: enable SYSCALL_WRAPPERS support
NeilBrown [Fri, 18 May 2012 23:01:13 +0000 (09:01 +1000)]
md/raid10: fix transcription error in calc_sectors conversion.
The old code was
sector_div(stride, fc);
the new code was
sector_dir(size, conf->near_copies);
'size' is right (the stride various wasn't really needed), but
'fc' means 'far_copies', and that is an important difference.
Signed-off-by: NeilBrown <neilb@suse.de>
Linus Torvalds [Fri, 18 May 2012 22:56:25 +0000 (15:56 -0700)]
Merge branch 'akpm' (Andrew's patch-bomb)
Merge misc fixes from Andrew Morton.
* emailed from Andrew Morton <akpm@linux-foundation.org>: (4 patches)
frv: delete incorrect task prototypes causing compile fail
slub: missing test for partial pages flush work in flush_all()
fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entries
drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01
Linus Torvalds [Fri, 18 May 2012 18:32:15 +0000 (11:32 -0700)]
proc: move fd symlink i_mode calculations into tid_fd_revalidate()
Instead of doing the i_mode calculations at proc_fd_instantiate() time,
move them into tid_fd_revalidate(), which is where the other inode state
(notably uid/gid information) is updated too.
Otherwise we'll end up with stale i_mode information if an fd is re-used
while the dentry still hangs around. Not that anything really *cares*
(symlink permissions don't really matter), but Tetsuo Handa noticed that
the owner read/write bits don't always match the state of the
readability of the file descriptor, and we _used_ to get this right a
long time ago in a galaxy far, far away.
Besides, aside from fixing an ugly detail (that has apparently been this
way since commit
61a28784028e: "proc: Remove the hard coded inode
numbers" in 2006), this removes more lines of code than it adds. And it
just makes sense to update i_mode in the same place we update i_uid/gid.
Al Viro correctly points out that we could just do the inode fill in the
inode iops ->getattr() function instead. However, that does require
somewhat slightly more invasive changes, and adds yet *another* lookup
of the file descriptor. We need to do the revalidate() for other
reasons anyway, and have the file descriptor handy, so we might as well
fill in the information at this point.
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Dumazet [Thu, 17 May 2012 23:52:26 +0000 (23:52 +0000)]
pktgen: fix module unload for good
commit
c57b5468406 (pktgen: fix crash at module unload) did a very poor
job with list primitives.
1) list_splice() arguments were in the wrong order
2) list_splice(list, head) has undefined behavior if head is not
initialized.
3) We should use the list_splice_init() variant to clear pktgen_threads
list.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Chris Metcalf [Fri, 18 May 2012 17:33:24 +0000 (13:33 -0400)]
tilegx: enable SYSCALL_WRAPPERS support
Some discussion with the glibc mailing lists revealed that this was
necessary for 64-bit platforms with MIPS-like sign-extension rules
for 32-bit values. The original symptom was that passing (uid_t)-1 to
setreuid() was failing in programs linked -pthread because of the "setxid"
mechanism for passing setxid-type function arguments to the syscall code.
SYSCALL_WRAPPERS handles ensuring that all syscall arguments end up with
proper sign-extension and is thus the appropriate fix for this problem.
On other platforms (s390, powerpc, sparc64, and mips) this was fixed
in 2.6.28.6. The general issue is tracked as CVE-2009-0029.
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Linus Torvalds [Fri, 18 May 2012 16:42:20 +0000 (09:42 -0700)]
Merge tag 'linus-mce-fix' of git://git./linux/kernel/git/ras/ras
Pull a machine check recovery fix from Tony Luck.
I really don't like how the MCE code does some of the things it does,
but this does seem to be an improvement.
* tag 'linus-mce-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
x86/mce: Only restart instruction after machine check recovery if it is safe
Paul Gortmaker [Fri, 18 May 2012 00:03:26 +0000 (17:03 -0700)]
frv: delete incorrect task prototypes causing compile fail
Commit
41101809a865 ("fork: Provide weak arch_release_[task_struct|
thread_info] functions") in -tip highlights a problem in the frv arch,
where it has needles prototypes for alloc_task_struct_node and
free_task_struct. This now shows up as:
kernel/fork.c:120:66: error: static declaration of 'alloc_task_struct_node' follows non-static declaration
kernel/fork.c:127:51: error: static declaration of 'free_task_struct' follows non-static declaration
since that commit turned them into real functions. Since arch/frv does
does not define define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR (i.e. it just
uses the generic ones) it shouldn't list these at all.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
majianpeng [Fri, 18 May 2012 00:03:26 +0000 (17:03 -0700)]
slub: missing test for partial pages flush work in flush_all()
I found some kernel messages such as:
SLUB raid5-md127: kmem_cache_destroy called for cache that still has objects.
Pid: 6143, comm: mdadm Tainted: G O 3.4.0-rc6+ #75
Call Trace:
kmem_cache_destroy+0x328/0x400
free_conf+0x2d/0xf0 [raid456]
stop+0x41/0x60 [raid456]
md_stop+0x1a/0x60 [md_mod]
do_md_stop+0x74/0x470 [md_mod]
md_ioctl+0xff/0x11f0 [md_mod]
blkdev_ioctl+0xd8/0x7a0
block_ioctl+0x3b/0x40
do_vfs_ioctl+0x96/0x560
sys_ioctl+0x91/0xa0
system_call_fastpath+0x16/0x1b
Then using kmemleak I found these messages:
unreferenced object 0xffff8800b6db7380 (size 112):
comm "mdadm", pid 5783, jiffies
4294810749 (age 90.589s)
hex dump (first 32 bytes):
01 01 db b6 ad 4e ad de ff ff ff ff ff ff ff ff .....N..........
ff ff ff ff ff ff ff ff 98 40 4a 82 ff ff ff ff .........@J.....
backtrace:
kmemleak_alloc+0x21/0x50
kmem_cache_alloc+0xeb/0x1b0
kmem_cache_open+0x2f1/0x430
kmem_cache_create+0x158/0x320
setup_conf+0x649/0x770 [raid456]
run+0x68b/0x840 [raid456]
md_run+0x529/0x940 [md_mod]
do_md_run+0x18/0xc0 [md_mod]
md_ioctl+0xba8/0x11f0 [md_mod]
blkdev_ioctl+0xd8/0x7a0
block_ioctl+0x3b/0x40
do_vfs_ioctl+0x96/0x560
sys_ioctl+0x91/0xa0
system_call_fastpath+0x16/0x1b
This bug was introduced by commit
a8364d5555b ("slub: only IPI CPUs that
have per cpu obj to flush"), which did not include checks for per cpu
partial pages being present on a cpu.
Signed-off-by: majianpeng <majianpeng@gmail.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Tested-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cyrill Gorcunov [Fri, 18 May 2012 00:03:25 +0000 (17:03 -0700)]
fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entries
map_files/ entries are never supposed to be executed, still curious
minds might try to run them, which leads to the following deadlock
======================================================
[ INFO: possible circular locking dependency detected ]
3.4.0-rc4-24406-g841e6a6 #121 Not tainted
-------------------------------------------------------
bash/1556 is trying to acquire lock:
(&sb->s_type->i_mutex_key#8){+.+.+.}, at: do_lookup+0x267/0x2b1
but task is already holding lock:
(&sig->cred_guard_mutex){+.+.+.}, at: prepare_bprm_creds+0x2d/0x69
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&sig->cred_guard_mutex){+.+.+.}:
validate_chain+0x444/0x4f4
__lock_acquire+0x387/0x3f8
lock_acquire+0x12b/0x158
__mutex_lock_common+0x56/0x3a9
mutex_lock_killable_nested+0x40/0x45
lock_trace+0x24/0x59
proc_map_files_lookup+0x5a/0x165
__lookup_hash+0x52/0x73
do_lookup+0x276/0x2b1
walk_component+0x3d/0x114
do_last+0xfc/0x540
path_openat+0xd3/0x306
do_filp_open+0x3d/0x89
do_sys_open+0x74/0x106
sys_open+0x21/0x23
tracesys+0xdd/0xe2
-> #0 (&sb->s_type->i_mutex_key#8){+.+.+.}:
check_prev_add+0x6a/0x1ef
validate_chain+0x444/0x4f4
__lock_acquire+0x387/0x3f8
lock_acquire+0x12b/0x158
__mutex_lock_common+0x56/0x3a9
mutex_lock_nested+0x40/0x45
do_lookup+0x267/0x2b1
walk_component+0x3d/0x114
link_path_walk+0x1f9/0x48f
path_openat+0xb6/0x306
do_filp_open+0x3d/0x89
open_exec+0x25/0xa0
do_execve_common+0xea/0x2f9
do_execve+0x43/0x45
sys_execve+0x43/0x5a
stub_execve+0x6c/0xc0
This is because prepare_bprm_creds grabs task->signal->cred_guard_mutex
and when do_lookup happens we try to grab task->signal->cred_guard_mutex
again in lock_trace.
Fix it using plain ptrace_may_access() helper in proc_map_files_lookup()
and in proc_map_files_readdir() instead of lock_trace(), the caller must
be CAP_SYS_ADMIN granted anyway.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Dave Jones <davej@redhat.com>
Cc: Vasiliy Kulikov <segoon@openwall.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rajkumar Kasirajan [Fri, 18 May 2012 00:03:24 +0000 (17:03 -0700)]
drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01
The reset date of the ST Micro version of PL031 is 2000-01-01. The
correct weekday for 2000-01-01 is saturday, but pl031 is initialized to
sunday. This may lead to alarm malfunction, so configure the correct
wday if RTC_DR indicates reset.
Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Mattias Wallin <mattias.wallin@stericsson.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 17 May 2012 23:52:29 +0000 (16:52 -0700)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
"Small set of fixes again."
* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
ARM: 7419/1: vfp: fix VFP flushing regression on sigreturn path
ARM: 7418/1: LPAE: fix access flag setup in mem_type_table
ARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS
ARM: 7417/1: vfp: ensure preemption is disabled when enabling VFP access
Linus Torvalds [Thu, 17 May 2012 23:30:26 +0000 (16:30 -0700)]
Merge git://git./linux/kernel/git/davem/net
Pull two networking fixes from David S. Miller:
1) Thanks to Willy Tarreau and Eric Dumazet, we've unlocked a bug that's
been present in do_tcp_sendpages() since that function was written in
2002.
When we block to wait for memory we have to unconditionally try and
push out pending TCP data, otherwise we can block for an unreasonably
long amount of time.
2) Fix deadlock in e1000, fixes kernel bugzilla 43132
From Tushar Dave.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
e1000: Prevent reset task killing itself.
tcp: do_tcp_sendpages() must try to push data out on oom conditions
Rafael J. Wysocki [Thu, 17 May 2012 22:39:35 +0000 (00:39 +0200)]
ACPI / PCI / PM: Fix device PM regression related to D3hot/D3cold
Commit
1cc0c998fdf2 ("ACPI: Fix D3hot v D3cold confusion") introduced a
bug in __acpi_bus_set_power() and changed the behavior of
acpi_pci_set_power_state() in such a way that it generally doesn't work
as expected if PCI_D3hot is passed to it as the second argument.
First off, if ACPI_STATE_D3 (equal to ACPI_STATE_D3_COLD) is passed to
__acpi_bus_set_power() and the explicit_set flag is set for the D3cold
state, the function will try to execute AML method called "_PS4", which
doesn't exist.
Fix this by adding a check to ensure that the name of the AML method
to execute for transitions to ACPI_STATE_D3_COLD is correct in
__acpi_bus_set_power(). Also make sure that the explicit_set flag
for ACPI_STATE_D3_COLD will be set if _PS3 is present and modify
acpi_power_transition() to avoid accessing power resources for
ACPI_STATE_D3_COLD, because they don't exist.
Second, if PCI_D3hot is passed to acpi_pci_set_power_state() as the
target state, the function will request a transition to
ACPI_STATE_D3_HOT instead of ACPI_STATE_D3. However,
ACPI_STATE_D3_HOT is now only marked as supported if the _PR3 AML
method is defined for the given device, which is rare. This causes
problems to happen on systems where devices were successfully put
into ACPI D3 by pci_set_power_state(PCI_D3hot) which doesn't work
now. In particular, some unused graphics adapters are not turned
off as a result.
To fix this issue restore the old behavior of
acpi_pci_set_power_state(), which is to request a transition to
ACPI_STATE_D3 (equal to ACPI_STATE_D3_COLD) if either PCI_D3hot or
PCI_D3cold is passed to it as the argument.
This approach is not ideal, because generally power should not
be removed from devices if PCI_D3hot is the target power state,
but since this behavior is relied on, we have no choice but to
restore it at the moment and spend more time on designing a
better solution in the future.
References: https://bugzilla.kernel.org/show_bug.cgi?id=43228
Reported-by: rocko <rockorequin@hotmail.com>
Reported-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Reported-and-tested-by: Peter <lekensteyn@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tushar Dave [Thu, 17 May 2012 01:04:50 +0000 (01:04 +0000)]
e1000: Prevent reset task killing itself.
Killing reset task while adapter is resetting causes deadlock.
Only kill reset task if adapter is not resetting.
Ref bug #43132 on bugzilla.kernel.org
CC: stable@vger.kernel.org
Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Willy Tarreau [Thu, 17 May 2012 11:14:14 +0000 (11:14 +0000)]
tcp: do_tcp_sendpages() must try to push data out on oom conditions
Since recent changes on TCP splicing (starting with commits
2f533844
"tcp: allow splice() to build full TSO packets" and
35f9c09f "tcp:
tcp_sendpages() should call tcp_push() once"), I started seeing
massive stalls when forwarding traffic between two sockets using
splice() when pipe buffers were larger than socket buffers.
Latest changes (net: netdev_alloc_skb() use build_skb()) made the
problem even more apparent.
The reason seems to be that if do_tcp_sendpages() fails on out of memory
condition without being able to send at least one byte, tcp_push() is not
called and the buffers cannot be flushed.
After applying the attached patch, I cannot reproduce the stalls at all
and the data rate it perfectly stable and steady under any condition
which previously caused the problem to be permanent.
The issue seems to have been there since before the kernel migrated to
git, which makes me think that the stalls I occasionally experienced
with tux during stress-tests years ago were probably related to the
same issue.
This issue was first encountered on 3.0.31 and 3.2.17, so please backport
to -stable.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Acked-by: Eric Dumazet <edumazet@google.com>
Cc: <stable@vger.kernel.org>
Linus Torvalds [Thu, 17 May 2012 20:25:17 +0000 (13:25 -0700)]
Merge branch '3.4-urgent' of git://git./linux/kernel/git/nab/target-pending
Pull two more target-core updates from Nicholas Bellinger:
"The first patch addresses a SPC-2 reservations RELEASE bug in a
special (iscsi specific) multi-ISID setup case that was allowing the
same initiator to be able to incorrect release it's own reservation on
a different SCSI path with enforce_pr_isid=1 operation. This bug was
caught by Bernhard Kohl.
The second patch is to address a bug with FILEIO backends where the
incorrect number of blocks for READ_CAPACITY was being reported after
an underlying device-mapper block_device size change. This patch uses
now i_size_read() in fd_get_blocks() for FILEIO backends with an
underlying block_device, instead of trying to determine this value at
setup time during fd_create_virtdevice(). (hch CC'ed)
Both are CC'ed to stable."
* '3.4-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: Fix bug in handling of FILEIO + block_device resize ops
target: Fix SPC-2 RELEASE bug for multi-session iSCSI client setups
Nicholas Bellinger [Wed, 16 May 2012 23:05:26 +0000 (16:05 -0700)]
target: Fix bug in handling of FILEIO + block_device resize ops
This patch fixes a bug in the handling of FILEIO w/ underlying block_device
resize operations where the original fd_dev->fd_dev_size was incorrectly being
used in fd_get_blocks() for READ_CAPACITY response payloads.
This patch avoids using fd_dev->fd_dev_size for FILEIO devices with
an underlying block_device, and instead changes fd_get_blocks() to
get the sector count directly from i_size_read() as recommended by hch.
Reported-by: Christoph Hellwig <hch@lst.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Linus Torvalds [Thu, 17 May 2012 16:57:13 +0000 (09:57 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine fixes fromVinod Koul:
"fixes of cylic dma usages in slave dma drivers"
* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: fix cyclic dma usage
dmaengine: pl330: dont complete descriptor for cyclic dma
Linus Torvalds [Thu, 17 May 2012 16:55:58 +0000 (09:55 -0700)]
Merge tag 'for_linus' of git://git./linux/kernel/git/mst/vhost
Pull last minute virtio fixes from Michael S. Tsirkin:
"Here are a couple of last minute virtio fixes for 3.4. Hope it's not
too late yes - I might have tried too hard to make sure the fix is
well tested.
Fixes are by Amit and myself. One fixes module removal and one
suspend of a VM, the last one the handling of out of memory condition.
They are thus very low risk as most people never hit these paths, but
do fix very annoying problems for people that do use the feature.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio_net: invoke softirqs after __napi_schedule
virtio: balloon: let host know of updated balloon size before module removal
virtio: console: tell host of open ports after resume from s3/s4
Linus Torvalds [Thu, 17 May 2012 16:46:07 +0000 (09:46 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc
Pull ARM: SoC fixes from Olof Johansson:
"I will stop trying to predict when we're done with fixes for a
release.
Here's another small batch of three patches for arm-soc:
- A fix for a boot time WARN_ON() due to irq domain conversion on
PRIMA2
- Fix for a regression in Tegra SMP spinup code due to swapped
register offsets
- Fixed config dependency for mv_cesa crypto driver to avoid build
breakage"
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: PRIMA2: fix irq domain size and IRQ mask of internal interrupt controller
crypto: mv_cesa requires on CRYPTO_HASH to build
ARM: tegra: Fix flow controller accesses
Linus Torvalds [Thu, 17 May 2012 16:44:35 +0000 (09:44 -0700)]
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md
Pull two md fixes from NeilBrown:
"One fixes a bug in the new raid10 resize code so is relevant to 3.4
only.
The other fixes a bug in the use of md by dm-raid, so is relevant to
any kernel with dm-raid support"
* tag 'md-3.4-fixes' of git://neil.brown.name/md:
MD: Add del_timer_sync to mddev_suspend (fix nasty panic)
md/raid10: set dev_sectors properly when resizing devices in array.
Linus Torvalds [Thu, 17 May 2012 16:35:17 +0000 (09:35 -0700)]
Merge branches 'perf-urgent-for-linus', 'x86-urgent-for-linus' and 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull perf, x86 and scheduler updates from Ingo Molnar.
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tracing: Do not enable function event with enable
perf stat: handle ENXIO error for perf_event_open
perf: Turn off compiler warnings for flex and bison generated files
perf stat: Fix case where guest/host monitoring is not supported by kernel
perf build-id: Fix filename size calculation
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, kvm: KVM paravirt kernels don't check for CPUID being unavailable
x86: Fix section annotation of acpi_map_cpu2node()
x86/microcode: Ensure that module is only loaded on supported Intel CPUs
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched: Fix KVM and ia64 boot crash due to sched_groups circular linked list assumption
Will Deacon [Tue, 15 May 2012 14:51:54 +0000 (15:51 +0100)]
ARM: 7419/1: vfp: fix VFP flushing regression on sigreturn path
Commit
ff9a184c ("ARM: 7400/1: vfp: clear fpscr length and stride bits
on entry to sig handler") flushes the VFP state prior to entering a
signal handler so that a VFP operation inside the handler will trap and
force a restore of ABI-compliant registers. Reflushing and disabling VFP
on the sigreturn path is predicated on the saved thread state indicating
that VFP was used by the handler -- however for SMP platforms this is
only set on context-switch, making the check unreliable and causing VFP
register corruption in userspace since the register values are not
necessarily those restored from the sigframe.
This patch unconditionally flushes the VFP state after a signal handler.
Since we already perform the flush before the handler and the flushing
itself happens lazily, the redundant flush when VFP is not used by the
handler is essentially a nop.
Reported-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Vitaly Andrianov [Tue, 15 May 2012 14:01:16 +0000 (15:01 +0100)]
ARM: 7418/1: LPAE: fix access flag setup in mem_type_table
A zero value for prot_sect in the memory types table implies that
section mappings should never be created for the memory type in question.
This is checked for in alloc_init_section().
With LPAE, we set a bit to mask access flag faults for kernel mappings.
This breaks the aforementioned (!prot_sect) check in alloc_init_section().
This patch fixes this bug by first checking for a non-zero
prot_sect before setting the PMD_SECT_AF flag.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Michael S. Tsirkin [Wed, 16 May 2012 07:57:12 +0000 (10:57 +0300)]
virtio_net: invoke softirqs after __napi_schedule
__napi_schedule might raise softirq but nothing
causes do_softirq to trigger, so it does not in fact
run. As a result,
the error message "NOHZ: local_softirq_pending 08"
sometimes occurs during boot of a KVM guest when the network service is
started and we are oom:
...
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0...NOHZ: local_softirq_pending 08
done.
[ OK ]
...
Further, receive queue processing might get delayed
indefinitely until some interrupt triggers:
virtio_net expected napi to be run immediately.
One way to cause do_softirq to be executed is by
invoking local_bh_enable(). As __napi_schedule is
normally called from bh or irq context, this
seems to make sense: disable bh before __napi_schedule
and enable afterwards.
In fact it's a very complicated way of calling do_softirq(),
and works since this function is only used when we are not
in interrupt context. It's not hot at all, in any ideal scenario.
Reported-by: Ulrich Obergfell <uobergfe@redhat.com>
Tested-by: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Amit Shah [Thu, 26 Apr 2012 19:15:56 +0000 (00:45 +0530)]
virtio: balloon: let host know of updated balloon size before module removal
When the balloon module is removed, we deflate the balloon, reclaiming
all the pages that were given to the host. However, we don't update the
config values for the new balloon size, resulting in the host showing
outdated balloon values.
The size update is done after each leak and fill operation, only the
module removal case was left out.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Amit Shah [Wed, 25 Apr 2012 09:10:39 +0000 (14:40 +0530)]
virtio: console: tell host of open ports after resume from s3/s4
If a port was open before going into one of the sleep states, the port
can continue normal operation after restore. However, the host has to
be told that the guest side of the connection is open to restore
pre-suspend state.
This wasn't noticed so far due to a bug in qemu that was fixed recently
(which marked the guest-side connection as always open).
CC: stable@vger.kernel.org # Only for 3.3
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Barry Song [Thu, 17 May 2012 03:28:55 +0000 (11:28 +0800)]
ARM: PRIMA2: fix irq domain size and IRQ mask of internal interrupt controller
the old codes will cause 3.4 kernel warning as irq domain size is wrong:
------------[ cut here ]------------
WARNING: at kernel/irq/irqdomain.c:74 irq_domain_legacy_revmap+0x24/0x48()
Modules linked in:
[<
c0013f50>] (unwind_backtrace+0x0/0xf8) from [<
c001e7d8>] (warn_slowpath_common+0x54/0x64)
[<
c001e7d8>] (warn_slowpath_common+0x54/0x64) from [<
c001e804>] (warn_slowpath_null+0x1c/0x24)
[<
c001e804>] (warn_slowpath_null+0x1c/0x24) from [<
c005c3c4>] (irq_domain_legacy_revmap+0x24/0x48)
[<
c005c3c4>] (irq_domain_legacy_revmap+0x24/0x48) from [<
c005c704>] (irq_create_mapping+0x20/0x120)
[<
c005c704>] (irq_create_mapping+0x20/0x120) from [<
c005c880>] (irq_create_of_mapping+0x7c/0xf0)
[<
c005c880>] (irq_create_of_mapping+0x7c/0xf0) from [<
c01a6c48>] (irq_of_parse_and_map+0x2c/0x34)
[<
c01a6c48>] (irq_of_parse_and_map+0x2c/0x34) from [<
c01a6c68>] (of_irq_to_resource+0x18/0x74)
[<
c01a6c68>] (of_irq_to_resource+0x18/0x74) from [<
c01a6ce8>] (of_irq_count+0x24/0x34)
[<
c01a6ce8>] (of_irq_count+0x24/0x34) from [<
c01a7220>] (of_device_alloc+0x58/0x158)
[<
c01a7220>] (of_device_alloc+0x58/0x158) from [<
c01a735c>] (of_platform_device_create_pdata+0x3c/0x80)
[<
c01a735c>] (of_platform_device_create_pdata+0x3c/0x80) from [<
c01a7468>] (of_platform_bus_create+0xc8/0x190)
[<
c01a7468>] (of_platform_bus_create+0xc8/0x190) from [<
c01a74cc>] (of_platform_bus_create+0x12c/0x190)
---[ end trace
1b75b31a2719ed32 ]---
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Jonathan Brassow [Wed, 16 May 2012 09:06:14 +0000 (04:06 -0500)]
MD: Add del_timer_sync to mddev_suspend (fix nasty panic)
Use del_timer_sync to remove timer before mddev_suspend finishes.
We don't want a timer going off after an mddev_suspend is called. This is
especially true with device-mapper, since it can call the destructor function
immediately following a suspend. This results in the removal (kfree) of the
structures upon which the timer depends - resulting in a very ugly panic.
Therefore, we add a del_timer_sync to mddev_suspend to prevent this.
Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Thu, 17 May 2012 00:08:45 +0000 (10:08 +1000)]
md/raid10: set dev_sectors properly when resizing devices in array.
raid10 stores dev_sectors in 'conf' separately from the one in
'mddev' because it can have a very significant effect on block
addressing and so need to be updated carefully.
However raid10_resize isn't updating it at all!
To update it correctly, we need to make sure it is a proper
multiple of the chunksize taking various details of the layout
in to account.
This calculation is currently done in setup_conf. So split it
out from there and call it from raid10_resize as well.
Then set conf->dev_sectors properly.
Signed-off-by: NeilBrown <neilb@suse.de>
Linus Torvalds [Wed, 16 May 2012 21:30:51 +0000 (14:30 -0700)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm powerpc fixes from Marcelo Tosatti:
"Urgent KVM PPC updates, quoting Alexander Graf:
There are a few bugs in 3.4 that really should be fixed before
people can be all happy and fuzzy about KVM on PowerPC. These fixes
are:
* fix POWER7 bare metal with PR=y
* fix deadlock on HV=y book3s_64 mode in low memory cases
* fix invalid MMU scope of PR=y mode on book3s_64, possibly eading
to memory corruption"
* git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates
powerpc/kvm: Fix VSID usage in 64-bit "PR" KVM
KVM: PPC: Book3S: PR: Fix hsrr code
KVM: PPC: Fix PR KVM on POWER7 bare metal
KVM: PPC: Book3S: PR: Handle EMUL_ASSIST
Linus Torvalds [Wed, 16 May 2012 21:29:45 +0000 (14:29 -0700)]
Merge tag 'sound-3.4' of git://git./linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A few last-minute regression fixes for 3.4 final kernel. All trivial,
and Cc'ed to stable kernel."
* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: wm8994: Fix AIF2ADC power down
ALSA: hda/idt - Fix power-map for speaker-pins with some HP laptops
ASoC: cs42l73: Sync digital mixer kcontrols to allow for 0dB
Linus Torvalds [Wed, 16 May 2012 21:26:05 +0000 (14:26 -0700)]
Merge tag 'rproc-for-linus' of git://git./linux/kernel/git/ohad/remoteproc
Pull remoteproc fix from Ohad Ben-Cohen:
"Fix a nasty off-by-one remoteproc bug which leaks memory when a remote
processor is shut down and, on certain circumstances, can indirectly
prevent it from being reloaded."
* tag 'rproc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
remoteproc: fix off-by-one bug in __rproc_free_vrings
Linus Torvalds [Wed, 16 May 2012 21:22:38 +0000 (14:22 -0700)]
Merge git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fix from Jeff Layton
* git://git.samba.org/sfrench/cifs-2.6:
cifs: fix misspelling of "forcedirectio"