<?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://comments.gmane.org/gmane.linux.ports.arm.msm/4056"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/4051"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/4050"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/4040"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/4036"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/4032"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/4031"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/4027"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/4025"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3989"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3958"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3937"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3926"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3908"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3879"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3878"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3876"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3872"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3868"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.ports.arm.msm/3852"/>
      </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://comments.gmane.org/gmane.linux.ports.arm.msm/4056">
    <title>[PATCH] arch: arm: mach-msm: using strlcpy instead of strncpy</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/4056</link>
    <description>&lt;pre&gt;
For NULL terminated string, need always be sure of ended by zero.

Or the next 'ptr' in 'for' looping may cause issue.


Signed-off-by: Chen Gang &amp;lt;gang.chen&amp;lt; at &amp;gt;asianux.com&amp;gt;
---
 arch/arm/mach-msm/clock-debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-msm/clock-debug.c b/arch/arm/mach-msm/clock-debug.c
index 4886404..b0fbdf1 100644
--- a/arch/arm/mach-msm/clock-debug.c
+++ b/arch/arm/mach-msm/clock-debug.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -104,7 +104,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int __init clock_debug_add(struct clk *clock)
 if (!debugfs_base)
 return -ENOMEM;
 
-strncpy(temp, clock-&amp;gt;dbg_name, ARRAY_SIZE(temp)-1);
+strlcpy(temp, clock-&amp;gt;dbg_name, ARRAY_SIZE(temp));
 for (ptr = temp; *ptr; ptr++)
 *ptr = tolower(*ptr);
 
&lt;/pre&gt;</description>
    <dc:creator>Chen Gang</dc:creator>
    <dc:date>2013-05-26T06:54:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/4051">
    <title>[PATCHv3 0/3] Cleanup MSM_GPIOMUX and add DT support for gpio-msm</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/4051</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                         |  170 ++++++++++++--------
 13 files changed, 176 insertions(+), 192 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-24T18:32:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/4050">
    <title>[PATCHv2 0/3] Cleanup MSM_GPIOMUX and add DT support for gpio-msm</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/4050</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                         |  170 ++++++++++++--------
 13 files changed, 176 insertions(+), 192 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-24T18:30:56</dc:date>
  </item>
  <item rdf:about="http://comments.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://comments.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://comments.gmane.org/gmane.linux.ports.arm.msm/4036">
    <title>[RFC/PATCH 0/2] Remove most of_device_match() calls</title>
    <link>http://comments.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://comments.gmane.org/gmane.linux.ports.arm.msm/4032">
    <title>[PATCH 0/3] Cleanup MSM_GPIOMUX and add device-tree support for</title>
    <link>http://comments.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://comments.gmane.org/gmane.linux.ports.arm.msm/4031">
    <title>[PATCH] ARM: dts: msm: Fix bad register addresses</title>
    <link>http://comments.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://comments.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://comments.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://comments.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://comments.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://comments.gmane.org/gmane.linux.ports.arm.msm/3989">
    <title>[PATCHv2] arm: mm: Use phys_addr_t properly for ioremap functions</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3989</link>
    <description>&lt;pre&gt;Several of the ioremap functions use unsigned long in places
resulting in truncation if physical addresses greater than
4G are passed in. Change the types of the functions and the
callers accordingly.

Cc: Krzysztof Halasa &amp;lt;khc&amp;lt; at &amp;gt;pm.waw.pl&amp;gt;
Cc: Arnd Bergmann &amp;lt;arnd&amp;lt; at &amp;gt;arndb.de&amp;gt;
Cc: Stephen Boyd &amp;lt;sboyd&amp;lt; at &amp;gt;codeaurora.org&amp;gt;
Cc: Russell King &amp;lt;linux&amp;lt; at &amp;gt;arm.linux.org.uk&amp;gt;
Signed-off-by: Laura Abbott &amp;lt;lauraa&amp;lt; at &amp;gt;codeaurora.org&amp;gt;
---
 arch/arm/include/asm/io.h     |    8 ++++----
 arch/arm/mach-ebsa110/core.c  |    2 +-
 arch/arm/mach-imx/mm-imx3.c   |    2 +-
 arch/arm/mach-iop13xx/io.c    |    2 +-
 arch/arm/mach-ixp4xx/common.c |    2 +-
 arch/arm/mach-msm/common.h    |    2 +-
 arch/arm/mach-msm/io.c        |    2 +-
 arch/arm/mm/ioremap.c         |   10 +++++-----
 arch/arm/mm/nommu.c           |    6 +++---
 9 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 652b560..d070741 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -130,16 +130,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline u32 __raw_readl(const volatile void __iomem *addr)
  */
 extern void __iomem *__arm_ioremap_pfn_caller(unsigned long, unsigned long,
 size_t, unsigned int, void *);
-extern void __iomem *__arm_ioremap_caller(unsigned long, size_t, unsigned int,
+extern void __iomem *__arm_ioremap_caller(phys_addr_t, size_t, unsigned int,
 void *);
 
 extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int);
-extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
-extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
+extern void __iomem *__arm_ioremap(phys_addr_t, size_t, unsigned int);
+extern void __iomem *__arm_ioremap_exec(phys_addr_t, size_t, bool cached);
 extern void __iounmap(volatile void __iomem *addr);
 extern void __arm_iounmap(volatile void __iomem *addr);
 
-extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
+extern void __iomem * (*arch_ioremap_caller)(phys_addr_t, size_t,
 unsigned int, void *);
 extern void (*arch_iounmap)(volatile void __iomem *);
 
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index b13cc74..8a53f34 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -116,7 +116,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __init ebsa110_map_io(void)
 iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc));
 }
 
-static void __iomem *ebsa110_ioremap_caller(unsigned long cookie, size_t size,
+static void __iomem *ebsa110_ioremap_caller(phys_addr_t cookie, size_t size,
     unsigned int flags, void *caller)
 {
 return (void __iomem *)cookie;
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index e0e69a6..eed32ca 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -65,7 +65,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void imx3_idle(void)
 : "=r" (reg));
 }
 
-static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size,
+static void __iomem *imx3_ioremap_caller(phys_addr_t phys_addr, size_t size,
  unsigned int mtype, void *caller)
 {
 if (mtype == MT_DEVICE) {
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index 183dc8b..faaf7d4 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -23,7 +23,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "pci.h"
 
-static void __iomem *__iop13xx_ioremap_caller(unsigned long cookie,
+static void __iomem *__iop13xx_ioremap_caller(phys_addr_t cookie,
 size_t size, unsigned int mtype, void *caller)
 {
 void __iomem * retval;
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 6600cff..d7223b3 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -559,7 +559,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void ixp4xx_restart(char mode, const char *cmd)
  * fallback to the default.
  */
 
-static void __iomem *ixp4xx_ioremap_caller(unsigned long addr, size_t size,
+static void __iomem *ixp4xx_ioremap_caller(phys_addr_t addr, size_t size,
    unsigned int mtype, void *caller)
 {
 if (!is_pci_memory(addr))
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
index ce8215a..421cf77 100644
--- a/arch/arm/mach-msm/common.h
+++ b/arch/arm/mach-msm/common.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -23,7 +23,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern void msm_map_msm8x60_io(void);
 extern void msm_map_msm8960_io(void);
 extern void msm_map_qsd8x50_io(void);
 
-extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
+extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
   unsigned int mtype, void *caller);
 
 extern struct smp_operations msm_smp_ops;
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 123ef9c..fd65b6d 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -172,7 +172,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void __init msm_map_msm7x30_io(void)
 }
 #endif /* CONFIG_ARCH_MSM7X30 */
 
-void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
+void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
    unsigned int mtype, void *caller)
 {
 if (mtype == MT_DEVICE) {
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 04d9006..f123d6e 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -331,10 +331,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
 return (void __iomem *) (offset + addr);
 }
 
-void __iomem *__arm_ioremap_caller(unsigned long phys_addr, size_t size,
+void __iomem *__arm_ioremap_caller(phys_addr_t phys_addr, size_t size,
 unsigned int mtype, void *caller)
 {
-unsigned long last_addr;
+phys_addr_t last_addr;
  unsigned long offset = phys_addr &amp;amp; ~PAGE_MASK;
  unsigned long pfn = __phys_to_pfn(phys_addr);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -367,12 +367,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
 }
 EXPORT_SYMBOL(__arm_ioremap_pfn);
 
-void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
+void __iomem * (*arch_ioremap_caller)(phys_addr_t, size_t,
       unsigned int, void *) =
 __arm_ioremap_caller;
 
 void __iomem *
-__arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
+__arm_ioremap(phys_addr_t phys_addr, size_t size, unsigned int mtype)
 {
 return arch_ioremap_caller(phys_addr, size, mtype,
 __builtin_return_address(0));
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -387,7 +387,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; EXPORT_SYMBOL(__arm_ioremap);
  * CONFIG_GENERIC_ALLOCATOR for allocating external memory.
  */
 void __iomem *
-__arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached)
+__arm_ioremap_exec(phys_addr_t phys_addr, size_t size, bool cached)
 {
 unsigned int mtype;
 
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index d51225f..31bd77b 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -81,16 +81,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void __iomem *__arm_ioremap_pfn_caller(unsigned long pfn, unsigned long offset,
 return __arm_ioremap_pfn(pfn, offset, size, mtype);
 }
 
-void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size,
+void __iomem *__arm_ioremap(phys_addr_t phys_addr, size_t size,
     unsigned int mtype)
 {
 return (void __iomem *)phys_addr;
 }
 EXPORT_SYMBOL(__arm_ioremap);
 
-void __iomem * (*arch_ioremap_caller)(unsigned long, size_t, unsigned int, void *);
+void __iomem * (*arch_ioremap_caller)(phys_addr_t, size_t, unsigned int, void *);
 
-void __iomem *__arm_ioremap_caller(unsigned long phys_addr, size_t size,
+void __iomem *__arm_ioremap_caller(phys_addr_t phys_addr, size_t size,
    unsigned int mtype, void *caller)
 {
 return __arm_ioremap(phys_addr, size, mtype);
&lt;/pre&gt;</description>
    <dc:creator>Laura Abbott</dc:creator>
    <dc:date>2013-05-14T19:33:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3958">
    <title>[PATCH] timer: Don't reinitialize the cpu base lock during CPU_UP_PREPARE</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3958</link>
    <description>&lt;pre&gt;An inactive timer's base can refer to a offline cpu's base.

In the current code, cpu_base's lock is blindly reinitialized
each time a CPU is brought up. If a CPU is brought online
during the period that another thread is trying to modify an
inactive timer on that CPU with holding its timer base lock,
then the lock will be reinitialized under its feet. This leads
to following SPIN_BUG().

&amp;lt;0&amp;gt; BUG: spinlock already unlocked on CPU#3, kworker/u:3/1466
&amp;lt;0&amp;gt; lock: 0xe3ebe000, .magic: dead4ead, .owner: kworker/u:3/1466, .owner_cpu: 1
&amp;lt;4&amp;gt; [&amp;lt;c0013dc4&amp;gt;] (unwind_backtrace+0x0/0x11c) from [&amp;lt;c026e794&amp;gt;] (do_raw_spin_unlock+0x40/0xcc)
&amp;lt;4&amp;gt; [&amp;lt;c026e794&amp;gt;] (do_raw_spin_unlock+0x40/0xcc) from [&amp;lt;c076c160&amp;gt;] (_raw_spin_unlock+0x8/0x30)
&amp;lt;4&amp;gt; [&amp;lt;c076c160&amp;gt;] (_raw_spin_unlock+0x8/0x30) from [&amp;lt;c009b858&amp;gt;] (mod_timer+0x294/0x310)
&amp;lt;4&amp;gt; [&amp;lt;c009b858&amp;gt;] (mod_timer+0x294/0x310) from [&amp;lt;c00a5e04&amp;gt;] (queue_delayed_work_on+0x104/0x120)
&amp;lt;4&amp;gt; [&amp;lt;c00a5e04&amp;gt;] (queue_delayed_work_on+0x104/0x120) from [&amp;lt;c04eae00&amp;gt;] (sdhci_msm_bus_voting+0x88/0x9c)
&amp;lt;4&amp;gt; [&amp;lt;c04eae00&amp;gt;] (sdhci_msm_bus_voting+0x88/0x9c) from [&amp;lt;c04d8780&amp;gt;] (sdhci_disable+0x40/0x48)
&amp;lt;4&amp;gt; [&amp;lt;c04d8780&amp;gt;] (sdhci_disable+0x40/0x48) from [&amp;lt;c04bf300&amp;gt;] (mmc_release_host+0x4c/0xb0)
&amp;lt;4&amp;gt; [&amp;lt;c04bf300&amp;gt;] (mmc_release_host+0x4c/0xb0) from [&amp;lt;c04c7aac&amp;gt;] (mmc_sd_detect+0x90/0xfc)
&amp;lt;4&amp;gt; [&amp;lt;c04c7aac&amp;gt;] (mmc_sd_detect+0x90/0xfc) from [&amp;lt;c04c2504&amp;gt;] (mmc_rescan+0x7c/0x2c4)
&amp;lt;4&amp;gt; [&amp;lt;c04c2504&amp;gt;] (mmc_rescan+0x7c/0x2c4) from [&amp;lt;c00a6a7c&amp;gt;] (process_one_work+0x27c/0x484)
&amp;lt;4&amp;gt; [&amp;lt;c00a6a7c&amp;gt;] (process_one_work+0x27c/0x484) from [&amp;lt;c00a6e94&amp;gt;] (worker_thread+0x210/0x3b0)
&amp;lt;4&amp;gt; [&amp;lt;c00a6e94&amp;gt;] (worker_thread+0x210/0x3b0) from [&amp;lt;c00aad9c&amp;gt;] (kthread+0x80/0x8c)
&amp;lt;4&amp;gt; [&amp;lt;c00aad9c&amp;gt;] (kthread+0x80/0x8c) from [&amp;lt;c000ea80&amp;gt;] (kernel_thread_exit+0x0/0x8)

As an example, this particular crash occurred when CPU #3 is executing
mod_timer() on an inactive timer whose base is refered to offlined CPU #2.
The code locked the timer_base corresponding to CPU #2. Before it could
proceed, CPU #2 came online and reinitialized the spinlock corresponding
to its base. Thus now CPU #3 held a lock which was reinitialized. When
CPU #3 finally ended up unlocking the old cpu_base corresponding to CPU #2,
we hit the above SPIN_BUG().

CPU #0CPU #3       CPU #2
-------------       -------
..... ......      &amp;lt;Offline&amp;gt;
mod_timer()
 lock_timer_base
   spin_lock_irqsave(&amp;amp;base-&amp;gt;lock)

cpu_up(2) .....        ......
init_timers_cpu()
.... .....      spin_lock_init(&amp;amp;base-&amp;gt;lock)
.....  spin_unlock_irqrestore(&amp;amp;base-&amp;gt;lock)    ......
   &amp;lt;spin_bug&amp;gt;

Allocation of per_cpu timer vector bases is done only once under
"tvec_base_done[]" check. In the current code, spinlock_initialization
of base-&amp;gt;lock isn't under this check. When a CPU is up each time the base
lock is reinitialized. Move base spinlock initialization under the check.

Signed-off-by: Tirupathi Reddy &amp;lt;tirupath&amp;lt; at &amp;gt;codeaurora.org&amp;gt;
---
 kernel/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index dbf7a78..1b399c8 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1678,12 +1678,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __cpuinit init_timers_cpu(int cpu)
 boot_done = 1;
 base = &amp;amp;boot_tvec_bases;
 }
+spin_lock_init(&amp;amp;base-&amp;gt;lock);
 tvec_base_done[cpu] = 1;
 } else {
 base = per_cpu(tvec_bases, cpu);
 }

-spin_lock_init(&amp;amp;base-&amp;gt;lock);

 for (j = 0; j &amp;lt; TVN_SIZE; j++) {
 INIT_LIST_HEAD(base-&amp;gt;tv5.vec + j);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

&lt;/pre&gt;</description>
    <dc:creator>Tirupathi Reddy</dc:creator>
    <dc:date>2013-05-14T08:29:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3937">
    <title>[PATCHv3 0/4] Memory mapped architected timers</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3937</link>
    <description>&lt;pre&gt;This patchset adds support for memory mapped architected timers. We
don't have any other global broadcast timer in our system, so we use the
mmio timer during low power modes. The first patch is the binding.
The next two patches lay some groundwork so that the last patch is simpler.
The final patch adds support for mmio timers.

Patches are based on a patch from Mark that removes the
physical count reading (clocksource: arch_timer: use virtual counter,
message id &amp;lt;1364404312-4427-4-git-send-email-mark.rutland&amp;lt; at &amp;gt;arm.com&amp;gt;).

Updates since v2:
 * Rebased onto v3.10-rc1

Updates since v1:
 * Assigned counter reading function and commented why for arm64
 * Updated DT binding to replace frame-id with frame-number and use status
   property

Stephen Boyd (4):
  Documentation: Add memory mapped ARM architected timer binding
  clocksource: arch_timer: Pass clock event to set_mode callback
  clocksource: arch_timer: Push the read/write wrappers deeper
  clocksource: arch_timer: Add support for memory mapped timers

 .../devicetree/bindings/arm/arch_timer.txt         |  59 ++-
 arch/arm/include/asm/arch_timer.h                  |   5 +-
 arch/arm64/include/asm/arch_timer.h                |   4 +-
 drivers/clocksource/arm_arch_timer.c               | 452 +++++++++++++++++----
 include/clocksource/arm_arch_timer.h               |   4 +-
 5 files changed, 448 insertions(+), 76 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Stephen Boyd</dc:creator>
    <dc:date>2013-05-13T19:56:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3926">
    <title>[PATCHv6 00/11] Remove ARM local timer API</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3926</link>
    <description>&lt;pre&gt;In light of Mark Rutland's recent work on divorcing the ARM architected
timers from the ARM local timer API and introducing a generic arch hook for
broadcast it seems that we should remove the local timer API entirely.
Doing so will reduce the architecture dependencies of our timer drivers,
reduce code in ARM core, and simplify timer drivers because they no longer
go through an architecture layer that is essentially a hotplug notifier.

Previous attempts have been made[1] unsuccessfully. I'm hoping this can
be accepted now so that we can clean up the timer drivers that are
used in both UP and SMP situations. Right now these drivers have to ignore
the timer setup callback on the boot CPU to avoid registering clockevents
twice. This is not very symmetric and causes convuluted code that does
the same thing in two places.

Patches based on next-20130418

I'm still looking for Acks/Tested-by on EXYNOS and PRIMA2.

[1] http://article.gmane.org/gmane.linux.ports.arm.kernel/145705

Note: A hotplug notifier is used by both x86 for the apb_timer (see 
apbt_cpuhp_notify) and by metag (see arch_timer_cpu_notify in
metag_generic.c) so this is not new.

Changes since v5:
 * Rebased onto v3.10-rc1
 * Rebase caused minor updates to mct patch

Changes since v4:
 * Rebased onto next-20130418
 * Rebase caused minor updates to mct patch and twd Kconfig

Changes since v3:
 * New patch to fix SMP with dummy timers registered after a global timer
 * Push this_cpu_ptr lower to avoid preemptible false positive warnings
 * Collected acks/tested-bys

Changes since v2:
 * Bug fixes in smp_twd from Tony Lindgren's testing
 * Move smp_twd to use late_time_init hook
 * Collected Acks

Changes since v1:
 * Picked up Mark's generic dummy timer driver
 * Split out omap changes into new patch

Mark Rutland (1):
  clocksource: add generic dummy timer driver

Stephen Boyd (10):
  clockevents: Prefer CPU local devices over global devices
  ARM: smp: Remove duplicate dummy timer implementation
  ARM: smp_twd: Divorce smp_twd from local timer API
  ARM: OMAP2+: Divorce from local timer API
  ARM: EXYNOS4: Divorce mct from local timer API
  ARM: PRIMA2: Divorce timer-marco from local timer API
  ARM: msm: Divorce msm_timer from local timer API
  clocksource: time-armada-370-xp: Fix sparse warning
  clocksource: time-armada-370-xp: Divorce from local timer API
  ARM: smp: Remove local timer API

 arch/arm/Kconfig                         |  12 +--
 arch/arm/include/asm/localtimer.h        |  34 ---------
 arch/arm/kernel/smp.c                    |  87 ---------------------
 arch/arm/kernel/smp_twd.c                |  64 ++++++++++------
 arch/arm/mach-highbank/Kconfig           |   2 +-
 arch/arm/mach-imx/Kconfig                |   2 +-
 arch/arm/mach-msm/timer.c                | 126 +++++++++++++++++--------------
 arch/arm/mach-omap2/Kconfig              |   3 +-
 arch/arm/mach-omap2/timer.c              |   7 --
 arch/arm/mach-realview/Kconfig           |   8 +-
 arch/arm/mach-spear/Kconfig              |   2 +-
 arch/arm/mach-tegra/Kconfig              |   2 +-
 arch/arm/mach-ux500/Kconfig              |   2 +-
 arch/arm/mach-vexpress/Kconfig           |   2 +-
 arch/arm/mach-zynq/Kconfig               |   2 +-
 drivers/clocksource/Makefile             |   1 +
 drivers/clocksource/dummy_timer.c        |  69 +++++++++++++++++
 drivers/clocksource/exynos_mct.c         |  60 ++++++++++-----
 drivers/clocksource/time-armada-370-xp.c |  92 +++++++++++-----------
 drivers/clocksource/timer-marco.c        | 100 +++++++++++++-----------
 include/linux/time-armada-370-xp.h       |   4 +-
 kernel/time/tick-common.c                |   5 +-
 22 files changed, 340 insertions(+), 346 deletions(-)
 delete mode 100644 arch/arm/include/asm/localtimer.h
 create mode 100644 drivers/clocksource/dummy_timer.c

&lt;/pre&gt;</description>
    <dc:creator>Stephen Boyd</dc:creator>
    <dc:date>2013-05-13T19:26:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3908">
    <title>[PATCH V1 0/8] ufs patch siries</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3908</link>
    <description>&lt;pre&gt;This patch series clusters the latest version of all the UFS patches in the
SCSI mailing list. It gives a stable functional base line for the UFS driver.

It includes the following versions:

But does not include:


Dolev Raviv (8):
  Documentation: devicetree: Add DT bindings for UFS host controller
  scsi: ufs: Fix the response UPIU length setting
  scsi: ufs: wrap the i/o access operations
  scsi: ufs: amend interrupt configuration
  scsi: ufs: fix interrupt status clears
  scsi: ufs: rework link start-up process
  scsi: ufs: Add support for sending NOP OUT UPIU
  scsi: ufs: Set fDeviceInit flag to initiate device initialization

 .../devicetree/bindings/ufs/ufshcd-pltfrm.txt      |   16 +
 drivers/scsi/ufs/ufs.h                             |   10 +-
 drivers/scsi/ufs/ufshcd.c                          |  839 ++++++++++++++++----
 drivers/scsi/ufs/ufshcd.h                          |   25 +-
 drivers/scsi/ufs/ufshci.h                          |    5 +-
 5 files changed, 721 insertions(+), 174 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt

&lt;/pre&gt;</description>
    <dc:creator>Dolev Raviv</dc:creator>
    <dc:date>2013-05-13T10:02:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3879">
    <title>[PATCH V1 0/8] ufs patch siries</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3879</link>
    <description>&lt;pre&gt;This patch series clusters the latest version of all the UFS patches in the
SCSI mailing list. It gives a stable functional base line for the UFS driver.

It includes the following versions:

But does not include:


Dolev Raviv (8):
  Documentation: devicetree: Add DT bindings for UFS host controller
  scsi: ufs: Fix the response UPIU length setting
  scsi: ufs: wrap the i/o access operations
  scsi: ufs: amend interrupt configuration
  scsi: ufs: fix interrupt status clears
  scsi: ufs: rework link start-up process
  scsi: ufs: Add support for sending NOP OUT UPIU
  scsi: ufs: Set fDeviceInit flag to initiate device initialization

 .../devicetree/bindings/ufs/ufshcd-pltfrm.txt      |   16 +
 drivers/scsi/ufs/ufs.h                             |   10 +-
 drivers/scsi/ufs/ufshcd.c                          |  839 ++++++++++++++++----
 drivers/scsi/ufs/ufshcd.h                          |   25 +-
 drivers/scsi/ufs/ufshci.h                          |    5 +-
 5 files changed, 721 insertions(+), 174 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt

&lt;/pre&gt;</description>
    <dc:creator>Dolev Raviv</dc:creator>
    <dc:date>2013-05-12T14:23:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3878">
    <title>[PATCH V1 0/8] ufs patch siries</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3878</link>
    <description>&lt;pre&gt;This patch series clusters the latest version of all the UFS patches in the
SCSI mailing list. It gives a stable functional base line for the UFS driver.

It includes the following versions:

But does not include:


Dolev Raviv (8):
  Documentation: devicetree: Add DT bindings for UFS host controller
  scsi: ufs: Fix the response UPIU length setting
  scsi: ufs: wrap the i/o access operations
  scsi: ufs: amend interrupt configuration
  scsi: ufs: fix interrupt status clears
  scsi: ufs: rework link start-up process
  scsi: ufs: Add support for sending NOP OUT UPIU
  scsi: ufs: Set fDeviceInit flag to initiate device initialization

 .../devicetree/bindings/ufs/ufshcd-pltfrm.txt      |   16 +
 drivers/scsi/ufs/ufs.h                             |   10 +-
 drivers/scsi/ufs/ufshcd.c                          |  839 ++++++++++++++++----
 drivers/scsi/ufs/ufshcd.h                          |   25 +-
 drivers/scsi/ufs/ufshci.h                          |    5 +-
 5 files changed, 721 insertions(+), 174 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt

&lt;/pre&gt;</description>
    <dc:creator>Dolev Raviv</dc:creator>
    <dc:date>2013-05-12T14:22:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3876">
    <title>[PATCH v6 2/3] block: Add API for urgent request handling</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3876</link>
    <description>&lt;pre&gt;This patch add support in block &amp;amp; elevator layers for handling
urgent requests. The decision if a request is urgent or not is taken
by the scheduler. Request is marked as urgent in cmd_flags (by the
scheduler) with a new flag - REQ_URGENT.
Urgent request notification is passed to the underlying
block device driver (eMMC for example). Block device driver may decide to
interrupt the currently running low priority request to serve the new
urgent request. By doing so READ latency is greatly reduced in read&amp;amp;write
collision scenarios.

Note that if the current scheduler doesn't implement the urgent request
mechanism, this code path is never activated.

Signed-off-by: Tatyana Brokhman &amp;lt;tlinder&amp;lt; at &amp;gt;codeaurora.org&amp;gt;

diff --git a/block/blk-core.c b/block/blk-core.c
index adab72d..ac298a4 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -296,6 +296,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; EXPORT_SYMBOL(blk_sync_queue);
  *    This variant runs the queue whether or not the queue has been
  *    stopped. Must be called with the queue lock held and interrupts
  *    disabled. See also &amp;lt; at &amp;gt;blk_run_queue.
+ *
+ *    Device driver will be notified of an urgent request
+ *    pending under the following conditions:
+ *    1. The driver and the current scheduler support urgent reques handling
+ *    2. There is an urgent request pending in the scheduler
+ *    3. There isn't already an urgent request in flight, meaning previously
+ *       notified urgent request completed (!q-&amp;gt;notified_urgent)
  */
 inline void __blk_run_queue_uncond(struct request_queue *q)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -310,7 +317,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; inline void __blk_run_queue_uncond(struct request_queue *q)
  * can wait until all these request_fn calls have finished.
  */
 q-&amp;gt;request_fn_active++;
-q-&amp;gt;request_fn(q);
+
+if (!q-&amp;gt;notified_urgent &amp;amp;&amp;amp;
+q-&amp;gt;elevator-&amp;gt;type-&amp;gt;ops.elevator_is_urgent_fn &amp;amp;&amp;amp;
+q-&amp;gt;urgent_request_fn &amp;amp;&amp;amp;
+q-&amp;gt;elevator-&amp;gt;type-&amp;gt;ops.elevator_is_urgent_fn(q)) {
+q-&amp;gt;notified_urgent = true;
+q-&amp;gt;urgent_request_fn(q);
+} else
+q-&amp;gt;request_fn(q);
+
 q-&amp;gt;request_fn_active--;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2183,6 +2199,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct request *blk_peek_request(struct request_queue *q)
  */
 rq-&amp;gt;cmd_flags |= REQ_STARTED;
 trace_block_rq_issue(q, rq);
+if (rq-&amp;gt;cmd_flags &amp;amp; REQ_URGENT) {
+WARN_ON(q-&amp;gt;dispatched_urgent);
+q-&amp;gt;dispatched_urgent = true;
+}
 }
 
 if (!q-&amp;gt;boundary_rq || q-&amp;gt;boundary_rq == rq) {
diff --git a/block/blk-settings.c b/block/blk-settings.c
index c50ecf0..420c551 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -193,6 +193,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
 EXPORT_SYMBOL(blk_queue_make_request);
 
 /**
+ * blk_urgent_request() - Set an urgent_request handler function for queue
+ * &amp;lt; at &amp;gt;q:queue
+ * &amp;lt; at &amp;gt;fn:handler for urgent requests
+ *
+ */
+void blk_urgent_request(struct request_queue *q, request_fn_proc *fn)
+{
+q-&amp;gt;urgent_request_fn = fn;
+}
+EXPORT_SYMBOL(blk_urgent_request);
+
+/**
  * blk_queue_bounce_limit - set bounce buffer limit for queue
  * &amp;lt; at &amp;gt;q: the request queue for the device
  * &amp;lt; at &amp;gt;dma_mask: the maximum address the device can handle
diff --git a/block/elevator.c b/block/elevator.c
index e28011b..06f4320 100644
--- a/block/elevator.c
+++ b/block/elevator.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -788,6 +788,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void elv_completed_request(struct request_queue *q, struct request *rq)
 {
 struct elevator_queue *e = q-&amp;gt;elevator;
 
+if (rq-&amp;gt;cmd_flags &amp;amp; REQ_URGENT) {
+q-&amp;gt;notified_urgent = false;
+WARN_ON(!q-&amp;gt;dispatched_urgent);
+q-&amp;gt;dispatched_urgent = false;
+}
 /*
  * request is released from the driver, io must be done
  */
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 9d3cafa..933b673 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -163,7 +163,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; enum rq_flag_bits {
  * throttling rules. Don't do it again. */
 
 /* request only flags */
-__REQ_SORTED,/* elevator knows about this request */
+__REQ_SORTED = __REQ_RAHEAD,/* elevator knows about this request */
 __REQ_SOFTBARRIER,/* may not be passed by ioscheduler */
 __REQ_NOMERGE,/* don't touch this for merging */
 __REQ_STARTED,/* drive already may have started this one */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -180,6 +180,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; enum rq_flag_bits {
 __REQ_MIXED_MERGE,/* merge of different types, fail separately */
 __REQ_KERNEL, /* direct IO to kernel pages */
 __REQ_PM,/* runtime pm request */
+__REQ_URGENT,/* urgent request */
 __REQ_NR_BITS,/* stops here */
 };
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -193,6 +194,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; enum rq_flag_bits {
 #define REQ_DISCARD(1 &amp;lt;&amp;lt; __REQ_DISCARD)
 #define REQ_WRITE_SAME(1 &amp;lt;&amp;lt; __REQ_WRITE_SAME)
 #define REQ_NOIDLE(1 &amp;lt;&amp;lt; __REQ_NOIDLE)
+#define REQ_URGENT(1 &amp;lt;&amp;lt; __REQ_URGENT)
 
 #define REQ_FAILFAST_MASK \
 (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 102d217..28f8361 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -304,6 +304,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct request_queue {
 struct request_listroot_rl;
 
 request_fn_proc*request_fn;
+request_fn_proc*urgent_request_fn;
 make_request_fn*make_request_fn;
 prep_rq_fn*prep_rq_fn;
 unprep_rq_fn*unprep_rq_fn;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -404,6 +405,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct request_queue {
 #endif
 
 struct queue_limitslimits;
+boolnotified_urgent;
+booldispatched_urgent;
 
 /*
  * sg stuff
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -918,6 +921,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn,
 extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *);
 extern struct request_queue *blk_init_allocated_queue(struct request_queue *,
       request_fn_proc *, spinlock_t *);
+extern void blk_urgent_request(struct request_queue *q, request_fn_proc *fn);
 extern void blk_cleanup_queue(struct request_queue *);
 extern void blk_queue_make_request(struct request_queue *, make_request_fn *);
 extern void blk_queue_bounce_limit(struct request_queue *, u64);
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index d703f94..e753f88 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -25,6 +25,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef int (elevator_dispatch_fn) (struct request_queue *, int);
 typedef void (elevator_add_req_fn) (struct request_queue *, struct request *);
 typedef int (elevator_reinsert_req_fn) (struct request_queue *,
 struct request *);
+typedef bool (elevator_is_urgent_fn) (struct request_queue *);
 typedef struct request *(elevator_request_list_fn) (struct request_queue *, struct request *);
 typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *);
 typedef int (elevator_may_queue_fn) (struct request_queue *, int);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -51,6 +52,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct elevator_ops
 elevator_dispatch_fn *elevator_dispatch_fn;
 elevator_add_req_fn *elevator_add_req_fn;
 elevator_reinsert_req_fn *elevator_reinsert_req_fn;
+elevator_is_urgent_fn *elevator_is_urgent_fn;
 
 elevator_activate_req_fn *elevator_activate_req_fn;
 elevator_deactivate_req_fn *elevator_deactivate_req_fn;
&lt;/pre&gt;</description>
    <dc:creator>Tanya Brokhman</dc:creator>
    <dc:date>2013-05-12T10:34:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3872">
    <title>[PATCH 1/1] timer: Don't reinitialize the cpu base lock during CPU_UP_PREPARE</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3872</link>
    <description>&lt;pre&gt;An inactive timer's base can refer to a offline cpu's base.

In the current code, cpu_base's lock is blindly reinitialized
each time a CPU is brought up. If a CPU is brought online
during the period that another thread is trying to modify an
inactive timer on that CPU with holding its timer base lock,
then the lock will be reinitialized under its feet. This leads
to following SPIN_BUG().

&amp;lt;0&amp;gt; BUG: spinlock already unlocked on CPU#3, kworker/u:3/1466
&amp;lt;0&amp;gt; lock: 0xe3ebe000, .magic: dead4ead, .owner: kworker/u:3/1466, .owner_cpu: 1
&amp;lt;4&amp;gt; [&amp;lt;c0013dc4&amp;gt;] (unwind_backtrace+0x0/0x11c) from [&amp;lt;c026e794&amp;gt;] (do_raw_spin_unlock+0x40/0xcc)
&amp;lt;4&amp;gt; [&amp;lt;c026e794&amp;gt;] (do_raw_spin_unlock+0x40/0xcc) from [&amp;lt;c076c160&amp;gt;] (_raw_spin_unlock+0x8/0x30)
&amp;lt;4&amp;gt; [&amp;lt;c076c160&amp;gt;] (_raw_spin_unlock+0x8/0x30) from [&amp;lt;c009b858&amp;gt;] (mod_timer+0x294/0x310)
&amp;lt;4&amp;gt; [&amp;lt;c009b858&amp;gt;] (mod_timer+0x294/0x310) from [&amp;lt;c00a5e04&amp;gt;] (queue_delayed_work_on+0x104/0x120)
&amp;lt;4&amp;gt; [&amp;lt;c00a5e04&amp;gt;] (queue_delayed_work_on+0x104/0x120) from [&amp;lt;c04eae00&amp;gt;] (sdhci_msm_bus_voting+0x88/0x9c)
&amp;lt;4&amp;gt; [&amp;lt;c04eae00&amp;gt;] (sdhci_msm_bus_voting+0x88/0x9c) from [&amp;lt;c04d8780&amp;gt;] (sdhci_disable+0x40/0x48)
&amp;lt;4&amp;gt; [&amp;lt;c04d8780&amp;gt;] (sdhci_disable+0x40/0x48) from [&amp;lt;c04bf300&amp;gt;] (mmc_release_host+0x4c/0xb0)
&amp;lt;4&amp;gt; [&amp;lt;c04bf300&amp;gt;] (mmc_release_host+0x4c/0xb0) from [&amp;lt;c04c7aac&amp;gt;] (mmc_sd_detect+0x90/0xfc)
&amp;lt;4&amp;gt; [&amp;lt;c04c7aac&amp;gt;] (mmc_sd_detect+0x90/0xfc) from [&amp;lt;c04c2504&amp;gt;] (mmc_rescan+0x7c/0x2c4)
&amp;lt;4&amp;gt; [&amp;lt;c04c2504&amp;gt;] (mmc_rescan+0x7c/0x2c4) from [&amp;lt;c00a6a7c&amp;gt;] (process_one_work+0x27c/0x484)
&amp;lt;4&amp;gt; [&amp;lt;c00a6a7c&amp;gt;] (process_one_work+0x27c/0x484) from [&amp;lt;c00a6e94&amp;gt;] (worker_thread+0x210/0x3b0)
&amp;lt;4&amp;gt; [&amp;lt;c00a6e94&amp;gt;] (worker_thread+0x210/0x3b0) from [&amp;lt;c00aad9c&amp;gt;] (kthread+0x80/0x8c)
&amp;lt;4&amp;gt; [&amp;lt;c00aad9c&amp;gt;] (kthread+0x80/0x8c) from [&amp;lt;c000ea80&amp;gt;] (kernel_thread_exit+0x0/0x8)

As an example, this particular crash occurred when CPU #3 is executing
mod_timer() on an inactive timer whose base is refered to offlined CPU #2.
The code locked the timer_base corresponding to CPU #2. Before it could
proceed, CPU #2 came online and reinitialized the spinlock corresponding
to its base. Thus now CPU #3 held a lock which was reinitialized. When
CPU #3 finally ended up unlocking the old cpu_base corresponding to CPU #2,
we hit the above SPIN_BUG().

CPU #0CPU #3       CPU #2
-------------       -------
..... ......      &amp;lt;Offline&amp;gt;
mod_timer()
 lock_timer_base
   spin_lock_irqsave(&amp;amp;base-&amp;gt;lock)

cpu_up(2) .....        ......
init_timers_cpu()
.... .....      spin_lock_init(&amp;amp;base-&amp;gt;lock)
.....  spin_unlock_irqrestore(&amp;amp;base-&amp;gt;lock)    ......
   &amp;lt;spin_bug&amp;gt;

Allocation of per_cpu timer vector bases is done only once under
"tvec_base_done[]" check. In the current code, spinlock_initialization
of base-&amp;gt;lock isn't under this check. When a CPU is up each time the base
lock is reinitialized. Move base spinlock initialization under the check.

Change-Id: I73b48440fffb227a60af9180e318c851048530dd
Signed-off-by: Tirupathi Reddy &amp;lt;tirupath&amp;lt; at &amp;gt;codeaurora.org&amp;gt;
---
 kernel/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index dbf7a78..1b399c8 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1678,12 +1678,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __cpuinit init_timers_cpu(int cpu)
 boot_done = 1;
 base = &amp;amp;boot_tvec_bases;
 }
+spin_lock_init(&amp;amp;base-&amp;gt;lock);
 tvec_base_done[cpu] = 1;
 } else {
 base = per_cpu(tvec_bases, cpu);
 }

-spin_lock_init(&amp;amp;base-&amp;gt;lock);

 for (j = 0; j &amp;lt; TVN_SIZE; j++) {
 INIT_LIST_HEAD(base-&amp;gt;tv5.vec + j);
--
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

&lt;/pre&gt;</description>
    <dc:creator>Tirupathi Reddy</dc:creator>
    <dc:date>2013-05-10T13:38:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3868">
    <title>[PATCH 1/2] Documentation: devicetree: Add DT bindings for UFS host controller</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3868</link>
    <description>&lt;pre&gt;Compatible list is used in commit 03b1781 but is not documented.
Add necessary device tree bindings to describe on-chip UFS host
controllers.

Signed-off-by: Sujit Reddy Thumma &amp;lt;sthumma&amp;lt; at &amp;gt;codeaurora.org&amp;gt;
---
 .../devicetree/bindings/ufs/ufshcd-pltfrm.txt      |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt

diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
new file mode 100644
index 0000000..20468b2
--- /dev/null
+++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+* Universal Flash Storage (UFS) Host Controller
+
+UFSHC nodes are defined to describe on-chip UFS host controllers.
+Each UFS controller instance should have its own node.
+
+Required properties:
+- compatible        : compatible list, contains "jedec,ufs-1.1"
+- interrupts        : &amp;lt;interrupt mapping for UFS host controller IRQ&amp;gt;
+- reg               : &amp;lt;registers mapping&amp;gt;
+
+Example:
+ufshc&amp;lt; at &amp;gt;0xfc598000 {
+compatible = "jedec,ufs-1.1";
+reg = &amp;lt;0xfc598000 0x800&amp;gt;;
+interrupts = &amp;lt;0 28 0&amp;gt;;
+};
&lt;/pre&gt;</description>
    <dc:creator>Sujit Reddy Thumma</dc:creator>
    <dc:date>2013-05-10T04:48:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3852">
    <title>[PATCH V4] scsi: ufs: Set fDeviceInit flag to initiate device initialization</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3852</link>
    <description>&lt;pre&gt;Allow UFS device to complete its initialization and accept
SCSI commands by setting fDeviceInit flag. The device may take
time for this operation and hence the host should poll until
fDeviceInit flag is toggled to zero. This step is mandated by
UFS device specification for device initialization completion.

Signed-off-by: Dolev Raviv &amp;lt;draviv&amp;lt; at &amp;gt;codeaurora.org&amp;gt;
Signed-off-by: Sujit Reddy Thumma &amp;lt;sthumma&amp;lt; at &amp;gt;codeaurora.org&amp;gt;

--
Changes for V4:
- Add NULL pointer check
- Changed fix from v3 to bug on since hba can't be null
Changes for V3:
- Fix static checker error
Changes for V2:
- Add the query sending api via SCSI from the original query patch

diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index 086ff03..742363d 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -107,8 +107,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; enum {
 UPIU_QUERY_FUNC_STANDARD_WRITE_REQUEST = 0x81,
 };
 
+/* Flag idn for Query Requests*/
+enum flag_idn {
+QUERY_FLAG_IDN_FDEVICEINIT = 0x01,
+};
+
 /* UTP QUERY Transaction Specific Fields OpCode */
-enum {
+enum query_opcode {
 UPIU_QUERY_OPCODE_NOP= 0x0,
 UPIU_QUERY_OPCODE_READ_DESC= 0x1,
 UPIU_QUERY_OPCODE_WRITE_DESC= 0x2,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -208,6 +213,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct utp_upiu_query {
 u32 reserved[2];
 };
 
+/* Expose the flag value from utp_upiu_query.value */
+#define MASK_QUERY_UPIU_FLAG_LOC 0xFF
+
 /**
  * struct utp_upiu_req - general upiu request structure
  * &amp;lt; at &amp;gt;header:UPIU header structure DW-0 to DW-2
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index bcdc576..2248189 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -51,6 +51,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* Reserved tag for internal commands */
 #define INTERNAL_CMD_TAG   0
 
+/* Query request standart retries */
+#define QUERY_REQ_RETRIES 10
+/* Query request standart timeout  in seconds */
+#define QUERY_REQ_TIMEOUT 5
+/* Send Query Requst with default parameters */
+#define send_query_request(ARG1, ARG2, ARG3, ARG4)\
+ufshcd_query_request(ARG1, ARG2, ARG3, ARG4,\
+QUERY_REQ_TIMEOUT, QUERY_REQ_RETRIES)
+
 enum {
 UFSHCD_MAX_CHANNEL= 0,
 UFSHCD_MAX_ID= 1,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -887,6 +896,164 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; out:
 }
 
 /**
+ *  ufshcd_query_request() - Entry point for issuing query request to a
+ *  ufs device.
+ *  &amp;lt; at &amp;gt;hba: ufs driver context
+ *  &amp;lt; at &amp;gt;query: params for query request
+ *  &amp;lt; at &amp;gt;descriptor: buffer for sending/receiving descriptor
+ *  &amp;lt; at &amp;gt;response: pointer to a buffer that will contain the response code and
+ *           response upiu
+ *  &amp;lt; at &amp;gt;timeout: time limit for the command in seconds
+ *  &amp;lt; at &amp;gt;retries: number of times to try executing the command
+ *
+ *  The query request is submitted to the same request queue as the rest of
+ *  the scsi commands passed to the UFS controller. In order to use this
+ *  queue, we need to receive a tag, same as all other commands. The tags
+ *  are issued from the block layer. To simulate a request from the block
+ *  layer, we use the same interface as the SCSI layer does when it issues
+ *  commands not generated by users. To distinguish a query request from
+ *  the SCSI commands, we use a vendor specific unused SCSI command
+ *  op-code. This op-code is not part of the SCSI command subset used in
+ *  UFS. In such way it is easy to check the command in the driver and
+ *  handle it appropriately.
+ *
+ *  All necessary fields for issuing a query and receiving its response are
+ *  stored in the UFS hba struct. We can use this method since we know
+ *  there is only one active query request at all times.
+ *
+ *  The request that will pass to the device is stored in "query" argument
+ *  passed to this function, while the "response" argument (which is output
+ *  field) will hold the query response from the device along with the
+ *  response code.
+ */
+int ufshcd_query_request(struct ufs_hba *hba,
+struct ufs_query_req *query,
+u8 *descriptor,
+struct ufs_query_res *response,
+int timeout,
+int retries)
+{
+struct scsi_device *sdev;
+u8 cmd[UFS_QUERY_CMD_SIZE] = {0};
+int result;
+bool sdev_lookup = true;
+
+BUG_ON(!hba);
+if (!query || !response) {
+dev_err(hba-&amp;gt;dev,
+"%s: NULL pointer hba = %p, query = %p response = %p\n",
+__func__, hba, query, response);
+return -EINVAL;
+}
+
+/*
+ * A SCSI command structure is composed from opcode at the
+ * begining and 0 at the end.
+ */
+cmd[0] = UFS_QUERY_RESERVED_SCSI_CMD;
+
+/* extracting the SCSI Device */
+sdev = scsi_device_lookup(hba-&amp;gt;host, 0, 0, 0);
+if (!sdev) {
+/**
+ * There are some Query Requests that are sent during device
+ * initialization, this happens before the scsi device was
+ * initialized. If there is no scsi device, we generate a
+ * temporary device to allow the Query Request flow.
+ */
+sdev_lookup = false;
+sdev = scsi_get_host_dev(hba-&amp;gt;host);
+}
+
+if (!sdev) {
+dev_err(hba-&amp;gt;dev, "%s: Could not fetch scsi device\n",
+__func__);
+return -ENODEV;
+}
+
+mutex_lock(&amp;amp;hba-&amp;gt;query.lock_ufs_query);
+hba-&amp;gt;query.request = query;
+hba-&amp;gt;query.descriptor = descriptor;
+hba-&amp;gt;query.response = response;
+
+/* wait until request is completed */
+result = scsi_execute(sdev, cmd, DMA_NONE, NULL, 0, NULL,
+timeout, retries, 0, NULL);
+if (result) {
+dev_err(hba-&amp;gt;dev,
+"%s: Query with opcode 0x%x, failed with result %d\n",
+__func__, query-&amp;gt;upiu_req.opcode, result);
+result = -EIO;
+}
+
+hba-&amp;gt;query.request = NULL;
+hba-&amp;gt;query.descriptor = NULL;
+hba-&amp;gt;query.response = NULL;
+mutex_unlock(&amp;amp;hba-&amp;gt;query.lock_ufs_query);
+
+/* Releasing scsi device resource */
+if (sdev_lookup)
+scsi_device_put(sdev);
+else
+scsi_free_host_dev(sdev);
+
+return result;
+}
+
+/**
+ * ufshcd_query_flag() - Helper function for composing flag query requests
+ * hba: per-adapter instance
+ * query_opcode: flag query to perform
+ * idn: flag idn to access
+ * flag_res: the flag value after the query request completes
+ *
+ * Returns 0 for success, non-zero in case of failure
+ */
+int ufshcd_query_flag(struct ufs_hba *hba, enum query_opcode opcode,
+enum flag_idn idn, bool *flag_res)
+{
+struct ufs_query_req query = {0};
+struct ufs_query_res response = {0};
+int err;
+
+switch (opcode) {
+case UPIU_QUERY_OPCODE_SET_FLAG:
+case UPIU_QUERY_OPCODE_CLEAR_FLAG:
+case UPIU_QUERY_OPCODE_TOGGLE_FLAG:
+query.query_func = UPIU_QUERY_FUNC_STANDARD_WRITE_REQUEST;
+break;
+case UPIU_QUERY_OPCODE_READ_FLAG:
+query.query_func = UPIU_QUERY_FUNC_STANDARD_READ_REQUEST;
+break;
+default:
+dev_err(hba-&amp;gt;dev,
+"%s: Expected query flag opcode but got = %d\n",
+__func__, opcode);
+err = -EINVAL;
+goto out;
+}
+query.upiu_req.opcode = opcode;
+query.upiu_req.idn = idn;
+
+/* Send query request */
+err = send_query_request(hba, &amp;amp;query, NULL, &amp;amp;response);
+
+if (err) {
+dev_err(hba-&amp;gt;dev,
+"%s: Sending flag query for idn %d failed, err = %d\n",
+__func__, idn, err);
+goto out;
+}
+
+if (flag_res)
+*flag_res = (response.upiu_res.value &amp;amp;
+MASK_QUERY_UPIU_FLAG_LOC) &amp;amp; 0x1;
+
+out:
+return err;
+}
+
+/**
  * ufshcd_memory_alloc - allocate memory for host memory space data structures
  * &amp;lt; at &amp;gt;hba: per adapter instance
  *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1324,6 +1491,44 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; out:
 }
 
 /**
+ * ufshcd_validate_device_init() - checks device readines
+ * hba: per-adapter instance
+ *
+ * Set fDeviceInit flag, than, query the flag untill the device clears the
+ * flag.
+ */
+static int ufshcd_validate_device_init(struct ufs_hba *hba)
+{
+int i, err;
+bool flag_res = 0;
+
+err = ufshcd_query_flag(hba, UPIU_QUERY_OPCODE_SET_FLAG,
+QUERY_FLAG_IDN_FDEVICEINIT, &amp;amp;flag_res);
+if (err) {
+dev_err(hba-&amp;gt;dev,
+"%s setting fDeviceInit flag failed with error %d\n",
+__func__, err);
+goto out;
+}
+
+for (i = 0; i &amp;lt; QUERY_REQ_RETRIES &amp;amp;&amp;amp; !err &amp;amp;&amp;amp; flag_res; i++) {
+err = ufshcd_query_flag(hba, UPIU_QUERY_OPCODE_READ_FLAG,
+QUERY_FLAG_IDN_FDEVICEINIT, &amp;amp;flag_res);
+}
+if (err)
+dev_err(hba-&amp;gt;dev,
+"%s reading fDeviceInit flag failed with error %d\n",
+__func__, err);
+else if (flag_res)
+dev_err(hba-&amp;gt;dev,
+"%s fDeviceInit was not cleared by the device\n",
+__func__);
+
+out:
+return err;
+}
+
+/**
  * ufshcd_make_hba_operational - Make UFS controller operational
  * &amp;lt; at &amp;gt;hba: per adapter instance
  *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2153,6 +2358,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void ufshcd_async_scan(void *data, async_cookie_t cookie)
 if (ret)
 goto out;
 
+ret = ufshcd_validate_device_init(hba);
+if (ret)
+goto out;
+
 scsi_scan_host(hba-&amp;gt;host);
 out:
 return;
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index a91c558..76485da 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -286,4 +286,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline int ufshcd_dme_hibern8_exit(struct ufs_hba *hba)
 return ufshcd_dme_hibern8_ctrl(hba, 0);
 }
 
+int ufs_query_request(struct ufs_hba *hba,
+struct ufs_query_req *query,
+u8 *descriptor,
+struct ufs_query_res *response,
+int timeout,
+int retries);
+
 #endif /* End of Header */
&lt;/pre&gt;</description>
    <dc:creator>Dolev Raviv</dc:creator>
    <dc:date>2013-05-09T10:06:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.ports.arm.msm/3846">
    <title>[PATCH 0/3] Fix disable of unused clk/regulator with deferred probe</title>
    <link>http://comments.gmane.org/gmane.linux.ports.arm.msm/3846</link>
    <description>&lt;pre&gt;Clock and regulator frameworks have support for disabling unused clocks and
regulators at system init to save power when bootloaders leave them in a less
than desirable state. If no driver has requested for a clock/regulator to be
ON by the time kernel init reaches late_initcall level, they were considered
unused.

This worked well/good enough for compiled in drivers before deferred probe
was introduced. But with deferred probe, it's quite likely that devices that
match with compiled in drivers will continue to probe well past late_initcall
(at least as far as I can understand). So, we need to wait for deferred
probing during kernel init to complete before we do the disable of unused
clocks/regulators.

If there's a better or more obvious solution, I'm all ears. Another approach
would have been to add a "probe_done_initcall" level. But that seems overkill
and I don't think adding yet another initcall level is a great idea.

Thanks,
Saravana

Saravana Kannan (3):
  driver core: Add API to wait for deferred probe to complete during
    init
  clk: Disable unused clocks after deferred probing is done
  regulator: core: Disable unused regulators after deferred probing is
    done

 drivers/base/dd.c        |    8 ++++++++
 drivers/clk/clk.c        |    4 +++-
 drivers/regulator/core.c |    4 +++-
 include/linux/device.h   |    1 +
 4 files changed, 15 insertions(+), 2 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Saravana Kannan</dc:creator>
    <dc:date>2013-05-09T05:18:43</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>
