diff -urN 2.4.0-test7/include/asm-alpha/mm.h unlockpage/include/asm-alpha/mm.h --- 2.4.0-test7/include/asm-alpha/mm.h Thu Jan 1 01:00:00 1970 +++ unlockpage/include/asm-alpha/mm.h Mon Aug 28 18:46:24 2000 @@ -0,0 +1,12 @@ +#ifndef _ALPHA_MM_H +#define _ALPHA_MM_H + +#define __HAVE_ARCH_UNLOCKPAGE +#define UnlockPage(page) do { \ + clear_bit(PG_locked, &(page)->flags); \ + mb(); \ + if (waitqueue_active(&page->wait)) \ + wake_up(&page->wait); \ + } while (0) + +#endif /* _ALPHA_MM_H */ diff -urN 2.4.0-test7/include/asm-i386/mm.h unlockpage/include/asm-i386/mm.h --- 2.4.0-test7/include/asm-i386/mm.h Thu Jan 1 01:00:00 1970 +++ unlockpage/include/asm-i386/mm.h Mon Aug 28 18:45:58 2000 @@ -0,0 +1,11 @@ +#ifndef _I386_MM_H +#define _I386_MM_H + +#define __HAVE_ARCH_UNLOCKPAGE +#define UnlockPage(page) do { \ + clear_bit(PG_locked, &(page)->flags); \ + if (waitqueue_active(&page->wait)) \ + wake_up(&page->wait); \ + } while (0) + +#endif /* _I386_MM_H */ diff -urN 2.4.0-test7/include/asm-sparc64/mm.h unlockpage/include/asm-sparc64/mm.h --- 2.4.0-test7/include/asm-sparc64/mm.h Thu Jan 1 01:00:00 1970 +++ unlockpage/include/asm-sparc64/mm.h Mon Aug 28 18:55:38 2000 @@ -0,0 +1,12 @@ +#ifndef _SPARC64_MM_H +#define _SPARC64_MM_H + +#define __HAVE_ARCH_UNLOCKPAGE +#define UnlockPage(page) do { \ + clear_bit(PG_locked, &(page)->flags); \ + membar("#StoreLoad") \ + if (waitqueue_active(&page->wait)) \ + wake_up(&page->wait); \ + } while (0) + +#endif /* _SPARC64_MM_H */ diff -urN 2.4.0-test7/include/linux/mm.h unlockpage/include/linux/mm.h --- 2.4.0-test7/include/linux/mm.h Sun Aug 27 16:21:01 2000 +++ unlockpage/include/linux/mm.h Mon Aug 28 18:56:02 2000 @@ -20,6 +20,7 @@ #include #include #include +#include /* * Linux kernel virtual memory manager primitives. @@ -189,10 +190,12 @@ #define PageLocked(page) test_bit(PG_locked, &(page)->flags) #define LockPage(page) set_bit(PG_locked, &(page)->flags) #define TryLockPage(page) test_and_set_bit(PG_locked, &(page)->flags) +#ifndef __HAVE_ARCH_UNLOCKPAGE #define UnlockPage(page) do { \ clear_bit(PG_locked, &(page)->flags); \ wake_up(&page->wait); \ } while (0) +#endif #define PageError(page) test_bit(PG_error, &(page)->flags) #define SetPageError(page) set_bit(PG_error, &(page)->flags) #define ClearPageError(page) clear_bit(PG_error, &(page)->flags)