···110110#endif111111112112/*113113- * NOTE:114114- * kmap_atomic() and kunmap_atomic() with two arguments are deprecated.115115- * We only keep them for backward compatibility, any usage of them116116- * are now warned.117117- */118118-119119-#define PASTE(a, b) a ## b120120-#define PASTE2(a, b) PASTE(a, b)121121-122122-#define NARG_(_2, _1, n, ...) n123123-#define NARG(...) NARG_(__VA_ARGS__, 2, 1, :)124124-125125-static inline void __deprecated *kmap_atomic_deprecated(struct page *page,126126- enum km_type km)127127-{128128- return kmap_atomic(page);129129-}130130-131131-#define kmap_atomic1(...) kmap_atomic(__VA_ARGS__)132132-#define kmap_atomic2(...) kmap_atomic_deprecated(__VA_ARGS__)133133-#define kmap_atomic(...) PASTE2(kmap_atomic, NARG(__VA_ARGS__)(__VA_ARGS__))134134-135135-static inline void __deprecated __kunmap_atomic_deprecated(void *addr,136136- enum km_type km)137137-{138138- __kunmap_atomic(addr);139139-}140140-141141-/*142113 * Prevent people trying to call kunmap_atomic() as if it were kunmap()143114 * kunmap_atomic() should get the return value of kmap_atomic, not the page.144115 */145145-#define kunmap_atomic_deprecated(addr, km) \146146-do { \147147- BUILD_BUG_ON(__same_type((addr), struct page *)); \148148- __kunmap_atomic_deprecated(addr, km); \149149-} while (0)150150-151151-#define kunmap_atomic_withcheck(addr) \116116+#define kunmap_atomic(addr) \152117do { \153118 BUILD_BUG_ON(__same_type((addr), struct page *)); \154119 __kunmap_atomic(addr); \155120} while (0)156121157157-#define kunmap_atomic1(...) kunmap_atomic_withcheck(__VA_ARGS__)158158-#define kunmap_atomic2(...) kunmap_atomic_deprecated(__VA_ARGS__)159159-#define kunmap_atomic(...) PASTE2(kunmap_atomic, NARG(__VA_ARGS__)(__VA_ARGS__))160160-/**** End of C pre-processor tricks for deprecated macros ****/161122162123/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */163124#ifndef clear_user_highpage