<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/linux/lcm.h, branch linux-4.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.5.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.5.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2015-03-31T15:45:50Z</updated>
<entry>
<title>block: fix blk_stack_limits() regression due to lcm() change</title>
<updated>2015-03-31T15:45:50Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2015-03-30T17:39:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e9637415a92cf25ad800b7fdeddcd30cce7b44ab'/>
<id>urn:sha1:e9637415a92cf25ad800b7fdeddcd30cce7b44ab</id>
<content type='text'>
Linux 3.19 commit 69c953c ("lib/lcm.c: lcm(n,0)=lcm(0,n) is 0, not n")
caused blk_stack_limits() to not properly stack queue_limits for stacked
devices (e.g. DM).

Fix this regression by establishing lcm_not_zero() and switching
blk_stack_limits() over to using it.

DM uses blk_set_stacking_limits() to establish the initial top-level
queue_limits that are then built up based on underlying devices' limits
using blk_stack_limits().  In the case of optimal_io_size (io_opt)
blk_set_stacking_limits() establishes a default value of 0.  With commit
69c953c, lcm(0, n) is no longer n, which compromises proper stacking of
the underlying devices' io_opt.

Test:
$ modprobe scsi_debug dev_size_mb=10 num_tgts=1 opt_blks=1536
$ cat /sys/block/sde/queue/optimal_io_size
786432
$ dmsetup create node --table "0 100 linear /dev/sde 0"

Before this fix:
$ cat /sys/block/dm-5/queue/optimal_io_size
0

After this fix:
$ cat /sys/block/dm-5/queue/optimal_io_size
786432

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@vger.kernel.org # 3.19+
Acked-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>block: Fix overrun in lcm() and move it to lib</title>
<updated>2010-03-15T11:47:59Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2010-03-15T11:46:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2cda2728aa1c8c006418a24f867b25e5eb7a32e2'/>
<id>urn:sha1:2cda2728aa1c8c006418a24f867b25e5eb7a32e2</id>
<content type='text'>
lcm() was defined to take integer-sized arguments.  The supplied
arguments are multiplied, however, causing us to overflow given
sufficiently large input.  That in turn led to incorrect optimal I/O
size reporting in some cases (RAID over RAID).

Switch lcm() over to unsigned long similar to gcd() and move the
function from blk-settings.c to lib.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
</feed>

<option value='linux-3.13.y'>linux-3.13.y</option>
<option value='linux-3.14.y'>linux-3.14.y</option>
<option value='linux-3.15.y'>linux-3.15.y</option>
<option value='linux-3.16.y'>linux-3.16.y</option>
<option value='linux-3.17.y'>linux-3.17.y</option>
<option value='linux-3.18.y'>linux-3.18.y</option>
<option value='linux-3.19.y'>linux-3.19.y</option>
<option value='linux-3.2.y'>linux-3.2.y</option>
<option value='linux-3.3.y'>linux-3.3.y</option>
<option value='linux-3.4.y'>linux-3.4.y</option>
<option value='linux-3.5.y'>linux-3.5.y</option>
<option value='linux-3.6.y'>linux-3.6.y</option>
<option value='linux-3.7.y'>linux-3.7.y</option>
<option value='linux-3.8.y'>linux-3.8.y</option>
<option value='linux-3.9.y'>linux-3.9.y</option>
<option value='linux-4.0.y'>linux-4.0.y</option>
<option value='linux-4.1.y'>linux-4.1.y</option>
<option value='linux-4.10.y'>linux-4.10.y</option>
<option value='linux-4.11.y'>linux-4.11.y</option>
<option value='linux-4.12.y'>linux-4.12.y</option>
<option value='linux-4.13.y'>linux-4.13.y</option>
<option value='linux-4.14.y'>linux-4.14.y</option>
<option value='linux-4.15.y'>linux-4.15.y</option>
<option value='linux-4.16.y'>linux-4.16.y</option>
<option value='linux-4.17.y'>linux-4.17.y</option>
<option value='linux-4.18.y'>linux-4.18.y</option>
<option value='linux-4.19.y'>linux-4.19.y</option>
<option value='linux-4.2.y'>linux-4.2.y</option>
<option value='linux-4.20.y'>linux-4.20.y</option>
<option value='linux-4.3.y'>linux-4.3.y</option>
<option value='linux-4.4.y'>linux-4.4.y</option>
<option value='linux-4.5.y'>linux-4.5.y</option>
<option value='linux-4.6.y'>linux-4.6.y</option>
<option value='linux-4.7.y'>linux-4.7.y</option>
<option value='linux-4.8.y'>linux-4.8.y</option>
<option value='linux-4.9.y'>linux-4.9.y</option>
<option value='linux-5.0.y'>linux-5.0.y</option>
<option value='linux-5.1.y'>linux-5.1.y</option>
<option value='linux-5.10.y'>linux-5.10.y</option>
<option value='linux-5.11.y'>linux-5.11.y</option>
<option value='linux-5.12.y'>linux-5.12.y</option>
<option value='linux-5.13.y'>linux-5.13.y</option>
<option value='linux-5.14.y'>linux-5.14.y</option>
<option value='linux-5.15.y'>linux-5.15.y</option>
<option value='linux-5.16.y'>linux-5.16.y</option>
<option value='linux-5.17.y'>linux-5.17.y</option>
<option value='linux-5.18.y'>linux-5.18.y</option>
<option value='linux-5.19.y'>linux-5.19.y</option>
<option value='linux-5.2.y'>linux-5.2.y</option>
<option value='linux-5.3.y'>linux-5.3.y</option>
<option value='linux-5.4.y'>linux-5.4.y</option>
<option value='linux-5.5.y'>linux-5.5.y</option>
<option value='linux-5.6.y'>linux-5.6.y</option>
<option value='linux-5.7.y'>linux-5.7.y</option>
<option value='linux-5.8.y'>linux-5.8.y</option>
<option value='linux-5.9.y'>linux-5.9.y</option>
<option value='linux-6.0.y'>linux-6.0.y</option>
<option value='linux-6.1.y'>linux-6.1.y</option>
<option value='linux-6.10.y'>linux-6.10.y</option>
<option value='linux-6.11.y'>linux-6.11.y</option>
<option value='linux-6.12.y' selected='selected'>linux-6.12.y</option>
<option value='linux-6.13.y'>linux-6.13.y</option>
<option value='linux-6.14.y'>linux-6.14.y</option>
<option value='linux-6.15.y'>linux-6.15.y</option>
<option value='linux-6.16.y'>linux-6.16.y</option>
<option value='linux-6.17.y'>linux-6.17.y</option>
<option value='linux-6.18.y'>linux-6.18.y</option>
<option value='linux-6.19.y'>linux-6.19.y</option>
<option value='linux-6.2.y'>linux-6.2.y</option>
<option value='linux-6.3.y'>linux-6.3.y</option>
<option value='linux-6.4.y'>linux-6.4.y</option>
<option value='linux-6.5.y'>linux-6.5.y</option>
<option value='linux-6.6.y'>linux-6.6.y</option>
<option value='linux-6.7.y'>linux-6.7.y</option>
<option value='linux-6.8.y'>linux-6.8.y</option>
<option value='linux-6.9.y'>linux-6.9.y</option>
<option value='linux-rolling-lts'>linux-rolling-lts</option>
<option value='linux-rolling-stable'>linux-rolling-stable</option>
<option value='master'>master</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Hosts the 0x221E linux distro kernel.</td><td class='sub right'>Ubuntu</td></tr></table>
<table class='tabs'><tr><td>
<a href='/distro/kernel/?h=linux-6.12.y'>summary</a><a href='/distro/kernel/refs/?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285'>refs</a><a class='active' href='/distro/kernel/log/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;showmsg=1'>log</a><a href='/distro/kernel/tree/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285'>tree</a><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285'>commit</a><a href='/distro/kernel/diff/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285'>diff</a></td><td class='form'><form class='right' method='get' action='/distro/kernel/log/arch/arm64/mm/cache.S'>
<input type='hidden' name='h' value='linux-6.12.y'/><input type='hidden' name='id' value='4058cf08945c18a6de193f4118fd05d83d3d4285'/><input type='hidden' name='showmsg' value='1'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/distro/kernel/log/?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285&amp;showmsg=1'>root</a>/<a href='/distro/kernel/log/arch?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285&amp;showmsg=1'>arch</a>/<a href='/distro/kernel/log/arch/arm64?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285&amp;showmsg=1'>arm64</a>/<a href='/distro/kernel/log/arch/arm64/mm?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285&amp;showmsg=1'>mm</a>/<a href='/distro/kernel/log/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285&amp;showmsg=1'>cache.S</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/distro/kernel/log/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=4058cf08945c18a6de193f4118fd05d83d3d4285'>Collapse</a>)</th><th class='left'>Author</th></tr>
<tr class='logheader'><td><span title='2021-12-15 11:19:41 +0000'>2021-12-15</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=c2c529b27ceb394ff4d3273ed1f552195fc4d555'>arm64: remove __dma_*_area() aliases</a></td><td>Mark Rutland</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
The __dma_inv_area() and __dma_clean_area() aliases make cache.S harder
to navigate, but don't gain us anything in practice.

For clarity, let's remove them along with their redundant comments. The
only users are __dma_map_area() and __dma_unmap_area(), which need to be
position independent, and can call __pi_dcache_inval_poc() and
__pi_dcache_clean_poc() directly.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: Fuad Tabba &lt;tabba@google.com&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20211206124715.4101571-4-mark.rutland@arm.com
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:49 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=fade9c2c6ee2baea7df8e6059b3f143c681e5ce4'>arm64: Rename arm64-internal cache maintenance functions</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
Although naming across the codebase isn't that consistent, it
tends to follow certain patterns. Moreover, the term "flush"
isn't defined in the Arm Architecture reference manual, and might
be interpreted to mean clean, invalidate, or both for a cache.

Rename arm64-internal functions to make the naming internally
consistent, as well as making it consistent with the Arm ARM, by
specifying whether it applies to the instruction, data, or both
caches, whether the operation is a clean, invalidate, or both.
Also specify which point the operation applies to, i.e., to the
point of unification (PoU), coherency (PoC), or persistence
(PoP).

This commit applies the following sed transformation to all files
under arch/arm64:

"s/\b__flush_cache_range\b/caches_clean_inval_pou_macro/g;"\
"s/\b__flush_icache_range\b/caches_clean_inval_pou/g;"\
"s/\binvalidate_icache_range\b/icache_inval_pou/g;"\
"s/\b__flush_dcache_area\b/dcache_clean_inval_poc/g;"\
"s/\b__inval_dcache_area\b/dcache_inval_poc/g;"\
"s/__clean_dcache_area_poc\b/dcache_clean_poc/g;"\
"s/\b__clean_dcache_area_pop\b/dcache_clean_pop/g;"\
"s/\b__clean_dcache_area_pou\b/dcache_clean_pou/g;"\
"s/\b__flush_cache_user_range\b/caches_clean_inval_user_pou/g;"\
"s/\b__flush_icache_all\b/icache_inval_all_pou/g;"

Note that __clean_dcache_area_poc is deliberately missing a word
boundary check at the beginning in order to match the efistub
symbols in image-vars.h.

Also note that, despite its name, __flush_icache_range operates
on both instruction and data caches. The name change here
reflects that.

No functional change intended.

Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-19-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:49 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=406d7d4e2bc76d38a6dc88733a0f72fabf02d305'>arm64: __clean_dcache_area_pou to take end parameter instead of size</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
To be consistent with other functions with similar names and
functionality in cacheflush.h, cache.S, and cachetlb.rst, change
to specify the range in terms of start and end, as opposed to
start and size.

No functional change intended.

Reported-by: Will Deacon &lt;will@kernel.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-16-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:49 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=f749448edb9c98bece0aeec5536260a8794af24b'>arm64: __clean_dcache_area_pop to take end parameter instead of size</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
To be consistent with other functions with similar names and
functionality in cacheflush.h, cache.S, and cachetlb.rst, change
to specify the range in terms of start and end, as opposed to
start and size.

No functional change intended.

Reported-by: Will Deacon &lt;will@kernel.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-15-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:49 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=1f42faf1d25de2ae239f322fda8af1c92c20e953'>arm64: __clean_dcache_area_poc to take end parameter instead of size</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
To be consistent with other functions with similar names and
functionality in cacheflush.h, cache.S, and cachetlb.rst, change
to specify the range in terms of start and end, as opposed to
start and size.

Because the code is shared with __dma_clean_area, it changes the
parameters for that as well. However, __dma_clean_area is local to
cache.S, so no other users are affected.

No functional change intended.

Reported-by: Will Deacon &lt;will@kernel.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-14-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:49 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=814b186079cd54d3fe3b6b8ab539cbd44705ef9d'>arm64: __flush_dcache_area to take end parameter instead of size</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
To be consistent with other functions with similar names and
functionality in cacheflush.h, cache.S, and cachetlb.rst, change
to specify the range in terms of start and end, as opposed to
start and size.

No functional change intended.

Reported-by: Will Deacon &lt;will@kernel.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-13-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:49 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=163d3f80695e31068c7d32244c9e6d406d5c5c00'>arm64: dcache_by_line_op to take end parameter instead of size</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
To be consistent with other functions with similar names and
functionality in cacheflush.h, cache.S, and cachetlb.rst, change
to specify the range in terms of start and end, as opposed to
start and size.

No functional change intended.

Reported-by: Will Deacon &lt;will@kernel.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-12-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:49 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=e3974adb4ef591e898956083a3dfa6336bb88638'>arm64: __inval_dcache_area to take end parameter instead of size</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
To be consistent with other functions with similar names and
functionality in cacheflush.h, cache.S, and cachetlb.rst, change
to specify the range in terms of start and end, as opposed to
start and size.

Because the code is shared with __dma_inv_area, it changes the
parameters for that as well. However, __dma_inv_area is local to
cache.S, so no other users are affected.

No functional change intended.

Reported-by: Will Deacon &lt;will@kernel.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-11-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:49 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=d044f8141847bee542998a6fd8de2c270fe40e48'>arm64: Fix comments to refer to correct function __flush_icache_range</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
Many comments refer to the function flush_icache_range, where the
intent is in fact __flush_icache_range. Fix these comments to
refer to the intended function.

That's probably due to commit 3b8c9f1cdfc506e9 ("arm64: IPI each
CPU after invalidating the I-cache for kernel mappings"), which
renamed flush_icache_range() to __flush_icache_range() and added
a wrapper.

No functional change intended.

Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-10-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:48 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=7908072da535dca52b3a011ed6e1f73534546b59'>arm64: Do not enable uaccess for invalidate_icache_range</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
invalidate_icache_range() works on kernel addresses, and doesn't
need uaccess. Remove the code that toggles uaccess_ttbr0_enable,
as well as the code that emits an entry into the exception table
(via the macro invalidate_icache_by_line).

Changes return type of invalidate_icache_range() from int (which
used to indicate a fault) to void, since it doesn't need uaccess
and won't fault. Note that return value was never checked by any
of the callers.

No functional change intended.
Possible performance impact due to the reduced number of
instructions.

Reported-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Reported-by: Will Deacon &lt;will@kernel.org&gt;
Link: https://lore.kernel.org/linux-arch/20200511110014.lb9PEahJ4hVOYrbwIb_qUHXyNy9KQzNFdb_I3YlzY6A@z/
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-6-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2021-05-25 19:27:48 +0100'>2021-05-25</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=116b7f559492b719ae4bd22ee773cb7fb046a736'>arm64: Do not enable uaccess for flush_icache_range</a></td><td>Fuad Tabba</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
__flush_icache_range works on kernel addresses, and doesn't need
uaccess. The existing code is a side-effect of its current
implementation with __flush_cache_user_range fallthrough.

Instead of fallthrough to share the code, use a common macro for
the two where the caller specifies an optional fixup label if
user access is needed. If provided, this label would be used to
generate an extable entry.

Simplify the code to use dcache_by_line_op, instead of
replicating much of its functionality.

No functional change intended.
Possible performance impact due to the reduced number of
instructions.

Reported-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Reported-by: Will Deacon &lt;will@kernel.org&gt;
Reported-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Link: https://lore.kernel.org/linux-arch/20200511110014.lb9PEahJ4hVOYrbwIb_qUHXyNy9KQzNFdb_I3YlzY6A@z/
Link: https://lore.kernel.org/linux-arm-kernel/20210521121846.GB1040@C02TD0UTHF1T.local/
Signed-off-by: Fuad Tabba &lt;tabba@google.com&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20210524083001.2586635-5-tabba@google.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2020-01-08 12:23:38 +0000'>2020-01-08</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=f4659254a327f5e61c24e21b91c5aea0291bc65b'>arm64: mm: Use modern annotations for assembly functions</a></td><td>Mark Brown</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
In an effort to clarify and simplify the annotation of assembly functions
in the kernel new macros have been introduced. These replace ENTRY and
ENDPROC and also add a new annotation for static functions which previously
had no ENTRY equivalent. Update the annotations in the mm code to the
new macros. Even the functions called from non-standard environments
like idmap have no special requirements on their environments so can be
treated like regular functions.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2019-06-19 17:09:07 +0200'>2019-06-19</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=caab277b1de0a22b675c4c95fc7b285ec2eb5bf5'>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234</a></td><td>Thomas Gleixner</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not see http www gnu org
  licenses

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 503 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190602204653.811534538@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</td></tr>
<tr class='logheader'><td><span title='2018-12-10 15:03:51 +0000'>2018-12-10</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=33309ecda0070506c49182530abe7728850ebe78'>arm64: Fix minor issues with the dcache_by_line_op macro</a></td><td>Will Deacon</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
The dcache_by_line_op macro suffers from a couple of small problems:

First, the GAS directives that are currently being used rely on
assembler behavior that is not documented, and probably not guaranteed
to produce the correct behavior going forward. As a result, we end up
with some undefined symbols in cache.o:

$ nm arch/arm64/mm/cache.o
         ...
         U civac
         ...
         U cvac
         U cvap
         U cvau

This is due to the fact that the comparisons used to select the
operation type in the dcache_by_line_op macro are comparing symbols
not strings, and even though it seems that GAS is doing the right
thing here (undefined symbols by the same name are equal to each
other), it seems unwise to rely on this.

Second, when patching in a DC CVAP instruction on CPUs that support it,
the fallback path consists of a DC CVAU instruction which may be
affected by CPU errata that require ARM64_WORKAROUND_CLEAN_CACHE.

Solve these issues by unrolling the various maintenance routines and
using the conditional directives that are documented as operating on
strings. To avoid the complexity of nested alternatives, we move the
DC CVAP patching to __clean_dcache_area_pop, falling back to a branch
to __clean_dcache_area_poc if DCPOP is not supported by the CPU.

Reported-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Suggested-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;


</td></tr>
<tr class='logheader'><td><span title='2018-07-05 17:24:36 +0100'>2018-07-05</span></td><td class='logsubject'><a href='/distro/kernel/commit/arch/arm64/mm/cache.S?h=linux-6.12.y&amp;id=3b8c9f1cdfc506e94e992ae66b68bbe416f89610'>arm64: IPI each CPU after invalidating the I-cache for kernel mappings</a></td><td>Will Deacon</td></tr>
<tr class='nohover-highlight'><td/><td colspan='3' class='logmsg'>
When invalidating the instruction cache for a kernel mapping via
flush_icache_range(), it is also necessary to flush the pipeline for
other CPUs so that instructions fetched into the pipeline before the
I-cache invalidation are discarded. For example, if module 'foo' is
unloaded and then module 'bar' is loaded into the same area of memory,
a CPU could end up executing instructions from 'foo' when branching into
'bar' if these instructions were fetched into the pipeline before 'foo'
was unloaded.

Whilst this is highly unlikely to occur in practice, particularly as
any exception acts as a context-synchronizing operation, following the
letter of the architecture requires us to execute an ISB on each CPU
in order for the new instruction stream to be visible.

Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;


</td></tr>
