summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2002-12-15 17:18:31 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-12-15 17:18:31 -0800
commit4749dedc684b1a8f6c9f31b85b1f6d1a63ca495a (patch)
treea95aa0ab70470ee7595bc5dfafcc7316d01467fd /include
parent89ecfc0b5e0a2bc84a3a0a8b0b331c622e28e602 (diff)
parent7db5b0d72c6a636e04cde7592790c485bdd148a7 (diff)
Merge bk://linux-dj.bkbits.net/agpgart
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/ipc.h1
-rw-r--r--include/asm-ia64/unistd.h1
-rw-r--r--include/asm-m68knommu/current.h2
-rw-r--r--include/asm-m68knommu/elf.h3
-rw-r--r--include/asm-m68knommu/hardirq.h1
-rw-r--r--include/asm-m68knommu/processor.h6
-rw-r--r--include/asm-m68knommu/thread_info.h14
-rw-r--r--include/asm-mips64/compat.h18
-rw-r--r--include/asm-mips64/posix_types.h3
-rw-r--r--include/asm-mips64/stat.h7
-rw-r--r--include/asm-s390/bitops.h70
-rw-r--r--include/asm-s390/cio.h2
-rw-r--r--include/asm-s390/current.h2
-rw-r--r--include/asm-s390/page.h2
-rw-r--r--include/asm-s390/posix_types.h6
-rw-r--r--include/asm-s390/rwsem.h2
-rw-r--r--include/asm-s390/setup.h12
-rw-r--r--include/asm-s390/thread_info.h14
-rw-r--r--include/asm-s390/uaccess.h2
-rw-r--r--include/asm-s390/unistd.h1
-rw-r--r--include/asm-s390x/bitops.h64
-rw-r--r--include/asm-s390x/ccwgroup.h8
-rw-r--r--include/asm-s390x/cio.h2
-rw-r--r--include/asm-s390x/current.h2
-rw-r--r--include/asm-s390x/posix_types.h6
-rw-r--r--include/asm-s390x/rwsem.h2
-rw-r--r--include/asm-s390x/thread_info.h14
-rw-r--r--include/asm-s390x/unistd.h1
-rw-r--r--include/linux/binfmts.h2
-rw-r--r--include/linux/buffer_head.h2
-rw-r--r--include/linux/compat.h16
-rw-r--r--include/linux/cpufreq.h20
-rw-r--r--include/linux/device-mapper.h9
-rw-r--r--include/linux/dm-ioctl.h6
-rw-r--r--include/linux/fs.h13
-rw-r--r--include/linux/hugetlb.h2
-rw-r--r--include/linux/init.h20
-rw-r--r--include/linux/kernel.h11
-rw-r--r--include/linux/mm.h3
-rw-r--r--include/linux/module.h21
-rw-r--r--include/linux/moduleparam.h127
-rw-r--r--include/linux/nfs4.h10
-rw-r--r--include/linux/nfs_fs.h2
-rw-r--r--include/linux/nfs_xdr.h1
-rw-r--r--include/linux/page-flags.h47
-rw-r--r--include/linux/sched.h5
-rw-r--r--include/linux/sem.h2
-rw-r--r--include/linux/sonypi.h6
-rw-r--r--include/linux/sunrpc/xdr.h4
-rw-r--r--include/linux/swap.h3
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/linux/writeback.h26
52 files changed, 439 insertions, 188 deletions
diff --git a/include/asm-i386/ipc.h b/include/asm-i386/ipc.h
index 36f43063adcd..88229f11796f 100644
--- a/include/asm-i386/ipc.h
+++ b/include/asm-i386/ipc.h
@@ -14,6 +14,7 @@ struct ipc_kludge {
#define SEMOP 1
#define SEMGET 2
#define SEMCTL 3
+#define SEMTIMEDOP 4
#define MSGSND 11
#define MSGRCV 12
#define MSGGET 13
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index c1ed0630e97d..afad108b0d0a 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -235,6 +235,7 @@
#define __NR_epoll_create 1243
#define __NR_epoll_ctl 1244
#define __NR_epoll_wait 1245
+#define __NR_semtimedop 1246
#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
diff --git a/include/asm-m68knommu/current.h b/include/asm-m68knommu/current.h
index ffec5bbc0a4c..53ee0f9f7cef 100644
--- a/include/asm-m68knommu/current.h
+++ b/include/asm-m68knommu/current.h
@@ -10,7 +10,7 @@
* current and lose _current_task.
*/
-#include <asm/thread_info.h>
+#include <linux/thread_info.h>
struct task_struct;
diff --git a/include/asm-m68knommu/elf.h b/include/asm-m68knommu/elf.h
index 3df4b62967bc..566f96120a1f 100644
--- a/include/asm-m68knommu/elf.h
+++ b/include/asm-m68knommu/elf.h
@@ -62,7 +62,7 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
pr_reg[8] = regs->a1; \
pr_reg[14] = regs->d0; \
pr_reg[15] = rdusp(); \
- pr_reg[16] = 0 /* regs->orig_d0; */ \
+ pr_reg[16] = 0 /* regs->orig_d0 */; \
pr_reg[17] = regs->sr; \
pr_reg[18] = regs->pc; \
/* pr_reg[19] = (regs->format << 12) | regs->vector; */ \
@@ -70,7 +70,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
struct switch_stack *sw = ((struct switch_stack *)regs) - 1; \
pr_reg[5] = sw->d6; \
pr_reg[6] = sw->d7; \
- pr_reg[9] = sw->a2; \
pr_reg[10] = sw->a3; \
pr_reg[11] = sw->a4; \
pr_reg[12] = sw->a5; \
diff --git a/include/asm-m68knommu/hardirq.h b/include/asm-m68knommu/hardirq.h
index bc189f808505..6e8670859dd9 100644
--- a/include/asm-m68knommu/hardirq.h
+++ b/include/asm-m68knommu/hardirq.h
@@ -2,6 +2,7 @@
#define __M68K_HARDIRQ_H
#include <linux/config.h>
+#include <linux/cache.h>
#include <linux/threads.h>
typedef struct {
diff --git a/include/asm-m68knommu/processor.h b/include/asm-m68knommu/processor.h
index 8d0b74d718ff..4f975625f12a 100644
--- a/include/asm-m68knommu/processor.h
+++ b/include/asm-m68knommu/processor.h
@@ -50,6 +50,12 @@ extern inline void wrusp(unsigned long usp)
#define TASK_SIZE (0xF0000000UL)
/*
+ * This decides where the kernel will search for a free chunk of vm
+ * space during mmap's. We won't be using it
+ */
+#define TASK_UNMAPPED_BASE 0
+
+/*
* Bus types
*/
#define EISA_bus 0
diff --git a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h
index 117fdc6ba006..6447fc51e07a 100644
--- a/include/asm-m68knommu/thread_info.h
+++ b/include/asm-m68knommu/thread_info.h
@@ -8,6 +8,8 @@
#ifndef _ASM_THREAD_INFO_H
#define _ASM_THREAD_INFO_H
+#include <asm/page.h>
+
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
@@ -22,6 +24,7 @@ struct thread_info {
unsigned long flags; /* low level flags */
int cpu; /* cpu we're on */
int preempt_count; /* 0 => preemptable, <0 => BUG*/
+ struct restart_block restart_block;
};
/*
@@ -29,10 +32,13 @@ struct thread_info {
*/
#define INIT_THREAD_INFO(tsk) \
{ \
- task: &tsk, \
- exec_domain: &default_exec_domain, \
- flags: 0, \
- cpu: 0, \
+ .task = &tsk, \
+ .exec_domain = &default_exec_domain, \
+ .flags = 0, \
+ .cpu = 0, \
+ .restart_block = { \
+ .fn = do_no_restart_syscall, \
+ }, \
}
#define init_thread_info (init_thread_union.thread_info)
diff --git a/include/asm-mips64/compat.h b/include/asm-mips64/compat.h
new file mode 100644
index 000000000000..c249533f7e20
--- /dev/null
+++ b/include/asm-mips64/compat.h
@@ -0,0 +1,18 @@
+#ifndef _ASM_MIPS64_COMPAT_H
+#define _ASM_MIPS64_COMPAT_H
+/*
+ * Architecture specific compatibility types
+ */
+#include <linux/types.h>
+
+typedef u32 compat_size_t;
+typedef s32 compat_ssize_t;
+typedef s32 compat_time_t;
+typedef s32 compat_suseconds_t;
+
+struct compat_timespec {
+ compat_time_t tv_sec;
+ s32 tv_nsec;
+};
+
+#endif /* _ASM_MIPS64_COMPAT_H */
diff --git a/include/asm-mips64/posix_types.h b/include/asm-mips64/posix_types.h
index e1395fb5d6a1..8a3aac609eba 100644
--- a/include/asm-mips64/posix_types.h
+++ b/include/asm-mips64/posix_types.h
@@ -58,10 +58,7 @@ typedef int __kernel_pid_t32;
typedef int __kernel_ipc_pid_t32;
typedef int __kernel_uid_t32;
typedef int __kernel_gid_t32;
-typedef unsigned int __kernel_size_t32;
-typedef int __kernel_ssize_t32;
typedef int __kernel_ptrdiff_t32;
-typedef int __kernel_time_t32;
typedef int __kernel_suseconds_t32;
typedef int __kernel_clock_t32;
typedef int __kernel_daddr_t32;
diff --git a/include/asm-mips64/stat.h b/include/asm-mips64/stat.h
index b3d080b6eef4..316985518030 100644
--- a/include/asm-mips64/stat.h
+++ b/include/asm-mips64/stat.h
@@ -10,6 +10,7 @@
#define _ASM_STAT_H
#include <linux/types.h>
+#include <linux/compat.h>
struct __old_kernel_stat {
unsigned int st_dev;
@@ -40,11 +41,11 @@ struct stat32 {
int st_pad2[2];
__kernel_off_t32 st_size;
int st_pad3;
- __kernel_time_t32 st_atime;
+ compat_time_t st_atime;
int reserved0;
- __kernel_time_t32 st_mtime;
+ compat_time_t st_mtime;
int reserved1;
- __kernel_time_t32 st_ctime;
+ compat_time_t st_ctime;
int reserved2;
int st_blksize;
int st_blocks;
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h
index b848a9dd86af..7987f0c9ccad 100644
--- a/include/asm-s390/bitops.h
+++ b/include/asm-s390/bitops.h
@@ -53,7 +53,7 @@ extern const char _sb_findmap[];
/*
* SMP save set_bit routine based on compare and swap (CS)
*/
-static inline void set_bit_cs(int nr, volatile void *ptr)
+static inline void set_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -78,7 +78,7 @@ static inline void set_bit_cs(int nr, volatile void *ptr)
/*
* SMP save clear_bit routine based on compare and swap (CS)
*/
-static inline void clear_bit_cs(int nr, volatile void *ptr)
+static inline void clear_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -103,7 +103,7 @@ static inline void clear_bit_cs(int nr, volatile void *ptr)
/*
* SMP save change_bit routine based on compare and swap (CS)
*/
-static inline void change_bit_cs(int nr, volatile void *ptr)
+static inline void change_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -128,7 +128,8 @@ static inline void change_bit_cs(int nr, volatile void *ptr)
/*
* SMP save test_and_set_bit routine based on compare and swap (CS)
*/
-static inline int test_and_set_bit_cs(int nr, volatile void *ptr)
+static inline int
+test_and_set_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -154,7 +155,8 @@ static inline int test_and_set_bit_cs(int nr, volatile void *ptr)
/*
* SMP save test_and_clear_bit routine based on compare and swap (CS)
*/
-static inline int test_and_clear_bit_cs(int nr, volatile void *ptr)
+static inline int
+test_and_clear_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -180,7 +182,8 @@ static inline int test_and_clear_bit_cs(int nr, volatile void *ptr)
/*
* SMP save test_and_change_bit routine based on compare and swap (CS)
*/
-static inline int test_and_change_bit_cs(int nr, volatile void *ptr)
+static inline int
+test_and_change_bit_cs(int nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -207,7 +210,7 @@ static inline int test_and_change_bit_cs(int nr, volatile void *ptr)
/*
* fast, non-SMP set_bit routine
*/
-static inline void __set_bit(int nr, volatile void *ptr)
+static inline void __set_bit(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -219,7 +222,7 @@ static inline void __set_bit(int nr, volatile void *ptr)
}
static inline void
-__constant_set_bit(const int nr, volatile void *ptr)
+__constant_set_bit(const int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -269,7 +272,7 @@ __constant_set_bit(const int nr, volatile void *ptr)
* fast, non-SMP clear_bit routine
*/
static inline void
-__clear_bit(int nr, volatile void *ptr)
+__clear_bit(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -281,7 +284,7 @@ __clear_bit(int nr, volatile void *ptr)
}
static inline void
-__constant_clear_bit(const int nr, volatile void *ptr)
+__constant_clear_bit(const int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -330,7 +333,7 @@ __constant_clear_bit(const int nr, volatile void *ptr)
/*
* fast, non-SMP change_bit routine
*/
-static inline void __change_bit(int nr, volatile void *ptr)
+static inline void __change_bit(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -342,7 +345,7 @@ static inline void __change_bit(int nr, volatile void *ptr)
}
static inline void
-__constant_change_bit(const int nr, volatile void *ptr)
+__constant_change_bit(const int nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -391,7 +394,8 @@ __constant_change_bit(const int nr, volatile void *ptr)
/*
* fast, non-SMP test_and_set_bit routine
*/
-static inline int test_and_set_bit_simple(int nr, volatile void *ptr)
+static inline int
+test_and_set_bit_simple(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -409,7 +413,8 @@ static inline int test_and_set_bit_simple(int nr, volatile void *ptr)
/*
* fast, non-SMP test_and_clear_bit routine
*/
-static inline int test_and_clear_bit_simple(int nr, volatile void *ptr)
+static inline int
+test_and_clear_bit_simple(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -427,7 +432,8 @@ static inline int test_and_clear_bit_simple(int nr, volatile void *ptr)
/*
* fast, non-SMP test_and_change_bit routine
*/
-static inline int test_and_change_bit_simple(int nr, volatile void *ptr)
+static inline int
+test_and_change_bit_simple(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -463,7 +469,7 @@ static inline int test_and_change_bit_simple(int nr, volatile void *ptr)
* This routine doesn't need to be atomic.
*/
-static inline int __test_bit(int nr, volatile void *ptr)
+static inline int __test_bit(int nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -473,7 +479,8 @@ static inline int __test_bit(int nr, volatile void *ptr)
return (ch >> (nr & 7)) & 1;
}
-static inline int __constant_test_bit(int nr, volatile void * addr) {
+static inline int
+__constant_test_bit(int nr, volatile unsigned long * addr) {
return (((volatile char *) addr)[(nr>>3)^3] & (1<<(nr&7))) != 0;
}
@@ -485,7 +492,8 @@ static inline int __constant_test_bit(int nr, volatile void * addr) {
/*
* Find-bit routines..
*/
-static inline int find_first_zero_bit(void * addr, unsigned size)
+static inline int
+find_first_zero_bit(unsigned long * addr, unsigned size)
{
unsigned long cmp, count;
int res;
@@ -523,7 +531,8 @@ static inline int find_first_zero_bit(void * addr, unsigned size)
return (res < size) ? res : size;
}
-static inline int find_first_bit(void * addr, unsigned size)
+static inline int
+find_first_bit(unsigned long * addr, unsigned size)
{
unsigned long cmp, count;
int res;
@@ -561,7 +570,8 @@ static inline int find_first_bit(void * addr, unsigned size)
return (res < size) ? res : size;
}
-static inline int find_next_zero_bit (void * addr, int size, int offset)
+static inline int
+find_next_zero_bit (unsigned long * addr, int size, int offset)
{
unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
unsigned long bitvec, reg;
@@ -599,7 +609,8 @@ static inline int find_next_zero_bit (void * addr, int size, int offset)
return (offset + res);
}
-static inline int find_next_bit (void * addr, int size, int offset)
+static inline int
+find_next_bit (unsigned long * addr, int size, int offset)
{
unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
unsigned long bitvec, reg;
@@ -668,7 +679,7 @@ static inline unsigned long ffz(unsigned long word)
* __ffs = find first bit in word. Undefined if no bit exists,
* so code should check against 0UL first..
*/
-static inline unsigned long __ffs(unsigned long word)
+static inline unsigned long __ffs (unsigned long word)
{
unsigned long reg, result;
@@ -707,7 +718,7 @@ static inline int sched_find_first_bit(unsigned long *b)
* differs in spirit from the above ffz (man ffs).
*/
-extern int inline ffs (int x)
+extern inline int ffs (int x)
{
int r = 1;
@@ -792,10 +803,15 @@ extern __inline__ int fls(int x)
* 23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
*/
-#define ext2_set_bit(nr, addr) test_and_set_bit((nr)^24, addr)
-#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr)^24, addr)
-#define ext2_test_bit(nr, addr) test_bit((nr)^24, addr)
-static inline int ext2_find_first_zero_bit(void *vaddr, unsigned size)
+#define ext2_set_bit(nr, addr) \
+ test_and_set_bit((nr)^24, (unsigned long *)addr)
+#define ext2_clear_bit(nr, addr) \
+ test_and_clear_bit((nr)^24, (unsigned long *)addr)
+#define ext2_test_bit(nr, addr) \
+ test_bit((nr)^24, (unsigned long *)addr)
+
+static inline int
+ext2_find_first_zero_bit(void *vaddr, unsigned size)
{
unsigned long cmp, count;
int res;
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h
index c100232da0bf..02858d6e73b7 100644
--- a/include/asm-s390/cio.h
+++ b/include/asm-s390/cio.h
@@ -262,8 +262,6 @@ struct diag210 {
extern int diag210(struct diag210 *addr);
-extern int chsc(void *data);
-
extern void wait_cons_dev(void);
#endif
diff --git a/include/asm-s390/current.h b/include/asm-s390/current.h
index 85eea9e06faf..ea88f10590ab 100644
--- a/include/asm-s390/current.h
+++ b/include/asm-s390/current.h
@@ -13,7 +13,7 @@
#ifdef __KERNEL__
-#include <asm/thread_info.h>
+#include <linux/thread_info.h>
struct task_struct;
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h
index ea57ca3809c9..273b1a528af1 100644
--- a/include/asm-s390/page.h
+++ b/include/asm-s390/page.h
@@ -64,7 +64,7 @@ static inline void copy_page(void *to, void *from)
#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
- __asm__ __volatile__(".word 0x0000"); \
+ __asm__ __volatile__(".long 0"); \
} while (0)
#define PAGE_BUG(page) do { \
diff --git a/include/asm-s390/posix_types.h b/include/asm-s390/posix_types.h
index 5db9d438fd40..99e82ffa8c6f 100644
--- a/include/asm-s390/posix_types.h
+++ b/include/asm-s390/posix_types.h
@@ -60,13 +60,13 @@ typedef struct {
#endif
#undef __FD_SET
-#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp)
+#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp->fds_bits)
#undef __FD_CLR
-#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp)
+#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp->fds_bits)
#undef __FD_ISSET
-#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp)
+#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp->fds_bits)
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
diff --git a/include/asm-s390/rwsem.h b/include/asm-s390/rwsem.h
index 4345d83de401..6cdb35473f59 100644
--- a/include/asm-s390/rwsem.h
+++ b/include/asm-s390/rwsem.h
@@ -228,7 +228,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
: "=&d" (old), "=&d" (new)
: "a" (&sem->count), "m" (tmp)
: "cc", "memory" );
- if (new > 1) // FIXME: is this correct ?!?
+ if (new > 1)
rwsem_downgrade_wake(sem);
}
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h
index 95a444b4f67b..2cfb6d137d7e 100644
--- a/include/asm-s390/setup.h
+++ b/include/asm-s390/setup.h
@@ -25,13 +25,13 @@
*/
extern unsigned long machine_flags;
-#define MACHINE_IS_VM (machine_flags & 1)
-#define MACHINE_HAS_IEEE (machine_flags & 2)
-#define MACHINE_IS_P390 (machine_flags & 4)
-#define MACHINE_HAS_CSP (machine_flags & 8)
-#define MACHINE_HAS_MVPG (machine_flags & 16)
+#define MACHINE_IS_VM (machine_flags & 1)
+#define MACHINE_HAS_IEEE (machine_flags & 2)
+#define MACHINE_IS_P390 (machine_flags & 4)
+#define MACHINE_HAS_CSP (machine_flags & 8)
+#define MACHINE_HAS_MVPG (machine_flags & 16)
-#define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
+#define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
/*
* Console mode. Override with conmode=
diff --git a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h
index 26a7c4d21be8..eb131fa3a470 100644
--- a/include/asm-s390/thread_info.h
+++ b/include/asm-s390/thread_info.h
@@ -26,6 +26,7 @@ struct thread_info {
unsigned long flags; /* low level flags */
unsigned int cpu; /* current CPU */
unsigned int preempt_count; /* 0 => preemptable */
+ struct restart_block restart_block;
};
/*
@@ -33,10 +34,13 @@ struct thread_info {
*/
#define INIT_THREAD_INFO(tsk) \
{ \
- task: &tsk, \
- exec_domain: &default_exec_domain, \
- flags: 0, \
- cpu: 0, \
+ .task = &tsk, \
+ .exec_domain = &default_exec_domain, \
+ .flags = 0, \
+ .cpu = 0, \
+ .restart_block = { \
+ .fn = do_no_restart_syscall, \
+ }, \
}
#define init_thread_info (init_thread_union.thread_info)
@@ -69,6 +73,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
+#define TIF_RESTART_SVC 4 /* restart svc with new svc number */
#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
@@ -77,6 +82,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
+#define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h
index 45bbb293d0ca..fe42387367ec 100644
--- a/include/asm-s390/uaccess.h
+++ b/include/asm-s390/uaccess.h
@@ -84,7 +84,7 @@ extern inline int __put_user_asm_8(void *x, void *ptr)
{
int err;
- __asm__ __volatile__ ( " sr %0,01\n"
+ __asm__ __volatile__ ( " sr %0,%0\n"
" lr 2,%1\n"
" lr 4,%2\n"
" sacf 512\n"
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index 82c80b2efdb9..135e013c42bf 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -19,6 +19,7 @@
#define __NR_write 4
#define __NR_open 5
#define __NR_close 6
+#define __NR_restart_syscall 7
#define __NR_creat 8
#define __NR_link 9
#define __NR_unlink 10
diff --git a/include/asm-s390x/bitops.h b/include/asm-s390x/bitops.h
index 8e95aa43780d..ca20e79458a0 100644
--- a/include/asm-s390x/bitops.h
+++ b/include/asm-s390x/bitops.h
@@ -1,3 +1,6 @@
+#ifndef _S390_BITOPS_H
+#define _S390_BITOPS_H
+
/*
* include/asm-s390/bitops.h
*
@@ -9,9 +12,7 @@
* Copyright (C) 1992, Linus Torvalds
*
*/
-
-#ifndef _S390_BITOPS_H
-#define _S390_BITOPS_H
+#include <linux/config.h>
/*
* bit 0 is the LSB of *addr; bit 63 is the MSB of *addr;
@@ -32,7 +33,6 @@
* of the form "flags |= (1 << bitnr)" are used INTERMIXED
* with operation of the form "set_bit(bitnr, flags)".
*/
-#include <linux/config.h>
/* set ALIGN_CS to 1 if the SMP safe bit operations should
* align the address to 4 byte boundary. It seems to work
@@ -57,7 +57,7 @@ extern const char _sb_findmap[];
/*
* SMP save set_bit routine based on compare and swap (CS)
*/
-static inline void set_bit_cs(unsigned long nr, volatile void *ptr)
+static inline void set_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -82,7 +82,7 @@ static inline void set_bit_cs(unsigned long nr, volatile void *ptr)
/*
* SMP save clear_bit routine based on compare and swap (CS)
*/
-static inline void clear_bit_cs(unsigned long nr, volatile void *ptr)
+static inline void clear_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -107,7 +107,7 @@ static inline void clear_bit_cs(unsigned long nr, volatile void *ptr)
/*
* SMP save change_bit routine based on compare and swap (CS)
*/
-static inline void change_bit_cs(unsigned long nr, volatile void *ptr)
+static inline void change_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -132,8 +132,8 @@ static inline void change_bit_cs(unsigned long nr, volatile void *ptr)
/*
* SMP save test_and_set_bit routine based on compare and swap (CS)
*/
-static inline int
-test_and_set_bit_cs(unsigned long nr, volatile void *ptr)
+static inline int
+test_and_set_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -160,7 +160,7 @@ test_and_set_bit_cs(unsigned long nr, volatile void *ptr)
* SMP save test_and_clear_bit routine based on compare and swap (CS)
*/
static inline int
-test_and_clear_bit_cs(unsigned long nr, volatile void *ptr)
+test_and_clear_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -187,7 +187,7 @@ test_and_clear_bit_cs(unsigned long nr, volatile void *ptr)
* SMP save test_and_change_bit routine based on compare and swap (CS)
*/
static inline int
-test_and_change_bit_cs(unsigned long nr, volatile void *ptr)
+test_and_change_bit_cs(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr, old, new, mask;
@@ -214,7 +214,7 @@ test_and_change_bit_cs(unsigned long nr, volatile void *ptr)
/*
* fast, non-SMP set_bit routine
*/
-static inline void __set_bit(unsigned long nr, volatile void *ptr)
+static inline void __set_bit(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -226,7 +226,7 @@ static inline void __set_bit(unsigned long nr, volatile void *ptr)
}
static inline void
-__constant_set_bit(const unsigned long nr, volatile void *ptr)
+__constant_set_bit(const unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -276,7 +276,7 @@ __constant_set_bit(const unsigned long nr, volatile void *ptr)
* fast, non-SMP clear_bit routine
*/
static inline void
-__clear_bit(unsigned long nr, volatile void *ptr)
+__clear_bit(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -288,7 +288,7 @@ __clear_bit(unsigned long nr, volatile void *ptr)
}
static inline void
-__constant_clear_bit(const unsigned long nr, volatile void *ptr)
+__constant_clear_bit(const unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -337,7 +337,7 @@ __constant_clear_bit(const unsigned long nr, volatile void *ptr)
/*
* fast, non-SMP change_bit routine
*/
-static inline void __change_bit(unsigned long nr, volatile void *ptr)
+static inline void __change_bit(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -349,7 +349,7 @@ static inline void __change_bit(unsigned long nr, volatile void *ptr)
}
static inline void
-__constant_change_bit(const unsigned long nr, volatile void *ptr)
+__constant_change_bit(const unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
@@ -399,7 +399,7 @@ __constant_change_bit(const unsigned long nr, volatile void *ptr)
* fast, non-SMP test_and_set_bit routine
*/
static inline int
-test_and_set_bit_simple(unsigned long nr, volatile void *ptr)
+test_and_set_bit_simple(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -418,7 +418,7 @@ test_and_set_bit_simple(unsigned long nr, volatile void *ptr)
* fast, non-SMP test_and_clear_bit routine
*/
static inline int
-test_and_clear_bit_simple(unsigned long nr, volatile void *ptr)
+test_and_clear_bit_simple(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -437,7 +437,7 @@ test_and_clear_bit_simple(unsigned long nr, volatile void *ptr)
* fast, non-SMP test_and_change_bit routine
*/
static inline int
-test_and_change_bit_simple(unsigned long nr, volatile void *ptr)
+test_and_change_bit_simple(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -473,7 +473,7 @@ test_and_change_bit_simple(unsigned long nr, volatile void *ptr)
* This routine doesn't need to be atomic.
*/
-static inline int __test_bit(unsigned long nr, volatile void *ptr)
+static inline int __test_bit(unsigned long nr, volatile unsigned long *ptr)
{
unsigned long addr;
unsigned char ch;
@@ -484,7 +484,7 @@ static inline int __test_bit(unsigned long nr, volatile void *ptr)
}
static inline int
-__constant_test_bit(unsigned long nr, volatile void *addr) {
+__constant_test_bit(unsigned long nr, volatile unsigned long *addr) {
return (((volatile char *) addr)[(nr>>3)^7] & (1<<(nr&7))) != 0;
}
@@ -497,7 +497,7 @@ __constant_test_bit(unsigned long nr, volatile void *addr) {
* Find-bit routines..
*/
static inline unsigned long
-find_first_zero_bit(void * addr, unsigned long size)
+find_first_zero_bit(unsigned long * addr, unsigned long size)
{
unsigned long res, cmp, count;
@@ -539,7 +539,7 @@ find_first_zero_bit(void * addr, unsigned long size)
}
static inline unsigned long
-find_first_bit(void * addr, unsigned long size)
+find_first_bit(unsigned long * addr, unsigned long size)
{
unsigned long res, cmp, count;
@@ -581,7 +581,7 @@ find_first_bit(void * addr, unsigned long size)
}
static inline unsigned long
-find_next_zero_bit (void * addr, unsigned long size, unsigned long offset)
+find_next_zero_bit (unsigned long * addr, unsigned long size, unsigned long offset)
{
unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
unsigned long bitvec, reg;
@@ -625,7 +625,7 @@ find_next_zero_bit (void * addr, unsigned long size, unsigned long offset)
}
static inline unsigned long
-find_next_bit (void * addr, unsigned long size, unsigned long offset)
+find_next_bit (unsigned long * addr, unsigned long size, unsigned long offset)
{
unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
unsigned long bitvec, reg;
@@ -744,7 +744,7 @@ static inline int sched_find_first_bit(unsigned long *b)
* the libc and compiler builtin ffs routines, therefore
* differs in spirit from the above ffz (man ffs).
*/
-extern int inline ffs (int x)
+extern inline int ffs (int x)
{
int r = 1;
@@ -836,9 +836,13 @@ extern __inline__ int fls(int x)
* 23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
*/
-#define ext2_set_bit(nr, addr) test_and_set_bit((nr)^56, addr)
-#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr)^56, addr)
-#define ext2_test_bit(nr, addr) test_bit((nr)^56, addr)
+#define ext2_set_bit(nr, addr) \
+ test_and_set_bit((nr)^56, (unsigned long *)addr)
+#define ext2_clear_bit(nr, addr) \
+ test_and_clear_bit((nr)^56, (unsigned long *)addr)
+#define ext2_test_bit(nr, addr) \
+ test_bit((nr)^56, (unsigned long *)addr)
+
static inline unsigned long
ext2_find_first_zero_bit(void *vaddr, unsigned long size)
{
diff --git a/include/asm-s390x/ccwgroup.h b/include/asm-s390x/ccwgroup.h
index 0775c88d81a1..8b1ae774341b 100644
--- a/include/asm-s390x/ccwgroup.h
+++ b/include/asm-s390x/ccwgroup.h
@@ -31,10 +31,10 @@ struct ccwgroup_driver {
extern int ccwgroup_driver_register (struct ccwgroup_driver *cdriver);
extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver);
-extern int ccwgroup_create_dev (struct device *root,
- unsigned int creator_id,
- struct ccw_driver *gdrv,
- int argc, char *argv[]);
+extern int ccwgroup_create (struct device *root,
+ unsigned int creator_id,
+ struct ccw_driver *gdrv,
+ int argc, char *argv[]);
extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev);
extern int ccwgroup_remove_ccwdev(struct ccw_device *cdev);
diff --git a/include/asm-s390x/cio.h b/include/asm-s390x/cio.h
index c100232da0bf..02858d6e73b7 100644
--- a/include/asm-s390x/cio.h
+++ b/include/asm-s390x/cio.h
@@ -262,8 +262,6 @@ struct diag210 {
extern int diag210(struct diag210 *addr);
-extern int chsc(void *data);
-
extern void wait_cons_dev(void);
#endif
diff --git a/include/asm-s390x/current.h b/include/asm-s390x/current.h
index 7e82e4d5b4d0..b8b52049cf8f 100644
--- a/include/asm-s390x/current.h
+++ b/include/asm-s390x/current.h
@@ -13,7 +13,7 @@
#ifdef __KERNEL__
-#include <asm/thread_info.h>
+#include <linux/thread_info.h>
struct task_struct;
diff --git a/include/asm-s390x/posix_types.h b/include/asm-s390x/posix_types.h
index 70ff9dc51953..25562b31f35c 100644
--- a/include/asm-s390x/posix_types.h
+++ b/include/asm-s390x/posix_types.h
@@ -58,13 +58,13 @@ typedef struct {
#endif
#undef __FD_SET
-#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp)
+#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp->fds_bits)
#undef __FD_CLR
-#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp)
+#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp->fds_bits)
#undef __FD_ISSET
-#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp)
+#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp->fds_bits)
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
diff --git a/include/asm-s390x/rwsem.h b/include/asm-s390x/rwsem.h
index ec635241c20e..c40062c2875c 100644
--- a/include/asm-s390x/rwsem.h
+++ b/include/asm-s390x/rwsem.h
@@ -228,7 +228,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
: "=&d" (old), "=&d" (new)
: "a" (&sem->count), "m" (tmp)
: "cc", "memory" );
- if (new > 1) // FIXME: is this correct ?!?
+ if (new > 1)
rwsem_downgrade_wake(sem);
}
diff --git a/include/asm-s390x/thread_info.h b/include/asm-s390x/thread_info.h
index 788c7e6654ce..0bc09b5a2e9b 100644
--- a/include/asm-s390x/thread_info.h
+++ b/include/asm-s390x/thread_info.h
@@ -26,6 +26,7 @@ struct thread_info {
unsigned long flags; /* low level flags */
unsigned int cpu; /* current CPU */
unsigned int preempt_count; /* 0 => preemptable */
+ struct restart_block restart_block;
};
/*
@@ -33,10 +34,13 @@ struct thread_info {
*/
#define INIT_THREAD_INFO(tsk) \
{ \
- task: &tsk, \
- exec_domain: &default_exec_domain, \
- flags: 0, \
- cpu: 0, \
+ .task = &tsk, \
+ .exec_domain = &default_exec_domain, \
+ .flags = 0, \
+ .cpu = 0, \
+ .restart_block = { \
+ .fn = do_no_restart_syscall, \
+ }, \
}
#define init_thread_info (init_thread_union.thread_info)
@@ -69,6 +73,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
+#define TIF_RESTART_SVC 4 /* restart svc with new svc number */
#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
@@ -77,6 +82,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
+#define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
diff --git a/include/asm-s390x/unistd.h b/include/asm-s390x/unistd.h
index 1a489a14c1ce..51fe320793d8 100644
--- a/include/asm-s390x/unistd.h
+++ b/include/asm-s390x/unistd.h
@@ -19,6 +19,7 @@
#define __NR_write 4
#define __NR_open 5
#define __NR_close 6
+#define __NR_restart_syscall 7
#define __NR_creat 8
#define __NR_link 9
#define __NR_unlink 10
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index dfea0f47ed3e..ae1b454395b5 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -57,7 +57,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm);
extern int copy_strings(int argc,char ** argv,struct linux_binprm *bprm);
extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
extern void compute_creds(struct linux_binprm *binprm);
-extern int do_coredump(long signr, struct pt_regs * regs);
+extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
extern void set_binfmt(struct linux_binfmt *new);
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 4e7a9bbf99dd..e9d6251fa168 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -178,7 +178,7 @@ extern int buffer_heads_over_limit;
*/
int try_to_release_page(struct page * page, int gfp_mask);
int block_invalidatepage(struct page *page, unsigned long offset);
-int block_write_full_page(struct page*, get_block_t*);
+int block_write_full_page(struct page *page, get_block_t *get_block, struct writeback_control *wbc);
int block_read_full_page(struct page*, get_block_t*);
int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*);
int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*,
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 5aa29316f9d8..62daefb17672 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -1,15 +1,18 @@
#ifndef _LINUX_COMPAT_H
#define _LINUX_COMPAT_H
/*
- * These are the type definitions for the arhitecure sepcific
- * compatibility layer.
+ * These are the type definitions for the architecture specific
+ * syscall compatibility layer.
*/
#include <linux/config.h>
#ifdef CONFIG_COMPAT
+#include <linux/stat.h>
#include <asm/compat.h>
+#define compat_jiffies_to_clock_t(x) ((x) / (HZ / COMPAT_USER_HZ))
+
struct compat_utimbuf {
compat_time_t actime;
compat_time_t modtime;
@@ -20,5 +23,14 @@ struct compat_itimerval {
struct compat_timeval it_value;
};
+struct compat_tms {
+ compat_clock_t tms_utime;
+ compat_clock_t tms_stime;
+ compat_clock_t tms_cutime;
+ compat_clock_t tms_cstime;
+};
+
+extern int cp_compat_stat(struct kstat *, struct compat_stat *);
+
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index a8f8d2a31936..e93501c7a0b8 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -37,15 +37,26 @@ int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
#define CPUFREQ_POLICY_POWERSAVE (1)
#define CPUFREQ_POLICY_PERFORMANCE (2)
-/* values here are CPU kHz so that hardware which doesn't run with some
- * frequencies can complain without having to guess what per cent / per
- * mille means. */
+/* Frequency values here are CPU kHz so that hardware which doesn't run
+ * with some frequencies can complain without having to guess what per
+ * cent / per mille means.
+ * Maximum transition latency is in nanoseconds - if it's unknown,
+ * CPUFREQ_ETERNAL shall be used.
+ */
+
+#define CPUFREQ_ETERNAL (-1)
+struct cpufreq_cpuinfo {
+ unsigned int max_freq;
+ unsigned int min_freq;
+ unsigned int transition_latency;
+};
+
struct cpufreq_policy {
unsigned int cpu; /* cpu nr or CPUFREQ_ALL_CPUS */
unsigned int min; /* in kHz */
unsigned int max; /* in kHz */
unsigned int policy; /* see above */
- unsigned int max_cpu_freq; /* for information */
+ struct cpufreq_cpuinfo cpuinfo; /* see above */
};
#define CPUFREQ_ADJUST (0)
@@ -116,7 +127,6 @@ struct cpufreq_driver {
#endif
/* 2.4. compatible API */
#ifdef CONFIG_CPU_FREQ_24_API
- unsigned int cpu_min_freq[NR_CPUS];
unsigned int cpu_cur_freq[NR_CPUS];
#endif
};
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index bf9b15f5f70b..7dc8a14b8396 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -7,13 +7,6 @@
#ifndef _LINUX_DEVICE_MAPPER_H
#define _LINUX_DEVICE_MAPPER_H
-#define DM_DIR "mapper" /* Slashes not supported */
-#define DM_MAX_TYPE_NAME 16
-#define DM_NAME_LEN 128
-#define DM_UUID_LEN 129
-
-#ifdef __KERNEL__
-
struct dm_target;
struct dm_table;
struct dm_dev;
@@ -101,6 +94,4 @@ struct dm_target {
int dm_register_target(struct target_type *t);
int dm_unregister_target(struct target_type *t);
-#endif /* __KERNEL__ */
-
#endif /* _LINUX_DEVICE_MAPPER_H */
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
index c5ae8cd3921c..72edd5e19e62 100644
--- a/include/linux/dm-ioctl.h
+++ b/include/linux/dm-ioctl.h
@@ -7,9 +7,13 @@
#ifndef _LINUX_DM_IOCTL_H
#define _LINUX_DM_IOCTL_H
-#include <linux/device-mapper.h>
#include <linux/types.h>
+#define DM_DIR "mapper" /* Slashes not supported */
+#define DM_MAX_TYPE_NAME 16
+#define DM_NAME_LEN 128
+#define DM_UUID_LEN 129
+
/*
* Implements a traditional ioctl interface to the device mapper.
*/
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f39d21e5bcd9..500cb3ac421e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -278,7 +278,7 @@ struct address_space;
struct writeback_control;
struct address_space_operations {
- int (*writepage)(struct page *);
+ int (*writepage)(struct page *page, struct writeback_control *wbc);
int (*readpage)(struct file *, struct page *);
int (*sync_page)(struct page *);
@@ -631,6 +631,7 @@ struct super_block {
struct semaphore s_lock;
int s_count;
int s_syncing;
+ int s_need_sync_fs;
atomic_t s_active;
void *s_security;
@@ -810,6 +811,7 @@ struct super_operations {
void (*delete_inode) (struct inode *);
void (*put_super) (struct super_block *);
void (*write_super) (struct super_block *);
+ int (*sync_fs)(struct super_block *sb, int wait);
void (*write_super_lockfs) (struct super_block *);
void (*unlockfs) (struct super_block *);
int (*statfs) (struct super_block *, struct statfs *);
@@ -1096,15 +1098,20 @@ extern int bd_claim(struct block_device *, void *);
extern void bd_release(struct block_device *);
extern void blk_run_queues(void);
-/* fs/devices.c */
+/* fs/char_dev.c */
extern int register_chrdev(unsigned int, const char *, struct file_operations *);
extern int unregister_chrdev(unsigned int, const char *);
extern int chrdev_open(struct inode *, struct file *);
+
+/* fs/block_dev.c */
extern const char *__bdevname(dev_t);
extern inline const char *bdevname(struct block_device *bdev)
{
return __bdevname(bdev->bd_dev);
}
+extern struct block_device *open_bdev_excl(const char *, int, int, void *);
+extern void close_bdev_excl(struct block_device *, int);
+
extern const char * cdevname(kdev_t);
extern const char * kdevname(kdev_t);
extern void init_special_inode(struct inode *, umode_t, dev_t);
@@ -1143,6 +1150,7 @@ extern void write_inode_now(struct inode *, int);
extern int filemap_fdatawrite(struct address_space *);
extern int filemap_fdatawait(struct address_space *);
extern void sync_supers(void);
+extern void sync_filesystems(int wait);
extern sector_t bmap(struct inode *, sector_t);
extern int setattr_mask(unsigned int);
extern int notify_change(struct dentry *, struct iattr *);
@@ -1225,6 +1233,7 @@ extern int sb_set_blocksize(struct super_block *, int);
extern int sb_min_blocksize(struct super_block *, int);
extern int generic_file_mmap(struct file *, struct vm_area_struct *);
+extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 76d1e1e1fb6b..3bf94e2205bd 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -20,6 +20,7 @@ int hugetlb_prefault(struct address_space *, struct vm_area_struct *);
void huge_page_release(struct page *);
void hugetlb_release_key(struct hugetlb_key *);
int hugetlb_report_meminfo(char *);
+int is_hugepage_mem_enough(size_t);
extern int htlbpage_max;
@@ -35,6 +36,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
#define zap_hugepage_range(vma, start, len) BUG()
#define unmap_hugepage_range(vma, start, end) BUG()
#define huge_page_release(page) BUG()
+#define is_hugepage_mem_enough(size) 0
#define hugetlb_report_meminfo(buf) 0
#endif /* !CONFIG_HUGETLB_PAGE */
diff --git a/include/linux/init.h b/include/linux/init.h
index 26a518d9cfc1..46b1ef190c52 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -91,19 +91,15 @@ typedef void (*exitcall_t)(void);
#define __exitcall(fn) \
static exitcall_t __exitcall_##fn __exit_call = fn
-/*
- * Used for kernel command line parameter setup
- */
-struct kernel_param {
+struct obs_kernel_param {
const char *str;
int (*setup_func)(char *);
};
-extern struct kernel_param __setup_start, __setup_end;
-
+/* OBSOLETE: see moduleparam.h for the right way. */
#define __setup(str, fn) \
static char __setup_str_##fn[] __initdata = str; \
- static struct kernel_param __setup_##fn \
+ static struct obs_kernel_param __setup_##fn \
__attribute__((unused,__section__ (".init.setup"))) \
= { __setup_str_##fn, fn }
@@ -166,6 +162,16 @@ extern struct kernel_param __setup_start, __setup_end;
/* Data marked not to be saved by software_suspend() */
#define __nosavedata __attribute__ ((__section__ (".data.nosave")))
+/* This means "can be init if no module support, otherwise module load
+ may call it." */
+#ifdef CONFIG_MODULES
+#define __init_or_module
+#define __initdata_or_module
+#else
+#define __init_or_module __init
+#define __initdata_or_module __initdata
+#endif /*CONFIG_MODULES*/
+
#ifdef CONFIG_HOTPLUG
#define __devinit
#define __devinitdata
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 80a3e97ab59b..f3cadd9416ad 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -38,6 +38,13 @@
#define KERN_INFO "<6>" /* informational */
#define KERN_DEBUG "<7>" /* debug-level messages */
+extern int console_printk[];
+
+#define console_loglevel (console_printk[0])
+#define default_message_loglevel (console_printk[1])
+#define minimum_console_loglevel (console_printk[2])
+#define default_console_loglevel (console_printk[3])
+
struct completion;
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
@@ -71,7 +78,7 @@ extern int sscanf(const char *, const char *, ...)
extern int vsscanf(const char *, const char *, va_list);
extern int get_option(char **str, int *pint);
-extern char *get_options(char *str, int nints, int *ints);
+extern char *get_options(const char *str, int nints, int *ints);
extern unsigned long long memparse(char *ptr, char **retptr);
extern void dev_probe_lock(void);
extern void dev_probe_unlock(void);
@@ -81,8 +88,6 @@ extern int session_of_pgrp(int pgrp);
asmlinkage int printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2)));
-extern int console_loglevel;
-
static inline void console_silent(void)
{
console_loglevel = 0;
diff --git a/include/linux/mm.h b/include/linux/mm.h
index d91bd3e8ce14..df49cb472866 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -70,7 +70,6 @@ struct vm_area_struct {
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
units, *not* PAGE_CACHE_SIZE */
struct file * vm_file; /* File we map to (can be NULL). */
- unsigned long vm_raend; /* XXX: put full readahead info here. */
void * vm_private_data; /* was vm_pte (shared mem) */
};
@@ -355,7 +354,6 @@ extern struct page *mem_map;
extern void show_free_areas(void);
-extern int fail_writepage(struct page *);
struct page * shmem_nopage(struct vm_area_struct * vma, unsigned long address, int unused);
struct file *shmem_file_setup(char * name, loff_t size, unsigned long flags);
extern void shmem_lock(struct file * file, int lock);
@@ -517,6 +515,7 @@ void page_cache_readaround(struct address_space *mapping,
unsigned long offset);
void handle_ra_miss(struct address_space *mapping,
struct file_ra_state *ra);
+unsigned long max_sane_readahead(unsigned long nr);
/* Do stack extension */
extern int expand_stack(struct vm_area_struct * vma, unsigned long address);
diff --git a/include/linux/module.h b/include/linux/module.h
index 90810238f424..2392edcc3307 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -20,10 +20,6 @@
#include <asm/module.h>
#include <asm/uaccess.h> /* For struct exception_table_entry */
-/* Indirect stringification */
-#define __MODULE_STRING_1(x) #x
-#define __MODULE_STRING(x) __MODULE_STRING_1(x)
-
/* Not Yet Implemented */
#define MODULE_LICENSE(name)
#define MODULE_AUTHOR(name)
@@ -305,6 +301,21 @@ extern spinlock_t modlist_lock;
#define __MOD_DEC_USE_COUNT(mod) module_put(mod)
#define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE)
+struct obsolete_modparm {
+ char name[64];
+ char type[64-sizeof(void *)];
+ void *addr;
+};
+#ifdef MODULE
+/* DEPRECATED: Do not use. */
+#define MODULE_PARM(var,type) \
+struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \
+{ __stringify(var), type };
+
+#else
+#define MODULE_PARM(var,type)
+#endif
+
/* People do this inside their init routines, when the module isn't
"live" yet. They should no longer be doing that, but
meanwhile... */
@@ -317,11 +328,11 @@ extern spinlock_t modlist_lock;
#endif
#define MOD_DEC_USE_COUNT module_put(THIS_MODULE)
#define try_inc_mod_count(mod) try_module_get(mod)
-#define MODULE_PARM(parm,string)
#define EXPORT_NO_SYMBOLS
extern int module_dummy_usage;
#define GET_USE_COUNT(module) (module_dummy_usage)
#define MOD_IN_USE 0
+#define __MODULE_STRING(x) __stringify(x)
#define __mod_between(a_start, a_len, b_start, b_len) \
(((a_start) >= (b_start) && (a_start) <= (b_start)+(b_len)) \
|| ((a_start)+(a_len) >= (b_start) \
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
new file mode 100644
index 000000000000..92a1bc154e8e
--- /dev/null
+++ b/include/linux/moduleparam.h
@@ -0,0 +1,127 @@
+#ifndef _LINUX_MODULE_PARAMS_H
+#define _LINUX_MODULE_PARAMS_H
+/* (C) Copyright 2001, 2002 Rusty Russell IBM Corporation */
+#include <linux/init.h>
+#include <linux/stringify.h>
+
+/* You can override this manually, but generally this should match the
+ module name. */
+#ifdef MODULE
+#define MODULE_PARAM_PREFIX /* empty */
+#else
+#define MODULE_PARAM_PREFIX __stringify(KBUILD_MODNAME) "."
+#endif
+
+struct kernel_param;
+
+/* Returns 0, or -errno. arg is in kp->arg. */
+typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
+/* Returns length written or -errno. Buffer is 4k (ie. be short!) */
+typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
+
+struct kernel_param {
+ const char *name;
+ unsigned int perm;
+ param_set_fn set;
+ param_get_fn get;
+ void *arg;
+};
+
+/* Special one for strings we want to copy into */
+struct kparam_string {
+ unsigned int maxlen;
+ char *string;
+};
+
+/* This is the fundamental function for registering boot/module
+ parameters. perm sets the visibility in driverfs: 000 means it's
+ not there, read bits mean it's readable, write bits mean it's
+ writable. */
+#define __module_param_call(prefix, name, set, get, arg, perm) \
+ static char __param_str_##name[] __initdata = prefix #name; \
+ static struct kernel_param __param_##name \
+ __attribute__ ((unused,__section__ ("__param"))) \
+ = { __param_str_##name, perm, set, get, arg }
+
+#define module_param_call(name, set, get, arg, perm) \
+ __module_param_call(MODULE_PARAM_PREFIX, name, set, get, arg, perm)
+
+/* Helper functions: type is byte, short, ushort, int, uint, long,
+ ulong, charp, bool or invbool, or XXX if you define param_get_XXX,
+ param_set_XXX and param_check_XXX. */
+#define module_param_named(name, value, type, perm) \
+ param_check_##type(name, &(value)); \
+ module_param_call(name, param_set_##type, param_get_##type, &value, perm)
+
+#define module_param(name, type, perm) \
+ module_param_named(name, name, type, perm)
+
+/* Actually copy string: maxlen param is usually sizeof(string). */
+#define module_param_string(name, string, len, perm) \
+ static struct kparam_string __param_string_##name __initdata \
+ = { len, string }; \
+ module_param_call(name, param_set_copystring, param_get_charp, \
+ &__param_string_##name, perm)
+
+/* Called on module insert or kernel boot */
+extern int parse_args(const char *name,
+ char *args,
+ struct kernel_param *params,
+ unsigned num,
+ int (*unknown)(char *param, char *val));
+
+/* All the helper functions */
+/* The macros to do compile-time type checking stolen from Jakub
+ Jelinek, who IIRC came up with this idea for the 2.4 module init code. */
+#define __param_check(name, p, type) \
+ static inline type *__check_##name(void) { return(p); }
+
+extern int param_set_short(const char *val, struct kernel_param *kp);
+extern int param_get_short(char *buffer, struct kernel_param *kp);
+#define param_check_short(name, p) __param_check(name, p, short)
+
+extern int param_set_ushort(const char *val, struct kernel_param *kp);
+extern int param_get_ushort(char *buffer, struct kernel_param *kp);
+#define param_check_ushort(name, p) __param_check(name, p, unsigned short)
+
+extern int param_set_int(const char *val, struct kernel_param *kp);
+extern int param_get_int(char *buffer, struct kernel_param *kp);
+#define param_check_int(name, p) __param_check(name, p, int)
+
+extern int param_set_uint(const char *val, struct kernel_param *kp);
+extern int param_get_uint(char *buffer, struct kernel_param *kp);
+#define param_check_uint(name, p) __param_check(name, p, unsigned int)
+
+extern int param_set_long(const char *val, struct kernel_param *kp);
+extern int param_get_long(char *buffer, struct kernel_param *kp);
+#define param_check_long(name, p) __param_check(name, p, long)
+
+extern int param_set_ulong(const char *val, struct kernel_param *kp);
+extern int param_get_ulong(char *buffer, struct kernel_param *kp);
+#define param_check_ulong(name, p) __param_check(name, p, unsigned long)
+
+extern int param_set_charp(const char *val, struct kernel_param *kp);
+extern int param_get_charp(char *buffer, struct kernel_param *kp);
+#define param_check_charp(name, p) __param_check(name, p, char *)
+
+extern int param_set_bool(const char *val, struct kernel_param *kp);
+extern int param_get_bool(char *buffer, struct kernel_param *kp);
+#define param_check_bool(name, p) __param_check(name, p, int)
+
+extern int param_set_invbool(const char *val, struct kernel_param *kp);
+extern int param_get_invbool(char *buffer, struct kernel_param *kp);
+#define param_check_invbool(name, p) __param_check(name, p, int)
+
+/* First two elements are the max and min array length (which don't change) */
+extern int param_set_intarray(const char *val, struct kernel_param *kp);
+extern int param_get_intarray(char *buffer, struct kernel_param *kp);
+#define param_check_intarray(name, p) __param_check(name, p, int *)
+
+extern int param_set_copystring(const char *val, struct kernel_param *kp);
+
+int param_array(const char *name,
+ const char *val,
+ unsigned int min, unsigned int max,
+ void *elem, int elemsize,
+ int (*set)(const char *, struct kernel_param *kp));
+#endif /* _LINUX_MODULE_PARAM_TYPES_H */
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index d320dd969b07..36e71c8ed51e 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -196,6 +196,16 @@ enum open_delegation_type4 {
#define NFS4_MINOR_VERSION 0
#define NFS4_DEBUG 1
+#ifdef __KERNEL__
+
+/* Index of predefined Linux client operations */
+
+enum {
+ NFSPROC4_CLNT_NULL = 0, /* Unused */
+ NFSPROC4_CLNT_COMPOUND, /* Soon to be unused */
+};
+
+#endif
#endif
/*
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 8d15e17c0b94..2673e32cc4ba 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -291,7 +291,7 @@ extern void nfs_complete_unlink(struct dentry *);
/*
* linux/fs/nfs/write.c
*/
-extern int nfs_writepage(struct page *);
+extern int nfs_writepage(struct page *page, struct writeback_control *wbc);
extern int nfs_writepages(struct address_space *, struct writeback_control *);
extern int nfs_flush_incompatible(struct file *file, struct page *page);
extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 970ffa785f78..af914e160fc6 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -488,7 +488,6 @@ struct nfs4_write {
struct nfs4_op {
u32 opnum;
- u32 nfserr;
union {
struct nfs4_access access;
struct nfs4_close close;
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 7018961aea91..a50e09ff79ea 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -79,35 +79,36 @@
* allowed.
*/
struct page_state {
- unsigned long nr_dirty;
- unsigned long nr_writeback;
- unsigned long nr_pagecache;
- unsigned long nr_page_table_pages;
- unsigned long nr_reverse_maps;
- unsigned long nr_mapped;
- unsigned long nr_slab;
+ unsigned long nr_dirty; /* Dirty writeable pages */
+ unsigned long nr_writeback; /* Pages under writeback */
+ unsigned long nr_pagecache; /* Pages in pagecache */
+ unsigned long nr_page_table_pages;/* Pages used for pagetables */
+ unsigned long nr_reverse_maps; /* includes PageDirect */
+ unsigned long nr_mapped; /* mapped into pagetables */
+ unsigned long nr_slab; /* In slab */
#define GET_PAGE_STATE_LAST nr_slab
/*
* The below are zeroed by get_page_state(). Use get_full_page_state()
* to add up all these.
*/
- unsigned long pgpgin;
- unsigned long pgpgout;
- unsigned long pswpin;
- unsigned long pswpout;
- unsigned long pgalloc;
- unsigned long pgfree;
- unsigned long pgactivate;
- unsigned long pgdeactivate;
- unsigned long pgfault;
- unsigned long pgmajfault;
- unsigned long pgscan;
- unsigned long pgrefill;
- unsigned long pgsteal;
- unsigned long kswapd_steal;
- unsigned long pageoutrun;
- unsigned long allocstall;
+ unsigned long pgpgin; /* Disk reads */
+ unsigned long pgpgout; /* Disk writes */
+ unsigned long pswpin; /* swap reads */
+ unsigned long pswpout; /* swap writes */
+ unsigned long pgalloc; /* page allocations */
+ unsigned long pgfree; /* page freeings */
+ unsigned long pgactivate; /* pages moved inactive->active */
+ unsigned long pgdeactivate; /* pages moved active->inactive */
+ unsigned long pgfault; /* faults (major+minor) */
+ unsigned long pgmajfault; /* faults (major only) */
+ unsigned long pgscan; /* pages scanned by page reclaim */
+ unsigned long pgrefill; /* inspected in refill_inactive_zone */
+ unsigned long pgsteal; /* total pages reclaimed */
+ unsigned long kswapd_steal; /* pages reclaimed by kswapd */
+ unsigned long pageoutrun; /* kswapd's calls to page reclaim */
+ unsigned long allocstall; /* direct reclaim calls */
+ unsigned long pgrotated; /* pages rotated to tail of the LRU */
} ____cacheline_aligned;
DECLARE_PER_CPU(struct page_state, page_states);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 80a9836df919..d0726cb87145 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -424,9 +424,8 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_FREEZE 0x00008000 /* this task should be frozen for suspend */
#define PF_IOTHREAD 0x00010000 /* this thread is needed for doing I/O to swap */
#define PF_FROZEN 0x00020000 /* frozen for system suspend */
-#define PF_SYNC 0x00040000 /* performing fsync(), etc */
-#define PF_FSTRANS 0x00080000 /* inside a filesystem transaction */
-#define PF_KSWAPD 0x00100000 /* I am kswapd */
+#define PF_FSTRANS 0x00040000 /* inside a filesystem transaction */
+#define PF_KSWAPD 0x00080000 /* I am kswapd */
/*
* Ptrace flags
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 429e72a2eadd..1b869bf3aad9 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -140,6 +140,8 @@ struct sysv_sem {
asmlinkage long sys_semget (key_t key, int nsems, int semflg);
asmlinkage long sys_semop (int semid, struct sembuf *sops, unsigned nsops);
asmlinkage long sys_semctl (int semid, int semnum, int cmd, union semun arg);
+asmlinkage long sys_semtimedop(int semid, struct sembuf *sops,
+ unsigned nsops, const struct timespec *timeout);
#endif /* __KERNEL__ */
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h
index 89ead755abfe..e10e33a99574 100644
--- a/include/linux/sonypi.h
+++ b/include/linux/sonypi.h
@@ -43,9 +43,9 @@
#define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3
#define SONYPI_EVENT_JOGDIAL_UP_PRESSED 4
#define SONYPI_EVENT_JOGDIAL_PRESSED 5
-#define SONYPI_EVENT_JOGDIAL_RELEASED 6
+#define SONYPI_EVENT_JOGDIAL_RELEASED 6 /* obsolete */
#define SONYPI_EVENT_CAPTURE_PRESSED 7
-#define SONYPI_EVENT_CAPTURE_RELEASED 8
+#define SONYPI_EVENT_CAPTURE_RELEASED 8 /* obsolete */
#define SONYPI_EVENT_CAPTURE_PARTIALPRESSED 9
#define SONYPI_EVENT_CAPTURE_PARTIALRELEASED 10
#define SONYPI_EVENT_FNKEY_ESC 11
@@ -93,7 +93,7 @@
#define SONYPI_EVENT_MEYE_OPPOSITE 53
#define SONYPI_EVENT_MEMORYSTICK_INSERT 54
#define SONYPI_EVENT_MEMORYSTICK_EJECT 55
-
+#define SONYPI_EVENT_ANYBUTTON_RELEASED 56
/* get/set brightness */
#define SONYPI_IOCGBRT _IOR('v', 0, __u8)
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index 74c5260b2343..fd871e87f7f4 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -211,6 +211,10 @@ xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes)
return p;
}
+extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages,
+ unsigned int base, unsigned int len);
+extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len);
+
/*
* Initialize an xdr_stream for decoding data.
*/
diff --git a/include/linux/swap.h b/include/linux/swap.h
index f6b1421f86b0..c635f392d6c1 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -65,6 +65,7 @@ typedef struct {
struct sysinfo;
struct address_space;
struct zone;
+struct writeback_control;
/*
* A swap extent maps a range of a swapfile's PAGE_SIZE pages onto a range of
@@ -180,7 +181,7 @@ extern int shmem_unuse(swp_entry_t entry, struct page *page);
#ifdef CONFIG_SWAP
/* linux/mm/page_io.c */
extern int swap_readpage(struct file *, struct page *);
-extern int swap_writepage(struct page *);
+extern int swap_writepage(struct page *page, struct writeback_control *wbc);
extern int rw_swap_page_sync(int, swp_entry_t, struct page *);
/* linux/mm/swap_state.c */
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index e70fc2ef0856..0b905659ac4b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -154,6 +154,7 @@ enum
VM_PAGEBUF=17, /* struct: Control pagebuf parameters */
VM_HUGETLB_PAGES=18, /* int: Number of available Huge Pages */
VM_SWAPPINESS=19, /* Tendency to steal mapped memory */
+ VM_LOWER_ZONE_PROTECTION=20,/* Amount of protection of lower zones */
};
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 687091648a3a..620f18f5ceeb 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -1,9 +1,5 @@
/*
* include/linux/writeback.h.
- *
- * These declarations are private to fs/ and mm/.
- * Declarations which are exported to filesystems do not
- * get placed here.
*/
#ifndef WRITEBACK_H
#define WRITEBACK_H
@@ -45,8 +41,19 @@ struct writeback_control {
this for each page written */
int nonblocking; /* Don't get stuck on request queues */
int encountered_congestion; /* An output: a queue is full */
+ int for_kupdate; /* A kupdate writeback */
+ int for_reclaim; /* Invoked from the page allocator */
};
-
+
+/*
+ * ->writepage() return values (make these much larger than a pagesize, in
+ * case some fs is returning number-of-bytes-written from writepage)
+ */
+#define WRITEPAGE_ACTIVATE 0x80000 /* IO was not started: activate page */
+
+/*
+ * fs/fs-writeback.c
+ */
void writeback_inodes(struct writeback_control *wbc);
void wake_up_inode(struct inode *inode);
void __wait_on_inode(struct inode * inode);
@@ -82,13 +89,4 @@ extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
read-only. */
-/*
- * Tell the writeback paths that they are being called for a "data integrity"
- * operation such as fsync().
- */
-static inline int called_for_sync(void)
-{
- return current->flags & PF_SYNC;
-}
-
#endif /* WRITEBACK_H */