<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm/include/asm/spinlock.h, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-04-01T23:58:50Z</updated>
<entry>
<title>ARM: 7955/1: spinlock: ensure we have a compiler barrier before sev</title>
<updated>2014-04-01T23:58:50Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2014-02-07T18:12:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c8e77aa65fd685e09804e7a6709c82baa3648d1'/>
<id>urn:sha1:8c8e77aa65fd685e09804e7a6709c82baa3648d1</id>
<content type='text'>
commit 7c8746a9eb287642deaad0e7c2cdf482dce5e4be upstream.

When unlocking a spinlock, we require the following, strictly ordered
sequence of events:

	&lt;barrier&gt;	/* dmb */
	&lt;unlock&gt;
	&lt;barrier&gt;	/* dsb */
	&lt;sev&gt;

Whilst the code does indeed reflect this in terms of the architecture,
the final &lt;barrier&gt; + &lt;sev&gt; have been contracted into a single inline
asm without a "memory" clobber, therefore the compiler is at liberty to
reorder the unlock to the end of the above sequence. In such a case,
a waiting CPU may be woken up before the lock has been unlocked, leading
to extremely poor performance.

This patch reworks the dsb_sev() function to make use of the dsb()
macro and ensure ordering against the unlock.

Reported-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
[bwh: Backported to 3.2: 'ishst' variant is not used here]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: 6939/1: fix missing 'cpu_relax()' declaration</title>
<updated>2011-05-23T16:19:26Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2011-05-23T16:16:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=603605abae9ee731bdafb2af83a487d98a568815'/>
<id>urn:sha1:603605abae9ee731bdafb2af83a487d98a568815</id>
<content type='text'>
ARM build fails with the following symptom:

  CC      arch/arm/kernel/asm-offsets.s
In file included from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:57,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/spinlock.h: In function 'spin_unlock_wait':
include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1

Fix it by including &lt;asm/processor.h&gt;.

Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: 6655/1: Correct WFE() in asm/spinlock.h for Thumb-2</title>
<updated>2011-02-10T15:30:51Z</updated>
<author>
<name>Dave Martin</name>
</author>
<published>2011-02-09T11:06:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=917692f5f7ec63de3b093c825913d68e910db282'/>
<id>urn:sha1:917692f5f7ec63de3b093c825913d68e910db282</id>
<content type='text'>
The content for ALT_SMP() in the definition of WFE() expands to 6
bytes (IT cc ; WFEcc.W), which breaks the assumptions of the fixup
code, leading to lockups when the affected code gets run.

This patch works around the problem by explicitly using an
IT + WFEcc.N pair.

Signed-off-by: Dave Martin &lt;dave.martin@linaro.org&gt;
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: v6k: remove CPU_32v6K dependencies in asm/spinlock.h</title>
<updated>2011-02-02T21:23:25Z</updated>
<author>
<name>Russell King</name>
</author>
<published>2011-01-15T16:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=000d9c78eb5cd7f18e3d6a381d66e606bc9b8196'/>
<id>urn:sha1:000d9c78eb5cd7f18e3d6a381d66e606bc9b8196</id>
<content type='text'>
SMP requires at least the ARMv6K extensions to be present, so if we're
running on SMP, the WFE and SEV instructions must be available.

However, when we run on UP, the v6K extensions may not be available,
and so we don't want WFE/SEV to be in the instruction stream.  Use the
SMP alternatives infrastructure to replace these instructions with NOPs
if we build for SMP but run on UP.

Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Sourav Poddar &lt;sourav.poddar@ti.com&gt;
Tested-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: 5897/1: spinlock: don't use deprecated barriers on ARMv7</title>
<updated>2010-02-15T21:39:50Z</updated>
<author>
<name>Rabin Vincent</name>
</author>
<published>2010-01-25T18:43:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5113b61baf7a9a8616eca83e20847e7fecdc679'/>
<id>urn:sha1:c5113b61baf7a9a8616eca83e20847e7fecdc679</id>
<content type='text'>
On ARMv7, the use of the cp15 operations for barriers is deprecated
in favour of the isb, dsb, and dmb instructions.  Change the locking
functions to use the appropriate type of dsb for the architecture
being built for.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>locking: Convert raw_rwlock functions to arch_rwlock</title>
<updated>2009-12-14T22:55:32Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2009-12-03T19:08:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5931943d02bf751b1ec849c0d2ade23d76a8d41'/>
<id>urn:sha1:e5931943d02bf751b1ec849c0d2ade23d76a8d41</id>
<content type='text'>
Name space cleanup for rwlock functions. No functional change.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: linux-arch@vger.kernel.org
</content>
</entry>
<entry>
<title>locking: Convert raw_rwlock to arch_rwlock</title>
<updated>2009-12-14T22:55:32Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2009-12-03T19:01:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb3a6bbc912b12347614e5742c7c61416cdb0ca0'/>
<id>urn:sha1:fb3a6bbc912b12347614e5742c7c61416cdb0ca0</id>
<content type='text'>
Not strictly necessary for -rt as -rt does not have non sleeping
rwlocks, but it's odd to not have a consistent naming convention.

No functional change.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: linux-arch@vger.kernel.org

</content>
</entry>
<entry>
<title>locking: Convert __raw_spin* functions to arch_spin*</title>
<updated>2009-12-14T22:55:32Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2009-12-02T19:01:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0199c4e68d1f02894bdefe4b5d9e9ee4aedd8d62'/>
<id>urn:sha1:0199c4e68d1f02894bdefe4b5d9e9ee4aedd8d62</id>
<content type='text'>
Name space cleanup. No functional change.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: linux-arch@vger.kernel.org
</content>
</entry>
<entry>
<title>locking: Convert raw_spinlock to arch_spinlock</title>
<updated>2009-12-14T22:55:32Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2009-12-02T18:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=445c89514be242b1b0080056d50bdc1b72adeb5c'/>
<id>urn:sha1:445c89514be242b1b0080056d50bdc1b72adeb5c</id>
<content type='text'>
The raw_spin* namespace was taken by lockdep for the architecture
specific implementations. raw_spin_* would be the ideal name space for
the spinlocks which are not converted to sleeping locks in preempt-rt.

Linus suggested to convert the raw_ to arch_ locks and cleanup the
name space instead of using an artifical name like core_spin,
atomic_spin or whatever

No functional change.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: linux-arch@vger.kernel.org

</content>
</entry>
<entry>
<title>Allow rwlocks to re-enable interrupts</title>
<updated>2009-04-03T02:05:11Z</updated>
<author>
<name>Robin Holt</name>
</author>
<published>2009-04-02T23:59:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f5f7eac41db827a47b2163330eecd7bb55ae9f12'/>
<id>urn:sha1:f5f7eac41db827a47b2163330eecd7bb55ae9f12</id>
<content type='text'>
Pass the original flags to rwlock arch-code, so that it can re-enable
interrupts if implemented for that architecture.

Initially, make __raw_read_lock_flags and __raw_write_lock_flags stubs
which just do the same thing as non-flags variants.

Signed-off-by: Petr Tesarik &lt;ptesarik@suse.cz&gt;
Signed-off-by: Robin Holt &lt;holt@sgi.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
