tools/testing/scatterlist: Add missing defines
PATCH 1/1 tools/testing/scatterlist: Add missing defines
The cited commits replaced preemptible with pagefault_disabled and flush_kernel_dcache_page with flush_dcache_page respectively, hence need to update the corresponding defines in the test.
--- tools/testing/scatterlist/linux/mm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/scatterlist/linux/mm.h +2 -1
@@ -74,7 +74,7 @@ static inline unsigned long page_to_phys(struct page *page) __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ x, y) -#define preemptible () (1) +#define pagefault_disabled () (0)static inline void *kmap (struct page *page) {
@@ -127,6 +127,7 @@ kmalloc_array(unsigned int n, unsigned int size, unsigned int flags)#define kmemleak_free (a)#define PageSlab (p) (0) +#define flush_dcache_page (p)#define MAX_ERRNO 4095
Signature · 1 line
2.25.4
Quoted 7 lines · Maor Gottlieb
The cited commits replaced preemptible with
pagefault_disabledandflush_kernel_dcache_pagewithflush_dcache_pagerespectively, hence need to update the corresponding defines in the test.Fixes 723aca208516 ("mm/scatterlist: replace the !preemptible warning in sg_miter_stop()")Fixes 0e84f5dbf8d6 ("scatterlist: replace flush_kernel_dcache_page with flush_dcache_page")Signed-off-by Maor Gottlieb <[email protected]>
Both commits are part of v5.16-rc1.
Sebastian
Andrew Morton
maintainerQuoted 3 lines · On Tue, 18 Jan 2022 10:21:05 +0200 Maor Gottlieb <[email protected]> wrote:
The cited commits replaced preemptible with
pagefault_disabledandflush_kernel_dcache_pagewithflush_dcache_pagerespectively, hence need to update the corresponding defines in the test.
What are the effects of this change? Does it fix compilation issues? Runtime issues? If so, what are those issues?
Quoted 8 lines · Andrew Morton
Quoted 3 lines · On Tue, 18 Jan 2022 10:21:05 +0200 Maor Gottlieb <[email protected]> wrote:
The cited commits replaced preemptible with
pagefault_disabledandflush_kernel_dcache_pagewithflush_dcache_pagerespectively, hence need to update the corresponding defines in the test.What are the effects of this change? Does it fix compilation issues? Runtime issues? If so, what are those issues?
There is this runtime test
tools/testing/scatterlist/main.c
and without the changes to
tools/testing/scatterlist/linux/mm.h
it simply does not compile. Since it is userland, the kernel details like preemptible() or pagefault_disabled() don't matter much, it has just to compile and run.
Sebastian