cascardo/linux.git
10 years agopinctrl: sunxi: Honor GPIO output initial vaules
Chen-Yu Tsai [Thu, 16 Jan 2014 06:34:23 +0000 (14:34 +0800)]
pinctrl: sunxi: Honor GPIO output initial vaules

Some GPIO users, such as fixed-regulator, request GPIO output with
initial value of 1. This was ignored by sunxi driver.

Cc: stable@vger.kernel.org
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: capri: add dependency on OF
Linus Walleij [Thu, 16 Jan 2014 22:41:38 +0000 (23:41 +0100)]
pinctrl: capri: add dependency on OF

As this driver is using pinconf_generic_dt_node_to_map_pin() it
needs to depend on OF so as not to cause build problems on
archs that do not support OF.

Cc: Sherman Yin <syin@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: bcm11351: Enable pinctrl for Broadcom Capri SoCs
Sherman Yin [Sat, 21 Dec 2013 02:13:36 +0000 (18:13 -0800)]
ARM: bcm11351: Enable pinctrl for Broadcom Capri SoCs

Enable pinctrl for Broadcom Capri (BCM281xx) SoCs.

Signed-off-by: Sherman Yin <syin@broadcom.com>
Reviewed-by: Christian Daudt <bcm@fixthebug.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: pinctrl: Add Broadcom Capri pinctrl driver
Sherman Yin [Sat, 21 Dec 2013 02:13:35 +0000 (18:13 -0800)]
ARM: pinctrl: Add Broadcom Capri pinctrl driver

Adds pinctrl driver for Broadcom Capri (BCM281xx) SoCs.

v4: - PINCTRL selected in Kconfig, PINCTRL_CAPRI selected in bcm_defconfig
    - make use of regmap
    - change CAPRI_PIN_UPDATE from macro to inline function.
    - Handle pull-up strength arg in Ohm instead of enum
v3: Re-work driver to be based on generic pin config. Moved config selection
    from Kconfig to bcm_defconfig.
v2: Use hyphens instead of underscore in DT property names.

Signed-off-by: Sherman Yin <syin@broadcom.com>
Reviewed-by: Christian Daudt <bcm@fixthebug.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: Add pinctrl binding for Broadcom Capri SoCs
Sherman Yin [Sat, 21 Dec 2013 02:13:34 +0000 (18:13 -0800)]
pinctrl: Add pinctrl binding for Broadcom Capri SoCs

Adds pinctrl driver devicetree binding for Broadcom Capri (BCM281xx) SoCs.

v4: Changed valid values for "bias-pull-up" property for I2C pins.
    Expanded pin configuration node example.
v3: Use generic pin config properties instead of brcm-specific ones.
    Clarified pin types (standard, i2c, hdmi).
v2: Use hyphens instead of underscore in DT property names.

Device tree bindings maintainers ECG:
           _             _          _        _        _
__________/ \   ________/ \   _____/ \   ___/ \   ___/ \   __
             \_/           \_/        \_/      \_/      \_/

Signed-off-by: Sherman Yin <syin@broadcom.com>
Reviewed-by: Christian Daudt <bcm@fixthebug.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: Add void * to pinctrl_pin_desc
Sherman Yin [Sat, 21 Dec 2013 02:13:33 +0000 (18:13 -0800)]
pinctrl: Add void * to pinctrl_pin_desc

drv_data is added to the pinctrl_pin_desc for drivers to define additional
driver-specific per-pin data.

Signed-off-by: Sherman Yin <syin@broadcom.com>
Reviewed-by: Christian Daudt <bcm@fixthebug.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: st: Fix a typo in probe
Srinivas Kandagatla [Tue, 14 Jan 2014 14:52:05 +0000 (14:52 +0000)]
pinctrl: st: Fix a typo in probe

Probe function had commas instead of semi-colons on some of the lines.
This patch just fixes those lines. No functional chagnes done in this
patch.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: Fix some typos and grammar issues in the documentation
Laszlo Papp [Mon, 13 Jan 2014 19:00:14 +0000 (19:00 +0000)]
pinctrl: Fix some typos and grammar issues in the documentation

I had been trying to learn a bit more about the pinctrl subsystem, and I
realized several typos and grammar issues while going through the documentation.
I have probably not caught all the possible issues, but this change is
addressing several places for improvement.

Signed-off-by: Laszlo Papp <lpapp@kde.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sirf: lock IRQs when starting them
Linus Walleij [Wed, 15 Jan 2014 09:07:07 +0000 (10:07 +0100)]
pinctrl: sirf: lock IRQs when starting them

This uses the new API for tagging GPIO lines as in use by
IRQs. This enforces a few semantic checks on how the underlying
GPIO line is used.

Also assign the gpio_chip.dev pointer to be used for error
messages.

Cc: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sirf: put gpio interrupt pin into input status automatically
Barry Song [Sat, 11 Jan 2014 08:48:43 +0000 (16:48 +0800)]
pinctrl: sirf: put gpio interrupt pin into input status automatically

busses like i2c, spi and so on can parse the virq of their subnode automatically by
irq_of_parse_and_map(). for example, i2c will do that in of_i2c_register_devices().
people can put hwirq number attached to a gpio controller in dts, and drivers can
directly request the parsed virq.

for example, for an i2c client as below,
tangoc-ts@5c{
compatible = "pixcir,tangoc-ts";
interrupt-parent = <&gpio>;
interrupts = <3 0>;
reg = <0x5c>;
};
in i2c client probe(), it will request_irq(client->irq, ...) without
calling gpio_direction_input().
so here when we set irq type, we also put the pin to input direction.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sirf: use only one irq_domain for the whole device node
Barry Song [Sat, 11 Jan 2014 08:48:42 +0000 (16:48 +0800)]
pinctrl: sirf: use only one irq_domain for the whole device node

in sirfsoc gpio probe(), we create 5 irq_domains for 5 gpio banks. but
in irq_create_of_mapping() of irqchip core level, irq_find_host() can
only return the 1st irq_domain attached the pinctrl dt device node as
we can see from the codes:

unsigned int irq_create_of_mapping(struct device_node *controller,
   const u32 *intspec, unsigned int intsize)
{
struct irq_domain *domain;
...
domain = controller ? irq_find_host(controller) : irq_default_domain;
}

struct irq_domain *irq_find_host(struct device_node *node)
{
struct irq_domain *h, *found = NULL;
int rc;

/* We might want to match the legacy controller last since
 * it might potentially be set to match all interrupts in
 * the absence of a device node. This isn't a problem so far
 * yet though...
 */
mutex_lock(&irq_domain_mutex);
list_for_each_entry(h, &irq_domain_list, link) {
if (h->ops->match)
rc = h->ops->match(h, node);
else
rc = (h->of_node != NULL) && (h->of_node == node);

if (rc) {
found = h;
break;
}
}
mutex_unlock(&irq_domain_mutex);
return found;
}

for sirfsoc, the 1st irq_domain attached to the device_node(controller) only
can do linear for the 1st 32 gpios. so for devices who use gpio hwirq above
32 and put the information in dt like:
                                tangoc-ts@5c{
                                        compatible = "pixcir,tangoc-ts";
+                                       interrupt-parent = <&gpio>;
+                                       interrupts = <34 0>;
                                };

we will fail to get the virq for these devices as hwirq will be bigger than
domain->revmap_data.linear.size in:
unsigned int irq_linear_revmap(struct irq_domain *domain,
       irq_hw_number_t hwirq)
{

/* Check revmap bounds; complain if exceeded */
if (WARN_ON(hwirq >= domain->revmap_data.linear.size))
return 0;

return domain->revmap_data.linear.revmap[hwirq];
}

this patch drops redundant irq_domain and keep only one to fix the problem.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: single: fix infinite loop caused by bad mask
Tomi Valkeinen [Thu, 9 Jan 2014 12:50:29 +0000 (14:50 +0200)]
pinctrl: single: fix infinite loop caused by bad mask

commit 4e7e8017a80e1 (pinctrl: pinctrl-single:
enhance to configure multiple pins of different modules) improved
support for pinctrl-single,bits option, but also caused a regression
in parsing badly configured mask data.

If the masks in DT data are not quite right,
pcs_parse_bits_in_pinctrl_entry() can end up in an infinite loop,
trashing memory at the same time.

Add a check to verify that each loop actually removes bits from the
'mask', so that the loop can eventually end.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: single: fix pcs_disable with bits_per_mux
Tomi Valkeinen [Thu, 9 Jan 2014 12:50:28 +0000 (14:50 +0200)]
pinctrl: single: fix pcs_disable with bits_per_mux

pcs_enable() uses vals->mask instead of pcs->fmask when bits_per_mux is
enabled. However, pcs_disable() always uses pcs->fmask.

Fix pcs_disable() to use vals->mask with bits_per_mux.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: single: fix DT bindings documentation
Tomi Valkeinen [Thu, 9 Jan 2014 12:50:27 +0000 (14:50 +0200)]
pinctrl: single: fix DT bindings documentation

Remove extra comma in pinctrl-single documentation.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: as3722: Set pin to output mode for some function
Mallikarjun Kasoju [Tue, 7 Jan 2014 08:40:56 +0000 (14:10 +0530)]
pinctrl: as3722: Set pin to output mode for some function

If pins are used for function output like pwm, clk32k,
power good etc then set it as output mode default.

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sirf: add pin group for USP0 with only RX or TX frame sync
Rongjun Ying [Fri, 3 Jan 2014 02:59:25 +0000 (10:59 +0800)]
pinctrl: sirf: add pin group for USP0 with only RX or TX frame sync

USP0 has multiple functions, and has RX and TX frame sync signals,
for some scenarios like audio PCM, we don't need both of them.
so here we add two possibilities for USP0 only holding one of TX
and RX frame sync.

Signed-off-by: Rongjun Ying <Rongjun.Ying@csr.com>
Signed-off-by: Barry Song <Barry.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sirf: fix the pins of sdmmc5 connected with TriG
Bin Shi [Fri, 3 Jan 2014 02:59:24 +0000 (10:59 +0800)]
pinctrl: sirf: fix the pins of sdmmc5 connected with TriG

sdmmc5 has only 3 pins CMD, CLK, DATA which are connected with CSR
TriG RF multi-GNSS. The hardware connection is like:
DATA -- GPS_SGN
CLK  -- GPS_RF_CLK
CMD  -- GPS_MAG
here we drop redundant pins in sdmmc5 group.

Signed-off-by: Bin Shi <Bin.Shi@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sirf: add lost usp1_uart_nostreamctrl group for atlas6
Qipan Li [Fri, 3 Jan 2014 02:59:22 +0000 (10:59 +0800)]
pinctrl: sirf: add lost usp1_uart_nostreamctrl group for atlas6

commit af614b2301f0e304 adds lost USP-based UART pin groups for prima2,
but missed usp1_uart_nostreamctrl group for atlas6, this patch fixes it.

this makes USP(Universal Serial Ports) port1 can work as uart without
stream ctrl.

Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sunxi: Add Allwinner A20 clock output pin functions
Chen-Yu Tsai [Mon, 30 Dec 2013 03:25:48 +0000 (11:25 +0800)]
pinctrl: sunxi: Add Allwinner A20 clock output pin functions

This patch adds the clock output pin functions on the A20.
The 2 pins can output a configurable clock to be used by
external modules. This is used on the CubieTruck, to supply
a 32768 Hz low power clock to the onboard Wifi+BT module.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl/lantiq: fix typo
Antonios Vamporakis [Sun, 29 Dec 2013 21:48:02 +0000 (22:48 +0100)]
pinctrl/lantiq: fix typo

Signed-off-by: Antonios Vamporakis <ant@area128.com>
CC: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sh-pfc: r8a7791: Add I2C pins
Valentine Barshak [Fri, 27 Dec 2013 11:27:37 +0000 (15:27 +0400)]
pinctrl: sh-pfc: r8a7791: Add I2C pins

This adds I2C[0-4] pinmux support to R8A7791 SoC.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sh-pfc: r8a7791: Add VIN pins
Valentine Barshak [Wed, 25 Dec 2013 19:36:01 +0000 (23:36 +0400)]
pinctrl: sh-pfc: r8a7791: Add VIN pins

This adds VIN[0-2] pinmux support to r8a7791 SoC.
VIN1 B mirror is also added along with the primary
configuration since it's the only one that provides
access to all 24 data bits on VIN1.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sh-pfc: r8a7791: Group USB PWEN and OVC pins together
Valentine Barshak [Fri, 20 Dec 2013 14:14:24 +0000 (18:14 +0400)]
pinctrl: sh-pfc: r8a7791: Group USB PWEN and OVC pins together

This groups USB PWEN and OVC pins together on R8A7791 SoC,
the same way it's done on R8A7790, since both are needed
for a USB device.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sh-pfc: r8a7790: Fix vsync value in the vin3_sync_mux array
Valentine Barshak [Mon, 23 Dec 2013 20:28:28 +0000 (00:28 +0400)]
pinctrl: sh-pfc: r8a7790: Fix vsync value in the vin3_sync_mux array

This fixes a typo in the vin3_sync_mux array (s/VI2/VI3/).

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sh-pfc: ARM: Constify pins and cfg_regs arrays
Laurent Pinchart [Mon, 16 Dec 2013 19:25:17 +0000 (20:25 +0100)]
pinctrl: sh-pfc: ARM: Constify pins and cfg_regs arrays

The arrays are never modified, declare them as const.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sh-pfc: sh: Constify pins and cfg_regs arrays
Laurent Pinchart [Mon, 16 Dec 2013 19:25:16 +0000 (20:25 +0100)]
pinctrl: sh-pfc: sh: Constify pins and cfg_regs arrays

The arrays are never modified, declare them as const.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sh-pfc: Constify IRQ GPIOs arrays
Laurent Pinchart [Mon, 16 Dec 2013 19:25:15 +0000 (20:25 +0100)]
pinctrl: sh-pfc: Constify IRQ GPIOs arrays

The arrays are never modified, make them const.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sh-pfc: Constify enum_ids and var_field_width compound literals
Laurent Pinchart [Mon, 16 Dec 2013 19:25:14 +0000 (20:25 +0100)]
pinctrl: sh-pfc: Constify enum_ids and var_field_width compound literals

The enum_ids and var_field_width fields of struct pinmux_data_reg and
pinmux_cfg_reg are initialized using compound literals. Cast them to
const to store them in .rodata.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: msm: Fix set gpio setting
Axel Lin [Fri, 13 Dec 2013 13:35:55 +0000 (21:35 +0800)]
pinctrl: msm: Fix set gpio setting

Set g->out_bit bit for gpio output high, clear g->out_bit bit for gpio output
low.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: at91: replace clk_prepare + clk_enable by clk_prepare_enable
Boris BREZILLON [Sun, 15 Dec 2013 18:30:52 +0000 (19:30 +0100)]
pinctrl: at91: replace clk_prepare + clk_enable by clk_prepare_enable

Replace the clk_prepare and clk_enable calls by a single
clk_prepare_enable call.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: at91: fix clk_unprepare and clk_disable order
Boris BREZILLON [Sun, 15 Dec 2013 18:30:51 +0000 (19:30 +0100)]
pinctrl: at91: fix clk_unprepare and clk_disable order

clk_unprepare shall be called before clk_disable.
Fix the issue by replacing the clk_unprepare and clk_disable calls by a
single clk_disable_unprepare call.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: Adds slew-rate, input-enable/disable
Sherman Yin [Wed, 11 Dec 2013 18:37:17 +0000 (10:37 -0800)]
pinctrl: Adds slew-rate, input-enable/disable

This commit adds slew-rate and input-enable/disable support for pinconf
-generic.

Signed-off-by: Sherman Yin <syin@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl-msm: Rename compatible to be more specific
Bjorn Andersson [Sun, 15 Dec 2013 07:01:54 +0000 (23:01 -0800)]
pinctrl-msm: Rename compatible to be more specific

Use the more specific form 8974 for the compatible to reduce the
risk of future mishaps.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl-msm: Remove separate allocation of bitmaps
Bjorn Andersson [Sun, 15 Dec 2013 07:01:53 +0000 (23:01 -0800)]
pinctrl-msm: Remove separate allocation of bitmaps

Make the bitmaps part of the msm_pinctrl allocation instead of
separately allocating them.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl-msm: Tidy up error handling
Bjorn Andersson [Sun, 15 Dec 2013 07:01:52 +0000 (23:01 -0800)]
pinctrl-msm: Tidy up error handling

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl-msm: Fix spelling misstakes and missing consts
Bjorn Andersson [Sun, 15 Dec 2013 07:01:51 +0000 (23:01 -0800)]
pinctrl-msm: Fix spelling misstakes and missing consts

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: msm: Update Kconfig for PINCTRL_MSM8X74
Bjorn Andersson [Sun, 15 Dec 2013 06:44:33 +0000 (22:44 -0800)]
pinctrl: msm: Update Kconfig for PINCTRL_MSM8X74

Add GPIOLIB and OF as dependencies for PINCTRL_MSM8X74, to fix
build errors from i386-randconfig.
Also add help text and make the entries tristate, while touching
these entries.

Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
[Rebased on top of pin control development branch]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: pinconf: remove warning: unused variable 'ops'
Alexandre Belloni [Fri, 13 Dec 2013 11:14:36 +0000 (12:14 +0100)]
pinctrl: pinconf: remove warning: unused variable 'ops'

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: at91: implement at91_pinconf_dbg_show
Alexandre Belloni [Sat, 7 Dec 2013 13:08:54 +0000 (14:08 +0100)]
pinctrl: at91: implement at91_pinconf_dbg_show

This allows to get the pin configuration by using debugfs. On my system:
 # cat /sys/kernel/debug/pinctrl/pinctrl.3/pinconf-pins

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: tegra: add pinmux controller driver for Tegra124
Ashwini Ghuge [Tue, 10 Dec 2013 07:10:56 +0000 (12:40 +0530)]
pinctrl: tegra: add pinmux controller driver for Tegra124

This adds a driver for the Tegra124 pinmux, and required
parameterization data for Tegra124.

The driver uses the common Tegra pincontrol driver utility
functions to implement the majority of the driver.

This driver is not compatible with the earlier NVIDIA's SoCs,
hence add new compatibile as "nvidia,tegra124-pinmux".

Originally written by Ashwini Gguhe.
Thierry:
 - Cleanups in patches.
ldewangan:
 - Fix some entries for groups.
 - Fix MUX enums and group sequence.

Signed-off-by: Ashwini Ghuge <aghuge@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
CC: Thierry Reding <treding@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: tegra: Add devicetree binding document for Tegra124
Laxman Dewangan [Tue, 10 Dec 2013 07:10:55 +0000 (12:40 +0530)]
pinctrl: tegra: Add devicetree binding document for Tegra124

This device tree binding document describes the Tegra124 pincontrol
DT bindings. This document lists all valid properties, names, mux
options of Tegra124 pins.

Changes from V1:
- Referred the dt-binding header file on describing the nodes.

Changes from V2:
- Rewording reg properties.
- drop drv_type as it is not applicable.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agosh-pfc: Support GPIO to IRQ mapping specified IRQ resources
Laurent Pinchart [Wed, 11 Dec 2013 03:26:26 +0000 (04:26 +0100)]
sh-pfc: Support GPIO to IRQ mapping specified IRQ resources

On non-DT platforms IRQ controllers associated with the GPIOs have a
fixed IRQ base value known at compile time. The sh-pfc driver translates
GPIO number to IRQ numbers using a hardcoded table. This mechanism
breaks on DT platforms, as the IRQ base values are dynamic in that case.

Fix this by specifying IRQs associated with GPIOs in IRQ resources,
populated automatically from the device tree. When IRQ resources are
specified the driver requires one IRQ resource per GPIO able to generate
an interrupt, and uses the translation table to compute the IRQ resource
offset instead of the IRQ number.

Cc: devicetree@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agosh-pfc: Rename sh_pfc window field to windows
Laurent Pinchart [Wed, 11 Dec 2013 03:26:25 +0000 (04:26 +0100)]
sh-pfc: Rename sh_pfc window field to windows

There's more than one window, name the field windows.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agosh-pfc: sh73a0: Sort IRQ entries by IRQ number
Laurent Pinchart [Wed, 11 Dec 2013 03:26:24 +0000 (04:26 +0100)]
sh-pfc: sh73a0: Sort IRQ entries by IRQ number

This makes catching duplicate entries easier. Merge the two IRQ9 entries
found after sorting.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agosh-pfc: sh73a0: Add missing IRQ15
Laurent Pinchart [Wed, 11 Dec 2013 03:26:23 +0000 (04:26 +0100)]
sh-pfc: sh73a0: Add missing IRQ15

The external IRQ15 input multiplexed on GPIO 0 is missing. Add it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agosh-pfc: Terminate gpios array by -1
Laurent Pinchart [Wed, 11 Dec 2013 03:26:22 +0000 (04:26 +0100)]
sh-pfc: Terminate gpios array by -1

0 is a valid GPIO value, use -1 to terminate the gpios array in IRQ
lists.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agosh-pfc: Turn unsigned indices into unsigned int
Laurent Pinchart [Wed, 11 Dec 2013 03:26:21 +0000 (04:26 +0100)]
sh-pfc: Turn unsigned indices into unsigned int

Some indices take positive values only, make them unsigned.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: pinconf: remove checks on ops->pin_config_get
Alexandre Belloni [Mon, 9 Dec 2013 10:38:29 +0000 (11:38 +0100)]
pinctrl: pinconf: remove checks on ops->pin_config_get

ops->pin_config_get() is only used in one specific path that will only be taken
for generic pinconf drivers (ops->is_generic == true) when dumping the pinconf
by using debugfs.

By removing the check in pinconf_check_ops(), let's stop pressuring people to
write a pin_config_get() function that will never be used and so will probably
never be tested.

Removing the check in pinconf_pins_show() allows driver to not implement
pin_config_get() but still get a dump of the pinconf in debugfs by implementing
pin_config_dbg_show().

Finally, not implementing pin_config_get() now results in returning -ENOTSUPP
instead of -EINVAL. While this doesn't have any real impact for now, this feels
more right.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: at91: initialize config parameter to 0
Alexandre Belloni [Sat, 7 Dec 2013 13:08:53 +0000 (14:08 +0100)]
pinctrl: at91: initialize config parameter to 0

When passing a not initialized config parameter, at91_pinconf_get() would return
a bogus value. Fix that by initializing it to zero before using it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: at91: correct a few typos
Alexandre Belloni [Sat, 7 Dec 2013 13:08:52 +0000 (14:08 +0100)]
pinctrl: at91: correct a few typos

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoMerge branch 'pinmux/next/pfc' of git://linuxtv.org/pinchartl/fbdev into devel
Linus Walleij [Wed, 11 Dec 2013 10:06:42 +0000 (11:06 +0100)]
Merge branch 'pinmux/next/pfc' of git://linuxtv.org/pinchartl/fbdev into devel

10 years agopinctrl: make the MSM SoC driver depend on OF
Linus Walleij [Mon, 9 Dec 2013 08:26:01 +0000 (09:26 +0100)]
pinctrl: make the MSM SoC driver depend on OF

We had a compilation failure on x86_64 due to missing OF support
as this was an implicit dependency. Add an explicit dependency
on OF and OF_IRQ on the SoC driver.

Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: sh-pfc: pfc-r8a7790: Add VIN2 and VIN3 pins
Valentine Barshak [Tue, 10 Dec 2013 18:20:26 +0000 (22:20 +0400)]
pinctrl: sh-pfc: pfc-r8a7790: Add VIN2 and VIN3 pins

There are VIN2 and VIN3 channels available on the R8A7790 SoC.
VIN2 supports 4/8/16/18/24-bit data, while VIN3 supports 8-bit.
Add both here, covering all possible data pin configurations.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
10 years agopinctrl: sh-pfc: pfc-r8a7790: Add missing VIN1 pins
Valentine Barshak [Tue, 10 Dec 2013 18:20:25 +0000 (22:20 +0400)]
pinctrl: sh-pfc: pfc-r8a7790: Add missing VIN1 pins

Both VIN0 and VIN1 channels support identical input interfaces.
Add missing VIN1 pins here and organize them in the same pin
groups as VIN0.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
10 years agopinctrl: sh-pfc: pfc-r8a7790: Reorganize VIN0 data pins
Valentine Barshak [Tue, 10 Dec 2013 18:20:24 +0000 (22:20 +0400)]
pinctrl: sh-pfc: pfc-r8a7790: Reorganize VIN0 data pins

This reorganizes and renames VIN0 data pin groups to cover
all possible configurations. There's total of eight data
pin groups, one per each configuration. Most of the groups
share the same pin/mux array. Only the 18-bit configuration
needs a separate pin/mux array since in combines interleaved
data pins.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
10 years agopinctrl: sh-pfc: pfc-r8a7790: Group VIN0 HSYNC and VSYNC together
Valentine Barshak [Tue, 10 Dec 2013 18:20:23 +0000 (22:20 +0400)]
pinctrl: sh-pfc: pfc-r8a7790: Group VIN0 HSYNC and VSYNC together

This groups VIN0 HSYNC and VSYNC pins together
since one cannot be used without another.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
10 years agopinctrl: sh-pfc: pfc-r8a7790: Rename VIN pin groups
Valentine Barshak [Tue, 10 Dec 2013 18:20:22 +0000 (22:20 +0400)]
pinctrl: sh-pfc: pfc-r8a7790: Rename VIN pin groups

This drops superfluous "signal" word from the pin group names
and renames data_enable group to clkenb as in the h/w manual.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
10 years agosh-pfc: r8a7791: Fix msiof groups to follow GROUP
Takashi Yoshii [Sun, 1 Dec 2013 18:19:12 +0000 (03:19 +0900)]
sh-pfc: r8a7791: Fix msiof groups to follow GROUP

SH_PFC_PIN_GROUP(), pins[], mux[], defines
 clk, sync, ss1, ss2, rx, tx
But, msiof?_groups[] defines
 clk, ctrl, data

Fix msiof[012]_groups members to be consistent to PIN_GROUP.

Signed-off-by: Takashi Yoshii <takasi-y@ops.dti.ne.jp>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agosh-pfc: r8a7790: Add Audio pin support
Kuninori Morimoto [Fri, 29 Nov 2013 03:01:37 +0000 (19:01 -0800)]
sh-pfc: r8a7790: Add Audio pin support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agosh-pfc: r8a7790: Add SSI pin support
Kuninori Morimoto [Fri, 29 Nov 2013 03:01:27 +0000 (19:01 -0800)]
sh-pfc: r8a7790: Add SSI pin support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agosh-pfc: Share common PORTCR macro definition
Laurent Pinchart [Tue, 29 Oct 2013 12:02:18 +0000 (13:02 +0100)]
sh-pfc: Share common PORTCR macro definition

The macro is defined identically in four different locations. Share it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: make the MSM SoC driver depend on OF
Linus Walleij [Mon, 9 Dec 2013 08:26:01 +0000 (09:26 +0100)]
pinctrl: make the MSM SoC driver depend on OF

We had a compilation failure on x86_64 due to missing OF support
as this was an implicit dependency. Add an explicit dependency
on OF and OF_IRQ on the SoC driver.

Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v2->v3:
- Total failure with older approaches: what we need to do is
  have the *SoC subdriver* depend on OF and OF_IRQ. This is
  because the placeholder bool PINCTRL_MSM cannot cascade its
  dependencies when a subdriver selects it, Kconfig is smart
  but not that smart.
ChangeLog v1->v2:
- OK so "depends on OF" did not work here let's try to simply
  select OF and OF_IRQ for this then? It's one of those
  "warning: (PINCTRL_MSM8X74) selects PINCTRL_MSM which has
  unmet direct dependencies (PINCTRL && OF)" that I simply
  cannot find my way out of :-/

10 years agopinctrl: baytrail: lock IRQs when starting them
Linus Walleij [Tue, 3 Dec 2013 14:20:34 +0000 (15:20 +0100)]
pinctrl: baytrail: lock IRQs when starting them

This uses the new API for tagging GPIO lines as in use by
IRQs. This enforces a few semantic checks on how the underlying
GPIO line is used.

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: Add documentation for pinctrl-msm8x74
Bjorn Andersson [Fri, 6 Dec 2013 02:10:05 +0000 (18:10 -0800)]
pinctrl: Add documentation for pinctrl-msm8x74

This adds initial documentation for the pinctrl-msm8x74 driver.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: Add msm8x74 configuration
Bjorn Andersson [Fri, 6 Dec 2013 02:10:04 +0000 (18:10 -0800)]
pinctrl: Add msm8x74 configuration

Add initial definition of parameters for pinctrl-msm for the msm8x74
platform.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: Add Qualcomm TLMM driver
Bjorn Andersson [Fri, 6 Dec 2013 02:10:03 +0000 (18:10 -0800)]
pinctrl: Add Qualcomm TLMM driver

This adds a pinctrl, pinmux, pinconf and gpiolib driver for the
Qualcomm TLMM block.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl-baytrail: show pin label with the reset of the gpio debug data
Mathias Nyman [Fri, 22 Nov 2013 12:01:23 +0000 (14:01 +0200)]
pinctrl-baytrail: show pin label with the reset of the gpio debug data

The default gpiolib debug output shows pin labels.
We want baytrail custom debug output to have the same functionality.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: provide documentation pointer
Linus Walleij [Mon, 25 Nov 2013 14:43:37 +0000 (15:43 +0100)]
pinctrl: provide documentation pointer

The PIN_CONFIG_OUTPUT parameter is really tricky to understand
and needs an explicit pointer to the documentation.

Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: pinctrl-imx: add imx25 pinctrl driver
Denis Carikli [Wed, 6 Nov 2013 08:52:15 +0000 (09:52 +0100)]
pinctrl: pinctrl-imx: add imx25 pinctrl driver

This is mostly cut and paste from the imx35 pinctrl driver.
The data was generated using sed and awk on
  arch/arm/plat-mxc/include/mach/iomux-mx25.h.

Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: devicetree@vger.kernel.org
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Eric Bénard <eric@eukrea.com>
Signed-off-by: Denis Carikli <denis@eukrea.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: imx1-core populate subdevices
Markus Pargmann [Mon, 11 Nov 2013 18:19:47 +0000 (19:19 +0100)]
pinctrl: imx1-core populate subdevices

Support gpio devicetree subnodes to allow a more detailed DT hardware
description.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: imx: drop redundant OF dependency
Shawn Guo [Sat, 16 Nov 2013 14:17:34 +0000 (22:17 +0800)]
pinctrl: imx: drop redundant OF dependency

The IMX/MXC selects USE_OF at architecture level, so the OF dependency
at individual SoC pinctrl driver level can just be dropped.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: nomadik: always display IRQ in debugfs
Linus Walleij [Thu, 14 Nov 2013 18:51:18 +0000 (19:51 +0100)]
pinctrl: nomadik: always display IRQ in debugfs

As we now grab IRQs also without first reserving the GPIO
line, let's print the mapped IRQ unconditionally in the
debugfs file as well.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agosh-pfc: r8a7791: Fix DU pin groups organisation
Laurent Pinchart [Wed, 13 Nov 2013 12:46:17 +0000 (13:46 +0100)]
sh-pfc: r8a7791: Fix DU pin groups organisation

Rename the sync_1 group to sync as the device has a single sync pin
group for the DU, move the cde_disp mux array right after the
corresponding pins array, and split the clk_in pins in three separate
groups as the pins can be used independently.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoLinux 3.13-rc1 v3.13-rc1
Linus Torvalds [Fri, 22 Nov 2013 19:30:55 +0000 (11:30 -0800)]
Linux 3.13-rc1

10 years agoMerge tag 'ecryptfs-3.13-rc1-quiet-checkers' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Fri, 22 Nov 2013 18:58:14 +0000 (10:58 -0800)]
Merge tag 'ecryptfs-3.13-rc1-quiet-checkers' of git://git./linux/kernel/git/tyhicks/ecryptfs

Pull minor eCryptfs fix from Tyler Hicks:
 "Quiet static checkers by removing unneeded conditionals"

* tag 'ecryptfs-3.13-rc1-quiet-checkers' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  eCryptfs: file->private_data is always valid

10 years agoMerge tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 22 Nov 2013 18:57:31 +0000 (10:57 -0800)]
Merge tag 'sound-fix2-3.13-rc1' of git://git./linux/kernel/git/tiwai/sound

Pull second set of sound fixes from Takashi Iwai:
 "A collection of small fixes in HD-audio quirks and runtime PM, ASoC
  rcar, abs8500 and other codecs.  Most of commits are for stable
  kernels, too"

* tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial)
  ALSA: hda - Provide missing pin configs for VAIO with ALC260
  ALSA: hda - Add headset quirk for Dell Inspiron 3135
  ALSA: hda - Fix the headphone jack detection on Sony VAIO TX
  ALSA: hda - Fix missing bass speaker on ASUS N550
  ALSA: hda - Fix unbalanced runtime PM notification at resume
  ASoC: arizona: Set FLL to free-run before disabling
  ALSA: hda - A casual Dell Headset quirk
  ASoC: rcar: fixup dma_async_issue_pending() timing
  ASoC: rcar: off by one in rsnd_scu_set_route()
  ASoC: wm5110: Add post SYSCLK register patch for rev D chip
  ASoC: ab8500: Revert to using custom I/O functions
  ALSA: hda - Also enable mute/micmute LED control for "Lenovo dock" fixup
  ALSA: firewire-lib: include sound/asound.h to refer to snd_pcm_format_t
  ALSA: hda - Select FW_LOADER from CONFIG_SND_HDA_CODEC_CA0132_DSP
  ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Realtek codec
  ASoC: rcar: fixup mod access before checking

10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 22 Nov 2013 18:56:11 +0000 (10:56 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull DRM fixes from Dave Airlie:
 "I was going to leave this until post -rc1 but sysfs fixes broke
  hotplug in userspace, so I had to fix it harder, otherwise a set of
  pulls from intel, radeon and vmware,

  The vmware/ttm changes are bit larger but since its early and they are
  unlikely to break anything else I put them in, it lets vmware work
  with dri3"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (36 commits)
  drm/sysfs: fix hotplug regression since lifetime changes
  drm/exynos: g2d: fix memory leak to userptr
  drm/i915: Fix gen3 self-refresh watermarks
  drm/ttm: Remove set_need_resched from the ttm fault handler
  drm/ttm: Don't move non-existing data
  drm/radeon: hook up backlight functions for CI and KV family.
  drm/i915: Replicate BIOS eDP bpp clamping hack for hsw
  drm/i915: Do not enable package C8 on unsupported hardware
  drm/i915: Hold pc8 lock around toggling pc8.gpu_idle
  drm/i915: encoder->get_config is no longer optional
  drm/i915/tv: add ->get_config callback
  drm/radeon/cik: Add macrotile mode array query
  drm/radeon/cik: Return backend map information to userspace
  drm/vmwgfx: Make vmwgfx dma buffers prime aware
  drm/vmwgfx: Make surfaces prime-aware
  drm/vmwgfx: Hook up the prime ioctls
  drm/ttm: Add a minimal prime implementation for ttm base objects
  drm/vmwgfx: Fix false lockdep warning
  drm/ttm: Allow execbuf util reserves without ticket
  drm/i915: restore the early forcewake cleanup
  ...

10 years agoMerge tag 'pci-v3.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Fri, 22 Nov 2013 18:53:47 +0000 (10:53 -0800)]
Merge tag 'pci-v3.13-fixes-1' of git://git./linux/kernel/git/helgaas/pci

Pull PCI updates from Bjorn Helgaas:
 "Miscellaneous
   - Remove duplicate disable from pcie_portdrv_remove() (Yinghai Lu)
   - Fix whitespace, capitalization, and spelling errors (Bjorn Helgaas)"

* tag 'pci-v3.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: Remove duplicate pci_disable_device() from pcie_portdrv_remove()
  PCI: Fix whitespace, capitalization, and spelling errors

10 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
Linus Torvalds [Fri, 22 Nov 2013 18:52:03 +0000 (10:52 -0800)]
Merge branch 'for-next' of git://git./linux/kernel/git/nab/target-pending

Pull SCSI target updates from Nicholas Bellinger:
 "Things have been quiet this round with mostly bugfixes, percpu
  conversions, and other minor iscsi-target conformance testing changes.

  The highlights include:

   - Add demo_mode_discovery attribute for iscsi-target (Thomas)
   - Convert tcm_fc(FCoE) to use percpu-ida pre-allocation
   - Add send completion interrupt coalescing for ib_isert
   - Convert target-core to use percpu-refcounting for se_lun
   - Fix mutex_trylock usage bug in iscsit_increment_maxcmdsn
   - tcm_loop updates (Hannes)
   - target-core ALUA cleanups + prep for v3.14 SCSI Referrals support (Hannes)

  v3.14 is currently shaping to be a busy development cycle in target
  land, with initial support for T10 Referrals and T10 DIF currently on
  the roadmap"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (40 commits)
  iscsi-target: chap auth shouldn't match username with trailing garbage
  iscsi-target: fix extract_param to handle buffer length corner case
  iscsi-target: Expose default_erl as TPG attribute
  target_core_configfs: split up ALUA supported states
  target_core_alua: Make supported states configurable
  target_core_alua: Store supported ALUA states
  target_core_alua: Rename ALUA_ACCESS_STATE_OPTIMIZED
  target_core_alua: spellcheck
  target core: rename (ex,im)plict -> (ex,im)plicit
  percpu-refcount: Add percpu-refcount.o to obj-y
  iscsi-target: Do not reject non-immediate CmdSNs exceeding MaxCmdSN
  iscsi-target: Convert iscsi_session statistics to atomic_long_t
  target: Convert se_device statistics to atomic_long_t
  target: Fix delayed Task Aborted Status (TAS) handling bug
  iscsi-target: Reject unsupported multi PDU text command sequence
  ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call
  iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn
  target: Core does not need blkdev.h
  target: Pass through I/O topology for block backstores
  iser-target: Avoid using FRMR for single dma entry requests
  ...

10 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Fri, 22 Nov 2013 18:49:14 +0000 (10:49 -0800)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 - acpi_power_meter: Fix return value check from call to
   acpi_bus_get_device
 - nct6775: Fix/improve NCT6791 support
 - lm75: Add support for GMT G751

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (acpi_power_meter) Fix acpi_bus_get_device() return value check
  hwmon: (nct6775) NCT6791 supports weight control only for CPUFAN
  hwmon: (nct6775) Monitor additional temperature registers
  hwmon: (lm75) Add support for GMT G751 chip

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 22 Nov 2013 17:57:35 +0000 (09:57 -0800)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix memory leaks and other issues in mwifiex driver, from Amitkumar
    Karwar.

 2) skb_segment() can choke on packets using frag lists, fix from
    Herbert Xu with help from Eric Dumazet and others.

 3) IPv4 output cached route instantiation properly handles races
    involving two threads trying to install the same route, but we
    forgot to propagate this logic to input routes as well.  Fix from
    Alexei Starovoitov.

 4) Put protections in place to make sure that recvmsg() paths never
    accidently copy uninitialized memory back into userspace and also
    make sure that we never try to use more that sockaddr_storage for
    building the on-kernel-stack copy of a sockaddr.  Fixes from Hannes
    Frederic Sowa.

 5) R8152 driver transmit flow bug fixes from Hayes Wang.

 6) Fix some minor fallouts from genetlink changes, from Johannes Berg
    and Michael Opdenacker.

 7) AF_PACKET sendmsg path can race with netdevice unregister notifier,
    fix by using RCU to make sure the network device doesn't go away
    from under us.  Fix from Daniel Borkmann.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
  gso: handle new frag_list of frags GRO packets
  genetlink: fix genl_set_err() group ID
  genetlink: fix genlmsg_multicast() bug
  packet: fix use after free race in send path when dev is released
  xen-netback: stop the VIF thread before unbinding IRQs
  wimax: remove dead code
  net/phy: Add the autocross feature for forced links on VSC82x4
  net/phy: Add VSC8662 support
  net/phy: Add VSC8574 support
  net/phy: Add VSC8234 support
  net: add BUG_ON if kernel advertises msg_namelen > sizeof(struct sockaddr_storage)
  net: rework recvmsg handler msg_name and msg_namelen logic
  bridge: flush br's address entry in fdb when remove the
  net: core: Always propagate flag changes to interfaces
  ipv4: fix race in concurrent ip_route_input_slow()
  r8152: fix incorrect type in assignment
  r8152: support stopping/waking tx queue
  r8152: modify the tx flow
  r8152: fix tx/rx memory overflow
  netfilter: ebt_ip6: fix source and destination matching
  ...

10 years agoMerge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Linus Torvalds [Fri, 22 Nov 2013 17:56:51 +0000 (09:56 -0800)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm

Pull ARM fixes from Russell King:
 "Some small fixes for this merge window, most of them quite self
  explanatory - the biggest thing here is a fix for the ARMv7 LPAE
  suspend/resume support"

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7894/1: kconfig: select GENERIC_CLOCKEVENTS if HAVE_ARM_ARCH_TIMER
  ARM: 7893/1: bitops: only emit .arch_extension mp if CONFIG_SMP
  ARM: 7892/1: Fix warning for V7M builds
  ARM: 7888/1: seccomp: not compatible with ARM OABI
  ARM: 7886/1: make OABI default to off
  ARM: 7885/1: Save/Restore 64-bit TTBR registers on LPAE suspend/resume
  ARM: 7884/1: mm: Fix ECC mem policy printk
  ARM: 7883/1: fix mov to mvn conversion in case of 64 bit phys_addr_t and BE
  ARM: 7882/1: mm: fix __phys_to_virt to work with 64 bit phys_addr_t in BE case
  ARM: 7881/1: __fixup_smp read of SCU config should do byteswap in BE case
  ARM: Fix nommu.c build warning

10 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Fri, 22 Nov 2013 17:56:07 +0000 (09:56 -0800)]
Merge branch 'next' of git://git./virt/kvm/kvm

Pull KVM fixes from Gleb Natapov.

* 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: kvm_clear_guest_page(): fix empty_zero_page usage
  kvm: mmu: delay mmu audit activation
  arm/arm64: KVM: Fix hyp mappings of vmalloc regions

10 years agoMerge git://git.kvack.org/~bcrl/aio-next
Linus Torvalds [Fri, 22 Nov 2013 16:42:14 +0000 (08:42 -0800)]
Merge git://git.kvack.org/~bcrl/aio-next

Pull aio fixes from Benjamin LaHaise.

* git://git.kvack.org/~bcrl/aio-next:
  aio: nullify aio->ring_pages after freeing it
  aio: prevent double free in ioctx_alloc
  aio: Fix a trinity splat

10 years agoMerge branch 'for-3.13' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Fri, 22 Nov 2013 16:41:17 +0000 (08:41 -0800)]
Merge branch 'for-3.13' of git://linux-nfs.org/~bfields/linux

Pull nfsd bugfixes from Bruce Fields:
 "A couple nfsd bugfixes"

* 'for-3.13' of git://linux-nfs.org/~bfields/linux:
  nfsd4: fix xdr decoding of large non-write compounds
  nfsd: make sure to balance get/put_write_access
  nfsd: split up nfsd_setattr

10 years agoMerge tag 'gfs2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2...
Linus Torvalds [Fri, 22 Nov 2013 16:39:44 +0000 (08:39 -0800)]
Merge tag 'gfs2-fixes' of git://git./linux/kernel/git/steve/gfs2-3.0-fixes

Pull GFS2 fixes from Steven Whitehouse:
 "A couple of small, but important bug fixes for GFS2.  The first one
  fixes a possible NULL pointer dereference, and the second one resolves
  a reference counting issue in one of the lesser used paths through
  atomic_open"

* tag 'gfs2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
  GFS2: Fix ref count bug relating to atomic_open
  GFS2: fix potential NULL pointer dereference

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 22 Nov 2013 16:38:55 +0000 (08:38 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "Almost all of these are bug fixes.  Dave Sterba's documentation update
  is the big exception because he removed our promises to set any
  machine running Btrfs on fire"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Documentation: filesystems: update btrfs tools section
  Documentation: filesystems: add new btrfs mount options
  btrfs: update kconfig help text
  btrfs: fix bio_size_ok() for max_sectors > 0xffff
  btrfs: Use trace condition for get_extent tracepoint
  btrfs: fix typo in the log message
  Btrfs: fix list delete warning when removing ordered root from the list
  Btrfs: print bytenr instead of page pointer in check-int
  Btrfs: remove dead codes from ctree.h
  Btrfs: don't wait for ordered data outside desired range
  Btrfs: fix lockdep error in async commit
  Btrfs: avoid heavy operations in btrfs_commit_super
  Btrfs: fix __btrfs_start_workers retval
  Btrfs: disable online raid-repair on ro mounts
  Btrfs: do not inc uncorrectable_errors counter on ro scrubs
  Btrfs: only drop modified extents if we logged the whole inode
  Btrfs: make sure to copy everything if we rename
  Btrfs: don't BUG_ON() if we get an error walking backrefs

10 years agoMerge tag 'xfs-for-linus-v3.13-rc1-2' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 22 Nov 2013 16:37:47 +0000 (08:37 -0800)]
Merge tag 'xfs-for-linus-v3.13-rc1-2' of git://oss.sgi.com/xfs/xfs

Pull second xfs update from Ben Myers:
 "There are a couple of patches that I wasn't quite sure about in time
  for our initial 3.13 pull request, a bugfix, and an update to add Dave
  to MAINTAINERS:

  Here we have a performance fix for inode iversion, increased inode
  cluster size for v5 superblock filesystems, a fix for error handling
  in xfs_bmap_add_attrfork, and a MAINTAINERS update to add Dave"

* tag 'xfs-for-linus-v3.13-rc1-2' of git://oss.sgi.com/xfs/xfs:
  xfs: open code inc_inode_iversion when logging an inode
  xfs: increase inode cluster size for v5 filesystems
  xfs: fix unlock in xfs_bmap_add_attrfork
  xfs: update maintainers

10 years agoMerge branch 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Fri, 22 Nov 2013 16:10:34 +0000 (08:10 -0800)]
Merge branch 'slab/next' of git://git./linux/kernel/git/penberg/linux

Pull SLAB changes from Pekka Enberg:
 "The patches from Joonsoo Kim switch mm/slab.c to use 'struct page' for
  slab internals similar to mm/slub.c.  This reduces memory usage and
  improves performance:

    https://lkml.org/lkml/2013/10/16/155

  Rest of the changes are bug fixes from various people"

* 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux: (21 commits)
  mm, slub: fix the typo in mm/slub.c
  mm, slub: fix the typo in include/linux/slub_def.h
  slub: Handle NULL parameter in kmem_cache_flags
  slab: replace non-existing 'struct freelist *' with 'void *'
  slab: fix to calm down kmemleak warning
  slub: proper kmemleak tracking if CONFIG_SLUB_DEBUG disabled
  slab: rename slab_bufctl to slab_freelist
  slab: remove useless statement for checking pfmemalloc
  slab: use struct page for slab management
  slab: replace free and inuse in struct slab with newly introduced active
  slab: remove SLAB_LIMIT
  slab: remove kmem_bufctl_t
  slab: change the management method of free objects of the slab
  slab: use __GFP_COMP flag for allocating slab pages
  slab: use well-defined macro, virt_to_slab()
  slab: overloading the RCU head over the LRU for RCU free
  slab: remove cachep in struct slab_rcu
  slab: remove nodeid in struct slab
  slab: remove colouroff in struct slab
  slab: change return type of kmem_getpages() to struct page
  ...

10 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Fri, 22 Nov 2013 16:07:11 +0000 (08:07 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

Pull third set of powerpc updates from Benjamin Herrenschmidt:
 "This is a small collection of random bug fixes and a few improvements
  of Oops output which I deemed valuable enough to include as well.

  The fixes are essentially recent build breakage and regressions, and a
  couple of older bugs such as the DTL log duplication, the EEH issue
  with PCI_COMMAND_MASTER and the problem with small contexts passed to
  get/set_context with VSX enabled"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/signals: Mark VSX not saved with small contexts
  powerpc/pseries: Fix SMP=n build of rng.c
  powerpc: Make cpu_to_chip_id() available when SMP=n
  powerpc/vio: Fix a dma_mask issue of vio
  powerpc: booke: Fix build failures
  powerpc: ppc64 address space capped at 32TB, mmap randomisation disabled
  powerpc: Only print PACATMSCRATCH in oops when TM is active
  powerpc/pseries: Duplicate dtl entries sometimes sent to userspace
  powerpc: Remove a few lines of oops output
  powerpc: Print DAR and DSISR on machine check oopses
  powerpc: Fix __get_user_pages_fast() irq handling
  powerpc/eeh: More accurate log
  powerpc/eeh: Enable PCI_COMMAND_MASTER for PCI bridges

10 years agoALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial)
David Henningsson [Fri, 22 Nov 2013 11:17:06 +0000 (12:17 +0100)]
ALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial)

current_headset_type should be of the HEADSET_TYPE enum, not the
HEADSET_MODE enum. Since ALC_HEADSET_TYPE_UNKNOWN and ALC_HEADSET_MODE_UNKNOWN
are both 0, this patch is just janitorial.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Provide missing pin configs for VAIO with ALC260
Takashi Iwai [Fri, 22 Nov 2013 07:06:36 +0000 (08:06 +0100)]
ALSA: hda - Provide missing pin configs for VAIO with ALC260

Some models (or maybe depending on BIOS version) of Sony VAIO with
ALC260 give no proper pin configurations as default, resulting in the
non-working speaker, etc.  Just provide the whole pin configurations
via a fixup.

Reported-by: Matthew Markus <mmarkus@hearit.co>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'akpm' (fixes from Andrew)
Linus Torvalds [Fri, 22 Nov 2013 05:32:38 +0000 (21:32 -0800)]
Merge branch 'akpm' (fixes from Andrew)

Merge patches from Andrew Morton:
 "13 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  mm: place page->pmd_huge_pte to right union
  MAINTAINERS: add keyboard driver to Hyper-V file list
  x86, mm: do not leak page->ptl for pmd page tables
  ipc,shm: correct error return value in shmctl (SHM_UNLOCK)
  mm, mempolicy: silence gcc warning
  block/partitions/efi.c: fix bound check
  ARM: drivers/rtc/rtc-at91rm9200.c: disable interrupts at shutdown
  mm: hugetlbfs: fix hugetlbfs optimization
  kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS cleanly
  ipc,shm: fix shm_file deletion races
  mm: thp: give transparent hugepage code a separate copy_page
  checkpatch: fix "Use of uninitialized value" warnings
  configfs: fix race between dentry put and lookup

10 years agoMerge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Fri, 22 Nov 2013 03:46:00 +0000 (19:46 -0800)]
Merge branch 'for-linus2' of git://git./linux/kernel/git/jmorris/linux-security

Pull security subsystem updates from James Morris:
 "In this patchset, we finally get an SELinux update, with Paul Moore
  taking over as maintainer of that code.

  Also a significant update for the Keys subsystem, as well as
  maintenance updates to Smack, IMA, TPM, and Apparmor"

and since I wanted to know more about the updates to key handling,
here's the explanation from David Howells on that:

 "Okay.  There are a number of separate bits.  I'll go over the big bits
  and the odd important other bit, most of the smaller bits are just
  fixes and cleanups.  If you want the small bits accounting for, I can
  do that too.

   (1) Keyring capacity expansion.

        KEYS: Consolidate the concept of an 'index key' for key access
        KEYS: Introduce a search context structure
        KEYS: Search for auth-key by name rather than target key ID
        Add a generic associative array implementation.
        KEYS: Expand the capacity of a keyring

     Several of the patches are providing an expansion of the capacity of a
     keyring.  Currently, the maximum size of a keyring payload is one page.
     Subtract a small header and then divide up into pointers, that only gives
     you ~500 pointers on an x86_64 box.  However, since the NFS idmapper uses
     a keyring to store ID mapping data, that has proven to be insufficient to
     the cause.

     Whatever data structure I use to handle the keyring payload, it can only
     store pointers to keys, not the keys themselves because several keyrings
     may point to a single key.  This precludes inserting, say, and rb_node
     struct into the key struct for this purpose.

     I could make an rbtree of records such that each record has an rb_node
     and a key pointer, but that would use four words of space per key stored
     in the keyring.  It would, however, be able to use much existing code.

     I selected instead a non-rebalancing radix-tree type approach as that
     could have a better space-used/key-pointer ratio.  I could have used the
     radix tree implementation that we already have and insert keys into it by
     their serial numbers, but that means any sort of search must iterate over
     the whole radix tree.  Further, its nodes are a bit on the capacious side
     for what I want - especially given that key serial numbers are randomly
     allocated, thus leaving a lot of empty space in the tree.

     So what I have is an associative array that internally is a radix-tree
     with 16 pointers per node where the index key is constructed from the key
     type pointer and the key description.  This means that an exact lookup by
     type+description is very fast as this tells us how to navigate directly to
     the target key.

     I made the data structure general in lib/assoc_array.c as far as it is
     concerned, its index key is just a sequence of bits that leads to a
     pointer.  It's possible that someone else will be able to make use of it
     also.  FS-Cache might, for example.

   (2) Mark keys as 'trusted' and keyrings as 'trusted only'.

        KEYS: verify a certificate is signed by a 'trusted' key
        KEYS: Make the system 'trusted' keyring viewable by userspace
        KEYS: Add a 'trusted' flag and a 'trusted only' flag
        KEYS: Separate the kernel signature checking keyring from module signing

     These patches allow keys carrying asymmetric public keys to be marked as
     being 'trusted' and allow keyrings to be marked as only permitting the
     addition or linkage of trusted keys.

     Keys loaded from hardware during kernel boot or compiled into the kernel
     during build are marked as being trusted automatically.  New keys can be
     loaded at runtime with add_key().  They are checked against the system
     keyring contents and if their signatures can be validated with keys that
     are already marked trusted, then they are marked trusted also and can
     thus be added into the master keyring.

     Patches from Mimi Zohar make this usable with the IMA keyrings also.

   (3) Remove the date checks on the key used to validate a module signature.

        X.509: Remove certificate date checks

     It's not reasonable to reject a signature just because the key that it was
     generated with is no longer valid datewise - especially if the kernel
     hasn't yet managed to set the system clock when the first module is
     loaded - so just remove those checks.

   (4) Make it simpler to deal with additional X.509 being loaded into the kernel.

        KEYS: Load *.x509 files into kernel keyring
        KEYS: Have make canonicalise the paths of the X.509 certs better to deduplicate

     The builder of the kernel now just places files with the extension ".x509"
     into the kernel source or build trees and they're concatenated by the
     kernel build and stuffed into the appropriate section.

   (5) Add support for userspace kerberos to use keyrings.

        KEYS: Add per-user_namespace registers for persistent per-UID kerberos caches
        KEYS: Implement a big key type that can save to tmpfs

     Fedora went to, by default, storing kerberos tickets and tokens in tmpfs.
     We looked at storing it in keyrings instead as that confers certain
     advantages such as tickets being automatically deleted after a certain
     amount of time and the ability for the kernel to get at these tokens more
     easily.

     To make this work, two things were needed:

     (a) A way for the tickets to persist beyond the lifetime of all a user's
         sessions so that cron-driven processes can still use them.

         The problem is that a user's session keyrings are deleted when the
         session that spawned them logs out and the user's user keyring is
         deleted when the UID is deleted (typically when the last log out
         happens), so neither of these places is suitable.

         I've added a system keyring into which a 'persistent' keyring is
         created for each UID on request.  Each time a user requests their
         persistent keyring, the expiry time on it is set anew.  If the user
         doesn't ask for it for, say, three days, the keyring is automatically
         expired and garbage collected using the existing gc.  All the kerberos
         tokens it held are then also gc'd.

     (b) A key type that can hold really big tickets (up to 1MB in size).

         The problem is that Active Directory can return huge tickets with lots
         of auxiliary data attached.  We don't, however, want to eat up huge
         tracts of unswappable kernel space for this, so if the ticket is
         greater than a certain size, we create a swappable shmem file and dump
         the contents in there and just live with the fact we then have an
         inode and a dentry overhead.  If the ticket is smaller than that, we
         slap it in a kmalloc()'d buffer"

* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (121 commits)
  KEYS: Fix keyring content gc scanner
  KEYS: Fix error handling in big_key instantiation
  KEYS: Fix UID check in keyctl_get_persistent()
  KEYS: The RSA public key algorithm needs to select MPILIB
  ima: define '_ima' as a builtin 'trusted' keyring
  ima: extend the measurement list to include the file signature
  kernel/system_certificate.S: use real contents instead of macro GLOBAL()
  KEYS: fix error return code in big_key_instantiate()
  KEYS: Fix keyring quota misaccounting on key replacement and unlink
  KEYS: Fix a race between negating a key and reading the error set
  KEYS: Make BIG_KEYS boolean
  apparmor: remove the "task" arg from may_change_ptraced_domain()
  apparmor: remove parent task info from audit logging
  apparmor: remove tsk field from the apparmor_audit_struct
  apparmor: fix capability to not use the current task, during reporting
  Smack: Ptrace access check mode
  ima: provide hash algo info in the xattr
  ima: enable support for larger default filedata hash algorithms
  ima: define kernel parameter 'ima_template=' to change configured default
  ima: add Kconfig default measurement list template
  ...

10 years agoMerge git://git.infradead.org/users/eparis/audit
Linus Torvalds [Fri, 22 Nov 2013 03:18:14 +0000 (19:18 -0800)]
Merge git://git.infradead.org/users/eparis/audit

Pull audit updates from Eric Paris:
 "Nothing amazing.  Formatting, small bug fixes, couple of fixes where
  we didn't get records due to some old VFS changes, and a change to how
  we collect execve info..."

Fixed conflict in fs/exec.c as per Eric and linux-next.

* git://git.infradead.org/users/eparis/audit: (28 commits)
  audit: fix type of sessionid in audit_set_loginuid()
  audit: call audit_bprm() only once to add AUDIT_EXECVE information
  audit: move audit_aux_data_execve contents into audit_context union
  audit: remove unused envc member of audit_aux_data_execve
  audit: Kill the unused struct audit_aux_data_capset
  audit: do not reject all AUDIT_INODE filter types
  audit: suppress stock memalloc failure warnings since already managed
  audit: log the audit_names record type
  audit: add child record before the create to handle case where create fails
  audit: use given values in tty_audit enable api
  audit: use nlmsg_len() to get message payload length
  audit: use memset instead of trying to initialize field by field
  audit: fix info leak in AUDIT_GET requests
  audit: update AUDIT_INODE filter rule to comparator function
  audit: audit feature to set loginuid immutable
  audit: audit feature to only allow unsetting the loginuid
  audit: allow unsetting the loginuid (with priv)
  audit: remove CONFIG_AUDIT_LOGINUID_IMMUTABLE
  audit: loginuid functions coding style
  selinux: apply selinux checks on new audit message types
  ...

10 years agomm: place page->pmd_huge_pte to right union
Kirill A. Shutemov [Thu, 21 Nov 2013 22:32:11 +0000 (14:32 -0800)]
mm: place page->pmd_huge_pte to right union

I don't know what went wrong, mis-merge or something, but ->pmd_huge_pte
placed in wrong union within struct page.

In original patch[1] it's placed to union with ->lru and ->slab, but in
commit e009bb30c8df ("mm: implement split page table lock for PMD
level") it's in union with ->index and ->freelist.

That union seems also unused for pages with table tables and safe to
re-use, but it's not what I've tested.

Let's move it to original place.  It fixes indentation at least.  :)

[1] https://lkml.org/lkml/2013/10/7/288

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMAINTAINERS: add keyboard driver to Hyper-V file list
Haiyang Zhang [Thu, 21 Nov 2013 22:32:10 +0000 (14:32 -0800)]
MAINTAINERS: add keyboard driver to Hyper-V file list

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agox86, mm: do not leak page->ptl for pmd page tables
Kirill A. Shutemov [Thu, 21 Nov 2013 22:32:09 +0000 (14:32 -0800)]
x86, mm: do not leak page->ptl for pmd page tables

There are two code paths how page with pmd page table can be freed:
pmd_free() and pmd_free_tlb().

I've missed the second one and didn't add page table destructor call
there.  It leads to leak of page->ptl for pmd page tables, if
dynamically allocated page->ptl is in use.

The patch adds the missed destructor and modifies documentation
accordingly.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Andrey Vagin <avagin@openvz.org>
Tested-by: Andrey Vagin <avagin@openvz.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoipc,shm: correct error return value in shmctl (SHM_UNLOCK)
Jesper Nilsson [Thu, 21 Nov 2013 22:32:08 +0000 (14:32 -0800)]
ipc,shm: correct error return value in shmctl (SHM_UNLOCK)

Commit 2caacaa82a51 ("ipc,shm: shorten critical region for shmctl")
restructured the ipc shm to shorten critical region, but introduced a
path where the return value could be -EPERM, even if the operation
actually was performed.

Before the commit, the err return value was reset by the return value
from security_shm_shmctl() after the if (!ns_capable(...)) statement.

Now, we still exit the if statement with err set to -EPERM, and in the
case of SHM_UNLOCK, it is not reset at all, and used as the return value
from shmctl.

To fix this, we only set err when errors occur, leaving the fallthrough
case alone.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Davidlohr Bueso <davidlohr@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@vger.kernel.org> [3.12.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agomm, mempolicy: silence gcc warning
David Rientjes [Thu, 21 Nov 2013 22:32:06 +0000 (14:32 -0800)]
mm, mempolicy: silence gcc warning

Fengguang Wu reports that compiling mm/mempolicy.c results in a warning:

  mm/mempolicy.c: In function 'mpol_to_str':
  mm/mempolicy.c:2878:2: error: format not a string literal and no format arguments

Kees says this is because he is using -Wformat-security.

Silence the warning.

Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Suggested-by: Kees Cook <keescook@chromium.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>