aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-06-29 19:57:46 -0400
committerLen Brown <len.brown@intel.com>2006-06-29 19:57:46 -0400
commitd120cfb544ed6161b9d32fb6c4648c471807ee6b (patch)
tree7757ad0198d8df76ff5c60f939a687687c41da00 /include/linux
parent9dce0e950dbfab4148f35ac6f297d8638cdc63c4 (diff)
parentbf7e8511088963078484132636839b59e25cf14f (diff)
merge linus into release branch
Conflicts: drivers/acpi/acpi_memhotplug.c
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ac97_codec.h2
-rw-r--r--include/linux/acpi.h6
-rw-r--r--include/linux/buffer_head.h2
-rw-r--r--include/linux/coda_linux.h4
-rw-r--r--include/linux/compat_ioctl.h5
-rw-r--r--include/linux/cpu.h14
-rw-r--r--include/linux/devfs_fs.h41
-rw-r--r--include/linux/devfs_fs_kernel.h57
-rw-r--r--include/linux/dmaengine.h2
-rw-r--r--include/linux/efs_fs.h2
-rw-r--r--include/linux/elf-em.h5
-rw-r--r--include/linux/fb.h1
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/futex.h12
-rw-r--r--include/linux/genhd.h2
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/init_task.h3
-rw-r--r--include/linux/interrupt.h14
-rw-r--r--include/linux/ioport.h30
-rw-r--r--include/linux/ipmi.h4
-rw-r--r--include/linux/irq.h346
-rw-r--r--include/linux/isdn/tpam.h55
-rw-r--r--include/linux/jffs2.h1
-rw-r--r--include/linux/kbd_kern.h4
-rw-r--r--include/linux/key.h8
-rw-r--r--include/linux/libata.h15
-rw-r--r--include/linux/list.h9
-rw-r--r--include/linux/memory_hotplug.h73
-rw-r--r--include/linux/miscdevice.h1
-rw-r--r--include/linux/mm.h13
-rw-r--r--include/linux/module.h20
-rw-r--r--include/linux/nfs_fs.h2
-rw-r--r--include/linux/node.h17
-rw-r--r--include/linux/nsc_gpio.h42
-rw-r--r--include/linux/pci.h13
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/plist.h248
-rw-r--r--include/linux/pnp.h7
-rw-r--r--include/linux/poison.h58
-rw-r--r--include/linux/rcupdate.h1
-rw-r--r--include/linux/reiserfs_fs.h2
-rw-r--r--include/linux/rtmutex.h117
-rw-r--r--include/linux/sched.h59
-rw-r--r--include/linux/scx200.h7
-rw-r--r--include/linux/scx200_gpio.h21
-rw-r--r--include/linux/serial_core.h1
-rw-r--r--include/linux/spi/spi.h6
-rw-r--r--include/linux/swap.h2
-rw-r--r--include/linux/syscalls.h4
-rw-r--r--include/linux/sysctl.h2
-rw-r--r--include/linux/topology.h3
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/tty_driver.h14
-rw-r--r--include/linux/tty_flip.h2
-rw-r--r--include/linux/types.h7
-rw-r--r--include/linux/ufs_fs.h2
-rw-r--r--include/linux/watchdog.h10
57 files changed, 1076 insertions, 332 deletions
diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h
index c35833824e11..2ed2fd855133 100644
--- a/include/linux/ac97_codec.h
+++ b/include/linux/ac97_codec.h
@@ -259,7 +259,7 @@ struct ac97_codec {
259 int type; 259 int type;
260 u32 model; 260 u32 model;
261 261
262 int modem:1; 262 unsigned int modem:1;
263 263
264 struct ac97_ops *codec_ops; 264 struct ac97_ops *codec_ops;
265 265
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 90d6df1551ed..88b5dfd8ee12 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -528,12 +528,18 @@ static inline void acpi_set_cstate_limit(unsigned int new_limit) { return; }
528 528
529#ifdef CONFIG_ACPI_NUMA 529#ifdef CONFIG_ACPI_NUMA
530int acpi_get_pxm(acpi_handle handle); 530int acpi_get_pxm(acpi_handle handle);
531int acpi_get_node(acpi_handle *handle);
531#else 532#else
532static inline int acpi_get_pxm(acpi_handle handle) 533static inline int acpi_get_pxm(acpi_handle handle)
533{ 534{
534 return 0; 535 return 0;
535} 536}
537static inline int acpi_get_node(acpi_handle *handle)
538{
539 return 0;
540}
536#endif 541#endif
542extern int acpi_paddr_to_node(u64 start_addr, u64 size);
537 543
538extern int pnpacpi_disabled; 544extern int pnpacpi_disabled;
539 545
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index fb7e9b7ccbe3..737e407d0cd1 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -149,7 +149,6 @@ void create_empty_buffers(struct page *, unsigned long,
149 unsigned long b_state); 149 unsigned long b_state);
150void end_buffer_read_sync(struct buffer_head *bh, int uptodate); 150void end_buffer_read_sync(struct buffer_head *bh, int uptodate);
151void end_buffer_write_sync(struct buffer_head *bh, int uptodate); 151void end_buffer_write_sync(struct buffer_head *bh, int uptodate);
152void end_buffer_async_write(struct buffer_head *bh, int uptodate);
153 152
154/* Things to do with buffers at mapping->private_list */ 153/* Things to do with buffers at mapping->private_list */
155void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); 154void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode);
@@ -214,6 +213,7 @@ int nobh_truncate_page(struct address_space *, loff_t);
214int nobh_writepage(struct page *page, get_block_t *get_block, 213int nobh_writepage(struct page *page, get_block_t *get_block,
215 struct writeback_control *wbc); 214 struct writeback_control *wbc);
216 215
216void buffer_init(void);
217 217
218/* 218/*
219 * inline definitions 219 * inline definitions
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 7b5c5df5cb69..be512cc98791 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -27,8 +27,8 @@ extern struct inode_operations coda_dir_inode_operations;
27extern struct inode_operations coda_file_inode_operations; 27extern struct inode_operations coda_file_inode_operations;
28extern struct inode_operations coda_ioctl_inode_operations; 28extern struct inode_operations coda_ioctl_inode_operations;
29 29
30extern struct address_space_operations coda_file_aops; 30extern const struct address_space_operations coda_file_aops;
31extern struct address_space_operations coda_symlink_aops; 31extern const struct address_space_operations coda_symlink_aops;
32 32
33extern const struct file_operations coda_dir_operations; 33extern const struct file_operations coda_dir_operations;
34extern const struct file_operations coda_file_operations; 34extern const struct file_operations coda_file_operations;
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h
index 917d62e41480..269d000bb2a3 100644
--- a/include/linux/compat_ioctl.h
+++ b/include/linux/compat_ioctl.h
@@ -567,11 +567,6 @@ COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER)
567COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST) 567COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST)
568COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST) 568COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST)
569COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT) 569COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT)
570/* DEVFS */
571COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
572COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
573COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE)
574COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK)
575/* Raw devices */ 570/* Raw devices */
576COMPATIBLE_IOCTL(RAW_SETBIND) 571COMPATIBLE_IOCTL(RAW_SETBIND)
577COMPATIBLE_IOCTL(RAW_GETBIND) 572COMPATIBLE_IOCTL(RAW_GETBIND)
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 08d50c53aab4..a3caf6866bae 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -31,17 +31,23 @@ struct cpu {
31 struct sys_device sysdev; 31 struct sys_device sysdev;
32}; 32};
33 33
34extern int register_cpu(struct cpu *, int, struct node *); 34extern int register_cpu(struct cpu *cpu, int num);
35extern struct sys_device *get_cpu_sysdev(unsigned cpu); 35extern struct sys_device *get_cpu_sysdev(unsigned cpu);
36#ifdef CONFIG_HOTPLUG_CPU 36#ifdef CONFIG_HOTPLUG_CPU
37extern void unregister_cpu(struct cpu *, struct node *); 37extern void unregister_cpu(struct cpu *cpu);
38#endif 38#endif
39struct notifier_block; 39struct notifier_block;
40 40
41#ifdef CONFIG_SMP 41#ifdef CONFIG_SMP
42/* Need to know about CPUs going up/down? */ 42/* Need to know about CPUs going up/down? */
43extern int register_cpu_notifier(struct notifier_block *nb); 43extern int register_cpu_notifier(struct notifier_block *nb);
44#ifdef CONFIG_HOTPLUG_CPU
44extern void unregister_cpu_notifier(struct notifier_block *nb); 45extern void unregister_cpu_notifier(struct notifier_block *nb);
46#else
47static inline void unregister_cpu_notifier(struct notifier_block *nb)
48{
49}
50#endif
45extern int current_in_cpu_hotplug(void); 51extern int current_in_cpu_hotplug(void);
46 52
47int cpu_up(unsigned int cpu); 53int cpu_up(unsigned int cpu);
@@ -73,6 +79,8 @@ extern int lock_cpu_hotplug_interruptible(void);
73 { .notifier_call = fn, .priority = pri }; \ 79 { .notifier_call = fn, .priority = pri }; \
74 register_cpu_notifier(&fn##_nb); \ 80 register_cpu_notifier(&fn##_nb); \
75} 81}
82#define register_hotcpu_notifier(nb) register_cpu_notifier(nb)
83#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
76int cpu_down(unsigned int cpu); 84int cpu_down(unsigned int cpu);
77#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) 85#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
78#else 86#else
@@ -80,6 +88,8 @@ int cpu_down(unsigned int cpu);
80#define unlock_cpu_hotplug() do { } while (0) 88#define unlock_cpu_hotplug() do { } while (0)
81#define lock_cpu_hotplug_interruptible() 0 89#define lock_cpu_hotplug_interruptible() 0
82#define hotcpu_notifier(fn, pri) 90#define hotcpu_notifier(fn, pri)
91#define register_hotcpu_notifier(nb)
92#define unregister_hotcpu_notifier(nb)
83 93
84/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ 94/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
85static inline int cpu_is_offline(int cpu) { return 0; } 95static inline int cpu_is_offline(int cpu) { return 0; }
diff --git a/include/linux/devfs_fs.h b/include/linux/devfs_fs.h
deleted file mode 100644
index de236f431877..000000000000
--- a/include/linux/devfs_fs.h
+++ /dev/null
@@ -1,41 +0,0 @@
1#ifndef _LINUX_DEVFS_FS_H
2#define _LINUX_DEVFS_FS_H
3
4#include <linux/ioctl.h>
5
6#define DEVFSD_PROTOCOL_REVISION_KERNEL 5
7
8#define DEVFSD_IOCTL_BASE 'd'
9
10/* These are the various ioctls */
11#define DEVFSDIOC_GET_PROTO_REV _IOR(DEVFSD_IOCTL_BASE, 0, int)
12#define DEVFSDIOC_SET_EVENT_MASK _IOW(DEVFSD_IOCTL_BASE, 2, int)
13#define DEVFSDIOC_RELEASE_EVENT_QUEUE _IOW(DEVFSD_IOCTL_BASE, 3, int)
14#define DEVFSDIOC_SET_DEBUG_MASK _IOW(DEVFSD_IOCTL_BASE, 4, int)
15
16#define DEVFSD_NOTIFY_REGISTERED 0
17#define DEVFSD_NOTIFY_UNREGISTERED 1
18#define DEVFSD_NOTIFY_ASYNC_OPEN 2
19#define DEVFSD_NOTIFY_CLOSE 3
20#define DEVFSD_NOTIFY_LOOKUP 4
21#define DEVFSD_NOTIFY_CHANGE 5
22#define DEVFSD_NOTIFY_CREATE 6
23#define DEVFSD_NOTIFY_DELETE 7
24
25#define DEVFS_PATHLEN 1024 /* Never change this otherwise the
26 binary interface will change */
27
28struct devfsd_notify_struct { /* Use native C types to ensure same types in kernel and user space */
29 unsigned int type; /* DEVFSD_NOTIFY_* value */
30 unsigned int mode; /* Mode of the inode or device entry */
31 unsigned int major; /* Major number of device entry */
32 unsigned int minor; /* Minor number of device entry */
33 unsigned int uid; /* Uid of process, inode or device entry */
34 unsigned int gid; /* Gid of process, inode or device entry */
35 unsigned int overrun_count; /* Number of lost events */
36 unsigned int namelen; /* Number of characters not including '\0' */
37 /* The device name MUST come last */
38 char devname[DEVFS_PATHLEN]; /* This will be '\0' terminated */
39};
40
41#endif /* _LINUX_DEVFS_FS_H */
diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h
deleted file mode 100644
index 0d74a6f22abc..000000000000
--- a/include/linux/devfs_fs_kernel.h
+++ /dev/null
@@ -1,57 +0,0 @@
1#ifndef _LINUX_DEVFS_FS_KERNEL_H
2#define _LINUX_DEVFS_FS_KERNEL_H
3
4#include <linux/fs.h>
5#include <linux/spinlock.h>
6#include <linux/types.h>
7
8#include <asm/semaphore.h>
9
10#define DEVFS_SUPER_MAGIC 0x1373
11
12#ifdef CONFIG_DEVFS_FS
13extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
14 __attribute__ ((format(printf, 3, 4)));
15extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
16 __attribute__ ((format(printf, 3, 4)));
17extern int devfs_mk_symlink(const char *name, const char *link);
18extern int devfs_mk_dir(const char *fmt, ...)
19 __attribute__ ((format(printf, 1, 2)));
20extern void devfs_remove(const char *fmt, ...)
21 __attribute__ ((format(printf, 1, 2)));
22extern int devfs_register_tape(const char *name);
23extern void devfs_unregister_tape(int num);
24extern void mount_devfs_fs(void);
25#else /* CONFIG_DEVFS_FS */
26static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
27{
28 return 0;
29}
30static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
31{
32 return 0;
33}
34static inline int devfs_mk_symlink(const char *name, const char *link)
35{
36 return 0;
37}
38static inline int devfs_mk_dir(const char *fmt, ...)
39{
40 return 0;
41}
42static inline void devfs_remove(const char *fmt, ...)
43{
44}
45static inline int devfs_register_tape(const char *name)
46{
47 return -1;
48}
49static inline void devfs_unregister_tape(int num)
50{
51}
52static inline void mount_devfs_fs(void)
53{
54 return;
55}
56#endif /* CONFIG_DEVFS_FS */
57#endif /* _LINUX_DEVFS_FS_KERNEL_H */
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 78b236ca04f8..272010a6078a 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -20,7 +20,7 @@
20 */ 20 */
21#ifndef DMAENGINE_H 21#ifndef DMAENGINE_H
22#define DMAENGINE_H 22#define DMAENGINE_H
23#include <linux/config.h> 23
24#ifdef CONFIG_DMA_ENGINE 24#ifdef CONFIG_DMA_ENGINE
25 25
26#include <linux/device.h> 26#include <linux/device.h>
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h
index fbfa6b52e2fb..278ef4495819 100644
--- a/include/linux/efs_fs.h
+++ b/include/linux/efs_fs.h
@@ -38,7 +38,7 @@ struct statfs;
38 38
39extern struct inode_operations efs_dir_inode_operations; 39extern struct inode_operations efs_dir_inode_operations;
40extern const struct file_operations efs_dir_operations; 40extern const struct file_operations efs_dir_operations;
41extern struct address_space_operations efs_symlink_aops; 41extern const struct address_space_operations efs_symlink_aops;
42 42
43extern void efs_read_inode(struct inode *); 43extern void efs_read_inode(struct inode *);
44extern efs_block_t efs_map_block(struct inode *, efs_block_t); 44extern efs_block_t efs_map_block(struct inode *, efs_block_t);
diff --git a/include/linux/elf-em.h b/include/linux/elf-em.h
index 114a96d25652..6a5796c81c90 100644
--- a/include/linux/elf-em.h
+++ b/include/linux/elf-em.h
@@ -11,7 +11,12 @@
11#define EM_486 6 /* Perhaps disused */ 11#define EM_486 6 /* Perhaps disused */
12#define EM_860 7 12#define EM_860 7
13#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ 13#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
14 /* Next two are historical and binaries and
15 modules of these types will be rejected by
16 Linux. */
17#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */
14#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ 18#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */
19
15#define EM_PARISC 15 /* HPPA */ 20#define EM_PARISC 15 /* HPPA */
16#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ 21#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
17#define EM_PPC 20 /* PowerPC */ 22#define EM_PPC 20 /* PowerPC */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 07a08e92bc73..b45928f5c63f 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -380,7 +380,6 @@ struct fb_cursor {
380#include <linux/tty.h> 380#include <linux/tty.h>
381#include <linux/device.h> 381#include <linux/device.h>
382#include <linux/workqueue.h> 382#include <linux/workqueue.h>
383#include <linux/devfs_fs_kernel.h>
384#include <linux/notifier.h> 383#include <linux/notifier.h>
385#include <linux/list.h> 384#include <linux/list.h>
386#include <asm/io.h> 385#include <asm/io.h>
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2d8b348c1192..e04a5cfe874f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -392,7 +392,7 @@ struct address_space {
392 unsigned int truncate_count; /* Cover race condition with truncate */ 392 unsigned int truncate_count; /* Cover race condition with truncate */
393 unsigned long nrpages; /* number of total pages */ 393 unsigned long nrpages; /* number of total pages */
394 pgoff_t writeback_index;/* writeback starts here */ 394 pgoff_t writeback_index;/* writeback starts here */
395 struct address_space_operations *a_ops; /* methods */ 395 const struct address_space_operations *a_ops; /* methods */
396 unsigned long flags; /* error bits/gfp mask */ 396 unsigned long flags; /* error bits/gfp mask */
397 struct backing_dev_info *backing_dev_info; /* device readahead, etc */ 397 struct backing_dev_info *backing_dev_info; /* device readahead, etc */
398 spinlock_t private_lock; /* for use by the address_space */ 398 spinlock_t private_lock; /* for use by the address_space */
@@ -1405,7 +1405,7 @@ extern void bd_forget(struct inode *inode);
1405extern void bdput(struct block_device *); 1405extern void bdput(struct block_device *);
1406extern struct block_device *open_by_devnum(dev_t, unsigned); 1406extern struct block_device *open_by_devnum(dev_t, unsigned);
1407extern const struct file_operations def_blk_fops; 1407extern const struct file_operations def_blk_fops;
1408extern struct address_space_operations def_blk_aops; 1408extern const struct address_space_operations def_blk_aops;
1409extern const struct file_operations def_chr_fops; 1409extern const struct file_operations def_chr_fops;
1410extern const struct file_operations bad_sock_fops; 1410extern const struct file_operations bad_sock_fops;
1411extern const struct file_operations def_fifo_fops; 1411extern const struct file_operations def_fifo_fops;
diff --git a/include/linux/futex.h b/include/linux/futex.h
index 966a5b3da439..34c3a215f2cd 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -12,6 +12,9 @@
12#define FUTEX_REQUEUE 3 12#define FUTEX_REQUEUE 3
13#define FUTEX_CMP_REQUEUE 4 13#define FUTEX_CMP_REQUEUE 4
14#define FUTEX_WAKE_OP 5 14#define FUTEX_WAKE_OP 5
15#define FUTEX_LOCK_PI 6
16#define FUTEX_UNLOCK_PI 7
17#define FUTEX_TRYLOCK_PI 8
15 18
16/* 19/*
17 * Support for robust futexes: the kernel cleans up held futexes at 20 * Support for robust futexes: the kernel cleans up held futexes at
@@ -90,18 +93,21 @@ struct robust_list_head {
90 */ 93 */
91#define ROBUST_LIST_LIMIT 2048 94#define ROBUST_LIST_LIMIT 2048
92 95
93long do_futex(unsigned long uaddr, int op, int val, 96long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout,
94 unsigned long timeout, unsigned long uaddr2, int val2, 97 u32 __user *uaddr2, u32 val2, u32 val3);
95 int val3);
96 98
97extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); 99extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr);
98 100
99#ifdef CONFIG_FUTEX 101#ifdef CONFIG_FUTEX
100extern void exit_robust_list(struct task_struct *curr); 102extern void exit_robust_list(struct task_struct *curr);
103extern void exit_pi_state_list(struct task_struct *curr);
101#else 104#else
102static inline void exit_robust_list(struct task_struct *curr) 105static inline void exit_robust_list(struct task_struct *curr)
103{ 106{
104} 107}
108static inline void exit_pi_state_list(struct task_struct *curr)
109{
110}
105#endif 111#endif
106 112
107#define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ 113#define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 3498a0c68184..e4af57e87c17 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -112,8 +112,6 @@ struct gendisk {
112 sector_t capacity; 112 sector_t capacity;
113 113
114 int flags; 114 int flags;
115 char devfs_name[64]; /* devfs crap */
116 int number; /* more of the same */
117 struct device *driverfs_dev; 115 struct device *driverfs_dev;
118 struct kobject kobj; 116 struct kobject kobj;
119 struct kobject *holder_dir; 117 struct kobject *holder_dir;
diff --git a/include/linux/ide.h b/include/linux/ide.h
index ef7bef207f48..285316c836b5 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -552,7 +552,6 @@ typedef struct ide_drive_s {
552 struct hd_driveid *id; /* drive model identification info */ 552 struct hd_driveid *id; /* drive model identification info */
553 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ 553 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
554 struct ide_settings_s *settings;/* /proc/ide/ drive settings */ 554 struct ide_settings_s *settings;/* /proc/ide/ drive settings */
555 char devfs_name[64]; /* devfs crap */
556 555
557 struct hwif_s *hwif; /* actually (ide_hwif_t *) */ 556 struct hwif_s *hwif; /* actually (ide_hwif_t *) */
558 557
@@ -793,6 +792,7 @@ typedef struct hwif_s {
793 unsigned auto_poll : 1; /* supports nop auto-poll */ 792 unsigned auto_poll : 1; /* supports nop auto-poll */
794 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ 793 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */
795 unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ 794 unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */
795 unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */
796 796
797 struct device gendev; 797 struct device gendev;
798 struct completion gendev_rel_comp; /* To deal with device release() */ 798 struct completion gendev_rel_comp; /* To deal with device release() */
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index e127ef7e8da8..3a256957fb56 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -87,6 +87,7 @@ extern struct group_info init_groups;
87 .lock_depth = -1, \ 87 .lock_depth = -1, \
88 .prio = MAX_PRIO-20, \ 88 .prio = MAX_PRIO-20, \
89 .static_prio = MAX_PRIO-20, \ 89 .static_prio = MAX_PRIO-20, \
90 .normal_prio = MAX_PRIO-20, \
90 .policy = SCHED_NORMAL, \ 91 .policy = SCHED_NORMAL, \
91 .cpus_allowed = CPU_MASK_ALL, \ 92 .cpus_allowed = CPU_MASK_ALL, \
92 .mm = NULL, \ 93 .mm = NULL, \
@@ -122,6 +123,8 @@ extern struct group_info init_groups;
122 .journal_info = NULL, \ 123 .journal_info = NULL, \
123 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ 124 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \
124 .fs_excl = ATOMIC_INIT(0), \ 125 .fs_excl = ATOMIC_INIT(0), \
126 .pi_lock = SPIN_LOCK_UNLOCKED, \
127 INIT_RT_MUTEXES(tsk) \
125} 128}
126 129
127 130
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 70741e170114..db2a63a11633 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -36,6 +36,20 @@ extern void free_irq(unsigned int, void *);
36extern void disable_irq_nosync(unsigned int irq); 36extern void disable_irq_nosync(unsigned int irq);
37extern void disable_irq(unsigned int irq); 37extern void disable_irq(unsigned int irq);
38extern void enable_irq(unsigned int irq); 38extern void enable_irq(unsigned int irq);
39
40/* IRQ wakeup (PM) control: */
41extern int set_irq_wake(unsigned int irq, unsigned int on);
42
43static inline int enable_irq_wake(unsigned int irq)
44{
45 return set_irq_wake(irq, 1);
46}
47
48static inline int disable_irq_wake(unsigned int irq)
49{
50 return set_irq_wake(irq, 0);
51}
52
39#endif 53#endif
40 54
41#ifndef __ARCH_SET_SOFTIRQ_PENDING 55#ifndef __ARCH_SET_SOFTIRQ_PENDING
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index cd6bd001ba4e..87a9fc039b47 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -9,13 +9,15 @@
9#define _LINUX_IOPORT_H 9#define _LINUX_IOPORT_H
10 10
11#include <linux/compiler.h> 11#include <linux/compiler.h>
12#include <linux/types.h>
12/* 13/*
13 * Resources are tree-like, allowing 14 * Resources are tree-like, allowing
14 * nesting etc.. 15 * nesting etc..
15 */ 16 */
16struct resource { 17struct resource {
18 resource_size_t start;
19 resource_size_t end;
17 const char *name; 20 const char *name;
18 unsigned long start, end;
19 unsigned long flags; 21 unsigned long flags;
20 struct resource *parent, *sibling, *child; 22 struct resource *parent, *sibling, *child;
21}; 23};
@@ -96,31 +98,37 @@ extern struct resource * ____request_resource(struct resource *root, struct reso
96extern int release_resource(struct resource *new); 98extern int release_resource(struct resource *new);
97extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); 99extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new);
98extern int allocate_resource(struct resource *root, struct resource *new, 100extern int allocate_resource(struct resource *root, struct resource *new,
99 unsigned long size, 101 resource_size_t size, resource_size_t min,
100 unsigned long min, unsigned long max, 102 resource_size_t max, resource_size_t align,
101 unsigned long align,
102 void (*alignf)(void *, struct resource *, 103 void (*alignf)(void *, struct resource *,
103 unsigned long, unsigned long), 104 resource_size_t, resource_size_t),
104 void *alignf_data); 105 void *alignf_data);
105int adjust_resource(struct resource *res, unsigned long start, 106int adjust_resource(struct resource *res, resource_size_t start,
106 unsigned long size); 107 resource_size_t size);
108
109/* get registered SYSTEM_RAM resources in specified area */
110extern int find_next_system_ram(struct resource *res);
107 111
108/* Convenience shorthand with allocation */ 112/* Convenience shorthand with allocation */
109#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) 113#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name))
110#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) 114#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
111#define rename_region(region, newname) do { (region)->name = (newname); } while (0) 115#define rename_region(region, newname) do { (region)->name = (newname); } while (0)
112 116
113extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name); 117extern struct resource * __request_region(struct resource *,
118 resource_size_t start,
119 resource_size_t n, const char *name);
114 120
115/* Compatibility cruft */ 121/* Compatibility cruft */
116#define release_region(start,n) __release_region(&ioport_resource, (start), (n)) 122#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
117#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) 123#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
118#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) 124#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
119 125
120extern int __check_region(struct resource *, unsigned long, unsigned long); 126extern int __check_region(struct resource *, resource_size_t, resource_size_t);
121extern void __release_region(struct resource *, unsigned long, unsigned long); 127extern void __release_region(struct resource *, resource_size_t,
128 resource_size_t);
122 129
123static inline int __deprecated check_region(unsigned long s, unsigned long n) 130static inline int __deprecated check_region(resource_size_t s,
131 resource_size_t n)
124{ 132{
125 return __check_region(&ioport_resource, s, n); 133 return __check_region(&ioport_resource, s, n);
126} 134}
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index 5653b2f23b6a..d09fbeabf1dc 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -210,11 +210,7 @@ struct kernel_ipmi_msg
210#include <linux/list.h> 210#include <linux/list.h>
211#include <linux/module.h> 211#include <linux/module.h>
212#include <linux/device.h> 212#include <linux/device.h>
213
214#ifdef CONFIG_PROC_FS
215#include <linux/proc_fs.h> 213#include <linux/proc_fs.h>
216extern struct proc_dir_entry *proc_ipmi_root;
217#endif /* CONFIG_PROC_FS */
218 214
219/* Opaque type for a IPMI message user. One of these is needed to 215/* Opaque type for a IPMI message user. One of these is needed to
220 send and receive messages. */ 216 send and receive messages. */
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 676e00dfb21a..0832149cdb18 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -1,5 +1,5 @@
1#ifndef __irq_h 1#ifndef _LINUX_IRQ_H
2#define __irq_h 2#define _LINUX_IRQ_H
3 3
4/* 4/*
5 * Please do not include this file in generic code. There is currently 5 * Please do not include this file in generic code. There is currently
@@ -11,7 +11,7 @@
11 11
12#include <linux/smp.h> 12#include <linux/smp.h>
13 13
14#if !defined(CONFIG_S390) 14#ifndef CONFIG_S390
15 15
16#include <linux/linkage.h> 16#include <linux/linkage.h>
17#include <linux/cache.h> 17#include <linux/cache.h>
@@ -33,75 +33,160 @@
33#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ 33#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */
34#define IRQ_LEVEL 64 /* IRQ level triggered */ 34#define IRQ_LEVEL 64 /* IRQ level triggered */
35#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ 35#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */
36#if defined(ARCH_HAS_IRQ_PER_CPU) 36#ifdef CONFIG_IRQ_PER_CPU
37# define IRQ_PER_CPU 256 /* IRQ is per CPU */ 37# define IRQ_PER_CPU 256 /* IRQ is per CPU */
38# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) 38# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
39#else 39#else
40# define CHECK_IRQ_PER_CPU(var) 0 40# define CHECK_IRQ_PER_CPU(var) 0
41#endif 41#endif
42 42
43#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */
44#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */
45#define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */
46#define IRQ_DELAYED_DISABLE \
47 4096 /* IRQ disable (masking) happens delayed. */
48
43/* 49/*
44 * Interrupt controller descriptor. This is all we need 50 * IRQ types, see also include/linux/interrupt.h
45 * to describe about the low-level hardware.
46 */ 51 */
47struct hw_interrupt_type { 52#define IRQ_TYPE_NONE 0x0000 /* Default, unspecified type */
48 const char * typename; 53#define IRQ_TYPE_EDGE_RISING 0x0001 /* Edge rising type */
49 unsigned int (*startup)(unsigned int irq); 54#define IRQ_TYPE_EDGE_FALLING 0x0002 /* Edge falling type */
50 void (*shutdown)(unsigned int irq); 55#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
51 void (*enable)(unsigned int irq); 56#define IRQ_TYPE_LEVEL_HIGH 0x0004 /* Level high type */
52 void (*disable)(unsigned int irq); 57#define IRQ_TYPE_LEVEL_LOW 0x0008 /* Level low type */
53 void (*ack)(unsigned int irq); 58#define IRQ_TYPE_SENSE_MASK 0x000f /* Mask of the above */
54 void (*end)(unsigned int irq); 59#define IRQ_TYPE_SIMPLE 0x0010 /* Simple type */
55 void (*set_affinity)(unsigned int irq, cpumask_t dest); 60#define IRQ_TYPE_PERCPU 0x0020 /* Per CPU type */
61#define IRQ_TYPE_PROBE 0x0040 /* Probing in progress */
62
63struct proc_dir_entry;
64
65/**
66 * struct irq_chip - hardware interrupt chip descriptor
67 *
68 * @name: name for /proc/interrupts
69 * @startup: start up the interrupt (defaults to ->enable if NULL)
70 * @shutdown: shut down the interrupt (defaults to ->disable if NULL)
71 * @enable: enable the interrupt (defaults to chip->unmask if NULL)
72 * @disable: disable the interrupt (defaults to chip->mask if NULL)
73 * @ack: start of a new interrupt
74 * @mask: mask an interrupt source
75 * @mask_ack: ack and mask an interrupt source
76 * @unmask: unmask an interrupt source
77 * @eoi: end of interrupt - chip level
78 * @end: end of interrupt - flow level
79 * @set_affinity: set the CPU affinity on SMP machines
80 * @retrigger: resend an IRQ to the CPU
81 * @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ
82 * @set_wake: enable/disable power-management wake-on of an IRQ
83 *
84 * @release: release function solely used by UML
85 * @typename: obsoleted by name, kept as migration helper
86 */
87struct irq_chip {
88 const char *name;
89 unsigned int (*startup)(unsigned int irq);
90 void (*shutdown)(unsigned int irq);
91 void (*enable)(unsigned int irq);
92 void (*disable)(unsigned int irq);
93
94 void (*ack)(unsigned int irq);
95 void (*mask)(unsigned int irq);
96 void (*mask_ack)(unsigned int irq);
97 void (*unmask)(unsigned int irq);
98 void (*eoi)(unsigned int irq);
99
100 void (*end)(unsigned int irq);
101 void (*set_affinity)(unsigned int irq, cpumask_t dest);
102 int (*retrigger)(unsigned int irq);
103 int (*set_type)(unsigned int irq, unsigned int flow_type);
104 int (*set_wake)(unsigned int irq, unsigned int on);
105
56 /* Currently used only by UML, might disappear one day.*/ 106 /* Currently used only by UML, might disappear one day.*/
57#ifdef CONFIG_IRQ_RELEASE_METHOD 107#ifdef CONFIG_IRQ_RELEASE_METHOD
58 void (*release)(unsigned int irq, void *dev_id); 108 void (*release)(unsigned int irq, void *dev_id);
59#endif 109#endif
110 /*
111 * For compatibility, ->typename is copied into ->name.
112 * Will disappear.
113 */
114 const char *typename;
60}; 115};
61 116
62typedef struct hw_interrupt_type hw_irq_controller; 117/**
63 118 * struct irq_desc - interrupt descriptor
64/* 119 *
65 * This is the "IRQ descriptor", which contains various information 120 * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()]
66 * about the irq, including what kind of hardware handling it has, 121 * @chip: low level interrupt hardware access
67 * whether it is disabled etc etc. 122 * @handler_data: per-IRQ data for the irq_chip methods
123 * @chip_data: platform-specific per-chip private data for the chip
124 * methods, to allow shared chip implementations
125 * @action: the irq action chain
126 * @status: status information
127 * @depth: disable-depth, for nested irq_disable() calls
128 * @irq_count: stats field to detect stalled irqs
129 * @irqs_unhandled: stats field for spurious unhandled interrupts
130 * @lock: locking for SMP
131 * @affinity: IRQ affinity on SMP
132 * @cpu: cpu index useful for balancing
133 * @pending_mask: pending rebalanced interrupts
134 * @move_irq: need to re-target IRQ destination
135 * @dir: /proc/irq/ procfs entry
136 * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP
68 * 137 *
69 * Pad this out to 32 bytes for cache and indexing reasons. 138 * Pad this out to 32 bytes for cache and indexing reasons.
70 */ 139 */
71typedef struct irq_desc { 140struct irq_desc {
72 hw_irq_controller *handler; 141 void fastcall (*handle_irq)(unsigned int irq,
73 void *handler_data; 142 struct irq_desc *desc,
74 struct irqaction *action; /* IRQ action list */ 143 struct pt_regs *regs);
75 unsigned int status; /* IRQ status */ 144 struct irq_chip *chip;
76 unsigned int depth; /* nested irq disables */ 145 void *handler_data;
77 unsigned int irq_count; /* For detecting broken interrupts */ 146 void *chip_data;
78 unsigned int irqs_unhandled; 147 struct irqaction *action; /* IRQ action list */
79 spinlock_t lock; 148 unsigned int status; /* IRQ status */
80#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) 149
81 unsigned int move_irq; /* Flag need to re-target intr dest*/ 150 unsigned int depth; /* nested irq disables */
151 unsigned int irq_count; /* For detecting broken IRQs */
152 unsigned int irqs_unhandled;
153 spinlock_t lock;
154#ifdef CONFIG_SMP
155 cpumask_t affinity;
156 unsigned int cpu;
157#endif
158#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
159 cpumask_t pending_mask;
160 unsigned int move_irq; /* need to re-target IRQ dest */
82#endif 161#endif
83} ____cacheline_aligned irq_desc_t; 162#ifdef CONFIG_PROC_FS
163 struct proc_dir_entry *dir;
164#endif
165} ____cacheline_aligned;
84 166
85extern irq_desc_t irq_desc [NR_IRQS]; 167extern struct irq_desc irq_desc[NR_IRQS];
86 168
87/* Return a pointer to the irq descriptor for IRQ. */ 169/*
88static inline irq_desc_t * 170 * Migration helpers for obsolete names, they will go away:
89irq_descp (int irq) 171 */
90{ 172#define hw_interrupt_type irq_chip
91 return irq_desc + irq; 173typedef struct irq_chip hw_irq_controller;
92} 174#define no_irq_type no_irq_chip
175typedef struct irq_desc irq_desc_t;
93 176
94#include <asm/hw_irq.h> /* the arch dependent stuff */ 177/*
178 * Pick up the arch-dependent methods:
179 */
180#include <asm/hw_irq.h>
95 181
96extern int setup_irq(unsigned int irq, struct irqaction * new); 182extern int setup_irq(unsigned int irq, struct irqaction *new);
97 183
98#ifdef CONFIG_GENERIC_HARDIRQS 184#ifdef CONFIG_GENERIC_HARDIRQS
99extern cpumask_t irq_affinity[NR_IRQS];
100 185
101#ifdef CONFIG_SMP 186#ifdef CONFIG_SMP
102static inline void set_native_irq_info(int irq, cpumask_t mask) 187static inline void set_native_irq_info(int irq, cpumask_t mask)
103{ 188{
104 irq_affinity[irq] = mask; 189 irq_desc[irq].affinity = mask;
105} 190}
106#else 191#else
107static inline void set_native_irq_info(int irq, cpumask_t mask) 192static inline void set_native_irq_info(int irq, cpumask_t mask)
@@ -111,8 +196,7 @@ static inline void set_native_irq_info(int irq, cpumask_t mask)
111 196
112#ifdef CONFIG_SMP 197#ifdef CONFIG_SMP
113 198
114#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) 199#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
115extern cpumask_t pending_irq_cpumask[NR_IRQS];
116 200
117void set_pending_irq(unsigned int irq, cpumask_t mask); 201void set_pending_irq(unsigned int irq, cpumask_t mask);
118void move_native_irq(int irq); 202void move_native_irq(int irq);
@@ -133,7 +217,7 @@ static inline void set_irq_info(int irq, cpumask_t mask)
133{ 217{
134} 218}
135 219
136#else // CONFIG_PCI_MSI 220#else /* CONFIG_PCI_MSI */
137 221
138static inline void move_irq(int irq) 222static inline void move_irq(int irq)
139{ 223{
@@ -144,26 +228,36 @@ static inline void set_irq_info(int irq, cpumask_t mask)
144{ 228{
145 set_native_irq_info(irq, mask); 229 set_native_irq_info(irq, mask);
146} 230}
147#endif // CONFIG_PCI_MSI
148 231
149#else // CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE 232#endif /* CONFIG_PCI_MSI */
233
234#else /* CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE */
235
236static inline void move_irq(int irq)
237{
238}
239
240static inline void move_native_irq(int irq)
241{
242}
243
244static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
245{
246}
150 247
151#define move_irq(x)
152#define move_native_irq(x)
153#define set_pending_irq(x,y)
154static inline void set_irq_info(int irq, cpumask_t mask) 248static inline void set_irq_info(int irq, cpumask_t mask)
155{ 249{
156 set_native_irq_info(irq, mask); 250 set_native_irq_info(irq, mask);
157} 251}
158 252
159#endif // CONFIG_GENERIC_PENDING_IRQ 253#endif /* CONFIG_GENERIC_PENDING_IRQ */
160 254
161#else // CONFIG_SMP 255#else /* CONFIG_SMP */
162 256
163#define move_irq(x) 257#define move_irq(x)
164#define move_native_irq(x) 258#define move_native_irq(x)
165 259
166#endif // CONFIG_SMP 260#endif /* CONFIG_SMP */
167 261
168#ifdef CONFIG_IRQBALANCE 262#ifdef CONFIG_IRQBALANCE
169extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask); 263extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask);
@@ -173,32 +267,138 @@ static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask)
173} 267}
174#endif 268#endif
175 269
270#ifdef CONFIG_AUTO_IRQ_AFFINITY
271extern int select_smp_affinity(unsigned int irq);
272#else
273static inline int select_smp_affinity(unsigned int irq)
274{
275 return 1;
276}
277#endif
278
176extern int no_irq_affinity; 279extern int no_irq_affinity;
177extern int noirqdebug_setup(char *str);
178 280
179extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, 281/* Handle irq action chains: */
180 struct irqaction *action); 282extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
283 struct irqaction *action);
284
285/*
286 * Built-in IRQ handlers for various IRQ types,
287 * callable via desc->chip->handle_irq()
288 */
289extern void fastcall
290handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
291extern void fastcall
292handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc,
293 struct pt_regs *regs);
294extern void fastcall
295handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
296extern void fastcall
297handle_simple_irq(unsigned int irq, struct irq_desc *desc,
298 struct pt_regs *regs);
299extern void fastcall
300handle_percpu_irq(unsigned int irq, struct irq_desc *desc,
301 struct pt_regs *regs);
302extern void fastcall
303handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
304
305/*
306 * Get a descriptive string for the highlevel handler, for
307 * /proc/interrupts output:
308 */
309extern const char *
310handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *,
311 struct pt_regs *));
312
313/*
314 * Monolithic do_IRQ implementation.
315 * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly)
316 */
181extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); 317extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
182extern void note_interrupt(unsigned int irq, irq_desc_t *desc,
183 int action_ret, struct pt_regs *regs);
184extern int can_request_irq(unsigned int irq, unsigned long irqflags);
185 318
319/*
320 * Architectures call this to let the generic IRQ layer
321 * handle an interrupt. If the descriptor is attached to an
322 * irqchip-style controller then we call the ->handle_irq() handler,
323 * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
324 */
325static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs)
326{
327 struct irq_desc *desc = irq_desc + irq;
328
329 if (likely(desc->handle_irq))
330 desc->handle_irq(irq, desc, regs);
331 else
332 __do_IRQ(irq, regs);
333}
334
335/* Handling of unhandled and spurious interrupts: */
336extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
337 int action_ret, struct pt_regs *regs);
338
339/* Resending of interrupts :*/
340void check_irq_resend(struct irq_desc *desc, unsigned int irq);
341
342/* Initialize /proc/irq/ */
186extern void init_irq_proc(void); 343extern void init_irq_proc(void);
187 344
188#ifdef CONFIG_AUTO_IRQ_AFFINITY 345/* Enable/disable irq debugging output: */
189extern int select_smp_affinity(unsigned int irq); 346extern int noirqdebug_setup(char *str);
190#else 347
191static inline int 348/* Checks whether the interrupt can be requested by request_irq(): */
192select_smp_affinity(unsigned int irq) 349extern int can_request_irq(unsigned int irq, unsigned long irqflags);
350
351/* Dummy irq-chip implementation: */
352extern struct irq_chip no_irq_chip;
353
354extern void
355set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
356 void fastcall (*handle)(unsigned int,
357 struct irq_desc *,
358 struct pt_regs *));
359extern void
360__set_irq_handler(unsigned int irq,
361 void fastcall (*handle)(unsigned int, struct irq_desc *,
362 struct pt_regs *),
363 int is_chained);
364
365/*
366 * Set a highlevel flow handler for a given IRQ:
367 */
368static inline void
369set_irq_handler(unsigned int irq,
370 void fastcall (*handle)(unsigned int, struct irq_desc *,
371 struct pt_regs *))
193{ 372{
194 return 1; 373 __set_irq_handler(irq, handle, 0);
195} 374}
196#endif
197 375
198#endif 376/*
377 * Set a highlevel chained flow handler for a given IRQ.
378 * (a chained handler is automatically enabled and set to
379 * IRQ_NOREQUEST and IRQ_NOPROBE)
380 */
381static inline void
382set_irq_chained_handler(unsigned int irq,
383 void fastcall (*handle)(unsigned int, struct irq_desc *,
384 struct pt_regs *))
385{
386 __set_irq_handler(irq, handle, 1);
387}
199 388
200extern hw_irq_controller no_irq_type; /* needed in every arch ? */ 389/* Set/get chip/data for an IRQ: */
201 390
202#endif 391extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
392extern int set_irq_data(unsigned int irq, void *data);
393extern int set_irq_chip_data(unsigned int irq, void *data);
394extern int set_irq_type(unsigned int irq, unsigned int type);
395
396#define get_irq_chip(irq) (irq_desc[irq].chip)
397#define get_irq_chip_data(irq) (irq_desc[irq].chip_data)
398#define get_irq_data(irq) (irq_desc[irq].handler_data)
399
400#endif /* CONFIG_GENERIC_HARDIRQS */
401
402#endif /* !CONFIG_S390 */
203 403
204#endif /* __irq_h */ 404#endif /* _LINUX_IRQ_H */
diff --git a/include/linux/isdn/tpam.h b/include/linux/isdn/tpam.h
deleted file mode 100644
index d18dd0dc570d..000000000000
--- a/include/linux/isdn/tpam.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/* $Id: tpam.h,v 1.1.2.1 2001/06/08 08:23:46 kai Exp $
2 *
3 * Turbo PAM ISDN driver for Linux. (Kernel Driver)
4 *
5 * Copyright 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve
6 *
7 * For all support questions please contact: <support@auvertech.fr>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24
25#ifndef _TPAM_H_
26#define _TPAM_H_
27
28#include <linux/types.h>
29
30/* IOCTL commands */
31#define TPAM_CMD_DSPLOAD 0x0001
32#define TPAM_CMD_DSPSAVE 0x0002
33#define TPAM_CMD_DSPRUN 0x0003
34#define TPAM_CMD_LOOPMODEON 0x0004
35#define TPAM_CMD_LOOPMODEOFF 0x0005
36
37/* addresses of debug information zones on board */
38#define TPAM_TRAPAUDIT_REGISTER 0x005493e4
39#define TPAM_NCOAUDIT_REGISTER 0x00500000
40#define TPAM_MSGAUDIT_REGISTER 0x008E30F0
41
42/* length of debug information zones on board */
43#define TPAM_TRAPAUDIT_LENGTH 10000
44#define TPAM_NCOAUDIT_LENGTH 300000
45#define TPAM_NCOAUDIT_COUNT 30
46#define TPAM_MSGAUDIT_LENGTH 60000
47
48/* IOCTL load/save parameter */
49typedef struct tpam_dsp_ioctl {
50 __u32 address; /* address to load/save data */
51 __u32 data_len; /* size of data to be loaded/saved */
52 __u8 data[0]; /* data */
53} tpam_dsp_ioctl;
54
55#endif /* _TPAM_H_ */
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h
index c6f70660b371..c9c760700bc3 100644
--- a/include/linux/jffs2.h
+++ b/include/linux/jffs2.h
@@ -186,6 +186,7 @@ struct jffs2_raw_xref
186 jint32_t hdr_crc; 186 jint32_t hdr_crc;
187 jint32_t ino; /* inode number */ 187 jint32_t ino; /* inode number */
188 jint32_t xid; /* XATTR identifier number */ 188 jint32_t xid; /* XATTR identifier number */
189 jint32_t xseqno; /* xref sequencial number */
189 jint32_t node_crc; 190 jint32_t node_crc;
190} __attribute__((packed)); 191} __attribute__((packed));
191 192
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h
index 4eb851ece080..efe0ee4cc80b 100644
--- a/include/linux/kbd_kern.h
+++ b/include/linux/kbd_kern.h
@@ -155,10 +155,8 @@ static inline void con_schedule_flip(struct tty_struct *t)
155{ 155{
156 unsigned long flags; 156 unsigned long flags;
157 spin_lock_irqsave(&t->buf.lock, flags); 157 spin_lock_irqsave(&t->buf.lock, flags);
158 if (t->buf.tail != NULL) { 158 if (t->buf.tail != NULL)
159 t->buf.tail->active = 0;
160 t->buf.tail->commit = t->buf.tail->used; 159 t->buf.tail->commit = t->buf.tail->used;
161 }
162 spin_unlock_irqrestore(&t->buf.lock, flags); 160 spin_unlock_irqrestore(&t->buf.lock, flags);
163 schedule_work(&t->buf.work); 161 schedule_work(&t->buf.work);
164} 162}
diff --git a/include/linux/key.h b/include/linux/key.h
index e693e729bc92..169f05e4863e 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -177,7 +177,8 @@ struct key {
177/* 177/*
178 * kernel managed key type definition 178 * kernel managed key type definition
179 */ 179 */
180typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op); 180typedef int (*request_key_actor_t)(struct key *key, struct key *authkey,
181 const char *op, void *aux);
181 182
182struct key_type { 183struct key_type {
183 /* name of the type */ 184 /* name of the type */
@@ -285,6 +286,11 @@ extern struct key *request_key(struct key_type *type,
285 const char *description, 286 const char *description,
286 const char *callout_info); 287 const char *callout_info);
287 288
289extern struct key *request_key_with_auxdata(struct key_type *type,
290 const char *description,
291 const char *callout_info,
292 void *aux);
293
288extern int key_validate(struct key *key); 294extern int key_validate(struct key *key);
289 295
290extern key_ref_t key_create_or_update(key_ref_t keyring, 296extern key_ref_t key_create_or_update(key_ref_t keyring,
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 20b1cf527c60..f4284bf89758 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -30,6 +30,7 @@
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/pci.h> 31#include <linux/pci.h>
32#include <linux/dma-mapping.h> 32#include <linux/dma-mapping.h>
33#include <asm/scatterlist.h>
33#include <asm/io.h> 34#include <asm/io.h>
34#include <linux/ata.h> 35#include <linux/ata.h>
35#include <linux/workqueue.h> 36#include <linux/workqueue.h>
@@ -887,6 +888,9 @@ static inline unsigned int ata_tag_internal(unsigned int tag)
887 return tag == ATA_MAX_QUEUE - 1; 888 return tag == ATA_MAX_QUEUE - 1;
888} 889}
889 890
891/*
892 * device helpers
893 */
890static inline unsigned int ata_class_enabled(unsigned int class) 894static inline unsigned int ata_class_enabled(unsigned int class)
891{ 895{
892 return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; 896 return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI;
@@ -917,6 +921,17 @@ static inline unsigned int ata_dev_absent(const struct ata_device *dev)
917 return ata_class_absent(dev->class); 921 return ata_class_absent(dev->class);
918} 922}
919 923
924/*
925 * port helpers
926 */
927static inline int ata_port_max_devices(const struct ata_port *ap)
928{
929 if (ap->flags & ATA_FLAG_SLAVE_POSS)
930 return 2;
931 return 1;
932}
933
934
920static inline u8 ata_chk_status(struct ata_port *ap) 935static inline u8 ata_chk_status(struct ata_port *ap)
921{ 936{
922 return ap->ops->check_status(ap); 937 return ap->ops->check_status(ap);
diff --git a/include/linux/list.h b/include/linux/list.h
index 37ca31b21bb7..6b74adf5297f 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -4,18 +4,11 @@
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <linux/stddef.h> 6#include <linux/stddef.h>
7#include <linux/poison.h>
7#include <linux/prefetch.h> 8#include <linux/prefetch.h>
8#include <asm/system.h> 9#include <asm/system.h>
9 10
10/* 11/*
11 * These are non-NULL pointers that will result in page faults
12 * under normal circumstances, used to verify that nobody uses
13 * non-initialized list entries.
14 */
15#define LIST_POISON1 ((void *) 0x00100100)
16#define LIST_POISON2 ((void *) 0x00200200)
17
18/*
19 * Simple doubly linked list implementation. 12 * Simple doubly linked list implementation.
20 * 13 *
21 * Some of the internal functions ("__xxx") are useful when 14 * Some of the internal functions ("__xxx") are useful when
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 911206386171..218501cfaeb9 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -63,6 +63,76 @@ extern int online_pages(unsigned long, unsigned long);
63/* reasonably generic interface to expand the physical pages in a zone */ 63/* reasonably generic interface to expand the physical pages in a zone */
64extern int __add_pages(struct zone *zone, unsigned long start_pfn, 64extern int __add_pages(struct zone *zone, unsigned long start_pfn,
65 unsigned long nr_pages); 65 unsigned long nr_pages);
66
67#ifdef CONFIG_NUMA
68extern int memory_add_physaddr_to_nid(u64 start);
69#else
70static inline int memory_add_physaddr_to_nid(u64 start)
71{
72 return 0;
73}
74#endif
75
76#ifdef CONFIG_HAVE_ARCH_NODEDATA_EXTENSION
77/*
78 * For supporting node-hotadd, we have to allocate a new pgdat.
79 *
80 * If an arch has generic style NODE_DATA(),
81 * node_data[nid] = kzalloc() works well. But it depends on the architecture.
82 *
83 * In general, generic_alloc_nodedata() is used.
84 * Now, arch_free_nodedata() is just defined for error path of node_hot_add.
85 *
86 */
87extern pg_data_t *arch_alloc_nodedata(int nid);
88extern void arch_free_nodedata(pg_data_t *pgdat);
89extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat);
90
91#else /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
92
93#define arch_alloc_nodedata(nid) generic_alloc_nodedata(nid)
94#define arch_free_nodedata(pgdat) generic_free_nodedata(pgdat)
95
96#ifdef CONFIG_NUMA
97/*
98 * If ARCH_HAS_NODEDATA_EXTENSION=n, this func is used to allocate pgdat.
99 * XXX: kmalloc_node() can't work well to get new node's memory at this time.
100 * Because, pgdat for the new node is not allocated/initialized yet itself.
101 * To use new node's memory, more consideration will be necessary.
102 */
103#define generic_alloc_nodedata(nid) \
104({ \
105 kzalloc(sizeof(pg_data_t), GFP_KERNEL); \
106})
107/*
108 * This definition is just for error path in node hotadd.
109 * For node hotremove, we have to replace this.
110 */
111#define generic_free_nodedata(pgdat) kfree(pgdat)
112
113extern pg_data_t *node_data[];
114static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
115{
116 node_data[nid] = pgdat;
117}
118
119#else /* !CONFIG_NUMA */
120
121/* never called */
122static inline pg_data_t *generic_alloc_nodedata(int nid)
123{
124 BUG();
125 return NULL;
126}
127static inline void generic_free_nodedata(pg_data_t *pgdat)
128{
129}
130static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
131{
132}
133#endif /* CONFIG_NUMA */
134#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
135
66#else /* ! CONFIG_MEMORY_HOTPLUG */ 136#else /* ! CONFIG_MEMORY_HOTPLUG */
67/* 137/*
68 * Stub functions for when hotplug is off 138 * Stub functions for when hotplug is off
@@ -99,7 +169,8 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn,
99 return -ENOSYS; 169 return -ENOSYS;
100} 170}
101 171
102extern int add_memory(u64 start, u64 size); 172extern int add_memory(int nid, u64 start, u64 size);
173extern int arch_add_memory(int nid, u64 start, u64 size);
103extern int remove_memory(u64 start, u64 size); 174extern int remove_memory(u64 start, u64 size);
104 175
105#endif /* __LINUX_MEMORY_HOTPLUG_H */ 176#endif /* __LINUX_MEMORY_HOTPLUG_H */
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 5b584dafb5a6..b03cfb91e228 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -40,7 +40,6 @@ struct miscdevice {
40 struct list_head list; 40 struct list_head list;
41 struct device *dev; 41 struct device *dev;
42 struct class_device *class; 42 struct class_device *class;
43 char devfs_name[64];
44}; 43};
45 44
46extern int misc_register(struct miscdevice * misc); 45extern int misc_register(struct miscdevice * misc);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a929ea197e48..c41a1299b8cf 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1030,13 +1030,20 @@ static inline void vm_stat_account(struct mm_struct *mm,
1030} 1030}
1031#endif /* CONFIG_PROC_FS */ 1031#endif /* CONFIG_PROC_FS */
1032 1032
1033static inline void
1034debug_check_no_locks_freed(const void *from, unsigned long len)
1035{
1036 mutex_debug_check_no_locks_freed(from, len);
1037 rt_mutex_debug_check_no_locks_freed(from, len);
1038}
1039
1033#ifndef CONFIG_DEBUG_PAGEALLOC 1040#ifndef CONFIG_DEBUG_PAGEALLOC
1034static inline void 1041static inline void
1035kernel_map_pages(struct page *page, int numpages, int enable) 1042kernel_map_pages(struct page *page, int numpages, int enable)
1036{ 1043{
1037 if (!PageHighMem(page) && !enable) 1044 if (!PageHighMem(page) && !enable)
1038 mutex_debug_check_no_locks_freed(page_address(page), 1045 debug_check_no_locks_freed(page_address(page),
1039 numpages * PAGE_SIZE); 1046 numpages * PAGE_SIZE);
1040} 1047}
1041#endif 1048#endif
1042 1049
@@ -1065,5 +1072,7 @@ void drop_slab(void);
1065extern int randomize_va_space; 1072extern int randomize_va_space;
1066#endif 1073#endif
1067 1074
1075const char *arch_vma_name(struct vm_area_struct *vma);
1076
1068#endif /* __KERNEL__ */ 1077#endif /* __KERNEL__ */
1069#endif /* _LINUX_MM_H */ 1078#endif /* _LINUX_MM_H */
diff --git a/include/linux/module.h b/include/linux/module.h
index 9ebbb74b7b72..9e9dc7c24d95 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -203,6 +203,15 @@ void *__symbol_get_gpl(const char *symbol);
203#define EXPORT_SYMBOL_GPL_FUTURE(sym) \ 203#define EXPORT_SYMBOL_GPL_FUTURE(sym) \
204 __EXPORT_SYMBOL(sym, "_gpl_future") 204 __EXPORT_SYMBOL(sym, "_gpl_future")
205 205
206
207#ifdef CONFIG_UNUSED_SYMBOLS
208#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
209#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
210#else
211#define EXPORT_UNUSED_SYMBOL(sym)
212#define EXPORT_UNUSED_SYMBOL_GPL(sym)
213#endif
214
206#endif 215#endif
207 216
208struct module_ref 217struct module_ref
@@ -261,6 +270,15 @@ struct module
261 unsigned int num_gpl_syms; 270 unsigned int num_gpl_syms;
262 const unsigned long *gpl_crcs; 271 const unsigned long *gpl_crcs;
263 272
273 /* unused exported symbols. */
274 const struct kernel_symbol *unused_syms;
275 unsigned int num_unused_syms;
276 const unsigned long *unused_crcs;
277 /* GPL-only, unused exported symbols. */
278 const struct kernel_symbol *unused_gpl_syms;
279 unsigned int num_unused_gpl_syms;
280 const unsigned long *unused_gpl_crcs;
281
264 /* symbols that will be GPL-only in the near future. */ 282 /* symbols that will be GPL-only in the near future. */
265 const struct kernel_symbol *gpl_future_syms; 283 const struct kernel_symbol *gpl_future_syms;
266 unsigned int num_gpl_future_syms; 284 unsigned int num_gpl_future_syms;
@@ -456,6 +474,8 @@ void module_remove_driver(struct device_driver *);
456#define EXPORT_SYMBOL(sym) 474#define EXPORT_SYMBOL(sym)
457#define EXPORT_SYMBOL_GPL(sym) 475#define EXPORT_SYMBOL_GPL(sym)
458#define EXPORT_SYMBOL_GPL_FUTURE(sym) 476#define EXPORT_SYMBOL_GPL_FUTURE(sym)
477#define EXPORT_UNUSED_SYMBOL(sym)
478#define EXPORT_UNUSED_SYMBOL_GPL(sym)
459 479
460/* Given an address, look for it in the exception tables. */ 480/* Given an address, look for it in the exception tables. */
461static inline const struct exception_table_entry * 481static inline const struct exception_table_entry *
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 0a1740b2532e..d90b1bb37563 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -335,7 +335,7 @@ extern struct inode_operations nfs_file_inode_operations;
335extern struct inode_operations nfs3_file_inode_operations; 335extern struct inode_operations nfs3_file_inode_operations;
336#endif /* CONFIG_NFS_V3 */ 336#endif /* CONFIG_NFS_V3 */
337extern const struct file_operations nfs_file_operations; 337extern const struct file_operations nfs_file_operations;
338extern struct address_space_operations nfs_file_aops; 338extern const struct address_space_operations nfs_file_aops;
339 339
340static inline struct rpc_cred *nfs_file_cred(struct file *file) 340static inline struct rpc_cred *nfs_file_cred(struct file *file)
341{ 341{
diff --git a/include/linux/node.h b/include/linux/node.h
index 254dc3de650b..81dcec84cd8f 100644
--- a/include/linux/node.h
+++ b/include/linux/node.h
@@ -26,8 +26,25 @@ struct node {
26 struct sys_device sysdev; 26 struct sys_device sysdev;
27}; 27};
28 28
29extern struct node node_devices[];
30
29extern int register_node(struct node *, int, struct node *); 31extern int register_node(struct node *, int, struct node *);
30extern void unregister_node(struct node *node); 32extern void unregister_node(struct node *node);
33extern int register_one_node(int nid);
34extern void unregister_one_node(int nid);
35#ifdef CONFIG_NUMA
36extern int register_cpu_under_node(unsigned int cpu, unsigned int nid);
37extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid);
38#else
39static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid)
40{
41 return 0;
42}
43static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid)
44{
45 return 0;
46}
47#endif
31 48
32#define to_node(sys_device) container_of(sys_device, struct node, sysdev) 49#define to_node(sys_device) container_of(sys_device, struct node, sysdev)
33 50
diff --git a/include/linux/nsc_gpio.h b/include/linux/nsc_gpio.h
new file mode 100644
index 000000000000..135742cfada5
--- /dev/null
+++ b/include/linux/nsc_gpio.h
@@ -0,0 +1,42 @@
1/**
2 nsc_gpio.c
3
4 National Semiconductor GPIO common access methods.
5
6 struct nsc_gpio_ops abstracts the low-level access
7 operations for the GPIO units on 2 NSC chip families; the GEODE
8 integrated CPU, and the PC-8736[03456] integrated PC-peripheral
9 chips.
10
11 The GPIO units on these chips have the same pin architecture, but
12 the access methods differ. Thus, scx200_gpio and pc8736x_gpio
13 implement their own versions of these routines; and use the common
14 file-operations routines implemented in nsc_gpio module.
15
16 Copyright (c) 2005 Jim Cromie <jim.cromie@gmail.com>
17
18 NB: this work was tested on the Geode SC-1100 and PC-87366 chips.
19 NSC sold the GEODE line to AMD, and the PC-8736x line to Winbond.
20*/
21
22struct nsc_gpio_ops {
23 struct module* owner;
24 u32 (*gpio_config) (unsigned iminor, u32 mask, u32 bits);
25 void (*gpio_dump) (struct nsc_gpio_ops *amp, unsigned iminor);
26 int (*gpio_get) (unsigned iminor);
27 void (*gpio_set) (unsigned iminor, int state);
28 void (*gpio_set_high)(unsigned iminor);
29 void (*gpio_set_low) (unsigned iminor);
30 void (*gpio_change) (unsigned iminor);
31 int (*gpio_current) (unsigned iminor);
32 struct device* dev; /* for dev_dbg() support, set in init */
33};
34
35extern ssize_t nsc_gpio_write(struct file *file, const char __user *data,
36 size_t len, loff_t *ppos);
37
38extern ssize_t nsc_gpio_read(struct file *file, char __user *buf,
39 size_t len, loff_t *ppos);
40
41extern void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index);
42
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 62a8c22f5f60..983fca251b25 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -404,8 +404,8 @@ int pcibios_enable_device(struct pci_dev *, int mask);
404char *pcibios_setup (char *str); 404char *pcibios_setup (char *str);
405 405
406/* Used only when drivers/pci/setup.c is used */ 406/* Used only when drivers/pci/setup.c is used */
407void pcibios_align_resource(void *, struct resource *, 407void pcibios_align_resource(void *, struct resource *, resource_size_t,
408 unsigned long, unsigned long); 408 resource_size_t);
409void pcibios_update_irq(struct pci_dev *, int irq); 409void pcibios_update_irq(struct pci_dev *, int irq);
410 410
411/* Generic PCI functions used internally */ 411/* Generic PCI functions used internally */
@@ -532,10 +532,10 @@ void pci_release_region(struct pci_dev *, int);
532 532
533/* drivers/pci/bus.c */ 533/* drivers/pci/bus.c */
534int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, 534int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
535 unsigned long size, unsigned long align, 535 resource_size_t size, resource_size_t align,
536 unsigned long min, unsigned int type_mask, 536 resource_size_t min, unsigned int type_mask,
537 void (*alignf)(void *, struct resource *, 537 void (*alignf)(void *, struct resource *,
538 unsigned long, unsigned long), 538 resource_size_t, resource_size_t),
539 void *alignf_data); 539 void *alignf_data);
540void pci_enable_bridges(struct pci_bus *bus); 540void pci_enable_bridges(struct pci_bus *bus);
541 541
@@ -730,7 +730,8 @@ static inline char *pci_name(struct pci_dev *pdev)
730 */ 730 */
731#ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER 731#ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER
732static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, 732static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
733 const struct resource *rsrc, u64 *start, u64 *end) 733 const struct resource *rsrc, resource_size_t *start,
734 resource_size_t *end)
734{ 735{
735 *start = rsrc->start; 736 *start = rsrc->start;
736 *end = rsrc->end; 737 *end = rsrc->end;
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index c2fd2d19938b..9ae6b1a75366 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1202,6 +1202,7 @@
1202#define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF 1202#define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF
1203#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 1203#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6
1204#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 1204#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7
1205#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448
1205#define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450 1206#define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450
1206#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 1207#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451
1207#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 1208#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452
@@ -2170,7 +2171,6 @@
2170#define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 2171#define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815
2171#define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e 2172#define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e
2172#define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 2173#define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850
2173#define PCI_DEVICE_ID_INTEL_GD31244 0x3200
2174#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 2174#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
2175#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 2175#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
2176#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 2176#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
diff --git a/include/linux/plist.h b/include/linux/plist.h
new file mode 100644
index 000000000000..b95818a037ad
--- /dev/null
+++ b/include/linux/plist.h
@@ -0,0 +1,248 @@
1/*
2 * Descending-priority-sorted double-linked list
3 *
4 * (C) 2002-2003 Intel Corp
5 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>.
6 *
7 * 2001-2005 (c) MontaVista Software, Inc.
8 * Daniel Walker <dwalker@mvista.com>
9 *
10 * (C) 2005 Thomas Gleixner <tglx@linutronix.de>
11 *
12 * Simplifications of the original code by
13 * Oleg Nesterov <oleg@tv-sign.ru>
14 *
15 * Licensed under the FSF's GNU Public License v2 or later.
16 *
17 * Based on simple lists (include/linux/list.h).
18 *
19 * This is a priority-sorted list of nodes; each node has a
20 * priority from INT_MIN (highest) to INT_MAX (lowest).
21 *
22 * Addition is O(K), removal is O(1), change of priority of a node is
23 * O(K) and K is the number of RT priority levels used in the system.
24 * (1 <= K <= 99)
25 *
26 * This list is really a list of lists:
27 *
28 * - The tier 1 list is the prio_list, different priority nodes.
29 *
30 * - The tier 2 list is the node_list, serialized nodes.
31 *
32 * Simple ASCII art explanation:
33 *
34 * |HEAD |
35 * | |
36 * |prio_list.prev|<------------------------------------|
37 * |prio_list.next|<->|pl|<->|pl|<--------------->|pl|<-|
38 * |10 | |10| |21| |21| |21| |40| (prio)
39 * | | | | | | | | | | | |
40 * | | | | | | | | | | | |
41 * |node_list.next|<->|nl|<->|nl|<->|nl|<->|nl|<->|nl|<-|
42 * |node_list.prev|<------------------------------------|
43 *
44 * The nodes on the prio_list list are sorted by priority to simplify
45 * the insertion of new nodes. There are no nodes with duplicate
46 * priorites on the list.
47 *
48 * The nodes on the node_list is ordered by priority and can contain
49 * entries which have the same priority. Those entries are ordered
50 * FIFO
51 *
52 * Addition means: look for the prio_list node in the prio_list
53 * for the priority of the node and insert it before the node_list
54 * entry of the next prio_list node. If it is the first node of
55 * that priority, add it to the prio_list in the right position and
56 * insert it into the serialized node_list list
57 *
58 * Removal means remove it from the node_list and remove it from
59 * the prio_list if the node_list list_head is non empty. In case
60 * of removal from the prio_list it must be checked whether other
61 * entries of the same priority are on the list or not. If there
62 * is another entry of the same priority then this entry has to
63 * replace the removed entry on the prio_list. If the entry which
64 * is removed is the only entry of this priority then a simple
65 * remove from both list is sufficient.
66 *
67 * INT_MIN is the highest priority, 0 is the medium highest, INT_MAX
68 * is lowest priority.
69 *
70 * No locking is done, up to the caller.
71 *
72 */
73#ifndef _LINUX_PLIST_H_
74#define _LINUX_PLIST_H_
75
76#include <linux/kernel.h>
77#include <linux/list.h>
78#include <linux/spinlock_types.h>
79
80struct plist_head {
81 struct list_head prio_list;
82 struct list_head node_list;
83#ifdef CONFIG_DEBUG_PI_LIST
84 spinlock_t *lock;
85#endif
86};
87
88struct plist_node {
89 int prio;
90 struct plist_head plist;
91};
92
93#ifdef CONFIG_DEBUG_PI_LIST
94# define PLIST_HEAD_LOCK_INIT(_lock) .lock = _lock
95#else
96# define PLIST_HEAD_LOCK_INIT(_lock)
97#endif
98
99/**
100 * #PLIST_HEAD_INIT - static struct plist_head initializer
101 *
102 * @head: struct plist_head variable name
103 */
104#define PLIST_HEAD_INIT(head, _lock) \
105{ \
106 .prio_list = LIST_HEAD_INIT((head).prio_list), \
107 .node_list = LIST_HEAD_INIT((head).node_list), \
108 PLIST_HEAD_LOCK_INIT(&(_lock)) \
109}
110
111/**
112 * #PLIST_NODE_INIT - static struct plist_node initializer
113 *
114 * @node: struct plist_node variable name
115 * @__prio: initial node priority
116 */
117#define PLIST_NODE_INIT(node, __prio) \
118{ \
119 .prio = (__prio), \
120 .plist = PLIST_HEAD_INIT((node).plist, NULL), \
121}
122
123/**
124 * plist_head_init - dynamic struct plist_head initializer
125 *
126 * @head: &struct plist_head pointer
127 */
128static inline void
129plist_head_init(struct plist_head *head, spinlock_t *lock)
130{
131 INIT_LIST_HEAD(&head->prio_list);
132 INIT_LIST_HEAD(&head->node_list);
133#ifdef CONFIG_DEBUG_PI_LIST
134 head->lock = lock;
135#endif
136}
137
138/**
139 * plist_node_init - Dynamic struct plist_node initializer
140 *
141 * @node: &struct plist_node pointer
142 * @prio: initial node priority
143 */
144static inline void plist_node_init(struct plist_node *node, int prio)
145{
146 node->prio = prio;
147 plist_head_init(&node->plist, NULL);
148}
149
150extern void plist_add(struct plist_node *node, struct plist_head *head);
151extern void plist_del(struct plist_node *node, struct plist_head *head);
152
153/**
154 * plist_for_each - iterate over the plist
155 *
156 * @pos1: the type * to use as a loop counter.
157 * @head: the head for your list.
158 */
159#define plist_for_each(pos, head) \
160 list_for_each_entry(pos, &(head)->node_list, plist.node_list)
161
162/**
163 * plist_for_each_entry_safe - iterate over a plist of given type safe
164 * against removal of list entry
165 *
166 * @pos1: the type * to use as a loop counter.
167 * @n1: another type * to use as temporary storage
168 * @head: the head for your list.
169 */
170#define plist_for_each_safe(pos, n, head) \
171 list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list)
172
173/**
174 * plist_for_each_entry - iterate over list of given type
175 *
176 * @pos: the type * to use as a loop counter.
177 * @head: the head for your list.
178 * @member: the name of the list_struct within the struct.
179 */
180#define plist_for_each_entry(pos, head, mem) \
181 list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list)
182
183/**
184 * plist_for_each_entry_safe - iterate over list of given type safe against
185 * removal of list entry
186 *
187 * @pos: the type * to use as a loop counter.
188 * @n: another type * to use as temporary storage
189 * @head: the head for your list.
190 * @m: the name of the list_struct within the struct.
191 */
192#define plist_for_each_entry_safe(pos, n, head, m) \
193 list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list)
194
195/**
196 * plist_head_empty - return !0 if a plist_head is empty
197 *
198 * @head: &struct plist_head pointer
199 */
200static inline int plist_head_empty(const struct plist_head *head)
201{
202 return list_empty(&head->node_list);
203}
204
205/**
206 * plist_node_empty - return !0 if plist_node is not on a list
207 *
208 * @node: &struct plist_node pointer
209 */
210static inline int plist_node_empty(const struct plist_node *node)
211{
212 return plist_head_empty(&node->plist);
213}
214
215/* All functions below assume the plist_head is not empty. */
216
217/**
218 * plist_first_entry - get the struct for the first entry
219 *
220 * @ptr: the &struct plist_head pointer.
221 * @type: the type of the struct this is embedded in.
222 * @member: the name of the list_struct within the struct.
223 */
224#ifdef CONFIG_DEBUG_PI_LIST
225# define plist_first_entry(head, type, member) \
226({ \
227 WARN_ON(plist_head_empty(head)); \
228 container_of(plist_first(head), type, member); \
229})
230#else
231# define plist_first_entry(head, type, member) \
232 container_of(plist_first(head), type, member)
233#endif
234
235/**
236 * plist_first - return the first node (and thus, highest priority)
237 *
238 * @head: the &struct plist_head pointer
239 *
240 * Assumes the plist is _not_ empty.
241 */
242static inline struct plist_node* plist_first(const struct plist_head *head)
243{
244 return list_entry(head->node_list.next,
245 struct plist_node, plist.node_list);
246}
247
248#endif
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 93b0959eb40f..ab8a8dd8d64c 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -389,7 +389,8 @@ int pnp_start_dev(struct pnp_dev *dev);
389int pnp_stop_dev(struct pnp_dev *dev); 389int pnp_stop_dev(struct pnp_dev *dev);
390int pnp_activate_dev(struct pnp_dev *dev); 390int pnp_activate_dev(struct pnp_dev *dev);
391int pnp_disable_dev(struct pnp_dev *dev); 391int pnp_disable_dev(struct pnp_dev *dev);
392void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size); 392void pnp_resource_change(struct resource *resource, resource_size_t start,
393 resource_size_t size);
393 394
394/* protocol helpers */ 395/* protocol helpers */
395int pnp_is_active(struct pnp_dev * dev); 396int pnp_is_active(struct pnp_dev * dev);
@@ -434,7 +435,9 @@ static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; }
434static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } 435static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
435static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } 436static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
436static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } 437static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
437static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { } 438static inline void pnp_resource_change(struct resource *resource,
439 resource_size_t start,
440 resource_size_t size) { }
438 441
439/* protocol helpers */ 442/* protocol helpers */
440static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } 443static inline int pnp_is_active(struct pnp_dev * dev) { return 0; }
diff --git a/include/linux/poison.h b/include/linux/poison.h
new file mode 100644
index 000000000000..a5347c02432e
--- /dev/null
+++ b/include/linux/poison.h
@@ -0,0 +1,58 @@
1#ifndef _LINUX_POISON_H
2#define _LINUX_POISON_H
3
4/********** include/linux/list.h **********/
5/*
6 * These are non-NULL pointers that will result in page faults
7 * under normal circumstances, used to verify that nobody uses
8 * non-initialized list entries.
9 */
10#define LIST_POISON1 ((void *) 0x00100100)
11#define LIST_POISON2 ((void *) 0x00200200)
12
13/********** mm/slab.c **********/
14/*
15 * Magic nums for obj red zoning.
16 * Placed in the first word before and the first word after an obj.
17 */
18#define RED_INACTIVE 0x5A2CF071UL /* when obj is inactive */
19#define RED_ACTIVE 0x170FC2A5UL /* when obj is active */
20
21/* ...and for poisoning */
22#define POISON_INUSE 0x5a /* for use-uninitialised poisoning */
23#define POISON_FREE 0x6b /* for use-after-free poisoning */
24#define POISON_END 0xa5 /* end-byte of poisoning */
25
26/********** arch/$ARCH/mm/init.c **********/
27#define POISON_FREE_INITMEM 0xcc
28
29/********** arch/x86_64/mm/init.c **********/
30#define POISON_FREE_INITDATA 0xba
31
32/********** arch/ia64/hp/common/sba_iommu.c **********/
33/*
34 * arch/ia64/hp/common/sba_iommu.c uses a 16-byte poison string with a
35 * value of "SBAIOMMU POISON\0" for spill-over poisoning.
36 */
37
38/********** fs/jbd/journal.c **********/
39#define JBD_POISON_FREE 0x5b
40
41/********** drivers/base/dmapool.c **********/
42#define POOL_POISON_FREED 0xa7 /* !inuse */
43#define POOL_POISON_ALLOCATED 0xa9 /* !initted */
44
45/********** drivers/atm/ **********/
46#define ATM_POISON_FREE 0x12
47
48/********** kernel/mutexes **********/
49#define MUTEX_DEBUG_INIT 0x11
50#define MUTEX_DEBUG_FREE 0x22
51
52/********** security/ **********/
53#define KEY_DESTROY 0xbd
54
55/********** sound/oss/ **********/
56#define OSS_POISON_FREE 0xAB
57
58#endif
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 6312758393b6..48dfe00070c7 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -258,6 +258,7 @@ extern void rcu_init(void);
258extern void rcu_check_callbacks(int cpu, int user); 258extern void rcu_check_callbacks(int cpu, int user);
259extern void rcu_restart_cpu(int cpu); 259extern void rcu_restart_cpu(int cpu);
260extern long rcu_batches_completed(void); 260extern long rcu_batches_completed(void);
261extern long rcu_batches_completed_bh(void);
261 262
262/* Exported interfaces */ 263/* Exported interfaces */
263extern void FASTCALL(call_rcu(struct rcu_head *head, 264extern void FASTCALL(call_rcu(struct rcu_head *head,
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 5676c4210e2c..daa2d83cefe8 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1973,7 +1973,7 @@ void reiserfs_unmap_buffer(struct buffer_head *);
1973/* file.c */ 1973/* file.c */
1974extern struct inode_operations reiserfs_file_inode_operations; 1974extern struct inode_operations reiserfs_file_inode_operations;
1975extern const struct file_operations reiserfs_file_operations; 1975extern const struct file_operations reiserfs_file_operations;
1976extern struct address_space_operations reiserfs_address_space_operations; 1976extern const struct address_space_operations reiserfs_address_space_operations;
1977 1977
1978/* fix_nodes.c */ 1978/* fix_nodes.c */
1979 1979
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h
new file mode 100644
index 000000000000..fa4a3b82ba70
--- /dev/null
+++ b/include/linux/rtmutex.h
@@ -0,0 +1,117 @@
1/*
2 * RT Mutexes: blocking mutual exclusion locks with PI support
3 *
4 * started by Ingo Molnar and Thomas Gleixner:
5 *
6 * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
7 * Copyright (C) 2006, Timesys Corp., Thomas Gleixner <tglx@timesys.com>
8 *
9 * This file contains the public data structure and API definitions.
10 */
11
12#ifndef __LINUX_RT_MUTEX_H
13#define __LINUX_RT_MUTEX_H
14
15#include <linux/linkage.h>
16#include <linux/plist.h>
17#include <linux/spinlock_types.h>
18
19/*
20 * The rt_mutex structure
21 *
22 * @wait_lock: spinlock to protect the structure
23 * @wait_list: pilist head to enqueue waiters in priority order
24 * @owner: the mutex owner
25 */
26struct rt_mutex {
27 spinlock_t wait_lock;
28 struct plist_head wait_list;
29 struct task_struct *owner;
30#ifdef CONFIG_DEBUG_RT_MUTEXES
31 int save_state;
32 struct list_head held_list_entry;
33 unsigned long acquire_ip;
34 const char *name, *file;
35 int line;
36 void *magic;
37#endif
38};
39
40struct rt_mutex_waiter;
41struct hrtimer_sleeper;
42
43#ifdef CONFIG_DEBUG_RT_MUTEXES
44 extern int rt_mutex_debug_check_no_locks_freed(const void *from,
45 unsigned long len);
46 extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task);
47#else
48 static inline int rt_mutex_debug_check_no_locks_freed(const void *from,
49 unsigned long len)
50 {
51 return 0;
52 }
53# define rt_mutex_debug_check_no_locks_held(task) do { } while (0)
54#endif
55
56#ifdef CONFIG_DEBUG_RT_MUTEXES
57# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \
58 , .name = #mutexname, .file = __FILE__, .line = __LINE__
59# define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__)
60 extern void rt_mutex_debug_task_free(struct task_struct *tsk);
61#else
62# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname)
63# define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL)
64# define rt_mutex_debug_task_free(t) do { } while (0)
65#endif
66
67#define __RT_MUTEX_INITIALIZER(mutexname) \
68 { .wait_lock = SPIN_LOCK_UNLOCKED \
69 , .wait_list = PLIST_HEAD_INIT(mutexname.wait_list, mutexname.wait_lock) \
70 , .owner = NULL \
71 __DEBUG_RT_MUTEX_INITIALIZER(mutexname)}
72
73#define DEFINE_RT_MUTEX(mutexname) \
74 struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname)
75
76/***
77 * rt_mutex_is_locked - is the mutex locked
78 * @lock: the mutex to be queried
79 *
80 * Returns 1 if the mutex is locked, 0 if unlocked.
81 */
82static inline int rt_mutex_is_locked(struct rt_mutex *lock)
83{
84 return lock->owner != NULL;
85}
86
87extern void __rt_mutex_init(struct rt_mutex *lock, const char *name);
88extern void rt_mutex_destroy(struct rt_mutex *lock);
89
90extern void rt_mutex_lock(struct rt_mutex *lock);
91extern int rt_mutex_lock_interruptible(struct rt_mutex *lock,
92 int detect_deadlock);
93extern int rt_mutex_timed_lock(struct rt_mutex *lock,
94 struct hrtimer_sleeper *timeout,
95 int detect_deadlock);
96
97extern int rt_mutex_trylock(struct rt_mutex *lock);
98
99extern void rt_mutex_unlock(struct rt_mutex *lock);
100
101#ifdef CONFIG_DEBUG_RT_MUTEXES
102# define INIT_RT_MUTEX_DEBUG(tsk) \
103 .held_list_head = LIST_HEAD_INIT(tsk.held_list_head), \
104 .held_list_lock = SPIN_LOCK_UNLOCKED
105#else
106# define INIT_RT_MUTEX_DEBUG(tsk)
107#endif
108
109#ifdef CONFIG_RT_MUTEXES
110# define INIT_RT_MUTEXES(tsk) \
111 .pi_waiters = PLIST_HEAD_INIT(tsk.pi_waiters, tsk.pi_lock), \
112 INIT_RT_MUTEX_DEBUG(tsk)
113#else
114# define INIT_RT_MUTEXES(tsk)
115#endif
116
117#endif
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 122a25c1b997..821f0481ebe1 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -73,6 +73,7 @@ struct sched_param {
73#include <linux/seccomp.h> 73#include <linux/seccomp.h>
74#include <linux/rcupdate.h> 74#include <linux/rcupdate.h>
75#include <linux/futex.h> 75#include <linux/futex.h>
76#include <linux/rtmutex.h>
76 77
77#include <linux/time.h> 78#include <linux/time.h>
78#include <linux/param.h> 79#include <linux/param.h>
@@ -83,6 +84,7 @@ struct sched_param {
83#include <asm/processor.h> 84#include <asm/processor.h>
84 85
85struct exec_domain; 86struct exec_domain;
87struct futex_pi_state;
86 88
87/* 89/*
88 * List of flags we want to share for kernel threads, 90 * List of flags we want to share for kernel threads,
@@ -123,6 +125,7 @@ extern unsigned long nr_running(void);
123extern unsigned long nr_uninterruptible(void); 125extern unsigned long nr_uninterruptible(void);
124extern unsigned long nr_active(void); 126extern unsigned long nr_active(void);
125extern unsigned long nr_iowait(void); 127extern unsigned long nr_iowait(void);
128extern unsigned long weighted_cpuload(const int cpu);
126 129
127 130
128/* 131/*
@@ -494,8 +497,11 @@ struct signal_struct {
494 497
495#define MAX_PRIO (MAX_RT_PRIO + 40) 498#define MAX_PRIO (MAX_RT_PRIO + 40)
496 499
497#define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) 500#define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO)
501#define rt_task(p) rt_prio((p)->prio)
498#define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) 502#define batch_task(p) (unlikely((p)->policy == SCHED_BATCH))
503#define has_rt_policy(p) \
504 unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH)
499 505
500/* 506/*
501 * Some day this will be a full-fledged user tracking system.. 507 * Some day this will be a full-fledged user tracking system..
@@ -558,9 +564,9 @@ enum idle_type
558/* 564/*
559 * sched-domains (multiprocessor balancing) declarations: 565 * sched-domains (multiprocessor balancing) declarations:
560 */ 566 */
561#ifdef CONFIG_SMP
562#define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ 567#define SCHED_LOAD_SCALE 128UL /* increase resolution of load */
563 568
569#ifdef CONFIG_SMP
564#define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ 570#define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */
565#define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */ 571#define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */
566#define SD_BALANCE_EXEC 4 /* Balance on exec */ 572#define SD_BALANCE_EXEC 4 /* Balance on exec */
@@ -569,6 +575,11 @@ enum idle_type
569#define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */ 575#define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */
570#define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */ 576#define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */
571#define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ 577#define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */
578#define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */
579
580#define BALANCE_FOR_POWER ((sched_mc_power_savings || sched_smt_power_savings) \
581 ? SD_POWERSAVINGS_BALANCE : 0)
582
572 583
573struct sched_group { 584struct sched_group {
574 struct sched_group *next; /* Must be a circular list */ 585 struct sched_group *next; /* Must be a circular list */
@@ -638,7 +649,7 @@ struct sched_domain {
638#endif 649#endif
639}; 650};
640 651
641extern void partition_sched_domains(cpumask_t *partition1, 652extern int partition_sched_domains(cpumask_t *partition1,
642 cpumask_t *partition2); 653 cpumask_t *partition2);
643 654
644/* 655/*
@@ -713,10 +724,13 @@ struct task_struct {
713 724
714 int lock_depth; /* BKL lock depth */ 725 int lock_depth; /* BKL lock depth */
715 726
716#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) 727#ifdef CONFIG_SMP
728#ifdef __ARCH_WANT_UNLOCKED_CTXSW
717 int oncpu; 729 int oncpu;
718#endif 730#endif
719 int prio, static_prio; 731#endif
732 int load_weight; /* for niceness load balancing purposes */
733 int prio, static_prio, normal_prio;
720 struct list_head run_list; 734 struct list_head run_list;
721 prio_array_t *array; 735 prio_array_t *array;
722 736
@@ -843,6 +857,20 @@ struct task_struct {
843/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ 857/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */
844 spinlock_t alloc_lock; 858 spinlock_t alloc_lock;
845 859
860 /* Protection of the PI data structures: */
861 spinlock_t pi_lock;
862
863#ifdef CONFIG_RT_MUTEXES
864 /* PI waiters blocked on a rt_mutex held by this task */
865 struct plist_head pi_waiters;
866 /* Deadlock detection and priority inheritance handling */
867 struct rt_mutex_waiter *pi_blocked_on;
868# ifdef CONFIG_DEBUG_RT_MUTEXES
869 spinlock_t held_list_lock;
870 struct list_head held_list_head;
871# endif
872#endif
873
846#ifdef CONFIG_DEBUG_MUTEXES 874#ifdef CONFIG_DEBUG_MUTEXES
847 /* mutex deadlock detection */ 875 /* mutex deadlock detection */
848 struct mutex_waiter *blocked_on; 876 struct mutex_waiter *blocked_on;
@@ -888,6 +916,8 @@ struct task_struct {
888#ifdef CONFIG_COMPAT 916#ifdef CONFIG_COMPAT
889 struct compat_robust_list_head __user *compat_robust_list; 917 struct compat_robust_list_head __user *compat_robust_list;
890#endif 918#endif
919 struct list_head pi_state_list;
920 struct futex_pi_state *pi_state_cache;
891 921
892 atomic_t fs_excl; /* holding fs exclusive resources */ 922 atomic_t fs_excl; /* holding fs exclusive resources */
893 struct rcu_head rcu; 923 struct rcu_head rcu;
@@ -955,6 +985,7 @@ static inline void put_task_struct(struct task_struct *t)
955#define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ 985#define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */
956#define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ 986#define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */
957#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ 987#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */
988#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */
958 989
959/* 990/*
960 * Only the _current_ task can read/write to tsk->flags, but other 991 * Only the _current_ task can read/write to tsk->flags, but other
@@ -1009,6 +1040,19 @@ static inline void idle_task_exit(void) {}
1009#endif 1040#endif
1010 1041
1011extern void sched_idle_next(void); 1042extern void sched_idle_next(void);
1043
1044#ifdef CONFIG_RT_MUTEXES
1045extern int rt_mutex_getprio(task_t *p);
1046extern void rt_mutex_setprio(task_t *p, int prio);
1047extern void rt_mutex_adjust_pi(task_t *p);
1048#else
1049static inline int rt_mutex_getprio(task_t *p)
1050{
1051 return p->normal_prio;
1052}
1053# define rt_mutex_adjust_pi(p) do { } while (0)
1054#endif
1055
1012extern void set_user_nice(task_t *p, long nice); 1056extern void set_user_nice(task_t *p, long nice);
1013extern int task_prio(const task_t *p); 1057extern int task_prio(const task_t *p);
1014extern int task_nice(const task_t *p); 1058extern int task_nice(const task_t *p);
@@ -1408,6 +1452,11 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm)
1408extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); 1452extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
1409extern long sched_getaffinity(pid_t pid, cpumask_t *mask); 1453extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
1410 1454
1455#include <linux/sysdev.h>
1456extern int sched_mc_power_savings, sched_smt_power_savings;
1457extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings;
1458extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
1459
1411extern void normalize_rt_tasks(void); 1460extern void normalize_rt_tasks(void);
1412 1461
1413#ifdef CONFIG_PM 1462#ifdef CONFIG_PM
diff --git a/include/linux/scx200.h b/include/linux/scx200.h
index a22f9e173ad2..693c0557e70b 100644
--- a/include/linux/scx200.h
+++ b/include/linux/scx200.h
@@ -49,10 +49,3 @@ extern unsigned scx200_cb_base;
49#define SCx200_REV 0x3d /* Revision Register */ 49#define SCx200_REV 0x3d /* Revision Register */
50#define SCx200_CBA 0x3e /* Configuration Base Address Register */ 50#define SCx200_CBA 0x3e /* Configuration Base Address Register */
51#define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ 51#define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */
52
53/*
54 Local variables:
55 compile-command: "make -C ../.. bzImage modules"
56 c-basic-offset: 8
57 End:
58*/
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h
index 30cdd648ba79..90dd069cc145 100644
--- a/include/linux/scx200_gpio.h
+++ b/include/linux/scx200_gpio.h
@@ -1,6 +1,6 @@
1#include <linux/spinlock.h> 1#include <linux/spinlock.h>
2 2
3u32 scx200_gpio_configure(int index, u32 set, u32 clear); 3u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear);
4 4
5extern unsigned scx200_gpio_base; 5extern unsigned scx200_gpio_base;
6extern long scx200_gpio_shadow[2]; 6extern long scx200_gpio_shadow[2];
@@ -17,7 +17,7 @@ extern long scx200_gpio_shadow[2];
17 17
18/* returns the value of the GPIO pin */ 18/* returns the value of the GPIO pin */
19 19
20static inline int scx200_gpio_get(int index) { 20static inline int scx200_gpio_get(unsigned index) {
21 __SCx200_GPIO_BANK; 21 __SCx200_GPIO_BANK;
22 __SCx200_GPIO_IOADDR + 0x04; 22 __SCx200_GPIO_IOADDR + 0x04;
23 __SCx200_GPIO_INDEX; 23 __SCx200_GPIO_INDEX;
@@ -29,7 +29,7 @@ static inline int scx200_gpio_get(int index) {
29 driven if the GPIO is configured as an output, it might not be the 29 driven if the GPIO is configured as an output, it might not be the
30 state of the GPIO right now if the GPIO is configured as an input) */ 30 state of the GPIO right now if the GPIO is configured as an input) */
31 31
32static inline int scx200_gpio_current(int index) { 32static inline int scx200_gpio_current(unsigned index) {
33 __SCx200_GPIO_BANK; 33 __SCx200_GPIO_BANK;
34 __SCx200_GPIO_INDEX; 34 __SCx200_GPIO_INDEX;
35 35
@@ -38,7 +38,7 @@ static inline int scx200_gpio_current(int index) {
38 38
39/* drive the GPIO signal high */ 39/* drive the GPIO signal high */
40 40
41static inline void scx200_gpio_set_high(int index) { 41static inline void scx200_gpio_set_high(unsigned index) {
42 __SCx200_GPIO_BANK; 42 __SCx200_GPIO_BANK;
43 __SCx200_GPIO_IOADDR; 43 __SCx200_GPIO_IOADDR;
44 __SCx200_GPIO_SHADOW; 44 __SCx200_GPIO_SHADOW;
@@ -49,7 +49,7 @@ static inline void scx200_gpio_set_high(int index) {
49 49
50/* drive the GPIO signal low */ 50/* drive the GPIO signal low */
51 51
52static inline void scx200_gpio_set_low(int index) { 52static inline void scx200_gpio_set_low(unsigned index) {
53 __SCx200_GPIO_BANK; 53 __SCx200_GPIO_BANK;
54 __SCx200_GPIO_IOADDR; 54 __SCx200_GPIO_IOADDR;
55 __SCx200_GPIO_SHADOW; 55 __SCx200_GPIO_SHADOW;
@@ -60,7 +60,7 @@ static inline void scx200_gpio_set_low(int index) {
60 60
61/* drive the GPIO signal to state */ 61/* drive the GPIO signal to state */
62 62
63static inline void scx200_gpio_set(int index, int state) { 63static inline void scx200_gpio_set(unsigned index, int state) {
64 __SCx200_GPIO_BANK; 64 __SCx200_GPIO_BANK;
65 __SCx200_GPIO_IOADDR; 65 __SCx200_GPIO_IOADDR;
66 __SCx200_GPIO_SHADOW; 66 __SCx200_GPIO_SHADOW;
@@ -73,7 +73,7 @@ static inline void scx200_gpio_set(int index, int state) {
73} 73}
74 74
75/* toggle the GPIO signal */ 75/* toggle the GPIO signal */
76static inline void scx200_gpio_change(int index) { 76static inline void scx200_gpio_change(unsigned index) {
77 __SCx200_GPIO_BANK; 77 __SCx200_GPIO_BANK;
78 __SCx200_GPIO_IOADDR; 78 __SCx200_GPIO_IOADDR;
79 __SCx200_GPIO_SHADOW; 79 __SCx200_GPIO_SHADOW;
@@ -87,10 +87,3 @@ static inline void scx200_gpio_change(int index) {
87#undef __SCx200_GPIO_SHADOW 87#undef __SCx200_GPIO_SHADOW
88#undef __SCx200_GPIO_INDEX 88#undef __SCx200_GPIO_INDEX
89#undef __SCx200_GPIO_OUT 89#undef __SCx200_GPIO_OUT
90
91/*
92 Local variables:
93 compile-command: "make -C ../.. bzImage modules"
94 c-basic-offset: 8
95 End:
96*/
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 951c4e858274..fc1104a2cfa9 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -336,7 +336,6 @@ struct uart_driver {
336 struct module *owner; 336 struct module *owner;
337 const char *driver_name; 337 const char *driver_name;
338 const char *dev_name; 338 const char *dev_name;
339 const char *devfs_name;
340 int major; 339 int major;
341 int minor; 340 int minor;
342 int nr; 341 int nr;
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index e928c0dcc297..c8bb68099eb9 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -642,10 +642,14 @@ struct spi_board_info {
642 u16 bus_num; 642 u16 bus_num;
643 u16 chip_select; 643 u16 chip_select;
644 644
645 /* mode becomes spi_device.mode, and is essential for chips
646 * where the default of SPI_CS_HIGH = 0 is wrong.
647 */
648 u8 mode;
649
645 /* ... may need additional spi_device chip config data here. 650 /* ... may need additional spi_device chip config data here.
646 * avoid stuff protocol drivers can set; but include stuff 651 * avoid stuff protocol drivers can set; but include stuff
647 * needed to behave without being bound to a driver: 652 * needed to behave without being bound to a driver:
648 * - chipselect polarity
649 * - quirks like clock rate mattering when not selected 653 * - quirks like clock rate mattering when not selected
650 */ 654 */
651}; 655};
diff --git a/include/linux/swap.h b/include/linux/swap.h
index dc3f3aa0c83e..c41e2d6d1acc 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -199,6 +199,8 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
199} 199}
200#endif 200#endif
201 201
202extern int kswapd_run(int nid);
203
202#ifdef CONFIG_MMU 204#ifdef CONFIG_MMU
203/* linux/mm/shmem.c */ 205/* linux/mm/shmem.c */
204extern int shmem_unuse(swp_entry_t entry, struct page *page); 206extern int shmem_unuse(swp_entry_t entry, struct page *page);
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 33785b79d548..008f04c56737 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -174,9 +174,9 @@ asmlinkage long sys_waitid(int which, pid_t pid,
174 int options, struct rusage __user *ru); 174 int options, struct rusage __user *ru);
175asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); 175asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options);
176asmlinkage long sys_set_tid_address(int __user *tidptr); 176asmlinkage long sys_set_tid_address(int __user *tidptr);
177asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, 177asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val,
178 struct timespec __user *utime, u32 __user *uaddr2, 178 struct timespec __user *utime, u32 __user *uaddr2,
179 int val3); 179 u32 val3);
180 180
181asmlinkage long sys_init_module(void __user *umod, unsigned long len, 181asmlinkage long sys_init_module(void __user *umod, unsigned long len,
182 const char __user *uargs); 182 const char __user *uargs);
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 349ef908a222..46e4d8f2771f 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -149,6 +149,7 @@ enum
149 KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ 149 KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */
150 KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ 150 KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
151 KERN_COMPAT_LOG=73, /* int: print compat layer messages */ 151 KERN_COMPAT_LOG=73, /* int: print compat layer messages */
152 KERN_MAX_LOCK_DEPTH=74,
152}; 153};
153 154
154 155
@@ -189,6 +190,7 @@ enum
189 VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ 190 VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */
190 VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ 191 VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */
191 VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ 192 VM_PANIC_ON_OOM=33, /* panic at out-of-memory */
193 VM_VDSO_ENABLED=34, /* map VDSO into new processes? */
192}; 194};
193 195
194 196
diff --git a/include/linux/topology.h b/include/linux/topology.h
index a305ae2e44b6..ec1eca85290a 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -134,7 +134,8 @@
134 .flags = SD_LOAD_BALANCE \ 134 .flags = SD_LOAD_BALANCE \
135 | SD_BALANCE_NEWIDLE \ 135 | SD_BALANCE_NEWIDLE \
136 | SD_BALANCE_EXEC \ 136 | SD_BALANCE_EXEC \
137 | SD_WAKE_AFFINE, \ 137 | SD_WAKE_AFFINE \
138 | BALANCE_FOR_POWER, \
138 .last_balance = jiffies, \ 139 .last_balance = jiffies, \
139 .balance_interval = 1, \ 140 .balance_interval = 1, \
140 .nr_balance_failed = 0, \ 141 .nr_balance_failed = 0, \
diff --git a/include/linux/tty.h b/include/linux/tty.h
index cb35ca50a0a6..b3b807e4b050 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -57,7 +57,6 @@ struct tty_buffer {
57 unsigned char *flag_buf_ptr; 57 unsigned char *flag_buf_ptr;
58 int used; 58 int used;
59 int size; 59 int size;
60 int active;
61 int commit; 60 int commit;
62 int read; 61 int read;
63 /* Data points here */ 62 /* Data points here */
@@ -259,7 +258,6 @@ struct tty_struct {
259#define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ 258#define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */
260#define TTY_PUSH 6 /* n_tty private */ 259#define TTY_PUSH 6 /* n_tty private */
261#define TTY_CLOSING 7 /* ->close() in progress */ 260#define TTY_CLOSING 7 /* ->close() in progress */
262#define TTY_DONT_FLIP 8 /* Defer buffer flip */
263#define TTY_LDISC 9 /* Line discipline attached */ 261#define TTY_LDISC 9 /* Line discipline attached */
264#define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ 262#define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */
265#define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ 263#define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index b368b296d035..58c961c9e170 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -157,7 +157,6 @@ struct tty_driver {
157 struct cdev cdev; 157 struct cdev cdev;
158 struct module *owner; 158 struct module *owner;
159 const char *driver_name; 159 const char *driver_name;
160 const char *devfs_name;
161 const char *name; 160 const char *name;
162 int name_base; /* offset of printed name */ 161 int name_base; /* offset of printed name */
163 int major; /* major device number */ 162 int major; /* major device number */
@@ -242,8 +241,15 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op);
242 * is also a promise, if the above case is true, not to signal 241 * is also a promise, if the above case is true, not to signal
243 * overruns, either.) 242 * overruns, either.)
244 * 243 *
245 * TTY_DRIVER_NO_DEVFS --- if set, do not create devfs entries. This 244 * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need
246 * is only used by tty_register_driver(). 245 * to be registered with a call to tty_register_driver() when the
246 * device is found in the system and unregistered with a call to
247 * tty_unregister_device() so the devices will be show up
248 * properly in sysfs. If not set, driver->num entries will be
249 * created by the tty core in sysfs when tty_register_driver() is
250 * called. This is to be used by drivers that have tty devices
251 * that can appear and disappear while the main tty driver is
252 * registered with the tty core.
247 * 253 *
248 * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead 254 * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead
249 * use dynamic memory keyed through the devpts filesystem. This 255 * use dynamic memory keyed through the devpts filesystem. This
@@ -252,7 +258,7 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op);
252#define TTY_DRIVER_INSTALLED 0x0001 258#define TTY_DRIVER_INSTALLED 0x0001
253#define TTY_DRIVER_RESET_TERMIOS 0x0002 259#define TTY_DRIVER_RESET_TERMIOS 0x0002
254#define TTY_DRIVER_REAL_RAW 0x0004 260#define TTY_DRIVER_REAL_RAW 0x0004
255#define TTY_DRIVER_NO_DEVFS 0x0008 261#define TTY_DRIVER_DYNAMIC_DEV 0x0008
256#define TTY_DRIVER_DEVPTS_MEM 0x0010 262#define TTY_DRIVER_DEVPTS_MEM 0x0010
257 263
258/* tty driver types */ 264/* tty driver types */
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index 31548303ee37..eb677cf56106 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -12,7 +12,7 @@ static inline int tty_insert_flip_char(struct tty_struct *tty,
12 unsigned char ch, char flag) 12 unsigned char ch, char flag)
13{ 13{
14 struct tty_buffer *tb = tty->buf.tail; 14 struct tty_buffer *tb = tty->buf.tail;
15 if (tb && tb->active && tb->used < tb->size) { 15 if (tb && tb->used < tb->size) {
16 tb->flag_buf_ptr[tb->used] = flag; 16 tb->flag_buf_ptr[tb->used] = flag;
17 tb->char_buf_ptr[tb->used++] = ch; 17 tb->char_buf_ptr[tb->used++] = ch;
18 return 1; 18 return 1;
diff --git a/include/linux/types.h b/include/linux/types.h
index a5e46e783ffa..3f235660a3cd 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -177,8 +177,15 @@ typedef __u64 __bitwise __be64;
177 177
178#ifdef __KERNEL__ 178#ifdef __KERNEL__
179typedef unsigned __bitwise__ gfp_t; 179typedef unsigned __bitwise__ gfp_t;
180
181#ifdef CONFIG_RESOURCES_64BIT
182typedef u64 resource_size_t;
183#else
184typedef u32 resource_size_t;
180#endif 185#endif
181 186
187#endif /* __KERNEL__ */
188
182struct ustat { 189struct ustat {
183 __kernel_daddr_t f_tfree; 190 __kernel_daddr_t f_tfree;
184 __kernel_ino_t f_tinode; 191 __kernel_ino_t f_tinode;
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 914f911325be..e39b7cc43390 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -966,7 +966,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de,
966extern struct inode_operations ufs_file_inode_operations; 966extern struct inode_operations ufs_file_inode_operations;
967extern const struct file_operations ufs_file_operations; 967extern const struct file_operations ufs_file_operations;
968 968
969extern struct address_space_operations ufs_aops; 969extern const struct address_space_operations ufs_aops;
970 970
971/* ialloc.c */ 971/* ialloc.c */
972extern void ufs_free_inode (struct inode *inode); 972extern void ufs_free_inode (struct inode *inode);
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
index 1192ed8f4fe8..011bcfeb9f09 100644
--- a/include/linux/watchdog.h
+++ b/include/linux/watchdog.h
@@ -28,6 +28,9 @@ struct watchdog_info {
28#define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) 28#define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int)
29#define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) 29#define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int)
30#define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) 30#define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int)
31#define WDIOC_SETPRETIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 8, int)
32#define WDIOC_GETPRETIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 9, int)
33#define WDIOC_GETTIMELEFT _IOR(WATCHDOG_IOCTL_BASE, 10, int)
31 34
32#define WDIOF_UNKNOWN -1 /* Unknown flag error */ 35#define WDIOF_UNKNOWN -1 /* Unknown flag error */
33#define WDIOS_UNKNOWN -1 /* Unknown status error */ 36#define WDIOS_UNKNOWN -1 /* Unknown status error */
@@ -38,9 +41,10 @@ struct watchdog_info {
38#define WDIOF_EXTERN2 0x0008 /* External relay 2 */ 41#define WDIOF_EXTERN2 0x0008 /* External relay 2 */
39#define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */ 42#define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */
40#define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */ 43#define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */
41#define WDIOF_POWEROVER 0x0040 /* Power over voltage */ 44#define WDIOF_POWEROVER 0x0040 /* Power over voltage */
42#define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ 45#define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */
43#define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ 46#define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */
47#define WDIOF_PRETIMEOUT 0x0200 /* Pretimeout (in seconds), get/set */
44#define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */ 48#define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */
45 49
46#define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */ 50#define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */