From 9254a74b5d4cb6408d326906dd607ccb46b0be57 Mon Sep 17 00:00:00 2001 From: name Date: Wed, 18 Mar 2020 07:42:09 +0100 Subject: [PATCH] verbose --- include/linux/highmem.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 805b84d6bbca..5e2c3598be3e 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -218,7 +218,20 @@ static inline void clear_highpage(struct page *page) static inline void verify_zero_highpage(struct page *page) { void *kaddr = kmap_atomic(page); - BUG_ON(memchr_inv(kaddr, 0, PAGE_SIZE)); + void* memchr_inv_ret = memchr_inv(kaddr, 0, PAGE_SIZE); + if(!memchr_inv_ret) + { + unsigned long long* aaaaa = (unsigned long long*)kaddr; + int aaa = PAGE_SIZE; + printk(KERN_DEBUG "#### PAGE_SIZE %ld\n", PAGE_SIZE); + printk(KERN_DEBUG "#### kaddr %px\n", kaddr); + printk(KERN_DEBUG "#### memchr_inv_ret %px\n", memchr_inv_ret); + for(; aaa > 0; aaa-= sizeof(unsigned long long)) + { + printk(KERN_DEBUG "#### dump %llx\n", *aaaaa++); + } + } + WARN_ON(memchr_inv_ret); kunmap_atomic(kaddr); } -- 2.25.1