Skip to content

Commit 0226bd6

Browse files
maorgottliebtorvalds
authored andcommitted
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. scatterlist.c: In function ‘sg_miter_stop’: scatterlist.c:919:4: warning: implicit declaration of function ‘flush_dcache_page’ [-Wimplicit-function-declaration] flush_dcache_page(miter->page); ^~~~~~~~~~~~~~~~~ In file included from linux/scatterlist.h:8:0, from scatterlist.c:9: scatterlist.c:922:18: warning: implicit declaration of function ‘pagefault_disabled’ [-Wimplicit-function-declaration] WARN_ON_ONCE(!pagefault_disabled()); ^ linux/mm.h:23:25: note: in definition of macro ‘WARN_ON_ONCE’ int __ret_warn_on = !!(condition); \ ^~~~~~~~~ Link: https://lkml.kernel.org/r/[email protected] Fixes: 723aca2 ("mm/scatterlist: replace the !preemptible warning in sg_miter_stop()") Fixes: 0e84f5d ("scatterlist: replace flush_kernel_dcache_page with flush_dcache_page") Signed-off-by: Maor Gottlieb <[email protected]> Tested-by: Sebastian Andrzej Siewior <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 536f421 commit 0226bd6

File tree

1 file changed

+2
-1
lines changed
  • tools/testing/scatterlist/linux

1 file changed

+2
-1
lines changed

tools/testing/scatterlist/linux/mm.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static inline unsigned long page_to_phys(struct page *page)
7474
__UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \
7575
x, y)
7676

77-
#define preemptible() (1)
77+
#define pagefault_disabled() (0)
7878

7979
static inline void *kmap(struct page *page)
8080
{
@@ -127,6 +127,7 @@ kmalloc_array(unsigned int n, unsigned int size, unsigned int flags)
127127
#define kmemleak_free(a)
128128

129129
#define PageSlab(p) (0)
130+
#define flush_dcache_page(p)
130131

131132
#define MAX_ERRNO 4095
132133

0 commit comments

Comments
 (0)