<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.ports.arm.msm">
    <title>gmane.linux.ports.arm.msm</title>
    <link>http://blog.gmane.org/gmane.linux.ports.arm.msm</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4041"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4040"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4039"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4036"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4035"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4032"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4031"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4029"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4028"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4027"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4025"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4022"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4021"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4020"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4019"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4015"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4013"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4012"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4011"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4008"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4041">
    <title>[PATCH 1/3] ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4041</link>
    <description>&lt;pre&gt;Remove gpiomux-v2 as it's not being used and make way for future improvements.

Signed-off-by: Rohit Vaswani &amp;lt;rvaswani&amp;lt; at &amp;gt;codeaurora.org&amp;gt;
---
 arch/arm/mach-msm/Kconfig        |   13 +++-----
 arch/arm/mach-msm/Makefile       |    6 +--
 arch/arm/mach-msm/gpiomux-8x60.c |   19 ------------
 arch/arm/mach-msm/gpiomux-v2.c   |   25 ---------------
 arch/arm/mach-msm/gpiomux-v2.h   |   61 --------------------------------------
 arch/arm/mach-msm/gpiomux.c      |   15 +++++++++
 arch/arm/mach-msm/gpiomux.h      |    5 ---
 drivers/gpio/gpio-msm-v2.c       |    5 +--
 8 files changed, 24 insertions(+), 125 deletions(-)
 delete mode 100644 arch/arm/mach-msm/gpiomux-8x60.c
 delete mode 100644 arch/arm/mach-msm/gpiomux-v2.c
 delete mode 100644 arch/arm/mach-msm/gpiomux-v2.h

diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index fceb093..614e41e 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,9 +48,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; config ARCH_MSM8X60
 select CPU_V7
 select GPIO_MSM_V2
 select HAVE_SMP
-select MSM_GPIOMUX
 select MSM_SCM if SMP
-select MSM_V2_TLMM
 select USE_OF
 
 config ARCH_MSM8960
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -58,9 +56,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; config ARCH_MSM8960
 select ARM_GIC
 select CPU_V7
 select HAVE_SMP
-select MSM_GPIOMUX
+select GPIO_MSM_V2
 select MSM_SCM if SMP
-select MSM_V2_TLMM
 select USE_OF
 
 config MSM_HAS_DEBUG_UART_HS
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -124,10 +121,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; config MSM_SMD
 bool
 
 config MSM_GPIOMUX
-bool
-
-config MSM_V2_TLMM
-bool
+depends on !(ARCH_MSM8X60 || ARCH_MSM8960)
+bool "MSM V1 TLMM GPIOMUX architecture"
+help
+  Support for MSM V1 TLMM GPIOMUX architecture.
 
 config MSM_SCM
 bool
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index 17519fa..1a26d04 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -27,7 +27,5 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
 obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
 obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o
 obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o
-
-obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o
-obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o
-obj-$(CONFIG_ARCH_MSM8X60) += gpiomux-8x60.o gpiomux-v2.o gpiomux.o
+obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o
+obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o
diff --git a/arch/arm/mach-msm/gpiomux-8x60.c b/arch/arm/mach-msm/gpiomux-8x60.c
deleted file mode 100644
index 7b380b3..0000000
--- a/arch/arm/mach-msm/gpiomux-8x60.c
+++ /dev/null
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,19 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-#include "gpiomux.h"
-
-struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {};
diff --git a/arch/arm/mach-msm/gpiomux-v2.c b/arch/arm/mach-msm/gpiomux-v2.c
deleted file mode 100644
index 273396d..0000000
--- a/arch/arm/mach-msm/gpiomux-v2.c
+++ /dev/null
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,25 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-#include &amp;lt;linux/io.h&amp;gt;
-#include &amp;lt;mach/msm_iomap.h&amp;gt;
-#include "gpiomux.h"
-
-void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
-{
-writel(val &amp;amp; ~GPIOMUX_CTL_MASK,
-       MSM_TLMM_BASE + 0x1000 + (0x10 * gpio));
-}
diff --git a/arch/arm/mach-msm/gpiomux-v2.h b/arch/arm/mach-msm/gpiomux-v2.h
deleted file mode 100644
index 3bf10e7..0000000
--- a/arch/arm/mach-msm/gpiomux-v2.h
+++ /dev/null
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,61 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-#ifndef __ARCH_ARM_MACH_MSM_GPIOMUX_V2_H
-#define __ARCH_ARM_MACH_MSM_GPIOMUX_V2_H
-
-#define GPIOMUX_NGPIOS 173
-
-typedef u16 gpiomux_config_t;
-
-enum {
-GPIOMUX_DRV_2MA  = 0UL &amp;lt;&amp;lt; 6,
-GPIOMUX_DRV_4MA  = 1UL &amp;lt;&amp;lt; 6,
-GPIOMUX_DRV_6MA  = 2UL &amp;lt;&amp;lt; 6,
-GPIOMUX_DRV_8MA  = 3UL &amp;lt;&amp;lt; 6,
-GPIOMUX_DRV_10MA = 4UL &amp;lt;&amp;lt; 6,
-GPIOMUX_DRV_12MA = 5UL &amp;lt;&amp;lt; 6,
-GPIOMUX_DRV_14MA = 6UL &amp;lt;&amp;lt; 6,
-GPIOMUX_DRV_16MA = 7UL &amp;lt;&amp;lt; 6,
-};
-
-enum {
-GPIOMUX_FUNC_GPIO = 0UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_1    = 1UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_2    = 2UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_3    = 3UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_4    = 4UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_5    = 5UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_6    = 6UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_7    = 7UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_8    = 8UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_9    = 9UL  &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_A    = 10UL &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_B    = 11UL &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_C    = 12UL &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_D    = 13UL &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_E    = 14UL &amp;lt;&amp;lt; 2,
-GPIOMUX_FUNC_F    = 15UL &amp;lt;&amp;lt; 2,
-};
-
-enum {
-GPIOMUX_PULL_NONE   = 0UL,
-GPIOMUX_PULL_DOWN   = 1UL,
-GPIOMUX_PULL_KEEPER = 2UL,
-GPIOMUX_PULL_UP     = 3UL,
-};
-
-#endif
diff --git a/arch/arm/mach-msm/gpiomux.c b/arch/arm/mach-msm/gpiomux.c
index 53af21a..2b8e2d2 100644
--- a/arch/arm/mach-msm/gpiomux.c
+++ b/arch/arm/mach-msm/gpiomux.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -17,9 +17,24 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/module.h&amp;gt;
 #include &amp;lt;linux/spinlock.h&amp;gt;
 #include "gpiomux.h"
+#include "proc_comm.h"
 
 static DEFINE_SPINLOCK(gpiomux_lock);
 
+static void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
+{
+unsigned tlmm_config  = (val &amp;amp; ~GPIOMUX_CTL_MASK) |
+((gpio &amp;amp; 0x3ff) &amp;lt;&amp;lt; 4);
+unsigned tlmm_disable = 0;
+int rc;
+
+rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX,
+   &amp;amp;tlmm_config, &amp;amp;tlmm_disable);
+if (rc)
+pr_err("%s: unexpected proc_comm failure %d: %08x %08x\n",
+       __func__, rc, tlmm_config, tlmm_disable);
+}
+
 int msm_gpiomux_write(unsigned gpio,
       gpiomux_config_t active,
       gpiomux_config_t suspended)
diff --git a/arch/arm/mach-msm/gpiomux.h b/arch/arm/mach-msm/gpiomux.h
index 00459f6..8e82f41 100644
--- a/arch/arm/mach-msm/gpiomux.h
+++ b/arch/arm/mach-msm/gpiomux.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -20,12 +20,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/bitops.h&amp;gt;
 #include &amp;lt;linux/errno.h&amp;gt;
 #include &amp;lt;mach/msm_gpiomux.h&amp;gt;
-
-#if defined(CONFIG_MSM_V2_TLMM)
-#include "gpiomux-v2.h"
-#else
 #include "gpiomux-v1.h"
-#endif
 
 /**
  * struct msm_gpiomux_config: gpiomux settings for one gpio line.
diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c
index dd2edde..75cc821 100644
--- a/drivers/gpio/gpio-msm-v2.c
+++ b/drivers/gpio/gpio-msm-v2.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,7 +29,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/platform_device.h&amp;gt;
 #include &amp;lt;linux/spinlock.h&amp;gt;
 
-#include &amp;lt;mach/msm_gpiomux.h&amp;gt;
 #include &amp;lt;mach/msm_iomap.h&amp;gt;
 
 /* Bits of interest in the GPIO_IN_OUT register.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -159,12 +158,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int msm_gpio_direction_output(struct gpio_chip *chip,
 
 static int msm_gpio_request(struct gpio_chip *chip, unsigned offset)
 {
-return msm_gpiomux_get(chip-&amp;gt;base + offset);
+return 0;
 }
 
 static void msm_gpio_free(struct gpio_chip *chip, unsigned offset)
 {
-msm_gpiomux_put(chip-&amp;gt;base + offset);
+return;
 }
 
 static int msm_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
&lt;/pre&gt;</description>
    <dc:creator>Rohit Vaswani</dc:creator>
    <dc:date>2013-05-23T00:29:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4040">
    <title>[PATCHv2 0/3] Cleanup MSM_GPIOMUX and add DT support for gpio-msm</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4040</link>
    <description>&lt;pre&gt;Hi Linus,
Could this series go through David's tree or is there a better way to do this?
It would be great if I can have you ack for the gpio patch.

Thanks,
Rohit

Rohit Vaswani (3):
  ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs
  ARM: msm: Remove unused and unmapped MSM_TLMM_BASE for 8x60
  gpio: msm: Add device tree and irqdomain support for gpio-msm-v2

 .../devicetree/bindings/gpio/gpio-msm.txt          |   26 +++
 arch/arm/boot/dts/msm8660-surf.dts                 |   11 ++
 arch/arm/boot/dts/msm8960-cdp.dts                  |   11 ++
 arch/arm/mach-msm/Kconfig                          |   13 +-
 arch/arm/mach-msm/Makefile                         |    6 +-
 arch/arm/mach-msm/gpiomux-8x60.c                   |   19 --
 arch/arm/mach-msm/gpiomux-v2.c                     |   25 ---
 arch/arm/mach-msm/gpiomux-v2.h                     |   61 -------
 arch/arm/mach-msm/gpiomux.c                        |   15 ++
 arch/arm/mach-msm/gpiomux.h                        |    5 -
 arch/arm/mach-msm/include/mach/msm_iomap-8x60.h    |    4 -
 drivers/gpio/Kconfig                               |    2 +-
 drivers/gpio/gpio-msm-v2.c                         |  173 +++++++++++++-------
 13 files changed, 181 insertions(+), 190 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-msm.txt
 delete mode 100644 arch/arm/mach-msm/gpiomux-8x60.c
 delete mode 100644 arch/arm/mach-msm/gpiomux-v2.c
 delete mode 100644 arch/arm/mach-msm/gpiomux-v2.h

&lt;/pre&gt;</description>
    <dc:creator>Rohit Vaswani</dc:creator>
    <dc:date>2013-05-23T00:29:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4039">
    <title>Re: [RFC/PATCH 0/2] Remove most of_device_match() calls</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4039</link>
    <description>&lt;pre&gt;
See this commit:

commit b1608d69cb804e414d0887140ba08a9398e4e638
Author: Grant Likely &amp;lt;grant.likely&amp;lt; at &amp;gt;secretlab.ca&amp;gt;
Date:   Wed May 18 11:19:24 2011 -0600

    drivercore: revert addition of of_match to struct device

    Commit b826291c, "drivercore/dt: add a match table pointer to struct
    device" added an of_match pointer to struct device to cache the
    of_match_table entry discovered at driver match time.  This was unsafe
    because matching is not an atomic operation with probing a driver.  If
    two or more drivers are attempted to be matched to a driver at the
    same time, then the cached matching entry pointer could get
    overwritten.

    This patch reverts the of_match cache pointer and reworks all users to
    call of_match_device() directly instead.

    Signed-off-by: Grant Likely &amp;lt;grant.likely&amp;lt; at &amp;gt;secretlab.ca&amp;gt;
&lt;/pre&gt;</description>
    <dc:creator>Rob Herring</dc:creator>
    <dc:date>2013-05-22T21:27:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4036">
    <title>[RFC/PATCH 0/2] Remove most of_device_match() calls</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4036</link>
    <description>&lt;pre&gt;Sending this as an RFC with one driver converted to see what people
think. The goal is to avoid having to run the match twice and be
similar to how platform_device_id works right now. If people agree
I can go through and send out patches for all the drivers doing
the duplicate search (~100 files).

Stephen Boyd (2):
  of: Assign of_device_id to matching device_node
  gpio/omap: Use of_node-&amp;gt;id_entry directly

 drivers/gpio/gpio-omap.c  |  4 +---
 drivers/of/device.c       | 18 ++++++++++++++++++
 include/linux/of.h        |  1 +
 include/linux/of_device.h | 12 ++----------
 4 files changed, 22 insertions(+), 13 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Stephen Boyd</dc:creator>
    <dc:date>2013-05-22T20:40:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4035">
    <title>Re: [PATCH v2 1/2] clk: Disable unused clocks after deferred probing is done</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4035</link>
    <description>&lt;pre&gt;
so this feature is nightmare we need to KILL it

Best Regards,
J.
&lt;/pre&gt;</description>
    <dc:creator>Jean-Christophe PLAGNIOL-VILLARD</dc:creator>
    <dc:date>2013-05-22T10:35:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4032">
    <title>[PATCH 0/3] Cleanup MSM_GPIOMUX and add device-tree support for</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4032</link>
    <description>&lt;pre&gt;Hi Linus,
Could this series go through David's tree or is there a better way to do this?
It would be great if I can have you ack for the gpio patch.

Thanks,
Rohit

Rohit Vaswani (3):
  ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs
  ARM: msm: Remove unused and unmapped MSM_TLMM_BASE for 8x60
  gpio: msm: Add device tree and irqdomain support for gpio-msm-v2

 .../devicetree/bindings/gpio/gpio-msm.txt          |   26 ++++
 arch/arm/boot/dts/msm8660-surf.dts                 |   11 ++
 arch/arm/boot/dts/msm8960-cdp.dts                  |   11 ++
 arch/arm/mach-msm/Kconfig                          |   13 +-
 arch/arm/mach-msm/Makefile                         |    6 +-
 arch/arm/mach-msm/gpiomux-8x60.c                   |   19 ---
 arch/arm/mach-msm/gpiomux-v2.c                     |   25 ---
 arch/arm/mach-msm/gpiomux-v2.h                     |   61 --------
 arch/arm/mach-msm/gpiomux.c                        |   15 ++
 arch/arm/mach-msm/gpiomux.h                        |    5 -
 arch/arm/mach-msm/include/mach/msm_iomap-8x60.h    |    4 -
 drivers/gpio/Kconfig                               |    2 +-
 drivers/gpio/gpio-msm-v2.c                         |  158 ++++++++++++++------
 13 files changed, 183 insertions(+), 173 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-msm.txt
 delete mode 100644 arch/arm/mach-msm/gpiomux-8x60.c
 delete mode 100644 arch/arm/mach-msm/gpiomux-v2.c
 delete mode 100644 arch/arm/mach-msm/gpiomux-v2.h

&lt;/pre&gt;</description>
    <dc:creator>Rohit Vaswani</dc:creator>
    <dc:date>2013-05-21T18:32:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4031">
    <title>[PATCH] ARM: dts: msm: Fix bad register addresses</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4031</link>
    <description>&lt;pre&gt;Some bad copy/paste got in as well as too many zeroes. Fix
everything up so that the registers after the &amp;lt; at &amp;gt; sign are
consistent with the first reg property.

Signed-off-by: Stephen Boyd &amp;lt;sboyd&amp;lt; at &amp;gt;codeaurora.org&amp;gt;
---
 arch/arm/boot/dts/msm8660-surf.dts | 4 ++--
 arch/arm/boot/dts/msm8960-cdp.dts  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/msm8660-surf.dts b/arch/arm/boot/dts/msm8660-surf.dts
index 9bf49b3..d347082 100644
--- a/arch/arm/boot/dts/msm8660-surf.dts
+++ b/arch/arm/boot/dts/msm8660-surf.dts
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -15,7 +15,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
       &amp;lt; 0x02081000 0x1000 &amp;gt;;
 };
 
-timer&amp;lt; at &amp;gt;2000004 {
+timer&amp;lt; at &amp;gt;2000000 {
 compatible = "qcom,scss-timer", "qcom,msm-timer";
 interrupts = &amp;lt;1 0 0x301&amp;gt;,
      &amp;lt;1 1 0x301&amp;gt;,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,7 +26,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 cpu-offset = &amp;lt;0x40000&amp;gt;;
 };
 
-serial&amp;lt; at &amp;gt;19c400000 {
+serial&amp;lt; at &amp;gt;19c40000 {
 compatible = "qcom,msm-hsuart", "qcom,msm-uart";
 reg = &amp;lt;0x19c40000 0x1000&amp;gt;,
       &amp;lt;0x19c00000 0x1000&amp;gt;;
diff --git a/arch/arm/boot/dts/msm8960-cdp.dts b/arch/arm/boot/dts/msm8960-cdp.dts
index 2e4d87a..7c9ef9b 100644
--- a/arch/arm/boot/dts/msm8960-cdp.dts
+++ b/arch/arm/boot/dts/msm8960-cdp.dts
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,7 +26,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 cpu-offset = &amp;lt;0x80000&amp;gt;;
 };
 
-serial&amp;lt; at &amp;gt;19c400000 {
+serial&amp;lt; at &amp;gt;16440000 {
 compatible = "qcom,msm-hsuart", "qcom,msm-uart";
 reg = &amp;lt;0x16440000 0x1000&amp;gt;,
       &amp;lt;0x16400000 0x1000&amp;gt;;
&lt;/pre&gt;</description>
    <dc:creator>Stephen Boyd</dc:creator>
    <dc:date>2013-05-21T00:50:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4029">
    <title>Re: [PATCHv6 03/11] ARM: smp: Remove duplicate dummy timer implementation</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4029</link>
    <description>&lt;pre&gt;
Russell, can you please ack this patch and patch #11?



&lt;/pre&gt;</description>
    <dc:creator>Stephen Boyd</dc:creator>
    <dc:date>2013-05-20T21:55:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4028">
    <title>Re: Would like to form a pool of Linux copyright holders for faster GPL enforcement against Anthrax Kernels</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4028</link>
    <description>&lt;pre&gt;Eric Appleman wrote at 04:26 (EDT) on Saturday:

As some on these lists likely already know, Conservancy's GPL Compliance
Project for Linux Developers [0] is aware of this matter and is
considering what actions to take, and how such actions should be ranked
in priority given the queue of the hundreds of known GPL violations on
Linux occurring every day.

We very much appreciate that Eric has brought the matter to our
attention and I'm continuing to correspond with Eric privately in the
hopes that we can resolve the matter.

If anyone wants to join Conservancy's GPL Compliance Project for Linux
Developers, please do contact me!

[0] More details on Conservancy's GPL Compliance Project for Linux
    Developers can be found at
    https://sfconservancy.org/news/2012/may/29/compliance/

Sincerely,
&lt;/pre&gt;</description>
    <dc:creator>Bradley M. Kuhn</dc:creator>
    <dc:date>2013-05-20T15:13:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4027">
    <title>[PATCH 1/1] diag: fix userspace read-write freeze during high logging rates</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4027</link>
    <description>&lt;pre&gt;At very high diagchar logging rates (a HSPA+ ftp download with many
instantaneous diag log response messages enabled) on quad-core phones,
it was observed that after about 2 to 20 minutes (depends on logging rate)
- the userspace read to /dev/diag would block, causing a freeze effect
to the userspace program - and further attempts to log would randomly
freeze at an earlier stage then a phone restart was required to do any
meaningful logging. You can test this with "diag_mdlog", use a diag.cfg
with high logging rate log_response_messages like 0x4222, 0x4179 and other
fast logs.

The patched kernel was tested on a "Google Nexus 4 with Android 4.2.2"
(mako) phone - and had no more freezes even after 13 Hours of logging diag
for over-night ftp tests, an older sister-kernel (essentially the same -
but with many more pr_debug() to identify the causes) was also tested
sucessfully on two other "Google Nexus 4" phones, one of them logged
successfully through about 10 hours of fast ftp downloads - no freezes too.

This fix consists of 4 main parts:

1. There were cases that diag_device_write() completed the "enque" and sets
the data_ready flag during an ongoing diagchar_read() which would then
clear the flag on completion - resulting in a lost data_ready notification
and diagchar_read() would block by waiting for the lost wakeup.
The extra flag (array) "data_ready_while_busy" was introduced to
handle that situation.

2. It was observed that zero length buffers in
diag_hsic_read_complete_callback() was causing problems too
- sending zero length entries to the hsic_buf_tbl queue could cause it to
never be properly dequeued and never "diagmem_free()". This is because
diagfwd.c's diag_device_write() would successfully "enqueue" it but then
diagchar_core.c's diagchar_read() would omit it because
"if (driver-&amp;gt;hsic_buf_tbl[i].length &amp;gt; 0)".
So it won't be "dequeued" and also diagmem_free would not be called on it.
This is fixed by not allowing zero-length entries into diag_device_write()
- and then calling diagmem_free() on it instead.

3. Consecutive writes (try 10+ conf writes before reading) to diagchar
from userspace would block, although normal steps and ioctl were done.
This was because the diagchar_write() was blocked in
wait_event_interruptible() but the diag_hsic_write_complete_callback()
didn't wake it up. I simply added a wake_up_interruptible() in that
callback and now the consecutive writes complete sucessfully.

4. At very high logging rates (on the Nexus 4 quad-core phone), it was
observed that "count_hsic_write_pool" faced read/write race conditions
(to increment and decrement) and became incorrect - even negative - and
"diag_read_hsic_work_fn" would use it to "determine the current number of
available buffers for writing after reading from the HSIC has completed"
- so the code was modified to determine the number of entries available by
iterating through "hsic_buf_tbl" instead.

Also, added a "driver-&amp;gt;num_clients--" to diagchar_close() to update
num_clints on close() from userspace.

Signed-off-by: Kasidit Yusuf &amp;lt;kasidit&amp;lt; at &amp;gt;azenqos.com&amp;gt;
---
 drivers/char/diag/diagchar.h      |  1 +
 drivers/char/diag/diagchar_core.c | 21 ++++++++++-
 drivers/char/diag/diagfwd.c       | 16 ++++++++
 drivers/char/diag/diagfwd_hsic.c  | 79 ++++++++++++++++++++++++++++++++-------
 4 files changed, 103 insertions(+), 14 deletions(-)

diff --git a/drivers/char/diag/diagchar.h b/drivers/char/diag/diagchar.h
index 8d87cf9..4281912 100644
--- a/drivers/char/diag/diagchar.h
+++ b/drivers/char/diag/diagchar.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -142,6 +142,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct diagchar_dev {
 wait_queue_head_t wait_q;
 struct diag_client_map *client_map;
 int *data_ready;
+int *data_ready_while_busy;
 int num_clients;
 int polling_reg_flag;
 struct diag_write_device *buf_tbl;
diff --git a/drivers/char/diag/diagchar_core.c b/drivers/char/diag/diagchar_core.c
index 2c572ed..9132fcb 100644
--- a/drivers/char/diag/diagchar_core.c
+++ b/drivers/char/diag/diagchar_core.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -182,6 +182,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int diagchar_open(struct inode *inode, struct file *file)
 goto fail;
 else
 driver-&amp;gt;data_ready = temp;
+temp = krealloc(driver-&amp;gt;data_ready_while_busy
+, (driver-&amp;gt;num_clients) * sizeof(int),
+GFP_KERNEL);
+if (!temp)
+goto fail;
+else
+driver-&amp;gt;data_ready_while_busy = temp;
 diag_add_client(i, file);
 } else {
 mutex_unlock(&amp;amp;driver-&amp;gt;diagchar_mutex);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -221,6 +228,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int diagchar_close(struct inode *inode, struct file *file)
 struct diagchar_priv *diagpriv_data = file-&amp;gt;private_data;
 
 pr_debug("diag: process exit %s\n", current-&amp;gt;comm);
+driver-&amp;gt;num_clients--;
+
 if (!(file-&amp;gt;private_data)) {
 pr_alert("diag: Invalid file pointer");
 return -ENOMEM;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -804,6 +813,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int diagchar_read(struct file *file, char __user *buf, size_t count,
 
 wait_event_interruptible(driver-&amp;gt;wait_q,
   driver-&amp;gt;data_ready[index]);
+driver-&amp;gt;data_ready_while_busy[index] = 0;
 mutex_lock(&amp;amp;driver-&amp;gt;diagchar_mutex);
 
 if ((driver-&amp;gt;data_ready[index] &amp;amp; USER_SPACE_LOG_TYPE) &amp;amp;&amp;amp; (driver-&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -981,7 +991,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; drop_hsic:
 /* copy number of data fields */
 COPY_USER_SPACE_OR_EXIT(buf+4, num_data, 4);
 ret -= 4;
-driver-&amp;gt;data_ready[index] ^= USER_SPACE_LOG_TYPE;
+
+/* At very high logging rates, it was observed that
+ * sometimes diag_device_write() completed the "enqueue"
+ * and sets the data_ready flag during an ongoing read
+ * in the lines above - so we should not clear the flag
+ * in these cases
+ */
+if (driver-&amp;gt;data_ready_while_busy[index] == 0)
+driver-&amp;gt;data_ready[index] ^= USER_SPACE_LOG_TYPE;
+
 if (driver-&amp;gt;ch)
 queue_work(driver-&amp;gt;diag_wq,
  &amp;amp;(driver-&amp;gt;diag_read_smd_work));
diff --git a/drivers/char/diag/diagfwd.c b/drivers/char/diag/diagfwd.c
index 4419309..7f12a3f 100644
--- a/drivers/char/diag/diagfwd.c
+++ b/drivers/char/diag/diagfwd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -332,6 +332,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int diag_device_write(void *buf, int proc_num, struct diag_request *write_ptr)
  driver-&amp;gt;logging_process_id)
 break;
 if (i &amp;lt; driver-&amp;gt;num_clients) {
+/* Set a "data_ready_while_busy" flag to
+ * prevent diagchar_read() from clearing new
+ * data_ready sets that came during its ongoing read.
+ */
+driver-&amp;gt;data_ready_while_busy[i] |= USER_SPACE_LOG_TYPE;
+
 driver-&amp;gt;data_ready[i] |= USER_SPACE_LOG_TYPE;
 pr_debug("diag: wake up logging process\n");
 wake_up_interruptible(&amp;amp;driver-&amp;gt;wait_q);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2056,6 +2062,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void diagfwd_init(void)
 , GFP_KERNEL)) == NULL)
 goto err;
 kmemleak_not_leak(driver-&amp;gt;data_ready);
+if (driver-&amp;gt;data_ready_while_busy == NULL) {
+driver-&amp;gt;data_ready_while_busy = kzalloc(driver-&amp;gt;num_clients
+* sizeof(int)
+, GFP_KERNEL);
+if (driver-&amp;gt;data_ready_while_busy == NULL)
+goto err;
+}
+kmemleak_not_leak(driver-&amp;gt;data_ready_while_busy);
 if (driver-&amp;gt;table == NULL &amp;amp;&amp;amp;
      (driver-&amp;gt;table = kzalloc(diag_max_reg*
       sizeof(struct diag_master_table),
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2166,6 +2180,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; err:
 kfree(driver-&amp;gt;client_map);
 kfree(driver-&amp;gt;buf_tbl);
 kfree(driver-&amp;gt;data_ready);
+kfree(driver-&amp;gt;data_ready_while_busy);
 kfree(driver-&amp;gt;table);
 kfree(driver-&amp;gt;pkt_buf);
 kfree(driver-&amp;gt;write_ptr_1);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2217,6 +2232,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void diagfwd_exit(void)
 kfree(driver-&amp;gt;client_map);
 kfree(driver-&amp;gt;buf_tbl);
 kfree(driver-&amp;gt;data_ready);
+kfree(driver-&amp;gt;data_ready_while_busy);
 kfree(driver-&amp;gt;table);
 kfree(driver-&amp;gt;pkt_buf);
 kfree(driver-&amp;gt;write_ptr_1);
diff --git a/drivers/char/diag/diagfwd_hsic.c b/drivers/char/diag/diagfwd_hsic.c
index bd8c52b..94d8b9d 100644
--- a/drivers/char/diag/diagfwd_hsic.c
+++ b/drivers/char/diag/diagfwd_hsic.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,6 +45,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void diag_read_hsic_work_fn(struct work_struct *work)
 int num_reads_submitted = 0;
 int err = 0;
 int write_ptrs_available;
+int i;
 
 if (!driver-&amp;gt;hsic_ch) {
 pr_err("DIAG in %s: driver-&amp;gt;hsic_ch == 0\n", __func__);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -55,12 +56,30 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void diag_read_hsic_work_fn(struct work_struct *work)
  * Determine the current number of available buffers for writing after
  * reading from the HSIC has completed.
  */
-if (driver-&amp;gt;logging_mode == MEMORY_DEVICE_MODE)
-write_ptrs_available = driver-&amp;gt;poolsize_hsic_write -
-driver-&amp;gt;num_hsic_buf_tbl_entries;
-else
+if (driver-&amp;gt;logging_mode == MEMORY_DEVICE_MODE) {
+/*
+ * At very high logging rates on multi-core phones,
+ * it was observed that "count_hsic_write_pool" faced read/write
+ * race conditions (to increment and decrement) and became
+ * incorrect - so don't use it to determine the number of
+ * entries available - iterate through "hsic_buf_tbl" instead.
+ */
+write_ptrs_available = 0;
+i = (driver-&amp;gt;poolsize_hsic_write) - 1;
+for (; i &amp;gt;= 0; i--)
+if (driver-&amp;gt;hsic_buf_tbl[i].length == 0)
+write_ptrs_available++;
+} else {
 write_ptrs_available = driver-&amp;gt;poolsize_hsic_write -
 driver-&amp;gt;count_hsic_write_pool;
+}
+
+if (driver-&amp;gt;logging_mode == MEMORY_DEVICE_MODE &amp;amp;&amp;amp;
+(write_ptrs_available &amp;lt;= 0 ||
+write_ptrs_available &amp;gt; driver-&amp;gt;poolsize_hsic_write)) {
+pr_debug("diag: warning - probe write_ptrs_available: %d"
+, write_ptrs_available);
+}
 
 /*
  * Queue up a read on the HSIC for all available buffers in the
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -138,17 +157,50 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void diag_hsic_read_complete_callback(void *ctxt, char *buf,
 if (!buf) {
 pr_err("diag: Out of diagmem for HSIC\n");
 } else {
-/*
- * Send data in buf to be written on the
- * appropriate device, e.g. USB MDM channel
+
+/* Contradicting with the original comment above to send
+ * zero length entries, sending 0 length entries to the
+ * hsic_buf_tbl queue could cause it to  never be
+ * properly dequeued and never "diagmem_free()".
+ *
+ * This is because diagfwd.c's diag_device_write() would
+ * successfully "enqueue" it but then diagchar_core.c's
+ * diagchar_read() would omit it -
+ * because "if (driver-&amp;gt;hsic_buf_tbl[i].length &amp;gt; 0)"...
+ * So it won't be "dequeued" and also diagmem_free would
+ * not be called on it.
+ *
+ * Also, other diag_device_write() calls with non-0
+ * length entries would also overwrite this 0-length
+ * entry because of the
+ * "if (driver-&amp;gt;hsic_buf_tbl[i].length == 0)" check.
+ *
+ * Threrefore, if the actual_size is &amp;gt; 0, send it,
+ * but if the size is 0 then call diagmem_free
+ * on it and don't send it.
  */
-driver-&amp;gt;write_len_mdm = actual_size;
-err = diag_device_write((void *)buf, HSIC_DATA, NULL);
-/* If an error, return buffer to the pool */
-if (err) {
+
+if (actual_size &amp;gt; 0) {
+/*
+ * Send data in buf to be written on the
+ * appropriate device, e.g. USB MDM channel
+ */
+driver-&amp;gt;write_len_mdm = actual_size;
+err = diag_device_write((void *)buf,
+HSIC_DATA, NULL);
+/* If an error, return buffer to the pool */
+if (err) {
+diagmem_free(driver, buf,
+POOL_TYPE_HSIC);
+pr_err("diag: In %s, error calling diag_device_write, err: %d\n",
+__func__, err);
+}
+} else {
+/* if we reach here this means actual_size is 0
+ * then free and omit it.
+ */
+err = 0;
 diagmem_free(driver, buf, POOL_TYPE_HSIC);
-pr_err("diag: In %s, error calling diag_device_write, err: %d\n",
-__func__, err);
 }
 }
 } else {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -179,6 +231,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void diag_hsic_write_complete_callback(void *ctxt, char *buf,
 {
 /* The write of the data to the HSIC bridge is complete */
 driver-&amp;gt;in_busy_hsic_write = 0;
+wake_up_interruptible(&amp;amp;driver-&amp;gt;wait_q);
 
 if (!driver-&amp;gt;hsic_ch) {
 pr_err("DIAG in %s: driver-&amp;gt;hsic_ch == 0\n", __func__);
&lt;/pre&gt;</description>
    <dc:creator>Kasidit Yusuf</dc:creator>
    <dc:date>2013-05-20T08:17:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4025">
    <title>Would like to form a pool of Linux copyright holders for faster GPL enforcement against Anthrax Kernels</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4025</link>
    <description>&lt;pre&gt;Background on Anthrax Kernels and their GPL violation:
http://pastebin.com/X5Cciy03

Would anyone be interested in forming such a pool? I am willing to wait 
years for this to be resolved through certain organizations, but I 
believe we can do better.

Last I checked, I have 1 long-time poster of the gpl-violations list on 
board. Would anyone else like to join? Ideally I'd like to get the LKML 
(which I have CC'd among others) involved so that authors of critical 
Linux components be a part of this. I'm not sure if my defconfig commits 
to Android kernel branches count as contributions, so I'm not going to 
consider myself a Linux contributor unless told otherwise.

This pool would be used in the following manner:

* Formally requesting source for binaries (means to request source is 
actively hidden)
* Formally requesting removal of critical copyrighted code that Linux 
cannot function without
* Informing interested parties with respect to refusals of the above

The CTO of Anthrax's hosting server is very interested in terminating 
Chad Goodman's account. Bullet point #3 might come into effect here.

If this is a bad idea, breaks list etiquette, uses incorrect logic, or 
does not follow the conventions of GPL enforcement, feel free to shoot 
this idea down with utmost prejudice.

- Eric
&lt;/pre&gt;</description>
    <dc:creator>Eric Appleman</dc:creator>
    <dc:date>2013-05-18T08:21:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4022">
    <title>Re: [PATCH v2] clk: Fix race condition between clk_set_parent and clk_enable()</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4022</link>
    <description>&lt;pre&gt;
Thanks Mike. I forgot to add the Ack by Ulf. Would be nice if you can 
put that in.

Btw, I did send this email to the list. But looks like this mail is 
wedged in the series of tubes in the arm mailing list.

-Saravana


&lt;/pre&gt;</description>
    <dc:creator>Saravana Kannan</dc:creator>
    <dc:date>2013-05-16T21:31:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4021">
    <title>Re: [PATCH v2] clk: Fix race condition between clk_set_parent and clk_enable()</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4021</link>
    <description>&lt;pre&gt;Quoting Saravana Kannan (2013-05-15 21:07:24)

Updated to this version in clk-next.

Thanks,
Mike

&lt;/pre&gt;</description>
    <dc:creator>Mike Turquette</dc:creator>
    <dc:date>2013-05-16T20:44:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4020">
    <title>Re: [PATCH v2 1/2] clk: Disable unused clocks after deferred probing is done</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4020</link>
    <description>&lt;pre&gt;
No, we are just reordering the steps.

-Saravana


&lt;/pre&gt;</description>
    <dc:creator>Saravana Kannan</dc:creator>
    <dc:date>2013-05-16T19:23:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4019">
    <title>Re: [PATCH v2 1/2] clk: Disable unused clocks after deferred probing is done</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4019</link>
    <description>&lt;pre&gt;
Without giving this too much thinking... Will boot time be affected
with this change?

Kind regards
Ulf Hansson

&lt;/pre&gt;</description>
    <dc:creator>Ulf Hansson</dc:creator>
    <dc:date>2013-05-16T12:55:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4015">
    <title>Re: [PATCH v2 1/2] clk: Disable unused clocks after deferred probing is done</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4015</link>
    <description>&lt;pre&gt;
Mike,

Thoughts? Picking it up? Removing the existing auto-disable code (I 
think they are still useful)?

-Saravana


&lt;/pre&gt;</description>
    <dc:creator>Saravana Kannan</dc:creator>
    <dc:date>2013-05-16T04:34:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4013">
    <title>[PATCH v2] clk: Fix race condition between clk_set_parent and clk_enable()</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4013</link>
    <description>&lt;pre&gt;Without this patch, the following race condition is possible.
* clk-A has two parents - clk-X and clk-Y.
* All three are disabled and clk-X is current parent.
* Thread A: clk_set_parent(clk-A, clk-Y).
* Thread A: &amp;lt;snip execution flow&amp;gt;
* Thread A: Grabs enable lock.
* Thread A: Sees enable count of clk-A is 0, so doesn't enable clk-Y.
* Thread A: Updates clk-A SW parent to clk-Y
* Thread A: Releases enable lock.
* Thread B: clk_enable(clk-A).
* Thread B: clk_enable() enables clk-Y, then enabled clk-A and returns.

clk-A is now enabled in software, but not clocking in hardware since the
hardware parent is still clk-X.

The only way to avoid race conditions between clk_set_parent() and
clk_enable/disable() is to ensure that clk_enable/disable() calls don't
require changes to hardware enable state between changes to software clock
topology and hardware clock topology.

The options to achieve the above are:
1. Grab the enable lock before changing software/hardware topology and
   release it afterwards.
2. Keep the clock enabled for the duration of software/hardware topology
   change so that any additional enable/disable calls don't try to change
   the hardware state. Once the topology change is complete, the clock can
   be put back in its original enable state.

Option (1) is not an acceptable solution since the set_parent() ops might
need to sleep.

Therefore, this patch implements option (2).

This patch doesn't violate any API semantics. clk_disable() doesn't
guarantee that the clock is actually disabled. So, no clients of a clock
can assume that a clock is disabled after their last call to clk_disable().
So, enabling the clock during a parent change is not a violation of any API
semantics.

This also has the nice side effect of simplifying the error handling code.

Signed-off-by: Saravana Kannan &amp;lt;skannan&amp;lt; at &amp;gt;codeaurora.org&amp;gt;
---
 drivers/clk/clk.c |   91 ++++++++++++++++++++++++++---------------------------
 1 files changed, 45 insertions(+), 46 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 934cfd1..b4dbb8c 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1377,67 +1377,61 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __clk_set_parent(struct clk *clk, struct clk *parent, u8 p_index)
 unsigned long flags;
 int ret = 0;
 struct clk *old_parent = clk-&amp;gt;parent;
-bool migrated_enable = false;
 
-/* migrate prepare */
-if (clk-&amp;gt;prepare_count)
+/*
+ * Migrate prepare state between parents and prevent race with
+ * clk_enable().
+ *
+ * If the clock is not prepared, then a race with
+ * clk_enable/disable() is impossible since we already have the
+ * prepare lock (future calls to clk_enable() need to be preceded by
+ * a clk_prepare()).
+ *
+ * If the clock is prepared, migrate the prepared state to the new
+ * parent and also protect against a race with clk_enable() by
+ * forcing the clock and the new parent on.  This ensures that all
+ * future calls to clk_enable() are practically NOPs with respect to
+ * hardware and software states.
+ *
+ * See also: Comment for clk_set_parent() below.
+ */
+if (clk-&amp;gt;prepare_count) {
 __clk_prepare(parent);
-
-flags = clk_enable_lock();
-
-/* migrate enable */
-if (clk-&amp;gt;enable_count) {
-__clk_enable(parent);
-migrated_enable = true;
+clk_enable(parent);
+clk_enable(clk);
 }
 
 /* update the clk tree topology */
+flags = clk_enable_lock();
 clk_reparent(clk, parent);
-
 clk_enable_unlock(flags);
 
 /* change clock input source */
 if (parent &amp;amp;&amp;amp; clk-&amp;gt;ops-&amp;gt;set_parent)
 ret = clk-&amp;gt;ops-&amp;gt;set_parent(clk-&amp;gt;hw, p_index);
-
 if (ret) {
-/*
- * The error handling is tricky due to that we need to release
- * the spinlock while issuing the .set_parent callback. This
- * means the new parent might have been enabled/disabled in
- * between, which must be considered when doing rollback.
- */
-flags = clk_enable_lock();
 
+flags = clk_enable_lock();
 clk_reparent(clk, old_parent);
-
-if (migrated_enable &amp;amp;&amp;amp; clk-&amp;gt;enable_count) {
-__clk_disable(parent);
-} else if (migrated_enable &amp;amp;&amp;amp; (clk-&amp;gt;enable_count == 0)) {
-__clk_disable(old_parent);
-} else if (!migrated_enable &amp;amp;&amp;amp; clk-&amp;gt;enable_count) {
-__clk_disable(parent);
-__clk_enable(old_parent);
-}
-
 clk_enable_unlock(flags);
 
-if (clk-&amp;gt;prepare_count)
+if (clk-&amp;gt;prepare_count) {
+clk_disable(clk);
+clk_disable(parent);
 __clk_unprepare(parent);
-
+}
 return ret;
 }
 
-/* clean up enable for old parent if migration was done */
-if (migrated_enable) {
-flags = clk_enable_lock();
-__clk_disable(old_parent);
-clk_enable_unlock(flags);
-}
-
-/* clean up prepare for old parent if migration was done */
-if (clk-&amp;gt;prepare_count)
+/*
+ * Finish the migration of prepare state and undo the changes done
+ * for preventing a race with clk_enable().
+ */
+if (clk-&amp;gt;prepare_count) {
+clk_disable(clk);
+clk_disable(old_parent);
 __clk_unprepare(old_parent);
+}
 
 /* update debugfs with new clk tree topology */
 clk_debug_reparent(clk, parent);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1449,12 +1443,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __clk_set_parent(struct clk *clk, struct clk *parent, u8 p_index)
  * &amp;lt; at &amp;gt;clk: the mux clk whose input we are switching
  * &amp;lt; at &amp;gt;parent: the new input to clk
  *
- * Re-parent clk to use parent as it's new input source.  If clk has the
- * CLK_SET_PARENT_GATE flag set then clk must be gated for this
- * operation to succeed.  After successfully changing clk's parent
- * clk_set_parent will update the clk topology, sysfs topology and
- * propagate rate recalculation via __clk_recalc_rates.  Returns 0 on
- * success, -EERROR otherwise.
+ * Re-parent clk to use parent as its new input source.  If clk is in
+ * prepared state, the clk will get enabled for the duration of this call. If
+ * that's not acceptable for a specific clk (Eg: the consumer can't handle
+ * that, the reparenting is glitchy in hardware, etc), use the
+ * CLK_SET_PARENT_GATE flag to allow reparenting only when clk is unprepared.
+ *
+ * After successfully changing clk's parent clk_set_parent will update the
+ * clk topology, sysfs topology and propagate rate recalculation via
+ * __clk_recalc_rates.
+ *
+ * Returns 0 on success, -EERROR otherwise.
  */
 int clk_set_parent(struct clk *clk, struct clk *parent)
 {
&lt;/pre&gt;</description>
    <dc:creator>Saravana Kannan</dc:creator>
    <dc:date>2013-05-16T04:07:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4012">
    <title>Re: [PATCH] ARM: avoid mis-detecting some V7 cores in the decompressor</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4012</link>
    <description>&lt;pre&gt;
Ping?



&lt;/pre&gt;</description>
    <dc:creator>Stephen Boyd</dc:creator>
    <dc:date>2013-05-15T19:38:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4011">
    <title>Re: [PATCH] clk: Fix race condition between clk_set_parent and clk_enable()</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4011</link>
    <description>&lt;pre&gt;
Maybe an additional note about that since CLK_SET_PARENT_GATE is a
prerequisite for doing migration of "prepare", we also interpreted
this flags as it is acceptable to enable the clock(s) in this context.


Really good, that we can remove this awkward error handling!


Looks good! Thanks for having another round to fixup this kind of
tricky code. :-)

Acked-by: Ulf Hansson &amp;lt;ulf.hansson&amp;lt; at &amp;gt;linaro.org&amp;gt;
&lt;/pre&gt;</description>
    <dc:creator>Ulf Hansson</dc:creator>
    <dc:date>2013-05-15T19:24:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4008">
    <title>Re: [PATCHv2] arm: mm: Use phys_addr_t properly for ioremapfunctions</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4008</link>
    <description>&lt;pre&gt;
Maybe there's a project there for someone to remove phys_addr_t or
resource_size_t then - but I suspect Linus won't like the churn
caused by that...

So, let's just go by the one which takes less typing and save our
fingers.  phys_addr_t.
&lt;/pre&gt;</description>
    <dc:creator>Russell King - ARM Linux</dc:creator>
    <dc:date>2013-05-15T16:48:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.ports.arm.msm/4007">
    <title>Re: [PATCHv2] arm: mm: Use phys_addr_t properly for ioremap functions</title>
    <link>http://permalink.gmane.org/gmane.linux.ports.arm.msm/4007</link>
    <description>&lt;pre&gt;
Looks good to me. I wonder a bit whether resource_size_t or phys_addr_t
is the right type here, but they are always defined to the same type
these days.

FWIW, x86 and tile use resource_size_t, while a couple of other architectures
use phys_addr_t.

Arnd
&lt;/pre&gt;</description>
    <dc:creator>Arnd Bergmann</dc:creator>
    <dc:date>2013-05-15T14:15:39</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.ports.arm.msm">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.ports.arm.msm</link>
  </textinput>
</rdf:RDF>
