<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/include/asm-sh/pgtable.h, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/include/asm-sh/pgtable.h?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/include/asm-sh/pgtable.h?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2008-07-28T23:09:44Z</updated>
<entry>
<title>sh: migrate to arch/sh/include/</title>
<updated>2008-07-28T23:09:44Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2008-07-28T23:09:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f15cbe6f1a4b4d9df59142fc8e4abb973302cf44'/>
<id>urn:sha1:f15cbe6f1a4b4d9df59142fc8e4abb973302cf44</id>
<content type='text'>
This follows the sparc changes a439fe51a1f8eb087c22dd24d69cebae4a3addac.

Most of the moving about was done with Sam's directions at:

http://marc.info/?l=linux-sh&amp;m=121724823706062&amp;w=2

with subsequent hacking and fixups entirely my fault.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Stub in page_table_range_init() on nommu.</title>
<updated>2008-01-28T04:19:00Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2007-12-17T01:52:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=9acb98fb7ce948063a2269b4f8db83d6bef7e2b0'/>
<id>urn:sha1:9acb98fb7ce948063a2269b4f8db83d6bef7e2b0</id>
<content type='text'>
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Clean up places that make 29-bit physical assumptions.</title>
<updated>2008-01-28T04:18:59Z</updated>
<author>
<name>Stuart Menefy</name>
<email>stuart.menefy@st.com</email>
</author>
<published>2007-11-30T08:52:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d02b08f6e8b184ffef349e395210a5e82ff4f4bc'/>
<id>urn:sha1:d02b08f6e8b184ffef349e395210a5e82ff4f4bc</id>
<content type='text'>
Signed-off-by: Stuart Menefy &lt;stuart.menefy@st.com&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: SH-5 uses a 64-bit PTE_MAGNITUDE, as X2 TLB.</title>
<updated>2008-01-28T04:18:52Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2007-11-21T07:19:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=55183e9bb2c2ce43d88eaa575c2d6d4fd6d865a3'/>
<id>urn:sha1:55183e9bb2c2ce43d88eaa575c2d6d4fd6d865a3</id>
<content type='text'>
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Split out pgtable.h in to _32 and _64 variants.</title>
<updated>2008-01-28T04:18:47Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2007-11-19T09:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=249cfea914002baac0af4b080306e6b820cd86b2'/>
<id>urn:sha1:249cfea914002baac0af4b080306e6b820cd86b2</id>
<content type='text'>
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Fix up VMALLOC_START for SH-5.</title>
<updated>2008-01-28T04:18:44Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2007-11-10T11:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=0468b4bb125542e75e39f08ebaa74a7daf845631'/>
<id>urn:sha1:0468b4bb125542e75e39f08ebaa74a7daf845631</id>
<content type='text'>
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Split out 29-bit and 32-bit physical mode definitions.</title>
<updated>2008-01-28T04:18:42Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2007-11-10T10:16:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=36bcd39dbca824daffe16d607ae574b6edc7d31a'/>
<id>urn:sha1:36bcd39dbca824daffe16d607ae574b6edc7d31a</id>
<content type='text'>
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Fix up PAGE_KERNEL_PCC() for nommu.</title>
<updated>2007-11-07T02:40:24Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2007-11-07T02:40:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ac11584ccbd14aadcc6613598f3bac4589ea3a11'/>
<id>urn:sha1:ac11584ccbd14aadcc6613598f3bac4589ea3a11</id>
<content type='text'>
PAGE_KERNEL_PCC() takes two arguments, which weren't reflected in the
nommu case. Fix it up.

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Correct pte_page() breakage.</title>
<updated>2007-10-29T23:44:13Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2007-10-15T02:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=afca03574555c9af9a86d5a025f0187d0b77ac32'/>
<id>urn:sha1:afca03574555c9af9a86d5a025f0187d0b77ac32</id>
<content type='text'>
As noted by David:

pte_page() is a macro defined as follows;

    include/asm-sh/pgtable.h
    #define pte_page(x)    phys_to_page(pte_val(x)&amp;PTE_PHYS_MASK)

    include/asm-sh/page.h
    #define phys_to_page(phys)    (pfn_to_page(phys &gt;&gt; PAGE_SHIFT))

So as you can see the phys_to_page() macro doesn't wrap the 'phys'
parameter in parentheses so we end up with;

    pte_val(x)&amp;PTE_PHYS_MASK &gt;&gt; PAGE_SHIFT

Which is not what we wanted as '&gt;&gt;' has a higher precedence than bitwise
AND. I dug into the git repository and I believe this bug was added with
this commit (104b8deaa5c0144cccfc7d914413ff80c7176af1);

2006-03-27 KAMEZAWA Hiroyuki [PATCH] unify pfn_to_page: sh pfn_to_page

-#define phys_to_page(phys)     (mem_map + (((phys)-__MEMORY_START) &gt;&gt;
PAGE_SHIFT))
-#define page_to_phys(page)     (((page - mem_map) &lt;&lt; PAGE_SHIFT) +
__MEMORY_START)
+#define phys_to_page(phys)     (pfn_to_page(phys &gt;&gt; PAGE_SHIFT))
+#define page_to_phys(page)     (page_to_pfn(page) &lt;&lt; PAGE_SHIFT)

Reported-by: David ADDISON &lt;david.addison@st.com&gt;
Reported-by: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>sh: Fix up extended mode TLB for SH-X2+ cores.</title>
<updated>2007-09-21T02:57:55Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2007-09-21T02:55:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d04a0f79f502a87bb17b147afc4b3e39e75275c3'/>
<id>urn:sha1:d04a0f79f502a87bb17b147afc4b3e39e75275c3</id>
<content type='text'>
The extended mode TLB requires both 64-bit PTEs and a 64-bit pgprot,
correspondingly, the PGD also has to be 64-bits, so fix that up.

The kernel and user permission bits really are decoupled in early
cuts of the silicon, which means that we also have to set corresponding
kernel permissions on user pages or we end up with user pages that the
kernel simply can't touch (!).

Finally, with those things corrected, really enable MMUCR.ME and
correct the PTEA value (this simply needs to be the upper 32-bits
of the PTE, with the size and protection bit encoding).

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
</feed>
