cascardo/linux.git
8 years agomtd: partitions: rename MTD parser get/put
Brian Norris [Fri, 4 Dec 2015 23:25:15 +0000 (15:25 -0800)]
mtd: partitions: rename MTD parser get/put

We're going to reuse put_partition_parser(), so let's fix up the prefix
naming a bit, to hopefully be more consistent. Also make convert to a
true C function instead of a macro.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agomtd: partitions: make parsers return 'const' partition arrays
Brian Norris [Fri, 4 Dec 2015 23:25:14 +0000 (15:25 -0800)]
mtd: partitions: make parsers return 'const' partition arrays

We only want to modify these arrays inside the parser "drivers", so the
drivers should construct them however they like, then return them as
immutable arrays.

This will make other refactorings easier.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agomtd: ofpart: assign return argument exactly once
Brian Norris [Fri, 4 Dec 2015 23:25:13 +0000 (15:25 -0800)]
mtd: ofpart: assign return argument exactly once

It's easier to refactor these parsers if the return value gets assigned
only once, just like every other MTD partition parser.

This prepares for making the second arg to the parse_fn() const. This is
OK if we construct the partitions completely first, and assign them to
the return pointer only after we're done modifying them.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agomtd: merge for-4.4 development into -next development
Brian Norris [Wed, 9 Dec 2015 17:59:45 +0000 (09:59 -0800)]
mtd: merge for-4.4 development into -next development

A few MAINTAINERS updates, and some DT binding/documentation fixups.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agodoc: dt: mtd: partitions: add compatible property to "partitions" node
Brian Norris [Thu, 3 Dec 2015 22:47:32 +0000 (14:47 -0800)]
doc: dt: mtd: partitions: add compatible property to "partitions" node

As noted here [1], there are potentially future conflicts if we try to
use MTD's "partitions" subnode to describe anything besides just the
fixed-in-the-device-tree partitions currently described in this
document. Particularly, there was a proposal to use this node for the
AFS parser too.

It can pose a (small) problem to try to differentiate the following
nodes:

// using binding as currently specified
partitions {
#address-cells = <x>;
#size-cells = <y>;
partition@0 {
...;
};
};

and

// proposed future binding
partitions {
compatible = "arm,arm-flash-structure";
};

It's especially difficult if other uses of this node start having
subnodes.

So, since the "partitions" node is new in v4.4, let's fixup the binding
before release so that it requires a compatible property, so it's much
clearer to distinguish. e.g.:

// proposed
partitions {
compatible = "fixed-partitions";
#address-cells = <x>;
#size-cells = <y>;
partition@0 {
...;
};
};

[1] Subject: "mtd: create a partition type device tree binding"
    http://lkml.kernel.org/g/20151113220039.GA74382@google.com
    http://lists.infradead.org/pipermail/linux-mtd/2015-November/063355.html
    http://lists.infradead.org/pipermail/linux-mtd/2015-November/063364.html

Cc: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
8 years agoMerge arch/{arm,blackfin,cris,mips}/ refactoring patches into MTD dev
Brian Norris [Tue, 8 Dec 2015 21:04:31 +0000 (13:04 -0800)]
Merge arch/{arm,blackfin,cris,mips}/ refactoring patches into MTD dev

These patches may also get merged by other arch/ maintainers, so I've
based them on 4.4-rc1 instead of the latest MTD development. Bring them
in now.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomips: nand: make use of mtd_to_nand() where appropriate
Boris BREZILLON [Tue, 1 Dec 2015 11:03:01 +0000 (12:03 +0100)]
mips: nand: make use of mtd_to_nand() where appropriate

mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Update all MIPS specific implementations to use this
helper.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agoblackfin: nand: make use of mtd_to_nand() where appropriate
Boris BREZILLON [Tue, 1 Dec 2015 11:02:59 +0000 (12:02 +0100)]
blackfin: nand: make use of mtd_to_nand() where appropriate

mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Update all blackfin specific implementations to use
this helper.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agocris: nand: make use of mtd_to_nand() where appropriate
Boris BREZILLON [Tue, 1 Dec 2015 11:03:00 +0000 (12:03 +0100)]
cris: nand: make use of mtd_to_nand() where appropriate

mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Update all CRIS specific implementations to use this
helper.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: add nand_to_mtd() helper
Boris BREZILLON [Tue, 1 Dec 2015 11:03:07 +0000 (12:03 +0100)]
mtd: nand: add nand_to_mtd() helper

Add a new helper to retrieve the MTD device attached to a NAND chip.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: embed an mtd_info structure into nand_chip
Boris BREZILLON [Tue, 1 Dec 2015 11:03:06 +0000 (12:03 +0100)]
mtd: nand: embed an mtd_info structure into nand_chip

Currently all NAND controller drivers are providing both the mtd_info and
nand_chip struct and then let the NAND subsystem to initialize a few
things before registering the mtd instance to the MTD layer.
Embed an mtd_info field into nand_chip to add some consistency to all NAND
controller drivers.
This change will also help factorizing boilerplate code copied in all NAND
drivers.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: make use of mtd_to_nand() in NAND drivers
Boris BREZILLON [Tue, 1 Dec 2015 11:03:04 +0000 (12:03 +0100)]
mtd: nand: make use of mtd_to_nand() in NAND drivers

mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Update all NAND drivers to use it.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agostaging: mt29f_spinand: make use of mtd_to_nand()
Boris BREZILLON [Tue, 1 Dec 2015 11:03:05 +0000 (12:03 +0100)]
staging: mt29f_spinand: make use of mtd_to_nand()

mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Use it where appropriate.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: make use of mtd_to_nand() in NAND core code
Boris BREZILLON [Tue, 1 Dec 2015 11:03:03 +0000 (12:03 +0100)]
mtd: nand: make use of mtd_to_nand() in NAND core code

mtd_to_nand() was recently introduced to avoid direct access to the
mtd->priv field. Update core code to use mtd_to_nand().

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agosh: nand: make use of mtd_to_nand() where appropriate
Boris BREZILLON [Tue, 1 Dec 2015 11:03:02 +0000 (12:03 +0100)]
sh: nand: make use of mtd_to_nand() where appropriate

mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Update all SH specific implementations to use this
helper.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agoARM: nand: make use of mtd_to_nand() where appropriate
Boris BREZILLON [Tue, 1 Dec 2015 11:02:58 +0000 (12:02 +0100)]
ARM: nand: make use of mtd_to_nand() where appropriate

mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Update all ARM specific implementations to use this
helper.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: r852: Remove unnecessary synchronize_irq() before free_irq()
Lars-Peter Clausen [Sat, 21 Nov 2015 11:14:44 +0000 (12:14 +0100)]
mtd: nand: r852: Remove unnecessary synchronize_irq() before free_irq()

Calling synchronize_irq() right before free_irq() is quite useless. On one
hand the IRQ can easily fire again before free_irq() is entered, on the
other hand free_irq() itself calls synchronize_irq() internally (in a race
condition free way), before any state associated with the IRQ is freed.

Patch was generated using the following semantic patch:
// <smpl>
@@
expression irq;
@@
-synchronize_irq(irq);
 free_irq(irq, ...);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: spi-nor: fix error handling in spi_nor_erase
Heiner Kallweit [Tue, 17 Nov 2015 19:18:54 +0000 (20:18 +0100)]
mtd: spi-nor: fix error handling in spi_nor_erase

The documenting comment of mtd_erase in mtdcore.c states:
Device drivers are supposed to call instr->callback() whenever
the operation completes, even if it completes with a failure.

Currently the callback isn't called in case of failure. Fix this.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: mtk-quadspi: drop unnecessary .owner assignment
Brian Norris [Sat, 21 Nov 2015 01:38:33 +0000 (17:38 -0800)]
mtd: mtk-quadspi: drop unnecessary .owner assignment

As of commit 807f16d4db95 ("mtd: core: set some defaults when
dev.parent is set"), the MTD core will set this for us.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Bayi Cheng <bayi.cheng@mediatek.com>
8 years agomtd: partitions: turn PART() macro into inline function
Brian Norris [Fri, 20 Nov 2015 03:28:39 +0000 (19:28 -0800)]
mtd: partitions: turn PART() macro into inline function

We can guard against reorganization of struct mtd_part by using
container_of(). We can also make sure we're using the right pointer
types by making this a static inline function instead of a macro.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: ofpart: don't complain about missing 'partitions' node too loudly
Brian Norris [Thu, 3 Dec 2015 22:26:52 +0000 (14:26 -0800)]
mtd: ofpart: don't complain about missing 'partitions' node too loudly

The ofpart partition parser might be run on DT-enabled systems that
don't have any "ofpart" partition subnodes at all, since "ofpart" is in
the default parser list. So don't complain loudly on every boot.

Example: using m25p80.c with no intent to use ofpart:

&spi2 {
status = "okay";

flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
};
};

I see this warning:

[    0.588471] m25p80 spi2.0: gd25q32 (4096 Kbytes)
[    0.593091] spi2.0: 'partitions' subnode not found on /spi@ff130000/flash@0. Trying to parse direct subnodes as partitions.

Cc: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: brcmnand: drop brcmnand_host::of_node field
Brian Norris [Tue, 1 Dec 2015 02:01:27 +0000 (18:01 -0800)]
mtd: brcmnand: drop brcmnand_host::of_node field

We don't actually need to stash a copy of this device_node indefinitely;
we only need it in brcmnand_init_cs().

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: <bcm-kernel-feedback-list@broadcom.com>
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Acked-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: fix typo (t_ald -> t_adl)
Brian Norris [Tue, 1 Dec 2015 19:08:32 +0000 (11:08 -0800)]
mtd: nand: fix typo (t_ald -> t_adl)

It's "ADL" ("ALE to data loading" time) not "ALD".

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agomtd: nand: fix ONFI parameter page layout
Boris BREZILLON [Mon, 23 Nov 2015 10:23:07 +0000 (11:23 +0100)]
mtd: nand: fix ONFI parameter page layout

src_ssync_features field is only 1 byte large, and the 4th reserved area
is actually 8 bytes large.

Fixes: d1e1f4e42b5 ("mtd: nand: add support for reading ONFI parameters from NAND device")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: spi-nor: Fix error message with unrecognized JEDEC
Ricardo Ribalda [Mon, 30 Nov 2015 19:41:17 +0000 (20:41 +0100)]
mtd: spi-nor: Fix error message with unrecognized JEDEC

The error message was:

m25p80 spi32766.0: unrecognized JEDEC id bytes: 00,  0,  0

The new error message:

m25p80 spi32766.0: unrecognized JEDEC id bytes: 00, 00, 00

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: sunxi: add missing of_node_put
Julia Lawall [Wed, 18 Nov 2015 22:04:12 +0000 (23:04 +0100)]
mtd: nand: sunxi: add missing of_node_put

for_each_child_of_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// <smpl>
@@
expression root,e;
local idexpression child;
@@

 for_each_child_of_node(root, child) {
   ... when != of_node_put(child)
       when != e = child
(
   return child;
|
+  of_node_put(child);
?  return ...;
)
   ...
 }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: brcmnand: improve memory management
Julia Lawall [Thu, 19 Nov 2015 21:32:15 +0000 (22:32 +0100)]
mtd: brcmnand: improve memory management

This patch addresses two related memory management issues in the probe
function:

1. for_each_available_child_of_node performs an of_node_get on each
iteration, so a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// <smpl>
@@
expression root,e;
local idexpression child;
@@

 for_each_available_child_of_node(root, child) {
   ... when != of_node_put(child)
       when != e = child
(
   return child;
|
+  of_node_put(child);
?  return ...;
)
   ...
 }
// </smpl>

2. The devm_kzalloc'd data is not used if brcmnand_init_cs fails.  Free it
immediately, using devm_kfree in this case, instead of waiting for the
remove function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agobrcmnand: Clear EXT_ADDR error registers in PIO mode
Simon Arlott [Mon, 16 Nov 2015 22:05:39 +0000 (22:05 +0000)]
brcmnand: Clear EXT_ADDR error registers in PIO mode

If an error occurs in flash above 4GB in PIO mode then the EXT_ADDR
registers will be set to the location of the error and never cleared.

Reset them to 0 before reading.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: cfi: don't warn about broken geometry for !CONFIG_MTD
Arnd Bergmann [Tue, 24 Nov 2015 22:09:02 +0000 (23:09 +0100)]
mtd: cfi: don't warn about broken geometry for !CONFIG_MTD

The linux/mtd/map.h header file is included by a couple of
platform specific files that are built even when CONFIG_MTD
is disabled, and we always get

 warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work"

in that case. This adds an #ifdef around the pointless warning,
as everything is really fine when we don't build the drivers
anyway.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: cfi: enforce valid geometry configuration
Arnd Bergmann [Mon, 23 Nov 2015 13:39:33 +0000 (14:39 +0100)]
mtd: cfi: enforce valid geometry configuration

MTD allows compile-time configuration of the possible CFI geometry
settings that are allowed by the kernel, but that includes a couple of
invalid configurations, where no bank width or no interleave setting
is allowed. These are then caught with a compile-time warning:

include/linux/mtd/cfi.h:76:2: warning: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work.
include/linux/mtd/map.h:145:2: warning: #warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work"

This is a bit annoying for randconfig tests, and can be avoided if
we change the Kconfig logic to always select the simplest configuration
when no other one is enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: spi-nor: include mtd.h header for struct mtd_info definition
Rafał Miłecki [Thu, 26 Nov 2015 08:05:04 +0000 (09:05 +0100)]
mtd: spi-nor: include mtd.h header for struct mtd_info definition

So far struct spi_nor was using just a pointer to struct mtd_info so it
wasn't needed to have it fully defined there. After recent change we
embed whole struct so we need to include a proper header.

Fixes: 1976367173a4 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor")
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: mtk-nor: new Mediatek serial flash controller driver
Bayi Cheng [Wed, 18 Nov 2015 03:30:02 +0000 (11:30 +0800)]
mtd: mtk-nor: new Mediatek serial flash controller driver

Add spi nor flash driver for mediatek controller

Signed-off-by: Bayi Cheng <bayi.cheng@mediatek.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: atmel_nand: constify atmel_nand_caps structures
LABBE Corentin [Fri, 20 Nov 2015 07:45:16 +0000 (08:45 +0100)]
mtd: nand: atmel_nand: constify atmel_nand_caps structures

All atmel_nand_caps are never modified, consitify them.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Acked-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: kill off MTD partition parser boilerplate
Brian Norris [Thu, 12 Nov 2015 03:13:30 +0000 (19:13 -0800)]
mtd: kill off MTD partition parser boilerplate

Most parsers can be handled with our new boilerplate-reducing macro.
There are a few that can't be (cmdlineparts and ofpart).

Also kill off the owner assignments, since register_mtd_parser() now
takes care of that.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: partitions: add module_mtd_part_parser() helper
Brian Norris [Thu, 12 Nov 2015 03:13:29 +0000 (19:13 -0800)]
mtd: partitions: add module_mtd_part_parser() helper

This can help eliminate some boilerplate by generating the module_init()
and module_exit() functions, and by automatically assigning the module
owner.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agodoc: dt: mtd: stop referring to driver code for spi-nor IDs
Brian Norris [Mon, 16 Nov 2015 22:34:52 +0000 (14:34 -0800)]
doc: dt: mtd: stop referring to driver code for spi-nor IDs

Pull the supported chip names from drivers/mtd/devices/m25p80.c and stop
pointing readers to Linux code.

Also (although I see this habit repeated throughout the
Documentation/devicetree/bindings/ tree), stop using the title "driver"
in this file, when we're trying explicitly to describe hardware, not
software.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: <devicetree@vger.kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
8 years agomtd: m25p80: replace leftover "nor-jedec" with "spi-nor" in comments
Brian Norris [Mon, 16 Nov 2015 22:34:51 +0000 (14:34 -0800)]
mtd: m25p80: replace leftover "nor-jedec" with "spi-nor" in comments

I overlooked a few comments in commit 8947e396a829 ("Documentation: dt:
mtd: replace "nor-jedec" binding with "jedec, spi-nor""). Fix these up
now.

Suggested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
8 years agomtd: m25p80: fix module autoloading for "jedec, spi-nor" and "spi-nor"
Brian Norris [Mon, 16 Nov 2015 22:34:50 +0000 (14:34 -0800)]
mtd: m25p80: fix module autoloading for "jedec, spi-nor" and "spi-nor"

Commit 43163022927b ("mtd: m25p80: allow arbitrary OF matching for
"jedec,spi-nor"") moved the "jedec,spi-nor" handling from the
spi_device_id table to the of_match_table, to better handle matching
complex device tree compatible strings. With that patch, device tree
support works as expected when m25p80.c is built into the kernel.

However, that commit ignored the fact that:

 (1) (non-DT) platform devices might want to use the "spi-nor" string
     for matching with this driver, rather than picking an arbitrary one
     like "m25p80"
 (2) the core SPI uevent/modalias code doesn't yet support kernel module
     autoloading via of_match_table strings; so for DT-based devices, it
     will only report (part of) the first compatible string used

Problem (1) has been reported previously, and I forgot to patch it up
afterward.

Problem (2) was noticed recently here:
http://lists.infradead.org/pipermail/linux-mtd/2015-October/062369.html
https://lkml.org/lkml/2015/11/12/574

Specifically, this patch fixes m25p80.ko module autoloading for cases
like this:

flash@xxx {
compatible = "jedec,spi-nor";
...
};

because modalias of "spi:spi-nor" (the only module loading info provided
by the SPI core for this device) will now be listed as an alias in
m25p80.ko.

Notably, it does *not* help cases like this:

flash@xxx {
compatible = "vendor,shiny-new-device", "jedec,spi-nor";
...
};

unless we also list "shiny-new-device" in m25p_ids[]. There has been
discussion on future work for this issue here:
https://lkml.org/lkml/2015/11/12/574

Cc: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
8 years agomtd: spi-nor: mx25l3205d/mx25l6405d: append SECT_4K
Andreas Fenkart [Thu, 5 Nov 2015 09:04:23 +0000 (10:04 +0100)]
mtd: spi-nor: mx25l3205d/mx25l6405d: append SECT_4K

according datasheet both chips can erase 4kByte sectors individually

Signed-off-by: Andreas Fenkart <andreas.fenkart@dev.digitalstrom.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: m25p80: drop erase() callback
Brian Norris [Tue, 10 Nov 2015 20:15:28 +0000 (12:15 -0800)]
mtd: m25p80: drop erase() callback

Just use the spi-nor default instead.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: spi-nor: provide default erase_sector implementation
Brian Norris [Tue, 10 Nov 2015 20:15:27 +0000 (12:15 -0800)]
mtd: spi-nor: provide default erase_sector implementation

Some spi-nor drivers perform sector erase by duplicating their
write_reg() command. Let's not require that the driver fill this out,
and provide a default instead.

Tested on m25p80.c and Medatek's MT8173 SPI NOR flash driver.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agodoc: mtd: nand: update examples to use mtd_to_nand()
Boris BREZILLON [Mon, 16 Nov 2015 13:37:36 +0000 (14:37 +0100)]
doc: mtd: nand: update examples to use mtd_to_nand()

mtd_to_nand() has been introduced to hide accesses to mtd->priv.
All NAND controller drivers should use it instead of directly accessing
the ->priv field.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: merge in mtd_to_nand() branch
Brian Norris [Thu, 19 Nov 2015 19:10:41 +0000 (11:10 -0800)]
mtd: merge in mtd_to_nand() branch

In case other subsystems want to merge in this helper for use in their
drivers, let's bring in that development separately from the rest of
MTD -next development.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: add an mtd_to_nand() helper
Boris BREZILLON [Mon, 16 Nov 2015 13:37:35 +0000 (14:37 +0100)]
mtd: nand: add an mtd_to_nand() helper

Some drivers are retrieving the nand_chip pointer using the container_of
macro on a struct wrapping both the nand_chip and the mtd_info struct while
the standard way of retrieving this pointer is through mtd->priv.
Provide an helper to do that.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: fix drivers abusing mtd->priv
Boris BREZILLON [Mon, 16 Nov 2015 13:37:34 +0000 (14:37 +0100)]
mtd: nand: fix drivers abusing mtd->priv

The ->priv field of the mtd_info object attached to a nand_chip device
should point to the nand_chip device. The pxa and cafe drivers are
assigning this field their own private structure, which works fine as long
as the nand_chip field is the first one in the driver private struct but
seems a bit fragile.
Fix that by setting mtd->priv to point the nand_chip field and assigning
chip->priv to the private structure head.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: brcmnand: drop unused subpage_read() support
Brian Norris [Tue, 17 Nov 2015 01:04:08 +0000 (17:04 -0800)]
mtd: brcmnand: drop unused subpage_read() support

AFAIR this driver was never tested with subpage read support, and this
code is currently unused because we don't set the NAND_SUBPAGE_READ
flag. It can be resurrected if someone tests it properly.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Ray Jui <rjui@broadcom.com>
8 years agomtd: brcmnand: clean up flash cache for parameter pages
Brian Norris [Tue, 17 Nov 2015 00:56:13 +0000 (16:56 -0800)]
mtd: brcmnand: clean up flash cache for parameter pages

The read_byte() handling for accessing the flash cache has some awkward
swapping being done in the read_byte() function. Let's just make this a
byte array, and do the swapping with the word-level macros during the
initial buffer copy.

This is just a refactoring patch, with no (intended) functional change.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Clay McClure <clay@daemons.net>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: <bcm-kernel-feedback-list@broadcom.com>
Tested-by: Clay McClure <clay@daemons.net>
8 years agoMAINTAINERS: brcmnand: Add co-maintainer for Broadcom SoCs
Kamal Dasu [Tue, 17 Nov 2015 18:50:08 +0000 (13:50 -0500)]
MAINTAINERS: brcmnand: Add co-maintainer for Broadcom SoCs

Adding myself as co-maintainer of nand controller driver
for the Broadcom SoCs.

Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: fsl-quadspi: possible NULL dereference
Brian Norris [Mon, 16 Nov 2015 18:45:30 +0000 (10:45 -0800)]
mtd: fsl-quadspi: possible NULL dereference

It is theoretically possible to probe this driver without a matching
device tree, so let's guard against this.

Also, use the of_device_get_match_data() helper to make this a bit
simpler.

Coverity complained about this one.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Han xu <han.xu@freescale.com>
8 years agoDocumentation: mtd: improve nand_ecc.txt for readability and correctness
Wang YanQing [Thu, 29 Oct 2015 16:36:33 +0000 (00:36 +0800)]
Documentation: mtd: improve nand_ecc.txt for readability and correctness

This patch correct some representation errors, add a little
clarification in some places, and fix indentation problems
for pseudo code.

It also delete one more white space for one place.

Signed-off-by: Wang YanQing <udknight@gmail.com>
[Brian: a few tweaks]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: mxc_nand: Remove bit-or operation with zero
Fabio Estevam [Tue, 17 Nov 2015 15:58:50 +0000 (13:58 -0200)]
mtd: mxc_nand: Remove bit-or operation with zero

Doing a bit-or operation with zero is pointless.

Remove this unneeded bit-or.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agoMAINTAINERS: brcmnand: Add Broadcom internal mailing-list
Florian Fainelli [Mon, 16 Nov 2015 23:34:15 +0000 (15:34 -0800)]
MAINTAINERS: brcmnand: Add Broadcom internal mailing-list

The Broadcom NAND driver is used by many different groups at Broadcom
now, so use the same mailing-list we use for other areas of the kernel.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: spi-nor: remove unnecessary leading space from dbg print
Brian Norris [Fri, 30 Oct 2015 19:56:22 +0000 (12:56 -0700)]
mtd: spi-nor: remove unnecessary leading space from dbg print

As Cyrille noted [1], this line is wrong.

[1] http://lists.infradead.org/pipermail/linux-mtd/2015-September/061725.html

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Cyrille Pitchen <cyrille.pitchen@atmel.com>
8 years agomtd: sm_ftl: fix wrong do_div() usage
Nicolas Pitre [Wed, 4 Nov 2015 20:21:21 +0000 (15:21 -0500)]
mtd: sm_ftl: fix wrong do_div() usage

do_div() is meant to be used with an unsigned dividend.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: pxa3xx_nand: Gate/ungate the NAND clock in suspend/resume paths
Ezequiel García [Wed, 4 Nov 2015 16:13:46 +0000 (13:13 -0300)]
mtd: pxa3xx_nand: Gate/ungate the NAND clock in suspend/resume paths

The NAND clock can be disabled on suspend and enabled on resume.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: pxa3xx_nand: Remove dead code
Ezequiel García [Wed, 4 Nov 2015 16:13:45 +0000 (13:13 -0300)]
mtd: pxa3xx_nand: Remove dead code

This macro is not used anymore, so it's just dead code.
Remove it.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: pxa3xx_nand: Remove redundant NAND sensing
Ezequiel García [Wed, 4 Nov 2015 16:13:44 +0000 (13:13 -0300)]
mtd: pxa3xx_nand: Remove redundant NAND sensing

Currently, the driver is trying to detect the presence of a chip
by issuing a RESET command before nand_scan_ident. This seems completely
redundant, and is also a layering violation as nand_scan_ident is in charge
of device detection.

This commit removes the RESET command use, and moves the initial
timing configuration to pxa3xx_nand_config_ident.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: pxa3xx_nand: Simplify pxa3xx_nand_scan
Ezequiel García [Wed, 4 Nov 2015 16:13:43 +0000 (13:13 -0300)]
mtd: pxa3xx_nand: Simplify pxa3xx_nand_scan

This commit simplifies the initial configuration performed
by pxa3xx_nand_scan. No functionality change is intended.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: pxa3xx_nand: Fix initial controller configuration
Ezequiel García [Wed, 4 Nov 2015 16:13:42 +0000 (13:13 -0300)]
mtd: pxa3xx_nand: Fix initial controller configuration

The Data Flash Control Register (NDCR) contains two types
of parameters: those that are needed for device identification,
and those that can only be set after device identification.

Therefore, the driver can't set them all at once and instead
needs to configure the first group before nand_scan_ident()
and the second group later.

Let's split pxa3xx_nand_config in two halves, and set the
parameters that depend on the device geometry once this is known.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: pxa3xx_nand: Increase the initial chunk size
Ezequiel García [Wed, 4 Nov 2015 16:13:41 +0000 (13:13 -0300)]
mtd: pxa3xx_nand: Increase the initial chunk size

The chunk size represents the size of the data chunks, which
is used by the controllers that allow to split transfered data.

However, the initial chunk size is used in a non-splitted way,
during device identification. Therefore, it must be large enough
for all the NAND commands issued during device identification.
This includes NAND_CMD_PARAM which was recently changed to
transfer up to 2048 bytes (for the redundant parameter pages).

Thus, the initial chunk size should be 2048 as well.

On Armada 370/XP platforms (NFCv2) booted without the keep-config
devicetree property, this commit fixes a timeout on the NAND_CMD_PARAM
command:

  [..]
  pxa3xx-nand f10d0000.nand: This platform can't do DMA on this device
  pxa3xx-nand f10d0000.nand: Wait time out!!!
  nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x38
  nand: Micron MT29F8G08ABABAWP
  nand: 1024 MiB, SLC, erase size: 512 KiB, page size: 4096, OOB size: 224

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agoMerge MTD 4.4 development into MTD -next
Brian Norris [Mon, 16 Nov 2015 22:45:15 +0000 (14:45 -0800)]
Merge MTD 4.4 development into MTD -next

We need to be able to build the jz4740_nand driver.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agomtd: nand: fix shutdown/reboot for multi-chip systems
Brian Norris [Tue, 10 Nov 2015 00:37:28 +0000 (16:37 -0800)]
mtd: nand: fix shutdown/reboot for multi-chip systems

If multiple NAND chips are registered to the same controller, then when
rebooting the system, the first one will grab the controller lock, while
the second will wait forever for the first one to release it. i.e., a
classic deadlock.

This problem was solved for a similar case (suspend/resume) back in
commit 6b0d9a841249 ("mtd: nand: fix multi-chip suspend problem"), and
the shutdown state really isn't much different for us, so rather than
adding a new special case to nand_get_device(), we can just overload the
FL_PM_SUSPENDED state.

Now, multiple chips can "get" the same controller lock (preventing
further I/O), while we still allow other chips to pass through
nand_shutdown().

Original report:
http://thread.gmane.org/gmane.linux.drivers.mtd/59726
http://lists.infradead.org/pipermail/linux-mtd/2015-July/059992.html

Fixes: 72ea403669c7 ("mtd: nand: added nand_shutdown")
Reported-by: Andrew E. Mileski <andrewm@isoar.ca>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: Andrew E. Mileski <andrewm@isoar.ca>
Acked-by: Scott Branden <sbranden@broadcom.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agomtd: jz4740_nand: fix build on jz4740 after removing gpio.h
Brian Norris [Wed, 11 Nov 2015 23:36:16 +0000 (15:36 -0800)]
mtd: jz4740_nand: fix build on jz4740 after removing gpio.h

Fallout from commit 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h")

We see errors like this:

drivers/mtd/nand/jz4740_nand.c: In function 'jz_nand_detect_bank':
drivers/mtd/nand/jz4740_nand.c:340:9: error: 'JZ_GPIO_MEM_CS0' undeclared (first use in this function)
drivers/mtd/nand/jz4740_nand.c:340:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/mtd/nand/jz4740_nand.c:359:2: error: implicit declaration of function 'jz_gpio_set_function' [-Werror=implicit-function-declaration]
drivers/mtd/nand/jz4740_nand.c:359:29: error: 'JZ_GPIO_FUNC_MEM_CS0' undeclared (first use in this function)
drivers/mtd/nand/jz4740_nand.c:399:29: error: 'JZ_GPIO_FUNC_NONE' undeclared (first use in this function)
drivers/mtd/nand/jz4740_nand.c: In function 'jz_nand_probe':
drivers/mtd/nand/jz4740_nand.c:528:13: error: 'JZ_GPIO_MEM_CS0' undeclared (first use in this function)
drivers/mtd/nand/jz4740_nand.c: In function 'jz_nand_remove':
drivers/mtd/nand/jz4740_nand.c:555:14: error: 'JZ_GPIO_MEM_CS0' undeclared (first use in this function)

Patched similarly to:

https://patchwork.linux-mips.org/patch/11089/

Fixes: 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h")
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agoMerge v4.4-rc1 into MTD development
Brian Norris [Mon, 16 Nov 2015 04:30:53 +0000 (20:30 -0800)]
Merge v4.4-rc1 into MTD development

Sync up with the upstream development.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agoLinux 4.4-rc1 v4.4-rc1
Linus Torvalds [Mon, 16 Nov 2015 01:00:27 +0000 (17:00 -0800)]
Linux 4.4-rc1

8 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 15 Nov 2015 17:36:24 +0000 (09:36 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf updates from Thomas Gleixner:
 "Mostly updates to the perf tool plus two fixes to the kernel core code:

   - Handle tracepoint filters correctly for inherited events (Peter
     Zijlstra)

   - Prevent a deadlock in perf_lock_task_context (Paul McKenney)

   - Add missing newlines to some pr_err() calls (Arnaldo Carvalho de
     Melo)

   - Print full source file paths when using 'perf annotate --print-line
     --full-paths' (Michael Petlan)

   - Fix 'perf probe -d' when just one out of uprobes and kprobes is
     enabled (Wang Nan)

   - Add compiler.h to list.h to fix 'make perf-tar-src-pkg' generated
     tarballs, i.e. out of tree building (Arnaldo Carvalho de Melo)

   - Add the llvm-src-base.c and llvm-src-kbuild.c files, generated by
     the 'perf test' LLVM entries, when running it in-tree, to
     .gitignore (Yunlong Song)

   - libbpf error reporting improvements, using a strerror interface to
     more precisely tell the user about problems with the provided
     scriptlet, be it in C or as a ready made object file (Wang Nan)

   - Do not be case sensitive when searching for matching 'perf test'
     entries (Arnaldo Carvalho de Melo)

   - Inform the user about objdump failures in 'perf annotate' (Andi
     Kleen)

   - Improve the LLVM 'perf test' entry, introduce a new ones for BPF
     and kbuild tests to check the environment used by clang to compile
     .c scriptlets (Wang Nan)"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
  perf/x86/intel/rapl: Remove the unused RAPL_EVENT_DESC() macro
  tools include: Add compiler.h to list.h
  perf probe: Verify parameters in two functions
  perf session: Add missing newlines to some pr_err() calls
  perf annotate: Support full source file paths for srcline fix
  perf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore
  perf: Fix inherited events vs. tracepoint filters
  perf: Disable IRQs across RCU RS CS that acquires scheduler lock
  perf test: Do not be case sensitive when searching for matching tests
  perf test: Add 'perf test BPF'
  perf test: Enhance the LLVM tests: add kbuild test
  perf test: Enhance the LLVM test: update basic BPF test program
  perf bpf: Improve BPF related error messages
  perf tools: Make fetch_kernel_version() publicly available
  bpf tools: Add new API bpf_object__get_kversion()
  bpf tools: Improve libbpf error reporting
  perf probe: Cleanup find_perf_probe_point_from_map to reduce redundancy
  perf annotate: Inform the user about objdump failures in --stdio
  perf stat: Make stat options global
  perf sched latency: Fix thread pid reuse issue
  ...

8 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 15 Nov 2015 17:35:33 +0000 (09:35 -0800)]
Merge branch 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull scheduler fix from Thomas Gleixner:
 "A single fix to prevent math underflow in the numa balancing code"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/numa: Fix math underflow in task_tick_numa()

8 years agoMerge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 15 Nov 2015 17:34:32 +0000 (09:34 -0800)]
Merge branch 'locking-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull liblockdep fixes from Thomas Gleixner:
 "Three small patches to synchronize liblockdep with the latest core
  changes"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tools/liblockdep: explicitly declare lockdep API we call from liblockdep
  tools/liblockdep: add userspace versions of WRITE_ONCE and RCU_INIT_POINTER
  tools/liblockdep: remove task argument from debug_check_no_locks_held

8 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 15 Nov 2015 17:32:59 +0000 (09:32 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "A couple of fixes and updates related to x86:

   - Fix the W+X check regression on XEN

   - The real fix for the low identity map trainwreck

   - Probe legacy PIC early instead of unconditionally allocating legacy
     irqs

   - Add cpu verification to long mode entry

   - Adjust the cache topology to AMD Fam17H systems

   - Let Merrifield use the TSC across S3"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/cpu: Call verify_cpu() after having entered long mode too
  x86/setup: Fix low identity map for >= 2GB kernel range
  x86/mm: Skip the hypervisor range when walking PGD
  x86/AMD: Fix last level cache topology for AMD Fam17h systems
  x86/irq: Probe for PIC presence before allocating descs for legacy IRQs
  x86/cpu/intel: Enable X86_FEATURE_NONSTOP_TSC_S3 for Merrifield

8 years agoMerge branches 'irq-urgent-for-linus' and 'timers-urgent-for-linus' of git://git...
Linus Torvalds [Sun, 15 Nov 2015 17:30:48 +0000 (09:30 -0800)]
Merge branches 'irq-urgent-for-linus' and 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull irq and timer fixes from Thomas Gleixner:

 - An irq regression fix to restore the wakeup behaviour of chained
   interrupts.

 - A timer fix for a long standing race versus timers scheduled on a
   target cpu which got exposed by recent changes in the workqueue
   implementation.

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq/PM: Restore system wake up from chained interrupts

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timers: Use proper base migration in add_timer_on()

8 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 15 Nov 2015 17:10:53 +0000 (09:10 -0800)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
 "These are the highlists of the main MIPS pull request for 4.4:

   - Add latencytop support
   - Support appended DTBs
   - VDSO support and initially use it for gettimeofday.
   - Drop the .MIPS.abiflags and ELF NOTE sections from vmlinux
   - Support for the 5KE, an internal test core.
   - Switch all MIPS platfroms to libata drivers.
   - Improved support, cleanups for ralink and Lantiq platforms.
   - Support for the new xilfpga platform.
   - A number of DTB improvments for BMIPS.
   - Improved support for CM and CPS.
   - Minor JZ4740 and BCM47xx enhancements"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (120 commits)
  MIPS: idle: add case for CPU_5KE
  MIPS: Octeon: Support APPENDED_DTB
  MIPS: vmlinux: create a section for appended DTB
  MIPS: Clean up compat_siginfo_t
  MIPS: Fix PAGE_MASK definition
  MIPS: BMIPS: Enable GZIP ramdisk and timed printks
  MIPS: Add xilfpga defconfig
  MIPS: xilfpga: Add mipsfpga platform code
  MIPS: xilfpga: Add xilfpga device tree files.
  dt-bindings: MIPS: Document xilfpga bindings and boot style
  MIPS: Make MIPS_CMDLINE_DTB default
  MIPS: Make the kernel arguments from dtb available
  MIPS: Use USE_OF as the guard for appended dtb
  MIPS: BCM63XX: Use pr_* instead of printk
  MIPS: Loongson: Cleanup CONFIG_LOONGSON_SUSPEND.
  MIPS: lantiq: Disable xbar fpi burst mode
  MIPS: lantiq: Force the crossbar to big endian
  MIPS: lantiq: Initialize the USB core on boot
  MIPS: lantiq: Return correct value for fpi clock on ar9
  MIPS: ralink: Add missing clock on rt305x
  ...

8 years agoMerge tag 'sound-fix-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Sat, 14 Nov 2015 17:43:00 +0000 (09:43 -0800)]
Merge tag 'sound-fix-4.4-rc1' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are a collection of small fixes tha have been gathered for
  4.4-rc1.  The only significant changes are those in PCI drivers
  Kconfig, to use "depends on" instead of "select" for CONFIG_ZONE_DMA.
  A reverse select is often more user-friendly, but in this case, it
  makes hard to manage with the conflict with ZONE_DEVICE, so changed in
  such a way for now.

  Others are all small fixes and quirks: an error check in soundcore
  reigster_chrdev(), HD-audio HDMI/DP phantom jack fix, Intel Broxton DP
  quirk, USB-audio DSD device quirk, some constifications, etc"

* tag 'sound-fix-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: pci: depend on ZONE_DMA
  ALSA: hda - Simplify phantom jack handling for HDMI/DP
  ALSA: hda/hdmi - apply Skylake fix-ups to Broxton display codec
  ALSA: ctxfi: constify rsc ops structures
  ALSA: usb: Add native DSD support for Aune X1S
  ALSA: oxfw: add an comment to Kconfig for TASCAM FireOne
  sound: fix check for error condition of register_chrdev()

8 years agoMerge tag 'arc-4.4-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Linus Torvalds [Sat, 14 Nov 2015 17:09:37 +0000 (09:09 -0800)]
Merge tag 'arc-4.4-rc1-part2' of git://git./linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:
 "Found a couple of brown paper bag bugs with the prev pull request
  (including a SMP build breakage report from Guenter).  Since these are
  urgent I also decided to send over a bunch of other pending fixes
  which could have otherwise waited an rc or two.

  Summary:

   - A bunch of brown paper bag bugs (MAINTAINERS list email, SMP build
     failure)
   - cpu_relax() now compiler barrier for UP as well
   - handling of userspace Bus Errors for ARCompact builds"

* tag 'arc-4.4-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: Fix silly typo in MAINTAINERS file
  ARC: cpu_relax() to be compiler barrier even for UP
  ARC: use ASL assembler mnemonic
  ARC: [arcompact] Handle bus error from userspace as Interrupt not exception
  ARC: remove extraneous header include
  ARCv2: lib: memcpy: use local symbols

8 years agoARC: Fix silly typo in MAINTAINERS file
Vineet Gupta [Sat, 14 Nov 2015 07:28:53 +0000 (12:58 +0530)]
ARC: Fix silly typo in MAINTAINERS file

8 years agoARC: cpu_relax() to be compiler barrier even for UP
Vineet Gupta [Mon, 9 Nov 2015 12:18:34 +0000 (17:48 +0530)]
ARC: cpu_relax() to be compiler barrier even for UP

cpu_relax() on ARC has been barrier only for SMP (and no-op for UP). Per
recent discussions, it is safer to make it a compiler barrier
unconditionally.

Link: http://lkml.kernel.org/r/53A7D3AA.9020100@synopsys.com
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
8 years agoARC: use ASL assembler mnemonic
Vineet Gupta [Thu, 5 Nov 2015 03:43:31 +0000 (09:13 +0530)]
ARC: use ASL assembler mnemonic

ARCompact and ARCv2 only have ASL, while binutils used to support LSL as
a alias mnemonic.

Newer binutils (upstream) don't want to do that so replace it.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
8 years agoARC: [arcompact] Handle bus error from userspace as Interrupt not exception
Vineet Gupta [Fri, 30 Oct 2015 19:52:51 +0000 (01:22 +0530)]
ARC: [arcompact] Handle bus error from userspace as Interrupt not exception

Bus errors from userspace on ARCompact based cores are handled by core
as a high priority L2 interrupt but current code treated it as interrupt
Handling an interrupt like exception is certainly not going to go unnoticed.
(and it worked so far as we never saw a Bus error from userspace until
IPPK guys tested a DDR controller with ECC error detection etc hence
needed to explicitly trigger/handle such errors)

 - So move mem_service exception handler from common code into ARCv2 code.
 - In ARCompact code, define  mem_service as L2 interrupt handler which
   just drops down to pure kernel mode and goes of to enqueue SIGBUS

Reported-by: Nelson Pereira <npereira@synopsys.com>
Tested-by: Ana Martins <amartins@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
8 years agoARC: remove extraneous header include
Vineet Gupta [Fri, 30 Oct 2015 19:17:39 +0000 (00:47 +0530)]
ARC: remove extraneous header include

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
8 years agoMerge tag 'chrome-platform-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 14 Nov 2015 05:53:18 +0000 (21:53 -0800)]
Merge tag 'chrome-platform-4.4' of git://git./linux/kernel/git/olof/chrome-platform

Pull chrome platform updates from Olof Johansson:
 "Here's the branch of chrome platform changes for v4.4.  Some have been
  queued up for the full 4.3 release cycle since I forgot to send them
  in for that round (rebased early on to deal with fixes conflicts).

  Most of these enable EC communication stuff -- Pixel 2015 support,
  enabling building for ARM64 platforms, and a few fixes for memory
  leaks.

  There's also a patch in here to allow reading/writing the verified
  boot context, which depends on a sysfs patch acked by Greg"

* tag 'chrome-platform-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform:
  platform/chrome: Fix i2c-designware adapter name
  platform/chrome: Support reading/writing the vboot context
  sysfs: Support is_visible() on binary attributes
  platform/chrome: cros_ec: Fix possible leak in led_rgb_store()
  platform/chrome: cros_ec: Fix leak in sequence_store()
  platform/chrome: Enable Chrome platforms on 64-bit ARM
  platform/chrome: cros_ec_dev - Add a platform device ID table
  platform/chrome: cros_ec_lpc - Add support for Google Pixel 2
  platform/chrome: cros_ec_lpc - Use existing function to check EC result
  platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO
  Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM"

8 years agoMerge tag 'platform-drivers-x86-v4.4-2' of git://git.infradead.org/users/dvhart/linux...
Linus Torvalds [Sat, 14 Nov 2015 05:47:06 +0000 (21:47 -0800)]
Merge tag 'platform-drivers-x86-v4.4-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull another x86 platform driver update from Darren Hart:
 "Support for the unfortunately rather unique ESC key on the Ideapad
  Yoga 3 and two DMI matches for rfkill support.  Solitary fix for
  potential missed errors for asus-wmi.  Downgrade a thinkpad_acpi
  message to info.

  asus-wmi:
   - fix error handling in store_sys_wmi()

  ideapad-laptop:
   - Add Lenovo Yoga 900 to no_hw_rfkill dmi list
   - include Yoga 3 1170 in add rfkill whitelist
   - add support for Yoga 3 ESC key

  thinkpad_acpi:
   - Don't yell on unsupported brightness interfaces"

* tag 'platform-drivers-x86-v4.4-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
  asus-wmi: fix error handling in store_sys_wmi()
  ideapad-laptop: Add Lenovo Yoga 900 to no_hw_rfkill dmi list
  ideapad-laptop: include Yoga 3 1170 in add rfkill whitelist
  ideapad-laptop: add support for Yoga 3 ESC key
  thinkpad_acpi: Don't yell on unsupported brightness interfaces

8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sat, 14 Nov 2015 05:41:14 +0000 (21:41 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull more input updates from Dmitry Torokhov:
 "An update to the tsc2005 driver that allows it to also support tsc2004
  (basically the same controller, but uses i2c instead of spi bus), and
  a couple of bug fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: parkbd - drop bogus __init from parkbd_allocate_serio()
  Input: elantech - add Fujitsu Lifebook U745 to force crc_enabled
  Input: tsc2004 - add support for tsc2004
  Input: tsc200x-core - rename functions and variables
  Input: tsc2005 - separate SPI and core functions

8 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 14 Nov 2015 04:35:54 +0000 (20:35 -0800)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull final round of SCSI updates from James Bottomley:
 "Sorry for the delay in this patch which was mostly caused by getting
  the merger of the mpt2/mpt3sas driver, which was seen as an essential
  item of maintenance work to do before the drivers diverge too much.
  Unfortunately, this caused a compile failure (detected by linux-next),
  which then had to be fixed up and incubated.

  In addition to the mpt2/3sas rework, there are updates from pm80xx,
  lpfc, bnx2fc, hpsa, ipr, aacraid, megaraid_sas, storvsc and ufs plus
  an assortment of changes including some year 2038 issues, a fix for a
  remove before detach issue in some drivers and a couple of other minor
  issues"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (141 commits)
  mpt3sas: fix inline markers on non inline function declarations
  sd: Clear PS bit before Mode Select.
  ibmvscsi: set max_lun to 32
  ibmvscsi: display default value for max_id, max_lun and max_channel.
  mptfusion: don't allow negative bytes in kbuf_alloc_2_sgl()
  scsi: pmcraid: replace struct timeval with ktime_get_real_seconds()
  mvumi: 64bit value for seconds_since1970
  be2iscsi: Fix bogus WARN_ON length check
  scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice
  mpt3sas: Bump mpt3sas driver version to 09.102.00.00
  mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs
  mpt2sas, mpt3sas: Update the driver versions
  mpt3sas: setpci reset kernel oops fix
  mpt3sas: Added OEM Gen2 PnP ID branding names
  mpt3sas: Refcount fw_events and fix unsafe list usage
  mpt3sas: Refcount sas_device objects and fix unsafe list usage
  mpt3sas: sysfs attribute to report Backup Rail Monitor Status
  mpt3sas: Ported WarpDrive product SSS6200 support
  mpt3sas: fix for driver fails EEH, recovery from injected pci bus error
  mpt3sas: Manage MSI-X vectors according to HBA device type
  ...

8 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
Linus Torvalds [Sat, 14 Nov 2015 04:04:17 +0000 (20:04 -0800)]
Merge branch 'for-next' of git://git./linux/kernel/git/nab/target-pending

Pull SCSI target updates from Nicholas Bellinger:
 "This series contains HCH's changes to absorb configfs attribute
  ->show() + ->store() function pointer usage from it's original
  tree-wide consumers, into common configfs code.

  It includes usb-gadget, target w/ drivers, netconsole and ocfs2
  changes to realize the improved simplicity, that now renders the
  original include/target/configfs_macros.h CPP magic for fabric drivers
  and others, unnecessary and obsolete.

  And with common code in place, new configfs attributes can be added
  easier than ever before.

  Note, there are further improvements in-flight from other folks for
  v4.5 code in configfs land, plus number of target fixes for post -rc1
  code"

In the meantime, a new user of the now-removed old configfs API came in
through the char/misc tree in commit 7bd1d4093c2f ("stm class: Introduce
an abstraction for System Trace Module devices").

This merge resolution comes from Alexander Shishkin, who updated his stm
class tracing abstraction to account for the removal of the old
show_attribute and store_attribute methods in commit 517982229f78
("configfs: remove old API") from this pull.  As Alexander says about
that patch:

 "There's no need to keep an extra wrapper structure per item and the
  awkward show_attribute/store_attribute item ops are no longer needed.

  This patch converts policy code to the new api, all the while making
  the code quite a bit smaller and easier on the eyes.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>"
That patch was folded into the merge so that the tree should be fully
bisectable.

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (23 commits)
  configfs: remove old API
  ocfs2/cluster: use per-attribute show and store methods
  ocfs2/cluster: move locking into attribute store methods
  netconsole: use per-attribute show and store methods
  target: use per-attribute show and store methods
  spear13xx_pcie_gadget: use per-attribute show and store methods
  dlm: use per-attribute show and store methods
  usb-gadget/f_serial: use per-attribute show and store methods
  usb-gadget/f_phonet: use per-attribute show and store methods
  usb-gadget/f_obex: use per-attribute show and store methods
  usb-gadget/f_uac2: use per-attribute show and store methods
  usb-gadget/f_uac1: use per-attribute show and store methods
  usb-gadget/f_mass_storage: use per-attribute show and store methods
  usb-gadget/f_sourcesink: use per-attribute show and store methods
  usb-gadget/f_printer: use per-attribute show and store methods
  usb-gadget/f_midi: use per-attribute show and store methods
  usb-gadget/f_loopback: use per-attribute show and store methods
  usb-gadget/ether: use per-attribute show and store methods
  usb-gadget/f_acm: use per-attribute show and store methods
  usb-gadget/f_hid: use per-attribute show and store methods
  ...

8 years agoMerge branch 'for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sat, 14 Nov 2015 02:02:30 +0000 (18:02 -0800)]
Merge branch 'for-linus-3' of git://git./linux/kernel/git/viro/vfs

Pull vfs xattr cleanups from Al Viro.

* 'for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  f2fs: xattr simplifications
  squashfs: xattr simplifications
  9p: xattr simplifications
  xattr handlers: Pass handler to operations instead of flags
  jffs2: Add missing capability check for listing trusted xattrs
  hfsplus: Remove unused xattr handler list operations
  ubifs: Remove unused security xattr handler
  vfs: Fix the posix_acl_xattr_list return value
  vfs: Check attribute names in posix acl xattr handers

8 years agoMerge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim...
Linus Torvalds [Sat, 14 Nov 2015 01:35:48 +0000 (17:35 -0800)]
Merge branch 'libnvdimm-fixes' of git://git./linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm fixes from Dan Williams:

 - three fixes tagged for -stable including a crash fix, simple
   performance tweak, and an invalid i/o error.

 - build regression fix for the nvdimm unit tests

 - nvdimm documentation update

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  dax: fix __dax_pmd_fault crash
  libnvdimm: documentation clarifications
  libnvdimm, pmem: fix size trim in pmem_direct_access()
  libnvdimm, e820: fix numa node for e820-type-12 pmem ranges
  tools/testing/nvdimm, acpica: fix flag rename build breakage

8 years agof2fs: xattr simplifications
Andreas Gruenbacher [Sun, 4 Oct 2015 17:18:54 +0000 (19:18 +0200)]
f2fs: xattr simplifications

Now that the xattr handler is passed to the xattr handler operations, we
have access to the attribute name prefix, so simplify
f2fs_xattr_generic_list.

Also, f2fs_xattr_advise_list is only ever called for
f2fs_xattr_advise_handler; there is no need to double check for that.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Changman Lee <cm224.lee@samsung.com>
Cc: Chao Yu <chao2.yu@samsung.com>
Cc: linux-f2fs-devel@lists.sourceforge.net
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years agosquashfs: xattr simplifications
Andreas Gruenbacher [Sun, 4 Oct 2015 17:18:53 +0000 (19:18 +0200)]
squashfs: xattr simplifications

Now that the xattr handler is passed to the xattr handler operations, we
have access to the attribute name prefix, so simplify the squashfs xattr
handlers a bit.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Phillip Lougher <phillip@squashfs.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years ago9p: xattr simplifications
Andreas Gruenbacher [Sun, 4 Oct 2015 17:18:52 +0000 (19:18 +0200)]
9p: xattr simplifications

Now that the xattr handler is passed to the xattr handler operations, we
can use the same get and set operations for the user, trusted, and security
xattr namespaces.  In those namespaces, we can access the full attribute
name by "reattaching" the name prefix the vfs has skipped for us.  Add a
xattr_full_name helper to make this obvious in the code.

For the "system.posix_acl_access" and "system.posix_acl_default"
attributes, handler->prefix is the full attribute name; the suffix is the
empty string.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Cc: v9fs-developer@lists.sourceforge.net
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years agoxattr handlers: Pass handler to operations instead of flags
Andreas Gruenbacher [Sun, 4 Oct 2015 17:18:51 +0000 (19:18 +0200)]
xattr handlers: Pass handler to operations instead of flags

The xattr_handler operations are currently all passed a file system
specific flags value which the operations can use to disambiguate between
different handlers; some file systems use that to distinguish the xattr
namespace, for example.  In some oprations, it would be useful to also have
access to the handler prefix.  To allow that, pass a pointer to the handler
to operations instead of the flags value alone.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years agojffs2: Add missing capability check for listing trusted xattrs
Andreas Gruenbacher [Sun, 4 Oct 2015 17:18:50 +0000 (19:18 +0200)]
jffs2: Add missing capability check for listing trusted xattrs

The vfs checks if a task has the appropriate access for get and set
operations, but it cannot do that for the list operation; the file system
must check for that itself.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years agohfsplus: Remove unused xattr handler list operations
Andreas Gruenbacher [Sun, 4 Oct 2015 17:18:49 +0000 (19:18 +0200)]
hfsplus: Remove unused xattr handler list operations

The list operations can never be called; they are even documented to be
unused.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years agoubifs: Remove unused security xattr handler
Andreas Gruenbacher [Sun, 4 Oct 2015 17:18:48 +0000 (19:18 +0200)]
ubifs: Remove unused security xattr handler

Ubifs installs a security xattr handler in sb->s_xattr but doesn't use the
generic_{get,set,list,remove}xattr inode operations needed for processing
this list of attribute handlers; the handler is never called.  Instead,
ubifs uses its own xattr handlers which also process security xattrs.

Remove the dead code.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-mtd@lists.infradead.org
Cc: Subodh Nijsure <snijsure@grid-net.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years agovfs: Fix the posix_acl_xattr_list return value
Andreas Gruenbacher [Tue, 3 Nov 2015 14:25:08 +0000 (15:25 +0100)]
vfs: Fix the posix_acl_xattr_list return value

When a filesystem that contains POSIX ACLs is mounted without ACL support
(-o noacl), the appropriate behavior is not to list any existing POSIX ACL
xattrs.  The return value for list xattr handlers in this case is 0, not an
error code: several filesystems that use the POSIX ACL xattr handlers do
not expect the list operation to fail.

Symlinks cannot have ACLs, so posix_acl_xattr_list will never be called for
symlinks in the first place.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years agovfs: Check attribute names in posix acl xattr handers
Andreas Gruenbacher [Tue, 3 Nov 2015 14:25:07 +0000 (15:25 +0100)]
vfs: Check attribute names in posix acl xattr handers

The get and set operations of the POSIX ACL xattr handlers failed to check
the attribute names, so all names with "system.posix_acl_access" or
"system.posix_acl_default" as a prefix were accepted.  Reject invalid names
from now on.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years agoMerge tag 'vfio-v4.4-rc1' of git://github.com/awilliam/linux-vfio
Linus Torvalds [Sat, 14 Nov 2015 01:05:32 +0000 (17:05 -0800)]
Merge tag 'vfio-v4.4-rc1' of git://github.com/awilliam/linux-vfio

Pull VFIO updates from Alex Williamson:
 - Use kernel interfaces for VPD emulation (Alex Williamson)
 - Platform fix for releasing IRQs (Eric Auger)
 - Type1 IOMMU always advertises PAGE_SIZE support when smaller mapping
   sizes are available (Eric Auger)
 - Platform fixes for incorrectly using copies of structures rather than
   pointers to structures (James Morse)
 - Rework platform reset modules, fix leak, and add AMD xgbe reset
   module (Eric Auger)
 - Fix vfio_device_get_from_name() return value (Joerg Roedel)
 - No-IOMMU interface (Alex Williamson)
 - Fix potential out of bounds array access in PCI config handling (Dan
   Carpenter)

* tag 'vfio-v4.4-rc1' of git://github.com/awilliam/linux-vfio:
  vfio/pci: make an array larger
  vfio: Include No-IOMMU mode
  vfio: Fix bug in vfio_device_get_from_name()
  VFIO: platform: reset: AMD xgbe reset module
  vfio: platform: reset: calxedaxgmac: fix ioaddr leak
  vfio: platform: add dev_info on device reset
  vfio: platform: use list of registered reset function
  vfio: platform: add compat in vfio_platform_device
  vfio: platform: reset: calxedaxgmac: add reset function registration
  vfio: platform: introduce module_vfio_reset_handler macro
  vfio: platform: add capability to register a reset function
  vfio: platform: introduce vfio-platform-base module
  vfio/platform: store mapped memory in region, instead of an on-stack copy
  vfio/type1: handle case where IOMMU does not support PAGE_SIZE size
  VFIO: platform: clear IRQ_NOAUTOEN when de-assigning the IRQ
  vfio/pci: Use kernel VPD access functions
  vfio: Whitelist PCI bridges

8 years agoMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 14 Nov 2015 00:40:36 +0000 (16:40 -0800)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull SMB3 updates from Steve French:
 "A collection of SMB3 patches adding some reliability features
  (persistent and resilient handles) and improving SMB3 copy offload.

  I will have some additional patches for SMB3 encryption and SMB3.1.1
  signing (important security features), and also for improving SMB3
  persistent handle reconnection (setting ChannelSequence number e.g.)
  that I am still working on but wanted to get this set in since they
  can stand alone"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  Allow copy offload (CopyChunk) across shares
  Add resilienthandles mount parm
  [SMB3] Send durable handle v2 contexts when use of persistent handles required
  [SMB3] Display persistenthandles in /proc/mounts for SMB3 shares if enabled
  [SMB3] Enable checking for continuous availability and persistent handle support
  [SMB3] Add parsing for new mount option controlling persistent handles
  Allow duplicate extents in SMB3 not just SMB3.1.1

8 years agoMerge branch 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
Linus Torvalds [Sat, 14 Nov 2015 00:30:29 +0000 (16:30 -0800)]
Merge branch 'for-linus-4.4' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes and cleanups from Chris Mason:
 "Some of this got cherry-picked from a github repo this week, but I
  verified the patches.

  We have three small scrub cleanups and a collection of fixes"

* 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs: Use fs_info directly in btrfs_delete_unused_bgs
  btrfs: Fix lost-data-profile caused by balance bg
  btrfs: Fix lost-data-profile caused by auto removing bg
  btrfs: Remove len argument from scrub_find_csum
  btrfs: Reduce unnecessary arguments in scrub_recheck_block
  btrfs: Use scrub_checksum_data and scrub_checksum_tree_block for scrub_recheck_block_checksum
  btrfs: Reset sblock->xxx_error stats before calling scrub_recheck_block_checksum
  btrfs: scrub: setup all fields for sblock_to_check
  btrfs: scrub: set error stats when tree block spanning stripes
  Btrfs: fix race when listing an inode's xattrs
  Btrfs: fix race leading to BUG_ON when running delalloc for nodatacow
  Btrfs: fix race leading to incorrect item deletion when dropping extents
  Btrfs: fix sleeping inside atomic context in qgroup rescan worker
  Btrfs: fix race waiting for qgroup rescan worker
  btrfs: qgroup: exit the rescan worker during umount
  Btrfs: fix extent accounting for partial direct IO writes

8 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Fri, 13 Nov 2015 19:56:45 +0000 (11:56 -0800)]
Merge branch 'next' into for-linus

Prepare second round of input updates for 4.3 merge window.

8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Fri, 13 Nov 2015 17:24:40 +0000 (09:24 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

Pull Ceph updates from Sage Weil:
 "There are several patches from Ilya fixing RBD allocation lifecycle
  issues, a series adding a nocephx_sign_messages option (and associated
  bug fixes/cleanups), several patches from Zheng improving the
  (directory) fsync behavior, a big improvement in IO for direct-io
  requests when striping is enabled from Caifeng, and several other
  small fixes and cleanups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  libceph: clear msg->con in ceph_msg_release() only
  libceph: add nocephx_sign_messages option
  libceph: stop duplicating client fields in messenger
  libceph: drop authorizer check from cephx msg signing routines
  libceph: msg signing callouts don't need con argument
  libceph: evaluate osd_req_op_data() arguments only once
  ceph: make fsync() wait unsafe requests that created/modified inode
  ceph: add request to i_unsafe_dirops when getting unsafe reply
  libceph: introduce ceph_x_authorizer_cleanup()
  ceph: don't invalidate page cache when inode is no longer used
  rbd: remove duplicate calls to rbd_dev_mapping_clear()
  rbd: set device_type::release instead of device::release
  rbd: don't free rbd_dev outside of the release callback
  rbd: return -ENOMEM instead of pool id if rbd_dev_create() fails
  libceph: use local variable cursor instead of &msg->cursor
  libceph: remove con argument in handle_reply()
  ceph: combine as many iovec as possile into one OSD request
  ceph: fix message length computation
  ceph: fix a comment typo
  rbd: drop null test before destroy functions

8 years agoMerge tag '4.4-additional' of git://git.lwn.net/linux
Linus Torvalds [Fri, 13 Nov 2015 17:19:05 +0000 (09:19 -0800)]
Merge tag '4.4-additional' of git://git.lwn.net/linux

Pull more documentation updates from Jon Corbet:
 "A few more documentation patches that wandered in and have no reason
  to wait; these include some improvements to the suggestions for email
  clients and patch submission"

* tag '4.4-additional' of git://git.lwn.net/linux:
  Documentation: Add minimal Mutt config for using Gmail
  Documentation: Add note on sending files directly with Mutt
  Documentation: dontdiff: remove media from dontdiff
  Documentation/SubmittingPatches: discuss In-Reply-To
  Remove email address from Documentation/filesystems/overlayfs.txt
  can-doc: Add missing semicolon to example