* [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS
@ 2014-07-15 17:00 Sam Asadi
2014-07-15 17:00 ` [PATCH 02/94] clk: ti: apll: not allocating enough data Sam Asadi
` (92 more replies)
0 siblings, 93 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Simon Horman, sam-the-6
From: Simon Horman <horms+renesas@verge.net.au>
There are a number of DT and defconfig files which
are maintained as part of shmobile but have not been
listed as such in the MAINTAINERS file. This creates
confusion from time to time.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
MAINTAINERS | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index c411c40..e31c874 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1314,6 +1314,20 @@ W: http://oss.renesas.com
Q: http://patchwork.kernel.org/project/linux-sh/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
S: Supported
+F: arch/arm/boot/dts/emev2*
+F: arch/arm/boot/dts/r7s*
+F: arch/arm/boot/dts/r8a*
+F: arch/arm/boot/dts/sh*
+F: arch/arm/configs/ape6evm_defconfig
+F: arch/arm/configs/armadillo800eva_defconfig
+F: arch/arm/configs/bockw_defconfig
+F: arch/arm/configs/genmai_defconfig
+F: arch/arm/configs/koelsch_defconfig
+F: arch/arm/configs/kzm9g_defconfig
+F: arch/arm/configs/lager_defconfig
+F: arch/arm/configs/mackerel_defconfig
+F: arch/arm/configs/marzen_defconfig
+F: arch/arm/configs/shmobile_defconfig
F: arch/arm/mach-shmobile/
F: drivers/sh/
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 02/94] clk: ti: apll: not allocating enough data
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 03/94] clk: ti: dra7: return error code in failure case Sam Asadi
` (91 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Dan Carpenter, Tero Kristo, sam-the-6
From: Dan Carpenter <dan.carpenter@oracle.com>
There is a cut and paste bug here which will lead to memory corruption
because we don't allocate enough data.
Fixes: 4d008589e271 ('CLK: TI: APLL: add support for omap2 aplls')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/ti/apll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c
index 5428c9c..18dbaf12 100644
--- a/drivers/clk/ti/apll.c
+++ b/drivers/clk/ti/apll.c
@@ -338,7 +338,7 @@ static void __init of_omap2_apll_setup(struct device_node *node)
const char *parent_name;
u32 val;
- ad = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
+ ad = kzalloc(sizeof(*ad), GFP_KERNEL);
clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
init = kzalloc(sizeof(*init), GFP_KERNEL);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 03/94] clk: ti: dra7: return error code in failure case
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
2014-07-15 17:00 ` [PATCH 02/94] clk: ti: apll: not allocating enough data Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 04/94] clk: ti: am43x: Fix boot with CONFIG_SOC_AM33XX disabled Sam Asadi
` (90 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Julia Lawall, Tero Kristo, sam-the-6
From: Julia Lawall <Julia.Lawall@lip6.fr>
Add a returned error code in the MAX_APLL_WAIT_TRIES case. Remove the
updating of the return variable r to 0 if MAX_APLL_WAIT_TRIES is not yet
reached, because r is already 0 at this point.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/ti/apll.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c
index 18dbaf12..72d9727 100644
--- a/drivers/clk/ti/apll.c
+++ b/drivers/clk/ti/apll.c
@@ -77,13 +77,11 @@ static int dra7_apll_enable(struct clk_hw *hw)
if (i == MAX_APLL_WAIT_TRIES) {
pr_warn("clock: %s failed transition to '%s'\n",
clk_name, (state) ? "locked" : "bypassed");
- } else {
+ r = -EBUSY;
+ } else
pr_debug("clock: %s transition to '%s' in %d loops\n",
clk_name, (state) ? "locked" : "bypassed", i);
- r = 0;
- }
-
return r;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 04/94] clk: ti: am43x: Fix boot with CONFIG_SOC_AM33XX disabled
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
2014-07-15 17:00 ` [PATCH 02/94] clk: ti: apll: not allocating enough data Sam Asadi
2014-07-15 17:00 ` [PATCH 03/94] clk: ti: dra7: return error code in failure case Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 05/94] clk: ti: set CLK_SET_RATE_NO_REPARENT for ti,mux-clock Sam Asadi
` (89 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Roger Quadros, Tero Kristo, sam-the-6
From: Roger Quadros <rogerq@ti.com>
Define ti_clk_register_dpll_x2() and of_ti_am3_dpll_x2_setup() if
AM43XX is defined.
Fixes the below boot issue.
[ 2.157258] gpmc_l3_clk not enabled
[ 2.161194] gpmc_l3_clk not enabled
[ 2.164896] Division by zero in kernel.
[ 2.169055] CPU: 0 PID: 321 Comm: kworker/u2:2 Tainted: G W 3.16.0-rc1-00008-g4c0e520 #273
[ 2.178880] Workqueue: deferwq deferred_probe_work_func
[ 2.184459] [<c001477c>] (unwind_backtrace) from [<c001187c>] (show_stack+0x10/0x14)
[ 2.192752] [<c001187c>] (show_stack) from [<c0530f28>] (dump_stack+0x80/0x9c)
[ 2.200486] [<c0530f28>] (dump_stack) from [<c02c867c>] (Ldiv0+0x8/0x10)
[ 2.207678] [<c02c867c>] (Ldiv0) from [<c0022da0>] (gpmc_calc_divider+0x24/0x40)
[ 2.215490] [<c0022da0>] (gpmc_calc_divider) from [<c0022e20>] (gpmc_cs_set_timings+0x18/0x474)
[ 2.224783] [<c0022e20>] (gpmc_cs_set_timings) from [<c003069c>] (gpmc_nand_init+0x74/0x1a8)
[ 2.233791] [<c003069c>] (gpmc_nand_init) from [<c0024668>] (gpmc_probe+0x52c/0x874)
[ 2.242089] [<c0024668>] (gpmc_probe) from [<c0349218>] (platform_drv_probe+0x18/0x48)
[ 2.250534] [<c0349218>] (platform_drv_probe) from [<c0347d88>] (driver_probe_device+0x104/0x22c)
[ 2.259988] [<c0347d88>] (driver_probe_device) from [<c03464dc>] (bus_for_each_drv+0x44/0x8c)
[ 2.269087] [<c03464dc>] (bus_for_each_drv) from [<c0347c4c>] (device_attach+0x74/0x8c)
[ 2.277620] [<c0347c4c>] (device_attach) from [<c0347380>] (bus_probe_device+0x88/0xb0)
[ 2.286074] [<c0347380>] (bus_probe_device) from [<c0347768>] (deferred_probe_work_func+0x60/0x90)
[ 2.295611] [<c0347768>] (deferred_probe_work_func) from [<c004ef50>] (process_one_work+0x1b4/0x4bc)
[ 2.305288] [<c004ef50>] (process_one_work) from [<c004f3d4>] (worker_thread+0x148/0x550)
[ 2.313954] [<c004f3d4>] (worker_thread) from [<c0055a48>] (kthread+0xc8/0xe4)
[ 2.321628] [<c0055a48>] (kthread) from [<c000e648>] (ret_from_fork+0x14/0x2c)
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/ti/dpll.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c
index abd956d..79791e1 100644
--- a/drivers/clk/ti/dpll.c
+++ b/drivers/clk/ti/dpll.c
@@ -161,7 +161,8 @@ cleanup:
}
#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
- defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX)
+ defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) || \
+ defined(CONFIG_SOC_AM43XX)
/**
* ti_clk_register_dpll_x2 - Registers a DPLLx2 clock
* @node: device node for this clock
@@ -322,7 +323,7 @@ CLK_OF_DECLARE(ti_omap4_dpll_x2_clock, "ti,omap4-dpll-x2-clock",
of_ti_omap4_dpll_x2_setup);
#endif
-#ifdef CONFIG_SOC_AM33XX
+#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
static void __init of_ti_am3_dpll_x2_setup(struct device_node *node)
{
ti_clk_register_dpll_x2(node, &dpll_x2_ck_ops, NULL);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 05/94] clk: ti: set CLK_SET_RATE_NO_REPARENT for ti,mux-clock
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (2 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 04/94] clk: ti: am43x: Fix boot with CONFIG_SOC_AM33XX disabled Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 06/94] clk: samsung: fix several typos to fix boot on s3c2410 Sam Asadi
` (88 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Tomi Valkeinen, Tero Kristo, sam-the-6
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
When setting the rate of a clock, by default the clock framework will
change the parent of the clock to the most suitable one in
__clk_mux_determine_rate() (most suitable by looking at the clock rate).
This is a rather dangerous default, and causes problems on AM43x when
using display and ethernet. There are multiple ways to select the clock
muxes on AM43x, and some of those clock paths have the same source
clocks for display and ethernet. When changing the clock rate for the
display subsystem, the clock framework decides to change the display mux
from the dedicated display PLL to a shared PLL which is used by the
ethernet, and then changes the rate of the shared PLL, breaking the
ethernet.
As I don't think there ever is a case where we want the clock framework
to automatically change the parent clock of a clock mux, this patch sets
the CLK_SET_RATE_NO_REPARENT for all ti,mux-clocks.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/ti/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c
index 0197a47..e9d650e 100644
--- a/drivers/clk/ti/mux.c
+++ b/drivers/clk/ti/mux.c
@@ -160,7 +160,7 @@ static void of_mux_clk_setup(struct device_node *node)
u8 clk_mux_flags = 0;
u32 mask = 0;
u32 shift = 0;
- u32 flags = 0;
+ u32 flags = CLK_SET_RATE_NO_REPARENT;
num_parents = of_clk_get_parent_count(node);
if (num_parents < 2) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 06/94] clk: samsung: fix several typos to fix boot on s3c2410
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (3 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 05/94] clk: ti: set CLK_SET_RATE_NO_REPARENT for ti,mux-clock Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 07/94] clk: samsung: add more aliases for s3c24xx Sam Asadi
` (87 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Vasily Khoruzhick, Tomasz Figa, sam-the-6
From: Vasily Khoruzhick <anarsoul@gmail.com>
There's a several typos in a driver: 2410 instead of S3C2410
and wrong argument to ARRAY_SIZE(). They prevent s3c2410
from properly booting.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/samsung/clk-s3c2410.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/samsung/clk-s3c2410.c b/drivers/clk/samsung/clk-s3c2410.c
index ba07168..bd9a873 100644
--- a/drivers/clk/samsung/clk-s3c2410.c
+++ b/drivers/clk/samsung/clk-s3c2410.c
@@ -378,7 +378,7 @@ void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
if (!np)
s3c2410_common_clk_register_fixed_ext(ctx, xti_f);
- if (current_soc == 2410) {
+ if (current_soc == S3C2410) {
if (_get_rate("xti") == 12 * MHZ) {
s3c2410_plls[mpll].rate_table = pll_s3c2410_12mhz_tbl;
s3c2410_plls[upll].rate_table = pll_s3c2410_12mhz_tbl;
@@ -432,7 +432,7 @@ void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
samsung_clk_register_fixed_factor(ctx, s3c2410_ffactor,
ARRAY_SIZE(s3c2410_ffactor));
samsung_clk_register_alias(ctx, s3c2410_aliases,
- ARRAY_SIZE(s3c2410_common_aliases));
+ ARRAY_SIZE(s3c2410_aliases));
break;
case S3C2440:
samsung_clk_register_mux(ctx, s3c2440_muxes,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 07/94] clk: samsung: add more aliases for s3c24xx
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (4 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 06/94] clk: samsung: fix several typos to fix boot on s3c2410 Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 08/94] clk: samsung: exynos4: Remove SRC_MASK_ISP gates Sam Asadi
` (86 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Vasily Khoruzhick, Tomasz Figa, sam-the-6
From: Vasily Khoruzhick <anarsoul@gmail.com>
Without these aliases clock lookup fails in s3c2410fb,
s3cmci, s3c2410-nand, s3c24xx-i2s, and i2c-s3c2410 drivers.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/samsung/clk-s3c2410.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/clk/samsung/clk-s3c2410.c b/drivers/clk/samsung/clk-s3c2410.c
index bd9a873..140f473 100644
--- a/drivers/clk/samsung/clk-s3c2410.c
+++ b/drivers/clk/samsung/clk-s3c2410.c
@@ -152,6 +152,11 @@ struct samsung_clock_alias s3c2410_common_aliases[] __initdata = {
ALIAS(HCLK, NULL, "hclk"),
ALIAS(MPLL, NULL, "mpll"),
ALIAS(FCLK, NULL, "fclk"),
+ ALIAS(PCLK, NULL, "watchdog"),
+ ALIAS(PCLK_SDI, NULL, "sdi"),
+ ALIAS(HCLK_NAND, NULL, "nand"),
+ ALIAS(PCLK_I2S, NULL, "iis"),
+ ALIAS(PCLK_I2C, NULL, "i2c"),
};
/* S3C2410 specific clocks */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 08/94] clk: samsung: exynos4: Remove SRC_MASK_ISP gates
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (5 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 07/94] clk: samsung: add more aliases for s3c24xx Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 09/94] clk: s3c64xx: Hookup SPI clocks correctly Sam Asadi
` (85 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Tomasz Figa, Mike Turquette, sam-the-6
From: Tomasz Figa <t.figa@samsung.com>
ISP special clocks have dedicated gating registers and so MUX SRC_MASK
register should not be used. This patch fixes the problem of
Exynos4x12-based boards freezing on system suspend, because those
mux outputs need not to be masked while suspending.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Cc: Mike Turquette <mturquette@linaro.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/samsung/clk-exynos4.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c
index 4f150c9..7f4a473 100644
--- a/drivers/clk/samsung/clk-exynos4.c
+++ b/drivers/clk/samsung/clk-exynos4.c
@@ -925,21 +925,13 @@ static struct samsung_gate_clock exynos4x12_gate_clks[] __initdata = {
GATE(CLK_RTC, "rtc", "aclk100", E4X12_GATE_IP_PERIR, 15,
0, 0),
GATE(CLK_KEYIF, "keyif", "aclk100", E4X12_GATE_IP_PERIR, 16, 0, 0),
- GATE(CLK_SCLK_PWM_ISP, "sclk_pwm_isp", "div_pwm_isp",
- E4X12_SRC_MASK_ISP, 0, CLK_SET_RATE_PARENT, 0),
- GATE(CLK_SCLK_SPI0_ISP, "sclk_spi0_isp", "div_spi0_isp_pre",
- E4X12_SRC_MASK_ISP, 4, CLK_SET_RATE_PARENT, 0),
- GATE(CLK_SCLK_SPI1_ISP, "sclk_spi1_isp", "div_spi1_isp_pre",
- E4X12_SRC_MASK_ISP, 8, CLK_SET_RATE_PARENT, 0),
- GATE(CLK_SCLK_UART_ISP, "sclk_uart_isp", "div_uart_isp",
- E4X12_SRC_MASK_ISP, 12, CLK_SET_RATE_PARENT, 0),
- GATE(CLK_PWM_ISP_SCLK, "pwm_isp_sclk", "sclk_pwm_isp",
+ GATE(CLK_PWM_ISP_SCLK, "pwm_isp_sclk", "div_pwm_isp",
E4X12_GATE_IP_ISP, 0, 0, 0),
- GATE(CLK_SPI0_ISP_SCLK, "spi0_isp_sclk", "sclk_spi0_isp",
+ GATE(CLK_SPI0_ISP_SCLK, "spi0_isp_sclk", "div_spi0_isp_pre",
E4X12_GATE_IP_ISP, 1, 0, 0),
- GATE(CLK_SPI1_ISP_SCLK, "spi1_isp_sclk", "sclk_spi1_isp",
+ GATE(CLK_SPI1_ISP_SCLK, "spi1_isp_sclk", "div_spi1_isp_pre",
E4X12_GATE_IP_ISP, 2, 0, 0),
- GATE(CLK_UART_ISP_SCLK, "uart_isp_sclk", "sclk_uart_isp",
+ GATE(CLK_UART_ISP_SCLK, "uart_isp_sclk", "div_uart_isp",
E4X12_GATE_IP_ISP, 3, 0, 0),
GATE(CLK_WDT, "watchdog", "aclk100", E4X12_GATE_IP_PERIR, 14, 0, 0),
GATE(CLK_PCM0, "pcm0", "aclk100", E4X12_GATE_IP_MAUDIO, 2,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 09/94] clk: s3c64xx: Hookup SPI clocks correctly
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (6 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 08/94] clk: samsung: exynos4: Remove SRC_MASK_ISP gates Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 10/94] clk/exynos5250: fix bit number for tv sysmmu clock Sam Asadi
` (84 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Charles Keepax, Tomasz Figa, sam-the-6
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
In the move to this clock driver the hookups for the SPI clocks were
dropped, which causes my system Cragganmore (s3c6410 based) to be unable
to locate any spibus clocks. This patch adds them back in.
When taking the clock from the epll clock (SCLK) the rates on the SPI
bus are incorrect, this needs further debugging but the hookup here
should be correct and the problem should be else where.
The USBCLK case has been dropped because this requires the USB PHY to be
enabled.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/samsung/clk-s3c64xx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/samsung/clk-s3c64xx.c b/drivers/clk/samsung/clk-s3c64xx.c
index efa16ee..8889ff1c 100644
--- a/drivers/clk/samsung/clk-s3c64xx.c
+++ b/drivers/clk/samsung/clk-s3c64xx.c
@@ -418,8 +418,10 @@ static struct samsung_clock_alias s3c64xx_clock_aliases[] = {
ALIAS(SCLK_MMC2, "s3c-sdhci.2", "mmc_busclk.2"),
ALIAS(SCLK_MMC1, "s3c-sdhci.1", "mmc_busclk.2"),
ALIAS(SCLK_MMC0, "s3c-sdhci.0", "mmc_busclk.2"),
- ALIAS(SCLK_SPI1, "s3c6410-spi.1", "spi-bus"),
- ALIAS(SCLK_SPI0, "s3c6410-spi.0", "spi-bus"),
+ ALIAS(PCLK_SPI1, "s3c6410-spi.1", "spi_busclk0"),
+ ALIAS(SCLK_SPI1, "s3c6410-spi.1", "spi_busclk2"),
+ ALIAS(PCLK_SPI0, "s3c6410-spi.0", "spi_busclk0"),
+ ALIAS(SCLK_SPI0, "s3c6410-spi.0", "spi_busclk2"),
ALIAS(SCLK_AUDIO1, "samsung-pcm.1", "audio-bus"),
ALIAS(SCLK_AUDIO1, "samsung-i2s.1", "audio-bus"),
ALIAS(SCLK_AUDIO0, "samsung-pcm.0", "audio-bus"),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 10/94] clk/exynos5250: fix bit number for tv sysmmu clock
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (7 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 09/94] clk: s3c64xx: Hookup SPI clocks correctly Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 11/94] clk: exynos5420: Remove aclk66_peric from the clock tree description Sam Asadi
` (83 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Rahul Sharma, Tomasz Figa, sam-the-6
From: Rahul Sharma <rahul.sharma@samsung.com>
Change bit from 2 to 9 for tv (mixer) sysmmu clock.
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/samsung/clk-exynos5250.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c
index 1fad4c5..184f642 100644
--- a/drivers/clk/samsung/clk-exynos5250.c
+++ b/drivers/clk/samsung/clk-exynos5250.c
@@ -661,7 +661,7 @@ static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = {
GATE(CLK_RTC, "rtc", "div_aclk66", GATE_IP_PERIS, 20, 0, 0),
GATE(CLK_TMU, "tmu", "div_aclk66", GATE_IP_PERIS, 21, 0, 0),
GATE(CLK_SMMU_TV, "smmu_tv", "mout_aclk200_disp1_sub",
- GATE_IP_DISP1, 2, 0, 0),
+ GATE_IP_DISP1, 9, 0, 0),
GATE(CLK_SMMU_FIMD1, "smmu_fimd1", "mout_aclk200_disp1_sub",
GATE_IP_DISP1, 8, 0, 0),
GATE(CLK_SMMU_2D, "smmu_2d", "div_aclk200", GATE_IP_ACP, 7, 0, 0),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 11/94] clk: exynos5420: Remove aclk66_peric from the clock tree description
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (8 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 10/94] clk/exynos5250: fix bit number for tv sysmmu clock Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 12/94] dma: cppi41: handle 0-length packets Sam Asadi
` (82 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Doug Anderson, Tomasz Figa, sam-the-6
From: Doug Anderson <dianders@chromium.org>
The "aclk66_peric" clock is a gate clock with a whole bunch of gates
underneath it. This big gate isn't very useful to include in our
clock tree. If any of the children need to be turned on then the big
gate will need to be on anyway. ...and there are plenty of other "big
gates" that aren't described in our clock tree, some of which shut off
collections of clocks that have no relationship in the hierarchy so
are hard to model.
"aclk66_peric" is causing earlyprintk problems since it gets disabled
as part of the boot process, so let's just remove it.
Strangely (and for no good reason) this clock is exported as part of
the common clock bindings. Remove it since there are no in-kernel
device trees using it and no reason anyone out of tree should refer to
it either.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/samsung/clk-exynos5420.c | 85 +++++++++++++++++++++-----------
include/dt-bindings/clock/exynos5420.h | 1 -
2 files changed, 55 insertions(+), 31 deletions(-)
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index 9d7d7ee..61eccf0 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -890,8 +890,6 @@ static struct samsung_gate_clock exynos5x_gate_clks[] __initdata = {
GATE_BUS_TOP, 9, CLK_IGNORE_UNUSED, 0),
GATE(0, "aclk66_psgen", "mout_user_aclk66_psgen",
GATE_BUS_TOP, 10, CLK_IGNORE_UNUSED, 0),
- GATE(CLK_ACLK66_PERIC, "aclk66_peric", "mout_user_aclk66_peric",
- GATE_BUS_TOP, 11, CLK_IGNORE_UNUSED, 0),
GATE(0, "aclk266_isp", "mout_user_aclk266_isp",
GATE_BUS_TOP, 13, 0, 0),
GATE(0, "aclk166", "mout_user_aclk166",
@@ -994,34 +992,61 @@ static struct samsung_gate_clock exynos5x_gate_clks[] __initdata = {
SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0),
/* PERIC Block */
- GATE(CLK_UART0, "uart0", "aclk66_peric", GATE_IP_PERIC, 0, 0, 0),
- GATE(CLK_UART1, "uart1", "aclk66_peric", GATE_IP_PERIC, 1, 0, 0),
- GATE(CLK_UART2, "uart2", "aclk66_peric", GATE_IP_PERIC, 2, 0, 0),
- GATE(CLK_UART3, "uart3", "aclk66_peric", GATE_IP_PERIC, 3, 0, 0),
- GATE(CLK_I2C0, "i2c0", "aclk66_peric", GATE_IP_PERIC, 6, 0, 0),
- GATE(CLK_I2C1, "i2c1", "aclk66_peric", GATE_IP_PERIC, 7, 0, 0),
- GATE(CLK_I2C2, "i2c2", "aclk66_peric", GATE_IP_PERIC, 8, 0, 0),
- GATE(CLK_I2C3, "i2c3", "aclk66_peric", GATE_IP_PERIC, 9, 0, 0),
- GATE(CLK_USI0, "usi0", "aclk66_peric", GATE_IP_PERIC, 10, 0, 0),
- GATE(CLK_USI1, "usi1", "aclk66_peric", GATE_IP_PERIC, 11, 0, 0),
- GATE(CLK_USI2, "usi2", "aclk66_peric", GATE_IP_PERIC, 12, 0, 0),
- GATE(CLK_USI3, "usi3", "aclk66_peric", GATE_IP_PERIC, 13, 0, 0),
- GATE(CLK_I2C_HDMI, "i2c_hdmi", "aclk66_peric", GATE_IP_PERIC, 14, 0, 0),
- GATE(CLK_TSADC, "tsadc", "aclk66_peric", GATE_IP_PERIC, 15, 0, 0),
- GATE(CLK_SPI0, "spi0", "aclk66_peric", GATE_IP_PERIC, 16, 0, 0),
- GATE(CLK_SPI1, "spi1", "aclk66_peric", GATE_IP_PERIC, 17, 0, 0),
- GATE(CLK_SPI2, "spi2", "aclk66_peric", GATE_IP_PERIC, 18, 0, 0),
- GATE(CLK_I2S1, "i2s1", "aclk66_peric", GATE_IP_PERIC, 20, 0, 0),
- GATE(CLK_I2S2, "i2s2", "aclk66_peric", GATE_IP_PERIC, 21, 0, 0),
- GATE(CLK_PCM1, "pcm1", "aclk66_peric", GATE_IP_PERIC, 22, 0, 0),
- GATE(CLK_PCM2, "pcm2", "aclk66_peric", GATE_IP_PERIC, 23, 0, 0),
- GATE(CLK_PWM, "pwm", "aclk66_peric", GATE_IP_PERIC, 24, 0, 0),
- GATE(CLK_SPDIF, "spdif", "aclk66_peric", GATE_IP_PERIC, 26, 0, 0),
- GATE(CLK_USI4, "usi4", "aclk66_peric", GATE_IP_PERIC, 28, 0, 0),
- GATE(CLK_USI5, "usi5", "aclk66_peric", GATE_IP_PERIC, 30, 0, 0),
- GATE(CLK_USI6, "usi6", "aclk66_peric", GATE_IP_PERIC, 31, 0, 0),
-
- GATE(CLK_KEYIF, "keyif", "aclk66_peric", GATE_BUS_PERIC, 22, 0, 0),
+ GATE(CLK_UART0, "uart0", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 0, 0, 0),
+ GATE(CLK_UART1, "uart1", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 1, 0, 0),
+ GATE(CLK_UART2, "uart2", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 2, 0, 0),
+ GATE(CLK_UART3, "uart3", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 3, 0, 0),
+ GATE(CLK_I2C0, "i2c0", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 6, 0, 0),
+ GATE(CLK_I2C1, "i2c1", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 7, 0, 0),
+ GATE(CLK_I2C2, "i2c2", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 8, 0, 0),
+ GATE(CLK_I2C3, "i2c3", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 9, 0, 0),
+ GATE(CLK_USI0, "usi0", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 10, 0, 0),
+ GATE(CLK_USI1, "usi1", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 11, 0, 0),
+ GATE(CLK_USI2, "usi2", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 12, 0, 0),
+ GATE(CLK_USI3, "usi3", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 13, 0, 0),
+ GATE(CLK_I2C_HDMI, "i2c_hdmi", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 14, 0, 0),
+ GATE(CLK_TSADC, "tsadc", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 15, 0, 0),
+ GATE(CLK_SPI0, "spi0", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 16, 0, 0),
+ GATE(CLK_SPI1, "spi1", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 17, 0, 0),
+ GATE(CLK_SPI2, "spi2", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 18, 0, 0),
+ GATE(CLK_I2S1, "i2s1", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 20, 0, 0),
+ GATE(CLK_I2S2, "i2s2", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 21, 0, 0),
+ GATE(CLK_PCM1, "pcm1", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 22, 0, 0),
+ GATE(CLK_PCM2, "pcm2", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 23, 0, 0),
+ GATE(CLK_PWM, "pwm", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 24, 0, 0),
+ GATE(CLK_SPDIF, "spdif", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 26, 0, 0),
+ GATE(CLK_USI4, "usi4", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 28, 0, 0),
+ GATE(CLK_USI5, "usi5", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 30, 0, 0),
+ GATE(CLK_USI6, "usi6", "mout_user_aclk66_peric",
+ GATE_IP_PERIC, 31, 0, 0),
+
+ GATE(CLK_KEYIF, "keyif", "mout_user_aclk66_peric",
+ GATE_BUS_PERIC, 22, 0, 0),
/* PERIS Block */
GATE(CLK_CHIPID, "chipid", "aclk66_psgen",
diff --git a/include/dt-bindings/clock/exynos5420.h b/include/dt-bindings/clock/exynos5420.h
index 97dcb89..14e1c8f 100644
--- a/include/dt-bindings/clock/exynos5420.h
+++ b/include/dt-bindings/clock/exynos5420.h
@@ -63,7 +63,6 @@
#define CLK_SCLK_MPHY_IXTAL24 161
/* gate clocks */
-#define CLK_ACLK66_PERIC 256
#define CLK_UART0 257
#define CLK_UART1 258
#define CLK_UART2 259
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 12/94] dma: cppi41: handle 0-length packets
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (9 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 11/94] clk: exynos5420: Remove aclk66_peric from the clock tree description Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 13/94] Update imx-sdma cyclic handling to report residue Sam Asadi
` (81 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Daniel Mack, Vinod Koul, sam-the-6
From: Daniel Mack <zonque@gmail.com>
When a 0-length packet is received on the bus, desc->pd0 yields 1,
which confuses the driver's users. This information is clearly wrong
and not in accordance to the datasheet, but it's been observed on an
AM335x board, very reproducible.
Fix this by looking at bit 19 in PD2 of the completed packet. This bit
will tell us if a zero-length packet was received on a queue. If it's
set, ignore the value in PD0 and report a total length of 0 instead.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/dma/cppi41.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
index d028f36..8f8b0b6 100644
--- a/drivers/dma/cppi41.c
+++ b/drivers/dma/cppi41.c
@@ -86,6 +86,9 @@
#define USBSS_IRQ_PD_COMP (1 << 2)
+/* Packet Descriptor */
+#define PD2_ZERO_LENGTH (1 << 19)
+
struct cppi41_channel {
struct dma_chan chan;
struct dma_async_tx_descriptor txd;
@@ -307,7 +310,7 @@ static irqreturn_t cppi41_irq(int irq, void *data)
__iormb();
while (val) {
- u32 desc;
+ u32 desc, len;
q_num = __fls(val);
val &= ~(1 << q_num);
@@ -319,9 +322,13 @@ static irqreturn_t cppi41_irq(int irq, void *data)
q_num, desc);
continue;
}
- c->residue = pd_trans_len(c->desc->pd6) -
- pd_trans_len(c->desc->pd0);
+ if (c->desc->pd2 & PD2_ZERO_LENGTH)
+ len = 0;
+ else
+ len = pd_trans_len(c->desc->pd0);
+
+ c->residue = pd_trans_len(c->desc->pd6) - len;
dma_cookie_complete(&c->txd);
c->txd.callback(c->txd.callback_param);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 13/94] Update imx-sdma cyclic handling to report residue
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (10 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 12/94] dma: cppi41: handle 0-length packets Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 14/94] clk: s2mps11: Fix double free corruption during driver unbind Sam Asadi
` (80 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Russell King - ARM Linux, Russell King,
Vinod Koul, sam-the-6
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
I received a report this morning from one of the Novena developers that
the behaviour of the iMX6 ASoC codec driver (using imx-pcm-dma.c) was
sub-optimal under high system load.
While there are issues relating to system load remaining, upon reviewing
the ASoC imx-pcm-dma.c driver, it was noticed that it not using the
residue support, because SDMA doesn't support it. This has the effect
that SDMA has to make multiple calls into the ASoC and ALSA code, one
for each period.
Since ALSA's snd_pcm_elapsed() does not need to be called multiple times
and it is entirely sufficient to call it once to update ALSA with the
current buffer position via the pointer method, we can do better here.
We can also avoid stopping the DMA entirely, just like real cyclic DMA
implementations behave. While this means that we replay some old samples,
this is a nicer behaviour than having audio stop and restart.
The changes to achieve this are relatively minor - imx-sdma.c can track
where the DMA is to the nearest descriptor boundary - it does this
already when deciding how many callbacks to issue. In doing this,
buf_tail always points at the descriptor which will complete next.
The residue is defined by the bytes remaining to the end of the buffer,
when the buffer is viewed as a single block of memory [start...end].
So, when we start out, there's a full buffer worth of residue, and this
counts down as we approach the end of the buffer, eventually becoming
zero at the end, before returning to the full buffer worth when we
wrap back to the start.
Moving the walking of the descriptors into the interrupt handler means
that we can update the BD_DONE flag at interrupt time, thus avoiding
a delayed tasklet stopping the cyclic DMA.
This means that the residue can be calculated from (total descriptors -
buf_tail) * descriptor size. This is what the change below does. We
update imx-pcm-dma.c to remove the NO_RESIDUE flag since we now provide
the residue.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/dma/imx-sdma.c | 22 ++++++++++++++++++----
sound/soc/fsl/imx-pcm-dma.c | 1 -
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 1287146..14867e3 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -255,6 +255,7 @@ struct sdma_channel {
enum dma_slave_buswidth word_size;
unsigned int buf_tail;
unsigned int num_bd;
+ unsigned int period_len;
struct sdma_buffer_descriptor *bd;
dma_addr_t bd_phys;
unsigned int pc_from_device, pc_to_device;
@@ -593,6 +594,12 @@ static void sdma_event_disable(struct sdma_channel *sdmac, unsigned int event)
static void sdma_handle_channel_loop(struct sdma_channel *sdmac)
{
+ if (sdmac->desc.callback)
+ sdmac->desc.callback(sdmac->desc.callback_param);
+}
+
+static void sdma_update_channel_loop(struct sdma_channel *sdmac)
+{
struct sdma_buffer_descriptor *bd;
/*
@@ -611,9 +618,6 @@ static void sdma_handle_channel_loop(struct sdma_channel *sdmac)
bd->mode.status |= BD_DONE;
sdmac->buf_tail++;
sdmac->buf_tail %= sdmac->num_bd;
-
- if (sdmac->desc.callback)
- sdmac->desc.callback(sdmac->desc.callback_param);
}
}
@@ -669,6 +673,9 @@ static irqreturn_t sdma_int_handler(int irq, void *dev_id)
int channel = fls(stat) - 1;
struct sdma_channel *sdmac = &sdma->channel[channel];
+ if (sdmac->flags & IMX_DMA_SG_LOOP)
+ sdma_update_channel_loop(sdmac);
+
tasklet_schedule(&sdmac->tasklet);
__clear_bit(channel, &stat);
@@ -1129,6 +1136,7 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
sdmac->status = DMA_IN_PROGRESS;
sdmac->buf_tail = 0;
+ sdmac->period_len = period_len;
sdmac->flags |= IMX_DMA_SG_LOOP;
sdmac->direction = direction;
@@ -1225,9 +1233,15 @@ static enum dma_status sdma_tx_status(struct dma_chan *chan,
struct dma_tx_state *txstate)
{
struct sdma_channel *sdmac = to_sdma_chan(chan);
+ u32 residue;
+
+ if (sdmac->flags & IMX_DMA_SG_LOOP)
+ residue = (sdmac->num_bd - sdmac->buf_tail) * sdmac->period_len;
+ else
+ residue = sdmac->chn_count - sdmac->chn_real_count;
dma_set_tx_state(txstate, chan->completed_cookie, chan->cookie,
- sdmac->chn_count - sdmac->chn_real_count);
+ residue);
return sdmac->status;
}
diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c
index 0849b7b..0db94f49 100644
--- a/sound/soc/fsl/imx-pcm-dma.c
+++ b/sound/soc/fsl/imx-pcm-dma.c
@@ -59,7 +59,6 @@ int imx_pcm_dma_init(struct platform_device *pdev)
{
return devm_snd_dmaengine_pcm_register(&pdev->dev,
&imx_dmaengine_pcm_config,
- SND_DMAENGINE_PCM_FLAG_NO_RESIDUE |
SND_DMAENGINE_PCM_FLAG_COMPAT);
}
EXPORT_SYMBOL_GPL(imx_pcm_dma_init);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 14/94] clk: s2mps11: Fix double free corruption during driver unbind
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (11 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 13/94] Update imx-sdma cyclic handling to report residue Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 15/94] clk: sunxi: fix devm_ioremap_resource error detection code Sam Asadi
` (79 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Krzysztof Kozlowski, stable, Mike Turquette,
sam-the-6
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
After unbinding the driver memory was corrupted by double free of
clk_lookup structure. This lead to OOPS when re-binding the driver
again.
The driver allocated memory for 'clk_lookup' with devm_kzalloc. During
driver removal this memory was freed twice: once by clkdev_drop() and
second by devm code.
Kernel panic log:
[ 30.839284] Unable to handle kernel paging request at virtual address 5f343173
[ 30.846476] pgd = dee14000
[ 30.849165] [5f343173] *pgd=00000000
[ 30.852703] Internal error: Oops: 805 [#1] PREEMPT SMP ARM
[ 30.858166] Modules linked in:
[ 30.861208] CPU: 0 PID: 1 Comm: bash Not tainted 3.16.0-rc2-00239-g94bdf617b07e-dirty #40
[ 30.869364] task: df478000 ti: df480000 task.ti: df480000
[ 30.874752] PC is at clkdev_add+0x2c/0x38
[ 30.878738] LR is at clkdev_add+0x18/0x38
[ 30.882732] pc : [<c0350908>] lr : [<c03508f4>] psr: 60000013
[ 30.882732] sp : df481e78 ip : 00000001 fp : c0700ed8
[ 30.894187] r10: 0000000c r9 : 00000000 r8 : c07b0e3c
[ 30.899396] r7 : 00000002 r6 : df45f9d0 r5 : df421390 r4 : c0700d6c
[ 30.905906] r3 : 5f343173 r2 : c0700d84 r1 : 60000013 r0 : c0700d6c
[ 30.912417] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 30.919534] Control: 10c53c7d Table: 5ee1406a DAC: 00000015
[ 30.925262] Process bash (pid: 1, stack limit = 0xdf480240)
[ 30.930817] Stack: (0xdf481e78 to 0xdf482000)
[ 30.935159] 1e60: 00001000 df6de610
[ 30.943321] 1e80: df7f4558 c0355650 c05ec6ec c0700eb0 df6de600 df7f4510 dec9d69c 00000014
[ 30.951480] 1ea0: 00167b48 df6de610 c0700e30 c0713518 00000000 c0700e30 dec9d69c 00000006
[ 30.959639] 1ec0: 00167b48 c02c1b7c c02c1b64 df6de610 c07aff48 c02c0420 c06fb150 c047cc20
[ 30.967798] 1ee0: df6de610 df6de610 c0700e30 df6de644 c06fb150 0000000c dec9d690 c02bef90
[ 30.975957] 1f00: dec9c6c0 dece4c00 df481f80 dece4c00 0000000c c02be73c 0000000c c016ca8c
[ 30.984116] 1f20: c016ca48 00000000 00000000 c016c1f4 00000000 00000000 b6f18000 df481f80
[ 30.992276] 1f40: df7f66c0 0000000c df480000 df480000 b6f18000 c011094c df47839c 60000013
[ 31.000435] 1f60: 00000000 00000000 df7f66c0 df7f66c0 0000000c df480000 b6f18000 c0110dd4
[ 31.008594] 1f80: 00000000 00000000 0000000c b6ec05d8 0000000c b6f18000 00000004 c000f2a8
[ 31.016753] 1fa0: 00001000 c000f0e0 b6ec05d8 0000000c 00000001 b6f18000 0000000c 00000000
[ 31.024912] 1fc0: b6ec05d8 0000000c b6f18000 00000004 0000000c 00000001 00000000 00167b48
[ 31.033071] 1fe0: 00000000 bed83a80 b6e004f0 b6e5122c 60000010 00000001 ffffffff ffffffff
[ 31.041248] [<c0350908>] (clkdev_add) from [<c0355650>] (s2mps11_clk_probe+0x2b4/0x3b4)
[ 31.049223] [<c0355650>] (s2mps11_clk_probe) from [<c02c1b7c>] (platform_drv_probe+0x18/0x48)
[ 31.057728] [<c02c1b7c>] (platform_drv_probe) from [<c02c0420>] (driver_probe_device+0x13c/0x384)
[ 31.066579] [<c02c0420>] (driver_probe_device) from [<c02bef90>] (bind_store+0x88/0xd8)
[ 31.074564] [<c02bef90>] (bind_store) from [<c02be73c>] (drv_attr_store+0x20/0x2c)
[ 31.082118] [<c02be73c>] (drv_attr_store) from [<c016ca8c>] (sysfs_kf_write+0x44/0x48)
[ 31.090016] [<c016ca8c>] (sysfs_kf_write) from [<c016c1f4>] (kernfs_fop_write+0xc0/0x17c)
[ 31.098176] [<c016c1f4>] (kernfs_fop_write) from [<c011094c>] (vfs_write+0xa0/0x1c4)
[ 31.105899] [<c011094c>] (vfs_write) from [<c0110dd4>] (SyS_write+0x40/0x8c)
[ 31.112931] [<c0110dd4>] (SyS_write) from [<c000f0e0>] (ret_fast_syscall+0x0/0x3c)
[ 31.120481] Code: e2842018 e584501c e1a00004 e885000c (e5835000)
[ 31.126596] ---[ end trace efad45bfa3a61b05 ]---
[ 31.131181] Kernel panic - not syncing: Fatal exception
[ 31.136368] CPU1: stopping
[ 31.139054] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 3.16.0-rc2-00239-g94bdf617b07e-dirty #40
[ 31.148697] [<c0016480>] (unwind_backtrace) from [<c0012950>] (show_stack+0x10/0x14)
[ 31.156419] [<c0012950>] (show_stack) from [<c0480db8>] (dump_stack+0x80/0xcc)
[ 31.163622] [<c0480db8>] (dump_stack) from [<c001499c>] (handle_IPI+0x130/0x15c)
[ 31.170998] [<c001499c>] (handle_IPI) from [<c000862c>] (gic_handle_irq+0x60/0x68)
[ 31.178549] [<c000862c>] (gic_handle_irq) from [<c0013480>] (__irq_svc+0x40/0x70)
[ 31.186009] Exception stack(0xdf4bdf88 to 0xdf4bdfd0)
[ 31.191046] df80: ffffffed 00000000 00000000 00000000 df4bc000 c06d042c
[ 31.199207] dfa0: 00000000 ffffffed c06d03c0 00000000 c070c288 00000000 00000000 df4bdfd0
[ 31.207363] dfc0: c0010324 c0010328 60000013 ffffffff
[ 31.212402] [<c0013480>] (__irq_svc) from [<c0010328>] (arch_cpu_idle+0x28/0x30)
[ 31.219783] [<c0010328>] (arch_cpu_idle) from [<c005f150>] (cpu_startup_entry+0x2c4/0x3f0)
[ 31.228027] [<c005f150>] (cpu_startup_entry) from [<400086c4>] (0x400086c4)
[ 31.234968] ---[ end Kernel panic - not syncing: Fatal exception
Fixes: 7cc560dea415 ("clk: s2mps11: Add support for s2mps11")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/clk-s2mps11.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
index 9b7b585..3757e9e 100644
--- a/drivers/clk/clk-s2mps11.c
+++ b/drivers/clk/clk-s2mps11.c
@@ -230,16 +230,13 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
goto err_reg;
}
- s2mps11_clk->lookup = devm_kzalloc(&pdev->dev,
- sizeof(struct clk_lookup), GFP_KERNEL);
+ s2mps11_clk->lookup = clkdev_alloc(s2mps11_clk->clk,
+ s2mps11_name(s2mps11_clk), NULL);
if (!s2mps11_clk->lookup) {
ret = -ENOMEM;
goto err_lup;
}
- s2mps11_clk->lookup->con_id = s2mps11_name(s2mps11_clk);
- s2mps11_clk->lookup->clk = s2mps11_clk->clk;
-
clkdev_add(s2mps11_clk->lookup);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 15/94] clk: sunxi: fix devm_ioremap_resource error detection code
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (12 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 14/94] clk: s2mps11: Fix double free corruption during driver unbind Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 16/94] ARM: kprobes: Prevent known test failures stopping other tests running Sam Asadi
` (78 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Himangi Saraogi, Mike Turquette, sam-the-6
From: Himangi Saraogi <himangi774@gmail.com>
devm_ioremap_resource returns an ERR_PTR value, not NULL, on failure.
A simplified version of the semantic match that finds this problem is as
follows:
// <smpl>
@@
expression e,e1;
statement S;
@@
*e = devm_ioremap_resource(...);
if (!e1) S
// </smpl>
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by Boris BREZILLON <boris.brezillon@free-electrons.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/sunxi/clk-sun6i-apb0-gates.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/sunxi/clk-sun6i-apb0-gates.c b/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
index 44cd27c..670f90d 100644
--- a/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
+++ b/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
@@ -29,7 +29,7 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev)
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
reg = devm_ioremap_resource(&pdev->dev, r);
- if (!reg)
+ if (IS_ERR(reg))
return PTR_ERR(reg);
clk_parent = of_clk_get_parent_name(np, 0);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 16/94] ARM: kprobes: Prevent known test failures stopping other tests running
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (13 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 15/94] clk: sunxi: fix devm_ioremap_resource error detection code Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 17/94] ARM: kprobes: Disallow instructions with PC and register specified shift Sam Asadi
` (77 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Jon Medhurst, sam-the-6
From: Jon Medhurst <tixy@linaro.org>
Due to a long-standing issue with Thumb symbol lookup [1] the jprobes
tests fail when built into a kernel compiled as Thumb mode. (They work
fine for ARM mode kernels or for Thumb when built as a loadable module.)
Rather than have this problem terminate testing prematurely lets instead
emit an error message and carry on with the main kprobes tests, delaying
the final failure report until the end.
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/063026.html
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/kernel/kprobes-test.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/kernel/kprobes-test.c b/arch/arm/kernel/kprobes-test.c
index 3796399..08d7312 100644
--- a/arch/arm/kernel/kprobes-test.c
+++ b/arch/arm/kernel/kprobes-test.c
@@ -225,6 +225,7 @@ static int pre_handler_called;
static int post_handler_called;
static int jprobe_func_called;
static int kretprobe_handler_called;
+static int tests_failed;
#define FUNC_ARG1 0x12345678
#define FUNC_ARG2 0xabcdef
@@ -461,6 +462,13 @@ static int run_api_tests(long (*func)(long, long))
pr_info(" jprobe\n");
ret = test_jprobe(func);
+#if defined(CONFIG_THUMB2_KERNEL) && !defined(MODULE)
+ if (ret == -EINVAL) {
+ pr_err("FAIL: Known longtime bug with jprobe on Thumb kernels\n");
+ tests_failed = ret;
+ ret = 0;
+ }
+#endif
if (ret < 0)
return ret;
@@ -1672,6 +1680,8 @@ static int __init run_all_tests(void)
out:
if (ret == 0)
+ ret = tests_failed;
+ if (ret == 0)
pr_info("Finished kprobe tests OK\n");
else
pr_err("kprobe tests failed\n");
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 17/94] ARM: kprobes: Disallow instructions with PC and register specified shift
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (14 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 16/94] ARM: kprobes: Prevent known test failures stopping other tests running Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 18/94] ARM: kprobes: Fix test code compilation errors for ARMv4 targets Sam Asadi
` (76 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Jon Medhurst, sam-the-6
From: Jon Medhurst <tixy@linaro.org>
ARM data processing instructions which have a register specified shift
are defined as UNPREDICTABLE if PC is used for any register, not just
the shift value as the code was previous assuming. This issue manifests
on A15 devices as either test case failures or undefined instructions
aborts.
Reported-by: David Long <dave.long@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/kernel/kprobes-test-arm.c | 22 ++++++++++++----------
arch/arm/kernel/probes-arm.c | 6 +++---
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c
index 9db4b65..e73f9cf 100644
--- a/arch/arm/kernel/kprobes-test-arm.c
+++ b/arch/arm/kernel/kprobes-test-arm.c
@@ -74,8 +74,6 @@ void kprobe_arm_test_cases(void)
TEST_RRR( op "lt" s " r11, r",11,VAL1,", r",14,N(val),", asr r",7, 6,"")\
TEST_RR( op "gt" s " r12, r13" ", r",14,val, ", ror r",14,7,"")\
TEST_RR( op "le" s " r14, r",0, val, ", r13" ", lsl r",14,8,"")\
- TEST_RR( op s " r12, pc" ", r",14,val, ", ror r",14,7,"")\
- TEST_RR( op s " r14, r",0, val, ", pc" ", lsl r",14,8,"")\
TEST_R( op "eq" s " r0, r",11,VAL1,", #0xf5") \
TEST_R( op "ne" s " r11, r",0, VAL1,", #0xf5000000") \
TEST_R( op s " r7, r",8, VAL2,", #0x000af000") \
@@ -103,8 +101,6 @@ void kprobe_arm_test_cases(void)
TEST_RRR( op "ge r",11,VAL1,", r",14,N(val),", asr r",7, 6,"") \
TEST_RR( op "le r13" ", r",14,val, ", ror r",14,7,"") \
TEST_RR( op "gt r",0, val, ", r13" ", lsl r",14,8,"") \
- TEST_RR( op " pc" ", r",14,val, ", ror r",14,7,"") \
- TEST_RR( op " r",0, val, ", pc" ", lsl r",14,8,"") \
TEST_R( op "eq r",11,VAL1,", #0xf5") \
TEST_R( op "ne r",0, VAL1,", #0xf5000000") \
TEST_R( op " r",8, VAL2,", #0x000af000")
@@ -125,7 +121,6 @@ void kprobe_arm_test_cases(void)
TEST_RR( op "ge" s " r11, r",11,N(val),", asr r",7, 6,"") \
TEST_RR( op "lt" s " r12, r",11,val, ", ror r",14,7,"") \
TEST_R( op "gt" s " r14, r13" ", lsl r",14,8,"") \
- TEST_R( op "le" s " r14, pc" ", lsl r",14,8,"") \
TEST( op "eq" s " r0, #0xf5") \
TEST( op "ne" s " r11, #0xf5000000") \
TEST( op s " r7, #0x000af000") \
@@ -159,12 +154,19 @@ void kprobe_arm_test_cases(void)
TEST_SUPPORTED("cmp pc, #0x1000");
TEST_SUPPORTED("cmp sp, #0x1000");
- /* Data-processing with PC as shift*/
+ /* Data-processing with PC and a shift count in a register */
TEST_UNSUPPORTED(__inst_arm(0xe15c0f1e) " @ cmp r12, r14, asl pc")
TEST_UNSUPPORTED(__inst_arm(0xe1a0cf1e) " @ mov r12, r14, asl pc")
TEST_UNSUPPORTED(__inst_arm(0xe08caf1e) " @ add r10, r12, r14, asl pc")
-
- /* Data-processing with PC as shift*/
+ TEST_UNSUPPORTED(__inst_arm(0xe151021f) " @ cmp r1, pc, lsl r2")
+ TEST_UNSUPPORTED(__inst_arm(0xe17f0211) " @ cmn pc, r1, lsl r2")
+ TEST_UNSUPPORTED(__inst_arm(0xe1a0121f) " @ mov r1, pc, lsl r2")
+ TEST_UNSUPPORTED(__inst_arm(0xe1a0f211) " @ mov pc, r1, lsl r2")
+ TEST_UNSUPPORTED(__inst_arm(0xe042131f) " @ sub r1, r2, pc, lsl r3")
+ TEST_UNSUPPORTED(__inst_arm(0xe1cf1312) " @ bic r1, pc, r2, lsl r3")
+ TEST_UNSUPPORTED(__inst_arm(0xe081f312) " @ add pc, r1, r2, lsl r3")
+
+ /* Data-processing with PC as a target and status registers updated */
TEST_UNSUPPORTED("movs pc, r1")
TEST_UNSUPPORTED("movs pc, r1, lsl r2")
TEST_UNSUPPORTED("movs pc, #0x10000")
@@ -187,14 +189,14 @@ void kprobe_arm_test_cases(void)
TEST_BF_R ("add pc, pc, r",14,2f-1f-8,"")
TEST_BF_R ("add pc, r",14,2f-1f-8,", pc")
TEST_BF_R ("mov pc, r",0,2f,"")
- TEST_BF_RR("mov pc, r",0,2f,", asl r",1,0,"")
+ TEST_BF_R ("add pc, pc, r",14,(2f-1f-8)*2,", asr #1")
TEST_BB( "sub pc, pc, #1b-2b+8")
#if __LINUX_ARM_ARCH__ == 6 && !defined(CONFIG_CPU_V7)
TEST_BB( "sub pc, pc, #1b-2b+8-2") /* UNPREDICTABLE before and after ARMv6 */
#endif
TEST_BB_R( "sub pc, pc, r",14, 1f-2f+8,"")
TEST_BB_R( "rsb pc, r",14,1f-2f+8,", pc")
- TEST_RR( "add pc, pc, r",10,-2,", asl r",11,1,"")
+ TEST_R( "add pc, pc, r",10,-2,", asl #1")
#ifdef CONFIG_THUMB2_KERNEL
TEST_ARM_TO_THUMB_INTERWORK_R("add pc, pc, r",0,3f-1f-8+1,"")
TEST_ARM_TO_THUMB_INTERWORK_R("sub pc, r",0,3f+8+1,", #8")
diff --git a/arch/arm/kernel/probes-arm.c b/arch/arm/kernel/probes-arm.c
index 51a13a0..8eaef81 100644
--- a/arch/arm/kernel/probes-arm.c
+++ b/arch/arm/kernel/probes-arm.c
@@ -341,12 +341,12 @@ static const union decode_item arm_cccc_000x_table[] = {
/* CMP (reg-shift reg) cccc 0001 0101 xxxx xxxx xxxx 0xx1 xxxx */
/* CMN (reg-shift reg) cccc 0001 0111 xxxx xxxx xxxx 0xx1 xxxx */
DECODE_EMULATEX (0x0f900090, 0x01100010, PROBES_DATA_PROCESSING_REG,
- REGS(ANY, 0, NOPC, 0, ANY)),
+ REGS(NOPC, 0, NOPC, 0, NOPC)),
/* MOV (reg-shift reg) cccc 0001 101x xxxx xxxx xxxx 0xx1 xxxx */
/* MVN (reg-shift reg) cccc 0001 111x xxxx xxxx xxxx 0xx1 xxxx */
DECODE_EMULATEX (0x0fa00090, 0x01a00010, PROBES_DATA_PROCESSING_REG,
- REGS(0, ANY, NOPC, 0, ANY)),
+ REGS(0, NOPC, NOPC, 0, NOPC)),
/* AND (reg-shift reg) cccc 0000 000x xxxx xxxx xxxx 0xx1 xxxx */
/* EOR (reg-shift reg) cccc 0000 001x xxxx xxxx xxxx 0xx1 xxxx */
@@ -359,7 +359,7 @@ static const union decode_item arm_cccc_000x_table[] = {
/* ORR (reg-shift reg) cccc 0001 100x xxxx xxxx xxxx 0xx1 xxxx */
/* BIC (reg-shift reg) cccc 0001 110x xxxx xxxx xxxx 0xx1 xxxx */
DECODE_EMULATEX (0x0e000090, 0x00000010, PROBES_DATA_PROCESSING_REG,
- REGS(ANY, ANY, NOPC, 0, ANY)),
+ REGS(NOPC, NOPC, NOPC, 0, NOPC)),
DECODE_END
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 18/94] ARM: kprobes: Fix test code compilation errors for ARMv4 targets
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (15 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 17/94] ARM: kprobes: Disallow instructions with PC and register specified shift Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 19/94] clk: qcom: HDMI source sel is 3 not 2 Sam Asadi
` (75 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Jon Medhurst, sam-the-6
From: Jon Medhurst <tixy@linaro.org>
Conditionally compile kprobes test cases for ARMv5 instructions to avoid
compilation errors with ARMv4 targets like:
/tmp/cc7Tx8ST.s:16740: Error: selected processor does not support ARM mode `clz r0,r0'
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/kernel/kprobes-test-arm.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c
index e73f9cf..cb14242 100644
--- a/arch/arm/kernel/kprobes-test-arm.c
+++ b/arch/arm/kernel/kprobes-test-arm.c
@@ -218,6 +218,7 @@ void kprobe_arm_test_cases(void)
TEST_BB_R("bx r",7,2f,"")
TEST_BF_R("bxeq r",14,2f,"")
+#if __LINUX_ARM_ARCH__ >= 5
TEST_R("clz r0, r",0, 0x0,"")
TEST_R("clzeq r7, r",14,0x1,"")
TEST_R("clz lr, r",7, 0xffffffff,"")
@@ -339,6 +340,7 @@ void kprobe_arm_test_cases(void)
TEST_UNSUPPORTED(__inst_arm(0xe16f02e1) " @ smultt pc, r1, r2")
TEST_UNSUPPORTED(__inst_arm(0xe16002ef) " @ smultt r0, pc, r2")
TEST_UNSUPPORTED(__inst_arm(0xe1600fe1) " @ smultt r0, r1, pc")
+#endif
TEST_GROUP("Multiply and multiply-accumulate")
@@ -561,6 +563,7 @@ void kprobe_arm_test_cases(void)
TEST_UNSUPPORTED("ldrsht r1, [r2], #48")
#endif
+#if __LINUX_ARM_ARCH__ >= 5
TEST_RPR( "strd r",0, VAL1,", [r",1, 48,", -r",2,24,"]")
TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]")
TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!")
@@ -597,6 +600,7 @@ void kprobe_arm_test_cases(void)
TEST_UNSUPPORTED(__inst_arm(0xe1efc3d0) " @ ldrd r12, [pc, #48]!")
TEST_UNSUPPORTED(__inst_arm(0xe0c9f3d0) " @ ldrd pc, [r9], #48")
TEST_UNSUPPORTED(__inst_arm(0xe0c9e3d0) " @ ldrd lr, [r9], #48")
+#endif
TEST_GROUP("Miscellaneous")
@@ -1229,7 +1233,9 @@ void kprobe_arm_test_cases(void)
TEST_COPROCESSOR( "mrc"two" 0, 0, r0, cr0, cr0, 0")
COPROCESSOR_INSTRUCTIONS_ST_LD("",e)
+#if __LINUX_ARM_ARCH__ >= 5
COPROCESSOR_INSTRUCTIONS_MC_MR("",e)
+#endif
TEST_UNSUPPORTED("svc 0")
TEST_UNSUPPORTED("svc 0xffffff")
@@ -1289,7 +1295,9 @@ void kprobe_arm_test_cases(void)
TEST( "blx __dummy_thumb_subroutine_odd")
#endif /* __LINUX_ARM_ARCH__ >= 6 */
+#if __LINUX_ARM_ARCH__ >= 5
COPROCESSOR_INSTRUCTIONS_ST_LD("2",f)
+#endif
#if __LINUX_ARM_ARCH__ >= 6
COPROCESSOR_INSTRUCTIONS_MC_MR("2",f)
#endif
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 19/94] clk: qcom: HDMI source sel is 3 not 2
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (16 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 18/94] ARM: kprobes: Fix test code compilation errors for ARMv4 targets Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 20/94] ARM: dts: dra7xx-clocks: Fix the l3 and l4 clock rates Sam Asadi
` (74 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Stephen Boyd, Mike Turquette, sam-the-6
From: Stephen Boyd <sboyd@codeaurora.org>
The HDMI PLL input to the tv mux is supposed to be 3, not 2. Fix
the code so that we can properly select the HDMI PLL.
Fixes: 6d00b56fe "clk: qcom: Add support for MSM8960's multimedia clock controller (MMCC)"
Reported-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/qcom/mmcc-msm8960.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/mmcc-msm8960.c b/drivers/clk/qcom/mmcc-msm8960.c
index 12f3c0b..4c449b3 100644
--- a/drivers/clk/qcom/mmcc-msm8960.c
+++ b/drivers/clk/qcom/mmcc-msm8960.c
@@ -1209,7 +1209,7 @@ static struct clk_branch rot_clk = {
static u8 mmcc_pxo_hdmi_map[] = {
[P_PXO] = 0,
- [P_HDMI_PLL] = 2,
+ [P_HDMI_PLL] = 3,
};
static const char *mmcc_pxo_hdmi[] = {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 20/94] ARM: dts: dra7xx-clocks: Fix the l3 and l4 clock rates
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (17 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 19/94] clk: qcom: HDMI source sel is 3 not 2 Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 21/94] ARM: EXYNOS: Fix the check for non-smp configuration Sam Asadi
` (73 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Rajendra Nayak, Tero Kristo, sam-the-6
From: Rajendra Nayak <rnayak@ti.com>
Without the patch:
/debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck # cat clk_rate
532000000
/debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck/l3_iclk_div # cat clk_rate
532000000
/debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck/l3_iclk_div/l4_root_clk_div # cat clk_rate
532000000
With the patch:
/debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck # cat clk_rate
532000000
/debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck/l3_iclk_div # cat clk_rate
266000000
/debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck/l3_iclk_div/l4_root_clk_div # cat clk_rate
133000000
The l3 clock derived from core DPLL is actually a divider clock,
with the default divider set to 2. l4 then derived from l3 is a fixed factor
clock, but the fixed divider is 2 and not 1. Which means the l3 clock is
half of core DPLLs h12x2 and l4 is half of l3 (as seen with this patch)
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/boot/dts/dra7xx-clocks.dtsi | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi
index c90c76d..dc7a292 100644
--- a/arch/arm/boot/dts/dra7xx-clocks.dtsi
+++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi
@@ -673,10 +673,12 @@
l3_iclk_div: l3_iclk_div {
#clock-cells = <0>;
- compatible = "fixed-factor-clock";
+ compatible = "ti,divider-clock";
+ ti,max-div = <2>;
+ ti,bit-shift = <4>;
+ reg = <0x0100>;
clocks = <&dpll_core_h12x2_ck>;
- clock-mult = <1>;
- clock-div = <1>;
+ ti,index-power-of-two;
};
l4_root_clk_div: l4_root_clk_div {
@@ -684,7 +686,7 @@
compatible = "fixed-factor-clock";
clocks = <&l3_iclk_div>;
clock-mult = <1>;
- clock-div = <1>;
+ clock-div = <2>;
};
video1_clk2_div: video1_clk2_div {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 21/94] ARM: EXYNOS: Fix the check for non-smp configuration
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (18 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 20/94] ARM: dts: dra7xx-clocks: Fix the l3 and l4 clock rates Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 22/94] ARM: dts: fix pwm-cells in pwm node for exynos4 Sam Asadi
` (72 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Abhilash Kesavan, Kukjin Kim, sam-the-6
From: Abhilash Kesavan <a.kesavan@samsung.com>
Commit 1754c42e3db5("ARM: exynos: move sysram info to exynos.c") missed
out the CONFIG_ prefix causing exynos_sysram_init() to get called twice
for SMP configurations.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Sachin Kamat <sachin.kamat@samsug.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-exynos/exynos.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index f38cf7c..95cad25 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -297,7 +297,7 @@ static void __init exynos_dt_machine_init(void)
* This is called from smp_prepare_cpus if we've built for SMP, but
* we still need to set it up for PM and firmware ops if not.
*/
- if (!IS_ENABLED(SMP))
+ if (!IS_ENABLED(CONFIG_SMP))
exynos_sysram_init();
exynos_cpuidle_init();
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 22/94] ARM: dts: fix pwm-cells in pwm node for exynos4
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (19 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 21/94] ARM: EXYNOS: Fix the check for non-smp configuration Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 23/94] clocksource: exynos_mct: Fix ftrace Sam Asadi
` (71 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Jaewon Kim, Kukjin Kim, sam-the-6
From: Jaewon Kim <jaewon02.kim@samsung.com>
pwm-cells should be 3. Third cell is optional PWM flags. And This flag
supported by this binding is PWM_POLARITY_INVERTED.
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Reviewed-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/boot/dts/exynos4.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index fbaf426..17b22e9 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -554,7 +554,7 @@
interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>, <0 41 0>;
clocks = <&clock CLK_PWM>;
clock-names = "timers";
- #pwm-cells = <2>;
+ #pwm-cells = <3>;
status = "disabled";
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 23/94] clocksource: exynos_mct: Fix ftrace
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (20 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 22/94] ARM: dts: fix pwm-cells in pwm node for exynos4 Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 24/94] clocksource: exynos_mct: Register the timer for stable udelay Sam Asadi
` (70 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Doug Anderson, Kukjin Kim, sam-the-6
From: Doug Anderson <dianders@chromium.org>
In (93bfb76 clocksource: exynos_mct: register sched_clock callback) we
supported using the MCT as a scheduler clock. We properly marked
exynos4_read_sched_clock() as notrace. However, we then went and
called another function that _wasn't_ notrace. That means if you do:
cd /sys/kernel/debug/tracing/
echo function_graph > current_tracer
You'll get a crash.
Fix this (but still let other readers of the MCT be trace-enabled) by
adding an extra function. It's important to keep other users of MCT
traceable because the MCT is actually quite slow to access and we want
exynos4_frc_read() to show up in ftrace profiles if it's the
bottleneck.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clocksource/exynos_mct.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index f71d55f..5ce99c0 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -162,7 +162,7 @@ static void exynos4_mct_frc_start(void)
exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON);
}
-static cycle_t exynos4_frc_read(struct clocksource *cs)
+static cycle_t notrace _exynos4_frc_read(void)
{
unsigned int lo, hi;
u32 hi2 = __raw_readl(reg_base + EXYNOS4_MCT_G_CNT_U);
@@ -176,6 +176,11 @@ static cycle_t exynos4_frc_read(struct clocksource *cs)
return ((cycle_t)hi << 32) | lo;
}
+static cycle_t exynos4_frc_read(struct clocksource *cs)
+{
+ return _exynos4_frc_read();
+}
+
static void exynos4_frc_resume(struct clocksource *cs)
{
exynos4_mct_frc_start();
@@ -192,7 +197,7 @@ struct clocksource mct_frc = {
static u64 notrace exynos4_read_sched_clock(void)
{
- return exynos4_frc_read(&mct_frc);
+ return _exynos4_frc_read();
}
static void __init exynos4_clocksource_init(void)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 24/94] clocksource: exynos_mct: Register the timer for stable udelay
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (21 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 23/94] clocksource: exynos_mct: Fix ftrace Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 25/94] iio: hid-sensor-press: Fix return values Sam Asadi
` (69 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Amit Daniel Kachhap, Doug Anderson,
Kukjin Kim, sam-the-6
From: Amit Daniel Kachhap <amit.daniel@samsung.com>
This patch registers the exynos mct clocksource as the current timer
as it has constant clock rate. This will generate correct udelay for
the exynos platform and avoid using unnecessary calibrated
jiffies. This change has been tested on exynos5420 based board and
udelay is very close to expected.
Without this patch udelay() on exynos5400 / exynos5800 is wildly
inaccurate due to big.LITTLE not adjusting loops_per_jiffy correctly.
Also without this patch udelay() on exynos5250 can be innacruate
during transitions between frequencies < 800 MHz (you'll go 200 MHz ->
800 MHz -> 300 MHz and will run at 800 MHz for a time with the wrong
loops_per_jiffy).
[dianders: reworked and created version 3]
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clocksource/exynos_mct.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 5ce99c0..ab51bf20a 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -200,10 +200,21 @@ static u64 notrace exynos4_read_sched_clock(void)
return _exynos4_frc_read();
}
+static struct delay_timer exynos4_delay_timer;
+
+static cycles_t exynos4_read_current_timer(void)
+{
+ return _exynos4_frc_read();
+}
+
static void __init exynos4_clocksource_init(void)
{
exynos4_mct_frc_start();
+ exynos4_delay_timer.read_current_timer = &exynos4_read_current_timer;
+ exynos4_delay_timer.freq = clk_rate;
+ register_current_timer_delay(&exynos4_delay_timer);
+
if (clocksource_register_hz(&mct_frc, clk_rate))
panic("%s: can't register clocksource\n", mct_frc.name);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 25/94] iio: hid-sensor-press: Fix return values
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (22 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 24/94] clocksource: exynos_mct: Register the timer for stable udelay Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 26/94] iio: hid-sensor-accel-3d: " Sam Asadi
` (68 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Sachin Kamat, Srinivas Pandruvada,
Jonathan Cameron, sam-the-6
From: Sachin Kamat <sachin.kamat@samsung.com>
IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored
the actual return values (which could be -EINVAL) and instead
returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value
obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO
upon success.
Agreed with by Srinivas.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/iio/pressure/hid-sensor-press.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/pressure/hid-sensor-press.c b/drivers/iio/pressure/hid-sensor-press.c
index 1cd190c..2c0d2a4 100644
--- a/drivers/iio/pressure/hid-sensor-press.c
+++ b/drivers/iio/pressure/hid-sensor-press.c
@@ -78,7 +78,6 @@ static int press_read_raw(struct iio_dev *indio_dev,
struct press_state *press_state = iio_priv(indio_dev);
int report_id = -1;
u32 address;
- int ret;
int ret_type;
s32 poll_value;
@@ -128,14 +127,12 @@ static int press_read_raw(struct iio_dev *indio_dev,
ret_type = IIO_VAL_INT;
break;
case IIO_CHAN_INFO_SAMP_FREQ:
- ret = hid_sensor_read_samp_freq_value(
+ ret_type = hid_sensor_read_samp_freq_value(
&press_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
case IIO_CHAN_INFO_HYSTERESIS:
- ret = hid_sensor_read_raw_hyst_value(
+ ret_type = hid_sensor_read_raw_hyst_value(
&press_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
default:
ret_type = -EINVAL;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 26/94] iio: hid-sensor-accel-3d: Fix return values
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (23 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 25/94] iio: hid-sensor-press: Fix return values Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 27/94] iio: hid-sensor-magn-3d: " Sam Asadi
` (67 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Sachin Kamat, Srinivas Pandruvada,
Jonathan Cameron, sam-the-6
From: Sachin Kamat <sachin.kamat@samsung.com>
IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored
the actual return values (which could be -EINVAL) and instead
returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value
obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO
upon success.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/iio/accel/hid-sensor-accel-3d.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index 69abf91..54e464e 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -110,7 +110,6 @@ static int accel_3d_read_raw(struct iio_dev *indio_dev,
struct accel_3d_state *accel_state = iio_priv(indio_dev);
int report_id = -1;
u32 address;
- int ret;
int ret_type;
s32 poll_value;
@@ -151,14 +150,12 @@ static int accel_3d_read_raw(struct iio_dev *indio_dev,
ret_type = IIO_VAL_INT;
break;
case IIO_CHAN_INFO_SAMP_FREQ:
- ret = hid_sensor_read_samp_freq_value(
+ ret_type = hid_sensor_read_samp_freq_value(
&accel_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
case IIO_CHAN_INFO_HYSTERESIS:
- ret = hid_sensor_read_raw_hyst_value(
+ ret_type = hid_sensor_read_raw_hyst_value(
&accel_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
default:
ret_type = -EINVAL;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 27/94] iio: hid-sensor-magn-3d: Fix return values
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (24 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 26/94] iio: hid-sensor-accel-3d: " Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 28/94] iio: hid-sensor-als: " Sam Asadi
` (66 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Sachin Kamat, Srinivas Pandruvada,
Jonathan Cameron, sam-the-6
From: Sachin Kamat <sachin.kamat@samsung.com>
IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored
the actual return values (which could be -EINVAL) and instead
returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value
obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO
upon success.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/iio/magnetometer/hid-sensor-magn-3d.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
index 41cf29e..b2b0937 100644
--- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
+++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
@@ -110,7 +110,6 @@ static int magn_3d_read_raw(struct iio_dev *indio_dev,
struct magn_3d_state *magn_state = iio_priv(indio_dev);
int report_id = -1;
u32 address;
- int ret;
int ret_type;
s32 poll_value;
@@ -153,14 +152,12 @@ static int magn_3d_read_raw(struct iio_dev *indio_dev,
ret_type = IIO_VAL_INT;
break;
case IIO_CHAN_INFO_SAMP_FREQ:
- ret = hid_sensor_read_samp_freq_value(
+ ret_type = hid_sensor_read_samp_freq_value(
&magn_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
case IIO_CHAN_INFO_HYSTERESIS:
- ret = hid_sensor_read_raw_hyst_value(
+ ret_type = hid_sensor_read_raw_hyst_value(
&magn_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
default:
ret_type = -EINVAL;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 28/94] iio: hid-sensor-als: Fix return values
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (25 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 27/94] iio: hid-sensor-magn-3d: " Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 29/94] iio: hid-sensor-gyro-3d: " Sam Asadi
` (65 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Sachin Kamat, Srinivas Pandruvada,
Jonathan Cameron, sam-the-6
From: Sachin Kamat <sachin.kamat@samsung.com>
IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored
the actual return values (which could be -EINVAL) and instead
returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value
obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO
upon success.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/iio/light/hid-sensor-als.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
index f34c943..96e71e1 100644
--- a/drivers/iio/light/hid-sensor-als.c
+++ b/drivers/iio/light/hid-sensor-als.c
@@ -79,7 +79,6 @@ static int als_read_raw(struct iio_dev *indio_dev,
struct als_state *als_state = iio_priv(indio_dev);
int report_id = -1;
u32 address;
- int ret;
int ret_type;
s32 poll_value;
@@ -129,14 +128,12 @@ static int als_read_raw(struct iio_dev *indio_dev,
ret_type = IIO_VAL_INT;
break;
case IIO_CHAN_INFO_SAMP_FREQ:
- ret = hid_sensor_read_samp_freq_value(
+ ret_type = hid_sensor_read_samp_freq_value(
&als_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
case IIO_CHAN_INFO_HYSTERESIS:
- ret = hid_sensor_read_raw_hyst_value(
+ ret_type = hid_sensor_read_raw_hyst_value(
&als_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
default:
ret_type = -EINVAL;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 29/94] iio: hid-sensor-gyro-3d: Fix return values
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (26 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 28/94] iio: hid-sensor-als: " Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 30/94] iio: hid-sensor-prox: " Sam Asadi
` (64 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Sachin Kamat, Srinivas Pandruvada,
Jonathan Cameron, sam-the-6
From: Sachin Kamat <sachin.kamat@samsung.com>
IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored
the actual return values (which could be -EINVAL) and instead
returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value
obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO
upon success.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/iio/gyro/hid-sensor-gyro-3d.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
index 40f4e49..fa034a3 100644
--- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
+++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
@@ -110,7 +110,6 @@ static int gyro_3d_read_raw(struct iio_dev *indio_dev,
struct gyro_3d_state *gyro_state = iio_priv(indio_dev);
int report_id = -1;
u32 address;
- int ret;
int ret_type;
s32 poll_value;
@@ -151,14 +150,12 @@ static int gyro_3d_read_raw(struct iio_dev *indio_dev,
ret_type = IIO_VAL_INT;
break;
case IIO_CHAN_INFO_SAMP_FREQ:
- ret = hid_sensor_read_samp_freq_value(
+ ret_type = hid_sensor_read_samp_freq_value(
&gyro_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
case IIO_CHAN_INFO_HYSTERESIS:
- ret = hid_sensor_read_raw_hyst_value(
+ ret_type = hid_sensor_read_raw_hyst_value(
&gyro_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
default:
ret_type = -EINVAL;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 30/94] iio: hid-sensor-prox: Fix return values
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (27 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 29/94] iio: hid-sensor-gyro-3d: " Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 31/94] ext4: fix unjournalled bg descriptor while initializing inode bitmap Sam Asadi
` (63 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Sachin Kamat, Srinivas Pandruvada,
Jonathan Cameron, sam-the-6
From: Sachin Kamat <sachin.kamat@samsung.com>
IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored
the actual return values (which could be -EINVAL) and instead
returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value
obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO
upon success.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/iio/light/hid-sensor-prox.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
index d203ef4..412bae8 100644
--- a/drivers/iio/light/hid-sensor-prox.c
+++ b/drivers/iio/light/hid-sensor-prox.c
@@ -74,7 +74,6 @@ static int prox_read_raw(struct iio_dev *indio_dev,
struct prox_state *prox_state = iio_priv(indio_dev);
int report_id = -1;
u32 address;
- int ret;
int ret_type;
s32 poll_value;
@@ -125,14 +124,12 @@ static int prox_read_raw(struct iio_dev *indio_dev,
ret_type = IIO_VAL_INT;
break;
case IIO_CHAN_INFO_SAMP_FREQ:
- ret = hid_sensor_read_samp_freq_value(
+ ret_type = hid_sensor_read_samp_freq_value(
&prox_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
case IIO_CHAN_INFO_HYSTERESIS:
- ret = hid_sensor_read_raw_hyst_value(
+ ret_type = hid_sensor_read_raw_hyst_value(
&prox_state->common_attributes, val, val2);
- ret_type = IIO_VAL_INT_PLUS_MICRO;
break;
default:
ret_type = -EINVAL;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 31/94] ext4: fix unjournalled bg descriptor while initializing inode bitmap
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (28 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 30/94] iio: hid-sensor-prox: " Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 32/94] ext4: clarify error count warning messages Sam Asadi
` (62 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Theodore Ts'o, stable, sam-the-6
From: Theodore Ts'o <tytso@mit.edu>
The first time that we allocate from an uninitialized inode allocation
bitmap, if the block allocation bitmap is also uninitalized, we need
to get write access to the block group descriptor before we start
modifying the block group descriptor flags and updating the free block
count, etc. Otherwise, there is the potential of a bad journal
checksum (if journal checksums are enabled), and of the file system
becoming inconsistent if we crash at exactly the wrong time.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
fs/ext4/ialloc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index a87455d..0840bf3 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -874,6 +874,13 @@ got:
goto out;
}
+ BUFFER_TRACE(group_desc_bh, "get_write_access");
+ err = ext4_journal_get_write_access(handle, group_desc_bh);
+ if (err) {
+ ext4_std_error(sb, err);
+ goto out;
+ }
+
/* We may have to initialize the block bitmap if it isn't already */
if (ext4_has_group_desc_csum(sb) &&
gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
@@ -910,13 +917,6 @@ got:
}
}
- BUFFER_TRACE(group_desc_bh, "get_write_access");
- err = ext4_journal_get_write_access(handle, group_desc_bh);
- if (err) {
- ext4_std_error(sb, err);
- goto out;
- }
-
/* Update the relevant bg descriptor fields */
if (ext4_has_group_desc_csum(sb)) {
int free;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 32/94] ext4: clarify error count warning messages
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (29 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 31/94] ext4: fix unjournalled bg descriptor while initializing inode bitmap Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 33/94] ext4: clarify ext4_error message in ext4_mb_generate_buddy_error() Sam Asadi
` (61 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Theodore Ts'o, Pavel Machek, stable,
sam-the-6
From: Theodore Ts'o <tytso@mit.edu>
Make it clear that values printed are times, and that it is error
since last fsck. Also add note about fsck version required.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Cc: stable@vger.kernel.org
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
fs/ext4/super.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b9b9aab..3423947 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2809,10 +2809,11 @@ static void print_daily_error_info(unsigned long arg)
es = sbi->s_es;
if (es->s_error_count)
- ext4_msg(sb, KERN_NOTICE, "error count: %u",
+ /* fsck newer than v1.41.13 is needed to clean this condition. */
+ ext4_msg(sb, KERN_NOTICE, "error count since last fsck: %u",
le32_to_cpu(es->s_error_count));
if (es->s_first_error_time) {
- printk(KERN_NOTICE "EXT4-fs (%s): initial error at %u: %.*s:%d",
+ printk(KERN_NOTICE "EXT4-fs (%s): initial error at time %u: %.*s:%d",
sb->s_id, le32_to_cpu(es->s_first_error_time),
(int) sizeof(es->s_first_error_func),
es->s_first_error_func,
@@ -2826,7 +2827,7 @@ static void print_daily_error_info(unsigned long arg)
printk("\n");
}
if (es->s_last_error_time) {
- printk(KERN_NOTICE "EXT4-fs (%s): last error at %u: %.*s:%d",
+ printk(KERN_NOTICE "EXT4-fs (%s): last error at time %u: %.*s:%d",
sb->s_id, le32_to_cpu(es->s_last_error_time),
(int) sizeof(es->s_last_error_func),
es->s_last_error_func,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 33/94] ext4: clarify ext4_error message in ext4_mb_generate_buddy_error()
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (30 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 32/94] ext4: clarify error count warning messages Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 34/94] ext4: disable synchronous transaction batching if max_batch_time==0 Sam Asadi
` (60 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Theodore Ts'o, stable, sam-the-6
From: Theodore Ts'o <tytso@mit.edu>
We are spending a lot of time explaining to users what this error
means. Let's try to improve the message to avoid this problem.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
fs/ext4/mballoc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 7f72f50..2dcb936 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -752,8 +752,8 @@ void ext4_mb_generate_buddy(struct super_block *sb,
if (free != grp->bb_free) {
ext4_grp_locked_error(sb, group, 0, 0,
- "%u clusters in bitmap, %u in gd; "
- "block bitmap corrupt.",
+ "block bitmap and bg descriptor "
+ "inconsistent: %u vs %u free clusters",
free, grp->bb_free);
/*
* If we intend to continue, we consider group descriptor
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 34/94] ext4: disable synchronous transaction batching if max_batch_time==0
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (31 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 33/94] ext4: clarify ext4_error message in ext4_mb_generate_buddy_error() Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 35/94] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver Sam Asadi
` (59 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Eric Sandeen, Theodore Ts'o, stable,
sam-the-6
From: Eric Sandeen <sandeen@redhat.com>
The mount manpage says of the max_batch_time option,
This optimization can be turned off entirely
by setting max_batch_time to 0.
But the code doesn't do that. So fix the code to do
that.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
fs/ext4/super.c | 2 --
fs/jbd2/transaction.c | 5 ++++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3423947..6297c07 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1525,8 +1525,6 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
arg = JBD2_DEFAULT_MAX_COMMIT_AGE;
sbi->s_commit_interval = HZ * arg;
} else if (token == Opt_max_batch_time) {
- if (arg == 0)
- arg = EXT4_DEF_MAX_BATCH_TIME;
sbi->s_max_batch_time = arg;
} else if (token == Opt_min_batch_time) {
sbi->s_min_batch_time = arg;
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 38cfcf5..6f0f590 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1588,9 +1588,12 @@ int jbd2_journal_stop(handle_t *handle)
* to perform a synchronous write. We do this to detect the
* case where a single process is doing a stream of sync
* writes. No point in waiting for joiners in that case.
+ *
+ * Setting max_batch_time to 0 disables this completely.
*/
pid = current->pid;
- if (handle->h_sync && journal->j_last_sync_writer != pid) {
+ if (handle->h_sync && journal->j_last_sync_writer != pid &&
+ journal->j_max_batch_time) {
u64 commit_time, trans_time;
journal->j_last_sync_writer = pid;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 35/94] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (32 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 34/94] ext4: disable synchronous transaction batching if max_batch_time==0 Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 36/94] ARM: DRA7: hwmod: Fixup SATA hwmod Sam Asadi
` (58 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Suman Anna, Rajendra Nayak, Paul Walmsley,
sam-the-6
From: Suman Anna <s-anna@ti.com>
The commit 7be914f {ARM: OMAP3: PRM/CM: Cleanup unused header} removed
some of the macros used by the TI DSP/Bridge driver. This fixes the
following build errors when trying to build DSP/Bridge driver (disabled
at present), otherwise results in the following build errors:
drivers/staging/tidspbridge/core/tiomap3430.c:531:31: error: 'OMAP3430_AUTO_IVA2_DPLL_SHIFT' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430.c:531:31: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [drivers/staging/tidspbridge/core/tiomap3430.o] Error 1
make[3]: *** Waiting for unfinished jobs....
drivers/staging/tidspbridge/core/tiomap_io.c: In function 'sm_interrupt_dsp':
drivers/staging/tidspbridge/core/tiomap_io.c:404:31: error: 'OMAP3430_AUTO_IVA2_DPLL_SHIFT' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap_io.c:404:31: note: each undeclared identifier is reported only once for each function it appears in
drivers/staging/tidspbridge/core/tiomap_io.c:414:12: error: 'OMAP3430_IVA2_DPLL_FREQSEL_SHIFT' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap_io.c:415:12: error: 'OMAP3430_EN_IVA2_DPLL_SHIFT' undeclared (first use in this function)
make[3]: *** [drivers/staging/tidspbridge/core/tiomap_io.o] Error 1
drivers/staging/tidspbridge/core/tiomap3430_pwr.c: In function 'dsp_clk_wakeup_event_ctrl':
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:442:19: error: 'OMAP3430_GRPSEL_GPT5_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:442:19: note: each undeclared identifier is reported only once for each function it appears in
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:455:19: error: 'OMAP3430_GRPSEL_GPT6_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:468:19: error: 'OMAP3430_GRPSEL_GPT7_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:481:19: error: 'OMAP3430_GRPSEL_GPT8_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:494:19: error: 'OMAP3430_GRPSEL_MCBSP1_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:546:19: error: 'OMAP3430_GRPSEL_MCBSP5_MASK' undeclared (first use in this function)
make[3]: *** [drivers/staging/tidspbridge/core/tiomap3430_pwr.o] Error 1
make[2]: *** [drivers/staging/tidspbridge] Error 2
Fixes: 7be914f (ARM: OMAP3: PRM/CM: Cleanup unused header)
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-omap2/cm-regbits-34xx.h | 3 +++
arch/arm/mach-omap2/prm-regbits-34xx.h | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
index 04dab2f..ee6c784 100644
--- a/arch/arm/mach-omap2/cm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -26,11 +26,14 @@
#define OMAP3430_EN_WDT3_SHIFT 12
#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK (1 << 0)
#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT 0
+#define OMAP3430_IVA2_DPLL_FREQSEL_SHIFT 4
#define OMAP3430_IVA2_DPLL_FREQSEL_MASK (0xf << 4)
#define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT 3
+#define OMAP3430_EN_IVA2_DPLL_SHIFT 0
#define OMAP3430_EN_IVA2_DPLL_MASK (0x7 << 0)
#define OMAP3430_ST_IVA2_SHIFT 0
#define OMAP3430_ST_IVA2_CLK_MASK (1 << 0)
+#define OMAP3430_AUTO_IVA2_DPLL_SHIFT 0
#define OMAP3430_AUTO_IVA2_DPLL_MASK (0x7 << 0)
#define OMAP3430_IVA2_CLK_SRC_SHIFT 19
#define OMAP3430_IVA2_CLK_SRC_WIDTH 3
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
index 106132d..cbefbd7 100644
--- a/arch/arm/mach-omap2/prm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
@@ -35,6 +35,8 @@
#define OMAP3430_LOGICSTATEST_MASK (1 << 2)
#define OMAP3430_LASTLOGICSTATEENTERED_MASK (1 << 2)
#define OMAP3430_LASTPOWERSTATEENTERED_MASK (0x3 << 0)
+#define OMAP3430_GRPSEL_MCBSP5_MASK (1 << 10)
+#define OMAP3430_GRPSEL_MCBSP1_MASK (1 << 9)
#define OMAP3630_GRPSEL_UART4_MASK (1 << 18)
#define OMAP3430_GRPSEL_GPIO6_MASK (1 << 17)
#define OMAP3430_GRPSEL_GPIO5_MASK (1 << 16)
@@ -42,6 +44,10 @@
#define OMAP3430_GRPSEL_GPIO3_MASK (1 << 14)
#define OMAP3430_GRPSEL_GPIO2_MASK (1 << 13)
#define OMAP3430_GRPSEL_UART3_MASK (1 << 11)
+#define OMAP3430_GRPSEL_GPT8_MASK (1 << 9)
+#define OMAP3430_GRPSEL_GPT7_MASK (1 << 8)
+#define OMAP3430_GRPSEL_GPT6_MASK (1 << 7)
+#define OMAP3430_GRPSEL_GPT5_MASK (1 << 6)
#define OMAP3430_GRPSEL_MCBSP4_MASK (1 << 2)
#define OMAP3430_GRPSEL_MCBSP3_MASK (1 << 1)
#define OMAP3430_GRPSEL_MCBSP2_MASK (1 << 0)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 36/94] ARM: DRA7: hwmod: Fixup SATA hwmod
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (33 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 35/94] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 37/94] ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss Sam Asadi
` (57 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Roger Quadros, Paul Walmsley, sam-the-6
From: Roger Quadros <rogerq@ti.com>
Get rid of optional clock as that is now managed by the
AHCI platform driver.
Correct .mpu_rt_idx to 1 as the module register space (SYSCONFIG..)
is passed as the second memory resource in the device tree.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 20b4398..1209266 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1268,9 +1268,6 @@ static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
};
/* sata */
-static struct omap_hwmod_opt_clk sata_opt_clks[] = {
- { .role = "ref_clk", .clk = "sata_ref_clk" },
-};
static struct omap_hwmod dra7xx_sata_hwmod = {
.name = "sata",
@@ -1278,6 +1275,7 @@ static struct omap_hwmod dra7xx_sata_hwmod = {
.clkdm_name = "l3init_clkdm",
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
.main_clk = "func_48m_fclk",
+ .mpu_rt_idx = 1,
.prcm = {
.omap4 = {
.clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
@@ -1285,8 +1283,6 @@ static struct omap_hwmod dra7xx_sata_hwmod = {
.modulemode = MODULEMODE_SWCTRL,
},
},
- .opt_clks = sata_opt_clks,
- .opt_clks_cnt = ARRAY_SIZE(sata_opt_clks),
};
/*
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 37/94] ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (34 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 36/94] ARM: DRA7: hwmod: Fixup SATA hwmod Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 38/94] ARM: OMAP2+: clock/dpll: fix _dpll_test_fint arithmetics overflow Sam Asadi
` (56 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Roger Quadros, Paul Walmsley, sam-the-6
From: Roger Quadros <rogerq@ti.com>
Add the sysconfig class bits for the Super Speed USB
controllers
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 1209266..284324f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1727,8 +1727,20 @@ static struct omap_hwmod dra7xx_uart6_hwmod = {
*
*/
+static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
+ .rev_offs = 0x0000,
+ .sysc_offs = 0x0010,
+ .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
+ SYSC_HAS_SIDLEMODE),
+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+ SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
+ MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
+ .sysc_fields = &omap_hwmod_sysc_type2,
+};
+
static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
.name = "usb_otg_ss",
+ .sysc = &dra7xx_usb_otg_ss_sysc,
};
/* usb_otg_ss1 */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 38/94] ARM: OMAP2+: clock/dpll: fix _dpll_test_fint arithmetics overflow
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (35 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 37/94] ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 39/94] iio:tcs3472: Check for buffer enabled and locking Sam Asadi
` (55 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Tero Kristo, Paul Walmsley, sam-the-6
From: Tero Kristo <t-kristo@ti.com>
The divider value provided to the _dpll_test_fint can reach value of
256 with J type DPLLs (USB etc.), which causes an overflow with the u8
datatype. Fix this by changing the parameter to be an int instead.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
[paul@pwsan.com: changed type of 'n' to unsigned int]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-omap2/clkt_dpll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c
index 332af92..67fd26a 100644
--- a/arch/arm/mach-omap2/clkt_dpll.c
+++ b/arch/arm/mach-omap2/clkt_dpll.c
@@ -76,7 +76,7 @@
* (assuming that it is counting N upwards), or -2 if the enclosing loop
* should skip to the next iteration (again assuming N is increasing).
*/
-static int _dpll_test_fint(struct clk_hw_omap *clk, u8 n)
+static int _dpll_test_fint(struct clk_hw_omap *clk, unsigned int n)
{
struct dpll_data *dd;
long fint, fint_min, fint_max;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 39/94] iio:tcs3472: Check for buffer enabled and locking
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (36 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 38/94] ARM: OMAP2+: clock/dpll: fix _dpll_test_fint arithmetics overflow Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 40/94] USB: cp210x: add support for Corsair usb dongle Sam Asadi
` (54 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Peter Meerwald, Peter Meerwald,
Jonathan Cameron, sam-the-6
From: Peter Meerwald <p.meerwald@bct-electronic.com>
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/iio/light/tcs3472.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/light/tcs3472.c b/drivers/iio/light/tcs3472.c
index fe063a0..7525699 100644
--- a/drivers/iio/light/tcs3472.c
+++ b/drivers/iio/light/tcs3472.c
@@ -52,6 +52,7 @@
struct tcs3472_data {
struct i2c_client *client;
+ struct mutex lock;
u8 enable;
u8 control;
u8 atime;
@@ -116,10 +117,17 @@ static int tcs3472_read_raw(struct iio_dev *indio_dev,
switch (mask) {
case IIO_CHAN_INFO_RAW:
+ if (iio_buffer_enabled(indio_dev))
+ return -EBUSY;
+
+ mutex_lock(&data->lock);
ret = tcs3472_req_data(data);
- if (ret < 0)
+ if (ret < 0) {
+ mutex_unlock(&data->lock);
return ret;
+ }
ret = i2c_smbus_read_word_data(data->client, chan->address);
+ mutex_unlock(&data->lock);
if (ret < 0)
return ret;
*val = ret;
@@ -255,6 +263,7 @@ static int tcs3472_probe(struct i2c_client *client,
data = iio_priv(indio_dev);
i2c_set_clientdata(client, indio_dev);
data->client = client;
+ mutex_init(&data->lock);
indio_dev->dev.parent = &client->dev;
indio_dev->info = &tcs3472_info;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 40/94] USB: cp210x: add support for Corsair usb dongle
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (37 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 39/94] iio:tcs3472: Check for buffer enabled and locking Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 41/94] usb: option: Add ID for Telewell TW-LTE 4G v2 Sam Asadi
` (53 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Andras Kovacs, stable, Johan Hovold,
sam-the-6
From: Andras Kovacs <andras@sth.sze.hu>
Corsair USB Dongles are shipped with Corsair AXi series PSUs.
These are cp210x serial usb devices, so make driver detect these.
I have a program, that can get information from these PSUs.
Tested with 2 different dongles shipped with Corsair AX860i and
AX1200i units.
Signed-off-by: Andras Kovacs <andras@sth.sze.hu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/usb/serial/cp210x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 762e4a5..330df5c 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -153,6 +153,7 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
+ { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
{ USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
{ USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */
{ USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 41/94] usb: option: Add ID for Telewell TW-LTE 4G v2
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (38 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 40/94] USB: cp210x: add support for Corsair usb dongle Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 42/94] ARM: DRA7/AM43XX: fix header definition for omap44xx_restart Sam Asadi
` (52 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Bernd Wachter, stable, Johan Hovold,
sam-the-6
From: Bernd Wachter <bernd.wachter@jolla.com>
Add ID of the Telewell 4G v2 hardware to option driver to get legacy
serial interface working
Signed-off-by: Bernd Wachter <bernd.wachter@jolla.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/usb/serial/option.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index ac73f49..a968894 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1487,6 +1487,8 @@ static const struct usb_device_id option_ids[] = {
.driver_info = (kernel_ulong_t)&net_intf2_blacklist },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff), /* ZTE MF91 */
.driver_info = (kernel_ulong_t)&net_intf2_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff), /* Telewell TW-LTE 4G v2 */
+ .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 42/94] ARM: DRA7/AM43XX: fix header definition for omap44xx_restart
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (39 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 41/94] usb: option: Add ID for Telewell TW-LTE 4G v2 Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 43/94] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Sam Asadi
` (51 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Nishanth Menon, Tony Lindgren, sam-the-6
From: Nishanth Menon <nm@ti.com>
omap44xx_restart is defined as a static void inline when DRA7/AM437X is
defined alone, which implies that the restart function is no longer
functional even though it is built in. So, fix the definition of the
same.
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-omap2/common.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index b2d252b..dc571f1 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -162,7 +162,8 @@ static inline void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
}
#endif
-#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
+#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
+ defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM43XX)
void omap44xx_restart(enum reboot_mode mode, const char *cmd);
#else
static inline void omap44xx_restart(enum reboot_mode mode, const char *cmd)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 43/94] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (40 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 42/94] ARM: DRA7/AM43XX: fix header definition for omap44xx_restart Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:00 ` [PATCH 44/94] ARM: OMAP2+: create dsp device only on OMAP3 SoCs Sam Asadi
` (50 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Roger Quadros, Rajendra Nayak, Tero Kristo,
Tony Lindgren, sam-the-6
From: Roger Quadros <rogerq@ti.com>
After clarification from the hardware team it was found that
this 1.8V PHY supply can't be switched OFF when SoC is Active.
Since the PHY IPs don't contain isolation logic built in the design to
allow the power rail to be switched off, there is a very high risk
of IP reliability and additional leakage paths which can result in
additional power consumption.
The only scenario where this rail can be switched off is part of Power on
reset sequencing, but it needs to be kept always-on during operation.
This patch is required for proper functionality of USB, SATA
and PCIe on DRA7-evm.
CC: Rajendra Nayak <rnayak@ti.com>
CC: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/boot/dts/dra7-evm.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 4adc280..8308954 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -240,6 +240,7 @@
regulator-name = "ldo3";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
+ regulator-always-on;
regulator-boot-on;
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 44/94] ARM: OMAP2+: create dsp device only on OMAP3 SoCs
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (41 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 43/94] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Sam Asadi
@ 2014-07-15 17:00 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 45/94] ARM: OMAP2+: Make GPMC skip disabled devices Sam Asadi
` (49 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:00 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Suman Anna, Tony Lindgren, sam-the-6
From: Suman Anna <s-anna@ti.com>
The DSP platform device for TI DSP/Bridge is currently
created unconditionally whenever CONFIG_TIDSPBRIDGE is
enabled. This device should only be created on OMAP34xx/
OMAP36xx SoCs, and not for other OMAP3 derived SoCs or when
booting multi-arch images on other SoCs. So, add a check for
the SoC family both before creating the device and allocating
the carveout memory for the device.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-omap2/dsp.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c
index b8208b4..f7492df 100644
--- a/arch/arm/mach-omap2/dsp.c
+++ b/arch/arm/mach-omap2/dsp.c
@@ -29,6 +29,7 @@
#ifdef CONFIG_TIDSPBRIDGE_DVFS
#include "omap-pm.h"
#endif
+#include "soc.h"
#include <linux/platform_data/dsp-omap.h>
@@ -59,6 +60,9 @@ void __init omap_dsp_reserve_sdram_memblock(void)
phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE;
phys_addr_t paddr;
+ if (!cpu_is_omap34xx())
+ return;
+
if (!size)
return;
@@ -83,6 +87,9 @@ static int __init omap_dsp_init(void)
int err = -ENOMEM;
struct omap_dsp_platform_data *pdata = &omap_dsp_pdata;
+ if (!cpu_is_omap34xx())
+ return 0;
+
pdata->phys_mempool_base = omap_dsp_get_mempool_base();
if (pdata->phys_mempool_base) {
@@ -115,6 +122,9 @@ module_init(omap_dsp_init);
static void __exit omap_dsp_exit(void)
{
+ if (!cpu_is_omap34xx())
+ return;
+
platform_device_unregister(omap_dsp_pdev);
}
module_exit(omap_dsp_exit);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 45/94] ARM: OMAP2+: Make GPMC skip disabled devices
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (42 preceding siblings ...)
2014-07-15 17:00 ` [PATCH 44/94] ARM: OMAP2+: create dsp device only on OMAP3 SoCs Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 46/94] ARM: dts: am335x-evm: Enable the McASP FIFO for audio Sam Asadi
` (48 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Guido Martínez, Tony Lindgren,
sam-the-6
From: Guido Martínez <guido@vanguardiasur.com.ar>
Currently, child nodes of the gpmc node are iterated and probed
regardless of their 'status' property. This means adding 'status =
"disabled";' has no effect.
This patch changes the iteration to only probe nodes marked as
available.
Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Tested-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-omap2/gpmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 2c0c281..8bc1338 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1615,7 +1615,7 @@ static int gpmc_probe_dt(struct platform_device *pdev)
return ret;
}
- for_each_child_of_node(pdev->dev.of_node, child) {
+ for_each_available_child_of_node(pdev->dev.of_node, child) {
if (!child->name)
continue;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 46/94] ARM: dts: am335x-evm: Enable the McASP FIFO for audio
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (43 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 45/94] ARM: OMAP2+: Make GPMC skip disabled devices Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-16 5:40 ` Peter Ujfalusi
2014-07-15 17:01 ` [PATCH 47/94] ARM: dts: am335x-evmsk: " Sam Asadi
` (47 subsequent siblings)
92 siblings, 1 reply; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Peter Ujfalusi, Tony Lindgren, sam-the-6
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
The use of FIFO in McASP can reduce the risk of audio under/overrun and
lowers the load on the memories since the DMA will operate in bursts.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/boot/dts/am335x-evm.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index ecb2677..e2156a5 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -529,8 +529,8 @@
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 0 1 2
>;
- tx-num-evt = <1>;
- rx-num-evt = <1>;
+ tx-num-evt = <32>;
+ rx-num-evt = <32>;
};
&tps {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 47/94] ARM: dts: am335x-evmsk: Enable the McASP FIFO for audio
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (44 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 46/94] ARM: dts: am335x-evm: Enable the McASP FIFO for audio Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 48/94] ARM: dts: Fix TI CPSW Phy mode selection on IGEP COM AQUILA Sam Asadi
` (46 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Peter Ujfalusi, Tony Lindgren, sam-the-6
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
The use of FIFO in McASP can reduce the risk of audio under/overrun and
lowers the load on the memories since the DMA will operate in bursts.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/boot/dts/am335x-evmsk.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index ab9a34c..80a3b21 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -560,8 +560,8 @@
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 0 1 2
>;
- tx-num-evt = <1>;
- rx-num-evt = <1>;
+ tx-num-evt = <32>;
+ rx-num-evt = <32>;
};
&tscadc {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 48/94] ARM: dts: Fix TI CPSW Phy mode selection on IGEP COM AQUILA.
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (45 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 47/94] ARM: dts: am335x-evmsk: " Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 49/94] ARM: l2c: fix revision checking Sam Asadi
` (45 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Enric Balletbo i Serra, Tony Lindgren,
sam-the-6
From: Enric Balletbo i Serra <eballetbo@iseebcn.com>
As this board use external clock for RMII interface we should specify 'rmii'
phy mode and 'rmii-clock-ext' to make ethernet working.
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/boot/dts/am335x-igep0033.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi b/arch/arm/boot/dts/am335x-igep0033.dtsi
index 8a0a72d..a1a0cc5 100644
--- a/arch/arm/boot/dts/am335x-igep0033.dtsi
+++ b/arch/arm/boot/dts/am335x-igep0033.dtsi
@@ -105,10 +105,16 @@
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>;
+ phy-mode = "rmii";
};
&cpsw_emac1 {
phy_id = <&davinci_mdio>, <1>;
+ phy-mode = "rmii";
+};
+
+&phy_sel {
+ rmii-clock-ext;
};
&elm {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 49/94] ARM: l2c: fix revision checking
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (46 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 48/94] ARM: dts: Fix TI CPSW Phy mode selection on IGEP COM AQUILA Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 50/94] ARM: EXYNOS: Update secondary boot addr for secure mode Sam Asadi
` (44 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Russell King, sam-the-6
From: Russell King <rmk+kernel@arm.linux.org.uk>
The revision checking in l2c310_enable() was not correct; we were
masking the part number rather than the revision number. Fix this
to use the correct macro.
Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mm/cache-l2x0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 076172b..7c3fb41 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -664,7 +664,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
{
- unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
+ unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
bool cortex_a9 = read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9;
if (rev >= L310_CACHE_ID_RTL_R2P0) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 50/94] ARM: EXYNOS: Update secondary boot addr for secure mode
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (47 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 49/94] ARM: l2c: fix revision checking Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 51/94] ARM: dts: Update the parent for Audss clocks in Exynos5420 Sam Asadi
` (43 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Sachin Kamat, Tushar Behera, Kukjin Kim,
sam-the-6
From: Sachin Kamat <sachin.kamat@linaro.org>
Almost all Exynos-series of SoCs that run in secure mode don't need
additional offset for every CPU, with Exynos4412 being the only
exception.
Tested on Origen-Quad (Exynos4412) and Arndale-Octa (Exynos5420).
While at it, fix the coding style (space around *).
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Tested-by: Andreas Faerber <afaerber@suse.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-exynos/firmware.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index eb91d23..e8797bb 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -57,8 +57,13 @@ static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
boot_reg = sysram_ns_base_addr + 0x1c;
- if (!soc_is_exynos4212() && !soc_is_exynos3250())
- boot_reg += 4*cpu;
+ /*
+ * Almost all Exynos-series of SoCs that run in secure mode don't need
+ * additional offset for every CPU, with Exynos4412 being the only
+ * exception.
+ */
+ if (soc_is_exynos4412())
+ boot_reg += 4 * cpu;
__raw_writel(boot_addr, boot_reg);
return 0;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 51/94] ARM: dts: Update the parent for Audss clocks in Exynos5420
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (48 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 50/94] ARM: EXYNOS: Update secondary boot addr for secure mode Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 52/94] ARM: imx: fix shared gate clock Sam Asadi
` (42 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Tushar Behera, Shaik Ameer Basha, Kukjin Kim,
sam-the-6
From: Tushar Behera <tushar.b@samsung.com>
Currently CLK_FOUT_EPLL was set as one of the parents of AUDSS mux.
As per the user manual, it should be CLK_MAU_EPLL.
The problem surfaced when the bootloader in Peach-pit board set
the EPLL clock as the parent of AUDSS mux. While booting the kernel,
we used to get a system hang during late boot if CLK_MAU_EPLL was
disabled.
Signed-off-by: Tushar Behera <tushar.b@samsung.com>
Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Reported-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/boot/dts/exynos5420.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index e385322..79e9119 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -167,7 +167,7 @@
compatible = "samsung,exynos5420-audss-clock";
reg = <0x03810000 0x0C>;
#clock-cells = <1>;
- clocks = <&clock CLK_FIN_PLL>, <&clock CLK_FOUT_EPLL>,
+ clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MAU_EPLL>,
<&clock CLK_SCLK_MAUDIO0>, <&clock CLK_SCLK_MAUPCM0>;
clock-names = "pll_ref", "pll_in", "sclk_audio", "sclk_pcm_in";
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 52/94] ARM: imx: fix shared gate clock
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (49 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 51/94] ARM: dts: Update the parent for Audss clocks in Exynos5420 Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 53/94] ARM: OMAP2+: Remove non working OMAP HDMI audio initialization Sam Asadi
` (41 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Shawn Guo, Olof Johansson, sam-the-6
From: Shawn Guo <shawn.guo@freescale.com>
Let's say clock A and B are two gate clocks that share the same register
bit in hardware. Therefore they are registered as shared gate clocks
with imx_clk_gate2_shared().
In a scenario that only clock A is enabled by clk_enable(A) while B is
not used, the shared gate will be unexpectedly disabled in hardware.
It happens because clk_enable(A) increments the share_count from 0 to 1,
while clock B is unused to clock core, and therefore the core function
will just disable B by calling clk->ops->disable() directly. The
consequence of that call is share_count is decremented to 0 and the gate
is disabled in hardware, even though clock A is still in use.
The patch fixes the issue by initializing the share_count per hardware
state and returns enable state per share_count from .is_enabled() hook,
in case it's a shared gate.
While at it, add a check in clk_gate2_disable() to ensure it's never
called with a zero share_count.
Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
Fixes: f9f28cdf2167 ("ARM: imx: add shared gate clock support")
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-imx/clk-gate2.c | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c
index 4ba587d..84acdfd 100644
--- a/arch/arm/mach-imx/clk-gate2.c
+++ b/arch/arm/mach-imx/clk-gate2.c
@@ -67,8 +67,12 @@ static void clk_gate2_disable(struct clk_hw *hw)
spin_lock_irqsave(gate->lock, flags);
- if (gate->share_count && --(*gate->share_count) > 0)
- goto out;
+ if (gate->share_count) {
+ if (WARN_ON(*gate->share_count == 0))
+ goto out;
+ else if (--(*gate->share_count) > 0)
+ goto out;
+ }
reg = readl(gate->reg);
reg &= ~(3 << gate->bit_idx);
@@ -78,19 +82,26 @@ out:
spin_unlock_irqrestore(gate->lock, flags);
}
-static int clk_gate2_is_enabled(struct clk_hw *hw)
+static int clk_gate2_reg_is_enabled(void __iomem *reg, u8 bit_idx)
{
- u32 reg;
- struct clk_gate2 *gate = to_clk_gate2(hw);
+ u32 val = readl(reg);
- reg = readl(gate->reg);
-
- if (((reg >> gate->bit_idx) & 1) == 1)
+ if (((val >> bit_idx) & 1) == 1)
return 1;
return 0;
}
+static int clk_gate2_is_enabled(struct clk_hw *hw)
+{
+ struct clk_gate2 *gate = to_clk_gate2(hw);
+
+ if (gate->share_count)
+ return !!(*gate->share_count);
+ else
+ return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx);
+}
+
static struct clk_ops clk_gate2_ops = {
.enable = clk_gate2_enable,
.disable = clk_gate2_disable,
@@ -116,6 +127,10 @@ struct clk *clk_register_gate2(struct device *dev, const char *name,
gate->bit_idx = bit_idx;
gate->flags = clk_gate2_flags;
gate->lock = lock;
+
+ /* Initialize share_count per hardware state */
+ if (share_count)
+ *share_count = clk_gate2_reg_is_enabled(reg, bit_idx) ? 1 : 0;
gate->share_count = share_count;
init.name = name;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 53/94] ARM: OMAP2+: Remove non working OMAP HDMI audio initialization
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (50 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 52/94] ARM: imx: fix shared gate clock Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 54/94] iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends Sam Asadi
` (40 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Jyri Sarha, Tony Lindgren, sam-the-6
From: Jyri Sarha <jsarha@ti.com>
This code is not working currently and it can be removed. There is a
conflict in sharing resources with the actual HDMI driver and with
the ASoC HDMI audio DAI driver.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-omap2/devices.c | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 592ba0a..b6f8f34 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -297,33 +297,6 @@ static void omap_init_audio(void)
static inline void omap_init_audio(void) {}
#endif
-#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
- defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
-
-static struct platform_device omap_hdmi_audio = {
- .name = "omap-hdmi-audio",
- .id = -1,
-};
-
-static void __init omap_init_hdmi_audio(void)
-{
- struct omap_hwmod *oh;
- struct platform_device *pdev;
-
- oh = omap_hwmod_lookup("dss_hdmi");
- if (!oh)
- return;
-
- pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0);
- WARN(IS_ERR(pdev),
- "Can't build omap_device for omap-hdmi-audio-dai.\n");
-
- platform_device_register(&omap_hdmi_audio);
-}
-#else
-static inline void omap_init_hdmi_audio(void) {}
-#endif
-
#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
#include <linux/platform_data/spi-omap2-mcspi.h>
@@ -459,7 +432,6 @@ static int __init omap2_init_devices(void)
*/
omap_init_audio();
omap_init_camera();
- omap_init_hdmi_audio();
omap_init_mbox();
/* If dtb is there, the devices will be created dynamically */
if (!of_have_populated_dt()) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 54/94] iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (51 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 53/94] ARM: OMAP2+: Remove non working OMAP HDMI audio initialization Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 55/94] Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code Sam Asadi
` (39 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Jan Kardell, Jonathan Cameron, stable,
sam-the-6
From: Jan Kardell <jan.kardell@telliq.com>
Since AI lines could be selected at will (linux-3.11) the sending
and receiving ends of the FIFO does not agree about what step is used
for a line. It only works if the last lines are used, like 5,6,7,
and fails if ie 2,4,6 is selected in DT.
Signed-off-by: Jan Kardell <jan.kardell@telliq.com>
Tested-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/iio/adc/ti_am335x_adc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index a4db302..d5dc4c6 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -374,7 +374,7 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,
return -EAGAIN;
}
}
- map_val = chan->channel + TOTAL_CHANNELS;
+ map_val = adc_dev->channel_step[chan->scan_index];
/*
* We check the complete FIFO. We programmed just one entry but in case
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 55/94] Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (52 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 54/94] iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 56/94] Drivers: hv: util: Fix a bug in the KVP code Sam Asadi
` (38 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, K. Y. Srinivasan, stable, sam-the-6
From: "K. Y. Srinivasan" <kys@microsoft.com>
Starting with Win8, we have implemented several optimizations to improve the
scalability and performance of the VMBUS transport between the Host and the
Guest. Some of the non-performance critical services cannot leverage these
optimization since they only read and process one message at a time.
Make adjustments to the callback dispatch code to account for the way
non-performance critical drivers handle reading of the channel.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/hv/connection.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index e84f452..ae22e3c 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -339,9 +339,13 @@ static void process_chn_event(u32 relid)
*/
do {
- hv_begin_read(&channel->inbound);
+ if (read_state)
+ hv_begin_read(&channel->inbound);
channel->onchannel_callback(arg);
- bytes_to_read = hv_end_read(&channel->inbound);
+ if (read_state)
+ bytes_to_read = hv_end_read(&channel->inbound);
+ else
+ bytes_to_read = 0;
} while (read_state && (bytes_to_read != 0));
} else {
pr_err("no channel callback for relid - %u\n", relid);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 56/94] Drivers: hv: util: Fix a bug in the KVP code
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (53 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 55/94] Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 57/94] USB: ftdi_sio: Add extra PID Sam Asadi
` (37 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, K. Y. Srinivasan, stable, sam-the-6
From: "K. Y. Srinivasan" <kys@microsoft.com>
Add code to poll the channel since we process only one message
at a time and the host may not interrupt us. Also increase the
receive buffer size since some KVP messages are close to 8K bytes in size.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/hv/hv_kvp.c | 17 ++++++++++++++---
drivers/hv/hv_util.c | 2 +-
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c
index ea85253..521c146 100644
--- a/drivers/hv/hv_kvp.c
+++ b/drivers/hv/hv_kvp.c
@@ -127,6 +127,17 @@ kvp_work_func(struct work_struct *dummy)
kvp_respond_to_host(NULL, HV_E_FAIL);
}
+static void poll_channel(struct vmbus_channel *channel)
+{
+ if (channel->target_cpu != smp_processor_id())
+ smp_call_function_single(channel->target_cpu,
+ hv_kvp_onchannelcallback,
+ channel, true);
+ else
+ hv_kvp_onchannelcallback(channel);
+}
+
+
static int kvp_handle_handshake(struct hv_kvp_msg *msg)
{
int ret = 1;
@@ -155,7 +166,7 @@ static int kvp_handle_handshake(struct hv_kvp_msg *msg)
kvp_register(dm_reg_value);
kvp_transaction.active = false;
if (kvp_transaction.kvp_context)
- hv_kvp_onchannelcallback(kvp_transaction.kvp_context);
+ poll_channel(kvp_transaction.kvp_context);
}
return ret;
}
@@ -568,7 +579,7 @@ response_done:
vmbus_sendpacket(channel, recv_buffer, buf_len, req_id,
VM_PKT_DATA_INBAND, 0);
-
+ poll_channel(channel);
}
/*
@@ -603,7 +614,7 @@ void hv_kvp_onchannelcallback(void *context)
return;
}
- vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 2, &recvlen,
+ vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 4, &recvlen,
&requestid);
if (recvlen > 0) {
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index dd76180..3b9c9ef 100644
--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
@@ -319,7 +319,7 @@ static int util_probe(struct hv_device *dev,
(struct hv_util_service *)dev_id->driver_data;
int ret;
- srv->recv_buffer = kmalloc(PAGE_SIZE * 2, GFP_KERNEL);
+ srv->recv_buffer = kmalloc(PAGE_SIZE * 4, GFP_KERNEL);
if (!srv->recv_buffer)
return -ENOMEM;
if (srv->util_init) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 57/94] USB: ftdi_sio: Add extra PID.
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (54 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 56/94] Drivers: hv: util: Fix a bug in the KVP code Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 58/94] i8k: Fix non-SMP operation Sam Asadi
` (36 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Bert Vermeulen, Johan Hovold, stable,
sam-the-6
From: Bert Vermeulen <bert@biot.com>
This patch adds PID 0x0003 to the VID 0x128d (Testo). At least the
Testo 435-4 uses this, likely other gear as well.
Signed-off-by: Bert Vermeulen <bert@biot.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/usb/serial/ftdi_sio.c | 3 ++-
drivers/usb/serial/ftdi_sio_ids.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 115662c1..bf2e30a 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -720,7 +720,8 @@ static const struct usb_device_id id_table_combined[] = {
{ USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) },
- { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) },
+ { USB_DEVICE(TESTO_VID, TESTO_1_PID) },
+ { USB_DEVICE(TESTO_VID, TESTO_3_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_GAMMA_SCOUT_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13M_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13S_PID) },
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 500474c..106cc16 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -798,7 +798,8 @@
* Submitted by Colin Leroy
*/
#define TESTO_VID 0x128D
-#define TESTO_USB_INTERFACE_PID 0x0001
+#define TESTO_1_PID 0x0001
+#define TESTO_3_PID 0x0003
/*
* Mobility Electronics products.
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 58/94] i8k: Fix non-SMP operation
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (55 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 57/94] USB: ftdi_sio: Add extra PID Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-08-18 23:19 ` i8k: Don't revert affinity in i8k_smm Con Kolivas
2014-07-15 17:01 ` [PATCH 59/94] m68k: Fix boot regression on machines with RAM at non-zero Sam Asadi
` (35 subsequent siblings)
92 siblings, 1 reply; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Guenter Roeck, Andreas Mohr, sam-the-6
From: Guenter Roeck <linux@roeck-us.net>
Commit f36fdb9f0266 (i8k: Force SMM to run on CPU 0) adds support
for multi-core CPUs to the driver. Unfortunately, that causes it
to fail loading if compiled without SMP support, at least on
32 bit kernels. Kernel log shows "i8k: unable to get SMM Dell
signature", and function i8k_smm is found to return -EINVAL.
Testing revealed that the culprit is the missing return value check
of set_cpus_allowed_ptr.
Fixes: f36fdb9f0266 (i8k: Force SMM to run on CPU 0)
Reported-by: Jim Bos <jim876@xs4all.nl>
Tested-by: Jim Bos <jim876@xs4all.nl>
Cc: stable@vger.kernel.org # 3.14+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/char/i8k.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c
index d915707..93dcad0 100644
--- a/drivers/char/i8k.c
+++ b/drivers/char/i8k.c
@@ -138,7 +138,9 @@ static int i8k_smm(struct smm_regs *regs)
if (!alloc_cpumask_var(&old_mask, GFP_KERNEL))
return -ENOMEM;
cpumask_copy(old_mask, ¤t->cpus_allowed);
- set_cpus_allowed_ptr(current, cpumask_of(0));
+ rc = set_cpus_allowed_ptr(current, cpumask_of(0));
+ if (rc)
+ goto out;
if (smp_processor_id() != 0) {
rc = -EBUSY;
goto out;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 59/94] m68k: Fix boot regression on machines with RAM at non-zero
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (56 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 58/94] i8k: Fix non-SMP operation Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 60/94] ARM: EXYNOS: Add support for clock handling in power domain Sam Asadi
` (34 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Geert Uytterhoeven, sam-the-6
From: Geert Uytterhoeven <geert@linux-m68k.org>
My enhancement to store the initial mapping size for later reuse in commit
486df8bc4627bdfc032d11bedcd056cc5343ee62 ("m68k: Increase initial mapping
to 8 or 16 MiB if possible") broke booting on machines where RAM doesn't
start at address zero.
Use pc-relative addressing to fix this.
Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/m68k/kernel/head.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S
index dbb118e..a547884 100644
--- a/arch/m68k/kernel/head.S
+++ b/arch/m68k/kernel/head.S
@@ -921,7 +921,8 @@ L(nocon):
jls 1f
lsrl #1,%d1
1:
- movel %d1,m68k_init_mapped_size
+ lea %pc@(m68k_init_mapped_size),%a0
+ movel %d1,%a0@
mmu_map #PAGE_OFFSET,%pc@(L(phys_kernel_start)),%d1,\
%pc@(m68k_supervisor_cachemode)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 60/94] ARM: EXYNOS: Add support for clock handling in power domain
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (57 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 59/94] m68k: Fix boot regression on machines with RAM at non-zero Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 61/94] clk: exynos5420: Add IDs for clocks used in PD mfc Sam Asadi
` (33 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Prathyush K, Andrew Bresticker, Arun Kumar K,
Shaik Ameer Basha, Kukjin Kim, sam-the-6
From: Prathyush K <prathyush.k@samsung.com>
While powering on/off a local powerdomain in exynos5 chipsets, the
input clocks to each device gets modified. This behaviour is based
on the SYSCLK_SYS_PWR_REG registers.
E.g. SYSCLK_MFC_SYS_PWR_REG = 0x0, the parent of input clock to MFC
(aclk333) gets modified to oscclk
= 0x1, no change in clocks.
The recommended value of SYSCLK_SYS_PWR_REG before power gating any
domain is 0x0. So we must also restore the clocks while powering on
a domain everytime.
This patch adds the framework for getting the required mux and parent
clocks through a power domain device node. With this patch, while
powering off a domain, parent is set to oscclk and while powering back
on, its re-set to the correct parent which is as per the recommended
pd on/off sequence.
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
.../bindings/arm/exynos/power_domain.txt | 20 +++++++
arch/arm/mach-exynos/pm_domains.c | 61 +++++++++++++++++++-
2 files changed, 80 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
index 5216b41..8b4f7b7f 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -9,6 +9,18 @@ Required Properties:
- reg: physical base address of the controller and length of memory mapped
region.
+Optional Properties:
+- clocks: List of clock handles. The parent clocks of the input clocks to the
+ devices in this power domain are set to oscclk before power gating
+ and restored back after powering on a domain. This is required for
+ all domains which are powered on and off and not required for unused
+ domains.
+- clock-names: The following clocks can be specified:
+ - oscclk: Oscillator clock.
+ - pclkN, clkN: Pairs of parent of input clock and input clock to the
+ devices in this power domain. Maximum of 4 pairs (N = 0 to 3)
+ are supported currently.
+
Node of a device using power domains must have a samsung,power-domain property
defined with a phandle to respective power domain.
@@ -19,6 +31,14 @@ Example:
reg = <0x10023C00 0x10>;
};
+ mfc_pd: power-domain@10044060 {
+ compatible = "samsung,exynos4210-pd";
+ reg = <0x10044060 0x20>;
+ clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>,
+ <&clock CLK_MOUT_USER_ACLK333>;
+ clock-names = "oscclk", "pclk0", "clk0";
+ };
+
Example of the node using power domain:
node {
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index fe6570e..797cb13 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -17,6 +17,7 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/pm_domain.h>
+#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
@@ -24,6 +25,8 @@
#include "regs-pmu.h"
+#define MAX_CLK_PER_DOMAIN 4
+
/*
* Exynos specific wrapper around the generic power domain
*/
@@ -32,6 +35,9 @@ struct exynos_pm_domain {
char const *name;
bool is_off;
struct generic_pm_domain pd;
+ struct clk *oscclk;
+ struct clk *clk[MAX_CLK_PER_DOMAIN];
+ struct clk *pclk[MAX_CLK_PER_DOMAIN];
};
static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
@@ -44,6 +50,19 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
pd = container_of(domain, struct exynos_pm_domain, pd);
base = pd->base;
+ /* Set oscclk before powering off a domain*/
+ if (!power_on) {
+ int i;
+
+ for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
+ if (IS_ERR(pd->clk[i]))
+ break;
+ if (clk_set_parent(pd->clk[i], pd->oscclk))
+ pr_err("%s: error setting oscclk as parent to clock %d\n",
+ pd->name, i);
+ }
+ }
+
pwr = power_on ? S5P_INT_LOCAL_PWR_EN : 0;
__raw_writel(pwr, base);
@@ -60,6 +79,20 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
cpu_relax();
usleep_range(80, 100);
}
+
+ /* Restore clocks after powering on a domain*/
+ if (power_on) {
+ int i;
+
+ for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
+ if (IS_ERR(pd->clk[i]))
+ break;
+ if (clk_set_parent(pd->clk[i], pd->pclk[i]))
+ pr_err("%s: error setting parent to clock%d\n",
+ pd->name, i);
+ }
+ }
+
return 0;
}
@@ -152,9 +185,11 @@ static __init int exynos4_pm_init_power_domain(void)
for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
struct exynos_pm_domain *pd;
- int on;
+ int on, i;
+ struct device *dev;
pdev = of_find_device_by_node(np);
+ dev = &pdev->dev;
pd = kzalloc(sizeof(*pd), GFP_KERNEL);
if (!pd) {
@@ -170,6 +205,30 @@ static __init int exynos4_pm_init_power_domain(void)
pd->pd.power_on = exynos_pd_power_on;
pd->pd.of_node = np;
+ pd->oscclk = clk_get(dev, "oscclk");
+ if (IS_ERR(pd->oscclk))
+ goto no_clk;
+
+ for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
+ char clk_name[8];
+
+ snprintf(clk_name, sizeof(clk_name), "clk%d", i);
+ pd->clk[i] = clk_get(dev, clk_name);
+ if (IS_ERR(pd->clk[i]))
+ break;
+ snprintf(clk_name, sizeof(clk_name), "pclk%d", i);
+ pd->pclk[i] = clk_get(dev, clk_name);
+ if (IS_ERR(pd->pclk[i])) {
+ clk_put(pd->clk[i]);
+ pd->clk[i] = ERR_PTR(-EINVAL);
+ break;
+ }
+ }
+
+ if (IS_ERR(pd->clk[0]))
+ clk_put(pd->oscclk);
+
+no_clk:
platform_set_drvdata(pdev, pd);
on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 61/94] clk: exynos5420: Add IDs for clocks used in PD mfc
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (58 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 60/94] ARM: EXYNOS: Add support for clock handling in power domain Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 62/94] ARM: dts: Add clock property for mfc_pd in exynos5420 Sam Asadi
` (32 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Arun Kumar K, Shaik Ameer Basha, Kukjin Kim,
sam-the-6
From: Arun Kumar K <arun.kk@samsung.com>
Adds IDs for MUX clocks to be used by power domain for MFC
for doing re-parenting while pd on/off.
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Acked-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/samsung/clk-exynos5420.c | 6 ++++--
include/dt-bindings/clock/exynos5420.h | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index 61eccf0..a4e6cc7 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -631,7 +631,8 @@ static struct samsung_mux_clock exynos5x_mux_clks[] __initdata = {
SRC_TOP4, 16, 1),
MUX(0, "mout_user_aclk266", mout_user_aclk266_p, SRC_TOP4, 20, 1),
MUX(0, "mout_user_aclk166", mout_user_aclk166_p, SRC_TOP4, 24, 1),
- MUX(0, "mout_user_aclk333", mout_user_aclk333_p, SRC_TOP4, 28, 1),
+ MUX(CLK_MOUT_USER_ACLK333, "mout_user_aclk333", mout_user_aclk333_p,
+ SRC_TOP4, 28, 1),
MUX(0, "mout_user_aclk400_disp1", mout_user_aclk400_disp1_p,
SRC_TOP5, 0, 1),
@@ -684,7 +685,8 @@ static struct samsung_mux_clock exynos5x_mux_clks[] __initdata = {
SRC_TOP11, 12, 1),
MUX(0, "mout_sw_aclk266", mout_sw_aclk266_p, SRC_TOP11, 20, 1),
MUX(0, "mout_sw_aclk166", mout_sw_aclk166_p, SRC_TOP11, 24, 1),
- MUX(0, "mout_sw_aclk333", mout_sw_aclk333_p, SRC_TOP11, 28, 1),
+ MUX(CLK_MOUT_SW_ACLK333, "mout_sw_aclk333", mout_sw_aclk333_p,
+ SRC_TOP11, 28, 1),
MUX(0, "mout_sw_aclk400_disp1", mout_sw_aclk400_disp1_p,
SRC_TOP12, 4, 1),
diff --git a/include/dt-bindings/clock/exynos5420.h b/include/dt-bindings/clock/exynos5420.h
index 14e1c8f..21d51ae 100644
--- a/include/dt-bindings/clock/exynos5420.h
+++ b/include/dt-bindings/clock/exynos5420.h
@@ -202,6 +202,8 @@
#define CLK_MOUT_G3D 641
#define CLK_MOUT_VPLL 642
#define CLK_MOUT_MAUDIO0 643
+#define CLK_MOUT_USER_ACLK333 644
+#define CLK_MOUT_SW_ACLK333 645
/* divider clocks */
#define CLK_DOUT_PIXEL 768
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 62/94] ARM: dts: Add clock property for mfc_pd in exynos5420
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (59 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 61/94] clk: exynos5420: Add IDs for clocks used in PD mfc Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 63/94] ARM: EXYNOS: Register cpuidle device only on exynos4210 and 5250 Sam Asadi
` (31 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Arun Kumar K, Shaik Ameer Basha, Kukjin Kim,
sam-the-6
From: Arun Kumar K <arun.kk@samsung.com>
Adding the optional clock property for the mfc_pd for
handling the re-parenting while pd on/off.
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/boot/dts/exynos5420.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 79e9119..1595722 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -260,6 +260,9 @@
mfc_pd: power-domain@10044060 {
compatible = "samsung,exynos4210-pd";
reg = <0x10044060 0x20>;
+ clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>,
+ <&clock CLK_MOUT_USER_ACLK333>;
+ clock-names = "oscclk", "pclk0", "clk0";
};
disp_pd: power-domain@100440C0 {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 63/94] ARM: EXYNOS: Register cpuidle device only on exynos4210 and 5250
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (60 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 62/94] ARM: dts: Add clock property for mfc_pd in exynos5420 Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 64/94] serial: Test for no tx data on tx restart Sam Asadi
` (30 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Tomasz Figa, Kukjin Kim, sam-the-6
From: Tomasz Figa <t.figa@samsung.com>
Currently, the exynos cpuidle driver works correctly only on exynos4210
and 5250. Trying to use it with just one CPU online on any other exynos
SoCs will lead to system failure, due to unsupported AFTR mode on other
SoCs. This patch fixes the problem by registering the driver only on
supported SoCs and letting others simply use default WFI mode until
support for them is added.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/mach-exynos/exynos.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 95cad25..46d893f 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -173,10 +173,8 @@ static struct platform_device exynos_cpuidle = {
void __init exynos_cpuidle_init(void)
{
- if (soc_is_exynos5440())
- return;
-
- platform_device_register(&exynos_cpuidle);
+ if (soc_is_exynos4210() || soc_is_exynos5250())
+ platform_device_register(&exynos_cpuidle);
}
void __init exynos_cpufreq_init(void)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 64/94] serial: Test for no tx data on tx restart
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (61 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 63/94] ARM: EXYNOS: Register cpuidle device only on exynos4210 and 5250 Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 65/94] serial: arc_uart: Use uart_circ_empty() for open-coded comparison Sam Asadi
` (29 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Peter Hurley, Seth Bollinger,
David S. Miller, Sam Ravnborg, Thomas Bogendoerfer, sam-the-6
From: Peter Hurley <peter@hurleysoftware.com>
Commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c,
'serial_core: Fix conditional start_tx on ring buffer not empty'
exposes an incorrect assumption in several drivers' start_tx methods;
the tx ring buffer can, in fact, be empty when restarting tx while
performing flow control.
Affected drivers:
sunsab.c
ip22zilog.c
pmac_zilog.c
sunzilog.c
m32r_sio.c
imx.c
Other in-tree serial drivers either are not affected or already
test for empty tx ring buffer before transmitting.
Test for empty tx ring buffer in start_tx() method, after transmitting
x_char (if applicable).
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Seth Bollinger <sethb@digi.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Cc: stable <stable@vger.kernel.org> # 3.15
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/tty/serial/imx.c | 3 +++
drivers/tty/serial/ip22zilog.c | 2 ++
drivers/tty/serial/m32r_sio.c | 8 +++++---
drivers/tty/serial/pmac_zilog.c | 3 +++
drivers/tty/serial/sunsab.c | 3 +++
drivers/tty/serial/sunzilog.c | 2 ++
6 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index e2f9387..56bd9aa 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -567,6 +567,9 @@ static void imx_start_tx(struct uart_port *port)
struct imx_port *sport = (struct imx_port *)port;
unsigned long temp;
+ if (uart_circ_empty(&port.state->xmit))
+ return;
+
if (USE_IRDA(sport)) {
/* half duplex in IrDA mode; have to disable receive mode */
temp = readl(sport->port.membase + UCR4);
diff --git a/drivers/tty/serial/ip22zilog.c b/drivers/tty/serial/ip22zilog.c
index 1efd4c3..99b7b86 100644
--- a/drivers/tty/serial/ip22zilog.c
+++ b/drivers/tty/serial/ip22zilog.c
@@ -603,6 +603,8 @@ static void ip22zilog_start_tx(struct uart_port *port)
} else {
struct circ_buf *xmit = &port->state->xmit;
+ if (uart_circ_empty(xmit))
+ return;
writeb(xmit->buf[xmit->tail], &channel->data);
ZSDELAY();
ZS_WSYNC(channel);
diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c
index 68f2c53..5702828 100644
--- a/drivers/tty/serial/m32r_sio.c
+++ b/drivers/tty/serial/m32r_sio.c
@@ -266,9 +266,11 @@ static void m32r_sio_start_tx(struct uart_port *port)
if (!(up->ier & UART_IER_THRI)) {
up->ier |= UART_IER_THRI;
serial_out(up, UART_IER, up->ier);
- serial_out(up, UART_TX, xmit->buf[xmit->tail]);
- xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
- up->port.icount.tx++;
+ if (!uart_circ_empty(xmit)) {
+ serial_out(up, UART_TX, xmit->buf[xmit->tail]);
+ xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
+ up->port.icount.tx++;
+ }
}
while((serial_in(up, UART_LSR) & UART_EMPTY) != UART_EMPTY);
#else
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index 8193635..f7ad5b9 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -653,6 +653,8 @@ static void pmz_start_tx(struct uart_port *port)
} else {
struct circ_buf *xmit = &port->state->xmit;
+ if (uart_circ_empty(xmit))
+ goto out;
write_zsdata(uap, xmit->buf[xmit->tail]);
zssync(uap);
xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
@@ -661,6 +663,7 @@ static void pmz_start_tx(struct uart_port *port)
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_write_wakeup(&uap->port);
}
+ out:
pmz_debug("pmz: start_tx() done.\n");
}
diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c
index 80a58ec..2f57df9 100644
--- a/drivers/tty/serial/sunsab.c
+++ b/drivers/tty/serial/sunsab.c
@@ -427,6 +427,9 @@ static void sunsab_start_tx(struct uart_port *port)
struct circ_buf *xmit = &up->port.state->xmit;
int i;
+ if (uart_circ_empty(xmit))
+ return;
+
up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);
writeb(up->interrupt_mask1, &up->regs->w.imr1);
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c
index a85db8b..02df394 100644
--- a/drivers/tty/serial/sunzilog.c
+++ b/drivers/tty/serial/sunzilog.c
@@ -703,6 +703,8 @@ static void sunzilog_start_tx(struct uart_port *port)
} else {
struct circ_buf *xmit = &port->state->xmit;
+ if (uart_circ_empty(xmit))
+ return;
writeb(xmit->buf[xmit->tail], &channel->data);
ZSDELAY();
ZS_WSYNC(channel);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 65/94] serial: arc_uart: Use uart_circ_empty() for open-coded comparison
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (62 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 64/94] serial: Test for no tx data on tx restart Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 66/94] m68k: Export mach_random_get_entropy to modules Sam Asadi
` (28 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Peter Hurley, sam-the-6
From: Peter Hurley <peter@hurleysoftware.com>
Replace open-coded test for empty tx ring buffer with equivalent
helper function, uart_circ_empty(). No functional change.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/tty/serial/arc_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index c9f5c9d..008c223 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -177,7 +177,7 @@ static void arc_serial_tx_chars(struct arc_uart_port *uart)
uart->port.icount.tx++;
uart->port.x_char = 0;
sent = 1;
- } else if (xmit->tail != xmit->head) { /* TODO: uart_circ_empty */
+ } else if (!uart_circ_empty(xmit)) {
ch = xmit->buf[xmit->tail];
xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
uart->port.icount.tx++;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 66/94] m68k: Export mach_random_get_entropy to modules
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (63 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 65/94] serial: arc_uart: Use uart_circ_empty() for open-coded comparison Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 67/94] ext4: revert commit which was causing fs corruption after journal replays Sam Asadi
` (27 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Geert Uytterhoeven, sam-the-6
From: Geert Uytterhoeven <geert@linux-m68k.org>
When a module calls random_get_entropy():
ERROR: "mach_random_get_entropy" [crypto/drbg.ko] undefined!
make[1]: *** [__modpost] Error 1
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/m68k/kernel/time.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 958f1ad..3857737 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -11,6 +11,7 @@
*/
#include <linux/errno.h>
+#include <linux/export.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
@@ -30,6 +31,7 @@
unsigned long (*mach_random_get_entropy)(void);
+EXPORT_SYMBOL_GPL(mach_random_get_entropy);
/*
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 67/94] ext4: revert commit which was causing fs corruption after journal replays
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (64 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 66/94] m68k: Export mach_random_get_entropy to modules Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 68/94] serial: imx: Fix build breakage Sam Asadi
` (26 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Theodore Ts'o, sam-the-6
From: Theodore Ts'o <tytso@mit.edu>
Commit 007649375f6af2 ("ext4: initialize multi-block allocator before
checking block descriptors") causes the block group descriptor's count
of the number of free blocks to become inconsistent with the number of
free blocks in the allocation bitmap. This is a harmless form of fs
corruption, but it causes the kernel to potentially remount the file
system read-only, or to panic, depending on the file systems's error
behavior.
Thanks to Eric Whitney for his tireless work to reproduce and to find
the guilty commit.
Fixes: 007649375f6af2 ("ext4: initialize multi-block allocator before checking block descriptors"
Cc: stable@vger.kernel.org # 3.15
Reported-by: David Jander <david@protonic.nl>
Reported-by: Matteo Croce <technoboy85@gmail.com>
Tested-by: Eric Whitney <enwlinux@gmail.com>
Suggested-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
fs/ext4/super.c | 51 ++++++++++++++++++++++++---------------------------
1 file changed, 24 insertions(+), 27 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 6297c07..6df7bc6 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3879,38 +3879,19 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
goto failed_mount2;
}
}
-
- /*
- * set up enough so that it can read an inode,
- * and create new inode for buddy allocator
- */
- sbi->s_gdb_count = db_count;
- if (!test_opt(sb, NOLOAD) &&
- EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL))
- sb->s_op = &ext4_sops;
- else
- sb->s_op = &ext4_nojournal_sops;
-
- ext4_ext_init(sb);
- err = ext4_mb_init(sb);
- if (err) {
- ext4_msg(sb, KERN_ERR, "failed to initialize mballoc (%d)",
- err);
- goto failed_mount2;
- }
-
if (!ext4_check_descriptors(sb, &first_not_zeroed)) {
ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
- goto failed_mount2a;
+ goto failed_mount2;
}
if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG))
if (!ext4_fill_flex_info(sb)) {
ext4_msg(sb, KERN_ERR,
"unable to initialize "
"flex_bg meta info!");
- goto failed_mount2a;
+ goto failed_mount2;
}
+ sbi->s_gdb_count = db_count;
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
@@ -3945,6 +3926,14 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
sbi->s_stripe = ext4_get_stripe_size(sbi);
sbi->s_extent_max_zeroout_kb = 32;
+ /*
+ * set up enough so that it can read an inode
+ */
+ if (!test_opt(sb, NOLOAD) &&
+ EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL))
+ sb->s_op = &ext4_sops;
+ else
+ sb->s_op = &ext4_nojournal_sops;
sb->s_export_op = &ext4_export_ops;
sb->s_xattr = ext4_xattr_handlers;
#ifdef CONFIG_QUOTA
@@ -4134,13 +4123,21 @@ no_journal:
if (err) {
ext4_msg(sb, KERN_ERR, "failed to reserve %llu clusters for "
"reserved pool", ext4_calculate_resv_clusters(sb));
- goto failed_mount5;
+ goto failed_mount4a;
}
err = ext4_setup_system_zone(sb);
if (err) {
ext4_msg(sb, KERN_ERR, "failed to initialize system "
"zone (%d)", err);
+ goto failed_mount4a;
+ }
+
+ ext4_ext_init(sb);
+ err = ext4_mb_init(sb);
+ if (err) {
+ ext4_msg(sb, KERN_ERR, "failed to initialize mballoc (%d)",
+ err);
goto failed_mount5;
}
@@ -4217,8 +4214,11 @@ failed_mount8:
failed_mount7:
ext4_unregister_li_request(sb);
failed_mount6:
- ext4_release_system_zone(sb);
+ ext4_mb_release(sb);
failed_mount5:
+ ext4_ext_release(sb);
+ ext4_release_system_zone(sb);
+failed_mount4a:
dput(sb->s_root);
sb->s_root = NULL;
failed_mount4:
@@ -4242,14 +4242,11 @@ failed_mount3:
percpu_counter_destroy(&sbi->s_extent_cache_cnt);
if (sbi->s_mmp_tsk)
kthread_stop(sbi->s_mmp_tsk);
-failed_mount2a:
- ext4_mb_release(sb);
failed_mount2:
for (i = 0; i < db_count; i++)
brelse(sbi->s_group_desc[i]);
ext4_kvfree(sbi->s_group_desc);
failed_mount:
- ext4_ext_release(sb);
if (sbi->s_chksum_driver)
crypto_free_shash(sbi->s_chksum_driver);
if (sbi->s_proc) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 68/94] serial: imx: Fix build breakage
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (65 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 67/94] ext4: revert commit which was causing fs corruption after journal replays Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 69/94] serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a0 Sam Asadi
` (25 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Peter Hurley, sam-the-6
From: Peter Hurley <peter@hurleysoftware.com>
Fix breakage introduced by
commit c557d392fbf5badd693ea1946a4317c87a26a716,
'serial: Test for no tx data on tx restart'.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/tty/serial/imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 56bd9aa..044e86d 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -567,7 +567,7 @@ static void imx_start_tx(struct uart_port *port)
struct imx_port *sport = (struct imx_port *)port;
unsigned long temp;
- if (uart_circ_empty(&port.state->xmit))
+ if (uart_circ_empty(&port->state->xmit))
return;
if (USE_IRDA(sport)) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 69/94] serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a0
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (66 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 68/94] serial: imx: Fix build breakage Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 70/94] USB: serial: ftdi_sio: Add Infineon Triboard Sam Asadi
` (24 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Simon Horman, sam-the-6
From: Simon Horman <horms+renesas@verge.net.au>
Simply document new compat strings.
There appears to be no need for a driver updates.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index 64fd7de..b355660 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -4,6 +4,13 @@ Required properties:
- compatible: Must contain one of the following:
+ - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
+ - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
+ - "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART.
+ - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART.
+ - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART.
+ - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.
+ - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
- "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
- "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
- "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 70/94] USB: serial: ftdi_sio: Add Infineon Triboard
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (67 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 69/94] serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a0 Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 71/94] phy: sun4i: depend on RESET_CONTROLLER Sam Asadi
` (23 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michal Sojka, Johan Hovold, stable,
sam-the-6
From: Michal Sojka <sojkam1@fel.cvut.cz>
This adds support for Infineon TriBoard TC1798 [1]. Only interface 1
is used as serial line (see [2], Figure 8-6).
[1] http://www.infineon.com/cms/de/product/microcontroller/development-tools-software-and-kits/tricore-tm-development-tools-software-and-kits/starterkits-and-evaluation-boards/starter-kit-tc1798/channel.html?channel=db3a304333b8a7ca0133cfa3d73e4268
[2] http://www.infineon.com/dgdl/TriBoardManual-TC1798-V10.pdf?folderId=db3a304412b407950112b409ae7c0343&fileId=db3a304333b8a7ca0133cfae99fe426a
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Cc: Johan Hovold <johan@kernel.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/usb/serial/ftdi_sio.c | 2 ++
drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index bf2e30a..8a3813b 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -945,6 +945,8 @@ static const struct usb_device_id id_table_combined[] = {
{ USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_2_PID) },
{ USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_3_PID) },
{ USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_4_PID) },
+ /* Infineon Devices */
+ { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) },
{ } /* Terminating entry */
};
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 106cc16..c4777bc 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -584,6 +584,12 @@
#define RATOC_PRODUCT_ID_USB60F 0xb020
/*
+ * Infineon Technologies
+ */
+#define INFINEON_VID 0x058b
+#define INFINEON_TRIBOARD_PID 0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */
+
+/*
* Acton Research Corp.
*/
#define ACTON_VID 0x0647 /* Vendor ID */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 71/94] phy: sun4i: depend on RESET_CONTROLLER
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (68 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 70/94] USB: serial: ftdi_sio: Add Infineon Triboard Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 72/94] phy: omap-usb2: fix devm_ioremap_resource error detection code Sam Asadi
` (22 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Maxime Ripard, Kishon Vijay Abraham I,
sam-the-6
From: Maxime Ripard <maxime.ripard@free-electrons.com>
The driver depend on the reset framework in a mandatory way. Make sure
reset_control_get is defined by adding this dependency in Kconfig
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/phy/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index fcdfe7c..64b98d2 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -112,6 +112,7 @@ config PHY_EXYNOS5250_SATA
config PHY_SUN4I_USB
tristate "Allwinner sunxi SoC USB PHY driver"
depends on ARCH_SUNXI && HAS_IOMEM && OF
+ depends on RESET_CONTROLLER
select GENERIC_PHY
help
Enable this to support the transceiver that is part of Allwinner
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 72/94] phy: omap-usb2: fix devm_ioremap_resource error detection code
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (69 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 71/94] phy: sun4i: depend on RESET_CONTROLLER Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 73/94] drivers: phy: phy-samsung-usb2.c: Add missing MODULE_DEVICE_TABLE Sam Asadi
` (21 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Himangi Saraogi, Kishon Vijay Abraham I,
sam-the-6
From: Himangi Saraogi <himangi774@gmail.com>
devm_ioremap_resource returns an ERR_PTR value, not NULL, on failure.
A simplified version of the semantic match that finds this problem is as
follows:
// <smpl>
@@
expression e,e1;
statement S;
@@
*e = devm_ioremap_resource(...);
if (!e1) S
// </smpl>
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/phy/phy-omap-usb2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
index 7007c11..2063d54 100644
--- a/drivers/phy/phy-omap-usb2.c
+++ b/drivers/phy/phy-omap-usb2.c
@@ -233,8 +233,8 @@ static int omap_usb2_probe(struct platform_device *pdev)
if (phy_data->flags & OMAP_USB2_CALIBRATE_FALSE_DISCONNECT) {
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
phy->phy_base = devm_ioremap_resource(&pdev->dev, res);
- if (!phy->phy_base)
- return -ENOMEM;
+ if (IS_ERR(phy->phy_base))
+ return PTR_ERR(phy->phy_base);
phy->flags |= OMAP_USB2_CALIBRATE_FALSE_DISCONNECT;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 73/94] drivers: phy: phy-samsung-usb2.c: Add missing MODULE_DEVICE_TABLE
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (70 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 72/94] phy: omap-usb2: fix devm_ioremap_resource error detection code Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 74/94] phy: core: Fix error path in phy_create() Sam Asadi
` (20 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Sjoerd Simons, Kishon Vijay Abraham I,
sam-the-6
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Allow phy-exynos-usb2 to be autoloaded based on devicetree information.
Tested on Odroid X2 with its USB subsystem build as modules.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/phy/phy-samsung-usb2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/phy/phy-samsung-usb2.c b/drivers/phy/phy-samsung-usb2.c
index 8a8c6bc..1e69a32 100644
--- a/drivers/phy/phy-samsung-usb2.c
+++ b/drivers/phy/phy-samsung-usb2.c
@@ -107,6 +107,7 @@ static const struct of_device_id samsung_usb2_phy_of_match[] = {
#endif
{ },
};
+MODULE_DEVICE_TABLE(of, samsung_usb2_phy_of_match);
static int samsung_usb2_phy_probe(struct platform_device *pdev)
{
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 74/94] phy: core: Fix error path in phy_create()
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (71 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 73/94] drivers: phy: phy-samsung-usb2.c: Add missing MODULE_DEVICE_TABLE Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 75/94] phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove Sam Asadi
` (19 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Roger Quadros, Kishon Vijay Abraham I,
sam-the-6
From: Roger Quadros <rogerq@ti.com>
Prevent resources from being freed twice in case device_add() call
fails within phy_create(). Also use ida_simple_remove() instead of
ida_remove() as we had used ida_simple_get() to allocate the ida.
Cc: 3.13+ <stable@vger.kernel.org> # 3.13+
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/phy/phy-core.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index c64a2f3..49c4465 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -614,8 +614,9 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,
return phy;
put_dev:
- put_device(&phy->dev);
- ida_remove(&phy_ida, phy->id);
+ put_device(&phy->dev); /* calls phy_release() which frees resources */
+ return ERR_PTR(ret);
+
free_phy:
kfree(phy);
return ERR_PTR(ret);
@@ -799,7 +800,7 @@ static void phy_release(struct device *dev)
phy = to_phy(dev);
dev_vdbg(dev, "releasing '%s'\n", dev_name(dev));
- ida_remove(&phy_ida, phy->id);
+ ida_simple_remove(&phy_ida, phy->id);
kfree(phy);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 75/94] phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (72 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 74/94] phy: core: Fix error path in phy_create() Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 76/94] ARM: at91: at91sam9x5: add clocks for usb device Sam Asadi
` (18 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Roger Quadros, Kishon Vijay Abraham I,
sam-the-6
From: Roger Quadros <rogerq@ti.com>
If probe fails then we need to call pm_runtime_disable() to balance
out the previous pm_runtime_enable() call. Else it will cause
unbalanced pm_runtime_enable() call in the succeding probe call.
This anomaly was observed when the call to devm_phy_create() failed
with -EPROBE_DEFER.
Balance out the pm_runtime_enable() call in .remove() as well.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/phy/phy-omap-usb2.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
index 2063d54..34b3961 100644
--- a/drivers/phy/phy-omap-usb2.c
+++ b/drivers/phy/phy-omap-usb2.c
@@ -262,7 +262,6 @@ static int omap_usb2_probe(struct platform_device *pdev)
otg->phy = &phy->phy;
platform_set_drvdata(pdev, phy);
- pm_runtime_enable(phy->dev);
generic_phy = devm_phy_create(phy->dev, &ops, NULL);
if (IS_ERR(generic_phy))
@@ -270,10 +269,13 @@ static int omap_usb2_probe(struct platform_device *pdev)
phy_set_drvdata(generic_phy, phy);
+ pm_runtime_enable(phy->dev);
phy_provider = devm_of_phy_provider_register(phy->dev,
of_phy_simple_xlate);
- if (IS_ERR(phy_provider))
+ if (IS_ERR(phy_provider)) {
+ pm_runtime_disable(phy->dev);
return PTR_ERR(phy_provider);
+ }
phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
if (IS_ERR(phy->wkupclk)) {
@@ -317,6 +319,7 @@ static int omap_usb2_remove(struct platform_device *pdev)
if (!IS_ERR(phy->optclk))
clk_unprepare(phy->optclk);
usb_remove_phy(&phy->phy);
+ pm_runtime_disable(phy->dev);
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 76/94] ARM: at91: at91sam9x5: add clocks for usb device
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (73 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 75/94] phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 77/94] Documentation/Changes: clean up mcelog paragraph Sam Asadi
` (17 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Bo Shen, Nicolas Ferre, Olof Johansson,
sam-the-6
From: Bo Shen <voice.shen@atmel.com>
Add clocks for usb device, or else switch to CCF, the gadget
won't work.
Reported-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Tested-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/arm/boot/dts/at91sam9x5.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index d6133f4..2ebc421 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -1045,6 +1045,8 @@
reg = <0x00500000 0x80000
0xf803c000 0x400>;
interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&usb>, <&udphs_clk>;
+ clock-names = "hclk", "pclk";
status = "disabled";
ep0 {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 77/94] Documentation/Changes: clean up mcelog paragraph
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (74 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 76/94] ARM: at91: at91sam9x5: add clocks for usb device Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 78/94] scripts/kernel-doc: handle object-like macros Sam Asadi
` (16 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Paul Bolle, Randy Dunlap, Linus Torvalds,
sam-the-6
From: Paul Bolle <pebolle@tiscali.nl>
The paragraph on mcelog currently describes kernel v2.6.31. In that
kernel the mce code (for i386, that is) was in transition. Ever since
v2.6.32 the situation is much simpler (eg, mcelog is now needed to
process events on almost all x86 machines, i386 and x86-64). Since this
"document is designed to provide a list of the minimum levels of
software necessary to run the 3.0 kernels" let's just describe that
situation.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
Documentation/Changes | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/Documentation/Changes b/Documentation/Changes
index 2254db0..227bec8 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -280,12 +280,9 @@ that is possible.
mcelog
------
-In Linux 2.6.31+ the i386 kernel needs to run the mcelog utility
-as a regular cronjob similar to the x86-64 kernel to process and log
-machine check events when CONFIG_X86_NEW_MCE is enabled. Machine check
-events are errors reported by the CPU. Processing them is strongly encouraged.
-All x86-64 kernels since 2.6.4 require the mcelog utility to
-process machine checks.
+On x86 kernels the mcelog utility is needed to process and log machine check
+events when CONFIG_X86_MCE is enabled. Machine check events are errors reported
+by the CPU. Processing them is strongly encouraged.
Getting updated software
========================
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 78/94] scripts/kernel-doc: handle object-like macros
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (75 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 77/94] Documentation/Changes: clean up mcelog paragraph Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 79/94] DocBook: fix mtdnand typos Sam Asadi
` (15 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Horia Geanta, Randy Dunlap, Linus Torvalds,
sam-the-6
From: Horia Geanta <horia.geanta@freescale.com>
Object-like macros are different than function-like macros:
https://gcc.gnu.org/onlinedocs/cpp/Object-like-Macros.html
https://gcc.gnu.org/onlinedocs/cpp/Function-like-Macros.html
They are not parsed correctly, generating invalid intermediate
files (xmls) for cases like:
#define BIT_MASK (0xFF << BIT_SHIFT)
where "OxFF <<" is considered to be parameter type.
When parsing, we can differentiate beween these two types of macros by
checking whether there is at least one whitespace b/w "#define" and
first opening parenthesis.
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
scripts/kernel-doc | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index da058da..16a07cf 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2073,6 +2073,7 @@ sub check_return_section {
sub dump_function($$) {
my $prototype = shift;
my $file = shift;
+ my $noret = 0;
$prototype =~ s/^static +//;
$prototype =~ s/^extern +//;
@@ -2086,7 +2087,7 @@ sub dump_function($$) {
$prototype =~ s/__init_or_module +//;
$prototype =~ s/__must_check +//;
$prototype =~ s/__weak +//;
- $prototype =~ s/^#\s*define\s+//; #ak added
+ my $define = $prototype =~ s/^#\s*define\s+//; #ak added
$prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//;
# Yes, this truly is vile. We are looking for:
@@ -2105,7 +2106,15 @@ sub dump_function($$) {
# - atomic_set (macro)
# - pci_match_device, __copy_to_user (long return type)
- if ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
+ if ($define && $prototype =~ m/^()([a-zA-Z0-9_~:]+)\s+/) {
+ # This is an object-like macro, it has no return type and no parameter
+ # list.
+ # Function-like macros are not allowed to have spaces between
+ # declaration_name and opening parenthesis (notice the \s+).
+ $return_type = $1;
+ $declaration_name = $2;
+ $noret = 1;
+ } elsif ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
$prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
$prototype =~ m/^(\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
$prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
@@ -2140,7 +2149,7 @@ sub dump_function($$) {
# of warnings goes sufficiently down, the check is only performed in
# verbose mode.
# TODO: always perform the check.
- if ($verbose) {
+ if ($verbose && !$noret) {
check_return_section($file, $declaration_name, $return_type);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 79/94] DocBook: fix mtdnand typos
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (76 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 78/94] scripts/kernel-doc: handle object-like macros Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 80/94] DocBook: fix various typos Sam Asadi
` (14 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Masanari Iida, Randy Dunlap, Linus Torvalds,
sam-the-6
From: Masanari Iida <standby24x7@gmail.com>
This patch fixed spelling typo found in DocBook/mtdnand.tmpl.
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
Documentation/DocBook/mtdnand.tmpl | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index cd11926..7da8f04 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -91,7 +91,7 @@
<listitem><para>
[MTD Interface]</para><para>
These functions provide the interface to the MTD kernel API.
- They are not replacable and provide functionality
+ They are not replaceable and provide functionality
which is complete hardware independent.
</para></listitem>
<listitem><para>
@@ -100,14 +100,14 @@
</para></listitem>
<listitem><para>
[GENERIC]</para><para>
- Generic functions are not replacable and provide functionality
+ Generic functions are not replaceable and provide functionality
which is complete hardware independent.
</para></listitem>
<listitem><para>
[DEFAULT]</para><para>
Default functions provide hardware related functionality which is suitable
for most of the implementations. These functions can be replaced by the
- board driver if neccecary. Those functions are called via pointers in the
+ board driver if necessary. Those functions are called via pointers in the
NAND chip description structure. The board driver can set the functions which
should be replaced by board dependent functions before calling nand_scan().
If the function pointer is NULL on entry to nand_scan() then the pointer
@@ -264,7 +264,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
is set up nand_scan() is called. This function tries to
detect and identify then chip. If a chip is found all the
internal data fields are initialized accordingly.
- The structure(s) have to be zeroed out first and then filled with the neccecary
+ The structure(s) have to be zeroed out first and then filled with the necessary
information about the device.
</para>
<programlisting>
@@ -327,7 +327,7 @@ module_init(board_init);
<sect1 id="Exit_function">
<title>Exit function</title>
<para>
- The exit function is only neccecary if the driver is
+ The exit function is only necessary if the driver is
compiled as a module. It releases all resources which
are held by the chip driver and unregisters the partitions
in the MTD layer.
@@ -494,7 +494,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
in this case. See rts_from4.c and diskonchip.c for
implementation reference. In those cases we must also
use bad block tables on FLASH, because the ECC layout is
- interferring with the bad block marker positions.
+ interfering with the bad block marker positions.
See bad block table support for details.
</para>
</sect2>
@@ -542,7 +542,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
<para>
nand_scan() calls the function nand_default_bbt().
nand_default_bbt() selects appropriate default
- bad block table desriptors depending on the chip information
+ bad block table descriptors depending on the chip information
which was retrieved by nand_scan().
</para>
<para>
@@ -554,7 +554,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
<sect2 id="Flash_based_tables">
<title>Flash based tables</title>
<para>
- It may be desired or neccecary to keep a bad block table in FLASH.
+ It may be desired or necessary to keep a bad block table in FLASH.
For AG-AND chips this is mandatory, as they have no factory marked
bad blocks. They have factory marked good blocks. The marker pattern
is erased when the block is erased to be reused. So in case of
@@ -565,10 +565,10 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
of the blocks.
</para>
<para>
- The blocks in which the tables are stored are procteted against
+ The blocks in which the tables are stored are protected against
accidental access by marking them bad in the memory bad block
table. The bad block table management functions are allowed
- to circumvernt this protection.
+ to circumvent this protection.
</para>
<para>
The simplest way to activate the FLASH based bad block table support
@@ -592,7 +592,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
User defined tables are created by filling out a
nand_bbt_descr structure and storing the pointer in the
nand_chip structure member bbt_td before calling nand_scan().
- If a mirror table is neccecary a second structure must be
+ If a mirror table is necessary a second structure must be
created and a pointer to this structure must be stored
in bbt_md inside the nand_chip structure. If the bbt_md
member is set to NULL then only the main table is used
@@ -666,7 +666,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
<para>
For automatic placement some blocks must be reserved for
bad block table storage. The number of reserved blocks is defined
- in the maxblocks member of the babd block table description structure.
+ in the maxblocks member of the bad block table description structure.
Reserving 4 blocks for mirrored tables should be a reasonable number.
This also limits the number of blocks which are scanned for the bad
block table ident pattern.
@@ -1068,11 +1068,11 @@ in this page</entry>
<chapter id="filesystems">
<title>Filesystem support</title>
<para>
- The NAND driver provides all neccecary functions for a
+ The NAND driver provides all necessary functions for a
filesystem via the MTD interface.
</para>
<para>
- Filesystems must be aware of the NAND pecularities and
+ Filesystems must be aware of the NAND peculiarities and
restrictions. One major restrictions of NAND Flash is, that you cannot
write as often as you want to a page. The consecutive writes to a page,
before erasing it again, are restricted to 1-3 writes, depending on the
@@ -1222,7 +1222,7 @@ in this page</entry>
#define NAND_BBT_VERSION 0x00000100
/* Create a bbt if none axists */
#define NAND_BBT_CREATE 0x00000200
-/* Write bbt if neccecary */
+/* Write bbt if necessary */
#define NAND_BBT_WRITE 0x00001000
/* Read and write back block contents when writing bbt */
#define NAND_BBT_SAVECONTENT 0x00002000
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 80/94] DocBook: fix various typos
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (77 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 79/94] DocBook: fix mtdnand typos Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 81/94] Documenation/laptops: rename and update hpfall.c Sam Asadi
` (13 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Masanari Iida, Randy Dunlap, Linus Torvalds,
sam-the-6
From: Masanari Iida <standby24x7@gmail.com>
This patch fixed spelling typo in various template files
within Documentation/Docbook.
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
Documentation/DocBook/gadget.tmpl | 2 +-
Documentation/DocBook/genericirq.tmpl | 4 ++--
Documentation/DocBook/kernel-locking.tmpl | 2 +-
Documentation/DocBook/libata.tmpl | 6 +++---
Documentation/DocBook/media_api.tmpl | 2 +-
Documentation/DocBook/regulator.tmpl | 2 +-
Documentation/DocBook/uio-howto.tmpl | 4 ++--
Documentation/DocBook/usb.tmpl | 2 +-
Documentation/DocBook/writing-an-alsa-driver.tmpl | 2 +-
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
index 4017f14..2c425d7 100644
--- a/Documentation/DocBook/gadget.tmpl
+++ b/Documentation/DocBook/gadget.tmpl
@@ -708,7 +708,7 @@ hardware level details could be very different.
<para>Systems need specialized hardware support to implement OTG,
notably including a special <emphasis>Mini-AB</emphasis> jack
-and associated transciever to support <emphasis>Dual-Role</emphasis>
+and associated transceiver to support <emphasis>Dual-Role</emphasis>
operation:
they can act either as a host, using the standard
Linux-USB host side driver stack,
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index 46347f6..59fb5c0 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -182,7 +182,7 @@
<para>
Each interrupt is described by an interrupt descriptor structure
irq_desc. The interrupt is referenced by an 'unsigned int' numeric
- value which selects the corresponding interrupt decription structure
+ value which selects the corresponding interrupt description structure
in the descriptor structures array.
The descriptor structure contains status information and pointers
to the interrupt flow method and the interrupt chip structure
@@ -470,7 +470,7 @@ if (desc->irq_data.chip->irq_eoi)
<para>
To avoid copies of identical implementations of IRQ chips the
core provides a configurable generic interrupt chip
- implementation. Developers should check carefuly whether the
+ implementation. Developers should check carefully whether the
generic chip fits their needs before implementing the same
functionality slightly differently themselves.
</para>
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index 19f2a5a..e584ee1 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -1760,7 +1760,7 @@ as it would be on UP.
</para>
<para>
-There is a furthur optimization possible here: remember our original
+There is a further optimization possible here: remember our original
cache code, where there were no reference counts and the caller simply
held the lock whenever using the object? This is still possible: if
you hold the lock, no one can delete the object, so you don't need to
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index deb71ba..d7fcdc5 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -677,7 +677,7 @@ and other resources, etc.
<listitem>
<para>
- ATA_QCFLAG_ACTIVE is clared from qc->flags.
+ ATA_QCFLAG_ACTIVE is cleared from qc->flags.
</para>
</listitem>
@@ -708,7 +708,7 @@ and other resources, etc.
<listitem>
<para>
- qc->waiting is claread & completed (in that order).
+ qc->waiting is cleared & completed (in that order).
</para>
</listitem>
@@ -1163,7 +1163,7 @@ and other resources, etc.
<para>
Once sense data is acquired, this type of errors can be
- handled similary to other SCSI errors. Note that sense data
+ handled similarly to other SCSI errors. Note that sense data
may indicate ATA bus error (e.g. Sense Key 04h HARDWARE ERROR
&& ASC/ASCQ 47h/00h SCSI PARITY ERROR). In such
cases, the error should be considered as an ATA bus error and
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl
index 4decb46..03f9a1f 100644
--- a/Documentation/DocBook/media_api.tmpl
+++ b/Documentation/DocBook/media_api.tmpl
@@ -68,7 +68,7 @@
several digital tv standards. While it is called as DVB API,
in fact it covers several different video standards including
DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated
- to documment support also for DVB-S2, ISDB-T and ISDB-S.</para>
+ to document support also for DVB-S2, ISDB-T and ISDB-S.</para>
<para>The third part covers the Remote Controller API.</para>
<para>The fourth part covers the Media Controller API.</para>
<para>For additional information and for the latest development code,
diff --git a/Documentation/DocBook/regulator.tmpl b/Documentation/DocBook/regulator.tmpl
index 346e552..3b08a08 100644
--- a/Documentation/DocBook/regulator.tmpl
+++ b/Documentation/DocBook/regulator.tmpl
@@ -155,7 +155,7 @@
release regulators. Functions are
provided to <link linkend='API-regulator-enable'>enable</link>
and <link linkend='API-regulator-disable'>disable</link> the
- reguator and to get and set the runtime parameters of the
+ regulator and to get and set the runtime parameters of the
regulator.
</para>
<para>
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index 9561815..bbe9c1f 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -766,10 +766,10 @@ framework to set up sysfs files for this region. Simply leave it alone.
<para>
The dynamic memory regions will be allocated when the UIO device file,
<varname>/dev/uioX</varname> is opened.
- Simiar to static memory resources, the memory region information for
+ Similar to static memory resources, the memory region information for
dynamic regions is then visible via sysfs at
<varname>/sys/class/uio/uioX/maps/mapY/*</varname>.
- The dynmaic memory regions will be freed when the UIO device file is
+ The dynamic memory regions will be freed when the UIO device file is
closed. When no processes are holding the device file open, the address
returned to userspace is ~0.
</para>
diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl
index 8d57c18..85fc0e2 100644
--- a/Documentation/DocBook/usb.tmpl
+++ b/Documentation/DocBook/usb.tmpl
@@ -153,7 +153,7 @@
<listitem><para>The Linux USB API supports synchronous calls for
control and bulk messages.
- It also supports asynchnous calls for all kinds of data transfer,
+ It also supports asynchronous calls for all kinds of data transfer,
using request structures called "URBs" (USB Request Blocks).
</para></listitem>
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index d0056a4..6f639d9 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -5696,7 +5696,7 @@ struct _snd_pcm_runtime {
suspending the PCM operations via
<function>snd_pcm_suspend_all()</function> or
<function>snd_pcm_suspend()</function>. It means that the PCM
- streams are already stoppped when the register snapshot is
+ streams are already stopped when the register snapshot is
taken. But, remember that you don't have to restart the PCM
stream in the resume callback. It'll be restarted via
trigger call with <constant>SNDRV_PCM_TRIGGER_RESUME</constant>
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 81/94] Documenation/laptops: rename and update hpfall.c
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (78 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 80/94] DocBook: fix various typos Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 82/94] ext4: fix a potential deadlock in __ext4_es_shrink() Sam Asadi
` (12 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Pali Rohár, Sonal Santan, Randy Dunlap,
Linus Torvalds, sam-the-6
From: Pali Rohár <pali.rohar@gmail.com>
Dell kernel driver dell-smo8800 provides same freefall interface as hp_accel so
program hpfall.c works also on Dell laptops. So rename it to freefall.c.
Dell driver does not provide hp::hddprotect led so make sure that freefall.c
works also if hp::hddprotect does not exist in sysfs.
Additionally write info to syslog.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Cc: Sonal Santan <sonal.santan@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
Documentation/laptops/00-INDEX | 4 +-
Documentation/laptops/freefall.c | 177 ++++++++++++++++++++++++++++++++++++++
Documentation/laptops/hpfall.c | 146 -------------------------------
3 files changed, 179 insertions(+), 148 deletions(-)
create mode 100644 Documentation/laptops/freefall.c
delete mode 100644 Documentation/laptops/hpfall.c
diff --git a/Documentation/laptops/00-INDEX b/Documentation/laptops/00-INDEX
index d13b9a9..d399ae1 100644
--- a/Documentation/laptops/00-INDEX
+++ b/Documentation/laptops/00-INDEX
@@ -8,8 +8,8 @@ disk-shock-protection.txt
- information on hard disk shock protection.
dslm.c
- Simple Disk Sleep Monitor program
-hpfall.c
- - (HP) laptop accelerometer program for disk protection.
+freefall.c
+ - (HP/DELL) laptop accelerometer program for disk protection.
laptop-mode.txt
- how to conserve battery power using laptop-mode.
sony-laptop.txt
diff --git a/Documentation/laptops/freefall.c b/Documentation/laptops/freefall.c
new file mode 100644
index 0000000..aab2ff0
--- /dev/null
+++ b/Documentation/laptops/freefall.c
@@ -0,0 +1,177 @@
+/* Disk protection for HP/DELL machines.
+ *
+ * Copyright 2008 Eric Piel
+ * Copyright 2009 Pavel Machek <pavel@ucw.cz>
+ * Copyright 2012 Sonal Santan
+ * Copyright 2014 Pali Rohár <pali.rohar@gmail.com>
+ *
+ * GPLv2.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <string.h>
+#include <stdint.h>
+#include <errno.h>
+#include <signal.h>
+#include <sys/mman.h>
+#include <sched.h>
+#include <syslog.h>
+
+static int noled;
+static char unload_heads_path[64];
+static char device_path[32];
+static const char app_name[] = "FREE FALL";
+
+static int set_unload_heads_path(char *device)
+{
+ char devname[64];
+
+ if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0)
+ return -EINVAL;
+ strncpy(devname, device + 5, sizeof(devname) - 1);
+ strncpy(device_path, device, sizeof(device_path) - 1);
+
+ snprintf(unload_heads_path, sizeof(unload_heads_path) - 1,
+ "/sys/block/%s/device/unload_heads", devname);
+ return 0;
+}
+
+static int valid_disk(void)
+{
+ int fd = open(unload_heads_path, O_RDONLY);
+
+ if (fd < 0) {
+ perror(unload_heads_path);
+ return 0;
+ }
+
+ close(fd);
+ return 1;
+}
+
+static void write_int(char *path, int i)
+{
+ char buf[1024];
+ int fd = open(path, O_RDWR);
+
+ if (fd < 0) {
+ perror("open");
+ exit(1);
+ }
+
+ sprintf(buf, "%d", i);
+
+ if (write(fd, buf, strlen(buf)) != strlen(buf)) {
+ perror("write");
+ exit(1);
+ }
+
+ close(fd);
+}
+
+static void set_led(int on)
+{
+ if (noled)
+ return;
+ write_int("/sys/class/leds/hp::hddprotect/brightness", on);
+}
+
+static void protect(int seconds)
+{
+ const char *str = (seconds == 0) ? "Unparked" : "Parked";
+
+ write_int(unload_heads_path, seconds*1000);
+ syslog(LOG_INFO, "%s %s disk head\n", str, device_path);
+}
+
+static int on_ac(void)
+{
+ /* /sys/class/power_supply/AC0/online */
+ return 1;
+}
+
+static int lid_open(void)
+{
+ /* /proc/acpi/button/lid/LID/state */
+ return 1;
+}
+
+static void ignore_me(int signum)
+{
+ protect(0);
+ set_led(0);
+}
+
+int main(int argc, char **argv)
+{
+ int fd, ret;
+ struct stat st;
+ struct sched_param param;
+
+ if (argc == 1)
+ ret = set_unload_heads_path("/dev/sda");
+ else if (argc == 2)
+ ret = set_unload_heads_path(argv[1]);
+ else
+ ret = -EINVAL;
+
+ if (ret || !valid_disk()) {
+ fprintf(stderr, "usage: %s <device> (default: /dev/sda)\n",
+ argv[0]);
+ exit(1);
+ }
+
+ fd = open("/dev/freefall", O_RDONLY);
+ if (fd < 0) {
+ perror("/dev/freefall");
+ return EXIT_FAILURE;
+ }
+
+ if (stat("/sys/class/leds/hp::hddprotect/brightness", &st))
+ noled = 1;
+
+ if (daemon(0, 0) != 0) {
+ perror("daemon");
+ return EXIT_FAILURE;
+ }
+
+ openlog(app_name, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
+
+ param.sched_priority = sched_get_priority_max(SCHED_FIFO);
+ sched_setscheduler(0, SCHED_FIFO, ¶m);
+ mlockall(MCL_CURRENT|MCL_FUTURE);
+
+ signal(SIGALRM, ignore_me);
+
+ for (;;) {
+ unsigned char count;
+
+ ret = read(fd, &count, sizeof(count));
+ alarm(0);
+ if ((ret == -1) && (errno == EINTR)) {
+ /* Alarm expired, time to unpark the heads */
+ continue;
+ }
+
+ if (ret != sizeof(count)) {
+ perror("read");
+ break;
+ }
+
+ protect(21);
+ set_led(1);
+ if (1 || on_ac() || lid_open())
+ alarm(2);
+ else
+ alarm(20);
+ }
+
+ closelog();
+ close(fd);
+ return EXIT_SUCCESS;
+}
diff --git a/Documentation/laptops/hpfall.c b/Documentation/laptops/hpfall.c
deleted file mode 100644
index b85dbba..0000000
--- a/Documentation/laptops/hpfall.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* Disk protection for HP machines.
- *
- * Copyright 2008 Eric Piel
- * Copyright 2009 Pavel Machek <pavel@ucw.cz>
- *
- * GPLv2.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <string.h>
-#include <stdint.h>
-#include <errno.h>
-#include <signal.h>
-#include <sys/mman.h>
-#include <sched.h>
-
-char unload_heads_path[64];
-
-int set_unload_heads_path(char *device)
-{
- char devname[64];
-
- if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0)
- return -EINVAL;
- strncpy(devname, device + 5, sizeof(devname));
-
- snprintf(unload_heads_path, sizeof(unload_heads_path) - 1,
- "/sys/block/%s/device/unload_heads", devname);
- return 0;
-}
-int valid_disk(void)
-{
- int fd = open(unload_heads_path, O_RDONLY);
- if (fd < 0) {
- perror(unload_heads_path);
- return 0;
- }
-
- close(fd);
- return 1;
-}
-
-void write_int(char *path, int i)
-{
- char buf[1024];
- int fd = open(path, O_RDWR);
- if (fd < 0) {
- perror("open");
- exit(1);
- }
- sprintf(buf, "%d", i);
- if (write(fd, buf, strlen(buf)) != strlen(buf)) {
- perror("write");
- exit(1);
- }
- close(fd);
-}
-
-void set_led(int on)
-{
- write_int("/sys/class/leds/hp::hddprotect/brightness", on);
-}
-
-void protect(int seconds)
-{
- write_int(unload_heads_path, seconds*1000);
-}
-
-int on_ac(void)
-{
-// /sys/class/power_supply/AC0/online
-}
-
-int lid_open(void)
-{
-// /proc/acpi/button/lid/LID/state
-}
-
-void ignore_me(void)
-{
- protect(0);
- set_led(0);
-}
-
-int main(int argc, char **argv)
-{
- int fd, ret;
- struct sched_param param;
-
- if (argc == 1)
- ret = set_unload_heads_path("/dev/sda");
- else if (argc == 2)
- ret = set_unload_heads_path(argv[1]);
- else
- ret = -EINVAL;
-
- if (ret || !valid_disk()) {
- fprintf(stderr, "usage: %s <device> (default: /dev/sda)\n",
- argv[0]);
- exit(1);
- }
-
- fd = open("/dev/freefall", O_RDONLY);
- if (fd < 0) {
- perror("/dev/freefall");
- return EXIT_FAILURE;
- }
-
- daemon(0, 0);
- param.sched_priority = sched_get_priority_max(SCHED_FIFO);
- sched_setscheduler(0, SCHED_FIFO, ¶m);
- mlockall(MCL_CURRENT|MCL_FUTURE);
-
- signal(SIGALRM, ignore_me);
-
- for (;;) {
- unsigned char count;
-
- ret = read(fd, &count, sizeof(count));
- alarm(0);
- if ((ret == -1) && (errno == EINTR)) {
- /* Alarm expired, time to unpark the heads */
- continue;
- }
-
- if (ret != sizeof(count)) {
- perror("read");
- break;
- }
-
- protect(21);
- set_led(1);
- if (1 || on_ac() || lid_open())
- alarm(2);
- else
- alarm(20);
- }
-
- close(fd);
- return EXIT_SUCCESS;
-}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 82/94] ext4: fix a potential deadlock in __ext4_es_shrink()
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (79 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 81/94] Documenation/laptops: rename and update hpfall.c Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 83/94] ext4: fix potential null pointer dereference in ext4_free_inode Sam Asadi
` (11 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Theodore Ts'o, stable, Zheng Liu,
sam-the-6
From: Theodore Ts'o <tytso@mit.edu>
This fixes the following lockdep complaint:
[ INFO: possible circular locking dependency detected ]
3.16.0-rc2-mm1+ #7 Tainted: G O
-------------------------------------------------------
kworker/u24:0/4356 is trying to acquire lock:
(&(&sbi->s_es_lru_lock)->rlock){+.+.-.}, at: [<ffffffff81285fff>] __ext4_es_shrink+0x4f/0x2e0
but task is already holding lock:
(&ei->i_es_lock){++++-.}, at: [<ffffffff81286961>] ext4_es_insert_extent+0x71/0x180
which lock already depends on the new lock.
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&ei->i_es_lock);
lock(&(&sbi->s_es_lru_lock)->rlock);
lock(&ei->i_es_lock);
lock(&(&sbi->s_es_lru_lock)->rlock);
*** DEADLOCK ***
6 locks held by kworker/u24:0/4356:
#0: ("writeback"){.+.+.+}, at: [<ffffffff81071d00>] process_one_work+0x180/0x560
#1: ((&(&wb->dwork)->work)){+.+.+.}, at: [<ffffffff81071d00>] process_one_work+0x180/0x560
#2: (&type->s_umount_key#22){++++++}, at: [<ffffffff811a9c74>] grab_super_passive+0x44/0x90
#3: (jbd2_handle){+.+...}, at: [<ffffffff812979f9>] start_this_handle+0x189/0x5f0
#4: (&ei->i_data_sem){++++..}, at: [<ffffffff81247062>] ext4_map_blocks+0x132/0x550
#5: (&ei->i_es_lock){++++-.}, at: [<ffffffff81286961>] ext4_es_insert_extent+0x71/0x180
stack backtrace:
CPU: 0 PID: 4356 Comm: kworker/u24:0 Tainted: G O 3.16.0-rc2-mm1+ #7
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Workqueue: writeback bdi_writeback_workfn (flush-253:0)
ffffffff8213dce0 ffff880014b07538 ffffffff815df0bb 0000000000000007
ffffffff8213e040 ffff880014b07588 ffffffff815db3dd ffff880014b07568
ffff880014b07610 ffff88003b868930 ffff88003b868908 ffff88003b868930
Call Trace:
[<ffffffff815df0bb>] dump_stack+0x4e/0x68
[<ffffffff815db3dd>] print_circular_bug+0x1fb/0x20c
[<ffffffff810a7a3e>] __lock_acquire+0x163e/0x1d00
[<ffffffff815e89dc>] ? retint_restore_args+0xe/0xe
[<ffffffff815ddc7b>] ? __slab_alloc+0x4a8/0x4ce
[<ffffffff81285fff>] ? __ext4_es_shrink+0x4f/0x2e0
[<ffffffff810a8707>] lock_acquire+0x87/0x120
[<ffffffff81285fff>] ? __ext4_es_shrink+0x4f/0x2e0
[<ffffffff8128592d>] ? ext4_es_free_extent+0x5d/0x70
[<ffffffff815e6f09>] _raw_spin_lock+0x39/0x50
[<ffffffff81285fff>] ? __ext4_es_shrink+0x4f/0x2e0
[<ffffffff8119760b>] ? kmem_cache_alloc+0x18b/0x1a0
[<ffffffff81285fff>] __ext4_es_shrink+0x4f/0x2e0
[<ffffffff812869b8>] ext4_es_insert_extent+0xc8/0x180
[<ffffffff812470f4>] ext4_map_blocks+0x1c4/0x550
[<ffffffff8124c4c4>] ext4_writepages+0x6d4/0xd00
...
Reported-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reported-by: Minchan Kim <minchan@kernel.org>
Cc: stable@vger.kernel.org
Cc: Zheng Liu <gnehzuil.liu@gmail.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
fs/ext4/extents_status.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 3f5c188..0b7e28e 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -966,10 +966,10 @@ retry:
continue;
}
- if (ei->i_es_lru_nr == 0 || ei == locked_ei)
+ if (ei->i_es_lru_nr == 0 || ei == locked_ei ||
+ !write_trylock(&ei->i_es_lock))
continue;
- write_lock(&ei->i_es_lock);
shrunk = __es_try_to_reclaim_extents(ei, nr_to_scan);
if (ei->i_es_lru_nr == 0)
list_del_init(&ei->i_es_lru);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 83/94] ext4: fix potential null pointer dereference in ext4_free_inode
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (80 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 82/94] ext4: fix a potential deadlock in __ext4_es_shrink() Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 84/94] parisc: add serial ports of C8000/1GHz machine to hardware database Sam Asadi
` (10 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Namjae Jeon, Ashish Sangwan,
Theodore Ts'o, sam-the-6
From: Namjae Jeon <namjae.jeon@samsung.com>
Fix potential null pointer dereferencing problem caused by e43bb4e612
("ext4: decrement free clusters/inodes counters when block group declared bad")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
fs/ext4/ialloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 0840bf3..5b87fc3 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -338,7 +338,7 @@ out:
fatal = err;
} else {
ext4_error(sb, "bit already cleared for inode %lu", ino);
- if (!EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) {
+ if (gdp && !EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) {
int count;
count = ext4_free_inodes_count(sb, gdp);
percpu_counter_sub(&sbi->s_freeinodes_counter,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 84/94] parisc: add serial ports of C8000/1GHz machine to hardware database
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (81 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 83/94] ext4: fix potential null pointer dereference in ext4_free_inode Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 85/94] parisc: fix fanotify_mark() syscall on 32bit compat kernel Sam Asadi
` (9 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Helge Deller, sam-the-6
From: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # 3.13+
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/parisc/kernel/hardware.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c
index 608716f..af3bc35 100644
--- a/arch/parisc/kernel/hardware.c
+++ b/arch/parisc/kernel/hardware.c
@@ -1210,7 +1210,8 @@ static struct hp_hardware hp_hardware_list[] = {
{HPHW_FIO, 0x004, 0x00320, 0x0, "Metheus Frame Buffer"},
{HPHW_FIO, 0x004, 0x00340, 0x0, "BARCO CX4500 VME Grphx Cnsl"},
{HPHW_FIO, 0x004, 0x00360, 0x0, "Hughes TOG VME FDDI"},
- {HPHW_FIO, 0x076, 0x000AD, 0x00, "Crestone Peak RS-232"},
+ {HPHW_FIO, 0x076, 0x000AD, 0x0, "Crestone Peak Core RS-232"},
+ {HPHW_FIO, 0x077, 0x000AD, 0x0, "Crestone Peak Fast? Core RS-232"},
{HPHW_IOA, 0x185, 0x0000B, 0x00, "Java BC Summit Port"},
{HPHW_IOA, 0x1FF, 0x0000B, 0x00, "Hitachi Ghostview Summit Port"},
{HPHW_IOA, 0x580, 0x0000B, 0x10, "U2-IOA BC Runway Port"},
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 85/94] parisc: fix fanotify_mark() syscall on 32bit compat kernel
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (82 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 84/94] parisc: add serial ports of C8000/1GHz machine to hardware database Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 86/94] parisc: drop unused defines and header includes Sam Asadi
` (8 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Helge Deller, sam-the-6
From: Helge Deller <deller@gmx.de>
On parisc we can not use the existing compat implementation for fanotify_mark()
because for the 64bit mask parameter the higher and lower 32bits are ordered
differently than what the compat function expects from big endian
architectures.
Specifically:
It finally turned out, that on hppa we end up with different assignments
of parameters to kernel arguments depending on if we call the glibc
wrapper function
int fanotify_mark (int __fanotify_fd, unsigned int __flags,
uint64_t __mask, int __dfd, const char *__pathname);
or directly calling the syscall manually
syscall(__NR_fanotify_mark, ...)
Reason is, that the syscall() function is implemented as C-function and
because we now have the sysno as first parameter in front of the other
parameters the compiler will unexpectedly add an empty paramenter in
front of the u64 value to ensure the correct calling alignment for 64bit
values.
This means, on hppa you can't simply use syscall() to call the kernel
fanotify_mark() function directly, but you have to use the glibc
function instead.
This patch fixes the kernel in the hppa-arch specifc coding to adjust
the parameters in a way as if userspace calls the glibc wrapper function
fanotify_mark().
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # 3.13+
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/parisc/kernel/sys_parisc32.c | 10 ++++++++++
arch/parisc/kernel/syscall_table.S | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index bb9f3b6..ec741fe 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -4,6 +4,7 @@
* Copyright (C) 2000-2001 Hewlett Packard Company
* Copyright (C) 2000 John Marvin
* Copyright (C) 2001 Matthew Wilcox
+ * Copyright (C) 2014 Helge Deller <deller@gmx.de>
*
* These routines maintain argument size conversion between 32bit and 64bit
* environment. Based heavily on sys_ia32.c and sys_sparc32.c.
@@ -57,3 +58,12 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
current->comm, current->pid, r20);
return -ENOSYS;
}
+
+asmlinkage long sys32_fanotify_mark(compat_int_t fanotify_fd, compat_uint_t flags,
+ compat_uint_t mask0, compat_uint_t mask1, compat_int_t dfd,
+ const char __user * pathname)
+{
+ return sys_fanotify_mark(fanotify_fd, flags,
+ ((__u64)mask1 << 32) | mask0,
+ dfd, pathname);
+}
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index c5fa7a6..84c5d3a 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -418,7 +418,7 @@
ENTRY_SAME(accept4) /* 320 */
ENTRY_SAME(prlimit64)
ENTRY_SAME(fanotify_init)
- ENTRY_COMP(fanotify_mark)
+ ENTRY_DIFF(fanotify_mark)
ENTRY_COMP(clock_adjtime)
ENTRY_SAME(name_to_handle_at) /* 325 */
ENTRY_COMP(open_by_handle_at)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 86/94] parisc: drop unused defines and header includes
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (83 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 85/94] parisc: fix fanotify_mark() syscall on 32bit compat kernel Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 87/94] clk: spear3xx: Use proper control register offset Sam Asadi
` (7 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Helge Deller, sam-the-6
From: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # 3.13+
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
arch/parisc/kernel/sys_parisc32.c | 36 ------------------------------------
1 file changed, 36 deletions(-)
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index ec741fe..93c1963 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -12,44 +12,8 @@
#include <linux/compat.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/fs.h>
-#include <linux/mm.h>
-#include <linux/file.h>
-#include <linux/signal.h>
-#include <linux/resource.h>
-#include <linux/times.h>
-#include <linux/time.h>
-#include <linux/smp.h>
-#include <linux/sem.h>
-#include <linux/shm.h>
-#include <linux/slab.h>
-#include <linux/uio.h>
-#include <linux/ncp_fs.h>
-#include <linux/poll.h>
-#include <linux/personality.h>
-#include <linux/stat.h>
-#include <linux/highmem.h>
-#include <linux/highuid.h>
-#include <linux/mman.h>
-#include <linux/binfmts.h>
-#include <linux/namei.h>
-#include <linux/vfs.h>
-#include <linux/ptrace.h>
-#include <linux/swap.h>
#include <linux/syscalls.h>
-#include <asm/types.h>
-#include <asm/uaccess.h>
-#include <asm/mmu_context.h>
-
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x) printk x
-#else
-#define DBG(x)
-#endif
asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
int r22, int r21, int r20)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 87/94] clk: spear3xx: Use proper control register offset
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (84 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 86/94] parisc: drop unused defines and header includes Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 88/94] clk: spear3xx: Set proper clock parent of uart1/2 Sam Asadi
` (6 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Thomas Gleixner, stable, Mike Turquette,
sam-the-6
From: Thomas Gleixner <tglx@linutronix.de>
The control register is at offset 0x10, not 0x0. This is wreckaged
since commit 5df33a62c (SPEAr: Switch to common clock framework).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/spear/spear3xx_clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/spear/spear3xx_clock.c b/drivers/clk/spear/spear3xx_clock.c
index c2d2043..125eba8 100644
--- a/drivers/clk/spear/spear3xx_clock.c
+++ b/drivers/clk/spear/spear3xx_clock.c
@@ -211,7 +211,7 @@ static inline void spear310_clk_init(void) { }
/* array of all spear 320 clock lookups */
#ifdef CONFIG_MACH_SPEAR320
-#define SPEAR320_CONTROL_REG (soc_config_base + 0x0000)
+#define SPEAR320_CONTROL_REG (soc_config_base + 0x0010)
#define SPEAR320_EXT_CTRL_REG (soc_config_base + 0x0018)
#define SPEAR320_UARTX_PCLK_MASK 0x1
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 88/94] clk: spear3xx: Set proper clock parent of uart1/2
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (85 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 87/94] clk: spear3xx: Use proper control register offset Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 89/94] Linux 3.16-rc5 Sam Asadi
` (5 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Thomas Gleixner, Mike Turquette, sam-the-6
From: Thomas Gleixner <tglx@linutronix.de>
The uarts only work when the parent is ras_ahb_clk. The stale 3.5
based ST tree does this in the board file.
Add it to the clk init function. Not pretty, but the mess there is
amazing anyway.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/clk/spear/spear3xx_clock.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/spear/spear3xx_clock.c b/drivers/clk/spear/spear3xx_clock.c
index 125eba8..bb5f387 100644
--- a/drivers/clk/spear/spear3xx_clock.c
+++ b/drivers/clk/spear/spear3xx_clock.c
@@ -245,7 +245,8 @@ static const char *smii0_parents[] = { "smii_125m_pad", "ras_pll2_clk",
"ras_syn0_gclk", };
static const char *uartx_parents[] = { "ras_syn1_gclk", "ras_apb_clk", };
-static void __init spear320_clk_init(void __iomem *soc_config_base)
+static void __init spear320_clk_init(void __iomem *soc_config_base,
+ struct clk *ras_apb_clk)
{
struct clk *clk;
@@ -342,6 +343,8 @@ static void __init spear320_clk_init(void __iomem *soc_config_base)
SPEAR320_CONTROL_REG, UART1_PCLK_SHIFT, UART1_PCLK_MASK,
0, &_lock);
clk_register_clkdev(clk, NULL, "a3000000.serial");
+ /* Enforce ras_apb_clk */
+ clk_set_parent(clk, ras_apb_clk);
clk = clk_register_mux(NULL, "uart2_clk", uartx_parents,
ARRAY_SIZE(uartx_parents),
@@ -349,6 +352,8 @@ static void __init spear320_clk_init(void __iomem *soc_config_base)
SPEAR320_EXT_CTRL_REG, SPEAR320_UART2_PCLK_SHIFT,
SPEAR320_UARTX_PCLK_MASK, 0, &_lock);
clk_register_clkdev(clk, NULL, "a4000000.serial");
+ /* Enforce ras_apb_clk */
+ clk_set_parent(clk, ras_apb_clk);
clk = clk_register_mux(NULL, "uart3_clk", uartx_parents,
ARRAY_SIZE(uartx_parents),
@@ -379,12 +384,12 @@ static void __init spear320_clk_init(void __iomem *soc_config_base)
clk_register_clkdev(clk, NULL, "60100000.serial");
}
#else
-static inline void spear320_clk_init(void __iomem *soc_config_base) { }
+static inline void spear320_clk_init(void __iomem *sb, struct clk *rc) { }
#endif
void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_base)
{
- struct clk *clk, *clk1;
+ struct clk *clk, *clk1, *ras_apb_clk;
clk = clk_register_fixed_rate(NULL, "osc_32k_clk", NULL, CLK_IS_ROOT,
32000);
@@ -613,6 +618,7 @@ void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_
clk = clk_register_gate(NULL, "ras_apb_clk", "apb_clk", 0, RAS_CLK_ENB,
RAS_APB_CLK_ENB, 0, &_lock);
clk_register_clkdev(clk, "ras_apb_clk", NULL);
+ ras_apb_clk = clk;
clk = clk_register_gate(NULL, "ras_32k_clk", "osc_32k_clk", 0,
RAS_CLK_ENB, RAS_32K_CLK_ENB, 0, &_lock);
@@ -659,5 +665,5 @@ void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_
else if (of_machine_is_compatible("st,spear310"))
spear310_clk_init();
else if (of_machine_is_compatible("st,spear320"))
- spear320_clk_init(soc_config_base);
+ spear320_clk_init(soc_config_base, ras_apb_clk);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 89/94] Linux 3.16-rc5
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (86 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 88/94] clk: spear3xx: Set proper clock parent of uart1/2 Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:37 ` Valdis.Kletnieks
2014-07-15 17:01 ` [PATCH 90/94] Staging: comedi: 8253.h fixed by removing 'return' from generic func Sam Asadi
` (4 subsequent siblings)
92 siblings, 1 reply; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Linus Torvalds, sam-the-6
From: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 2167084..f3c543d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
VERSION = 3
PATCHLEVEL = 16
SUBLEVEL = 0
-EXTRAVERSION = -rc4
+EXTRAVERSION = -rc5
NAME = Shuffling Zombie Juror
# *DOCUMENTATION*
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 90/94] Staging: comedi: 8253.h fixed by removing 'return' from generic func
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (87 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 89/94] Linux 3.16-rc5 Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 91/94] Staging: comedi: 8255: fixed by adding an empthy line Sam Asadi
` (3 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Sam Asadi
Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
modified: drivers/staging/comedi/drivers/8253.h
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/staging/comedi/drivers/8253.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h
index 5829b46..f6b8607 100644
--- a/drivers/staging/comedi/drivers/8253.h
+++ b/drivers/staging/comedi/drivers/8253.h
@@ -55,7 +55,7 @@ static inline void i8253_cascade_ns_to_timer(int i8253_osc_base,
/* check for overflow */
divider > div1 && divider > div2 &&
divider * i8253_osc_base > divider &&
- divider * i8253_osc_base > i8253_osc_base) {
+ divider * i8253_osc_base > i8253_osc_base) {
return;
}
@@ -118,7 +118,6 @@ static inline void i8253_cascade_ns_to_timer(int i8253_osc_base,
/* masking is done since counter maps zero to 0x10000 */
*d1 = div1 & 0xffff;
*d2 = div2 & 0xffff;
- return;
}
#ifndef CMDTEST
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 91/94] Staging: comedi: 8255: fixed by adding an empthy line
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (88 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 90/94] Staging: comedi: 8253.h fixed by removing 'return' from generic func Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 92/94] Staging: comedi: adl_pci9118: fixed style issues Sam Asadi
` (2 subsequent siblings)
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Sam Asadi
fixed a coding style issue.
Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
modified: drivers/staging/comedi/drivers/8255.c
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/staging/comedi/drivers/8255.c | 150 ++++++++++++++++-----------------
1 file changed, 74 insertions(+), 76 deletions(-)
diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c
index 46113a3..de273c7 100644
--- a/drivers/staging/comedi/drivers/8255.c
+++ b/drivers/staging/comedi/drivers/8255.c
@@ -1,77 +1,73 @@
/*
- comedi/drivers/8255.c
- Driver for 8255
-
- COMEDI - Linux Control and Measurement Device Interface
- Copyright (C) 1998 David A. Schleef <ds@schleef.org>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ comedi/drivers/8255.c
+ Driver for 8255
+
+ COMEDI - Linux Control and Measurement Device Interface
+ Copyright (C) 1998 David A. Schleef <ds@schleef.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ Driver: 8255
+ Description: generic 8255 support
+ Devices: [standard] 8255 (8255)
+ Author: ds
+ Status: works
+ Updated: Fri, 7 Jun 2002 12:56:45 -0700
+
+ The classic in digital I/O. The 8255 appears in Comedi as a single
+ digital I/O subdevice with 24 channels. The channel 0 corresponds
+ to the 8255's port A, bit 0; channel 23 corresponds to port C, bit
+ 7. Direction configuration is done in blocks, with channels 0-7,
+ 8-15, 16-19, and 20-23 making up the 4 blocks. The only 8255 mode
+ supported is mode 0.
+
+ You should enable compilation this driver if you plan to use a board
+ that has an 8255 chip. For multifunction boards, the main driver will
+ configure the 8255 subdevice automatically.
+
+ This driver also works independently with ISA and PCI cards that
+ directly map the 8255 registers to I/O ports, including cards with
+ multiple 8255 chips. To configure the driver for such a card, the
+ option list should be a list of the I/O port bases for each of the
+ 8255 chips. For example,
+
+ comedi_config /dev/comedi0 8255 0x200,0x204,0x208,0x20c
+
+ Note that most PCI 8255 boards do NOT work with this driver, and
+ need a separate driver as a wrapper. For those that do work, the
+ I/O port base address can be found in the output of 'lspci -v'.
+
+ This file contains an exported subdevice for driving an 8255.
+
+ To use this subdevice as part of another driver, you need to
+ set up the subdevice in the attach function of the driver by
+ calling:
+
+ subdev_8255_init(device, subdevice, io_function, iobase)
+
+ device and subdevice are pointers to the device and subdevice
+ structures. io_function will be called to provide the
+ low-level input/output to the device, i.e., actual register
+ access. io_function will be called with the value of iobase
+ as the last parameter. If the 8255 device is mapped as 4
+ consecutive I/O ports, you can use NULL for io_function
+ and the I/O port base for iobase, and an internal function will
+ handle the register access.
+
+ In addition, if the main driver handles interrupts, you can
+ enable commands on the subdevice by calling subdev_8255_init_irq()
+ instead. Then, when you get an interrupt that is likely to be
+ from the 8255, you should call subdev_8255_interrupt(), which
+ will copy the latched value to a Comedi buffer.
*/
-/*
-Driver: 8255
-Description: generic 8255 support
-Devices: [standard] 8255 (8255)
-Author: ds
-Status: works
-Updated: Fri, 7 Jun 2002 12:56:45 -0700
-
-The classic in digital I/O. The 8255 appears in Comedi as a single
-digital I/O subdevice with 24 channels. The channel 0 corresponds
-to the 8255's port A, bit 0; channel 23 corresponds to port C, bit
-7. Direction configuration is done in blocks, with channels 0-7,
-8-15, 16-19, and 20-23 making up the 4 blocks. The only 8255 mode
-supported is mode 0.
-
-You should enable compilation this driver if you plan to use a board
-that has an 8255 chip. For multifunction boards, the main driver will
-configure the 8255 subdevice automatically.
-
-This driver also works independently with ISA and PCI cards that
-directly map the 8255 registers to I/O ports, including cards with
-multiple 8255 chips. To configure the driver for such a card, the
-option list should be a list of the I/O port bases for each of the
-8255 chips. For example,
-
- comedi_config /dev/comedi0 8255 0x200,0x204,0x208,0x20c
-
-Note that most PCI 8255 boards do NOT work with this driver, and
-need a separate driver as a wrapper. For those that do work, the
-I/O port base address can be found in the output of 'lspci -v'.
-
-*/
-
-/*
- This file contains an exported subdevice for driving an 8255.
-
- To use this subdevice as part of another driver, you need to
- set up the subdevice in the attach function of the driver by
- calling:
-
- subdev_8255_init(device, subdevice, io_function, iobase)
-
- device and subdevice are pointers to the device and subdevice
- structures. io_function will be called to provide the
- low-level input/output to the device, i.e., actual register
- access. io_function will be called with the value of iobase
- as the last parameter. If the 8255 device is mapped as 4
- consecutive I/O ports, you can use NULL for io_function
- and the I/O port base for iobase, and an internal function will
- handle the register access.
-
- In addition, if the main driver handles interrupts, you can
- enable commands on the subdevice by calling subdev_8255_init_irq()
- instead. Then, when you get an interrupt that is likely to be
- from the 8255, you should call subdev_8255_interrupt(), which
- will copy the latched value to a Comedi buffer.
- */
#include <linux/module.h>
#include "../comedidev.h"
@@ -94,6 +90,7 @@ I/O port base address can be found in the output of 'lspci -v'.
struct subdev_8255_private {
unsigned long iobase;
+
int (*io)(int, int, int, unsigned long);
};
@@ -102,9 +99,8 @@ static int subdev_8255_io(int dir, int port, int data, unsigned long iobase)
if (dir) {
outb(data, iobase + port);
return 0;
- } else {
+ } else
return inb(iobase + port);
- }
}
void subdev_8255_interrupt(struct comedi_device *dev,
@@ -309,9 +305,9 @@ EXPORT_SYMBOL_GPL(subdev_8255_init_irq);
/*
- Start of the 8255 standalone device
+ Start of the 8255 standalone device
- */
+*/
static int dev_8255_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
@@ -373,8 +369,10 @@ static struct comedi_driver dev_8255_driver = {
.attach = dev_8255_attach,
.detach = dev_8255_detach,
};
+
module_comedi_driver(dev_8255_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");
MODULE_LICENSE("GPL");
+
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 92/94] Staging: comedi: adl_pci9118: fixed style issues
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (89 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 91/94] Staging: comedi: 8255: fixed by adding an empthy line Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 93/94] Staging: comedi: 3 files revised " Sam Asadi
2014-07-15 17:01 ` [PATCH 94/94] Staging: commedi: 8253.h: style issue fixed Sam Asadi
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Sam Asadi
several style issues fixed.
Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
modified: drivers/staging/comedi/drivers/adl_pci9118.c
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/staging/comedi/drivers/adl_pci9118.c | 124 +++++++++++++-------------
1 file changed, 62 insertions(+), 62 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
index 59a65cb..7139f87 100644
--- a/drivers/staging/comedi/drivers/adl_pci9118.c
+++ b/drivers/staging/comedi/drivers/adl_pci9118.c
@@ -8,59 +8,63 @@
* Author: Michal Dobes <dobes@tesnet.cz>
*
*/
-/*
-Driver: adl_pci9118
-Description: Adlink PCI-9118DG, PCI-9118HG, PCI-9118HR
-Author: Michal Dobes <dobes@tesnet.cz>
-Devices: [ADLink] PCI-9118DG (pci9118dg), PCI-9118HG (pci9118hg),
- PCI-9118HR (pci9118hr)
-Status: works
-
-This driver supports AI, AO, DI and DO subdevices.
-AI subdevice supports cmd and insn interface,
-other subdevices support only insn interface.
-For AI:
-- If cmd->scan_begin_src=TRIG_EXT then trigger input is TGIN (pin 46).
-- If cmd->convert_src=TRIG_EXT then trigger input is EXTTRG (pin 44).
-- If cmd->start_src/stop_src=TRIG_EXT then trigger input is TGIN (pin 46).
-- It is not necessary to have cmd.scan_end_arg=cmd.chanlist_len but
- cmd.scan_end_arg modulo cmd.chanlist_len must by 0.
-- If return value of cmdtest is 5 then you've bad channel list
- (it isn't possible mixture S.E. and DIFF inputs or bipolar and unipolar
- ranges).
-
-There are some hardware limitations:
-a) You cann't use mixture of unipolar/bipoar ranges or differencial/single
- ended inputs.
-b) DMA transfers must have the length aligned to two samples (32 bit),
- so there is some problems if cmd->chanlist_len is odd. This driver tries
- bypass this with adding one sample to the end of the every scan and discard
- it on output but this cann't be used if cmd->scan_begin_src=TRIG_FOLLOW
- and is used flag TRIG_WAKE_EOS, then driver switch to interrupt driven mode
- with interrupt after every sample.
-c) If isn't used DMA then you can use only mode where
- cmd->scan_begin_src=TRIG_FOLLOW.
-
-Configuration options:
- [0] - PCI bus of device (optional)
- [1] - PCI slot of device (optional)
- If bus/slot is not specified, then first available PCI
- card will be used.
- [2] - 0= standard 8 DIFF/16 SE channels configuration
- n = external multiplexer connected, 1 <= n <= 256
- [3] - 0=autoselect DMA or EOC interrupts operation
- 1 = disable DMA mode
- 3 = disable DMA and INT, only insn interface will work
- [4] - sample&hold signal - card can generate signal for external S&H board
- 0 = use SSHO(pin 45) signal is generated in onboard hardware S&H logic
- 0 != use ADCHN7(pin 23) signal is generated from driver, number say how
- long delay is requested in ns and sign polarity of the hold
- (in this case external multiplexor can serve only 128 channels)
- [5] - 0=stop measure on all hardware errors
- 2 | = ignore ADOR - A/D Overrun status
- 8|=ignore Bover - A/D Burst Mode Overrun status
- 256|=ignore nFull - A/D FIFO Full status
+/*
+ Driver: adl_pci9118
+ Description: Adlink PCI-9118DG, PCI-9118HG, PCI-9118HR
+ Author: Michal Dobes <dobes@tesnet.cz>
+ Devices: [ADLink] PCI-9118DG (pci9118dg), PCI-9118HG (pci9118hg),
+ PCI-9118HR (pci9118hr)
+ Status: works
+
+ This driver supports AI, AO, DI and DO subdevices.
+ AI subdevice supports cmd and insn interface,
+ other subdevices support only insn interface.
+ For AI:
+ - If cmd->scan_begin_src=TRIG_EXT then trigger input is TGIN (pin 46).
+ - If cmd->convert_src=TRIG_EXT then trigger input is EXTTRG (pin 44).
+ - If cmd->start_src/stop_src=TRIG_EXT then trigger input is TGIN (pin 46).
+ - It is not necessary to have cmd.scan_end_arg=cmd.chanlist_len but
+ cmd.scan_end_arg modulo cmd.chanlist_len must by 0.
+ - If return value of cmdtest is 5 then you've bad channel list
+ (it isn't possible mixture S.E. and DIFF inputs or bipolar and unipolar
+ ranges).
+
+ There are some hardware limitations:
+ a) You cann't use mixture of unipolar/bipoar ranges or differencial/single
+ ended inputs.
+ b) DMA transfers must have the length aligned to two samples (32 bit),
+ so there is some problems if cmd->chanlist_len is odd. This driver
+ tries bypass this with adding one sample to the end of the every scan
+ and discard it on output but this cann't be used if
+ cmd->scan_begin_src=TRIG_FOLLOW and is used flag TRIG_WAKE_EOS, then
+ driver switch to interrupt driven mode with interrupt after every
+ sample.
+ c) If isn't used DMA then you can use only mode where
+ cmd->scan_begin_src=TRIG_FOLLOW.
+
+ Configuration options:
+ [0] - PCI bus of device (optional)
+ [1] - PCI slot of device (optional)
+ If bus/slot is not specified, then first available PCI
+ card will be used.
+ [2] - 0= standard 8 DIFF/16 SE channels configuration
+ n = external multiplexer connected, 1 <= n <= 256
+ [3] - 0=autoselect DMA or EOC interrupts operation
+ 1 = disable DMA mode
+ 3 = disable DMA and INT, only insn interface will work
+ [4] - sample&hold signal - card can generate signal for external
+ S&H board
+ 0 = use SSHO(pin 45) signal is generated in onboard hardware
+ S&H logic
+ 0 != use ADCHN7(pin 23) signal is generated from driver, number
+ say how long delay is requested in ns and sign polarity of
+ the hold (in this case external multiplexor can serve only
+ 128 channels)
+ [5] - 0=stop measure on all hardware errors
+ 2 | = ignore ADOR - A/D Overrun status
+ 8|=ignore Bover - A/D Burst Mode Overrun status
+ 256|=ignore nFull - A/D FIFO Full status
*/
/*
@@ -346,7 +350,7 @@ struct pci9118_private {
* on external start
*/
unsigned short ao_data[2]; /* data output buffer */
- char dma_doublebuf; /* we can use double buffering */
+ char dma_doublebuf; /* we can use double buffering */
unsigned int dma_actbuf; /* which buffer is used now */
unsigned short *dmabuf_virt[2]; /*
* pointers to begin of
@@ -399,7 +403,7 @@ static int check_channel_list(struct comedi_device *dev,
}
if ((frontadd + n_chan + backadd) > s->len_chanlist) {
comedi_error(dev,
- "range/channel list is too long for actual configuration!\n");
+ "range/channel list is too long for actual configuration!\n");
return 0;
}
@@ -412,22 +416,19 @@ static int check_channel_list(struct comedi_device *dev,
if ((CR_AREF(chanlist[i]) == AREF_DIFF) !=
(differencial)) {
comedi_error(dev,
- "Differencial and single ended "
- "inputs can't be mixtured!");
+ "Differencial and single ended inputs can't be mixtured!");
return 0;
}
if ((CR_RANGE(chanlist[i]) < PCI9118_BIPOLAR_RANGES) !=
(bipolar)) {
comedi_error(dev,
- "Bipolar and unipolar ranges "
- "can't be mixtured!");
+ "Bipolar and unipolar ranges can't be mixtured!");
return 0;
}
if (!devpriv->usemux && differencial &&
(CR_CHAN(chanlist[i]) >= this_board->n_aichand)) {
comedi_error(dev,
- "If AREF_DIFF is used then is "
- "available only first 8 channels!");
+ "If AREF_DIFF is used then is available only first 8 channels!");
return 0;
}
}
@@ -1678,8 +1679,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
/* double timed action */
if (!devpriv->usedma) {
comedi_error(dev,
- "cmd->scan_begin_src=TRIG_TIMER works "
- "only with bus mastering!");
+ "cmd->scan_begin_src=TRIG_TIMER works only with bus mastering!");
return -EIO;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 93/94] Staging: comedi: 3 files revised fixed style issues
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (90 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 92/94] Staging: comedi: adl_pci9118: fixed style issues Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
2014-07-15 17:01 ` [PATCH 94/94] Staging: commedi: 8253.h: style issue fixed Sam Asadi
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Sam Asadi
3 files in 'staging/comedi/drivers/' revised again
and style issues fixed
Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
modified: drivers/staging/comedi/drivers/8253.h
modified: drivers/staging/comedi/drivers/8255.c
modified: drivers/staging/comedi/drivers/adl_pci9118.c
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/staging/comedi/drivers/8253.h | 34 +++---
drivers/staging/comedi/drivers/8255.c | 154 +++++++++++++-------------
drivers/staging/comedi/drivers/adl_pci9118.c | 140 +++++++++++------------
3 files changed, 167 insertions(+), 161 deletions(-)
diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h
index f6b8607..31d0fc9 100644
--- a/drivers/staging/comedi/drivers/8253.h
+++ b/drivers/staging/comedi/drivers/8253.h
@@ -1,20 +1,20 @@
/*
- comedi/drivers/8253.h
- Header file for 8253
-
- COMEDI - Linux Control and Measurement Device Interface
- Copyright (C) 2000 David A. Schleef <ds@schleef.org>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-*/
+ * comedi/drivers/8253.h
+ * Header file for 8253
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 2000 David A. Schleef <ds@schleef.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
#ifndef _8253_H
#define _8253_H
@@ -55,7 +55,7 @@ static inline void i8253_cascade_ns_to_timer(int i8253_osc_base,
/* check for overflow */
divider > div1 && divider > div2 &&
divider * i8253_osc_base > divider &&
- divider * i8253_osc_base > i8253_osc_base) {
+ divider * i8253_osc_base > i8253_osc_base) {
return;
}
diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c
index de273c7..246bf30 100644
--- a/drivers/staging/comedi/drivers/8255.c
+++ b/drivers/staging/comedi/drivers/8255.c
@@ -1,73 +1,77 @@
/*
- comedi/drivers/8255.c
- Driver for 8255
-
- COMEDI - Linux Control and Measurement Device Interface
- Copyright (C) 1998 David A. Schleef <ds@schleef.org>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- Driver: 8255
- Description: generic 8255 support
- Devices: [standard] 8255 (8255)
- Author: ds
- Status: works
- Updated: Fri, 7 Jun 2002 12:56:45 -0700
-
- The classic in digital I/O. The 8255 appears in Comedi as a single
- digital I/O subdevice with 24 channels. The channel 0 corresponds
- to the 8255's port A, bit 0; channel 23 corresponds to port C, bit
- 7. Direction configuration is done in blocks, with channels 0-7,
- 8-15, 16-19, and 20-23 making up the 4 blocks. The only 8255 mode
- supported is mode 0.
-
- You should enable compilation this driver if you plan to use a board
- that has an 8255 chip. For multifunction boards, the main driver will
- configure the 8255 subdevice automatically.
-
- This driver also works independently with ISA and PCI cards that
- directly map the 8255 registers to I/O ports, including cards with
- multiple 8255 chips. To configure the driver for such a card, the
- option list should be a list of the I/O port bases for each of the
- 8255 chips. For example,
-
- comedi_config /dev/comedi0 8255 0x200,0x204,0x208,0x20c
-
- Note that most PCI 8255 boards do NOT work with this driver, and
- need a separate driver as a wrapper. For those that do work, the
- I/O port base address can be found in the output of 'lspci -v'.
-
- This file contains an exported subdevice for driving an 8255.
-
- To use this subdevice as part of another driver, you need to
- set up the subdevice in the attach function of the driver by
- calling:
-
- subdev_8255_init(device, subdevice, io_function, iobase)
-
- device and subdevice are pointers to the device and subdevice
- structures. io_function will be called to provide the
- low-level input/output to the device, i.e., actual register
- access. io_function will be called with the value of iobase
- as the last parameter. If the 8255 device is mapped as 4
- consecutive I/O ports, you can use NULL for io_function
- and the I/O port base for iobase, and an internal function will
- handle the register access.
-
- In addition, if the main driver handles interrupts, you can
- enable commands on the subdevice by calling subdev_8255_init_irq()
- instead. Then, when you get an interrupt that is likely to be
- from the 8255, you should call subdev_8255_interrupt(), which
- will copy the latched value to a Comedi buffer.
-*/
+ * comedi/drivers/8255.c
+ * Driver for 8255
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 1998 David A. Schleef <ds@schleef.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/*
+ * Driver: 8255
+ * Description: generic 8255 support
+ * Devices: [standard] 8255 (8255)
+ * Author: ds
+ * Status: works
+ * Updated: Fri, 7 Jun 2002 12:56:45 -0700
+ *
+ * The classic in digital I/O. The 8255 appears in Comedi as a single
+ * digital I/O subdevice with 24 channels. The channel 0 corresponds
+ * to the 8255's port A, bit 0; channel 23 corresponds to port C, bit
+ * 7. Direction configuration is done in blocks, with channels 0-7,
+ * 8-15, 16-19, and 20-23 making up the 4 blocks. The only 8255 mode
+ * supported is mode 0.
+ *
+ * You should enable compilation this driver if you plan to use a board
+ * that has an 8255 chip. For multifunction boards, the main driver will
+ * configure the 8255 subdevice automatically.
+ *
+ * This driver also works independently with ISA and PCI cards that
+ * directly map the 8255 registers to I/O ports, including cards with
+ * multiple 8255 chips. To configure the driver for such a card, the
+ * option list should be a list of the I/O port bases for each of the
+ * 8255 chips. For example,
+ *
+ * comedi_config /dev/comedi0 8255 0x200,0x204,0x208,0x20c
+ *
+ * Note that most PCI 8255 boards do NOT work with this driver, and
+ * need a separate driver as a wrapper. For those that do work, the
+ * I/O port base address can be found in the output of 'lspci -v'.
+ */
+
+/*
+ * This file contains an exported subdevice for driving an 8255.
+ *
+ * To use this subdevice as part of another driver, you need to
+ * set up the subdevice in the attach function of the driver by
+ * calling:
+ *
+ * subdev_8255_init(device, subdevice, io_function, iobase)
+ *
+ * device and subdevice are pointers to the device and subdevice
+ * structures. io_function will be called to provide the
+ * low-level input/output to the device, i.e., actual register
+ * access. io_function will be called with the value of iobase
+ * as the last parameter. If the 8255 device is mapped as 4
+ * consecutive I/O ports, you can use NULL for io_function
+ * and the I/O port base for iobase, and an internal function will
+ * handle the register access.
+ *
+ * In addition, if the main driver handles interrupts, you can
+ * enable commands on the subdevice by calling subdev_8255_init_irq()
+ * instead. Then, when you get an interrupt that is likely to be
+ * from the 8255, you should call subdev_8255_interrupt(), which
+ * will copy the latched value to a Comedi buffer.
+ */
#include <linux/module.h>
#include "../comedidev.h"
@@ -99,8 +103,9 @@ static int subdev_8255_io(int dir, int port, int data, unsigned long iobase)
if (dir) {
outb(data, iobase + port);
return 0;
- } else
+ } else {
return inb(iobase + port);
+ }
}
void subdev_8255_interrupt(struct comedi_device *dev,
@@ -304,10 +309,10 @@ int subdev_8255_init_irq(struct comedi_device *dev, struct comedi_subdevice *s,
EXPORT_SYMBOL_GPL(subdev_8255_init_irq);
/*
-
- Start of the 8255 standalone device
-
-*/
+ *
+ * Start of the 8255 standalone device
+ *
+ */
static int dev_8255_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
@@ -375,4 +380,3 @@ module_comedi_driver(dev_8255_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");
MODULE_LICENSE("GPL");
-
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
index 7139f87..f23176e 100644
--- a/drivers/staging/comedi/drivers/adl_pci9118.c
+++ b/drivers/staging/comedi/drivers/adl_pci9118.c
@@ -1,71 +1,72 @@
/*
- * comedi/drivers/adl_pci9118.c
+ * comedi/drivers/adl_pci9118.c
*
- * hardware driver for ADLink cards:
- * card: PCI-9118DG, PCI-9118HG, PCI-9118HR
- * driver: pci9118dg, pci9118hg, pci9118hr
+ * hardware driver for ADLink cards:
+ * card: PCI-9118DG, PCI-9118HG, PCI-9118HR
+ * driver: pci9118dg, pci9118hg, pci9118hr
*
* Author: Michal Dobes <dobes@tesnet.cz>
*
-*/
+ */
/*
- Driver: adl_pci9118
- Description: Adlink PCI-9118DG, PCI-9118HG, PCI-9118HR
- Author: Michal Dobes <dobes@tesnet.cz>
- Devices: [ADLink] PCI-9118DG (pci9118dg), PCI-9118HG (pci9118hg),
- PCI-9118HR (pci9118hr)
- Status: works
-
- This driver supports AI, AO, DI and DO subdevices.
- AI subdevice supports cmd and insn interface,
- other subdevices support only insn interface.
- For AI:
- - If cmd->scan_begin_src=TRIG_EXT then trigger input is TGIN (pin 46).
- - If cmd->convert_src=TRIG_EXT then trigger input is EXTTRG (pin 44).
- - If cmd->start_src/stop_src=TRIG_EXT then trigger input is TGIN (pin 46).
- - It is not necessary to have cmd.scan_end_arg=cmd.chanlist_len but
- cmd.scan_end_arg modulo cmd.chanlist_len must by 0.
- - If return value of cmdtest is 5 then you've bad channel list
- (it isn't possible mixture S.E. and DIFF inputs or bipolar and unipolar
- ranges).
-
- There are some hardware limitations:
- a) You cann't use mixture of unipolar/bipoar ranges or differencial/single
- ended inputs.
- b) DMA transfers must have the length aligned to two samples (32 bit),
- so there is some problems if cmd->chanlist_len is odd. This driver
- tries bypass this with adding one sample to the end of the every scan
- and discard it on output but this cann't be used if
- cmd->scan_begin_src=TRIG_FOLLOW and is used flag TRIG_WAKE_EOS, then
- driver switch to interrupt driven mode with interrupt after every
- sample.
- c) If isn't used DMA then you can use only mode where
- cmd->scan_begin_src=TRIG_FOLLOW.
-
- Configuration options:
- [0] - PCI bus of device (optional)
- [1] - PCI slot of device (optional)
- If bus/slot is not specified, then first available PCI
- card will be used.
- [2] - 0= standard 8 DIFF/16 SE channels configuration
- n = external multiplexer connected, 1 <= n <= 256
- [3] - 0=autoselect DMA or EOC interrupts operation
- 1 = disable DMA mode
- 3 = disable DMA and INT, only insn interface will work
- [4] - sample&hold signal - card can generate signal for external
- S&H board
- 0 = use SSHO(pin 45) signal is generated in onboard hardware
- S&H logic
- 0 != use ADCHN7(pin 23) signal is generated from driver, number
- say how long delay is requested in ns and sign polarity of
- the hold (in this case external multiplexor can serve only
- 128 channels)
- [5] - 0=stop measure on all hardware errors
- 2 | = ignore ADOR - A/D Overrun status
- 8|=ignore Bover - A/D Burst Mode Overrun status
- 256|=ignore nFull - A/D FIFO Full status
-*/
+ * Driver: adl_pci9118
+ * Description: Adlink PCI-9118DG, PCI-9118HG, PCI-9118HR
+ * Author: Michal Dobes <dobes@tesnet.cz>
+ * Devices: [ADLink] PCI-9118DG (pci9118dg), PCI-9118HG (pci9118hg),
+ * PCI-9118HR (pci9118hr)
+ * Status: works
+ *
+ * This driver supports AI, AO, DI and DO subdevices.
+ * AI subdevice supports cmd and insn interface,
+ * other subdevices support only insn interface.
+ * For AI:
+ * - If cmd->scan_begin_src=TRIG_EXT then trigger input is TGIN (pin 46).
+ * - If cmd->convert_src=TRIG_EXT then trigger input is EXTTRG (pin 44).
+ * - If cmd->start_src/stop_src=TRIG_EXT then trigger input is TGIN
+ * (pin 46).
+ * - It is not necessary to have cmd.scan_end_arg=cmd.chanlist_len but
+ * cmd.scan_end_arg modulo cmd.chanlist_len must by 0.
+ * - If return value of cmdtest is 5 then you've bad channel list
+ * (it isn't possible mixture S.E. and DIFF inputs or bipolar and
+ * unipolar ranges).
+ *
+ * There are some hardware limitations:
+ * a) You cann't use mixture of unipolar/bipoar ranges or
+ * differencial/single ended inputs.
+ * b) DMA transfers must have the length aligned to two samples (32 bit),
+ * so there is some problems if cmd->chanlist_len is odd. This driver
+ * tries bypass this with adding one sample to the end of the every
+ * scan and discard it on output but this cann't be used if
+ * cmd->scan_begin_src=TRIG_FOLLOW and is used flag TRIG_WAKE_EOS, then
+ * driver switch to interrupt driven mode with interrupt after every
+ * sample.
+ * c) If isn't used DMA then you can use only mode where
+ * cmd->scan_begin_src=TRIG_FOLLOW.
+ *
+ * Configuration options:
+ * [0] - PCI bus of device (optional)
+ * [1] - PCI slot of device (optional)
+ * If bus/slot is not specified, then first available PCI
+ * card will be used.
+ * [2] - 0= standard 8 DIFF/16 SE channels configuration
+ * n = external multiplexer connected, 1 <= n <= 256
+ * [3] - 0=autoselect DMA or EOC interrupts operation
+ * 1 = disable DMA mode
+ * 3 = disable DMA and INT, only insn interface will work
+ * [4] - sample&hold signal - card can generate signal for external
+ * S&H board
+ * 0 = use SSHO(pin 45) signal is generated in onboard hardware
+ * S&H logic
+ * 0 != use ADCHN7(pin 23) signal is generated from driver, number
+ * say how long delay is requested in ns and sign polarity of
+ * the hold (in this case external multiplexor can serve only
+ * 128 channels)
+ * [5] - 0=stop measure on all hardware errors
+ * 2 | = ignore ADOR - A/D Overrun status
+ * 8|=ignore Bover - A/D Burst Mode Overrun status
+ * 256|=ignore nFull - A/D FIFO Full status
+ */
/*
* FIXME
@@ -350,7 +351,7 @@ struct pci9118_private {
* on external start
*/
unsigned short ao_data[2]; /* data output buffer */
- char dma_doublebuf; /* we can use double buffering */
+ char dma_doublebuf; /* use double buffering */
unsigned int dma_actbuf; /* which buffer is used now */
unsigned short *dmabuf_virt[2]; /*
* pointers to begin of
@@ -403,7 +404,7 @@ static int check_channel_list(struct comedi_device *dev,
}
if ((frontadd + n_chan + backadd) > s->len_chanlist) {
comedi_error(dev,
- "range/channel list is too long for actual configuration!\n");
+ "range/channel list is too long for actual configuration!\n");
return 0;
}
@@ -416,19 +417,19 @@ static int check_channel_list(struct comedi_device *dev,
if ((CR_AREF(chanlist[i]) == AREF_DIFF) !=
(differencial)) {
comedi_error(dev,
- "Differencial and single ended inputs can't be mixtured!");
+ "Differencial and single ended inputs can't be mixtured!");
return 0;
}
if ((CR_RANGE(chanlist[i]) < PCI9118_BIPOLAR_RANGES) !=
(bipolar)) {
comedi_error(dev,
- "Bipolar and unipolar ranges can't be mixtured!");
+ "Bipolar and unipolar ranges can't be mixtured!");
return 0;
}
if (!devpriv->usemux && differencial &&
(CR_CHAN(chanlist[i]) >= this_board->n_aichand)) {
comedi_error(dev,
- "If AREF_DIFF is used then is available only first 8 channels!");
+ "If AREF_DIFF is used then is available only first 8 channels!");
return 0;
}
}
@@ -799,7 +800,7 @@ static void pci9118_start_pacer(struct comedi_device *dev, int mode)
outl(0x74, dev->iobase + PCI9118_CNTCTRL);
outl(0xb4, dev->iobase + PCI9118_CNTCTRL);
-/* outl(0x30, dev->iobase + PCI9118_CNTCTRL); */
+ /* outl(0x30, dev->iobase + PCI9118_CNTCTRL); */
udelay(1);
if ((mode == 1) || (mode == 2) || (mode == 4)) {
@@ -1679,7 +1680,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
/* double timed action */
if (!devpriv->usedma) {
comedi_error(dev,
- "cmd->scan_begin_src=TRIG_TIMER works only with bus mastering!");
+ "cmd->scan_begin_src=TRIG_TIMER works only with bus mastering!");
return -EIO;
}
@@ -1743,7 +1744,7 @@ static int pci9118_reset(struct comedi_device *dev)
outl(devpriv->IntControlReg, dev->iobase + PCI9118_INTCTRL);
/* disable interrupts source */
outl(0x30, dev->iobase + PCI9118_CNTCTRL);
-/* outl(0xb4, dev->iobase + PCI9118_CNTCTRL); */
+ /* outl(0xb4, dev->iobase + PCI9118_CNTCTRL); */
pci9118_start_pacer(dev, 0); /* stop 8254 counters */
devpriv->AdControlReg = 0;
outl(devpriv->AdControlReg, dev->iobase + PCI9118_ADCNTRL);
@@ -1796,6 +1797,7 @@ static int pci9118_reset(struct comedi_device *dev)
* FIXME - this is pretty ineffective because all the supported board types
* have the same device ID!
*/
+
static const struct boardtype *pci9118_find_boardinfo(struct pci_dev *pcidev)
{
unsigned int i;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* [PATCH 94/94] Staging: commedi: 8253.h: style issue fixed
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
` (91 preceding siblings ...)
2014-07-15 17:01 ` [PATCH 93/94] Staging: comedi: 3 files revised " Sam Asadi
@ 2014-07-15 17:01 ` Sam Asadi
92 siblings, 0 replies; 99+ messages in thread
From: Sam Asadi @ 2014-07-15 17:01 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Sam Asadi
a revision to the file that previously had several style issues.
It's clean now.
Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
---
drivers/staging/comedi/drivers/8253.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h
index 31d0fc9..d320027 100644
--- a/drivers/staging/comedi/drivers/8253.h
+++ b/drivers/staging/comedi/drivers/8253.h
@@ -282,6 +282,7 @@ static inline void i8254_mm_write(void __iomem *base_address,
* OR'ed with:
* I8254_BCD, I8254_BINARY
*/
+
static inline int i8254_set_mode(unsigned long base_address,
unsigned int regshift,
unsigned int counter_number, unsigned int mode)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 99+ messages in thread
* Re: [PATCH 89/94] Linux 3.16-rc5
2014-07-15 17:01 ` [PATCH 89/94] Linux 3.16-rc5 Sam Asadi
@ 2014-07-15 17:37 ` Valdis.Kletnieks
0 siblings, 0 replies; 99+ messages in thread
From: Valdis.Kletnieks @ 2014-07-15 17:37 UTC (permalink / raw)
To: Sam Asadi; +Cc: gregkh, devel, linux-kernel, Linus Torvalds
[-- Attachment #1: Type: text/plain, Size: 575 bytes --]
On Tue, 15 Jul 2014 20:01:44 +0300, Sam Asadi said:
> From: Linus Torvalds <torvalds@linux-foundation.org>
>
>
> Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 2167084..f3c543d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,7 +1,7 @@
> VERSION = 3
> PATCHLEVEL = 16
> SUBLEVEL = 0
> -EXTRAVERSION = -rc4
> +EXTRAVERSION = -rc5
> NAME = Shuffling Zombie Juror
Moral of the story - always test send a stream of patches to yourself
first.... :)
[-- Attachment #2: Type: application/pgp-signature, Size: 848 bytes --]
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 46/94] ARM: dts: am335x-evm: Enable the McASP FIFO for audio
2014-07-15 17:01 ` [PATCH 46/94] ARM: dts: am335x-evm: Enable the McASP FIFO for audio Sam Asadi
@ 2014-07-16 5:40 ` Peter Ujfalusi
0 siblings, 0 replies; 99+ messages in thread
From: Peter Ujfalusi @ 2014-07-16 5:40 UTC (permalink / raw)
To: Sam Asadi, gregkh; +Cc: devel, linux-kernel, Tony Lindgren
On 07/15/2014 08:01 PM, Sam Asadi wrote:
> From: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> The use of FIFO in McASP can reduce the risk of audio under/overrun and
> lowers the load on the memories since the DMA will operate in bursts.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> Signed-off-by: sam-the-6 <asadi.samuel@gmail.com>
> ---
> arch/arm/boot/dts/am335x-evm.dts | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
What is the reason this patch is in this */94 series? What is this series of
patches anyways?
FWIW the two McASP FIFO enable patch is already in mainline and they should
not be backported to older kernels w/o the changes in the mcasp driver in 3.16.
>
> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
> index ecb2677..e2156a5 100644
> --- a/arch/arm/boot/dts/am335x-evm.dts
> +++ b/arch/arm/boot/dts/am335x-evm.dts
> @@ -529,8 +529,8 @@
> serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
> 0 0 1 2
> >;
> - tx-num-evt = <1>;
> - rx-num-evt = <1>;
> + tx-num-evt = <32>;
> + rx-num-evt = <32>;
> };
>
> &tps {
>
--
Péter
^ permalink raw reply [flat|nested] 99+ messages in thread
* i8k: Don't revert affinity in i8k_smm
2014-07-15 17:01 ` [PATCH 58/94] i8k: Fix non-SMP operation Sam Asadi
@ 2014-08-18 23:19 ` Con Kolivas
2014-08-19 2:32 ` Guenter Roeck
0 siblings, 1 reply; 99+ messages in thread
From: Con Kolivas @ 2014-08-18 23:19 UTC (permalink / raw)
To: Sam Asadi; +Cc: gregkh, devel, linux-kernel, Guenter Roeck, Andreas Mohr
As a followup to this discussion:
On Tue, 15 Jul 2014 08:01:13 PM Sam Asadi wrote:
> Commit f36fdb9f0266 (i8k: Force SMM to run on CPU 0) adds support
> for multi-core CPUs to the driver. Unfortunately, that causes it
> to fail loading if compiled without SMP support, at least on
> 32 bit kernels. Kernel log shows "i8k: unable to get SMM Dell
> signature", and function i8k_smm is found to return -EINVAL.
>
> Testing revealed that the culprit is the missing return value check
> of set_cpus_allowed_ptr.
It appears that the original commit f36fdb9f0266 changes the affinity for the
duration of i8k_smm function and then unconditionally reverts the affinity to
the old cpu mask regardless of whether the function succeeds or fails. As this
must run on CPU 0 at all times it does not make sense to revert the affinity at
the end of the function. Proposed patch attached.
Signed-off-by: Con Kolivas <kernel@kolivas.org>
---
drivers/char/i8k.c | 6 ------
1 file changed, 6 deletions(-)
Index: linux-3.16-ck1/drivers/char/i8k.c
===================================================================
--- linux-3.16-ck1.orig/drivers/char/i8k.c 2014-08-12 14:07:49.000000000 +1000
+++ linux-3.16-ck1/drivers/char/i8k.c 2014-08-19 09:09:57.939056696 +1000
@@ -132,12 +132,8 @@ static int i8k_smm(struct smm_regs *regs
{
int rc;
int eax = regs->eax;
- cpumask_var_t old_mask;
/* SMM requires CPU 0 */
- if (!alloc_cpumask_var(&old_mask, GFP_KERNEL))
- return -ENOMEM;
- cpumask_copy(old_mask, ¤t->cpus_allowed);
rc = set_cpus_allowed_ptr(current, cpumask_of(0));
if (rc)
goto out;
@@ -203,8 +199,6 @@ static int i8k_smm(struct smm_regs *regs
rc = -EINVAL;
out:
- set_cpus_allowed_ptr(current, old_mask);
- free_cpumask_var(old_mask);
return rc;
}
--
-ck
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: i8k: Don't revert affinity in i8k_smm
2014-08-18 23:19 ` i8k: Don't revert affinity in i8k_smm Con Kolivas
@ 2014-08-19 2:32 ` Guenter Roeck
2014-08-19 12:34 ` Con Kolivas
0 siblings, 1 reply; 99+ messages in thread
From: Guenter Roeck @ 2014-08-19 2:32 UTC (permalink / raw)
To: Con Kolivas; +Cc: Sam Asadi, gregkh, devel, linux-kernel, Andreas Mohr
On Tue, Aug 19, 2014 at 09:19:55AM +1000, Con Kolivas wrote:
> As a followup to this discussion:
>
> On Tue, 15 Jul 2014 08:01:13 PM Sam Asadi wrote:
> > Commit f36fdb9f0266 (i8k: Force SMM to run on CPU 0) adds support
> > for multi-core CPUs to the driver. Unfortunately, that causes it
> > to fail loading if compiled without SMP support, at least on
> > 32 bit kernels. Kernel log shows "i8k: unable to get SMM Dell
> > signature", and function i8k_smm is found to return -EINVAL.
> >
> > Testing revealed that the culprit is the missing return value check
> > of set_cpus_allowed_ptr.
>
> It appears that the original commit f36fdb9f0266 changes the affinity for the
> duration of i8k_smm function and then unconditionally reverts the affinity to
> the old cpu mask regardless of whether the function succeeds or fails. As this
> must run on CPU 0 at all times it does not make sense to revert the affinity at
> the end of the function. Proposed patch attached.
>
Sorry, I must have missed the rest of the discussion. What problem is this patch
supposed to fix ? Or, in other words, is there a problem with the current code ?
I also don't really understand the argument above. Why does it not make sense to
revert to the original affinity ? After all, only the SMM call must run on CPU
0. Why does it not make sense to let the rest of the code run on another CPU ?
Thanks,
Guenter
> Signed-off-by: Con Kolivas <kernel@kolivas.org>
>
> ---
> drivers/char/i8k.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> Index: linux-3.16-ck1/drivers/char/i8k.c
> ===================================================================
> --- linux-3.16-ck1.orig/drivers/char/i8k.c 2014-08-12 14:07:49.000000000 +1000
> +++ linux-3.16-ck1/drivers/char/i8k.c 2014-08-19 09:09:57.939056696 +1000
> @@ -132,12 +132,8 @@ static int i8k_smm(struct smm_regs *regs
> {
> int rc;
> int eax = regs->eax;
> - cpumask_var_t old_mask;
>
> /* SMM requires CPU 0 */
> - if (!alloc_cpumask_var(&old_mask, GFP_KERNEL))
> - return -ENOMEM;
> - cpumask_copy(old_mask, ¤t->cpus_allowed);
> rc = set_cpus_allowed_ptr(current, cpumask_of(0));
> if (rc)
> goto out;
> @@ -203,8 +199,6 @@ static int i8k_smm(struct smm_regs *regs
> rc = -EINVAL;
>
> out:
> - set_cpus_allowed_ptr(current, old_mask);
> - free_cpumask_var(old_mask);
> return rc;
> }
>
>
> --
> -ck
>
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: i8k: Don't revert affinity in i8k_smm
2014-08-19 2:32 ` Guenter Roeck
@ 2014-08-19 12:34 ` Con Kolivas
0 siblings, 0 replies; 99+ messages in thread
From: Con Kolivas @ 2014-08-19 12:34 UTC (permalink / raw)
To: Guenter Roeck; +Cc: Sam Asadi, gregkh, devel, linux-kernel, Andreas Mohr
On Mon, 18 Aug 2014 07:32:15 PM Guenter Roeck wrote:
> On Tue, Aug 19, 2014 at 09:19:55AM +1000, Con Kolivas wrote:
> > As a followup to this discussion:
> >
> > On Tue, 15 Jul 2014 08:01:13 PM Sam Asadi wrote:
> > > Commit f36fdb9f0266 (i8k: Force SMM to run on CPU 0) adds support
> > > for multi-core CPUs to the driver. Unfortunately, that causes it
> > > to fail loading if compiled without SMP support, at least on
> > > 32 bit kernels. Kernel log shows "i8k: unable to get SMM Dell
> > > signature", and function i8k_smm is found to return -EINVAL.
> > >
> > > Testing revealed that the culprit is the missing return value check
> > > of set_cpus_allowed_ptr.
> >
> > It appears that the original commit f36fdb9f0266 changes the affinity for
> > the duration of i8k_smm function and then unconditionally reverts the
> > affinity to the old cpu mask regardless of whether the function succeeds
> > or fails. As this must run on CPU 0 at all times it does not make sense
> > to revert the affinity at the end of the function. Proposed patch
> > attached.
>
> Sorry, I must have missed the rest of the discussion. What problem is this
> patch supposed to fix ? Or, in other words, is there a problem with the
> current code ? I also don't really understand the argument above. Why does
> it not make sense to revert to the original affinity ? After all, only the
> SMM call must run on CPU 0. Why does it not make sense to let the rest of
> the code run on another CPU ?
My mistake. If only the i8k_smm function needs to run on CPU 0 then it is
appropriate to return affinity to the previous CPU mask. Please disregard and
apologies for the noise.
Thanks,
Con
--
-ck
^ permalink raw reply [flat|nested] 99+ messages in thread
end of thread, other threads:[~2014-08-19 12:35 UTC | newest]
Thread overview: 99+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 17:00 [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS Sam Asadi
2014-07-15 17:00 ` [PATCH 02/94] clk: ti: apll: not allocating enough data Sam Asadi
2014-07-15 17:00 ` [PATCH 03/94] clk: ti: dra7: return error code in failure case Sam Asadi
2014-07-15 17:00 ` [PATCH 04/94] clk: ti: am43x: Fix boot with CONFIG_SOC_AM33XX disabled Sam Asadi
2014-07-15 17:00 ` [PATCH 05/94] clk: ti: set CLK_SET_RATE_NO_REPARENT for ti,mux-clock Sam Asadi
2014-07-15 17:00 ` [PATCH 06/94] clk: samsung: fix several typos to fix boot on s3c2410 Sam Asadi
2014-07-15 17:00 ` [PATCH 07/94] clk: samsung: add more aliases for s3c24xx Sam Asadi
2014-07-15 17:00 ` [PATCH 08/94] clk: samsung: exynos4: Remove SRC_MASK_ISP gates Sam Asadi
2014-07-15 17:00 ` [PATCH 09/94] clk: s3c64xx: Hookup SPI clocks correctly Sam Asadi
2014-07-15 17:00 ` [PATCH 10/94] clk/exynos5250: fix bit number for tv sysmmu clock Sam Asadi
2014-07-15 17:00 ` [PATCH 11/94] clk: exynos5420: Remove aclk66_peric from the clock tree description Sam Asadi
2014-07-15 17:00 ` [PATCH 12/94] dma: cppi41: handle 0-length packets Sam Asadi
2014-07-15 17:00 ` [PATCH 13/94] Update imx-sdma cyclic handling to report residue Sam Asadi
2014-07-15 17:00 ` [PATCH 14/94] clk: s2mps11: Fix double free corruption during driver unbind Sam Asadi
2014-07-15 17:00 ` [PATCH 15/94] clk: sunxi: fix devm_ioremap_resource error detection code Sam Asadi
2014-07-15 17:00 ` [PATCH 16/94] ARM: kprobes: Prevent known test failures stopping other tests running Sam Asadi
2014-07-15 17:00 ` [PATCH 17/94] ARM: kprobes: Disallow instructions with PC and register specified shift Sam Asadi
2014-07-15 17:00 ` [PATCH 18/94] ARM: kprobes: Fix test code compilation errors for ARMv4 targets Sam Asadi
2014-07-15 17:00 ` [PATCH 19/94] clk: qcom: HDMI source sel is 3 not 2 Sam Asadi
2014-07-15 17:00 ` [PATCH 20/94] ARM: dts: dra7xx-clocks: Fix the l3 and l4 clock rates Sam Asadi
2014-07-15 17:00 ` [PATCH 21/94] ARM: EXYNOS: Fix the check for non-smp configuration Sam Asadi
2014-07-15 17:00 ` [PATCH 22/94] ARM: dts: fix pwm-cells in pwm node for exynos4 Sam Asadi
2014-07-15 17:00 ` [PATCH 23/94] clocksource: exynos_mct: Fix ftrace Sam Asadi
2014-07-15 17:00 ` [PATCH 24/94] clocksource: exynos_mct: Register the timer for stable udelay Sam Asadi
2014-07-15 17:00 ` [PATCH 25/94] iio: hid-sensor-press: Fix return values Sam Asadi
2014-07-15 17:00 ` [PATCH 26/94] iio: hid-sensor-accel-3d: " Sam Asadi
2014-07-15 17:00 ` [PATCH 27/94] iio: hid-sensor-magn-3d: " Sam Asadi
2014-07-15 17:00 ` [PATCH 28/94] iio: hid-sensor-als: " Sam Asadi
2014-07-15 17:00 ` [PATCH 29/94] iio: hid-sensor-gyro-3d: " Sam Asadi
2014-07-15 17:00 ` [PATCH 30/94] iio: hid-sensor-prox: " Sam Asadi
2014-07-15 17:00 ` [PATCH 31/94] ext4: fix unjournalled bg descriptor while initializing inode bitmap Sam Asadi
2014-07-15 17:00 ` [PATCH 32/94] ext4: clarify error count warning messages Sam Asadi
2014-07-15 17:00 ` [PATCH 33/94] ext4: clarify ext4_error message in ext4_mb_generate_buddy_error() Sam Asadi
2014-07-15 17:00 ` [PATCH 34/94] ext4: disable synchronous transaction batching if max_batch_time==0 Sam Asadi
2014-07-15 17:00 ` [PATCH 35/94] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver Sam Asadi
2014-07-15 17:00 ` [PATCH 36/94] ARM: DRA7: hwmod: Fixup SATA hwmod Sam Asadi
2014-07-15 17:00 ` [PATCH 37/94] ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss Sam Asadi
2014-07-15 17:00 ` [PATCH 38/94] ARM: OMAP2+: clock/dpll: fix _dpll_test_fint arithmetics overflow Sam Asadi
2014-07-15 17:00 ` [PATCH 39/94] iio:tcs3472: Check for buffer enabled and locking Sam Asadi
2014-07-15 17:00 ` [PATCH 40/94] USB: cp210x: add support for Corsair usb dongle Sam Asadi
2014-07-15 17:00 ` [PATCH 41/94] usb: option: Add ID for Telewell TW-LTE 4G v2 Sam Asadi
2014-07-15 17:00 ` [PATCH 42/94] ARM: DRA7/AM43XX: fix header definition for omap44xx_restart Sam Asadi
2014-07-15 17:00 ` [PATCH 43/94] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Sam Asadi
2014-07-15 17:00 ` [PATCH 44/94] ARM: OMAP2+: create dsp device only on OMAP3 SoCs Sam Asadi
2014-07-15 17:01 ` [PATCH 45/94] ARM: OMAP2+: Make GPMC skip disabled devices Sam Asadi
2014-07-15 17:01 ` [PATCH 46/94] ARM: dts: am335x-evm: Enable the McASP FIFO for audio Sam Asadi
2014-07-16 5:40 ` Peter Ujfalusi
2014-07-15 17:01 ` [PATCH 47/94] ARM: dts: am335x-evmsk: " Sam Asadi
2014-07-15 17:01 ` [PATCH 48/94] ARM: dts: Fix TI CPSW Phy mode selection on IGEP COM AQUILA Sam Asadi
2014-07-15 17:01 ` [PATCH 49/94] ARM: l2c: fix revision checking Sam Asadi
2014-07-15 17:01 ` [PATCH 50/94] ARM: EXYNOS: Update secondary boot addr for secure mode Sam Asadi
2014-07-15 17:01 ` [PATCH 51/94] ARM: dts: Update the parent for Audss clocks in Exynos5420 Sam Asadi
2014-07-15 17:01 ` [PATCH 52/94] ARM: imx: fix shared gate clock Sam Asadi
2014-07-15 17:01 ` [PATCH 53/94] ARM: OMAP2+: Remove non working OMAP HDMI audio initialization Sam Asadi
2014-07-15 17:01 ` [PATCH 54/94] iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends Sam Asadi
2014-07-15 17:01 ` [PATCH 55/94] Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code Sam Asadi
2014-07-15 17:01 ` [PATCH 56/94] Drivers: hv: util: Fix a bug in the KVP code Sam Asadi
2014-07-15 17:01 ` [PATCH 57/94] USB: ftdi_sio: Add extra PID Sam Asadi
2014-07-15 17:01 ` [PATCH 58/94] i8k: Fix non-SMP operation Sam Asadi
2014-08-18 23:19 ` i8k: Don't revert affinity in i8k_smm Con Kolivas
2014-08-19 2:32 ` Guenter Roeck
2014-08-19 12:34 ` Con Kolivas
2014-07-15 17:01 ` [PATCH 59/94] m68k: Fix boot regression on machines with RAM at non-zero Sam Asadi
2014-07-15 17:01 ` [PATCH 60/94] ARM: EXYNOS: Add support for clock handling in power domain Sam Asadi
2014-07-15 17:01 ` [PATCH 61/94] clk: exynos5420: Add IDs for clocks used in PD mfc Sam Asadi
2014-07-15 17:01 ` [PATCH 62/94] ARM: dts: Add clock property for mfc_pd in exynos5420 Sam Asadi
2014-07-15 17:01 ` [PATCH 63/94] ARM: EXYNOS: Register cpuidle device only on exynos4210 and 5250 Sam Asadi
2014-07-15 17:01 ` [PATCH 64/94] serial: Test for no tx data on tx restart Sam Asadi
2014-07-15 17:01 ` [PATCH 65/94] serial: arc_uart: Use uart_circ_empty() for open-coded comparison Sam Asadi
2014-07-15 17:01 ` [PATCH 66/94] m68k: Export mach_random_get_entropy to modules Sam Asadi
2014-07-15 17:01 ` [PATCH 67/94] ext4: revert commit which was causing fs corruption after journal replays Sam Asadi
2014-07-15 17:01 ` [PATCH 68/94] serial: imx: Fix build breakage Sam Asadi
2014-07-15 17:01 ` [PATCH 69/94] serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a0 Sam Asadi
2014-07-15 17:01 ` [PATCH 70/94] USB: serial: ftdi_sio: Add Infineon Triboard Sam Asadi
2014-07-15 17:01 ` [PATCH 71/94] phy: sun4i: depend on RESET_CONTROLLER Sam Asadi
2014-07-15 17:01 ` [PATCH 72/94] phy: omap-usb2: fix devm_ioremap_resource error detection code Sam Asadi
2014-07-15 17:01 ` [PATCH 73/94] drivers: phy: phy-samsung-usb2.c: Add missing MODULE_DEVICE_TABLE Sam Asadi
2014-07-15 17:01 ` [PATCH 74/94] phy: core: Fix error path in phy_create() Sam Asadi
2014-07-15 17:01 ` [PATCH 75/94] phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove Sam Asadi
2014-07-15 17:01 ` [PATCH 76/94] ARM: at91: at91sam9x5: add clocks for usb device Sam Asadi
2014-07-15 17:01 ` [PATCH 77/94] Documentation/Changes: clean up mcelog paragraph Sam Asadi
2014-07-15 17:01 ` [PATCH 78/94] scripts/kernel-doc: handle object-like macros Sam Asadi
2014-07-15 17:01 ` [PATCH 79/94] DocBook: fix mtdnand typos Sam Asadi
2014-07-15 17:01 ` [PATCH 80/94] DocBook: fix various typos Sam Asadi
2014-07-15 17:01 ` [PATCH 81/94] Documenation/laptops: rename and update hpfall.c Sam Asadi
2014-07-15 17:01 ` [PATCH 82/94] ext4: fix a potential deadlock in __ext4_es_shrink() Sam Asadi
2014-07-15 17:01 ` [PATCH 83/94] ext4: fix potential null pointer dereference in ext4_free_inode Sam Asadi
2014-07-15 17:01 ` [PATCH 84/94] parisc: add serial ports of C8000/1GHz machine to hardware database Sam Asadi
2014-07-15 17:01 ` [PATCH 85/94] parisc: fix fanotify_mark() syscall on 32bit compat kernel Sam Asadi
2014-07-15 17:01 ` [PATCH 86/94] parisc: drop unused defines and header includes Sam Asadi
2014-07-15 17:01 ` [PATCH 87/94] clk: spear3xx: Use proper control register offset Sam Asadi
2014-07-15 17:01 ` [PATCH 88/94] clk: spear3xx: Set proper clock parent of uart1/2 Sam Asadi
2014-07-15 17:01 ` [PATCH 89/94] Linux 3.16-rc5 Sam Asadi
2014-07-15 17:37 ` Valdis.Kletnieks
2014-07-15 17:01 ` [PATCH 90/94] Staging: comedi: 8253.h fixed by removing 'return' from generic func Sam Asadi
2014-07-15 17:01 ` [PATCH 91/94] Staging: comedi: 8255: fixed by adding an empthy line Sam Asadi
2014-07-15 17:01 ` [PATCH 92/94] Staging: comedi: adl_pci9118: fixed style issues Sam Asadi
2014-07-15 17:01 ` [PATCH 93/94] Staging: comedi: 3 files revised " Sam Asadi
2014-07-15 17:01 ` [PATCH 94/94] Staging: commedi: 8253.h: style issue fixed Sam Asadi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox