Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm64: mm: Simplify __TLBI_RANGE_NUM() macro

Since commit e2768b798a19 ("arm64/mm: Modify range-based tlbi to
decrement scale"), we don't need to clamp the 'pages' argument to fit
the range for the specified 'scale' as we know that the upper bits will
have been processed in a prior iteration.

Drop the clamping and simplify the __TLBI_RANGE_NUM() macro.

Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Will Deacon and committed by
Catalin Marinas
057bbd8e 5e63b73f

+1 -5
+1 -5
arch/arm64/include/asm/tlbflush.h
··· 199 199 * range. 200 200 */ 201 201 #define __TLBI_RANGE_NUM(pages, scale) \ 202 - ({ \ 203 - int __pages = min((pages), \ 204 - __TLBI_RANGE_PAGES(31, (scale))); \ 205 - (__pages >> (5 * (scale) + 1)) - 1; \ 206 - }) 202 + (((pages) >> (5 * (scale) + 1)) - 1) 207 203 208 204 #define __repeat_tlbi_sync(op, arg...) \ 209 205 do { \