Commit graph

426768 commits

Author SHA1 Message Date
Arnd Bergmann
1f6e3763d0 ARM: mach-bcm: bcm281xx clock driver
This pull request contains the Broadcom bcm281xx
 clock driver series. This series is being merged
 through the arm-soc tree because there is an
 ordering dependency where the driver *must* be
 merged before the related dts changes. This is
 a result of the bcm281xx dts already containing
 dummy fixed clock nodes that must be updated.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTF/mHAAoJEOfTILNwq7R4+UAP/2JgHOHrwGX1RnGHO+1JY+0M
 N6fW/u9QJ9gV9wTH6vd5mBZisud5JhL8bpec0zobWeEYMpz6/MqVkMv9ilpOpuGU
 2Ol20l7mZibsG8R96yaDL4jy4Ddz84exXLUEug0Asvh6RGPRLC8YK28zjf7nRJkZ
 it7+yvTKQvmKgc1ATizKCzDJUFRqx2ZWnwmLlrtkP5gLB8pD2Qwe74V6h85BiIWC
 OFN0CpuOVAmwj9hQjU7kXY6jDOwMaDTBruJzrmLx4DrMIIrliOeOdI4Y9LMyL/Ih
 jqY3CCcfpjZf6MVu5WplD/Njv00OhFKSpfO/M9mH2IAlzcPl/ekjacqpyaSlkLAW
 l9bjctQFJslk95UYC2GFrLd6BmoMtY73ZDruDFYEhwEmdYUiSxuliOHhqDM/h1Y7
 m8Tx2zyToA6O0Voamq66/iy9LAoyjWBvSMGw7DYDp7yJ1WEB2Zz3TJHfkDLIxUWi
 ZSfvJxuKjCXimxQgQ/+pMomDFKNgWS7Z5Fe1HqSZnI7XAtAd12zmFExaIR0W25D6
 u5R4bdTibLMPdJ9zxA2OKUhedB/BGk6bd1rv0jEvmfGV5hJGAYLw9J/D0n3qs57F
 DffaVmh9uMv/AFbRBWWZUdwt3Qb38qPOiJo3E2d1txwpJ8hoNJOdJT3V1+WkAwQN
 8WYEMYj5k0yTUob523im
 =Kma/
 -----END PGP SIGNATURE-----

Merge tag 'armsoc/for-3.15/drivers' of git://github.com/broadcom/mach-bcm into next/drivers

Merge "ARM: mach-bcm: bcm281xx clock driver" from Matt Porter:

This pull request contains the Broadcom bcm281xx
clock driver series. This series is being merged
through the arm-soc tree because there is an
ordering dependency where the driver *must* be
merged before the related dts changes. This is
a result of the bcm281xx dts already containing
dummy fixed clock nodes that must be updated.

* tag 'armsoc/for-3.15/drivers' of git://github.com/broadcom/mach-bcm:
  clk: bcm281xx: don't disable unused peripheral clocks
  clk: bcm281xx: add initial clock framework support

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-06 05:53:03 +01:00
Punit Agrawal
dc4409c006 drivers: cci: Export CCI PMU revision
The event numbering changed between revision r0 and r1 of the CCI
PMU. Expose this to userspace to allow tooling to handle the
differences in event numbers.

Suggested-by: Drew Richardson <Drew.Richardson@arm.com>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25 19:36:17 +01:00
Punit Agrawal
6fb0c4a742 drivers: cci: Extend support to CCI revisions > r1p2
The driver queries the CCI IP revision to distinguish between r0 and r1
scheme for event numbers and currently supports upto version r1p2. To
minimise code churn every time there's a new version of the IP, assume
that event numbering doesn't change for revisions > r1p0 (which is
the case).

The driver will still need an update for future revisions that change
the event numbers.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25 19:36:16 +01:00
Arnd Bergmann
23453853e4 Merge tag 'qcom-drivers-for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom into next/drivers
Merge "qcom driver changes for v3.15" from Kumar Gala:

We've split Qualcomm MSM support into legacy and multiplatform.  These
drivers are only relevant on the multiplatform supported SoCs so switch the
Kconfig depends to ARCH_QCOM.

* tag 'qcom-drivers-for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom:
  gpio: msm: switch Kconfig to ARCH_QCOM depends
  hwrng: msm: switch Kconfig to ARCH_QCOM depends
  power: reset: msm - switch Kconfig to ARCH_QCOM depends
  drm/msm: drop ARCH_MSM Kconfig depend
  tty: serial: msm: Enable building msm_serial for ARCH_QCOM
2014-02-25 18:10:57 +01:00
Arnd Bergmann
f1a0d58e87 Merge branch 'qcom/cleanup' into next/drivers
* qcom/cleanup:
  ARM: qcom: Rename various msm prefixed functions to qcom
  clocksource: qcom: split building of legacy vs multiplatform support
  ARM: qcom: Split Qualcomm support into legacy and multiplatform
  clocksource: qcom: Move clocksource code out of mach-msm
  ARM: msm: kill off hotplug.c
  ARM: msm: Remove pen_release usage
  ARM: dts: msm: split out msm8660 and msm8960 soc into dts include

This cleanup branch is a dependency for the following qcom driver changes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25 18:09:27 +01:00
Arnd Bergmann
a3f4fdf219 irqchip: VIC: export vic_init_cascaded
vic_init_cascaded is called by integrator impd1 code that can
be a loadable module, so the function has to be exported.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2014-02-25 18:01:43 +01:00
Arnd Bergmann
1e7bdf82ab mvebu watchdog driver changes for v3.15
- orion watchdog
     - cleanup and extend driver to support Armada 370 and Armada XP
 
 Depends:
  - tags/irqchip-mvebu-fixes-3.14 (already pulled by tglx)
     - both are based on v3.14-rc1
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTCEm3AAoJEP45WPkGe8Zn46EP/iII5DaCXy6LES+k5W7Tp3H8
 dFNgKEq/1ifoMFwhehhfB2ySSBwDxNpr1fAIR9qyQLLqamjDtUVpiYBqbyhBwPGz
 0bIJz9W65ibb4f2xEtQTS0DroPlH4EbfolpEqjrJ+zkep316I5KRMY9tzyJoure9
 W+jU9gEo5rnfq+mCGP2+ZlCoO7QAn7/DUGySpe/oEKNQqWbARHutFUy9aIY94X2f
 evo4C4Suei4B+SVLL8+9F6taodwfSuGUV8m75wQeNNyEHr3xvS8MZvDkwYaGGZJe
 VNhvHTUrgU16PaOcq4lZ8Zk7S8ZWt80Y4cu0V/AWuT0oHFyekRGZyHtus/YjxY6G
 TyJjlC8PF8AvlH3E4D6/wAOISdC3sCEYzeFjeNeoyX1RjvZogsC+nCDknGKImBHX
 lo63MC8CSBgPTb4rgj4pbFnnpN4fNO1ppacawmaeIPgX3CvqOJtB1GitD0CMf64w
 oxd9mYWRXjfQzObfMyRlq5WywHN2Hmob5R5C7xR9lwcK5iiq2ibtBb7pGVeVEsYd
 Sg/3A6IKJs1DmLiA7KUiR/jmIJrdBEzGRWfnLgqBlAs+5kTFj6OClGewBg7Lu673
 A+3KjwgCcYzesXdV+88bwtAucA9DoS0gwnarhDCFNn/pDIAQpfq8UIKMxuMqz1Mj
 ep+ZLbXY1T1yNeU1oXN4
 =3VWF
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-watchdog-3.15' of git://git.infradead.org/linux-mvebu into next/drivers

mvebu watchdog driver changes for v3.15

 - orion watchdog
    - cleanup and extend driver to support Armada 370 and Armada XP

Depends:
 - tags/irqchip-mvebu-fixes-3.14 (already pulled by tglx)
    - both are based on v3.14-rc1

* tag 'mvebu-watchdog-3.15' of git://git.infradead.org/linux-mvebu:
  watchdog: orion: Enable the build on ARCH_MVEBU
  watchdog: orion: Add support for Armada 370 and Armada XP SoC
  watchdog: orion: Add per-compatible watchdog start implementation
  watchdog: orion: Add per-compatible clock initialization
  watchdog: orion: Introduce per-compatible of_device_id data
  watchdog: orion: Introduce an orion_watchdog device structure
  watchdog: orion: Remove unneeded BRIDGE_CAUSE clear
  watchdog: orion: Make RSTOUT register a separate resource
  watchdog: orion: Handle the interrupt so it's properly acked
  watchdog: orion: Make sure the watchdog is initially stopped
  watchdog: orion: Remove unused macros
  watchdog: orion: Use atomic access for shared registers
  watchdog: orion: Add clock error handling

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25 17:50:14 +01:00
Arnd Bergmann
96f9d40db8 irqchip mvebu fixes for v3.14
- orion:
     - fixes for clearing bridge cause register, and clearing stale interrupts
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTB8pSAAoJEP45WPkGe8ZnDsMP/0SuXXVsAV9tQJL5Nwtx0WwJ
 bLxYaT09y4//fcsJ7RnZygixxqdTGh721yO8Al7PGf1u5XeOkZWhvIjUatB1D8kP
 7awHqzqM1g+rPVNzM/0sS8KNPz8FahAAvCP6Oynm6YPFE7uxpOPzqwij4r7u/dYE
 OBpZwjRJKomdiI5ixwuuR7uGrLWhPZBtqlptvUyWdElPgaLztStmhOqs0l2AVOqI
 UzuZMwJE/DP5MJ3yCThH0b7+1s3H8OZvkSRAgIHXeU0TNXhsomyh6oOmXsn23LXX
 jkoHfh+FO+XBZZsIEFR2cgJBoIp/NdvcqT9/UiaIdBagKfCtpPCTUqybS/F9qgVt
 2mwUtBXFTzkrAoSUHRLcvlrbhMwmIodHu3TUcHbXyPtTBG7YqoXsCWdr/pTUxmep
 sexZ6kNNdAh1tMfsvnvXdhPZKanuPk9K2vXrasu0oAbUl2Ce0XEhjYDAJ4EhSmox
 9r6LVp9DZytacDaNWzD4NV2hOHixzSSpMk5dg85wGx7c+Ump85ZDxDCHC4w2nLyJ
 2ZH+2vH/5gifTHTHYrkOB0gf9+NVzfs8WXJuMufKg5B3QSudQXkKE+B0I7yhxXdG
 LKSkK2LFMGXfiPGqeW2gWBHfSlodICXY46jHgUeXPEsx6ue3i/xPIWEa4twOrOo5
 uBZc3pDwB7nbQCCgeg8M
 =r7Cd
 -----END PGP SIGNATURE-----

Merge tag 'irqchip-mvebu-fixes-3.14' of git://git.infradead.org/linux-mvebu into next/drivers

irqchip mvebu fixes for v3.14

 - orion:
    - fixes for clearing bridge cause register, and clearing stale interrupts

* tag 'irqchip-mvebu-fixes-3.14' of git://git.infradead.org/linux-mvebu:
  irqchip: orion: Fix getting generic chip pointer.
  irqchip: orion: clear stale interrupts in irq_startup
  irqchip: orion: use handle_edge_irq on bridge irqs
  irqchip: orion: clear bridge cause register on init

This is a dependency for the mvebu watchdog changes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25 17:49:35 +01:00
Arnd Bergmann
8c4a57bcd8 A patch to break dependency of DaVinci NAND
driver with mach-davinci. Required for reuse
 of driver on other platforms (keystone).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJTCtVBAAoJEGFBu2jqvgRNxCgP/1l069OXVUcKRzQ3u80JFJzJ
 s2mGfVtXCf8pRzYFvoz5foWtB4KWOyEGx8dHawZ1dw30ig6mdn+7cy/6hBEjs7c5
 Yw7pCRRsm5OYRasJLpPjZ9jgMkjAnE9hqC7bUjUQoHUtgwSbcMcSuy30oeCALrgh
 6DVizJxbwd5jGWQdIOdreuUs5nWbuuamvQUmDnV6XmPiwU8HMsZ2gB37pkyL1UrM
 lzABRrcg7Xm94592vPYrKtl0wk4whZJZpjaQI94/iPt1H85jP9UPmuJCO0iQuLBj
 2lyogpVtorGr/CnGiMDBYa6ochfTzxFpzeeiGG0cOt6PDcgfCfRaKrrByfQDivpN
 O2kVFSdioGGsjnfM8YFCz+PCDPoCdyyRDzkxd4OAenm7Eo4HWI8rXU+YHTRFxjho
 lIGB85Z2E3cibwzH/mfTSIH/U9u+G0EqCDW8d7CPKVNfUpfgpi87ioNt1/ITFfAn
 ZMNSCzIkjRr1k5kC0XVHERGcWcyE1g+FJtZrKBsM9nZCmJYgqYVQoVCaEYmnpjJG
 fDZ8sDpvrBvdog1yzeRi+7WhFXyqpn5OmhWIIbr8VEG7lw/0JcDouh2Yr8cuwCIf
 ZltbpHab551uYptcM9AzStEOl9BSnKbY3WvirWegso5MkGow26vu2VM5ZQiYzh8B
 /zdGKUmfFOXU0209YQaY
 =8p0V
 -----END PGP SIGNATURE-----

Merge tag 'davinci-for-v3.15/nand' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/drivers

A patch to break dependency of DaVinci NAND
driver with mach-davinci. Required for reuse
of driver on other platforms (keystone).

* tag 'davinci-for-v3.15/nand' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: davinci: aemif: get rid of davinci-nand driver dependency on aemif

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25 17:43:20 +01:00
Kumar Gala
add798a40a gpio: msm: switch Kconfig to ARCH_QCOM depends
We've split Qualcomm MSM support into legacy and multiplatform.  The gpio
msm-v2 driver is only relevant on the multiplatform supported SoCs so
switch the Kconfig depends to ARCH_QCOM.

CC: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Alexandre Courbot <gnurou@gmail.com>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-02-25 09:22:10 -06:00
Alex Elder
1a5823c920 clk: bcm281xx: don't disable unused peripheral clocks
Add the CLK_IGNORE_UNUSED flag when setting up a peripheral clock.
This prevents unused clocks from getting disabled, and by doing
this we can use the common clock code even before we've resolved
all the spots that need to get a reference to their clock.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-02-24 13:50:36 -05:00
Alex Elder
1f27f15258 clk: bcm281xx: add initial clock framework support
Add code for device tree support of clocks in the BCM281xx family of
SoCs.  Machines in this family use peripheral clocks implemented by
"Kona" clock control units (CCUs).  (Other Broadcom SoC families use
Kona style CCUs as well, but support for them is not yet upstream.)

A BCM281xx SoC has multiple CCUs, each of which manages a set of
clocks on the SoC.  A Kona peripheral clock is composite clock that
may include a gate, a parent clock multiplexor, and zero, one
or two dividers.  There is a variety of gate types, and many gates
implement hardware-managed gating (often called "auto-gating").
Most dividers divide their input clock signal by an integer value
(one or more).  There are also "fractional" dividers which allow
division by non-integer values.  To accomodate such dividers,
clock rates and dividers are generally maintained by the code in
"scaled" form, which allows integer and fractional dividers to
be handled in a uniform way.

If present, the gate for a Kona peripheral clock must be enabled
when a change is made to its multiplexor or one of its dividers.
Additionally, dividers and multiplexors have trigger registers which
must be used whenever the divider value or selected parent clock is
changed.  The same trigger is often used for a divider and
multiplexor, and a BCM281xx peripheral clock occasionally has two
triggers.

The gate, dividers, and parent clock selector are treated in this
code as "components" of a peripheral clock.  Their functionality is
implemented directly--e.g. the common clock framework gate
implementation is not used for a Kona peripheral clock gate.  (This
has being considered though, and the intention is to evolve this
code to leverage common code as much as possible.)

The source code is divided into three general portions:

    drivers/clk/bcm/clk-kona.h
    drivers/clk/bcm/clk-kona.c
        These implement the basic Kona clock functionality,
        including the clk_ops methods and various routines to
        manipulate registers and interpret their values.  This
        includes some functions used to set clocks to a desired
        initial state (though this feature is only partially
        implemented here).

    drivers/clk/bcm/clk-kona-setup.c
        This contains generic run-time initialization code for
        data structures representing Kona CCUs and clocks.  This
        encapsulates the clock structure initialization that can't
        be done statically.  Note that there is a great deal of
        validity-checking code here, making explicit certain
        assumptions in the code.   This is mostly useful for adding
        new clock definitions and could possibly be disabled for
        production use.

    drivers/clk/bcm/clk-bcm281xx.c
        This file defines the specific CCUs used by BCM281XX family
        SoCs, as well as the specific clocks implemented by each.
        It declares a device tree clock match entry for each CCU
        defined.

    include/dt-bindings/clock/bcm281xx.h
        This file defines the selector (index) values used to
        identify a particular clock provided by a CCU.  It consists
        entirely of C preprocessor constants, to be used by both the
        C source and device tree source files.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-02-24 13:43:46 -05:00
Ivan Khoronzhuk
67f5185cad ARM: davinci: aemif: get rid of davinci-nand driver dependency on aemif
The problem that the set timings code contains the call of Davinci
platform function davinci_aemif_setup_timing() which is not
accessible if kernel is built for another platform like Keystone.

The Keysone platform is going to use TI AEMIF driver.
If TI AEMIF is used we don't need to set timings and bus width.
It is done by AEMIF driver.

To get rid of davinci-nand driver dependency on aemif platform code
we moved aemif code to davinci platform.

The platform AEMIF code (aemif.c) has to be removed once Davinci
will be converted to DT and use ti-aemif.c driver.

Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
[nsekhar@ti.com: fixed checkpatch error and a build breakage due to
		 missing include, rebased onto l2-mtd/master]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2014-02-23 20:33:18 +05:30
Ezequiel Garcia
59416745bb watchdog: orion: Enable the build on ARCH_MVEBU
After adding support for Armada 370/XP SoC let's enable the build on
these platforms.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:44:34 +00:00
Ezequiel Garcia
463f96e0cd watchdog: orion: Add support for Armada 370 and Armada XP SoC
Using the added infrastructure for handling SoC differences,
this commit adds support for the watchdog controller available
in Armada 370 and Armada XP SoCs.

Also, and because the AXP clock initialization uses of_clk_get_by_name,
this commit changes the orion clock initialization to use clk_get() and
adds a proper clk_put() on the common exit/error paths.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:44:19 +00:00
Ezequiel Garcia
490d8e3cbf watchdog: orion: Add per-compatible watchdog start implementation
To handle differences between SoCs this commit adds per-compatible
string start() function for the watchdog kick-off. This is preparation
work and makes no functionality changes to the current driver.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:44:11 +00:00
Ezequiel Garcia
1924227bcd watchdog: orion: Add per-compatible clock initialization
Following the introduction of the compatible-data field,
it's now possible to further abstract the clock initialization.
This will allow to support SoC with a different clock setup.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:44:02 +00:00
Ezequiel Garcia
fc723856a4 watchdog: orion: Introduce per-compatible of_device_id data
This commit adds an orion_watchdog_data structure to hold compatible-data
information. This allows to remove the driver-wide definition and to
be able to add support for multiple compatible-strings in the future.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:43:54 +00:00
Ezequiel Garcia
b89a9c400b watchdog: orion: Introduce an orion_watchdog device structure
In order to prepare to support multiple compatible-strings, this
commit adds a device structure to hold the driver's state.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:43:45 +00:00
Ezequiel Garcia
40edc9813b watchdog: orion: Remove unneeded BRIDGE_CAUSE clear
After adding the IRQ request, the BRIDGE_CAUSE bit should be cleared by the
bridge interrupt controller. There's no longer a need to do it in the watchdog
driver, so we can simply remove it.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:43:36 +00:00
Ezequiel Garcia
868eb61602 watchdog: orion: Make RSTOUT register a separate resource
In order to support other SoC, it's required to distinguish
the 'control' timer register, from the 'rstout' register
that enables system reset on watchdog expiration.

To prevent a compatibility break, this commit adds a fallback
to a hardcoded RSTOUT address.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:43:23 +00:00
Ezequiel Garcia
e97662e1e2 watchdog: orion: Handle the interrupt so it's properly acked
DT-enabled plaforms, where the irqchip driver for the brigde interrupt
controller is available, can handle the watchdog IRQ properly. Therefore,
request the interrupt and add a dummy handler that merely calls panic().

This is done in order to have an initial 'ack' of the interruption,
which clears the watchdog state.

Furthermore, since some platforms don't have such IRQ, this commit
makes the interrupt specification optional.

Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:43:12 +00:00
Ezequiel Garcia
d9d0c53dac watchdog: orion: Make sure the watchdog is initially stopped
Having the watchdog initially fully stopped is important to avoid
any spurious watchdog triggers, in case the registers are not in
its reset state.

If the watchdog rstout is enabled and the watchdog counter running,
this initial stop is not performed, to comply with the 'nowayout'
parameter.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:43:01 +00:00
Ezequiel Garcia
e0e931ac15 watchdog: orion: Remove unused macros
These are not used anywhere so it's safe to remove them.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:42:50 +00:00
Ezequiel Garcia
fc8cd2ac0a watchdog: orion: Use atomic access for shared registers
Since the timer control register is shared with the clocksource driver,
use the recently introduced atomic_io_clear_set() to access such register.
Given the watchdog core already provides serialization for all the
watchdog ops, this commit allows to remove the spinlock entirely.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:42:42 +00:00
Ezequiel Garcia
bb02c662d6 watchdog: orion: Add clock error handling
This commit adds a check for clk_prepare_enable success and introduces
an error path to disable the clock properly.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22 03:42:25 +00:00
Olof Johansson
b5feaefb45 Integrator/Versatile base patch stack for the v3.15 series:
- Move integrator clock definitions to the device tree, alter
   clock and timer drivers accordingly.
 
 - Alter the VIC irqchip driver to support cascaded VICs off
   a parent IRQ controller.
 
 - Update the IM-PD1 plugin code to use managed resources.
 
 - Register the VIC on the IM-PD1.
 
 - Select the PL061 GPIO block for the IM-PD1 on the
   Integrator/AP.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJS/J2oAAoJEEEQszewGV1zkTYP/RCvXqFHsMONrQLtIVCcf0Yp
 Hzr4+hsfXZBTAGR5kvsxCeu/BNbyEEdm85Nqe6S1ehcGyZ5RWieqN1NgA7sCHZCu
 rJzBC6cJXRa+8r5i+IdjmpVhftV9d1DP6aTM2Z0GpNyhuefQTUskNA2w4ltVEfLz
 mJ7xwoRURXGVY/vmlyBTnDaPv8J7jFGdxUyYoQtH/MRWsuiBCuiSUXYn0FmHEjeC
 KG8ETTjQbZxjl2ewDrbv8S+U2Xu0DLn1iKTZbwpSyfYlIQM+FoBvJ8RHIAVTz3AK
 bWYSq+C0yghupejiZ9JUoqWL7c2Lq8ijaX5yzwhV6EKuVvD4tem23jO/SIObmIgp
 3ruobAwE5VWq2PPDD/FWL6WYbWulE9MhLAzIZuWowIMQpGezey9CPt4E9HLAhQTM
 akaX3nbFVkpp10ptcYm4p3DIEZklusf/1wC78b5p+kOOlqNI2uip7vI+caWJmyVJ
 wdyCaB2QXu45B7Eil7iZwkZqzoVO3+jVcINrhh3sG/BeyKXQYmTEZ73CSboik9uT
 kI9RWPSHrLVogSnBAHVnXsEvFnH1shzYTsv4xozRll4Zy7kVTl3Kdm4Od/GY+hSl
 SSLKXaVUePjbPokpiuUZbrQHZU53qCFgsATJWFngekIwI7FL/oRohKiSSgFD7CkF
 OfUKlAimgolxDi0inHJ2
 =a4vs
 -----END PGP SIGNATURE-----

Merge tag 'integrator-for-v3.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/drivers

Merge "Integrator/Versatile base patch stack for the v3.15 series"
from Linus Walleij:

"this is a set of patches I have sent for review and failed to get ACKs
from the proper subsystem maintainers after repeated pings. However I
now need to have this rotated in linux-next as a base for multiplatform,
so please pull it in, it is all ARM drivers anyway. Russell pointed out
some things and these have been fixed and iterated in this series."

- Move integrator clock definitions to the device tree, alter
  clock and timer drivers accordingly.

- Alter the VIC irqchip driver to support cascaded VICs off
  a parent IRQ controller.

- Update the IM-PD1 plugin code to use managed resources.

- Register the VIC on the IM-PD1.

- Select the PL061 GPIO block for the IM-PD1 on the
  Integrator/AP.

* tag 'integrator-for-v3.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
  ARM: integrator: select GPIO block
  ARM: integrator: register the IM-PD1 VIC
  ARM: integrator: use managed resources for the IM-PD1
  irqchip: support cascaded VICs
  irqchip: vic: update the base IRQ member correctly
  clk: versatile: respect parent rate in ICST clock
  clk: versatile: pass a parent to the ICST clock
  ARM: integrator: switch to fetch clocks from device tree
  ARM: SP804: make Integrator/CP timer pick clock from DT
  ARM: integrator: define clocks in the device trees

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-02-21 14:45:36 -08:00
Andrew Lunn
d86e9af633 irqchip: orion: Fix getting generic chip pointer.
Enabling SPARSE_IRQ shows up a bug in the irq-orion bridge interrupt
handler. The bridge interrupt is implemented using a single generic
chip. Thus the parameter passed to irq_get_domain_generic_chip()
should always be zero.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Fixes: 9dbd90f17e ("irqchip: Add support for Marvell Orion SoCs")
Cc: <stable@vger.kernel.org> # v3.11+
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-21 21:46:56 +00:00
Kumar Gala
2257ffbca7 hwrng: msm: switch Kconfig to ARCH_QCOM depends
We've split Qualcomm MSM support into legacy and multiplatform.  The RNG
driver is only relevant on the multiplatform supported SoCs so switch the
Kconfig depends to ARCH_QCOM.

Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
CC: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-02-21 09:27:25 -06:00
Olof Johansson
58035fcc94 Renesas ARM Based SoC Updates for v3.15
* r7s72100 SoC (RZ/A1H)
   - Add i2c clocks (portion missing from previous patch due to miss-merge)
 
 * r8a7791 (R-Car M2)
   - Add SATA clocks
   - Add ZS clock
   - Wait for status on all MSTP clocks
  -- Add I2C and VIN clocks
 
 * r8a7790 (R-Car H2)
   - Add PCI USB host clock support
   - Add Audio DMAC, SATA and VIN clocks
   - Add Audio DMAC support
 
 * r8a7779 (R-Car H1)
   - Wait for status on selected MSTP clocks
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJS8yO9AAoJENfPZGlqN0++nzMP/RR48DSawwNaFusAjNbeAZz1
 OxmcXefuy1WOBgH0yW94VYsC2aulssNq9LXciGGE/uTjbXth7cV65tyHbfp73BCr
 xMeFhmWbRtUZ17uq1QEckevQjEy/KAtADzXSY2bbIjIBXtBRCW2L8aTAVbNYYXZl
 Etltuta+BZggwlCQjZ3Z/lct25rB5aZMQWTRtp2rHSh+EayYgxMgY4AXw5gByEE6
 xWQO+9uKKaLisE0clzDTZ3gFahJsaBVtyvDKq4olYZGtFrnqOilb22JTs6g0+W3+
 iiAPHeeonAI5RP5Vyw35vaFJyVZ85Qoa49zBqQPvkrs1LXC+FPGLpFnHn4aTDK15
 nxGnmilVMhgI3yhrSGBj6qne584dctP103uVhe1CBULWx0T3fcWOK4FZPqLAJyty
 fr35u2QIAn1LRXPsqx+vzRle7iwS7oYwrjw9kvBRj0XRMd/XVabb/Po094VeQ7rZ
 rO+64ssESC1eb6qxyQJIPIRQO8qANeV0pc3XBV+5fVhI+rSBaUonH0OYNd3fXxMb
 V+EFpNkDOX7f7lIzpOxZmYTmCQ3K1ESzbhjP3zkUZqy2YRqWdz64uDTgk0zHvBh2
 ijKoohb+FlG8YKeZQU1nRiID3X4dZLTeXurBu4/xFVAh95JC3OWNrmeueip3yxJv
 uYWnHcvZIV3J3/gvc5Ly
 =T5hu
 -----END PGP SIGNATURE-----

Merge tag 'renesas-soc-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

Merge "Renesas ARM Based SoC Updates for v3.15" from Simon Horman:

* r7s72100 SoC (RZ/A1H)
  - Add i2c clocks (portion missing from previous patch due to miss-merge)

* r8a7791 (R-Car M2)
  - Add SATA clocks
  - Add ZS clock
  - Wait for status on all MSTP clocks
 -- Add I2C and VIN clocks

* r8a7790 (R-Car H2)
  - Add PCI USB host clock support
  - Add Audio DMAC, SATA and VIN clocks
  - Add Audio DMAC support

* r8a7779 (R-Car H1)
  - Wait for status on selected MSTP clocks

* tag 'renesas-soc-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7790: Add PCI USB host clock support
  ARM: shmobile: r7s72100: really add i2c clocks
  ARM: shmobile: r8a7791: Add SATA clocks
  ARM: shmobile: r8a7791: Add ZS clock
  ARM: shmobile: r8a7790: Add SATA clocks
  ARM: shmobile: r8a7790: Add VIN clock support
  ARM: shmobile: r8a7790: add Audio DMAC support
  ARM: shmobile: r8a7790: add Audio DMAC clock
  ARM: shmobile: r8a7791: Wait for status on all MSTP clocks
  ARM: shmobile: r8a7791: Add VIN clocks
  ARM: shmobile: r8a7791: Add I2C clocks
  ARM: shmobile: r8a7790: Wait for status on all MSTP clocks
  ARM: shmobile: r8a7779: Wait for status on selected MSTP clocks
  ARM: shmobile: wait for MSTP clock status to toggle, when enabling it
2014-02-20 00:34:58 -08:00
Linus Torvalds
805937cf45 Miscellaneous ext4 bug fixes for v3.14
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJTA56tAAoJENNvdpvBGATwgrYQAKKWtbMT3xUHJE5Et4//0Pep
 Wn1c8icQDqz+Y1C0L6ELZbY8rQaYb2cQxuf6kJAa7KJHF4lVCa8LzW+VG6S+z+Fy
 +HSoi3eaS/IWzP+eZSE71u+MPN+tdURg5n305/YP40r7OH5lzsQT7LRKosifJwFc
 t+B7lz6XwpgPQ4ooDEMNAHwTaxcocSYlmQqRUgiMsEwqOvskm+CWswB+piPrOzaH
 kyNNIKwds6UH4hVhWEwPk7IrOS6VXe0IlgpkNZM1AOW6DWJ3SNF0qGeH5/e4pG+O
 xpv8UvVej7QJWMyLGPE8z1NBCZ7P57nFOfeiag3Xuvgl/q3WB+5Ye/UZk6DNUaAF
 h2SqS8D4rHuYB9n5izfIDtqJQZ69jbt2dDzTW9a88OVvN1UScaqh++2GeX2OJ/V8
 W6XkOE/g1atO7SyAOaH9RD3D/8+Dp3DZZxocZ4G+/SoKETF8/RboLxyeozoRima2
 FFPaqS105W7b9+QdG1avOlod+0E4wU8gw5kKKuFdAoAjFXaQ+u3R+87w5r8G5alU
 BO+Trf4CTWMLZQv40HEcgDEeF1Nggd48+3GG3oiUmch9qRAZjwyk6gxLvDo1673e
 CcAXpITLn3qPDVzWu/rba8uxRr95PFpXLQ9V8it8b9rWPogodoKg+A7v0Ro/n7bR
 MszulL/GyP1isllyO+Ku
 =XNON
 -----END PGP SIGNATURE-----

Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:
 "Miscellaneous ext4 bug fixes for v3.14"

* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  jbd2: fix use after free in jbd2_journal_start_reserved()
  ext4: don't leave i_crtime.tv_sec uninitialized
  ext4: fix online resize with a non-standard blocks per group setting
  ext4: fix online resize with very large inode tables
  ext4: don't try to modify s_flags if the the file system is read-only
  ext4: fix error paths in swap_inode_boot_loader()
  ext4: fix xfstest generic/299 block validity failures
2014-02-18 10:04:09 -08:00
Dan Carpenter
92e3b40537 jbd2: fix use after free in jbd2_journal_start_reserved()
If start_this_handle() fails then it leads to a use after free of
"handle".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
2014-02-17 20:33:01 -05:00
Linus Torvalds
87eeff7974 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph fixes from Sage Weil:
 "We have some patches fixing up ACL support issues from Zheng and
  Guangliang and a mount option to enable/disable this support.  (These
  fixes were somewhat delayed by the Chinese holiday.)

  There is also a small fix for cached readdir handling when directories
  are fragmented"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: fix __dcache_readdir()
  ceph: add acl, noacl options for cephfs mount
  ceph: make ceph_forget_all_cached_acls() static inline
  ceph: add missing init_acl() for mkdir() and atomic_open()
  ceph: fix ceph_set_acl()
  ceph: fix ceph_removexattr()
  ceph: remove xattr when null value is given to setxattr()
  ceph: properly handle XATTR_CREATE and XATTR_REPLACE
2014-02-17 13:51:00 -08:00
Linus Torvalds
351a7934c0 Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fixes from Steve French:
 "Three cifs fixes, the most important fixing the problem with passing
  bogus pointers with writev (CVE-2014-0069).

  Two additional cifs fixes are still in review (including the fix for
  an append problem which Al also discovered)"

* 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
  CIFS: Fix too big maxBuf size for SMB3 mounts
  cifs: ensure that uncached writes handle unmapped areas correctly
  [CIFS] Fix cifsacl mounts over smb2 to not call cifs
2014-02-17 13:50:11 -08:00
David Howells
7026f1929e FS-Cache: Handle removal of unadded object to the fscache_object_list rb tree
When FS-Cache allocates an object, the following sequence of events can
occur:

 -->fscache_alloc_object()
    -->cachefiles_alloc_object() [via cache->ops->alloc_object]
    <--[returns new object]
    -->fscache_attach_object()
    <--[failed]
    -->cachefiles_put_object() [via cache->ops->put_object]
       -->fscache_object_destroy()
          -->fscache_objlist_remove()
             -->rb_erase() to remove the object from fscache_object_list.

resulting in a crash in the rbtree code.

The problem is that the object is only added to fscache_object_list on
the success path of fscache_attach_object() where it calls
fscache_objlist_add().

So if fscache_attach_object() fails, the object won't have been added to
the objlist rbtree.  We do, however, unconditionally try to remove the
object from the tree.

Thanks to NeilBrown for finding this and suggesting this solution.

Reported-by: NeilBrown <neilb@suse.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: (a customer of) NeilBrown <neilb@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-02-17 13:47:35 -08:00
Dave Jones
416e2abd92 reiserfs: fix utterly brain-damaged indentation.
This has been this way for years, and every time I stumble across it I
lose my lunch.  After coming across it for the nth time in the Coverity
results, I had to overcome the bystander effect and do something about
it.

This ignores the 79 column limit in favor of making it look like C
instead of gibberish.

The correct thing to do here would be to lose some of the indentation by
breaking this function up into several smaller ones.  I might do that at
some point if I have the stomach to look at this again.

(Also some of those overlong ternary operations would likely be more
readable as regular if's)

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-02-17 13:46:33 -08:00
Linus Torvalds
60f76eab19 Small dma-buf pull request for 3.14
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTAgaqAAoJEAG+/NWsLn5b+vAP/1te3UC4H6QvjLTfp+CLLPyM
 pSo0jDC/JP4MdkPajiI8ALGkCtO0TWoL+aoG+i+icUKoPx9Pjo+c8nmfgVzcpWeg
 FeVyq8zWL4akLQJIgypNOpX27sJ0jPHaCyct70+c8LdGHeJErIczrKWznh8MLHj4
 57Y2jm/3ge98Ib9rNy3+Bo2IrnyKjggKOq9/y0W0pYkACI+MuOioSsziw9fq0rKW
 yWe6XJg1L22Qd0tkm+tBfUQZxzJNX+rpGDVBqFib02jVOrcH6uGRamoxdPQSck51
 SUroKBYhLWYVYcTP/zu7JRMWk9Zcqwjv9CdzSi/GEA3775Py26SNoBcncTzKUj8L
 XsWFafFuA6RIOd7yArfq24vsv9x0YycK+uqlZi+AvjyZFxUqB2s9k5Y/u5LA8qeY
 XZj78zkPBGt/a6IjjwfBTo5xIQ15VoO5hvhUbKxuKvXZhMZKmtuE0oDzjPNe3Gc+
 C3CgJISAzCFZuw+THbvztCxCp5ydNkCn/SNCU3gNnH/nC0Lw2iK2+EASXJzb7Cc/
 10gazyXX9N3Ac8NXuBpHXbQaAPgll8/ArG2CvMkDqvjIMf04Gz5WWnsQ/RQjaI0y
 gRA4EcsMNTsQ5IH9f6kM2LAPbPeeyNbd13LGYL/yCZy/dn3C9rkPREno490e2XYA
 8ST+uKjzaIcFB+FHbHSS
 =TtdN
 -----END PGP SIGNATURE-----

Merge tag 'dma-buf-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf

Pull dma-buf fix from Sumit Semwal:
 "Just some debugfs output updates.

  There's another patch related to dma-buf, but it'll get upstreamed via
  Greg KH's pull request"

* tag 'dma-buf-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf:
  dma-buf: update debugfs output
2014-02-17 12:42:45 -08:00
Linus Torvalds
2b250395c2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32
Pull AVR32 fixes from Hans-Christian Egtvedt.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
  avr32: add generic vga.h to Kbuild
  avr32: add generic ioremap_wc() definition in io.h
  avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use
  avr32: fix missing module.h causing build failure in mimc200/fram.c
2014-02-17 12:40:36 -08:00
Yan, Zheng
4d5f5df673 ceph: fix __dcache_readdir()
If directory is fragmented, readdir() read its dirfrags one by one.
After reading all dirfrags, the corresponding dentries are sorted in
(frag_t, off) order in the dcache. If dentries of a directory are all
cached, __dcache_readdir() can use the cached dentries to satisfy
readdir syscall. But when checking if a given dentry is after the
position of readdir, __dcache_readdir() compares numerical value of
frag_t directly. This is wrong, it should use ceph_frag_compare().

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 12:37:13 -08:00
Sage Weil
45195e42c7 ceph: add acl, noacl options for cephfs mount
Make the 'acl' option dependent on having ACL support compiled in.  Make
the 'noacl' option work even without it so that one can always ask it to
be off and not error out on mount when it is not supported.

Signed-off-by: Guangliang Zhao <lucienchao@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-17 12:37:12 -08:00
Guangliang Zhao
c969d9bf91 ceph: make ceph_forget_all_cached_acls() static inline
Signed-off-by: Guangliang Zhao <lucienchao@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-17 12:37:12 -08:00
Yan, Zheng
b20a95a0dd ceph: add missing init_acl() for mkdir() and atomic_open()
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 12:37:11 -08:00
Yan, Zheng
7a92d64760 ceph: fix ceph_set_acl()
If acl is equivalent to file mode permission bits, ceph_set_acl()
needs to remove any existing acl xattr. Use __ceph_setxattr() to
handle both setting and removing acl xattr cases, it doesn't return
-ENODATA when there is no acl xattr.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 12:37:11 -08:00
Yan, Zheng
524186ace6 ceph: fix ceph_removexattr()
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 12:37:10 -08:00
Yan, Zheng
bcdfeb2eb4 ceph: remove xattr when null value is given to setxattr()
For the setxattr request, introduce a new flag CEPH_XATTR_REMOVE
to distinguish null value case from the zero-length value case.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 12:37:09 -08:00
Yan, Zheng
fbc0b970dd ceph: properly handle XATTR_CREATE and XATTR_REPLACE
return -EEXIST if XATTR_CREATE is set and xattr alread exists.
return -ENODATA if XATTR_REPLACE is set but xattr does not exist.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 12:37:05 -08:00
Linus Torvalds
f2a77abdb8 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Ben Herrenschmidt:
 "Here are some more powerpc fixes for 3.14

  The main one is a nasty issue with the NUMA balancing support which
  requires a small generic change and the addition of a new accessor to
  set _PAGE_NUMA.  Both have been reviewed and acked by Mel and Rik.

  The changelog should have plenty of details but basically, without
  this fix, we get random user segfaults and/or corruptions due to
  missing TLB/hash flushes.  Aneesh series of 3 patches fixes it.

  We have some vDSO vs.  perf fixes from Anton, some small EEH fixes
  from Gavin, a ppc32 regression vs the stack overflow detector, and a
  fix for the way we handle PCIe host bridge speed settings on pseries
  (which is needed for proper operations of AMD graphics cards on
  Power8)"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/eeh: Disable EEH on reboot
  powerpc/eeh: Cleanup on eeh_subsystem_enabled
  powerpc/powernv: Rework EEH reset
  powerpc: Use unstripped VDSO image for more accurate profiling data
  powerpc: Link VDSOs at 0x0
  mm: Use ptep/pmdp_set_numa() for updating _PAGE_NUMA bit
  mm: Dirty accountable change only apply to non prot numa case
  powerpc/mm: Add new "set" flag argument to pte/pmd update function
  powerpc/pseries: Add Gen3 definitions for PCIE link speed
  powerpc/pseries: Fix regression on PCI link speed
  powerpc: Set the correct ksp_limit on ppc32 when switching to irq stack
2014-02-17 12:36:49 -08:00
Linus Torvalds
e4178d809f printk: fix syslog() overflowing user buffer
This is not a buffer overflow in the traditional sense: we don't
overflow any *kernel* buffers, but we do mis-count the amount of data we
copy back to user space for the SYSLOG_ACTION_READ_ALL case.

In particular, if the user buffer is too small to hold everything, and
*if* there is a continuation line at just the right place, we can end up
giving the user more data than he asked for.

The reason is that we first count up the number of bytes all the log
records contains, then we walk the records again until we've skipped the
records at the beginning that won't fit, and then we walk the rest of
the records and copy them to the user space buffer.

And in between that "skip the initial records that won't fit" and the
"copy the records that *will* fit to user space", we reset the 'prev'
variable that contained the record information for the last record not
copied.  That meant that when we started copying to user space, we now
had a different character count than what we had originally calculated
in the first record walk-through.

The fix is to simply not clear the 'prev' flags value (in both cases
where we had the same logic: syslog_print_all and kmsg_dump_get_buffer:
the latter is used for pstore-like dumping)

Reported-and-tested-by: Debabrata Banerjee <dbanerje@akamai.com>
Acked-by: Kay Sievers <kay@vrfy.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-02-17 12:24:45 -08:00
Chen Gang
d7668f9d44 avr32: add generic vga.h to Kbuild
Need add generic "vga.h", or can not pass building for allmodconfig,
the related error:

    CC [M]  drivers/gpu/drm/drm_irq.o
  In file included from include/linux/vgaarb.h:34,
                   from drivers/gpu/drm/drm_irq.c:42:
  include/video/vga.h:22:21: error: asm/vga.h: No such file or directory

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Acked-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
2014-02-17 11:24:48 +01:00
Chen Gang
1bbce4f3d1 avr32: add generic ioremap_wc() definition in io.h
Need generic ioremap_wc(), or can not pass compiling with allmodconfig,
the related error:

    CC [M]  drivers/gpu/drm/drm_bufs.o
  drivers/gpu/drm/drm_bufs.c: In function 'drm_addmap_core':
  drivers/gpu/drm/drm_bufs.c:217: error: implicit declaration of function 'ioremap_wc'
  drivers/gpu/drm/drm_bufs.c:218: warning: assignment makes pointer from integer without a cast

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Acked-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
2014-02-17 11:24:45 +01:00