<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm/mm/context.c, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-12-29T12:46:49Z</updated>
<entry>
<title>ARM: 7926/1: mm: flesh out and fix the comments in the ASID allocator</title>
<updated>2013-12-29T12:46:49Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2013-12-17T18:17:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d49750933210457ec2d5e8507823e365b2604fb'/>
<id>urn:sha1:5d49750933210457ec2d5e8507823e365b2604fb</id>
<content type='text'>
The ASID allocator has to deal with some pretty horrible behaviours by
the CPU, so expand on some of the comments in there so I remember why
we can never allocate ASID zero to a userspace task.

Reviewed-by: Catalin Marinas &lt;catalin.marinas@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;
</content>
</entry>
<entry>
<title>ARM: 7925/1: mm: keep track of last ASID allocation to improve bitmap searching</title>
<updated>2013-12-29T12:46:48Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2013-12-17T18:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7a04105068e9bb4cba43d97613c4f19b9e90b0c'/>
<id>urn:sha1:a7a04105068e9bb4cba43d97613c4f19b9e90b0c</id>
<content type='text'>
Since we only clear entries in the ASID bitmap on a rollover event, the
bitmap tends to consist of a block of consecutive set bits followed by
a block of consecutive clear bits. The exception to this rule is for
ASIDs which have been carried over from a previous generation, but
these are bound by the number of CPUs.

This patch optimises our bitmap searching strategy, so that we search
from the last successful allocation, rather than search from index 1
each time we allocate a new ASID.

Reviewed-by: Catalin Marinas &lt;catalin.marinas@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;
</content>
</entry>
<entry>
<title>ARM: 7924/1: mm: don't bother with reserved ttbr0 when running with LPAE</title>
<updated>2013-12-29T12:46:47Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2013-12-17T18:17:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1a5848e3398dca135f3ae77fe2e01145f9d8826'/>
<id>urn:sha1:e1a5848e3398dca135f3ae77fe2e01145f9d8826</id>
<content type='text'>
With the new ASID allocation algorithm, active ASIDs at the time of a
rollover event will be marked as reserved, so active mm_structs can
continue to operate with the same ASID as before. This in turn means
that we don't need to worry about allocating a new ASID to an mm that
is currently active (installed in TTBR0).

Since updating the pgd and ASID is atomic on LPAE systems (by virtue of
the two being fields in the same hardware register), we can dispose of
the reserved TTBR0 and rely on whatever tables we currently have live.

Reviewed-by: Catalin Marinas &lt;catalin.marinas@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;
</content>
</entry>
<entry>
<title>ARM: tlb: don't perform inner-shareable invalidation for local TLB ops</title>
<updated>2013-08-12T11:25:44Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2013-02-11T13:47:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0915781bd5edf78b1154e61efe962dc15872d09'/>
<id>urn:sha1:f0915781bd5edf78b1154e61efe962dc15872d09</id>
<content type='text'>
Inner-shareable TLB invalidation is typically more expensive than local
(non-shareable) invalidation, so performing the broadcasting for
local_flush_tlb_* operations is a waste of cycles and needlessly
clobbers entries in the TLBs of other CPUs.

This patch introduces __flush_tlb_* versions for many of the TLB
invalidation functions, which only respect inner-shareable variants of
the invalidation instructions when presented with the TLB_V7_UIS_FULL
flag. The local version is also inlined to prevent SMP_ON_UP kernels
from missing flushes, where the __flush variant would be called with
the UP flags.

This gains us around 0.5% in hackbench scores for a dual-core A15, but I
would expect this to improve as more cores (and clusters) are added to
the equation.

Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Reported-by: Albin Tonnerre &lt;Albin.Tonnerre@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>ARM: 7789/1: Do not run dummy_flush_tlb_a15_erratum() on non-Cortex-A15</title>
<updated>2013-07-26T11:02:09Z</updated>
<author>
<name>Fabio Estevam</name>
</author>
<published>2013-07-23T14:13:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f49856bb029779d8f1b63517a3a3b34ffe672c7'/>
<id>urn:sha1:1f49856bb029779d8f1b63517a3a3b34ffe672c7</id>
<content type='text'>
Commit 93dc688 (ARM: 7684/1: errata: Workaround for Cortex-A15 erratum 798181 (TLBI/DSB operations)) causes the following undefined instruction error on a mx53 (Cortex-A8):

Internal error: Oops - undefined instruction: 0 [#1] SMP ARM
CPU: 0 PID: 275 Comm: modprobe Not tainted 3.11.0-rc2-next-20130722-00009-g9b0f371 #881
task: df46cc00 ti: df48e000 task.ti: df48e000
PC is at check_and_switch_context+0x17c/0x4d0
LR is at check_and_switch_context+0xdc/0x4d0

This problem happens because check_and_switch_context() calls dummy_flush_tlb_a15_erratum() without checking if we are really running on a Cortex-A15 or not.

To avoid this issue, only call dummy_flush_tlb_a15_erratum() inside
check_and_switch_context() if erratum_a15_798181() returns true, which means that we are really running on a Cortex-A15.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Reviewed-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'devel-stable' into for-next</title>
<updated>2013-06-29T10:44:43Z</updated>
<author>
<name>Russell King</name>
</author>
<published>2013-06-29T10:44:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c0c01ab742ddfaf6b6f2d64b890e77cda4b7727'/>
<id>urn:sha1:3c0c01ab742ddfaf6b6f2d64b890e77cda4b7727</id>
<content type='text'>
Conflicts:
	arch/arm/Makefile
	arch/arm/include/asm/glue-proc.h
</content>
</entry>
<entry>
<title>ARM: 7769/1: Cortex-A15: fix erratum 798181 implementation</title>
<updated>2013-06-24T14:27:35Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2013-06-21T11:07:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d0752bca1f9a91fb646647aa4abbb21156f316c'/>
<id>urn:sha1:0d0752bca1f9a91fb646647aa4abbb21156f316c</id>
<content type='text'>
Looking into the active_asids array is not enough, as we also need
to look into the reserved_asids array (they both represent processes
that are currently running).

Also, not holding the ASID allocator lock is racy, as another CPU
could schedule that process and trigger a rollover, making the erratum
workaround miss an IPI.

Exposing this outside of context.c is a little ugly on the side, so
let's define a new entry point that the erratum workaround can call
to obtain the cpumask.

Cc: &lt;stable@vger.kernel.org&gt; # 3.9
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&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: 7768/1: prevent risks of out-of-bound access in ASID allocator</title>
<updated>2013-06-24T14:26:41Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2013-06-21T11:06:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8e4a4740fa2b17c0a447b3ab783b3dc10702e27'/>
<id>urn:sha1:b8e4a4740fa2b17c0a447b3ab783b3dc10702e27</id>
<content type='text'>
On a CPU that never ran anything, both the active and reserved ASID
fields are set to zero. In this case the ASID_TO_IDX() macro will
return -1, which is not a very useful value to index a bitmap.

Instead of trying to offset the ASID so that ASID #1 is actually
bit 0 in the asid_map bitmap, just always ignore bit 0 and start
the search from bit 1. This makes the code a bit more readable,
and without risk of OoB access.

Cc: &lt;stable@vger.kernel.org&gt; # 3.9
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Reported-by: Catalin Marinas &lt;catalin.marinas@arm.com&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: 7767/1: let the ASID allocator handle suspended animation</title>
<updated>2013-06-24T14:24:54Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2013-06-21T11:06:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae120d9edfe96628f03d87634acda0bfa7110632'/>
<id>urn:sha1:ae120d9edfe96628f03d87634acda0bfa7110632</id>
<content type='text'>
When a CPU is running a process, the ASID for that process is
held in a per-CPU variable (the "active ASIDs" array). When
the ASID allocator handles a rollover, it copies the active
ASIDs into a "reserved ASIDs" array to ensure that a process
currently running on another CPU will continue to run unaffected.
The active array is zero-ed to indicate that a rollover occurred.

Because of this mechanism, a reserved ASID is only remembered for
a single rollover. A subsequent rollover will completely refill
the reserved ASIDs array.

In a severely oversubscribed environment where a CPU can be
prevented from running for extended periods of time (think virtual
machines), the above has a horrible side effect:

[P{a} denotes process P running with ASID a]

	CPU-0		CPU-1

	A{x}				[active = &lt;x 0&gt;]

	[suspended]	runs B{y}	[active = &lt;x y&gt;]

					[rollover:
					 active = &lt;0 0&gt;
					 reserved = &lt;x y&gt;]

			runs B{y}	[active = &lt;0 y&gt;
					 reserved = &lt;x y&gt;]

					[rollover:
					 active = &lt;0 0&gt;
					 reserved = &lt;0 y&gt;]

			runs C{x}	[active = &lt;0 x&gt;]

	[resumes]

	runs A{x}

At that stage, both A and C have the same ASID, with deadly
consequences.

The fix is to preserve reserved ASIDs across rollovers if
the CPU doesn't have an active ASID when the rollover occurs.

Cc: &lt;stable@vger.kernel.org&gt; # 3.9
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Acked-by: Catalin Carinas &lt;catalin.marinas@arm.com&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: LPAE: use 64-bit accessors for TTBR registers</title>
<updated>2013-05-30T15:02:07Z</updated>
<author>
<name>Cyril Chemparathy</name>
</author>
<published>2012-07-16T21:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1fc84ae84b5153e32a4b6ace507f9663e10b0cb2'/>
<id>urn:sha1:1fc84ae84b5153e32a4b6ace507f9663e10b0cb2</id>
<content type='text'>
This patch adds TTBR accessor macros, and modifies cpu_get_pgd() and
the LPAE version of cpu_set_reserved_ttbr0() to use these instead.

In the process, we also fix these functions to correctly handle cases
where the physical address lies beyond the 4G limit of 32-bit addressing.

Signed-off-by: Cyril Chemparathy &lt;cyril@ti.com&gt;
Signed-off-by: Vitaly Andrianov &lt;vitalya@ti.com&gt;
Acked-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Tested-by: Santosh Shilimkar &lt;santosh.shilimkar@ti.com&gt;
Tested-by: Subash Patel &lt;subash.rp@samsung.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
</feed>
