<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/irqchip, branch v3.18.100</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.100</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.100'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-02-28T09:16:18+00:00</updated>
<entry>
<title>irqchip/gic-v3: Use wmb() instead of smb_wmb() in gic_raise_softirq()</title>
<updated>2018-02-28T09:16:18+00:00</updated>
<author>
<name>Shanker Donthineni</name>
<email>shankerd@codeaurora.org</email>
</author>
<published>2018-02-01T00:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=698d39dc3272a6344ab6cd1b440045acf35d2829'/>
<id>urn:sha1:698d39dc3272a6344ab6cd1b440045acf35d2829</id>
<content type='text'>
commit 21ec30c0ef5234fb1039cc7c7737d885bf875a9e upstream.

A DMB instruction can be used to ensure the relative order of only
memory accesses before and after the barrier. Since writes to system
registers are not memory operations, barrier DMB is not sufficient
for observability of memory accesses that occur before ICC_SGI1R_EL1
writes.

A DSB instruction ensures that no instructions that appear in program
order after the DSB instruction, can execute until the DSB instruction
has completed.

Cc: stable@vger.kernel.org
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;,
Signed-off-by: Shanker Donthineni &lt;shankerd@codeaurora.org&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>irqchip/crossbar: Fix incorrect type of register size</title>
<updated>2017-12-16T09:32:29+00:00</updated>
<author>
<name>Franck Demathieu</name>
<email>fdemathieu@gmail.com</email>
</author>
<published>2017-03-06T13:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28657a1ae900b1f33620998803d8d8f57d552c01'/>
<id>urn:sha1:28657a1ae900b1f33620998803d8d8f57d552c01</id>
<content type='text'>
[ Upstream commit 4b9de5da7e120c7f02395da729f0ec77ce7a6044 ]

The 'size' variable is unsigned according to the dt-bindings.
As this variable is used as integer in other places, create a new variable
that allows to fix the following sparse issue (-Wtypesign):

  drivers/irqchip/irq-crossbar.c:279:52: warning: incorrect type in argument 3 (different signedness)
  drivers/irqchip/irq-crossbar.c:279:52:    expected unsigned int [usertype] *out_value
  drivers/irqchip/irq-crossbar.c:279:52:    got int *&lt;noident&gt;

Signed-off-by: Franck Demathieu &lt;fdemathieu@gmail.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>irqchip/crossbar: Fix incorrect type of local variables</title>
<updated>2017-10-21T15:07:25+00:00</updated>
<author>
<name>Franck Demathieu</name>
<email>fdemathieu@gmail.com</email>
</author>
<published>2017-02-23T09:48:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ef0423167be6c11d68bfcbd1190f508727f1d042'/>
<id>urn:sha1:ef0423167be6c11d68bfcbd1190f508727f1d042</id>
<content type='text'>
[ Upstream commit b28ace12661fbcfd90959c1e84ff5a85113a82a1 ]

The max and entry variables are unsigned according to the dt-bindings.
Fix following 3 sparse issues (-Wtypesign):

  drivers/irqchip/irq-crossbar.c:222:52: warning: incorrect type in argument 3 (different signedness)
  drivers/irqchip/irq-crossbar.c:222:52:    expected unsigned int [usertype] *out_value
  drivers/irqchip/irq-crossbar.c:222:52:    got int *&lt;noident&gt;

  drivers/irqchip/irq-crossbar.c:245:56: warning: incorrect type in argument 4 (different signedness)
  drivers/irqchip/irq-crossbar.c:245:56:    expected unsigned int [usertype] *out_value
  drivers/irqchip/irq-crossbar.c:245:56:    got int *&lt;noident&gt;

  drivers/irqchip/irq-crossbar.c:263:56: warning: incorrect type in argument 4 (different signedness)
  drivers/irqchip/irq-crossbar.c:263:56:    expected unsigned int [usertype] *out_value
  drivers/irqchip/irq-crossbar.c:263:56:    got int *&lt;noident&gt;

Signed-off-by: Franck Demathieu &lt;fdemathieu@gmail.com&gt;
Cc: marc.zyngier@arm.com
Cc: jason@lakedaemon.net
Link: http://lkml.kernel.org/r/20170223094855.6546-1-fdemathieu@gmail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup()</title>
<updated>2017-08-25T00:00:10+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2017-07-04T09:10:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=165f22abe9eff817d9771dd94a1dfbe6f335d459'/>
<id>urn:sha1:165f22abe9eff817d9771dd94a1dfbe6f335d459</id>
<content type='text'>
commit 277867ade8262583f4280cadbe90e0031a3706a7 upstream.

of_find_compatible_node() is calling of_node_put() on its first argument
thus leading to an unbalanced of_node_get/put() issue if the node has not
been retained before that.

Instead of passing the root node, pass NULL, which does exactly the same:
iterate over all DT nodes, starting from the root node.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Reported-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Fixes: 3d61467f9bab ("irqchip: atmel-aic: Implement RTC irq fixup")
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>irqchip/atmel-aic: Fix unbalanced of_node_put() in aic_common_irq_fixup()</title>
<updated>2017-08-25T00:00:10+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2017-07-04T09:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce76d8b8c727dea127099a7263f2ccd744b2aab0'/>
<id>urn:sha1:ce76d8b8c727dea127099a7263f2ccd744b2aab0</id>
<content type='text'>
commit 469bcef53c546bb792aa66303933272991b7831d upstream.

aic_common_irq_fixup() is calling twice of_node_put() on the same node
thus leading to an unbalanced refcount on the root node.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Reported-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Fixes: b2f579b58e93 ("irqchip: atmel-aic: Add irq fixup infrastructure")
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>irqchip/gic-v3: Fix out-of-bound access in gic_set_affinity</title>
<updated>2017-07-21T06:12:22+00:00</updated>
<author>
<name>Suzuki K Poulose</name>
<email>suzuki.poulose@arm.com</email>
</author>
<published>2017-06-30T09:58:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=655dff165880e4222589b52ab55a6411f04be272'/>
<id>urn:sha1:655dff165880e4222589b52ab55a6411f04be272</id>
<content type='text'>
commit 866d7c1b0a3c70387646c4e455e727a58c5d465a upstream.

The GICv3 driver doesn't check if the target CPU for gic_set_affinity
is valid before going ahead and making the changes. This triggers the
following splat with KASAN:

[  141.189434] BUG: KASAN: global-out-of-bounds in gic_set_affinity+0x8c/0x140
[  141.189704] Read of size 8 at addr ffff200009741d20 by task swapper/1/0
[  141.189958]
[  141.190158] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.12.0-rc7
[  141.190458] Hardware name: Foundation-v8A (DT)
[  141.190658] Call trace:
[  141.190908] [&lt;ffff200008089d70&gt;] dump_backtrace+0x0/0x328
[  141.191224] [&lt;ffff20000808a1b4&gt;] show_stack+0x14/0x20
[  141.191507] [&lt;ffff200008504c3c&gt;] dump_stack+0xa4/0xc8
[  141.191858] [&lt;ffff20000826c19c&gt;] print_address_description+0x13c/0x250
[  141.192219] [&lt;ffff20000826c5c8&gt;] kasan_report+0x210/0x300
[  141.192547] [&lt;ffff20000826ad54&gt;] __asan_load8+0x84/0x98
[  141.192874] [&lt;ffff20000854eeec&gt;] gic_set_affinity+0x8c/0x140
[  141.193158] [&lt;ffff200008148b14&gt;] irq_do_set_affinity+0x54/0xb8
[  141.193473] [&lt;ffff200008148d2c&gt;] irq_set_affinity_locked+0x64/0xf0
[  141.193828] [&lt;ffff200008148e00&gt;] __irq_set_affinity+0x48/0x78
[  141.194158] [&lt;ffff200008bc48a4&gt;] arm_perf_starting_cpu+0x104/0x150
[  141.194513] [&lt;ffff2000080d73bc&gt;] cpuhp_invoke_callback+0x17c/0x1f8
[  141.194783] [&lt;ffff2000080d94ec&gt;] notify_cpu_starting+0x8c/0xb8
[  141.195130] [&lt;ffff2000080911ec&gt;] secondary_start_kernel+0x15c/0x200
[  141.195390] [&lt;0000000080db81b4&gt;] 0x80db81b4
[  141.195603]
[  141.195685] The buggy address belongs to the variable:
[  141.196012]  __cpu_logical_map+0x200/0x220
[  141.196176]
[  141.196315] Memory state around the buggy address:
[  141.196586]  ffff200009741c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  141.196913]  ffff200009741c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  141.197158] &gt;ffff200009741d00: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 00
[  141.197487]                                ^
[  141.197758]  ffff200009741d80: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00
[  141.198060]  ffff200009741e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  141.198358] ==================================================================
[  141.198609] Disabling lock debugging due to kernel taint
[  141.198961] CPU1: Booted secondary processor [410fd051]

This patch adds the check to make sure the cpu is valid.

Fixes: commit 021f653791ad17e03f98 ("irqchip: gic-v3: Initial support for GICv3")
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>irqchip/gicv3: Handle loop timeout proper</title>
<updated>2016-11-24T02:28:50+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-10-14T07:26:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=60299e356a54b938af0b0f5c53f58c1ceb8b2ef1'/>
<id>urn:sha1:60299e356a54b938af0b0f5c53f58c1ceb8b2ef1</id>
<content type='text'>
[ Upstream commit d102eb5c1ac5e6743b1c6d145c06a25d98ad1375 ]

The timeout loop terminates when the loop count is zero, but the decrement
of the count variable is post check. So count is -1 when we check for the
timeout and therefor the error message is supressed.

Change it to predecrement, so the error message is emitted.

[ tglx: Massaged changelog ]

Fixes: a2c225101234 ("irqchip: gic-v3: Refactor gic_enable_redist to support both enabling and disabling")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: kernel-janitors@vger.kernel.org
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20161014072534.GA15168@mwanda
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>genirq: Generic chip: Change irq_reg_{readl,writel} arguments</title>
<updated>2016-10-06T02:40:20+00:00</updated>
<author>
<name>Kevin Cernekee</name>
<email>cernekee@gmail.com</email>
</author>
<published>2014-11-07T06:44:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5937a545309b73ec6deef5b5d19d664db6236a1'/>
<id>urn:sha1:b5937a545309b73ec6deef5b5d19d664db6236a1</id>
<content type='text'>
[ Upstream commit 332fd7c4fef5f3b166e93decb07fd69eb24f7998 ]

Pass in the irq_chip_generic struct so we can use different readl/writel
settings for each irqchip driver, when appropriate.  Compute
(gc-&gt;reg_base + reg_offset) in the helper function because this is pretty
much what all callers want to do anyway.

Compile-tested using the following configurations:

    at91_dt_defconfig (CONFIG_ATMEL_AIC_IRQ=y)
    sama5_defconfig (CONFIG_ATMEL_AIC5_IRQ=y)
    sunxi_defconfig (CONFIG_ARCH_SUNXI=y)

tb10x (ARC) is untested.

Signed-off-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lkml.kernel.org/r/1415342669-30640-3-git-send-email-cernekee@gmail.com
Signed-off-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>arm64: GICv3: introduce symbolic names for GICv3 ICC_SGI1R_EL1 fields</title>
<updated>2016-06-20T03:47:43+00:00</updated>
<author>
<name>Andre Przywara</name>
<email>andre.przywara@arm.com</email>
</author>
<published>2014-11-12T13:46:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=045f08909af86b12a5030c5ce34bb15f9a201bed'/>
<id>urn:sha1:045f08909af86b12a5030c5ce34bb15f9a201bed</id>
<content type='text'>
[ Upstream commit 7e5802781c3e109558ddfd8b02155ad24d872ee7 ]

The gic_send_sgi() function used hardcoded bit shift values to
generate the ICC_SGI1R_EL1 register value.
Replace this with symbolic names to allow reusing them later.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Signed-off-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>irqchip/gic: Ensure ordering between read of INTACK and shared data</title>
<updated>2016-06-06T23:11:02+00:00</updated>
<author>
<name>Will Deacon</name>
<email>will.deacon@arm.com</email>
</author>
<published>2016-04-26T11:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91c4ed35e8a4d6b5ef9fe55309d83e9232a54e3c'/>
<id>urn:sha1:91c4ed35e8a4d6b5ef9fe55309d83e9232a54e3c</id>
<content type='text'>
[ Upstream commit f86c4fbd930ff6fecf3d8a1c313182bd0f49f496 ]

When an IPI is generated by a CPU, the pattern looks roughly like:

  &lt;write shared data&gt;
  smp_wmb();
  &lt;write to GIC to signal SGI&gt;

On the receiving CPU we rely on the fact that, once we've taken the
interrupt, then the freshly written shared data must be visible to us.
Put another way, the CPU isn't going to speculate taking an interrupt.

Unfortunately, this assumption turns out to be broken.

Consider that CPUx wants to send an IPI to CPUy, which will cause CPUy
to read some shared_data. Before CPUx has done anything, a random
peripheral raises an IRQ to the GIC and the IRQ line on CPUy is raised.
CPUy then takes the IRQ and starts executing the entry code, heading
towards gic_handle_irq. Furthermore, let's assume that a bunch of the
previous interrupts handled by CPUy were SGIs, so the branch predictor
kicks in and speculates that irqnr will be &lt;16 and we're likely to
head into handle_IPI. The prefetcher then grabs a speculative copy of
shared_data which contains a stale value.

Meanwhile, CPUx gets round to updating shared_data and asking the GIC
to send an SGI to CPUy. Internally, the GIC decides that the SGI is
more important than the peripheral interrupt (which hasn't yet been
ACKed) but doesn't need to do anything to CPUy, because the IRQ line
is already raised.

CPUy then reads the ACK register on the GIC, sees the SGI value which
confirms the branch prediction and we end up with a stale shared_data
value.

This patch fixes the problem by adding an smp_rmb() to the IPI entry
code in gic_handle_irq. As it turns out, the combination of a control
dependency and an ISB instruction from the EOI in the GICv3 driver is
enough to provide the ordering we need, so we add a comment there
justifying the absence of an explicit smp_rmb().

Cc: stable@vger.kernel.org
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
</feed>
