If drivers try to obtain pinctrl handles for a pin controller that
has not yet registered to the subsystem, we need to be able to
back out and retry with deferred probing. So let's return
-EPROBE_DEFER whenever this location fails.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
commit 23289e6ecc6d ("pinctrl: core device tree mapping table
parsing support") caused a build failure on PPC:
drivers/pinctrl/devicetree.c: In function 'dt_free_map':
drivers/pinctrl/devicetree.c:44:42: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c:45:6: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c: In function 'dt_to_map_one_config':
drivers/pinctrl/devicetree.c:140:21: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c:141:10: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c:146:11: error: dereferencing pointer to incomplete type
This is probably because the Makefile for pinctrl contains this,
that makes a small piece of the implementation build and link
in isolation:
obj-$(CONFIG_OF) += devicetree.o
So let's use some local Kconfig option that depends on both OF
and PINCTRL so that this file is only compiled if you have
both enabled.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Viresh Kumar [Fri, 30 Mar 2012 05:55:40 +0000 (11:25 +0530)]
pinctrl: replace list_*() with get_*_count()
Most of the SoC drivers implement list_groups() and list_functions()
routines for pinctrl and pinmux. These routines continue returning
zero until the selector argument is greater than total count of
available groups or functions.
This patch replaces these list_*() routines with get_*_count()
routines, which returns the number of available selection for SoC
driver. pinctrl layer will use this value to check the range it can
choose.
This patch fixes all user drivers for this change. There are other
routines in user drivers, which have checks to check validity of
selector passed to them. It is also no more required and hence
removed.
Documentation updated as well.
Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
[Folded in fix and fixed a minor merge artifact manually] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Uwe Kleine-König [Fri, 30 Mar 2012 20:04:51 +0000 (22:04 +0200)]
pinctrl: mark const init data with __initconst instead of __initdata
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Stephen Warren [Fri, 23 Mar 2012 16:29:46 +0000 (10:29 -0600)]
pinctrl: core device tree mapping table parsing support
During pinctrl_get(), if the client device has a device tree node, look
for the common pinctrl properties there. If found, parse the referenced
device tree nodes, with the help of the pinctrl drivers, and generate
mapping table entries from them.
During pinctrl_put(), free any results of device tree parsing.
Stephen Warren [Fri, 16 Mar 2012 20:54:25 +0000 (14:54 -0600)]
pinctrl: implement pinctrl_check_ops
Most code assumes that the pinctrl ops are present. Validate this when
registering a pinctrl driver. Remove the one place in the code that
was checking whether one of these non-optional ops was present.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Stephen Warren [Fri, 16 Mar 2012 20:54:23 +0000 (14:54 -0600)]
pinctrl: include <linux/bug.h> to prevent compile errors
Macros in <linux/pinctrl/machine.h> call ARRAY_SIZE(), the definition of
which eventually calls BUILD_BUG_ON_ZERO(), which is defined in
<linux/bug.h>. Include that so that every .c file using the pinctrl macros
doesn't have to do that itself.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Torvalds [Sat, 31 Mar 2012 22:11:39 +0000 (15:11 -0700)]
Merge branch 's3-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/amit/virtio-console
Pull virtio S3 support patches from Amit Shah:
"Turns out S3 is not different from S4 for virtio devices: the device
is assumed to be reset, so the host and guest state are to be assumed
to be out of sync upon resume. We handle the S4 case with exactly the
same scenario, so just point the suspend/resume routines to the
freeze/restore ones.
Once that is done, we also use the PM API's macro to initialise the
sleep functions.
A couple of cleanups are included: there's no need for special thaw
processing in the balloon driver, so that's addressed in patches 1 and
2.
Testing: both S3 and S4 support have been tested using these patches
using a similar method used earlier during S4 patch development: a
guest is started with virtio-blk as the only disk, a virtio network
card, a virtio-serial port and a virtio balloon device. Ping from
guest to host, dd /dev/zero to a file on the disk, and IO from the
host on the virtio-serial port, all at once, while exercising S4 and
S3 (separately) were tested. They all continue to work fine after
resume. virtio balloon values too were tested by inflating and
deflating the balloon."
Pulling from Amit, since Rusty is off getting married (and presumably
shaving people).
* 's3-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/amit/virtio-console:
virtio-pci: switch to PM ops macro to initialise PM functions
virtio-pci: S3 support
virtio-pci: drop restore_common()
virtio: drop thaw PM operation
virtio: balloon: Allow stats update after restore from S4
Linus Torvalds [Sat, 31 Mar 2012 20:42:57 +0000 (13:42 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull second try at vfs part d#2 from Al Viro:
"Miklos' first series (with do_lookup() rewrite split into edible
chunks) + assorted bits and pieces.
The 'untangling of do_lookup()' series is is a splitup of what used to
be a monolithic patch from Miklos, so this series is basically "how do
I convince myself that his patch is correct (or find a hole in it)".
No holes found and I like the resulting cleanup, so in it went..."
Changes from try 1: Fix a boot problem with selinux, and commit messages
prettied up a bit.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (24 commits)
vfs: fix out-of-date dentry_unhash() comment
vfs: split __lookup_hash
untangling do_lookup() - take __lookup_hash()-calling case out of line.
untangling do_lookup() - switch to calling __lookup_hash()
untangling do_lookup() - merge d_alloc_and_lookup() callers
untangling do_lookup() - merge failure exits in !dentry case
untangling do_lookup() - massage !dentry case towards __lookup_hash()
untangling do_lookup() - get rid of need_reval in !dentry case
untangling do_lookup() - eliminate a loop.
untangling do_lookup() - expand the area under ->i_mutex
untangling do_lookup() - isolate !dentry stuff from the rest of it.
vfs: move MAY_EXEC check from __lookup_hash()
vfs: don't revalidate just looked up dentry
vfs: fix d_need_lookup/d_revalidate order in do_lookup
ext3: move headers to fs/ext3/
migrate ext2_fs.h guts to fs/ext2/ext2.h
new helper: ext2_image_size()
get rid of pointless includes of ext2_fs.h
ext2: No longer export ext2_fs.h to user space
mtdchar: kill persistently held vfsmount
...
Linus Torvalds [Sat, 31 Mar 2012 20:35:31 +0000 (13:35 -0700)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar.
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched: Fix incorrect usage of for_each_cpu_mask() in select_fallback_rq()
sched: Fix __schedule_bug() output when called from an interrupt
sched/arch: Introduce the finish_arch_post_lock_switch() scheduler callback
So, those who wish to specify raw events can now use the following
event format:
-e cpu/cmask=1,event=2,umask=3
Most people will not want to specify any events (let alone raw
events), they'll just use whatever default event the tools use.
But for more obscure PMU events that have no cross-architecture
generic events the above syntax is more usable and a bit more
structured than specifying hex numbers."
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits)
perf tools: Remove auto-generated bison/flex files
perf annotate: Fix off by one symbol hist size allocation and hit accounting
perf tools: Add missing ref-cycles event back to event parser
perf annotate: addr2line wants addresses in same format as objdump
perf probe: Finder fails to resolve function name to address
tracing: Fix ent_size in trace output
perf symbols: Handle NULL dso in dso__name_len
perf symbols: Do not include libgen.h
perf tools: Fix bug in raw sample parsing
perf tools: Fix display of first level of callchains
perf tools: Switch module.h into export.h
perf: Move mmap page data_head offset assertion out of header
perf: Fix mmap_page capabilities and docs
perf diff: Fix to work with new hists design
perf tools: Fix modifier to be applied on correct events
perf tools: Fix various casting issues for 32 bits
perf tools: Simplify event_read_id exit path
tracing: Fix ftrace stack trace entries
tracing: Move the tracing_on/off() declarations into CONFIG_TRACING
perf report: Add a simple GTK2-based 'perf report' browser
...
Linus Torvalds [Sat, 31 Mar 2012 20:32:30 +0000 (13:32 -0700)]
Merge tag 'parisc-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
Pull PARISC misc updates from James Bottomley:
"This is a couple of minor updates (fixing lws futex locking and
removing some obsolete cpu_*_map calls)."
* tag 'parisc-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
[PARISC] remove references to cpu_*_map.
[PARISC] futex: Use same lock set as lws calls
Linus Torvalds [Sat, 31 Mar 2012 20:31:23 +0000 (13:31 -0700)]
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Pull SCSI updates from James Bottomley:
"This is primarily another round of driver updates (lpfc, bfa, fcoe,
ipr) plus a new ufshcd driver. There shouldn't be anything
controversial in here (The final deletion of scsi proc_ops which
caused some build breakage has been held over until the next merge
window to give us more time to stabilise it).
I'm afraid, with me moving continents at exactly the wrong time,
anything submitted after the merge window opened has been held over to
the next merge window."
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (63 commits)
[SCSI] ipr: Driver version 2.5.3
[SCSI] ipr: Increase alignment boundary of command blocks
[SCSI] ipr: Increase max concurrent oustanding commands
[SCSI] ipr: Remove unnecessary memory barriers
[SCSI] ipr: Remove unnecessary interrupt clearing on new adapters
[SCSI] ipr: Fix target id allocation re-use problem
[SCSI] atp870u, mpt2sas, qla4xxx use pci_dev->revision
[SCSI] fcoe: Drop the rtnl_mutex before calling fcoe_ctlr_link_up
[SCSI] bfa: Update the driver version to 3.0.23.0
[SCSI] bfa: BSG and User interface fixes.
[SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario.
[SCSI] bfa: Move service parameter programming logic into firmware.
[SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation.
[SCSI] bfa: Flash controller IOC pll init fixes.
[SCSI] bfa: Serialize the IOC hw semaphore unlock logic.
[SCSI] bfa: Modify ISR to process pending completions
[SCSI] bfa: Add fc host issue lip support
[SCSI] mpt2sas: remove extraneous sas_log_info messages
[SCSI] libfc: fcoe_transport_create fails in single-CPU environment
[SCSI] fcoe: reduce contention for fcoe_rx_list lock [v2]
...
Al Viro [Fri, 30 Mar 2012 18:18:50 +0000 (14:18 -0400)]
untangling do_lookup() - get rid of need_reval in !dentry case
Everything arriving into if (!dentry) will have need_reval = 1.
Indeed, the only way to get there with need_reval reset to 0 would
be via
if (unlikely(d_need_lookup(dentry)))
goto unlazy;
if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE)) {
status = d_revalidate(dentry, nd);
if (unlikely(status <= 0)) {
if (status != -ECHILD)
need_reval = 0;
goto unlazy;
...
unlazy:
/* no assignments to dentry */
if (dentry && unlikely(d_need_lookup(dentry))) {
dput(dentry);
dentry = NULL;
}
and if d_need_lookup() had already been false the first time around, it
will remain false on the second call as well.
Al Viro [Fri, 30 Mar 2012 18:13:15 +0000 (14:13 -0400)]
untangling do_lookup() - eliminate a loop.
d_lookup() *will* fail after successful d_invalidate(), if we are
holding i_mutex all along. IOW, we don't need to jump back to
l: - we know what path will be taken there and can do that (i.e.
d_alloc_and_lookup()) directly.
Al Viro [Fri, 30 Mar 2012 18:04:16 +0000 (14:04 -0400)]
untangling do_lookup() - isolate !dentry stuff from the rest of it.
Duplicate the revalidation-related parts into if (!dentry) branch.
Next step will be to pull them under i_mutex.
This and the next 8 commits are more or less a splitup of patch
by Miklos; folks, when you are working with something that convoluted,
carve your patches up into easily reviewed steps, especially when
a lot of codepaths involved are rarely hit...
Al Viro [Fri, 23 Mar 2012 20:36:45 +0000 (16:36 -0400)]
new helper: ext2_image_size()
... implemented that way since the next commit will leave it
almost alone in ext2_fs.h - most of the file (including
struct ext2_super_block) is going to move to fs/ext2/ext2.h.
Thierry Reding [Fri, 23 Mar 2012 09:27:36 +0000 (10:27 +0100)]
ext2: No longer export ext2_fs.h to user space
Since the on-disk format has been stable for quite some time, users
should either use the headers provided by libext2fs or keep a private
copy of this header. For the full discussion, see this thread:
https://lkml.org/lkml/2012/3/21/516
While at it, this commit removes all __KERNEL__ guards, which are now
unnecessary.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jan Kara <jack@suse.cz> Cc: Ted Ts'o <tytso@mit.edu> Cc: Artem Bityutskiy <dedekind1@gmail.com> Cc: Andreas Dilger <aedilger@gmail.com> Cc: linux-ext4@vger.kernel.org
Al Viro [Fri, 23 Mar 2012 17:47:52 +0000 (13:47 -0400)]
mtdchar: kill persistently held vfsmount
... and mtdchar_notifier along with it; just have ->drop_inode() that
will unconditionally get evict them instead of dances on mtd device
removal and use simple_pin_fs() instead of kern_mount()
Matthew Garrett [Tue, 27 Mar 2012 14:17:41 +0000 (10:17 -0400)]
ASPM: Fix pcie devices with non-pcie children
Since 3.2.12 and 3.3, some systems are failing to boot with a BUG_ON.
Some other systems using the pata_jmicron driver fail to boot because no
disks are detected. Passing pcie_aspm=force on the kernel command line
works around it.
The cause: commit 4949be16822e ("PCI: ignore pre-1.1 ASPM quirking when
ASPM is disabled") changed the behaviour of pcie_aspm_sanity_check() to
always return 0 if aspm is disabled, in order to avoid cases where we
changed ASPM state on pre-PCIe 1.1 devices.
This skipped the secondary function of pcie_aspm_sanity_check which was
to avoid us enabling ASPM on devices that had non-PCIe children, causing
trouble later on. Move the aspm_disabled check so we continue to honour
that scenario.
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=42979 and
http://bugs.debian.org/665420
Reported-by: Romain Francoise <romain@orebokech.com> # kernel panic Reported-by: Chris Holland <bandidoirlandes@gmail.com> # disk detection trouble Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: stable@vger.kernel.org Tested-by: Hatem Masmoudi <hatem.masmoudi@gmail.com> # Dell Latitude E5520 Tested-by: janek <jan0x6c@gmail.com> # pata_jmicron with JMB362/JMB363
[jn: with more symptoms in log message] Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 31 Mar 2012 18:12:57 +0000 (11:12 -0700)]
selinux: inline avc_audit() and avc_has_perm_noaudit() into caller
Now that all the slow-path code is gone from these functions, we can
inline them into the main caller - avc_has_perm_flags().
Now the compiler can see that 'avc' is allocated on the stack for this
case, which helps register pressure a bit. It also actually shrinks the
total stack frame, because the stack frame that avc_has_perm_flags()
always needed (for that 'avc' allocation) is now sufficient for the
inlined functions too.
Inlining isn't bad - but mindless inlining of cold code (see the
previous commit) is.
Linus Torvalds [Sat, 31 Mar 2012 17:58:08 +0000 (10:58 -0700)]
selinux: don't inline slow-path code into avc_has_perm_noaudit()
The selinux AVC paths remain some of the hottest (and deepest) codepaths
at filename lookup time, and we make it worse by having the slow path
cases take up I$ and stack space even when they don't trigger. Gcc
tends to always want to inline functions that are just called once -
never mind that this might make for slower and worse code in the caller.
So this tries to improve on it a bit by making the slow-path cases
explicitly separate functions that are marked noinline, causing gcc to
at least no longer allocate stack space for them unless they are
actually called. It also seems to help register allocation a tiny bit,
since gcc now doesn't take the slow case code into account.
Uninlining the slow path may also allow us to inline the remaining hot
path into the one caller that actually matters: avc_has_perm_flags().
I'll have to look at that separately, but both avc_audit() and
avc_has_perm_noaudit() are now small and lean enough that inlining them
may make sense.
Amit Shah [Thu, 29 Mar 2012 07:21:41 +0000 (12:51 +0530)]
virtio-pci: S3 support
There's no difference in supporting S3 and S4 for virtio devices: the
vqs have to be re-created as the device has to be assumed to be reset at
restore-time. Since S4 already handles this situation, we can directly
use the same code and callbacks for S3 support.
Amit Shah [Thu, 29 Mar 2012 07:18:19 +0000 (12:48 +0530)]
virtio: balloon: Allow stats update after restore from S4
There's no reason stats update after restore can't work. If a host
requested for stats, and before servicing the request, the guest entered
S4, upon restore, the stats request can still be processed and sent off
to the host.
Linus Torvalds [Sat, 31 Mar 2012 01:15:43 +0000 (18:15 -0700)]
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild changes from Michal Marek:
- Unification of cmd_uimage among archs that use it
- make headers_check tries harder before reporting a missing
<linux/types.h> include
- kbuild portability fix for shells that do not support echo -e
- make clean descends into samples/
- setlocalversion grep fix
- modpost typo fix
- dtc warnings fix
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
setlocalversion: Use "grep -q" instead of piping output to "read dummy"
modpost: fix ALL_INIT_DATA_SECTIONS
Kbuild: centralize MKIMAGE and cmd_uimage definitions
headers_check: recursively search for linux/types.h inclusion
scripts/Kbuild.include: Fix portability problem of "echo -e"
scripts: dtc: fix compile warnings
kbuild: clean up samples directory
kbuild: disable -Wmissing-field-initializers for W=1
Linus Torvalds [Sat, 31 Mar 2012 01:14:05 +0000 (18:14 -0700)]
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull non-critical part of kbuild from Michal Marek:
- New semantic patches, make coccicheck M= fix
- make gtags speedup
- make tags/TAGS always removes struct forward declarations
- make deb-pkg fixes (some patches are still pending, I know)
- scripts/patch-kernel fix from the last user of this script ;)
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts/patch-kernel: digest kernel.org hosted .xz patches
scripts/coccinelle/api/ptr_ret.cocci: semantic patch for ptr_err
scripts: refactor remove structure forward declarations
kbuild: incremental tags update for GNU Global
coccinelle: semantic patch for bool issues
coccinelle: semantic patch to check for PTR_ERR after reassignment
coccinelle: semantic patch converting 0 test to null test
coccinelle: semantic patch for missing iounmap
coccinelle: semantic patch for missing clk_put
kbuild: Fix out-of-tree build for 'make deb-pkg'
kbuild: Only build linux-image package for UML
kbuild: Fix link to headers in 'make deb-pkg'
coccicheck: change handling of C={1,2} when M= is set
Linus Torvalds [Sat, 31 Mar 2012 01:13:17 +0000 (18:13 -0700)]
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig bits from Michal Marek:
"There is one fix for make oldconfig by Arnaud and updates to the
merge_config.sh tool."
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
merge_config.sh: Add option to display redundant configs
merge_config.sh: Set execute bit
merge_config.sh: Use the first file as the initial config
kconfig: fix new choices being skipped upon config update
Linus Torvalds [Sat, 31 Mar 2012 01:08:05 +0000 (18:08 -0700)]
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull genirq updates from Thomas Gleixner.
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value
genirq: Respect NUMA node affinity in setup_irq_irq affinity()
genirq: Get rid of unneeded force parameter in irq_finalize_oneshot()
genirq: Minor readablity improvement in irq_wake_thread()
Linus Torvalds [Sat, 31 Mar 2012 01:07:13 +0000 (18:07 -0700)]
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core locking updates from Thomas Gleixner.
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
futex: Mark get_robust_list as deprecated
futex: Do not leak robust list to unprivileged process
Linus Torvalds [Sat, 31 Mar 2012 00:31:56 +0000 (17:31 -0700)]
Merge tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6
Pull MTD changes from David Woodhouse:
- Artem's cleanup of the MTD API continues apace.
- Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst
others.
- More work on DiskOnChip G3, new driver for DiskOnChip G4.
- Clean up debug/warning printks in JFFS2 to use pr_<level>.
Fix up various trivial conflicts, largely due to changes in calling
conventions for things like dmaengine_prep_slave_sg() (new inline
wrapper to hide new parameter, clashing with rewrite of previously last
parameter that used to be an 'append' flag, and is now a bitmap of
'unsigned long flags').
(Also some header file fallout - like so many merges this merge window -
and silly conflicts with sparse fixes)
* tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits)
mtd: docg3 add protection against concurrency
mtd: docg3 refactor cascade floors structure
mtd: docg3 increase write/erase timeout
mtd: docg3 fix inbound calculations
mtd: nand: gpmi: fix function annotations
mtd: phram: fix section mismatch for phram_setup
mtd: unify initialization of erase_info->fail_addr
mtd: support ONFI multi lun NAND
mtd: sm_ftl: fix typo in major number.
mtd: add device-tree support to spear_smi
mtd: spear_smi: Remove default partition information from driver
mtd: Add device-tree support to fsmc_nand
mtd: fix section mismatch for doc_probe_device
mtd: nand/fsmc: Remove sparse warnings and errors
mtd: nand/fsmc: Add DMA support
mtd: nand/fsmc: Access the NAND device word by word whenever possible
mtd: nand/fsmc: Use dev_err to report error scenario
mtd: nand/fsmc: Use devm routines
mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform
mtd: fsmc_nand: add pm callbacks to support hibernation
...
Linus Torvalds [Sat, 31 Mar 2012 00:00:34 +0000 (17:00 -0700)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull a few more ARM platform fixes from Olof Johansson:
"Apologies for back-to-back fixes pull requests, but one of the patches
below are the kind we'll see posted over and over if we don't send it
in. I hadn't done the full sanity-check of defconfig builds by the
time I sent up the other fixes yesterday or I would have included it
then.
Two patches, one dealing with the system.h fallout, the other is a
missing linux/bug.h in a place where ARRAY_SIZE() is used."
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: clps711x: fix missing include file
ARM: fix builds due to missing <asm/system_misc.h> includes
Linus Torvalds [Fri, 30 Mar 2012 23:45:38 +0000 (16:45 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & Power Management changes from Len Brown:
- ACPI 5.0 after-ripples, ACPICA/Linux divergence cleanup
- cpuidle evolving, more ARM use
- thermal sub-system evolving, ditto
- assorted other PM bits
Fix up conflicts in various cpuidle implementations due to ARM cpuidle
cleanups (ARM at91 self-refresh and cpu idle code rewritten into
"standby" in asm conflicting with the consolidation of cpuidle time
keeping), trivial SH include file context conflict and RCU tracing fixes
in generic code.
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (77 commits)
ACPI throttling: fix endian bug in acpi_read_throttling_status()
Disable MCP limit exceeded messages from Intel IPS driver
ACPI video: Don't start video device until its associated input device has been allocated
ACPI video: Harden video bus adding.
ACPI: Add support for exposing BGRT data
ACPI: export acpi_kobj
ACPI: Fix logic for removing mappings in 'acpi_unmap'
CPER failed to handle generic error records with multiple sections
ACPI: Clean redundant codes in scan.c
ACPI: Fix unprotected smp_processor_id() in acpi_processor_cst_has_changed()
ACPI: consistently use should_use_kmap()
PNPACPI: Fix device ref leaking in acpi_pnp_match
ACPI: Fix use-after-free in acpi_map_lsapic
ACPI: processor_driver: add missing kfree
ACPI, APEI: Fix incorrect APEI register bit width check and usage
Update documentation for parameter *notrigger* in einj.txt
ACPI, APEI, EINJ, new parameter to control trigger action
ACPI, APEI, EINJ, limit the range of einj_param
ACPI, APEI, Fix ERST header length check
cpuidle: power_usage should be declared signed integer
...
Linus Torvalds [Fri, 30 Mar 2012 23:24:38 +0000 (16:24 -0700)]
Merge git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French.
* git://git.samba.org/sfrench/cifs-2.6:
[CIFS] Update CIFS version number to 1.77
CIFS: Add missed forcemand mount option
[CIFS] Fix trivial sparse warning with asyn i/o patch
cifs: handle "sloppy" option appropriately
cifs: use standard token parser for mount options
cifs: remove /proc/fs/cifs/OplockEnabled
cifs: convert cifs_iovec_write to use async writes
cifs: call cifs_update_eof with i_lock held
cifs: abstract out function to marshal up the iovec array for async writes
cifs: fix up get_numpages
cifs: make cifsFileInfo_get return the cifsFileInfo pointer
cifs: fix allocation in cifs_write_allocate_pages
cifs: allow caller to specify completion op when allocating writedata
cifs: add pid field to cifs_writedata
cifs: add new cifsiod_wq workqueue
CIFS: Change mid_q_entry structure fields
CIFS: Expand CurrentMid field
CIFS: Separate protocol-specific code from cifs_readv_receive code
CIFS: Separate protocol-specific code from demultiplex code
CIFS: Separate protocol-specific code from transport routines
Linus Torvalds [Fri, 30 Mar 2012 23:09:02 +0000 (16:09 -0700)]
Merge tag 'for-v3.4-rc1' of git://git.infradead.org/battery-2.6
Pull battery updates from Anton Vorontsov:
"Various small bugfixes and enhancements, plus two new drivers:
- A quite complex ab8500 charger driver, submitted by Arun Murthy @
ST-Ericsson;
- Summit Microelectronics SMB347 Battery Charger, submitted by Bruce
E Robertson and Alan Cox @ Intel.
And that's all."
* tag 'for-v3.4-rc1' of git://git.infradead.org/battery-2.6: (36 commits)
max17042_battery: Clean up interrupt handling
Revert "max8998_charger: Include linux/module.h just once"
ab8500_fg: Fix some build warnings on x86_64
max17042_battery: Fix CHARGE_FULL representation.
max8998_charger: Include linux/module.h just once
power_supply: Convert i2c drivers to module_i2c_driver
lp8727_charger: Add MODULE_DEVICE_TABLE
charger-manager: Simplify charger_get_property(), get rid of a warning
charger-manager: Clean up for better readability
da9052-battery: Convert to use module_platform_driver
da9052-battery: Fix a memory leak when unload the module
da9052-battery: Add missing platform_set_drvdata
ab8500: Turn unneeded global symbols into local ones
ab8500_fg: Fix copy-paste error
ab8500_fg: Get rid of 'struct battery_type'
ab8500_fg: Get rid of 'struct v_to_cap'
ab8500_btemp: Get rid of 'enum adc_therm'
ab8500_charger: Convert to the new USB OTG calls
ab8500-btemp: AB8500 battery temperature driver
ab8500-fg: A8500 fuel gauge driver
...
Lucas De Marchi [Fri, 30 Mar 2012 20:37:20 +0000 (13:37 -0700)]
Documentation: replace install commands with softdeps
Install commands should not be used to specify soft dependencies among
modules. When loading modules it's much better to have a softdep that
modprobe knows what's being done than having to fork/exec another
instance of modprobe to load the other module.
By using a softdep user has also an option to remove the dependencies
when removing the module (and if its refcount dropped to 0)
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Lucas De Marchi [Fri, 30 Mar 2012 20:37:16 +0000 (13:37 -0700)]
Documentation: remove references to /etc/modprobe.conf
Usage of /etc/modprobe.conf file was deprecated by module-init-tools and
is no longer parsed by new kmod tool. References to this file are
replaced in Documentation, comments and Kconfig according to the
context.
There are also some references to the old /etc/modules.conf from 2.4
kernels that are being removed.
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Javi Merino [Fri, 30 Mar 2012 20:37:02 +0000 (13:37 -0700)]
Documentation: mention scripts/diffconfig tool
The kconfig documentation suggests using plain 'diff' to compare config
files and then adds "Yes, we need something better here". Commit a717417e7f96 ("kconfig: add diffconfig utility") added what that comment
was looking for.
Signed-off-by: Javi Merino <javi.merino@arm.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Olof Johansson [Fri, 30 Mar 2012 06:34:29 +0000 (23:34 -0700)]
ARM: clps711x: fix missing include file
linux/bug.h is needed due to an ARRAY_SIZE being used:
arch/arm/mach-clps711x/edb7211-mm.c: In function 'edb7211_map_io':
arch/arm/mach-clps711x/edb7211-mm.c:79:9: error: implicit declaration of function 'BUILD_BUG_ON_ZERO'
Olof Johansson [Fri, 30 Mar 2012 06:22:44 +0000 (23:22 -0700)]
ARM: fix builds due to missing <asm/system_misc.h> includes
This does a sweeping change fixing up all the missing system_misc.h and
system_info.h includes from the system.h split-up change. These were the
ones I came across when building all defconfigs in arch/arm/configs, there
might be more but they lack adequate build coverage to be easily caught.
I'm expecting to get a lot of these piecemeal by each maintainer, so we
might just as well do one sweeping change to get them all at once.
Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Imre Kaloz <kaloz@openwrt.org> Cc: Krzysztof Halasa <khc@pm.waw.pl> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Jiang Liu [Fri, 30 Mar 2012 15:11:33 +0000 (23:11 +0800)]
genirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value
irq_move_masked_irq() checks the return code of
chip->irq_set_affinity() only for 0, but IRQ_SET_MASK_OK_NOCOPY is
also a valid return code, which is there to avoid a redundant copy of
the cpumask. But in case of IRQ_SET_MASK_OK_NOCOPY we not only avoid
the redundant copy, we also fail to adjust the thread affinity of an
eventually threaded interrupt handler.
Handle IRQ_SET_MASK_OK (==0) and IRQ_SET_MASK_OK_NOCOPY(==1) return
values correctly by checking the valid return values seperately.
The former changed a parameter in the call to acpi_os_read_memory64()
and the later replaced all calls to acpi_os_read_memory64()
with calls to acpi_os_read_memory().
Dan Carpenter [Wed, 7 Mar 2012 11:57:36 +0000 (14:57 +0300)]
ACPI throttling: fix endian bug in acpi_read_throttling_status()
Using a u64 here creates an endian bug. We store a u32 number in the
top byte which is a larger number than intended on big endian systems.
There is no reason to use a 64 bit data type here, I guess it was just
an oversight.
I removed the initialization to zero as well. It's needed with a u64
but with a u32, the variable gets initialized properly inside the call
to acpi_os_read_port().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Len Brown <len.brown@intel.com>
Andi Kleen [Mon, 6 Feb 2012 16:17:12 +0000 (08:17 -0800)]
Disable MCP limit exceeded messages from Intel IPS driver
On a system on the thermal limit these are quite noisy and flood the logs.
Better would be a counter anyways. But given that we don't even have
anything for normal throttling this doesn't seem to be urgent either.
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Igor Murzov [Fri, 30 Mar 2012 17:32:09 +0000 (21:32 +0400)]
ACPI video: Don't start video device until its associated input device has been allocated
Quoth Dmitry Torokhov:
In addition to bus notifier we do install device notifier explicitly
so it might fire up early. The easiest fox would be to move
acpi_video_bus_start_devices() after input_allocate_device() but
before input_register_device() - unregistered input devices can handle
input_event() calls just fine.
May fix crashes reported in:
https://bugzilla.kernel.org/show_bug.cgi?id=40672
Signed-off-by: Igor Murzov <e-mail@date.by> Signed-off-by: Len Brown <len.brown@intel.com>
Linus Torvalds [Fri, 30 Mar 2012 19:44:29 +0000 (12:44 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes and features from Chris Mason:
"We've merged in the error handling patches from SuSE. These are
already shipping in the sles kernel, and they give btrfs the ability
to abort transactions and go readonly on errors. It involves a lot of
churn as they clarify BUG_ONs, and remove the ones we now properly
deal with.
Josef reworked the way our metadata interacts with the page cache.
page->private now points to the btrfs extent_buffer object, which
makes everything faster. He changed it so we write an whole extent
buffer at a time instead of allowing individual pages to go down,,
which will be important for the raid5/6 code (for the 3.5 merge
window ;)
Josef also made us more aggressive about dropping pages for metadata
blocks that were freed due to COW. Overall, our metadata caching is
much faster now.
We've integrated my patch for metadata bigger than the page size.
This allows metadata blocks up to 64KB in size. In practice 16K and
32K seem to work best. For workloads with lots of metadata, this cuts
down the size of the extent allocation tree dramatically and fragments
much less.
Scrub was updated to support the larger block sizes, which ended up
being a fairly large change (thanks Stefan Behrens).
We also have an assortment of fixes and updates, especially to the
balancing code (Ilya Dryomov), the back ref walker (Jan Schmidt) and
the defragging code (Liu Bo)."
Fixed up trivial conflicts in fs/btrfs/scrub.c that were just due to
removal of the second argument to k[un]map_atomic() in commit 7ac687d9e047.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (75 commits)
Btrfs: update the checks for mixed block groups with big metadata blocks
Btrfs: update to the right index of defragment
Btrfs: do not bother to defrag an extent if it is a big real extent
Btrfs: add a check to decide if we should defrag the range
Btrfs: fix recursive defragment with autodefrag option
Btrfs: fix the mismatch of page->mapping
Btrfs: fix race between direct io and autodefrag
Btrfs: fix deadlock during allocating chunks
Btrfs: show useful info in space reservation tracepoint
Btrfs: don't use crc items bigger than 4KB
Btrfs: flush out and clean up any block device pages during mount
btrfs: disallow unequal data/metadata blocksize for mixed block groups
Btrfs: enhance superblock sanity checks
Btrfs: change scrub to support big blocks
Btrfs: minor cleanup in scrub
Btrfs: introduce common define for max number of mirrors
Btrfs: fix infinite loop in btrfs_shrink_device()
Btrfs: fix memory leak in resolver code
Btrfs: allow dup for data chunks in mixed mode
Btrfs: validate target profiles only if we are going to use them
...
David Howells [Fri, 30 Mar 2012 18:43:11 +0000 (11:43 -0700)]
ia64: Fixup asm/cmpxchg.h
The empty asm/cmpxchg.h file that was provided as a temporary build fix
for the asm/system.h disintgration build problem should really include
<asm/intrinsics.h> to make definitions of xchg() and cmpxchg()
available.
Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 30 Mar 2012 17:59:52 +0000 (10:59 -0700)]
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A collection of small fixes for 3.4-rc1, including
- mic-recording regression fix for Realtek codec
- clean-up of dmaengine parameter mess
- WM8894 calibration tweak
- minor fixes for asihpi and some bool module parms"
* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: fix isa/opti9xx module param type
sound: fix oss/msnd_pinnacle module param type
ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
ASoC: dmaengine_pcm: use dmaengine cyclic wrapper
ASoC: Add extra parameter to device_prep_dma_cyclic
ALSA: hda/realtek - Fix ADC assignment with a shared HP/Mic pin
ASoC: wm8994: Update WM8994 DCS calibration
John Stultz [Fri, 23 Mar 2012 19:52:08 +0000 (12:52 -0700)]
merge_config.sh: Add option to display redundant configs
Provide a -r option to display when fragments contain redundant
options. This is really useful when breaking apart a config into
fragments, as well as cleaning up older fragments.
Signed-off-by: John Stultz <john.stultz@linaro.org> Acked-by: Darren Hart <dvhart@linux.intel.com> Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
John Stultz [Thu, 22 Mar 2012 22:05:48 +0000 (15:05 -0700)]
merge_config.sh: Set execute bit
Somehow the merge_config.sh script didn't get its execute bit
set when it was merged. Fix this.
Signed-off-by: John Stultz <john.stultz@linaro.org> Acked-by: Darren Hart <dvhart@linux.intel.com> Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Matthew Garrett [Tue, 31 Jan 2012 18:19:20 +0000 (13:19 -0500)]
ACPI: Add support for exposing BGRT data
ACPI 5.0 adds the BGRT, a table that contains a pointer to the firmware
boot splash and associated metadata. This simple driver exposes it via
/sys/firmware/acpi in order to allow bootsplash applications to draw their
splash around the firmware image and reduce the number of jarring graphical
transitions during boot.
Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
Jiang Liu [Tue, 14 Feb 2012 16:01:44 +0000 (00:01 +0800)]
CPER failed to handle generic error records with multiple sections
The function apei_estatus_print() and apei_estatus_check() forget to move ahead
the gdata pointer when dealing with multiple generic error data sections.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Len Brown <len.brown@intel.com>
Paul E. McKenney [Tue, 28 Feb 2012 21:27:44 +0000 (13:27 -0800)]
ACPI: Fix unprotected smp_processor_id() in acpi_processor_cst_has_changed()
The acpi_processor_cst_has_changed() function is invoked from a
CPU_ONLINE or CPU_DEAD function, which might well execute on CPU 0
even though the CPU being hotplugged is some other CPU. In addition,
acpi_processor_cst_has_changed() invokes smp_processor_id() without
protection, resulting in splats when onlining CPUs.
This commit therefore changes the smp_processor_id() to pr->id, as is
used elsewhere in the code, for example, in acpi_processor_add().
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Tested-by: Yong Zhang <yong.zhang0@gmail.com> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Yinghai Lu [Sat, 3 Mar 2012 21:29:20 +0000 (13:29 -0800)]
PNPACPI: Fix device ref leaking in acpi_pnp_match
During testing pci root bus removal, found some root bus bridge is not freed.
If booting with pnpacpi=off, those hostbridge could be freed without problem.
It turns out that some devices reference are not released during acpi_pnp_match.
that match should not hold one device ref during every calling.
Add pu_device calling before returning.
Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Len Brown <len.brown@intel.com>
Petr Vandrovec [Thu, 8 Mar 2012 21:33:24 +0000 (13:33 -0800)]
ACPI: Fix use-after-free in acpi_map_lsapic
When processor is being hot-added to the system, acpi_map_lsapic invokes
ACPI _MAT method to find APIC ID and flags, verifies that returned structure
is indeed ACPI's local APIC structure, and that flags contain MADT_ENABLED
bit. Then saves APIC ID, frees structure - and accesses structure when
computing arguments for acpi_register_lapic call. Which sometime leads
to acpi_register_lapic call being made with second argument zero, failing
to bring processor online with error 'Unable to map lapic to logical cpu
number'.
As lapic->lapic_flags & ACPI_MADT_ENABLED was already confirmed to be non-zero
few lines above, we can just pass unconditional ACPI_MADT_ENABLED to the
acpi_register_lapic.
Signed-off-by: Petr Vandrovec <petr@vmware.com> Signed-off-by: Alok N Kataria <akataria@vmware.com> Reviewed-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>