<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/include/asm/pgtable.h, branch linux-3.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-07-01T03:14:01Z</updated>
<entry>
<title>arm64: mm: remove broken &amp;= operator from pmd_mknotpresent</title>
<updated>2014-07-01T03:14:01Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2014-06-18T13:06:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b4e1805412053a0f7dcb7ae0a2d92c175cd16d4'/>
<id>urn:sha1:6b4e1805412053a0f7dcb7ae0a2d92c175cd16d4</id>
<content type='text'>
commit e3a920afc3482e954834a4ed95908c4bc5e4c000 upstream.

This should be a plain old '&amp;' and could easily lead to undefined
behaviour if the target of a pmd_mknotpresent invocation was the same
as the parameter.

Fixes: 9c7e535fcc17 (arm64: mm: Route pmd thp functions through pte equivalents)
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>arm64: mm: fix pmd_write CoW brokenness</title>
<updated>2014-05-29T10:31:14Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2014-05-27T18:11:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ceb218359de22e70980801d4fa04fffbfc44adb8'/>
<id>urn:sha1:ceb218359de22e70980801d4fa04fffbfc44adb8</id>
<content type='text'>
Commit 9c7e535fcc17 ("arm64: mm: Route pmd thp functions through pte
equivalents") changed the pmd manipulator and accessor functions to
convert the target pmd to a pte, process it with the pte functions, then
convert it back. Along the way, we gained support for PTE_WRITE, however
this is completely ignored by set_pmd_at, and so we fail to set the
PMD_SECT_RDONLY for PMDs, resulting in all sorts of lovely failures (like
CoW not working).

Partially reverting the offending commit (by making use of
PMD_SECT_RDONLY explicitly for pmd_{write,wrprotect,mkwrite} functions)
leads to further issues because pmd_write can then return potentially
incorrect values for page table entries marked as RDONLY, leading to
BUG_ON(pmd_write(entry)) tripping under some THP workloads.

This patch fixes the issue by routing set_pmd_at through set_pte_at,
which correctly takes the PTE_WRITE flag into account. Given that
THP mappings are always anonymous, the additional cache-flushing code
in __sync_icache_dcache won't impose any significant overhead as the
flush will be skipped.

Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Acked-by: Steve Capper &lt;steve.capper@arm.com&gt;
Tested-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux</title>
<updated>2014-03-31T22:01:45Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2014-03-31T22:01:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ce235faa8fefa4eb7199cad890944c1d2ba1b3e'/>
<id>urn:sha1:1ce235faa8fefa4eb7199cad890944c1d2ba1b3e</id>
<content type='text'>
Pull ARM64 updates from Catalin Marinas:
 - KGDB support for arm64
 - PCI I/O space extended to 16M (in preparation of PCIe support
   patches)
 - Dropping ZONE_DMA32 in favour of ZONE_DMA (we only need one for the
   time being), together with swiotlb late initialisation to correctly
   setup the bounce buffer
 - DMA API cache maintenance support (not all ARMv8 platforms have
   hardware cache coherency)
 - Crypto extensions advertising via ELF_HWCAP2 for compat user space
 - Perf support for dwarf unwinding in compat mode
 - asm/tlb.h converted to the generic mmu_gather code
 - asm-generic rwsem implementation
 - Code clean-up

* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (42 commits)
  arm64: Remove pgprot_dmacoherent()
  arm64: Support DMA_ATTR_WRITE_COMBINE
  arm64: Implement custom mmap functions for dma mapping
  arm64: Fix __range_ok macro
  arm64: Fix duplicated Kconfig entries
  arm64: mm: Route pmd thp functions through pte equivalents
  arm64: rwsem: use asm-generic rwsem implementation
  asm-generic: rwsem: de-PPCify rwsem.h
  arm64: enable generic CPU feature modalias matching for this architecture
  arm64: smp: make local symbol static
  arm64: debug: make local symbols static
  ARM64: perf: support dwarf unwinding in compat mode
  ARM64: perf: add support for frame pointer unwinding in compat mode
  ARM64: perf: add support for perf registers API
  arm64: Add boot time configuration of Intermediate Physical Address size
  arm64: Do not synchronise I and D caches for special ptes
  arm64: Make DMA coherent and strongly ordered mappings not executable
  arm64: barriers: add dmb barrier
  arm64: topology: Implement basic CPU topology support
  arm64: advertise ARMv8 extensions to 32-bit compat ELF binaries
  ...
</content>
</entry>
<entry>
<title>arm64: Remove pgprot_dmacoherent()</title>
<updated>2014-03-24T10:35:35Z</updated>
<author>
<name>Catalin Marinas</name>
</author>
<published>2014-03-24T10:35:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=196adf2f3015eacac0567278ba538e3ffdd16d0e'/>
<id>urn:sha1:196adf2f3015eacac0567278ba538e3ffdd16d0e</id>
<content type='text'>
Since this macro is identical to pgprot_writecombine() and is only used
in a single place, remove it completely to avoid confusion. On ARMv7+
processors, the coherent DMA mapping must be Normal NonCacheable (a.k.a.
writecombine) to avoid mismatched hardware attribute aliases (with the
kernel linear mapping as Normal Cacheable).

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: mm: Route pmd thp functions through pte equivalents</title>
<updated>2014-03-14T18:02:10Z</updated>
<author>
<name>Steve Capper</name>
</author>
<published>2014-02-25T10:02:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c7e535fcc1725fc2e2d4f0d9dd14137f0243e23'/>
<id>urn:sha1:9c7e535fcc1725fc2e2d4f0d9dd14137f0243e23</id>
<content type='text'>
Rather than have separate hugetlb and transparent huge page pmd
manipulation functions, re-wire our thp functions to simply call the
pte equivalents.

This allows THP to take advantage of the new PTE_WRITE logic introduced
in:
  c2c93e5 arm64: mm: Introduce PTE_WRITE

To represent splitting THPs we use the PTE_SPECIAL bit as this is not
used for pmds.

Signed-off-by: Steve Capper &lt;steve.capper@linaro.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: Do not synchronise I and D caches for special ptes</title>
<updated>2014-03-13T11:22:29Z</updated>
<author>
<name>Catalin Marinas</name>
</author>
<published>2014-03-12T16:28:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71fdb6bf61bf0692f004f9daf5650392c0cfe300'/>
<id>urn:sha1:71fdb6bf61bf0692f004f9daf5650392c0cfe300</id>
<content type='text'>
Special pte mappings are not intended to be executable and do not even
have an associated struct page. This patch ensures that we do not call
__sync_icache_dcache() on such ptes.

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Reported-by: Steve Capper &lt;Steve.Capper@arm.com&gt;
Tested-by: Laura Abbott &lt;lauraa@codeaurora.org&gt;
Tested-by: Bharat Bhushan &lt;Bharat.Bhushan@freescale.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: Make DMA coherent and strongly ordered mappings not executable</title>
<updated>2014-03-13T11:22:21Z</updated>
<author>
<name>Catalin Marinas</name>
</author>
<published>2014-03-12T16:07:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de2db7432917a82b62d55bb59635586eeca6d1bd'/>
<id>urn:sha1:de2db7432917a82b62d55bb59635586eeca6d1bd</id>
<content type='text'>
pgprot_{dmacoherent,writecombine,noncached} don't need to generate
executable mappings with side-effects like __sync_icache_dcache() being
called when the mapping is in user space.

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Reported-by: Bharat Bhushan &lt;Bharat.Bhushan@freescale.com&gt;
Tested-by: Laura Abbott &lt;lauraa@codeaurora.org&gt;
Tested-by: Bharat Bhushan &lt;Bharat.Bhushan@freescale.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: mm: Add double logical invert to pte accessors</title>
<updated>2014-02-28T15:44:19Z</updated>
<author>
<name>Steve Capper</name>
</author>
<published>2014-02-25T11:38:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84fe6826c28f69d8708bd575faed7f75e6b6f57f'/>
<id>urn:sha1:84fe6826c28f69d8708bd575faed7f75e6b6f57f</id>
<content type='text'>
Page table entries on ARM64 are 64 bits, and some pte functions such as
pte_dirty return a bitwise-and of a flag with the pte value. If the
flag to be tested resides in the upper 32 bits of the pte, then we run
into the danger of the result being dropped if downcast.

For example:
	gather_stats(page, md, pte_dirty(*pte), 1);
where pte_dirty(*pte) is downcast to an int.

This patch adds a double logical invert to all the pte_ accessors to
ensure predictable downcasting.

Signed-off-by: Steve Capper &lt;steve.capper@linaro.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: mm: Introduce PTE_WRITE</title>
<updated>2014-01-31T11:30:49Z</updated>
<author>
<name>Steve Capper</name>
</author>
<published>2014-01-15T14:07:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2c93e5b7f3f42277ec25ff3746096abc0c0d0f7'/>
<id>urn:sha1:c2c93e5b7f3f42277ec25ff3746096abc0c0d0f7</id>
<content type='text'>
We have the following means for encoding writable or dirty ptes:

                                PTE_DIRTY       PTE_RDONLY
!pte_dirty &amp;&amp; !pte_write        0               1
!pte_dirty &amp;&amp; pte_write         0               1
pte_dirty &amp;&amp; !pte_write         1               1
pte_dirty &amp;&amp; pte_write          1               0

So we can't distinguish between writable clean ptes and read only
ptes. This can cause problems with ptes being incorrectly flagged as
read only when they are writable but not dirty.

This patch introduces a new software bit PTE_WRITE which allows us to
correctly identify writable ptes. PTE_RDONLY is now only clear for
valid ptes where a page is both writable and dirty.

Signed-off-by: Steve Capper &lt;steve.capper@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: mm: Remove PTE_BIT_FUNC macro</title>
<updated>2014-01-31T11:30:05Z</updated>
<author>
<name>Steve Capper</name>
</author>
<published>2014-01-15T14:07:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44b6dfc556811c0e6981329e29e1865fc7a8847d'/>
<id>urn:sha1:44b6dfc556811c0e6981329e29e1865fc7a8847d</id>
<content type='text'>
Expand out the pte manipulation functions. This makes our life easier
when using things like tags and cscope.

Signed-off-by: Steve Capper &lt;steve.capper@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
</feed>
