<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/arch/arc/include/asm/pgtable-levels.h, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/arch/arc/include/asm/pgtable-levels.h?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/arch/arc/include/asm/pgtable-levels.h?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-18T21:44:12Z</updated>
<entry>
<title>arc: drop definitions of pgd_index() and pgd_offset{, _k}() entirely</title>
<updated>2022-04-18T21:44:12Z</updated>
<author>
<name>Rolf Eike Beer</name>
<email>eb@emlix.com</email>
</author>
<published>2022-03-28T08:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d139d0f0bfdabe5762214a96f3d5c4b88f524b41'/>
<id>urn:sha1:d139d0f0bfdabe5762214a96f3d5c4b88f524b41</id>
<content type='text'>
They were in &lt;asm/pgtables.h&gt; and have been removed from there in
974b9b2c68f ("mm: consolidate pte_index() and pte_offset_*() definitions")
in favor of the generic version. But that missed that the same definitons
also existed in &lt;asm/pgtable-levels.h&gt;, where they were (inadvertently?)
introduced in fe6cb7b043b6 ("ARC: mm: disintegrate pgtable.h into levels
and flags").

Fixes: 974b9b2c68f3 ("mm: consolidate pte_index() and pte_offset_*() definitions")
Fixes: fe6cb7b043b6 ("ARC: mm: disintegrate pgtable.h into levels and flags")
Signed-off-by: Rolf Eike Beer &lt;eb@emlix.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>arch: Add pmd_pfn() where it is missing</title>
<updated>2022-03-21T16:59:02Z</updated>
<author>
<name>Mike Rapoport</name>
<email>rppt@linux.ibm.com</email>
</author>
<published>2022-02-04T18:49:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7106c51ee9a1b65eff63496636fce36bf246c1a0'/>
<id>urn:sha1:7106c51ee9a1b65eff63496636fce36bf246c1a0</id>
<content type='text'>
We need to use this function in common code, so define it for
architectures and/or configrations that miss it.  The result of
pmd_pfn() will only be used if TRANSPARENT_HUGEPAGE is enabled,
but a function or macro called pmd_pfn() must be defined, even
on machines with two level page tables.

Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
</content>
</entry>
<entry>
<title>ARC: mm: support 4 levels of page tables</title>
<updated>2021-08-26T20:43:19Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@kernel.org</email>
</author>
<published>2020-10-01T22:46:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8747ff704ac886f6ef992b1b7eadcf77d151fd3a'/>
<id>urn:sha1:8747ff704ac886f6ef992b1b7eadcf77d151fd3a</id>
<content type='text'>
Acked-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: mm: support 3 levels of page tables</title>
<updated>2021-08-26T20:43:19Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@kernel.org</email>
</author>
<published>2020-10-01T01:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2dde02ab6d1a725ddccc7144ff6bf5f55d37f916'/>
<id>urn:sha1:2dde02ab6d1a725ddccc7144ff6bf5f55d37f916</id>
<content type='text'>
ARCv2 MMU is software walked and Linux implements 2 levels of paging: pgd/pte.
Forthcoming hw will have multiple levels, so this change preps mm code
for same. It is also fun to try multi levels even on soft-walked code to
ensure generic mm code is robust to handle.

overview
________

2 levels {pgd, pte} : pmd is folded but pmd_* macros are valid and operate on pgd
3 levels {pgd, pmd, pte}:
  - pud is folded and pud_* macros point to pgd
  - pmd_* macros operate on actual pmd

code changes
____________

1. #include &lt;asm-generic/pgtable-nopud.h&gt;

2. Define CONFIG_PGTABLE_LEVELS 3

3a. Define PMD_SHIFT, PMD_SIZE, PMD_MASK, pmd_t
3b. Define pmd_val() which actually deals with pmd
    (pmd_offset(), pmd_index() are provided by generic code)
3c. pmd_alloc_one()/pmd_free() also provided by generic code
    (pmd_populate/pmd_free already exist)

4. Define pud_none(), pud_bad() macros based on generic pud_val() which
   internally pertains to pgd now.
4b. define pud_populate() to just setup pgd

Acked-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: mm: switch pgtable_t back to struct page *</title>
<updated>2021-08-26T20:42:42Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@kernel.org</email>
</author>
<published>2021-08-12T19:54:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d9820ff76f95fa26d33e412254a89cd65b23142d'/>
<id>urn:sha1:d9820ff76f95fa26d33e412254a89cd65b23142d</id>
<content type='text'>
So far ARC pgtable_t has not been struct page based to avoid extra
page_address() calls involved. However the differences are down to
noise and get in the way of using generic code, hence this patch.

This also allows us to reuse generic THP depost/withdraw code.

There's some additional consideration for PGDIR_SHIFT in 4K page config.
Now due to page tables being PAGE_SIZE deep only, the address split
can't be really arbitrary.

Tested-by: kernel test robot &lt;lkp@intel.com&gt;
Suggested-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Acked-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: mm: disintegrate pgtable.h into levels and flags</title>
<updated>2021-08-25T22:53:19Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@kernel.org</email>
</author>
<published>2019-09-13T22:25:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fe6cb7b043b69cd9498616592bb9e28648fb4f7a'/>
<id>urn:sha1:fe6cb7b043b69cd9498616592bb9e28648fb4f7a</id>
<content type='text'>
 - pgtable-bits-arcv2.h (MMU specific page table flags)
 - pgtable-levels.h (paging levels)

No functional changes, but paves way for easy addition of new MMU code
with different bits and levels etc

Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
</feed>
