<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm/mm/init.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-12-17T09:12:25Z</updated>
<entry>
<title>arm: extend pfn_valid to take into account freed memory map alignment</title>
<updated>2021-12-17T09:12:25Z</updated>
<author>
<name>Mike Rapoport</name>
</author>
<published>2021-12-13T08:57:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6026d4032dbbe3d7f4ac2c8daa923fe74dcf41c4'/>
<id>urn:sha1:6026d4032dbbe3d7f4ac2c8daa923fe74dcf41c4</id>
<content type='text'>
commit a4d5613c4dc6d413e0733e37db9d116a2a36b9f3 upstream.

When unused memory map is freed the preserved part of the memory map is
extended to match pageblock boundaries because lots of core mm
functionality relies on homogeneity of the memory map within pageblock
boundaries.

Since pfn_valid() is used to check whether there is a valid memory map
entry for a PFN, make it return true also for PFNs that have memory map
entries even if there is no actual memory populated there.

Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Tested-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Link: https://lore.kernel.org/lkml/20210630071211.21011-1-rppt@kernel.org/
Signed-off-by: Mark-PK Tsai &lt;mark-pk.tsai@mediatek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>memblock: align freed memory map on pageblock boundaries with SPARSEMEM</title>
<updated>2021-12-17T09:12:24Z</updated>
<author>
<name>Mike Rapoport</name>
</author>
<published>2021-12-13T08:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bdca964781a0a804e8183ee856ad028d4386cab5'/>
<id>urn:sha1:bdca964781a0a804e8183ee856ad028d4386cab5</id>
<content type='text'>
commit f921f53e089a12a192808ac4319f28727b35dc0f upstream.

When CONFIG_SPARSEMEM=y the ranges of the memory map that are freed are not
aligned to the pageblock boundaries which breaks assumptions about
homogeneity of the memory map throughout core mm code.

Make sure that the freed memory map is always aligned on pageblock
boundaries regardless of the memory model selection.

Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Link: https://lore.kernel.org/lkml/20210630071211.21011-1-rppt@kernel.org/
[backport upstream modification in mm/memblock.c to arch/arm/mm/init.c]
Signed-off-by: Mark-PK Tsai &lt;mark-pk.tsai@mediatek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>memblock: free_unused_memmap: use pageblock units instead of MAX_ORDER</title>
<updated>2021-12-17T09:12:24Z</updated>
<author>
<name>Mike Rapoport</name>
</author>
<published>2021-12-13T08:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=60111b30be0bdbc20dfbbfb6336e5ff16a2518a0'/>
<id>urn:sha1:60111b30be0bdbc20dfbbfb6336e5ff16a2518a0</id>
<content type='text'>
commit e2a86800d58639b3acde7eaeb9eb393dca066e08 upstream.

The code that frees unused memory map uses rounds start and end of the
holes that are freed to MAX_ORDER_NR_PAGES to preserve continuity of the
memory map for MAX_ORDER regions.

Lots of core memory management functionality relies on homogeneity of the
memory map within each pageblock which size may differ from MAX_ORDER in
certain configurations.

Although currently, for the architectures that use free_unused_memmap(),
pageblock_order and MAX_ORDER are equivalent, it is cleaner to have common
notation thought mm code.

Replace MAX_ORDER_NR_PAGES with pageblock_nr_pages and update the comments
to make it more clear why the alignment to pageblock boundaries is
required.

Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Link: https://lore.kernel.org/lkml/20210630071211.21011-1-rppt@kernel.org/
[backport upstream modification in mm/memblock.c to arch/arm/mm/init.c]
Signed-off-by: Mark-PK Tsai &lt;mark-pk.tsai@mediatek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ARM: Qualify enabling of swiotlb_init()</title>
<updated>2021-09-26T12:07:06Z</updated>
<author>
<name>Florian Fainelli</name>
</author>
<published>2021-03-19T04:03:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f23763ab464f1eaf90912516540165a6e163ad4f'/>
<id>urn:sha1:f23763ab464f1eaf90912516540165a6e163ad4f</id>
<content type='text'>
commit fcf044891c84e38fc90eb736b818781bccf94e38 upstream.

We do not need a SWIOTLB unless we have DRAM that is addressable beyond
the arm_dma_limit. Compare max_pfn with arm_dma_pfn_limit to determine
whether we do need a SWIOTLB to be initialized.

Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ARM: 9012/1: move device tree mapping out of linear region</title>
<updated>2021-05-19T08:08:32Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-05-10T13:33:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b05a28f47582a8116cf47533c250e988577b3303'/>
<id>urn:sha1:b05a28f47582a8116cf47533c250e988577b3303</id>
<content type='text'>
commit 7a1be318f5795cb66fa0dc86b3ace427fe68057f upstream

On ARM, setting up the linear region is tricky, given the constraints
around placement and alignment of the memblocks, and how the kernel
itself as well as the DT are placed in physical memory.

Let's simplify matters a bit, by moving the device tree mapping to the
top of the address space, right between the end of the vmalloc region
and the start of the the fixmap region, and create a read-only mapping
for it that is independent of the size of the linear region, and how it
is organized.

Since this region was formerly used as a guard region, which will now be
populated fully on LPAE builds by this read-only mapping (which will
still be able to function as a guard region for stray writes), bump the
start of the [underutilized] fixmap region by 512 KB as well, to ensure
that there is always a proper guard region here. Doing so still leaves
ample room for the fixmap space, even with NR_CPUS set to its maximum
value of 32.

Tested-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Nicolas Pitre &lt;nico@fluxnic.net&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ARM: 8949/1: mm: mark free_memmap as __init</title>
<updated>2020-02-14T21:34:17Z</updated>
<author>
<name>Olof Johansson</name>
</author>
<published>2019-12-18T00:18:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d42957c9045d90bca865f534b6114551034c944'/>
<id>urn:sha1:5d42957c9045d90bca865f534b6114551034c944</id>
<content type='text'>
commit 31f3010e60522ede237fb145a63b4af5a41718c2 upstream.

As of commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING
forcibly"), free_memmap() might not always be inlined, and thus is
triggering a section warning:

WARNING: vmlinux.o(.text.unlikely+0x904): Section mismatch in reference from the function free_memmap() to the function .meminit.text:memblock_free()

Mark it as __init, since the faller (free_unused_memmap) already is.

Fixes: ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly")
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ARM: 8901/1: add a criteria for pfn_valid of arm</title>
<updated>2019-08-28T22:30:21Z</updated>
<author>
<name>zhaoyang</name>
</author>
<published>2019-08-26T03:07:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b3efa4f1479c91cb8361acef55f9c6662feba57'/>
<id>urn:sha1:5b3efa4f1479c91cb8361acef55f9c6662feba57</id>
<content type='text'>
pfn_valid can be wrong when parsing a invalid pfn whose phys address
exceeds BITS_PER_LONG as the MSB will be trimed when shifted.

The issue originally arise from bellowing call stack, which corresponding to
an access of the /proc/kpageflags from userspace with a invalid pfn parameter
and leads to kernel panic.

[46886.723249] c7 [&lt;c031ff98&gt;] (stable_page_flags) from [&lt;c03203f8&gt;]
[46886.723264] c7 [&lt;c0320368&gt;] (kpageflags_read) from [&lt;c0312030&gt;]
[46886.723280] c7 [&lt;c0311fb0&gt;] (proc_reg_read) from [&lt;c02a6e6c&gt;]
[46886.723290] c7 [&lt;c02a6e24&gt;] (__vfs_read) from [&lt;c02a7018&gt;]
[46886.723301] c7 [&lt;c02a6f74&gt;] (vfs_read) from [&lt;c02a778c&gt;]
[46886.723315] c7 [&lt;c02a770c&gt;] (SyS_pread64) from [&lt;c0108620&gt;]
(ret_fast_syscall+0x0/0x28)

Signed-off-by: Zhaoyang Huang &lt;zhaoyang.huang@unisoc.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: 8874/1: mm: only adjust sections of valid mm structures</title>
<updated>2019-08-23T10:32:36Z</updated>
<author>
<name>Doug Berger</name>
</author>
<published>2019-07-01T17:50:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c51bc12d06b3a5494fbfcbd788a8e307932a06e9'/>
<id>urn:sha1:c51bc12d06b3a5494fbfcbd788a8e307932a06e9</id>
<content type='text'>
A timing hazard exists when an early fork/exec thread begins
exiting and sets its mm pointer to NULL while a separate core
tries to update the section information.

This commit ensures that the mm pointer is not NULL before
setting its section parameters. The arguments provided by
commit 11ce4b33aedc ("ARM: 8672/1: mm: remove tasklist locking
from update_sections_early()") are equally valid for not
requiring grabbing the task_lock around this check.

Fixes: 08925c2f124f ("ARM: 8464/1: Update all mm structures with section adjustments")
Signed-off-by: Doug Berger &lt;opendmb@gmail.com&gt;
Acked-by: Laura Abbott &lt;labbott@redhat.com&gt;
Cc: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: "Steven Rostedt (VMware)" &lt;rostedt@goodmis.org&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>arm: use swiotlb for bounce buffering on LPAE configs</title>
<updated>2019-07-24T15:29:01Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2019-07-23T09:33:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad3c7b18c5b362be5dbd0f2c0bcf1fd5fd659315'/>
<id>urn:sha1:ad3c7b18c5b362be5dbd0f2c0bcf1fd5fd659315</id>
<content type='text'>
The DMA API requires that 32-bit DMA masks are always supported, but on
arm LPAE configs they do not currently work when memory is present
above 4GB.  Wire up the swiotlb code like for all other architectures
to provide the bounce buffering in that case.

Fixes: 21e07dba9fb11 ("scsi: reduce use of block bounce buffers").
Reported-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm</title>
<updated>2019-07-09T04:08:34Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2019-07-09T04:08:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b49350b16fa3171136d7cf351ac7e9e6673b8f2'/>
<id>urn:sha1:2b49350b16fa3171136d7cf351ac7e9e6673b8f2</id>
<content type='text'>
Pull ARM updates from Russell King:

 - Add a "cut here" to make it clearer where oops dumps should be cut
   from - we already have a marker for the end of the dumps.

 - Add logging severity to show_pte()

 - Drop unnecessary common-page-size linker flag

 - Errata workarounds for Cortex A12 857271, Cortex A17 857272 and
   Cortex A7 814220.

 - Remove some unused variables that had started to provoke a compiler
   warning.

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 8863/1: stm32: select ARM errata 814220
  ARM: 8862/1: errata: 814220-B-Cache maintenance by set/way operations can execute out of order
  ARM: 8865/1: mm: remove unused variables
  ARM: 8864/1: Add workaround for I-Cache line size mismatch between CPU cores
  ARM: 8861/1: errata: Workaround errata A12 857271 / A17 857272
  ARM: 8860/1: VDSO: Drop implicit common-page-size linker flag
  ARM: arrange show_pte() to issue severity-based messages
  ARM: add "8&lt;--- cut here ---" to kernel dumps
</content>
</entry>
</feed>
