Linus Torvalds [Mon, 30 Jul 2012 20:16:37 +0000 (13:16 -0700)]
Merge tag 'ktest-v3.6' of git://git./linux/kernel/git/rostedt/linux-ktest
Pull ktest changes from Steven Rostedt:
"Set of updates for v3.6 (some fixes too)
Seems that you opened the merge window the day I left for the beach.
I just got back (yes us Americans only take a week vacation), and just
got the last of my ktest quilt queue into git."
* tag 'ktest-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
ktest: Allow perl regex expressions in conditional statements
ktest: Ignore errors it tests if IGNORE_ERRORS is set
ktest: Reset saved min (force) configs for each test
ktest: Add check for bug or panic during reboot
ktest: Add MAX_MONITOR_WAIT option
ktest: Fix config bisect with how make oldnoconfig works
ktest: Add CONFIG_BISECT_CHECK option
ktest: Add PRE_INSTALL option
ktest: Add PRE/POST_KTEST and TEST options
ktest: Remove commented exit
Linus Torvalds [Mon, 30 Jul 2012 19:41:17 +0000 (12:41 -0700)]
Merge tag 'mfd-3.6-1' of git://git./linux/kernel/git/sameo/mfd-2.6
Pull MFD bits from Samuel Ortiz:
"We have support for a few new drivers:
- Samsung s2mps11
- Wolfson Microelectronics wm5102 and wm5110
- Marvell 88PM800 and 88PM805
- TI twl6041
We also have our regular driver improvements:
- Device tree and IRQ domain support for STE AB8500
- Regmap and devm_* API conversion for TI tps6586x
- Device tree support for Samsung max77686
- devm_* API conversion for STE AB3100
Besides that, quite a lot of fixing and cleanup for mc13xxx, tps65910,
tps65090, da9052 and twl-core."
Fix up mostly trivial conflicts, with the exception of
drivers/usb/host/ehci-omap.c in particular, which had some
re-organization of the reset sequence (commit
1a49e2ac9651: "EHCI:
centralize controller initialization") that clashed with commit
2761a6394516 ("mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix
issues").
In particular, commit
2761a6394516 moved the usb_add_hcd() to the
*middle* of the reset sequence, which clashes fairly badly with the
reset sequence re-organization (although it could have been done inside
the new omap_ehci_init() function).
I left that part of commit
2761a6394516 just undone.
* tag 'mfd-3.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (110 commits)
mfd: Ensure AB8500 platform data is passed through db8500-prcmu to MFD Core
mfd: Arizone core should select MFD_CORE
mfd: Fix arizona-irq.c build by selecting REGMAP_IRQ
mfd: Add debug trace on entering and leaving arizone runtime suspend
mfd: Correct tps65090 cell names
mfd: Remove gpio support from tps6586x core driver
ARM: tegra: defconfig: Enable tps6586x gpio
gpio: tps6586x: Add gpio support through platform driver
mfd: Cache tps6586x register through regmap
mfd: Use regmap for tps6586x register access.
mfd: Use devm managed resources for tps6586x
input: Add onkey support for 88PM80X PMIC
mfd: Add support for twl6041
mfd: Fix twl6040 revision information
mfd: Matches should be NULL when populate anatop child devices
input: ab8500-ponkey: Create AB8500 domain IRQ mapping
mfd: Add missing out of memory check for pcf50633
Documentation: Describe the AB8500 Device Tree bindings
mfd: Add tps65910 32-kHz-crystal-input init
mfd: Drop modifying mc13xxx driver's id_table in probe
...
Linus Torvalds [Mon, 30 Jul 2012 18:54:53 +0000 (11:54 -0700)]
Merge branch 'linux-next' of git://cavan.codon.org.uk/platform-drivers-x86
Pull x86 platform driver updates from Matthew Garrett:
"Nothing overly dramatic here - improved support for the Classmate,
some random small fixes and a rework of backlight management to deal
with some of the more awkward cases."
* 'linux-next' of git://cavan.codon.org.uk/platform-drivers-x86:
thinkpad_acpi: Free hotkey_keycode_map after unregistering tpacpi_inputdev
thinkpad_acpi: Fix a memory leak during module exit
thinkpad_acpi: Flush the workqueue before freeing tpacpi_leds
dell-laptop: Add 6 machines to touchpad led quirk
ACER: Fix Smatch double-free issue
ACER: Fix up sparse warning
asus-nb-wmi: add some video toggle keys
asus-nb-wmi: add wapf quirk for ASUS machines
classmate-laptop: Fix extra keys hardware id.
classmate-laptop: Add support for Classmate V4 accelerometer.
asus-wmi: enable resume on lid open
asus-wmi: control backlight power through WMI, not ACPI
samsung-laptop: support R40/R41
acpi/video_detect: blacklist samsung x360
samsung-laptop: X360 ACPI backlight device is broken
drivers-platform-x86: use acpi_video_dmi_promote_vendor()
acpi: add a way to promote/demote vendor backlight drivers
ACER: Add support for accelerometer sensor
asus-wmi: use ASUS_WMI_METHODID_DSTS2 as default DSTS ID.
Linus Torvalds [Mon, 30 Jul 2012 18:45:52 +0000 (11:45 -0700)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
"More hardware support across the field including a bunch of device
drivers. The highlight however really are further steps towards
device tree.
This has been sitting in -next for ages. All MIPS _defconfigs have
been tested to boot or where I don't have hardware available, to at
least build fine."
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (77 commits)
MIPS: Loongson 1B: Add defconfig
MIPS: Loongson 1B: Add board support
MIPS: Netlogic: early console fix
MIPS: Netlogic: Fix indentation of smpboot.S
MIPS: Netlogic: remove cpu_has_dc_aliases define for XLP
MIPS: Netlogic: Remove unused pcibios_fixups
MIPS: Netlogic: Add XLP SoC devices in FDT
MIPS: Netlogic: Add IRQ mappings for more devices
MIPS: Netlogic: USB support for XLP
MIPS: Netlogic: XLP PCIe controller support.
MIPS: Netlogic: Platform changes for XLR/XLS I2C
MIPS: Netlogic: Platform NAND/NOR flash support
MIPS: Netlogic: Platform changes for XLS USB
MIPS: Netlogic: Remove NETLOGIC_ prefix
MIPS: Netlogic: SMP wakeup code update
MIPS: Netlogic: Update comments in smpboot.S
MIPS: BCM63XX: Add 96328avng reference board
MIPS: Expose PCIe drivers for MIPS
MIPS: BCM63XX: Add PCIe Support for BCM6328
MIPS: BCM63XX: Move the PCI initialization into its own function
...
Steven Rostedt [Mon, 30 Jul 2012 18:37:01 +0000 (14:37 -0400)]
ktest: Allow perl regex expressions in conditional statements
Add '=~' and '!~' to the list of allowed conditionals for DEFAULT and
TEST_START section if statements.
ie.
TEST_START IF TEST =~ .*test$
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Steven Rostedt [Mon, 30 Jul 2012 18:30:53 +0000 (14:30 -0400)]
ktest: Ignore errors it tests if IGNORE_ERRORS is set
The option IGNORE_ERRORS is used to allow a test to succeed even if a
warning appears from the kernel. Sometimes kernels will produce warnings
that are not associated with a test, and the user wants to test
something else.
The IGNORE_ERRORS works for boot up, but was not preventing test runs to
succeed if the kernel produced a warning.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Linus Torvalds [Mon, 30 Jul 2012 18:32:24 +0000 (11:32 -0700)]
Merge branch 'slab/next' of git://git./linux/kernel/git/penberg/linux
Pull SLAB changes from Pekka Enberg:
"Most of the changes included are from Christoph Lameter's "common
slab" patch series that unifies common parts of SLUB, SLAB, and SLOB
allocators. The unification is needed for Glauber Costa's "kmem
memcg" work that will hopefully appear for v3.7.
The rest of the changes are fixes and speedups by various people."
* 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux: (32 commits)
mm: Fix build warning in kmem_cache_create()
slob: Fix early boot kernel crash
mm, slub: ensure irqs are enabled for kmemcheck
mm, sl[aou]b: Move kmem_cache_create mutex handling to common code
mm, sl[aou]b: Use a common mutex definition
mm, sl[aou]b: Common definition for boot state of the slab allocators
mm, sl[aou]b: Extract common code for kmem_cache_create()
slub: remove invalid reference to list iterator variable
mm: Fix signal SIGFPE in slabinfo.c.
slab: move FULL state transition to an initcall
slab: Fix a typo in commit 8c138b "slab: Get rid of obj_size macro"
mm, slab: Build fix for recent kmem_cache changes
slab: rename gfpflags to allocflags
slub: refactoring unfreeze_partials()
slub: use __cmpxchg_double_slab() at interrupt disabled place
slab/mempolicy: always use local policy from interrupt context
slab: Get rid of obj_size macro
mm, sl[aou]b: Extract common fields from struct kmem_cache
slab: Remove some accessors
slab: Use page struct fields instead of casting
...
Linus Torvalds [Mon, 30 Jul 2012 18:24:53 +0000 (11:24 -0700)]
Merge branch 'trivial' of git://git./linux/kernel/git/mmarek/kbuild
Pull treewide kbuild cleanup from Michal Marek:
"Paul Bolle did a cleanup of <asm/*.h> headers in various
architectures. Because the patch touch several architectures at
once, it was easiest for me to apply them to the kbuild tree."
* 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
Remove useless wrappers of asm-generic/rmap.h
Remove useless wrappers of asm-generic/ipc.h
Remove useless wrappers of asm-generic/cpumask.h
Linus Torvalds [Mon, 30 Jul 2012 18:23:37 +0000 (11:23 -0700)]
Merge branch 'misc' of git://git./linux/kernel/git/mmarek/kbuild
Pull misc kbuild changes from Michal Marek:
"This is the non-critical part of kbuild for v3.6-rc1:
- Two new coccinelle semantic patches
- New scripts/tags.sh regexp
- scripts/config improvements that I mistakenly applied here instead
of in the kconfig branch (but there are no conflicts)
- Debian packaging fixes"
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts/tags.sh: Teach [ce]tags about libtraceeevent error codes
scripts/coccinelle: list iterator variable semantic patch
scripts/coccinelle: Find threaded IRQs requests which are missing IRQF_ONESHOT
deb-pkg: Add all Makefiles to header package
deb-pkg: Install linux-firmware-image in versioned dir
scripts/config: add option to undef a symbol
scripts/config: allow alternate prefix to config option symbol
scripts/config: add option to not upper-case symbols
Linus Torvalds [Mon, 30 Jul 2012 18:22:45 +0000 (11:22 -0700)]
Merge branch 'kconfig' of git://git./linux/kernel/git/mmarek/kbuild
Pull kconfig changes from Michal Marek:
- kconfig Makefile portability fixes
- menuconfig/nconfig help pager usability fix
- .gitignore cleanup
- quoting fix in scripts/config
- Makefile prints errors to stderr
- support for arbitrarily log lines in .config
- fix oldnoconfig description in 'make help'
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kconfig: Document oldnoconfig to what it really does
nconf: add u, d command keys in scroll windows
menuconfig: add u, d, q command keys in text boxes
scripts/config: fix double-quotes un-escaping
kconfig: Print errors to stderr in the Makefile
kconfig: allow long lines in config file
kconfig: remove lkc_defs.h from .gitignore and dontdiff
xconfig: add quiet rule for moc
xconfig: use pkgconfig to find moc
kconfig: fix check-lxdialog for DLL platforms
kconfig: check ncursesw headers first in check-lxdialog
kconfig/nconf: fix compile with ncurses reentrant API
Linus Torvalds [Mon, 30 Jul 2012 18:22:00 +0000 (11:22 -0700)]
Merge branch 'kbuild' of git://git./linux/kernel/git/mmarek/kbuild
Pull kbuild fix from Michal Marek:
"The main kbuild branch ended up with a single commit this time, a fix
to send errors to stderr"
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Print errors to stderr
Linus Torvalds [Mon, 30 Jul 2012 18:21:12 +0000 (11:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/linux-security
Pull security subsystem bugfixes from James Morris.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
selinux: fix selinux_inode_setxattr oops
KEYS: linux/key-type.h needs linux/errno.h
smack: off by one error
Linus Torvalds [Mon, 30 Jul 2012 17:39:18 +0000 (10:39 -0700)]
Merge tag 'dm-3.6-changes' of git://git./linux/kernel/git/agk/linux-dm
Pull device-mapper updates from Alasdair G Kergon:
- Flip the thin target into new read-only or failed modes if errors
are detected;
- Handle chunk sizes that are not powers of two in the snapshot and
thin targets;
- Provide a way for userspace to avoid replacing an already-loaded
multipath hardware handler while booting;
- Reduce dm_thin_endio_hook slab size to avoid allocation failures;
- Numerous small changes and cleanups to the code.
* tag 'dm-3.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm: (63 commits)
dm thin: commit before gathering status
dm thin: add read only and fail io modes
dm thin metadata: introduce dm_pool_abort_metadata
dm thin metadata: introduce dm_pool_metadata_set_read_only
dm persistent data: introduce dm_bm_set_read_only
dm thin: reduce number of metadata commits
dm thin metadata: add dm_thin_changed_this_transaction
dm thin metadata: add format option to dm_pool_metadata_open
dm thin metadata: tidy up open and format error paths
dm thin metadata: only check incompat features on open
dm thin metadata: remove duplicate pmd initialisation
dm thin metadata: remove create parameter from __create_persistent_data_objects
dm thin metadata: move __superblock_all_zeroes to __open_or_format_metadata
dm thin metadata: remove nr_blocks arg from __create_persistent_data_objects
dm thin metadata: split __open or format metadata
dm thin metadata: use struct dm_pool_metadata members in __open_or_format_metadata
dm thin metadata: zero unused superblock uuid
dm thin metadata: lift __begin_transaction out of __write_initial_superblock
dm thin metadata: move dm_commit_pool_metadata into __write_initial_superblock
dm thin metadata: factor out __write_initial_superblock
...
Linus Torvalds [Mon, 30 Jul 2012 17:11:31 +0000 (10:11 -0700)]
Merge branch 'for-linus-for-3.6-rc1' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull DMA-mapping updates from Marek Szyprowski:
"Those patches are continuation of my earlier work.
They contains extensions to DMA-mapping framework to remove limitation
of the current ARM implementation (like limited total size of DMA
coherent/write combine buffers), improve performance of buffer sharing
between devices (attributes to skip cpu cache operations or creation
of additional kernel mapping for some specific use cases) as well as
some unification of the common code for dma_mmap_attrs() and
dma_mmap_coherent() functions. All extensions have been implemented
and tested for ARM architecture."
* 'for-linus-for-3.6-rc1' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
ARM: dma-mapping: add support for DMA_ATTR_SKIP_CPU_SYNC attribute
common: DMA-mapping: add DMA_ATTR_SKIP_CPU_SYNC attribute
ARM: dma-mapping: add support for dma_get_sgtable()
common: dma-mapping: introduce dma_get_sgtable() function
ARM: dma-mapping: add support for DMA_ATTR_NO_KERNEL_MAPPING attribute
common: DMA-mapping: add DMA_ATTR_NO_KERNEL_MAPPING attribute
common: dma-mapping: add support for generic dma_mmap_* calls
ARM: dma-mapping: fix error path for memory allocation failure
ARM: dma-mapping: add more sanity checks in arm_dma_mmap()
ARM: dma-mapping: remove custom consistent dma region
mm: vmalloc: use const void * for caller argument
scatterlist: add sg_alloc_table_from_pages function
Linus Torvalds [Mon, 30 Jul 2012 17:10:26 +0000 (10:10 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging
Pull a howmon update from Jean Delvare.
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: struct x86_cpu_id arrays can be __initconst
Linus Torvalds [Mon, 30 Jul 2012 17:06:23 +0000 (10:06 -0700)]
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull Exynos DRM changes from Dave Airlie:
"So I totally missed Inki's pull request for -next, its fully exynos
self contained."
(I took just the actual commits, not Dave's two extraneous merges)
* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (30 commits)
drm/exynos: fixed exception to page allocation failure
drm/exynos: use __free_page() to deallocate memory
drm/exynos: fixed a comment to gem size.
drm/exynos: removed unnecessary variable
drm/exynos: do not release memory region from exporter.
drm/exynos: set buffer type from exporter.
drm/exynos: use alloc_page() to allocate pages.
drm/exynos: fixed build warning.
drm/exynos: fixed edid data setting at vidi connection request
drm/exynos: check if raw edid data is fake or not for test
drm/exynos: set edid fake data only for test.
drm/exynos: removed unnecessary declaration.
drm/exynos: fix buffer pitch calculation
drm/exynos: check for null in return value of dma_buf_map_attachment()
drm/exynos: return NULL if exynos_pages_to_sg fails
drm/exynos: Use devm_* functions in exynos_mixer.c
drm/exynos: Use devm_* functions in exynos_hdmi.c
drm/exynos: Use devm_* functions in exynos_drm_fimd.c
drm/exynos: Add missing static storage class specifier
drm/exynos: add property for crtc mode
...
Linus Torvalds [Mon, 30 Jul 2012 17:01:45 +0000 (10:01 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
"A new driver for FT5x06 based EDT displays and a couple of other
driver changes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: synaptics - handle out of bounds values from the hardware
Input: wacom - add support to Cintiq 22HD
Input: add driver for FT5x06 based EDT displays
Linus Torvalds [Mon, 30 Jul 2012 16:58:10 +0000 (09:58 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck:
- Fix timing problems in applesmc driver
- Improve device removal in jc42 driver
- Fix build warning in acp_power_meter driver
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (applesmc) Decode and act on read/write status codes
hwmon: (jc42) Don't reset hysteresis on device removal
hwmon: (jc42) Simplify hysteresis mask
hwmon: (acpi_power_meter) Fix build warning
Linus Torvalds [Mon, 30 Jul 2012 16:53:50 +0000 (09:53 -0700)]
Merge git://git./linux/kernel/git/mchehab/linux-edac
Pull EDAC patches from Mauro Carvalho Chehab:
- the second part of the EDAC rework:
- Add the sysfs nodes that exports the real memory layout, instead
of the fake one (needed to properly represent Intel memory
controllers since 2002)
- convert EDAC MC to use "struct device" instead of creating the
sysfs nodes via the kobj API
- adds a tracepoint to represent memory errors
- some cleanup patches
- some fixes at i5000, i5400 and EDAC core
- a new EDAC driver for Caldera.
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: (33 commits)
edac i5000, i5400: fix pointer math in i5000_get_mc_regs()
edac: allow specifying the error count with fake_inject
edac: add support for Calxeda highbank L2 cache ecc
edac: add support for Calxeda highbank memory controller
edac: create top-level debugfs directory
sb_edac: properly handle error count
i7core_edac: properly handle error count
edac: edac_mc_handle_error(): add an error_count parameter
edac: remove arch-specific parameter for the error handler
amd64_edac: Don't pass driver name as an error parameter
edac_mc: check for allocation failure in edac_mc_alloc()
edac: Increase version to 3.0.0
edac_mc: Cleanup per-dimm_info debug messages
edac: Convert debugfX to edac_dbg(X,
edac: Use more normal debugging macro style
edac: Don't add __func__ or __FILE__ for debugf[0-9] msgs
Edac: Add ABI Documentation for the new device nodes
edac: move documentation ABI to ABI/testing/sysfs-devices-edac
i7core_edac: change the mem allocation scheme to make Documentation/kobject.txt happy
edac: change the mem allocation scheme to make Documentation/kobject.txt happy
...
Linus Torvalds [Mon, 30 Jul 2012 16:48:00 +0000 (09:48 -0700)]
Merge tag 'boards2' of git://git./linux/kernel/git/arm/arm-soc
Pull arm-soc board updates from Olof Johansson:
"This branch contains board updates, mostly for shmobile, but also a
couple for PXA.
The shmobile platforms are still in the early stages of DT enablement,
so there's a bit more updates here than we'd ideally want to see:
- regulator updates to provide some fixed regulators on several
boards
- gpio support updates for multiple boards
- misc updates for recently-introduced boards armadillo800eva and
kzm9g
- defconfig updates"
* tag 'boards2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits)
ARM: shmobile: kzm9g: defconfig enable INOTIFY_USER
ARM: mach-shmobile: armadillo800eva: defconfig Allow use of armhf userspace
ARM: shmobile: armadillo800eva: A3SP domain includes USB
ARM: shmobile: armadillo800eva: A4LC domain includes LCDC
ARM: shmobile: armadillo800eva: USB Func enables external IRQ mode
ARM: mach-shmobile: kzm9d: Add defconfig
ARM: mach-shmobile: select the fixed regulator driver on several boards
ARM: mach-shmobile: add SDHI2 to the 2.8V fixed regulator consumers on kzm9g
ARM: pxa: hx4700: Use DEFINE_RES_* macros consistently
ARM: pxa: remove eseries.h
ARM: mach-shmobile: add fixed voltage regulators to marzen
ARM: mach-shmobile: add fixed voltage regulators to kzm9g
ARM: mach-shmobile: add fixed voltage regulators to kzm9d
ARM: mach-shmobile: add fixed voltage regulators to kota2
ARM: mach-shmobile: add fixed voltage regulators to g4evm
ARM: mach-shmobile: add fixed voltage regulators to bonito
ARM: mach-shmobile: add fixed voltage regulators to armadillo800eva
ARM: mach-shmobile: add fixed voltage regulators to ap4evb
ARM: mach-shmobile: add fixed voltage regulators to ag5evm
ARM: mach-shmobile: add 3.3V and 1.8V fixed regulators to mackerel
...
Linus Torvalds [Mon, 30 Jul 2012 16:45:53 +0000 (09:45 -0700)]
Merge tag 'soc2' of git://git./linux/kernel/git/arm/arm-soc
Pull arm-soc soc updates from Olof Johansson:
"This is the second batch of SoC updates for the 3.6 merge window,
containing parts that arrived close to the merge window opening and
thus needed to sit in linux-next for a while.
Most contents is updates of Renesas shmobile, with a couple of Samsung
Exynos patches in the mix."
* tag 'soc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (39 commits)
ARM: S3C64XX: Add header file protection macros in pm-core.h
[CPUFREQ] EXYNOS5250: Add support max 1.7GHz for EXYNOS5250
ARM: EXYNOS: Add G2D related clock entries for SMDK4X12
ARM: EXYNOS: Move G2D clock entries to clock-exynos4210.c file
ARM: shmobile: Fix build problem in pm-sh7372.c for unusual .config
ARM: shmobile: Take cpuidle dependencies into account correctly
ARM: mach-shmobile: sh7377 generic board support via DT
ARM: mach-shmobile: r8a7740 generic board support via DT
ARM: shmobile: sh7372: completely switch over to using pm-rmobile API
ARM: shmobile: ap4evb: switch to using pm-rmobile API
ARM: shmobile: mackerel: switch to using pm-rmobile API
ARM: shmobile: sh7372: add pm-rmobile domain support
ARM: shmobile: r8a7740: add A4LC pm domain support
ARM: shmobile: r8a7740: add A3SP pm domain support
ARM: shmobile: r8a7740: add A4S pm domain support
ARM: shmobile: r8a7740: fixup: MSEL1CR 7bit control
ARM: shmobile: soc-core: add R-mobile PM domain common APIs
ARM: shmobile: sh7372 A3SM CPUIdle support
ARM: shmobile: Use INTCA with sh7372 A3SM power domain
ARM: mach-shmobile: Convert sh_clk_mstp32_register to sh_clk_mstp_register
...
Linus Torvalds [Mon, 30 Jul 2012 16:32:39 +0000 (09:32 -0700)]
Merge tag 'firewire-updates' of git://git./linux/kernel/git/ieee1394/linux1394
Pull firewire updates from Stefan Richter:
- Small fixes and optimizations.
- A new sysfs attribute to tell local and remote nodes apart.
Useful to set special permissions/ ownership of local nodes'
/dev/fw*, to start daemons on them (for diagnostics, management,
AV targets, VersaPHY initiator or targets...), to pick up their
GUID to use it as GUID of an SBP2 target instance, and of course
for informational purposes.
* tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
firewire: core: document is_local sysfs attribute
firewire: core: add is_local sysfs device attribute
firewire: ohci: initialize multiChanMode bits after reset
firewire: core: fix multichannel IR with buffers larger than 2 GB
firewire: ohci: sanity-check MMIO resource
firewire: ohci: lazy bus time initialization
firewire: core: allocate the low memory region
firewire: core: make address handler length 64 bits
Linus Torvalds [Mon, 30 Jul 2012 16:22:37 +0000 (09:22 -0700)]
Merge branch 'for-3.6' of git://gitorious.org/linux-pwm/linux-pwm
Pull PWM subsystem from Thierry Reding:
"The new PWM subsystem aims at collecting all implementations of the
legacy PWM API and to eventually replace it completely.
The subsystem has been in development for over half a year now and
many drivers have already been converted. It has been in linux-next
for a couple of weeks and there have been no major issues so I think
it is ready for inclusion in your tree."
Arnd Bergmann <arnd@arndb.de>:
"Very much Ack on the new subsystem. It uses the interface
declarations as the previously separate pwm drivers, so nothing
changes for now in the drivers using it, although it enables us to
change those more easily in the future if we want to.
This work is also one of the missing pieces that are required to
eventually build ARM kernels for multiple platforms, which is
currently prohibited (amongs other things) by the fact that you cannot
have more than one driver exporting the pwm functions."
Tested-and-acked-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Philip, Avinash <avinashphilip@ti.com> # TI's AM33xx platforms
Acked-By: Alexandre Pereira da Silva <aletes.xgr@gmail.com> # LPC32XX
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sachin Kamat <sachin.kamat@linaro.org>
Fix up trivial conflicts with other cleanups and DT updates.
* 'for-3.6' of git://gitorious.org/linux-pwm/linux-pwm: (36 commits)
pwm: pwm-tiehrpwm: PWM driver support for EHRPWM
pwm: pwm-tiecap: PWM driver support for ECAP APWM
pwm: fix used-uninitialized warning in pwm_get()
pwm: add lpc32xx PWM support
pwm_backlight: pass correct brightness to callback
pwm: Use pr_* functions in pwm-samsung.c file
pwm: Convert pwm-samsung to use devm_* APIs
pwm: Convert pwm-tegra to use devm_clk_get()
pwm: pwm-mxs: Return proper error if pwmchip_remove() fails
pwm: pwm-bfin: Return proper error if pwmchip_remove() fails
pwm: pxa: Propagate pwmchip_remove() error
pwm: Convert pwm-pxa to use devm_* APIs
pwm: Convert pwm-vt8500 to use devm_* APIs
pwm: Convert pwm-imx to use devm_* APIs
pwm: Conflict with legacy PWM API
pwm: pwm-mxs: add pinctrl support
pwm: pwm-mxs: use devm_* managed functions
pwm: pwm-mxs: use global reset function stmp_reset_block
pwm: pwm-mxs: encode soc name in compatible string
pwm: Take over maintainership of the PWM subsystem
...
Marek Szyprowski [Wed, 6 Jun 2012 12:50:56 +0000 (14:50 +0200)]
ARM: dma-mapping: add support for DMA_ATTR_SKIP_CPU_SYNC attribute
This patch adds support for DMA_ATTR_SKIP_CPU_SYNC attribute for
dma_(un)map_(single,page,sg) functions family. It lets dma mapping clients
to create a mapping for the buffer for the given device without performing
a CPU cache synchronization. CPU cache synchronization can be skipped for
the buffers which it is known that they are already in 'device' domain (CPU
caches have been already synchronized or there are only coherent mappings
for the buffer). For advanced users only, please use it with care.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Marek Szyprowski [Wed, 6 Jun 2012 12:46:44 +0000 (14:46 +0200)]
common: DMA-mapping: add DMA_ATTR_SKIP_CPU_SYNC attribute
This patch adds DMA_ATTR_SKIP_CPU_SYNC attribute to the DMA-mapping
subsystem.
By default dma_map_{single,page,sg} functions family transfer a given
buffer from CPU domain to device domain. Some advanced use cases might
require sharing a buffer between more than one device. This requires
having a mapping created separately for each device and is usually
performed by calling dma_map_{single,page,sg} function more than once
for the given buffer with device pointer to each device taking part in
the buffer sharing. The first call transfers a buffer from 'CPU' domain
to 'device' domain, what synchronizes CPU caches for the given region
(usually it means that the cache has been flushed or invalidated
depending on the dma direction). However, next calls to
dma_map_{single,page,sg}() for other devices will perform exactly the
same sychronization operation on the CPU cache. CPU cache sychronization
might be a time consuming operation, especially if the buffers are
large, so it is highly recommended to avoid it if possible.
DMA_ATTR_SKIP_CPU_SYNC allows platform code to skip synchronization of
the CPU cache for the given buffer assuming that it has been already
transferred to 'device' domain. This attribute can be also used for
dma_unmap_{single,page,sg} functions family to force buffer to stay in
device domain after releasing a mapping for it. Use this attribute with
care!
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Marek Szyprowski [Wed, 13 Jun 2012 08:01:15 +0000 (10:01 +0200)]
ARM: dma-mapping: add support for dma_get_sgtable()
This patch adds support for dma_get_sgtable() function which is required
to let drivers to share the buffers allocated by DMA-mapping subsystem.
Generic implementation based on virt_to_page() is not suitable for ARM
dma-mapping subsystem.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Marek Szyprowski [Wed, 13 Jun 2012 08:05:52 +0000 (10:05 +0200)]
common: dma-mapping: introduce dma_get_sgtable() function
This patch adds dma_get_sgtable() function which is required to let
drivers to share the buffers allocated by DMA-mapping subsystem. Right
now the driver gets a dma address of the allocated buffer and the kernel
virtual mapping for it. If it wants to share it with other device (= map
into its dma address space) it usually hacks around kernel virtual
addresses to get pointers to pages or assumes that both devices share
the DMA address space. Both solutions are just hacks for the special
cases, which should be avoided in the final version of buffer sharing.
To solve this issue in a generic way, a new call to DMA mapping has been
introduced - dma_get_sgtable(). It allocates a scatter-list which
describes the allocated buffer and lets the driver(s) to use it with
other device(s) by calling dma_map_sg() on it.
This patch provides a generic implementation based on virt_to_page()
call. Architectures which require more sophisticated translation might
provide their own get_sgtable() methods.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Marek Szyprowski [Wed, 16 May 2012 18:38:58 +0000 (19:38 +0100)]
ARM: dma-mapping: add support for DMA_ATTR_NO_KERNEL_MAPPING attribute
This patch adds support for DMA_ATTR_NO_KERNEL_MAPPING attribute for
IOMMU allocations, what let drivers to save precious kernel virtual
address space for large buffers that are intended to be accessed only
from userspace.
This patch is heavily based on initial work kindly provided by Abhinav
Kochhar <abhinav.k@samsung.com>.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Marek Szyprowski [Wed, 16 May 2012 13:20:37 +0000 (15:20 +0200)]
common: DMA-mapping: add DMA_ATTR_NO_KERNEL_MAPPING attribute
This patch adds DMA_ATTR_NO_KERNEL_MAPPING attribute which lets the
platform to avoid creating a kernel virtual mapping for the allocated
buffer. On some architectures creating such mapping is non-trivial task
and consumes very limited resources (like kernel virtual address space
or dma consistent address space). Buffers allocated with this attribute
can be only passed to user space by calling dma_mmap_attrs().
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Marek Szyprowski [Thu, 14 Jun 2012 11:03:04 +0000 (13:03 +0200)]
common: dma-mapping: add support for generic dma_mmap_* calls
Commit
9adc5374 ('common: dma-mapping: introduce mmap method') added a
generic method for implementing mmap user call to dma_map_ops structure.
This patch converts ARM and PowerPC architectures (the only providers of
dma_mmap_coherent/dma_mmap_writecombine calls) to use this generic
dma_map_ops based call and adds a generic cross architecture
definition for dma_mmap_attrs, dma_mmap_coherent, dma_mmap_writecombine
functions.
The generic mmap virt_to_page-based fallback implementation is provided for
architectures which don't provide their own implementation for mmap method.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Marek Szyprowski [Fri, 27 Jul 2012 15:12:50 +0000 (17:12 +0200)]
ARM: dma-mapping: fix error path for memory allocation failure
This patch fixes incorrect check in error path. When the allocation of
first page fails, the kernel ops appears due to accessing -1 element of
the pages array.
Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Marek Szyprowski [Mon, 30 Jul 2012 07:35:26 +0000 (09:35 +0200)]
ARM: dma-mapping: add more sanity checks in arm_dma_mmap()
Add some sanity checks and forbid mmaping of buffers into vma areas larger
than allocated dma buffer.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Marek Szyprowski [Mon, 30 Jul 2012 07:11:33 +0000 (09:11 +0200)]
ARM: dma-mapping: remove custom consistent dma region
This patch changes dma-mapping subsystem to use generic vmalloc areas
for all consistent dma allocations. This increases the total size limit
of the consistent allocations and removes platform hacks and a lot of
duplicated code.
Atomic allocations are served from special pool preallocated on boot,
because vmalloc areas cannot be reliably created in atomic context.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Marek Szyprowski [Fri, 13 Apr 2012 10:32:09 +0000 (12:32 +0200)]
mm: vmalloc: use const void * for caller argument
'const void *' is a safer type for caller function type. This patch
updates all references to caller function type.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Tomasz Stanislawski [Mon, 18 Jun 2012 07:25:01 +0000 (09:25 +0200)]
scatterlist: add sg_alloc_table_from_pages function
This patch adds a new constructor for an sg table. The table is constructed
from an array of struct pages. All contiguous chunks of the pages are merged
into a single sg nodes. A user may provide an offset and a size of a buffer if
the buffer is not page-aligned.
The function is dedicated for DMABUF exporters which often perform conversion
from an page array to a scatterlist. Moreover the scatterlist should be
squashed in order to save memory and to speed-up the process of DMA mapping
using dma_map_sg.
The code is based on the patch 'v4l: vb2-dma-contig: add support for
scatterlist in userptr mode' and hints from Laurent Pinchart.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Andrew Morton <akpm@linux-foundation.org>
Shuah Khan [Fri, 13 Jul 2012 23:12:05 +0000 (17:12 -0600)]
mm: Fix build warning in kmem_cache_create()
The label oops is used in CONFIG_DEBUG_VM ifdef block and is defined
outside ifdef CONFIG_DEBUG_VM block. This results in the following
build warning when built with CONFIG_DEBUG_VM disabled. Fix to move
label oops definition to inside a CONFIG_DEBUG_VM block.
mm/slab_common.c: In function ‘kmem_cache_create’:
mm/slab_common.c:101:1: warning: label ‘oops’ defined but not used
[-Wunused-label]
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Jan Beulich [Mon, 30 Jul 2012 09:33:00 +0000 (11:33 +0200)]
hwmon: struct x86_cpu_id arrays can be __initconst
... as being referenced from __init code only.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Al Viro [Sat, 9 Jun 2012 07:15:16 +0000 (08:15 +0100)]
selinux: fix selinux_inode_setxattr oops
OK, what we have so far is e.g.
setxattr(path, name, whatever, 0, XATTR_REPLACE)
with name being good enough to get through xattr_permission().
Then we reach security_inode_setxattr() with the desired value and size.
Aha. name should begin with "security.selinux", or we won't get that
far in selinux_inode_setxattr(). Suppose we got there and have enough
permissions to relabel that sucker. We call security_context_to_sid()
with value == NULL, size == 0. OK, we want ss_initialized to be non-zero.
I.e. after everything had been set up and running. No problem...
We do 1-byte kmalloc(), zero-length memcpy() (which doesn't oops, even
thought the source is NULL) and put a NUL there. I.e. form an empty
string. string_to_context_struct() is called and looks for the first
':' in there. Not found, -EINVAL we get. OK, security_context_to_sid_core()
has rc == -EINVAL, force == 0, so it silently returns -EINVAL.
All it takes now is not having CAP_MAC_ADMIN and we are fucked.
All right, it might be a different bug (modulo strange code quoted in the
report), but it's real. Easily fixed, AFAICS:
Deal with size == 0, value == NULL case in selinux_inode_setxattr()
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Dave Jones <davej@redhat.com>
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Dmitry Torokhov [Mon, 30 Jul 2012 05:34:47 +0000 (22:34 -0700)]
Merge branch 'next' into for-linus
Prepare second set of changes for 3.6 merge window.
David Howells [Mon, 23 Jul 2012 14:37:31 +0000 (15:37 +0100)]
KEYS: linux/key-type.h needs linux/errno.h
linux/key-type.h needs to #include linux/errno.h as it refers to ENOKEY.
Without this, with sparc's allmodconfig in one of my test trees, the following
error occurs:
include/linux/key-type.h: In function 'key_negate_and_link':
include/linux/key-type.h:122:43: error: 'ENOKEY' undeclared (first use in this function)
include/linux/key-type.h:122:43: note: each undeclared identifier is reported only once for each fun
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Alan Cox [Thu, 26 Jul 2012 21:47:11 +0000 (14:47 -0700)]
smack: off by one error
Consider the input case of a rule that consists entirely of non space
symbols followed by a \0. Say 64 + \0
In this case strlen(data) = 64
kzalloc of subject and object are 64 byte objects
sscanfdata, "%s %s %s", subject, ...)
will put 65 bytes into subject.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
Mauro Carvalho Chehab [Mon, 30 Jul 2012 00:11:05 +0000 (21:11 -0300)]
Merge branch 'devel'
* devel: (33 commits)
edac i5000, i5400: fix pointer math in i5000_get_mc_regs()
edac: allow specifying the error count with fake_inject
edac: add support for Calxeda highbank L2 cache ecc
edac: add support for Calxeda highbank memory controller
edac: create top-level debugfs directory
sb_edac: properly handle error count
i7core_edac: properly handle error count
edac: edac_mc_handle_error(): add an error_count parameter
edac: remove arch-specific parameter for the error handler
amd64_edac: Don't pass driver name as an error parameter
edac_mc: check for allocation failure in edac_mc_alloc()
edac: Increase version to 3.0.0
edac_mc: Cleanup per-dimm_info debug messages
edac: Convert debugfX to edac_dbg(X,
edac: Use more normal debugging macro style
edac: Don't add __func__ or __FILE__ for debugf[0-9] msgs
Edac: Add ABI Documentation for the new device nodes
edac: move documentation ABI to ABI/testing/sysfs-devices-edac
i7core_edac: change the mem allocation scheme to make Documentation/kobject.txt happy
edac: change the mem allocation scheme to make Documentation/kobject.txt happy
...
Mauro Carvalho Chehab [Mon, 30 Jul 2012 00:09:39 +0000 (21:09 -0300)]
Merge tag 'v3.5'
Linux 3.5
* tag 'v3.5': (1242 commits)
Linux 3.5
Remove SYSTEM_SUSPEND_DISK system state
kdb: Switch to nolock variants of kmsg_dump functions
printk: Implement some unlocked kmsg_dump functions
printk: Remove kdb_syslog_data
kdb: Revive dmesg command
dm raid1: set discard_zeroes_data_unsupported
dm thin: do not send discards to shared blocks
dm raid1: fix crash with mirror recovery and discard
pnfs-obj: Fix __r4w_get_page when offset is beyond i_size
pnfs-obj: don't leak objio_state if ore_write/read fails
ore: Unlock r4w pages in exact reverse order of locking
ore: Remove support of partial IO request (NFS crash)
ore: Fix NFS crash by supporting any unaligned RAID IO
UBIFS: fix a bug in empty space fix-up
cx25821: Remove bad strcpy to read-only char*
HID: hid-multitouch: add support for Zytronic panels
MIPS: PCI: Move fixups from __init to __devinit.
MIPS: Fix bug.h MIPS build regression
MIPS: sync-r4k: remove redundant irq operation
...
Linus Torvalds [Sat, 28 Jul 2012 20:43:12 +0000 (13:43 -0700)]
Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux
Pull embedded i2c changes from Wolfram Sang:
"Changes for the "embedded" part of the I2C subsystem:
- lots of devicetree conversions of drivers (and preparations for
that)
- big cleanups for drivers for OMAP, Tegra, Nomadik, Blackfin
- Rafael's struct dev_pm_ops conversion patches for I2C
- usual driver cleanups and fixes
All patches have been in linux-next for an apropriate time and all
patches touching files outside of i2c-folders should have proper acks
from the maintainers."
* 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux: (60 commits)
Revert "i2c: tegra: convert normal suspend/resume to *_noirq"
I2C: MV64XYZ: Add Device Tree support
i2c: stu300: use devm managed resources
i2c: i2c-ocores: support for 16bit and 32bit IO
V4L/DVB: mfd: use reg_shift instead of regstep
i2c: i2c-ocores: Use reg-shift property
i2c: i2c-ocores: DT bindings and minor fixes.
i2c: mv64xxxx: remove EXPERIMENTAL tag
i2c-s3c2410: Use plain pm_runtime_put()
i2c: s3c2410: Fix pointer type passed to of_match_node()
i2c: mxs: Set I2C timing registers for mxs-i2c
i2c: i2c-bfin-twi: Move blackfin TWI register access Macro to head file.
i2c: i2c-bfin-twi: Move TWI peripheral pin request array to platform data.
i2c:i2c-bfin-twi: include twi head file
i2c:i2c-bfin-twi: TWI fails to restart next transfer in high system load.
i2c: i2c-bfin-twi: Tighten condition when failing I2C transfer if MEN bit is reset unexpectedly.
i2c: i2c-bfin-twi: Break dead waiting loop if i2c device misbehaves.
i2c: i2c-bfin-twi: Improve the patch for bug "Illegal i2c bus lock upon certain transfer scenarios".
i2c: i2c-bfin-twi: Illegal i2c bus lock upon certain transfer scenarios.
i2c-mv64xxxx: allow more than one driver instance
...
Conflicts:
drivers/i2c/busses/i2c-nomadik.c
Linus Torvalds [Sat, 28 Jul 2012 13:00:39 +0000 (06:00 -0700)]
Merge git://git./linux/kernel/git/davem/net
Pull networking fixes from David Miller:
"Several bug fixes, some to new features appearing in this merge
window, some that have been around for a while.
I have a short list of known problems that need to be sorted out, but
all of them can be solved easily during the run up to 3.6-final.
I'll be offline until Sunday afternoon, but nothing need hold up
3.6-rc1 and the close of the merge window, networking wise, at this
point.
1) Fix interface check in ipv4 TCP early demux, from Eric Dumazet.
2) Fix a long standing bug in TCP DMA to userspace offload that can
hang applications using MSG_TRUNC, from Jiri Kosina.
3) Don't allow TCP_USER_TIMEOUT to be negative, from Hangbin Liu.
4) Don't use GFP_KERNEL under spinlock in kaweth driver, from Dan
Carpenter"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
tcp: perform DMA to userspace only if there is a task waiting for it
Revert "openvswitch: potential NULL deref in sample()"
ipv4: fix TCP early demux
net: fix rtnetlink IFF_PROMISC and IFF_ALLMULTI handling
USB: kaweth.c: use GFP_ATOMIC under spin_lock
tcp: Add TCP_USER_TIMEOUT negative value check
bcma: add missing iounmap on error path
bcma: fix regression in interrupt assignment on mips
mac80211_hwsim: fix possible race condition in usage of info->control.sta & control.vif
Li Dongyang [Wed, 25 Jul 2012 00:45:09 +0000 (10:45 +1000)]
thinkpad_acpi: Free hotkey_keycode_map after unregistering tpacpi_inputdev
We should free hotkey_keycode_map after unregistering tpacpi_inputdev, to aviod
use after free like this:
[ 99.408388] =============================================================================
[ 99.408393] BUG kmalloc-64 (Not tainted): Poison overwritten
[ 99.408394] -----------------------------------------------------------------------------
[ 99.408394]
[ 99.408398] INFO: 0xf2751962-0xf2751995. First byte 0x98 instead of 0x6b
[ 99.408402] INFO: Allocated in 0xfdc88c28 age=79 cpu=0 pid=1329
[ 99.408407] __slab_alloc.isra.50.constprop.56+0x49f/0x533
[ 99.408410] kmem_cache_alloc_trace+0x10d/0x140
[ 99.408412] 0xfdc88c28
[ 99.408414] 0xfdc898cc
[ 99.408417] do_one_initcall+0x112/0x160
[ 99.408420] sys_init_module+0xe6d/0x1bc0
[ 99.408422] sysenter_do_call+0x12/0x28
[ 99.408427] INFO: Freed in hotkey_exit+0x50/0xb0 [thinkpad_acpi] age=14 cpu=1 pid=1333
[ 99.408429] __slab_free+0x3d/0x30b
[ 99.408431] kfree+0x129/0x140
[ 99.408435] hotkey_exit+0x50/0xb0 [thinkpad_acpi]
[ 99.408438] ibm_exit+0xe3/0x1a0 [thinkpad_acpi]
[ 99.408441] thinkpad_acpi_module_exit+0x35/0x208 [thinkpad_acpi]
[ 99.408443] sys_delete_module+0x11f/0x280
[ 99.408445] sysenter_do_call+0x12/0x28
[ 99.408447] INFO: Slab 0xf4d5ea20 objects=17 used=17 fp=0x (null) flags=0x40000080
[ 99.408449] INFO: Object 0xf2751960 @offset=2400 fp=0xf2751780
[ 99.408449]
[ 99.408452] Bytes b4
f2751950: 64 02 00 00 ae ce fe ff 5a 5a 5a 5a 5a 5a 5a 5a d.......ZZZZZZZZ
[ 99.408454] Object
f2751960: 6b 6b 98 00 ec 00 8e 00 ee 00 6b 6b e3 00 bf 00 kk........kk....
[ 99.408456] Object
f2751970: c2 00 6b 6b 6b 6b cd 00 6b 6b 6b 6b 6b 6b e1 00 ..kkkk..kkkkkk..
[ 99.408458] Object
f2751980: e0 00 e4 00 6b 6b 74 01 73 00 72 00 71 00 94 00 ....kkt.s.r.q...
[ 99.408460] Object
f2751990: 6b 6b 6b 6b f8 00 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 kkkk..kkkkkkkkk.
[ 99.408462] Redzone
f27519a0: bb bb bb bb ....
Signed-off-by: Li Dongyang <Jerry87905@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Li Dongyang [Wed, 25 Jul 2012 00:45:08 +0000 (10:45 +1000)]
thinkpad_acpi: Fix a memory leak during module exit
We should free the thinkpad_id.nummodel_str during exit as it's allocated
in get_thinkpad_module_data().
Signed-off-by: Li Dongyang <Jerry87905@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Li Dongyang [Wed, 25 Jul 2012 00:45:07 +0000 (10:45 +1000)]
thinkpad_acpi: Flush the workqueue before freeing tpacpi_leds
We init work_struct within tpacpi_leds, and we should free tpacpi_leds after
the workqueue is empty, in case of the work_struct is referenced after free.
This script could trigger the OOPS:
#!/bin/sh
while true
do
modprobe -r thinkpad_acpi
modprobe thinkpad_acpi
done
And the OOPS looks like this:
[ 73.863557] BUG: unable to handle kernel paging request at
45440000
[ 73.863925] IP: [<
c1051d65>] process_one_work+0x25/0x3b0
[ 73.864749] *pde =
00000000
[ 73.865571] Oops: 0000 [#1] PREEMPT SMP
[ 73.866443] Modules linked in: thinkpad_acpi(-) nvram netconsole configfs
aes_i586 cryptd aes_generic joydev btusb bluetooth arc4 snd_hda_codec_analog
iwl4965 uhci_hcd pcmcia microcode iwlegacy mac80211 cfg80211 firewire_ohci
firewire_core kvm_intel kvm snd_hda_intel acpi_cpufreq mperf ehci_hcd yenta_socket
pcmcia_rsrc crc_itu_t sr_mod snd_hda_codec processor pcmcia_core i2c_i801 usbcore
lpc_ich cdrom serio_raw psmouse coretemp rfkill e1000e snd_pcm snd_page_alloc
snd_hwdep snd_timer snd pcspkr evdev ac battery thermal soundcore usb_common
intel_agp intel_gtt tp_smapi(O) thinkpad_ec(O) ext4 crc16 jbd2 mbcache sd_mod
ata_piix ahci libahci libata scsi_mod nouveau button video mxm_wmi wmi
i2c_algo_bit drm_kms_helper ttm drm agpgart i2c_core [last unloaded: nvram]
[ 73.866676]
[ 73.866676] Pid: 62, comm: kworker/u:4 Tainted: G O 3.5.0-1-ARCH
#1 LENOVO 7662CTO/7662CTO
[ 73.866676] EIP: 0060:[<
c1051d65>] EFLAGS:
00010002 CPU: 1
[ 73.866676] EIP is at process_one_work+0x25/0x3b0
[ 73.866676] EAX:
45440065 EBX:
f5545090 ECX:
00000088 EDX:
45440000
[ 73.866676] ESI:
f568ff40 EDI:
c164dd40 EBP:
f5705f98 ESP:
f5705f68
[ 73.866676] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 73.866676] CR0:
8005003b CR2:
45440000 CR3:
357ed000 CR4:
000007d0
[ 73.866676] DR0:
00000000 DR1:
00000000 DR2:
00000000 DR3:
00000000
[ 73.866676] DR6:
ffff0ff0 DR7:
00000400
[ 73.866676] Process kworker/u:4 (pid: 62, ti=
f5704000 task=
f5700540 task.ti=
f5704000)
[ 73.866676] Stack:
[ 73.866676]
f56fbf24 00000001 f5705f78 c10683e0 c1294950 00000000 00000000 f568ff40
[ 73.866676]
00000000 f568ff40 f568ff50 c164dd40 f5705fb8 c1052589 c1060c7e c15b9300
[ 73.866676]
c164dd40 00000000 f568ff40 c1052490 f5705fe4 c10570b2 00000000 f568ff40
[ 73.866676] Call Trace:
[ 73.866676] [<
c10683e0>] ? default_wake_function+0x10/0x20
[ 73.866676] [<
c1294950>] ? dev_get_drvdata+0x20/0x20
[ 73.866676] [<
c1052589>] worker_thread+0xf9/0x280
[ 73.866676] [<
c1060c7e>] ? complete+0x4e/0x60
[ 73.866676] [<
c1052490>] ? manage_workers.isra.24+0x1c0/0x1c0
[ 73.866676] [<
c10570b2>] kthread+0x72/0x80
[ 73.866676] [<
c1057040>] ? kthread_freezable_should_stop+0x50/0x50
[ 73.866676] [<
c13c20fe>] kernel_thread_helper+0x6/0x10
[ 73.866676] Code: bc 27 00 00 00 00 55 89 e5 57 56 53 83 ec 24 3e 8d 74 26
00 89 c6 8b 02 89 d3 c7 45 f0 00 00 00 00 89 c2 30 d2 a8 04 0f 44 55 f0 <8b> 02 89 55 f0 89 da c1 ea
0a 89 45 ec 89 d8 8b 4d ec c1 e8 04
[ 73.866676] EIP: [<
c1051d65>] process_one_work+0x25/0x3b0 SS:ESP 0068:
f5705f68
[ 73.866676] CR2:
0000000045440000
[ 73.866676] ---[ end trace
4d8a1887edca08c5 ]---
[ 73.866676] note: kworker/u:4[62] exited with preempt_count 1
Signed-off-by: Li Dongyang <Jerry87905@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
AceLan Kao [Fri, 13 Jul 2012 08:39:57 +0000 (16:39 +0800)]
dell-laptop: Add 6 machines to touchpad led quirk
Add the following machines into quirk,
Isnpiron 5420, Isnpiron 5520, Isnpiron 5720,
Isnpiron 7420, Isnpiron 7520, Isnpiron 7720
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Marek Vasut [Wed, 4 Jul 2012 23:30:10 +0000 (01:30 +0200)]
ACER: Fix Smatch double-free issue
The patch
6ae3a0876185: "ACER: Add support for accelerometer sensor"
from Jun 1, 2012, leads to the following Smatch warning:
drivers/platform/x86/acer-wmi.c:1886 acer_wmi_accel_destroy()
error: don't call input_free_device() after input_unregister_device()
drivers/platform/x86/acer-wmi.c
1883 static void acer_wmi_accel_destroy(void)
1884 {
1885 input_unregister_device(acer_wmi_accel_dev);
1886 input_free_device(acer_wmi_accel_dev);
1887 }
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Fengguang Wu <wfg@linux.intel.com>
Cc: joeyli <jlee@suse.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Marek Vasut [Wed, 4 Jul 2012 23:30:09 +0000 (01:30 +0200)]
ACER: Fix up sparse warning
drivers/platform/x86/acer-wmi.c:1836:18: sparse: Using plain integer as NULL pointer
drivers/platform/x86/acer-wmi.c:1836:
1833
1834 BUG_ON(!name || !ah);
1835
> 1836 handle = 0;
1837 status = acpi_get_devices(prop, acer_wmi_get_handle_cb,
1838 (void *)name, &handle);
1839
Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Fengguang Wu <wfg@linux.intel.com>
Cc: joeyli <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
AceLan Kao [Wed, 4 Jul 2012 07:20:14 +0000 (15:20 +0800)]
asus-nb-wmi: add some video toggle keys
There are some new video switch keys that used by newer machines.
0xA0 - SDSP HDMI only
0xA1 - SDSP LCD + HDMI
0xA2 - SDSP CRT + HDMI
0xA3 - SDSP TV + HDMI
But in Linux, there is no suitable userspace application to handle this,
so, mapping them all to KEY_SWITCHVIDEOMODE.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
AceLan Kao [Wed, 4 Jul 2012 03:19:08 +0000 (11:19 +0800)]
asus-nb-wmi: add wapf quirk for ASUS machines
The BIOS of these machines will try to enable/disable wifi/bt in
their own sqeuence. It won't read the enable/disable parameter
in WMI command, but just iterates the wifi/bt's status described below
1st. enable wifi, enable bt
2nd. disable wifi, enable bt
3rd. enable wifi, disable bt
4th. disable wifi, disable bt
That will totally mess up the rfkill status, since we will try to read
wifi and bt's status and reset it again while booting up.
To avoid this, these machines should set the wapf value to 4,
that will let software totally control the wifi/bt's status and
BIOS will do nothing instead of sending out the 0x88(KEY_RFKILL) event
instead of 0x5e(wifi enable), 0x5f(wifi diable), 0x7d(bt enable), and
0x7e(bt disable) through WMI.
With this patch[1], it will handle the KEY_RFKILL event correctly and
will block/unblock wifi and bt together.
1. https://lkml.org/lkml/2012/5/21/75
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Miguel Gómez [Tue, 24 Jul 2012 13:05:25 +0000 (15:05 +0200)]
classmate-laptop: Fix extra keys hardware id.
Since ACPI devices ids were changed to use always upper-case letters, the ACPI
id of the extra keys (FNBT0000) was not maching the one defined in the driver
(FnBT0000), causing the extra keys not to work.
The patch replaces the driver id with the one reported by ACPI, fixing the
problem.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Miguel Gómez [Fri, 29 Jun 2012 13:39:48 +0000 (15:39 +0200)]
classmate-laptop: Add support for Classmate V4 accelerometer.
Classmate V4 laptop includes a new accelerometer that can't be handled by
previous driver. This patch adds a new driver to handle it.
[mjg: Fixed up the driver pm stuff]
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
AceLan Kao [Wed, 13 Jun 2012 07:32:07 +0000 (09:32 +0200)]
asus-wmi: enable resume on lid open
According to the ASUS WMI spec., to enable resume on lid open should
use the device ID(0x00120032), but it doesn't work indeed.
After discussing with ASUS' BIOS engineer, they say wake on lid open
doesn't have a uniq device ID(0x00120032) in the BIOS. It shares the same
device ID with deep S3(0x00120031), and the deep S3(resume on lid open)
is disable by default.
Adding this option in asus wmi sysfs
/sys/devices/platform/<platform>/lid_resume
so that userspace apps can enable/disable this feature by themselves.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
AceLan Kao [Wed, 13 Jun 2012 07:32:06 +0000 (09:32 +0200)]
asus-wmi: control backlight power through WMI, not ACPI
BugLink: https://bugs.launchpad.net/bugs/1000146
Some h/w that can adjust screen brightness through ACPI functions, but
can't turn on/off the backlight power correctly. So, we list those h/w in
quirks and try to turn on/off the backlight power through WMI.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Wed, 13 Jun 2012 07:32:05 +0000 (09:32 +0200)]
samsung-laptop: support R40/R41
> Chassis Information
> Manufacturer: SAMSUNG ELECTRONICS CO., LTD.
> Type: Other
Type should be "Notebook", "Laptop", .. not "Other".
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Wed, 13 Jun 2012 07:32:04 +0000 (09:32 +0200)]
acpi/video_detect: blacklist samsung x360
On Samsung X360, the BIOS will set a flag (VDRV) if the generic
ACPI backlight device is used. This flag will definitively break
the backlight interface (even the vendor interface) untill next
reboot. It's why we should prevent video.ko from being used here
and we can't rely on a later call to acpi_video_unregister().
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Wed, 13 Jun 2012 07:32:03 +0000 (09:32 +0200)]
samsung-laptop: X360 ACPI backlight device is broken
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Wed, 13 Jun 2012 07:32:02 +0000 (09:32 +0200)]
drivers-platform-x86: use acpi_video_dmi_promote_vendor()
Instead of using directly acpi_video_unregister(), use
acpi_video_dmi_promote_vendor() (and make it call
acpi_video_unregister() if needed)
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Wed, 13 Jun 2012 07:32:01 +0000 (09:32 +0200)]
acpi: add a way to promote/demote vendor backlight drivers
Instead of adding a big blacklist in video_detect.c to set
ACPI_VIDEO_BACKLIGHT_DMI_VENDOR correctly, let external modules
promote or demote themselves when they know the generic video
module won't work.
Currently drivers where using acpi_video_unregister() directly
but:
- That didn't respect any acpi_backlight=[video|vendor] parameter
provided by the user.
- Any later call to acpi_video_register() would still re-load the
generic video module (and some gpu drivers are doing that).
This patch fix those two issues.
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Marek Vasut [Fri, 1 Jun 2012 17:11:22 +0000 (19:11 +0200)]
ACER: Add support for accelerometer sensor
This device is present on Iconia Tab W500.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: joeyli <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Alex Hung [Wed, 20 Jun 2012 03:47:35 +0000 (11:47 +0800)]
asus-wmi: use ASUS_WMI_METHODID_DSTS2 as default DSTS ID.
According to responses from the BIOS team, ASUS_WMI_METHODID_DSTS2
(0x53545344) will be used as future DSTS ID. In addition, calling
asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL) returns
ASUS_WMI_UNSUPPORTED_METHOD in new ASUS laptop PCs. This patch fixes
no DSTS ID will be assigned in this case.
Signed-off-by: Alex Hung <alex.hung@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: stable@kernel.org
Linus Torvalds [Sat, 28 Jul 2012 03:52:25 +0000 (20:52 -0700)]
Merge tag 'ext4_for_linus' of git://git./linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o:
"The usual collection of bug fixes and optimizations. Perhaps of
greatest note is a speed up for parallel, non-allocating DIO writes,
since we no longer take the i_mutex lock in that case.
For bug fixes, we fix an incorrect overhead calculation which caused
slightly incorrect results for df(1) and statfs(2). We also fixed
bugs in the metadata checksum feature."
* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (23 commits)
ext4: undo ext4_calc_metadata_amount if we fail to claim space
ext4: don't let i_reserved_meta_blocks go negative
ext4: fix hole punch failure when depth is greater than 0
ext4: remove unnecessary argument from __ext4_handle_dirty_metadata()
ext4: weed out ext4_write_super
ext4: remove unnecessary superblock dirtying
ext4: convert last user of ext4_mark_super_dirty() to ext4_handle_dirty_super()
ext4: remove useless marking of superblock dirty
ext4: fix ext4 mismerge back in January
ext4: remove dynamic array size in ext4_chksum()
ext4: remove unused variable in ext4_update_super()
ext4: make quota as first class supported feature
ext4: don't take the i_mutex lock when doing DIO overwrites
ext4: add a new nolock flag in ext4_map_blocks
ext4: split ext4_file_write into buffered IO and direct IO
ext4: remove an unused statement in ext4_mb_get_buddy_page_lock()
ext4: fix out-of-date comments in extents.c
ext4: use s_csum_seed instead of i_csum_seed for xattr block
ext4: use proper csum calculation in ext4_rename
ext4: fix overhead calculation used by ext4_statfs()
...
Linus Torvalds [Fri, 27 Jul 2012 22:14:26 +0000 (15:14 -0700)]
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM updates from Russell King:
"First ARM push of this merge window, post me coming back from holiday.
This is what has been in linux-next for the last few weeks. Not much
to say which isn't described by the commit summaries."
* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (32 commits)
ARM: 7463/1: topology: Update cpu_power according to DT information
ARM: 7462/1: topology: factorize the update of sibling masks
ARM: 7461/1: topology: Add arch_scale_freq_power function
ARM: 7456/1: ptrace: provide separate functions for tracing syscall {entry,exit}
ARM: 7455/1: audit: move syscall auditing until after ptrace SIGTRAP handling
ARM: 7454/1: entry: don't bother with syscall tracing on ret_from_fork path
ARM: 7453/1: audit: only allow syscall auditing for pure EABI userspace
ARM: 7452/1: delay: allow timer-based delay implementation to be selected
ARM: 7451/1: arch timer: implement read_current_timer and get_cycles
ARM: 7450/1: dcache: select DCACHE_WORD_ACCESS for little-endian ARMv6+ CPUs
ARM: 7449/1: use generic strnlen_user and strncpy_from_user functions
ARM: 7448/1: perf: remove arm_perf_pmu_ids global enumeration
ARM: 7447/1: rwlocks: remove unused branch labels from trylock routines
ARM: 7446/1: spinlock: use ticket algorithm for ARMv6+ locking implementation
ARM: 7445/1: mm: update CONTEXTIDR register to contain PID of current process
ARM: 7444/1: kernel: add arch-timer C3STOP feature
ARM: 7460/1: remove asm/locks.h
ARM: 7439/1: head.S: simplify initial page table mapping
ARM: 7437/1: zImage: Allow DTB command line concatenation with ATAG_CMDLINE
ARM: 7436/1: Do not map the vectors page as write-through on UP systems
...
Russell King [Fri, 27 Jul 2012 22:06:32 +0000 (23:06 +0100)]
Merge branches 'audit', 'delay', 'fixes', 'misc' and 'sta2x11' into for-linus
David S. Miller [Fri, 27 Jul 2012 21:25:40 +0000 (14:25 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless
John W. Linville says:
====================
These fixes are intended for the 3.6 stream.
Hauke Mehrtens provides a pair of bcma fixes, one to fix a build
regression on mips and another to correct a pair of missing iounmap
calls.
Thomas Huehn offers a mac80211_hwsim fix to avoid a possible
use-after-free bug.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Henrik Rydberg [Fri, 27 Jul 2012 18:12:46 +0000 (20:12 +0200)]
hwmon: (applesmc) Decode and act on read/write status codes
The behavior of the SMC has changed several times over the years,
causing read failures in the driver. It seems the problem can be
explained by a shift in SMC speed combined with improper action on
status codes.
We should first wait for the SMC to settle, which was the most
frequent response on the old slow machines. Then, if the SMC is busy,
we need to try again later by resending the command. This was the most
likely response until 2012. Now, with a shorter wait time, we are
again most likely to poll while the SMC is settling, and as a result
we see high failure rates on many old and new models.
With the distinction between busy and failure, we can also wait longer
before retrying, without sacrificing speed. This seems to bring
failures down to virtually zero on all models.
Tested on: MBA1,1 MBA3,1 MBA5,1 MBA5,2 MBP9,2
Tested-by: Adam Somerville <adamsomerville@gmail.com>
Tested-by: Hubert Eichner <hubert.georg.eichner@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Jean Delvare [Thu, 26 Jul 2012 20:18:43 +0000 (22:18 +0200)]
hwmon: (jc42) Don't reset hysteresis on device removal
Restoring the configuration register on device removal has the side
effect of also resetting the hysteresis value. This is inconsistent as
the other limits are not reset, only hysteresis. So, following the
principle of least surprise, preserve the hysteresis value when
restoring the configuration register.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Jean Delvare [Thu, 26 Jul 2012 20:13:47 +0000 (22:13 +0200)]
hwmon: (jc42) Simplify hysteresis mask
Define JC42_CFG_HYST_MASK as the mask _before_ shifting instead of
after shifting. This simplifies the current code slightly, and will
simplify the code to come even more.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Guenter Roeck [Fri, 27 Jul 2012 14:11:32 +0000 (07:11 -0700)]
hwmon: (acpi_power_meter) Fix build warning
Commit
c5dec0182256361a3f823316e8fb85263f76efe7 (acpi_power_meter: Use struct
dev_pm_ops for power management) introduced the following build warning. It is
seen if CONFIG_PM_SLEEP is not defined.
acpi_power_meter.c:930:12: warning: acpi_power_meter_resume defined but not used
Fix it.
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Jiri Kosina [Fri, 27 Jul 2012 10:38:50 +0000 (10:38 +0000)]
tcp: perform DMA to userspace only if there is a task waiting for it
Back in 2006, commit
1a2449a87b ("[I/OAT]: TCP recv offload to I/OAT")
added support for receive offloading to IOAT dma engine if available.
The code in tcp_rcv_established() tries to perform early DMA copy if
applicable. It however does so without checking whether the userspace
task is actually expecting the data in the buffer.
This is not a problem under normal circumstances, but there is a corner
case where this doesn't work -- and that's when MSG_TRUNC flag to
recvmsg() is used.
If the IOAT dma engine is not used, the code properly checks whether
there is a valid ucopy.task and the socket is owned by userspace, but
misses the check in the dmaengine case.
This problem can be observed in real trivially -- for example 'tbench' is a
good reproducer, as it makes a heavy use of MSG_TRUNC. On systems utilizing
IOAT, you will soon find tbench waiting indefinitely in sk_wait_data(), as they
have been already early-copied in tcp_rcv_established() using dma engine.
This patch introduces the same check we are performing in the simple
iovec copy case to the IOAT case as well. It fixes the indefinite
recvmsg(MSG_TRUNC) hangs.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Gross [Fri, 27 Jul 2012 10:19:40 +0000 (10:19 +0000)]
Revert "openvswitch: potential NULL deref in sample()"
This reverts commit
5b3e7e6cb5771bedda51cdb6f715d1da8cd9e644.
The problem that the original commit was attempting to fix can
never happen in practice because validation is done one a per-flow
basis rather than a per-packet basis. Adding additional checks at
runtime is unnecessary and inconsistent with the rest of the code.
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 27 Jul 2012 06:23:40 +0000 (06:23 +0000)]
ipv4: fix TCP early demux
commit
92101b3b2e317 (ipv4: Prepare for change of rt->rt_iif encoding.)
invalidated TCP early demux, because rx_dst_ifindex is not properly
initialized and checked.
Also remove the use of inet_iif(skb) in favor or skb->skb_iif
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Benc [Fri, 27 Jul 2012 02:58:22 +0000 (02:58 +0000)]
net: fix rtnetlink IFF_PROMISC and IFF_ALLMULTI handling
When device flags are set using rtnetlink, IFF_PROMISC and IFF_ALLMULTI
flags are handled specially. Function dev_change_flags sets IFF_PROMISC and
IFF_ALLMULTI bits in dev->gflags according to the passed value but
do_setlink passes a result of rtnl_dev_combine_flags which takes those bits
from dev->flags.
This can be easily trigerred by doing:
tcpdump -i eth0 &
ip l s up eth0
ip sets IFF_UP flag in ifi_flags and ifi_change, which is combined with
IFF_PROMISC by rtnl_dev_combine_flags, causing __dev_change_flags to set
IFF_PROMISC in gflags.
Reported-by: Max Matveev <makc@redhat.com>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Fri, 27 Jul 2012 01:46:51 +0000 (01:46 +0000)]
USB: kaweth.c: use GFP_ATOMIC under spin_lock
The problem is that we call this with a spin lock held. The call tree
is:
kaweth_start_xmit() holds kaweth->device_lock.
-> kaweth_async_set_rx_mode()
-> kaweth_control()
-> kaweth_internal_control_msg()
The kaweth_internal_control_msg() function is only called from
kaweth_control() which used GFP_ATOMIC for its allocations.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hangbin Liu [Thu, 26 Jul 2012 22:52:21 +0000 (22:52 +0000)]
tcp: Add TCP_USER_TIMEOUT negative value check
TCP_USER_TIMEOUT is a TCP level socket option that takes an unsigned int. But
patch "tcp: Add TCP_USER_TIMEOUT socket option"(
dca43c75) didn't check the negative
values. If a user assign -1 to it, the socket will set successfully and wait
for
4294967295 miliseconds. This patch add a negative value check to avoid
this issue.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Fri, 27 Jul 2012 19:52:03 +0000 (12:52 -0700)]
Merge tag 'tty-3.6-rc1' of git://git./linux/kernel/git/gregkh/tty
Pull TTY/Serial patches from Greg Kroah-Hartman:
"Here's the "tiny" set of patches for 3.6-rc1 for the tty layer and
serial drivers. They were cherry-picked from the tty-next branch of
the tty git tree, as they are small and "obvious" fixes. The larger
changes, as mentioned before, will be saved for the 3.7-rc1 merge
window.
All of these changes have been in the linux-next releases for quite a
while.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'tty-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
pch_uart: Fix parity setting issue
pch_uart: Fix rx error interrupt setting issue
pch_uart: Fix missing break for 16 byte fifo
tty ldisc: Close/Reopen race prevention should check the proper flag
pch_uart: Add eg20t_port lock field, avoid recursive spinlocks
vt: fix race in vt_waitactive()
serial/of-serial: Add LPC3220 standard UART compatible string
serial/8250: Add LPC3220 standard UART type
serial_core: Update buffer overrun statistics.
serial: samsung: Fixed wrong comparison for baudclk_rate
Linus Torvalds [Fri, 27 Jul 2012 18:26:48 +0000 (11:26 -0700)]
Merge branch 'kmap_atomic' of git://github.com/congwang/linux
Pull final kmap_atomic cleanups from Cong Wang:
"This should be the final round of cleanup, as the definitions of enum
km_type finally get removed from the whole tree. The patches have
been in linux-next for a long time."
* 'kmap_atomic' of git://github.com/congwang/linux:
pipe: remove KM_USER0 from comments
vmalloc: remove KM_USER0 from comments
feature-removal-schedule.txt: remove kmap_atomic(page, km_type)
tile: remove km_type definitions
um: remove km_type definitions
asm-generic: remove km_type definitions
avr32: remove km_type definitions
frv: remove km_type definitions
powerpc: remove km_type definitions
arm: remove km_type definitions
highmem: remove the deprecated form of kmap_atomic
tile: remove usage of enum km_type
frv: remove the second parameter of kmap_atomic_primary()
jbd2: remove the second argument of kmap_atomic
Linus Torvalds [Fri, 27 Jul 2012 15:35:26 +0000 (08:35 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt:
"Here's a handful of powerpc patches, a couple of regression fixes for
problems introduced in the main batch in this merge window, a couple
of defconfig updates, and some trivials.
The radeonfb one is something that was long standing in SLES which I
forgot to pickup earlier."
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/ftrace: Trace function graph entry before updating index
radeonfb: Add quirk for the graphics adapter in some JSxx
powerpc: Lack of firmware flash support is not an error
powerpc: Enable pseries hardware RNG and crypto modules
powerpc: Update g5_defconfig
powerpc/kvm/bookehv: Fix build regression
powerpc: Set stack limit properly in crit_transfer_to_handler
Linus Torvalds [Fri, 27 Jul 2012 15:34:16 +0000 (08:34 -0700)]
Merge tag 'cpumask-for-linus' of git://git./linux/kernel/git/rusty/linux-2.6-for-linus
Pull cpumask changes from Rusty Russell:
"Trivial comment changes to cpumask code. I guess it's getting boring."
Boring is good.
* tag 'cpumask-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
cpumask: cpulist_parse() comments correction
init: add comments to keep initcall-names in sync with initcall levels
cpumask: add a few comments of cpumask functions
John W. Linville [Fri, 27 Jul 2012 15:15:03 +0000 (11:15 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem
Alasdair G Kergon [Fri, 27 Jul 2012 14:08:16 +0000 (15:08 +0100)]
dm thin: commit before gathering status
Commit outstanding metadata before returning the status for a dm thin
pool so that the numbers reported are as up-to-date as possible.
The commit is not performed if the device is suspended or if
the DM_NOFLUSH_FLAG is supplied by userspace and passed to the target
through a new 'status_flags' parameter in the target's dm_status_fn.
The userspace dmsetup tool will support the --noflush flag with the
'dmsetup status' and 'dmsetup wait' commands from version 1.02.76
onwards.
Tested-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:16 +0000 (15:08 +0100)]
dm thin: add read only and fail io modes
Add read-only and fail-io modes to thin provisioning.
If a transaction commit fails the pool's metadata device will transition
to "read-only" mode. If a commit fails once already in read-only mode
the transition to "fail-io" mode occurs.
Once in fail-io mode the pool and all associated thin devices will
report a status of "Fail".
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:15 +0000 (15:08 +0100)]
dm thin metadata: introduce dm_pool_abort_metadata
Introduce dm_pool_abort_metadata to abort the current metadata
transaction. Generally this will only be called when bad things are
happening and dm-thin is trying to roll back to a good state for
read-only mode.
It's complicated by the fact that the metadata device may have failed
completely causing the abort to be unable to read the old transaction.
In this case the metadata object is placed in a 'fail' mode and
everything fails apart from destroying it.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:15 +0000 (15:08 +0100)]
dm thin metadata: introduce dm_pool_metadata_set_read_only
Introduce dm_pool_metadata_set_read_only to put the underlying block
manager into read-only mode.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:15 +0000 (15:08 +0100)]
dm persistent data: introduce dm_bm_set_read_only
Introduce dm_bm_set_read_only to switch the block manager into a
read-only mode. To be used when dm-thin degrades due to io errors on
the metadata device.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:14 +0000 (15:08 +0100)]
dm thin: reduce number of metadata commits
Reduce the number of metadata commits by using
dm_thin_changed_this_transaction to check if metadata was changed on a
per thin device granularity.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:14 +0000 (15:08 +0100)]
dm thin metadata: add dm_thin_changed_this_transaction
Introduce dm_thin_changed_this_transaction to dm-thin-metadata to publish a
useful bit of information we're already tracking. This will help dm thin
decide when to commit.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:14 +0000 (15:08 +0100)]
dm thin metadata: add format option to dm_pool_metadata_open
Add a parameter to dm_pool_metadata_open to indicate whether or not an
unformatted metadata area should be formatted.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:14 +0000 (15:08 +0100)]
dm thin metadata: tidy up open and format error paths
Tidy up error path in __open_metadata and __format_metadata in dm-thin-metadata.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Mike Snitzer [Fri, 27 Jul 2012 14:08:13 +0000 (15:08 +0100)]
dm thin metadata: only check incompat features on open
Factor out __check_incompat_features and only call it once when we open
the metadata device rather than at the beginning of every transaction.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:13 +0000 (15:08 +0100)]
dm thin metadata: remove duplicate pmd initialisation
Remove some duplicate initialisation of struct dm_pool_metadata.
These pmd fields are initialised by both:
__format_metadata's calls to dm_btree_empty
__write_initial_superblock + __begin_transaction
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:13 +0000 (15:08 +0100)]
dm thin metadata: remove create parameter from __create_persistent_data_objects
Remove 'create' parameter from __create_persistent_data_objects() in dm-thin-metadata.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:13 +0000 (15:08 +0100)]
dm thin metadata: move __superblock_all_zeroes to __open_or_format_metadata
Move the check for __superblock_all_zeroes from
__create_persistent_data_objects() down to __open_or_format_metadata in
dm-thin-metadata.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:12 +0000 (15:08 +0100)]
dm thin metadata: remove nr_blocks arg from __create_persistent_data_objects
Remove nr_blocks arg from __create_persistent_data_objects in dm-thin-metadata.
It was always passed as zero.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:12 +0000 (15:08 +0100)]
dm thin metadata: split __open or format metadata
Split __open_or_format_metadata into __format_metadata and __open_metadata in
dm-thin-metadata.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:12 +0000 (15:08 +0100)]
dm thin metadata: use struct dm_pool_metadata members in __open_or_format_metadata
Clean up __open_or_format_metadata in dm-thin-metadata by using struct
dm_pool_metadata members to replace local variables.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Fri, 27 Jul 2012 14:08:11 +0000 (15:08 +0100)]
dm thin metadata: zero unused superblock uuid
Zero the unused uuid when initialising the metadata superblock.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>