linux_dsm_epyc7002/drivers/pinctrl
Youngmin Nam d9ff0eb9ca pinctrl: samsung: fix SMP race condition
Previously, samsung_gpio_drection_in/output function were not covered
with a spinlock.

For example, samsung_gpio_direction_output function consists of
two functions.
1. samsung_gpio_set
2. samsung_gpio_set_direction

When 2 CPUs try to control the same gpio pin heavily,
(situation like i2c control with gpio emulation)
This situation can cause below problem.

CPU 0                                   | CPU1
                                        |
samsung_gpio_direction_output           |
   samsung_gpio_set(pin A as 1)         | samsung_gpio_direction_output
                                        |    samsung_gpio_set(pin A as 0)
   samsung_gpio_set_direction           |
                                        |    samsung_gpio_set_direction

The initial value of pin A will be set as 0 while we wanted to set pin A as 1.

This patch modifies samsung_gpio_direction_in/output function
to be done in one spinlock to fix race condition.

Additionally, the new samsung_gpio_set_value was added to implement
gpio set callback(samsung_gpio_set) with spinlock using this function.

Cc: stable@vger.kernel.org
Signed-off-by: Youngmin Nam <ym0914@gmail.com>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-02-15 20:45:50 +01:00
..
bcm GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
berlin
freescale
intel pinctrl: intel: use gpiochip data pointer 2016-01-05 14:14:49 +01:00
mediatek pinctrl: mediatek: fix direction control issue 2016-02-05 14:55:20 +01:00
meson pinctrl: meson: use gpiochip data pointer 2016-01-05 14:14:50 +01:00
mvebu pinctrl: mvebu: fix num_settings in mpp group assignment 2016-02-13 23:51:45 +01:00
nomadik pinctrl: nomadik: hide unused functions 2016-01-28 11:36:00 +01:00
pxa pinctrl: pxa: export pxa2xx_pinctrl_init() 2016-01-27 13:32:42 +01:00
qcom GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
samsung pinctrl: samsung: fix SMP race condition 2016-02-15 20:45:50 +01:00
sh-pfc GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
sirf GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
spear GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
sunxi pinctrl: sunxi: H3 requires irq_read_needs_mux 2016-02-11 14:29:13 +01:00
uniphier
vt8500 pinctrl: vt8500-wmt: use gpiochip data pointer 2016-01-05 14:15:08 +01:00
core.c
core.h
devicetree.c
devicetree.h
Kconfig
Makefile
pinconf-generic.c
pinconf.c
pinconf.h
pinctrl-adi2-bf54x.c
pinctrl-adi2-bf60x.c
pinctrl-adi2.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
pinctrl-adi2.h
pinctrl-amd.c pinctrl: amd: use gpiochip data pointer 2016-01-05 14:14:52 +01:00
pinctrl-amd.h
pinctrl-as3722.c pinctrl: as3722: use gpiochip data pointer 2016-01-05 14:14:53 +01:00
pinctrl-at91-pio4.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
pinctrl-at91.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
pinctrl-at91.h
pinctrl-coh901.c pinctrl: u300: use gpiochip data pointer 2016-01-05 14:14:54 +01:00
pinctrl-coh901.h
pinctrl-digicolor.c pinctrl: digicolor: use gpiochip data pointer 2016-01-05 14:14:55 +01:00
pinctrl-falcon.c
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c
pinctrl-palmas.c
pinctrl-pistachio.c pinctrl: pistachio: use gpiochip data pointer 2016-01-05 14:14:55 +01:00
pinctrl-rockchip.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
pinctrl-single.c
pinctrl-st.c pinctrl: st: use gpiochip data pointer 2016-01-05 14:14:57 +01:00
pinctrl-tb10x.c
pinctrl-tegra20.c
pinctrl-tegra30.c
pinctrl-tegra114.c
pinctrl-tegra124.c
pinctrl-tegra210.c
pinctrl-tegra-xusb.c
pinctrl-tegra.c
pinctrl-tegra.h
pinctrl-tz1090-pdc.c
pinctrl-tz1090.c
pinctrl-u300.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
pinctrl-zynq.c
pinmux.c
pinmux.h