diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/backlight.h | 25 | ||||
-rw-r--r-- | include/linux/dcache.h | 1 | ||||
-rw-r--r-- | include/linux/fadvise.h | 6 | ||||
-rw-r--r-- | include/linux/fb.h | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 22 | ||||
-rw-r--r-- | include/linux/hrtimer.h | 16 | ||||
-rw-r--r-- | include/linux/ipmi_smi.h | 16 | ||||
-rw-r--r-- | include/linux/leds.h | 111 | ||||
-rw-r--r-- | include/linux/migrate.h | 5 | ||||
-rw-r--r-- | include/linux/mtd/blktrans.h | 4 | ||||
-rw-r--r-- | include/linux/mtd/doc2000.h | 4 | ||||
-rw-r--r-- | include/linux/mtd/inftl.h | 5 | ||||
-rw-r--r-- | include/linux/namei.h | 1 | ||||
-rw-r--r-- | include/linux/netdevice.h | 55 | ||||
-rw-r--r-- | include/linux/pagemap.h | 4 | ||||
-rw-r--r-- | include/linux/pid.h | 96 | ||||
-rw-r--r-- | include/linux/sched.h | 18 | ||||
-rw-r--r-- | include/linux/skbuff.h | 29 | ||||
-rw-r--r-- | include/linux/syscalls.h | 2 | ||||
-rw-r--r-- | include/linux/timer.h | 8 | ||||
-rw-r--r-- | include/linux/tiocl.h | 1 |
21 files changed, 314 insertions, 117 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index bb9e54322322..75e91f5b6a04 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -19,20 +19,25 @@ struct fb_info; | |||
19 | struct backlight_properties { | 19 | struct backlight_properties { |
20 | /* Owner module */ | 20 | /* Owner module */ |
21 | struct module *owner; | 21 | struct module *owner; |
22 | /* Get the backlight power status (0: full on, 1..3: power saving | 22 | |
23 | modes; 4: full off), see FB_BLANK_XXX */ | 23 | /* Notify the backlight driver some property has changed */ |
24 | int (*get_power)(struct backlight_device *); | 24 | int (*update_status)(struct backlight_device *); |
25 | /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */ | 25 | /* Return the current backlight brightness (accounting for power, |
26 | int (*set_power)(struct backlight_device *, int power); | 26 | fb_blank etc.) */ |
27 | /* Maximal value for brightness (read-only) */ | ||
28 | int max_brightness; | ||
29 | /* Get current backlight brightness */ | ||
30 | int (*get_brightness)(struct backlight_device *); | 27 | int (*get_brightness)(struct backlight_device *); |
31 | /* Set backlight brightness (0..max_brightness) */ | ||
32 | int (*set_brightness)(struct backlight_device *, int brightness); | ||
33 | /* Check if given framebuffer device is the one bound to this backlight; | 28 | /* Check if given framebuffer device is the one bound to this backlight; |
34 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ | 29 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ |
35 | int (*check_fb)(struct fb_info *); | 30 | int (*check_fb)(struct fb_info *); |
31 | |||
32 | /* Current User requested brightness (0 - max_brightness) */ | ||
33 | int brightness; | ||
34 | /* Maximal value for brightness (read-only) */ | ||
35 | int max_brightness; | ||
36 | /* Current FB Power mode (0: full on, 1..3: power saving | ||
37 | modes; 4: full off), see FB_BLANK_XXX */ | ||
38 | int power; | ||
39 | /* FB Blanking active? (values as for power) */ | ||
40 | int fb_blank; | ||
36 | }; | 41 | }; |
37 | 42 | ||
38 | struct backlight_device { | 43 | struct backlight_device { |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index d10bd30c337e..836325ee0931 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -275,6 +275,7 @@ extern void d_move(struct dentry *, struct dentry *); | |||
275 | /* appendix may either be NULL or be used for transname suffixes */ | 275 | /* appendix may either be NULL or be used for transname suffixes */ |
276 | extern struct dentry * d_lookup(struct dentry *, struct qstr *); | 276 | extern struct dentry * d_lookup(struct dentry *, struct qstr *); |
277 | extern struct dentry * __d_lookup(struct dentry *, struct qstr *); | 277 | extern struct dentry * __d_lookup(struct dentry *, struct qstr *); |
278 | extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *); | ||
278 | 279 | ||
279 | /* validate "insecure" dentry pointer */ | 280 | /* validate "insecure" dentry pointer */ |
280 | extern int d_validate(struct dentry *, struct dentry *); | 281 | extern int d_validate(struct dentry *, struct dentry *); |
diff --git a/include/linux/fadvise.h b/include/linux/fadvise.h index b2913bba35d8..e8e747139b9a 100644 --- a/include/linux/fadvise.h +++ b/include/linux/fadvise.h | |||
@@ -18,10 +18,4 @@ | |||
18 | #define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ | 18 | #define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | /* | ||
22 | * Linux-specific fadvise() extensions: | ||
23 | */ | ||
24 | #define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range */ | ||
25 | #define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range */ | ||
26 | |||
27 | #endif /* FADVISE_H_INCLUDED */ | 21 | #endif /* FADVISE_H_INCLUDED */ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index d03fadfcafe3..315d89740ddf 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -839,12 +839,10 @@ struct fb_info { | |||
839 | #define FB_LEFT_POS(bpp) (32 - bpp) | 839 | #define FB_LEFT_POS(bpp) (32 - bpp) |
840 | #define FB_SHIFT_HIGH(val, bits) ((val) >> (bits)) | 840 | #define FB_SHIFT_HIGH(val, bits) ((val) >> (bits)) |
841 | #define FB_SHIFT_LOW(val, bits) ((val) << (bits)) | 841 | #define FB_SHIFT_LOW(val, bits) ((val) << (bits)) |
842 | #define FB_BIT_NR(b) (7 - (b)) | ||
843 | #else | 842 | #else |
844 | #define FB_LEFT_POS(bpp) (0) | 843 | #define FB_LEFT_POS(bpp) (0) |
845 | #define FB_SHIFT_HIGH(val, bits) ((val) << (bits)) | 844 | #define FB_SHIFT_HIGH(val, bits) ((val) << (bits)) |
846 | #define FB_SHIFT_LOW(val, bits) ((val) >> (bits)) | 845 | #define FB_SHIFT_LOW(val, bits) ((val) >> (bits)) |
847 | #define FB_BIT_NR(b) (b) | ||
848 | #endif | 846 | #endif |
849 | 847 | ||
850 | /* | 848 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 20fa5f6d7269..4ed7e602d703 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -757,6 +757,13 @@ extern void send_sigio(struct fown_struct *fown, int fd, int band); | |||
757 | extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); | 757 | extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); |
758 | extern int fcntl_getlease(struct file *filp); | 758 | extern int fcntl_getlease(struct file *filp); |
759 | 759 | ||
760 | /* fs/sync.c */ | ||
761 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 | ||
762 | #define SYNC_FILE_RANGE_WRITE 2 | ||
763 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | ||
764 | extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, | ||
765 | int flags); | ||
766 | |||
760 | /* fs/locks.c */ | 767 | /* fs/locks.c */ |
761 | extern void locks_init_lock(struct file_lock *); | 768 | extern void locks_init_lock(struct file_lock *); |
762 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); | 769 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); |
@@ -1413,6 +1420,7 @@ extern void bd_release_from_disk(struct block_device *, struct gendisk *); | |||
1413 | #endif | 1420 | #endif |
1414 | 1421 | ||
1415 | /* fs/char_dev.c */ | 1422 | /* fs/char_dev.c */ |
1423 | #define CHRDEV_MAJOR_HASH_SIZE 255 | ||
1416 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); | 1424 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); |
1417 | extern int register_chrdev_region(dev_t, unsigned, const char *); | 1425 | extern int register_chrdev_region(dev_t, unsigned, const char *); |
1418 | extern int register_chrdev(unsigned int, const char *, | 1426 | extern int register_chrdev(unsigned int, const char *, |
@@ -1420,25 +1428,17 @@ extern int register_chrdev(unsigned int, const char *, | |||
1420 | extern int unregister_chrdev(unsigned int, const char *); | 1428 | extern int unregister_chrdev(unsigned int, const char *); |
1421 | extern void unregister_chrdev_region(dev_t, unsigned); | 1429 | extern void unregister_chrdev_region(dev_t, unsigned); |
1422 | extern int chrdev_open(struct inode *, struct file *); | 1430 | extern int chrdev_open(struct inode *, struct file *); |
1423 | extern int get_chrdev_list(char *); | 1431 | extern void chrdev_show(struct seq_file *,off_t); |
1424 | extern void *acquire_chrdev_list(void); | ||
1425 | extern int count_chrdev_list(void); | ||
1426 | extern void *get_next_chrdev(void *); | ||
1427 | extern int get_chrdev_info(void *, int *, char **); | ||
1428 | extern void release_chrdev_list(void *); | ||
1429 | 1432 | ||
1430 | /* fs/block_dev.c */ | 1433 | /* fs/block_dev.c */ |
1434 | #define BLKDEV_MAJOR_HASH_SIZE 255 | ||
1431 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ | 1435 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ |
1432 | extern const char *__bdevname(dev_t, char *buffer); | 1436 | extern const char *__bdevname(dev_t, char *buffer); |
1433 | extern const char *bdevname(struct block_device *bdev, char *buffer); | 1437 | extern const char *bdevname(struct block_device *bdev, char *buffer); |
1434 | extern struct block_device *lookup_bdev(const char *); | 1438 | extern struct block_device *lookup_bdev(const char *); |
1435 | extern struct block_device *open_bdev_excl(const char *, int, void *); | 1439 | extern struct block_device *open_bdev_excl(const char *, int, void *); |
1436 | extern void close_bdev_excl(struct block_device *); | 1440 | extern void close_bdev_excl(struct block_device *); |
1437 | extern void *acquire_blkdev_list(void); | 1441 | extern void blkdev_show(struct seq_file *,off_t); |
1438 | extern int count_blkdev_list(void); | ||
1439 | extern void *get_next_blkdev(void *); | ||
1440 | extern int get_blkdev_info(void *, int *, char **); | ||
1441 | extern void release_blkdev_list(void *); | ||
1442 | 1442 | ||
1443 | extern void init_special_inode(struct inode *, umode_t, dev_t); | 1443 | extern void init_special_inode(struct inode *, umode_t, dev_t); |
1444 | 1444 | ||
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 93830158348e..b20939287613 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -58,6 +58,19 @@ struct hrtimer { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | /** | 60 | /** |
61 | * struct hrtimer_sleeper - simple sleeper structure | ||
62 | * | ||
63 | * @timer: embedded timer structure | ||
64 | * @task: task to wake up | ||
65 | * | ||
66 | * task is set to NULL, when the timer expires. | ||
67 | */ | ||
68 | struct hrtimer_sleeper { | ||
69 | struct hrtimer timer; | ||
70 | struct task_struct *task; | ||
71 | }; | ||
72 | |||
73 | /** | ||
61 | * struct hrtimer_base - the timer base for a specific clock | 74 | * struct hrtimer_base - the timer base for a specific clock |
62 | * | 75 | * |
63 | * @index: clock type index for per_cpu support when moving a timer | 76 | * @index: clock type index for per_cpu support when moving a timer |
@@ -127,6 +140,9 @@ extern long hrtimer_nanosleep(struct timespec *rqtp, | |||
127 | const enum hrtimer_mode mode, | 140 | const enum hrtimer_mode mode, |
128 | const clockid_t clockid); | 141 | const clockid_t clockid); |
129 | 142 | ||
143 | extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, | ||
144 | struct task_struct *tsk); | ||
145 | |||
130 | /* Soft interrupt function to run the hrtimer queues: */ | 146 | /* Soft interrupt function to run the hrtimer queues: */ |
131 | extern void hrtimer_run_queues(void); | 147 | extern void hrtimer_run_queues(void); |
132 | 148 | ||
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 53571288a9fc..6d9c7e4da472 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
@@ -82,6 +82,13 @@ struct ipmi_smi_handlers | |||
82 | { | 82 | { |
83 | struct module *owner; | 83 | struct module *owner; |
84 | 84 | ||
85 | /* The low-level interface cannot start sending messages to | ||
86 | the upper layer until this function is called. This may | ||
87 | not be NULL, the lower layer must take the interface from | ||
88 | this call. */ | ||
89 | int (*start_processing)(void *send_info, | ||
90 | ipmi_smi_t new_intf); | ||
91 | |||
85 | /* Called to enqueue an SMI message to be sent. This | 92 | /* Called to enqueue an SMI message to be sent. This |
86 | operation is not allowed to fail. If an error occurs, it | 93 | operation is not allowed to fail. If an error occurs, it |
87 | should report back the error in a received message. It may | 94 | should report back the error in a received message. It may |
@@ -157,13 +164,16 @@ static inline void ipmi_demangle_device_id(unsigned char *data, | |||
157 | } | 164 | } |
158 | 165 | ||
159 | /* Add a low-level interface to the IPMI driver. Note that if the | 166 | /* Add a low-level interface to the IPMI driver. Note that if the |
160 | interface doesn't know its slave address, it should pass in zero. */ | 167 | interface doesn't know its slave address, it should pass in zero. |
168 | The low-level interface should not deliver any messages to the | ||
169 | upper layer until the start_processing() function in the handlers | ||
170 | is called, and the lower layer must get the interface from that | ||
171 | call. */ | ||
161 | int ipmi_register_smi(struct ipmi_smi_handlers *handlers, | 172 | int ipmi_register_smi(struct ipmi_smi_handlers *handlers, |
162 | void *send_info, | 173 | void *send_info, |
163 | struct ipmi_device_id *device_id, | 174 | struct ipmi_device_id *device_id, |
164 | struct device *dev, | 175 | struct device *dev, |
165 | unsigned char slave_addr, | 176 | unsigned char slave_addr); |
166 | ipmi_smi_t *intf); | ||
167 | 177 | ||
168 | /* | 178 | /* |
169 | * Remove a low-level interface from the IPMI driver. This will | 179 | * Remove a low-level interface from the IPMI driver. This will |
diff --git a/include/linux/leds.h b/include/linux/leds.h new file mode 100644 index 000000000000..4617e75903b0 --- /dev/null +++ b/include/linux/leds.h | |||
@@ -0,0 +1,111 @@ | |||
1 | /* | ||
2 | * Driver model for leds and led triggers | ||
3 | * | ||
4 | * Copyright (C) 2005 John Lenz <lenz@cs.wisc.edu> | ||
5 | * Copyright (C) 2005 Richard Purdie <rpurdie@openedhand.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | #ifndef __LINUX_LEDS_H_INCLUDED | ||
13 | #define __LINUX_LEDS_H_INCLUDED | ||
14 | |||
15 | struct device; | ||
16 | struct class_device; | ||
17 | /* | ||
18 | * LED Core | ||
19 | */ | ||
20 | |||
21 | enum led_brightness { | ||
22 | LED_OFF = 0, | ||
23 | LED_HALF = 127, | ||
24 | LED_FULL = 255, | ||
25 | }; | ||
26 | |||
27 | struct led_classdev { | ||
28 | const char *name; | ||
29 | int brightness; | ||
30 | int flags; | ||
31 | #define LED_SUSPENDED (1 << 0) | ||
32 | |||
33 | /* A function to set the brightness of the led */ | ||
34 | void (*brightness_set)(struct led_classdev *led_cdev, | ||
35 | enum led_brightness brightness); | ||
36 | |||
37 | struct class_device *class_dev; | ||
38 | /* LED Device linked list */ | ||
39 | struct list_head node; | ||
40 | |||
41 | /* Trigger data */ | ||
42 | char *default_trigger; | ||
43 | #ifdef CONFIG_LEDS_TRIGGERS | ||
44 | rwlock_t trigger_lock; | ||
45 | /* Protects the trigger data below */ | ||
46 | |||
47 | struct led_trigger *trigger; | ||
48 | struct list_head trig_list; | ||
49 | void *trigger_data; | ||
50 | #endif | ||
51 | }; | ||
52 | |||
53 | extern int led_classdev_register(struct device *parent, | ||
54 | struct led_classdev *led_cdev); | ||
55 | extern void led_classdev_unregister(struct led_classdev *led_cdev); | ||
56 | extern void led_classdev_suspend(struct led_classdev *led_cdev); | ||
57 | extern void led_classdev_resume(struct led_classdev *led_cdev); | ||
58 | |||
59 | /* | ||
60 | * LED Triggers | ||
61 | */ | ||
62 | #ifdef CONFIG_LEDS_TRIGGERS | ||
63 | |||
64 | #define TRIG_NAME_MAX 50 | ||
65 | |||
66 | struct led_trigger { | ||
67 | /* Trigger Properties */ | ||
68 | const char *name; | ||
69 | void (*activate)(struct led_classdev *led_cdev); | ||
70 | void (*deactivate)(struct led_classdev *led_cdev); | ||
71 | |||
72 | /* LEDs under control by this trigger (for simple triggers) */ | ||
73 | rwlock_t leddev_list_lock; | ||
74 | struct list_head led_cdevs; | ||
75 | |||
76 | /* Link to next registered trigger */ | ||
77 | struct list_head next_trig; | ||
78 | }; | ||
79 | |||
80 | /* Registration functions for complex triggers */ | ||
81 | extern int led_trigger_register(struct led_trigger *trigger); | ||
82 | extern void led_trigger_unregister(struct led_trigger *trigger); | ||
83 | |||
84 | /* Registration functions for simple triggers */ | ||
85 | #define DEFINE_LED_TRIGGER(x) static struct led_trigger *x; | ||
86 | #define DEFINE_LED_TRIGGER_GLOBAL(x) struct led_trigger *x; | ||
87 | extern void led_trigger_register_simple(const char *name, | ||
88 | struct led_trigger **trigger); | ||
89 | extern void led_trigger_unregister_simple(struct led_trigger *trigger); | ||
90 | extern void led_trigger_event(struct led_trigger *trigger, | ||
91 | enum led_brightness event); | ||
92 | |||
93 | #else | ||
94 | |||
95 | /* Triggers aren't active - null macros */ | ||
96 | #define DEFINE_LED_TRIGGER(x) | ||
97 | #define DEFINE_LED_TRIGGER_GLOBAL(x) | ||
98 | #define led_trigger_register_simple(x, y) do {} while(0) | ||
99 | #define led_trigger_unregister_simple(x) do {} while(0) | ||
100 | #define led_trigger_event(x, y) do {} while(0) | ||
101 | |||
102 | #endif | ||
103 | |||
104 | /* Trigger specific functions */ | ||
105 | #ifdef CONFIG_LEDS_TRIGGER_IDE_DISK | ||
106 | extern void ledtrig_ide_activity(void); | ||
107 | #else | ||
108 | #define ledtrig_ide_activity() do {} while(0) | ||
109 | #endif | ||
110 | |||
111 | #endif /* __LINUX_LEDS_H_INCLUDED */ | ||
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 7d09962c3c0b..ff0a64073ebc 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -12,7 +12,7 @@ extern void migrate_page_copy(struct page *, struct page *); | |||
12 | extern int migrate_page_remove_references(struct page *, struct page *, int); | 12 | extern int migrate_page_remove_references(struct page *, struct page *, int); |
13 | extern int migrate_pages(struct list_head *l, struct list_head *t, | 13 | extern int migrate_pages(struct list_head *l, struct list_head *t, |
14 | struct list_head *moved, struct list_head *failed); | 14 | struct list_head *moved, struct list_head *failed); |
15 | int migrate_pages_to(struct list_head *pagelist, | 15 | extern int migrate_pages_to(struct list_head *pagelist, |
16 | struct vm_area_struct *vma, int dest); | 16 | struct vm_area_struct *vma, int dest); |
17 | extern int fail_migrate_page(struct page *, struct page *); | 17 | extern int fail_migrate_page(struct page *, struct page *); |
18 | 18 | ||
@@ -26,6 +26,9 @@ static inline int putback_lru_pages(struct list_head *l) { return 0; } | |||
26 | static inline int migrate_pages(struct list_head *l, struct list_head *t, | 26 | static inline int migrate_pages(struct list_head *l, struct list_head *t, |
27 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } | 27 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } |
28 | 28 | ||
29 | static inline int migrate_pages_to(struct list_head *pagelist, | ||
30 | struct vm_area_struct *vma, int dest) { return 0; } | ||
31 | |||
29 | static inline int migrate_prep(void) { return -ENOSYS; } | 32 | static inline int migrate_prep(void) { return -ENOSYS; } |
30 | 33 | ||
31 | /* Possible settings for the migrate_page() method in address_operations */ | 34 | /* Possible settings for the migrate_page() method in address_operations */ |
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h index f46afec6fbf8..72fc68c5ee96 100644 --- a/include/linux/mtd/blktrans.h +++ b/include/linux/mtd/blktrans.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #ifndef __MTD_TRANS_H__ | 10 | #ifndef __MTD_TRANS_H__ |
11 | #define __MTD_TRANS_H__ | 11 | #define __MTD_TRANS_H__ |
12 | 12 | ||
13 | #include <asm/semaphore.h> | 13 | #include <linux/mutex.h> |
14 | 14 | ||
15 | struct hd_geometry; | 15 | struct hd_geometry; |
16 | struct mtd_info; | 16 | struct mtd_info; |
@@ -22,7 +22,7 @@ struct mtd_blktrans_dev { | |||
22 | struct mtd_blktrans_ops *tr; | 22 | struct mtd_blktrans_ops *tr; |
23 | struct list_head list; | 23 | struct list_head list; |
24 | struct mtd_info *mtd; | 24 | struct mtd_info *mtd; |
25 | struct semaphore sem; | 25 | struct mutex lock; |
26 | int devnum; | 26 | int devnum; |
27 | int blksize; | 27 | int blksize; |
28 | unsigned long size; | 28 | unsigned long size; |
diff --git a/include/linux/mtd/doc2000.h b/include/linux/mtd/doc2000.h index 386a52cf8b1b..9addd073bf15 100644 --- a/include/linux/mtd/doc2000.h +++ b/include/linux/mtd/doc2000.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #define __MTD_DOC2000_H__ | 15 | #define __MTD_DOC2000_H__ |
16 | 16 | ||
17 | #include <linux/mtd/mtd.h> | 17 | #include <linux/mtd/mtd.h> |
18 | #include <asm/semaphore.h> | 18 | #include <linux/mutex.h> |
19 | 19 | ||
20 | #define DoC_Sig1 0 | 20 | #define DoC_Sig1 0 |
21 | #define DoC_Sig2 1 | 21 | #define DoC_Sig2 1 |
@@ -187,7 +187,7 @@ struct DiskOnChip { | |||
187 | int numchips; | 187 | int numchips; |
188 | struct Nand *chips; | 188 | struct Nand *chips; |
189 | struct mtd_info *nextdoc; | 189 | struct mtd_info *nextdoc; |
190 | struct semaphore lock; | 190 | struct mutex lock; |
191 | }; | 191 | }; |
192 | 192 | ||
193 | int doc_decode_ecc(unsigned char sector[512], unsigned char ecc1[6]); | 193 | int doc_decode_ecc(unsigned char sector[512], unsigned char ecc1[6]); |
diff --git a/include/linux/mtd/inftl.h b/include/linux/mtd/inftl.h index 0268125a6271..d7eaa40e5ab0 100644 --- a/include/linux/mtd/inftl.h +++ b/include/linux/mtd/inftl.h | |||
@@ -52,6 +52,11 @@ struct INFTLrecord { | |||
52 | int INFTL_mount(struct INFTLrecord *s); | 52 | int INFTL_mount(struct INFTLrecord *s); |
53 | int INFTL_formatblock(struct INFTLrecord *s, int block); | 53 | int INFTL_formatblock(struct INFTLrecord *s, int block); |
54 | 54 | ||
55 | extern char inftlmountrev[]; | ||
56 | |||
57 | void INFTL_dumptables(struct INFTLrecord *s); | ||
58 | void INFTL_dumpVUchains(struct INFTLrecord *s); | ||
59 | |||
55 | #endif /* __KERNEL__ */ | 60 | #endif /* __KERNEL__ */ |
56 | 61 | ||
57 | #endif /* __MTD_INFTL_H__ */ | 62 | #endif /* __MTD_INFTL_H__ */ |
diff --git a/include/linux/namei.h b/include/linux/namei.h index e6698013e4d0..58cb3d3d44b4 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -75,7 +75,6 @@ extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); | |||
75 | extern void release_open_intent(struct nameidata *); | 75 | extern void release_open_intent(struct nameidata *); |
76 | 76 | ||
77 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); | 77 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); |
78 | extern __deprecated_for_modules struct dentry * lookup_hash(struct nameidata *); | ||
79 | 78 | ||
80 | extern int follow_down(struct vfsmount **, struct dentry **); | 79 | extern int follow_down(struct vfsmount **, struct dentry **); |
81 | extern int follow_up(struct vfsmount **, struct dentry **); | 80 | extern int follow_up(struct vfsmount **, struct dentry **); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 950dc55e5192..40ccf8cc4239 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -598,20 +598,7 @@ DECLARE_PER_CPU(struct softnet_data,softnet_data); | |||
598 | 598 | ||
599 | #define HAVE_NETIF_QUEUE | 599 | #define HAVE_NETIF_QUEUE |
600 | 600 | ||
601 | static inline void __netif_schedule(struct net_device *dev) | 601 | extern void __netif_schedule(struct net_device *dev); |
602 | { | ||
603 | if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) { | ||
604 | unsigned long flags; | ||
605 | struct softnet_data *sd; | ||
606 | |||
607 | local_irq_save(flags); | ||
608 | sd = &__get_cpu_var(softnet_data); | ||
609 | dev->next_sched = sd->output_queue; | ||
610 | sd->output_queue = dev; | ||
611 | raise_softirq_irqoff(NET_TX_SOFTIRQ); | ||
612 | local_irq_restore(flags); | ||
613 | } | ||
614 | } | ||
615 | 602 | ||
616 | static inline void netif_schedule(struct net_device *dev) | 603 | static inline void netif_schedule(struct net_device *dev) |
617 | { | 604 | { |
@@ -675,13 +662,7 @@ static inline void dev_kfree_skb_irq(struct sk_buff *skb) | |||
675 | /* Use this variant in places where it could be invoked | 662 | /* Use this variant in places where it could be invoked |
676 | * either from interrupt or non-interrupt context. | 663 | * either from interrupt or non-interrupt context. |
677 | */ | 664 | */ |
678 | static inline void dev_kfree_skb_any(struct sk_buff *skb) | 665 | extern void dev_kfree_skb_any(struct sk_buff *skb); |
679 | { | ||
680 | if (in_irq() || irqs_disabled()) | ||
681 | dev_kfree_skb_irq(skb); | ||
682 | else | ||
683 | dev_kfree_skb(skb); | ||
684 | } | ||
685 | 666 | ||
686 | #define HAVE_NETIF_RX 1 | 667 | #define HAVE_NETIF_RX 1 |
687 | extern int netif_rx(struct sk_buff *skb); | 668 | extern int netif_rx(struct sk_buff *skb); |
@@ -768,22 +749,9 @@ static inline int netif_device_present(struct net_device *dev) | |||
768 | return test_bit(__LINK_STATE_PRESENT, &dev->state); | 749 | return test_bit(__LINK_STATE_PRESENT, &dev->state); |
769 | } | 750 | } |
770 | 751 | ||
771 | static inline void netif_device_detach(struct net_device *dev) | 752 | extern void netif_device_detach(struct net_device *dev); |
772 | { | ||
773 | if (test_and_clear_bit(__LINK_STATE_PRESENT, &dev->state) && | ||
774 | netif_running(dev)) { | ||
775 | netif_stop_queue(dev); | ||
776 | } | ||
777 | } | ||
778 | 753 | ||
779 | static inline void netif_device_attach(struct net_device *dev) | 754 | extern void netif_device_attach(struct net_device *dev); |
780 | { | ||
781 | if (!test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) && | ||
782 | netif_running(dev)) { | ||
783 | netif_wake_queue(dev); | ||
784 | __netdev_watchdog_up(dev); | ||
785 | } | ||
786 | } | ||
787 | 755 | ||
788 | /* | 756 | /* |
789 | * Network interface message level settings | 757 | * Network interface message level settings |
@@ -851,20 +819,7 @@ static inline int netif_rx_schedule_prep(struct net_device *dev) | |||
851 | * already been called and returned 1. | 819 | * already been called and returned 1. |
852 | */ | 820 | */ |
853 | 821 | ||
854 | static inline void __netif_rx_schedule(struct net_device *dev) | 822 | extern void __netif_rx_schedule(struct net_device *dev); |
855 | { | ||
856 | unsigned long flags; | ||
857 | |||
858 | local_irq_save(flags); | ||
859 | dev_hold(dev); | ||
860 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); | ||
861 | if (dev->quota < 0) | ||
862 | dev->quota += dev->weight; | ||
863 | else | ||
864 | dev->quota = dev->weight; | ||
865 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
866 | local_irq_restore(flags); | ||
867 | } | ||
868 | 823 | ||
869 | /* Try to reschedule poll. Called by irq handler. */ | 824 | /* Try to reschedule poll. Called by irq handler. */ |
870 | 825 | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 839f0b3c23aa..9539efd4f7e6 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -72,8 +72,8 @@ extern struct page * find_get_page(struct address_space *mapping, | |||
72 | unsigned long index); | 72 | unsigned long index); |
73 | extern struct page * find_lock_page(struct address_space *mapping, | 73 | extern struct page * find_lock_page(struct address_space *mapping, |
74 | unsigned long index); | 74 | unsigned long index); |
75 | extern struct page * find_trylock_page(struct address_space *mapping, | 75 | extern __deprecated_for_modules struct page * find_trylock_page( |
76 | unsigned long index); | 76 | struct address_space *mapping, unsigned long index); |
77 | extern struct page * find_or_create_page(struct address_space *mapping, | 77 | extern struct page * find_or_create_page(struct address_space *mapping, |
78 | unsigned long index, gfp_t gfp_mask); | 78 | unsigned long index, gfp_t gfp_mask); |
79 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, | 79 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 5b9082cc600f..29960b03bef7 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_PID_H | 1 | #ifndef _LINUX_PID_H |
2 | #define _LINUX_PID_H | 2 | #define _LINUX_PID_H |
3 | 3 | ||
4 | #include <linux/rcupdate.h> | ||
5 | |||
4 | enum pid_type | 6 | enum pid_type |
5 | { | 7 | { |
6 | PIDTYPE_PID, | 8 | PIDTYPE_PID, |
@@ -9,45 +11,109 @@ enum pid_type | |||
9 | PIDTYPE_MAX | 11 | PIDTYPE_MAX |
10 | }; | 12 | }; |
11 | 13 | ||
14 | /* | ||
15 | * What is struct pid? | ||
16 | * | ||
17 | * A struct pid is the kernel's internal notion of a process identifier. | ||
18 | * It refers to individual tasks, process groups, and sessions. While | ||
19 | * there are processes attached to it the struct pid lives in a hash | ||
20 | * table, so it and then the processes that it refers to can be found | ||
21 | * quickly from the numeric pid value. The attached processes may be | ||
22 | * quickly accessed by following pointers from struct pid. | ||
23 | * | ||
24 | * Storing pid_t values in the kernel and refering to them later has a | ||
25 | * problem. The process originally with that pid may have exited and the | ||
26 | * pid allocator wrapped, and another process could have come along | ||
27 | * and been assigned that pid. | ||
28 | * | ||
29 | * Referring to user space processes by holding a reference to struct | ||
30 | * task_struct has a problem. When the user space process exits | ||
31 | * the now useless task_struct is still kept. A task_struct plus a | ||
32 | * stack consumes around 10K of low kernel memory. More precisely | ||
33 | * this is THREAD_SIZE + sizeof(struct task_struct). By comparison | ||
34 | * a struct pid is about 64 bytes. | ||
35 | * | ||
36 | * Holding a reference to struct pid solves both of these problems. | ||
37 | * It is small so holding a reference does not consume a lot of | ||
38 | * resources, and since a new struct pid is allocated when the numeric | ||
39 | * pid value is reused we don't mistakenly refer to new processes. | ||
40 | */ | ||
41 | |||
12 | struct pid | 42 | struct pid |
13 | { | 43 | { |
44 | atomic_t count; | ||
14 | /* Try to keep pid_chain in the same cacheline as nr for find_pid */ | 45 | /* Try to keep pid_chain in the same cacheline as nr for find_pid */ |
15 | int nr; | 46 | int nr; |
16 | struct hlist_node pid_chain; | 47 | struct hlist_node pid_chain; |
17 | /* list of pids with the same nr, only one of them is in the hash */ | 48 | /* lists of tasks that use this pid */ |
18 | struct list_head pid_list; | 49 | struct hlist_head tasks[PIDTYPE_MAX]; |
50 | struct rcu_head rcu; | ||
19 | }; | 51 | }; |
20 | 52 | ||
21 | #define pid_task(elem, type) \ | 53 | struct pid_link |
22 | list_entry(elem, struct task_struct, pids[type].pid_list) | 54 | { |
55 | struct hlist_node node; | ||
56 | struct pid *pid; | ||
57 | }; | ||
58 | |||
59 | static inline struct pid *get_pid(struct pid *pid) | ||
60 | { | ||
61 | if (pid) | ||
62 | atomic_inc(&pid->count); | ||
63 | return pid; | ||
64 | } | ||
65 | |||
66 | extern void FASTCALL(put_pid(struct pid *pid)); | ||
67 | extern struct task_struct *FASTCALL(pid_task(struct pid *pid, enum pid_type)); | ||
68 | extern struct task_struct *FASTCALL(get_pid_task(struct pid *pid, | ||
69 | enum pid_type)); | ||
23 | 70 | ||
24 | /* | 71 | /* |
25 | * attach_pid() and detach_pid() must be called with the tasklist_lock | 72 | * attach_pid() and detach_pid() must be called with the tasklist_lock |
26 | * write-held. | 73 | * write-held. |
27 | */ | 74 | */ |
28 | extern int FASTCALL(attach_pid(struct task_struct *task, enum pid_type type, int nr)); | 75 | extern int FASTCALL(attach_pid(struct task_struct *task, |
76 | enum pid_type type, int nr)); | ||
29 | 77 | ||
30 | extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type)); | 78 | extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type)); |
31 | 79 | ||
32 | /* | 80 | /* |
33 | * look up a PID in the hash table. Must be called with the tasklist_lock | 81 | * look up a PID in the hash table. Must be called with the tasklist_lock |
34 | * held. | 82 | * or rcu_read_lock() held. |
83 | */ | ||
84 | extern struct pid *FASTCALL(find_pid(int nr)); | ||
85 | |||
86 | /* | ||
87 | * Lookup a PID in the hash table, and return with it's count elevated. | ||
35 | */ | 88 | */ |
36 | extern struct pid *FASTCALL(find_pid(enum pid_type, int)); | 89 | extern struct pid *find_get_pid(int nr); |
37 | 90 | ||
38 | extern int alloc_pidmap(void); | 91 | extern struct pid *alloc_pid(void); |
39 | extern void FASTCALL(free_pidmap(int)); | 92 | extern void FASTCALL(free_pid(struct pid *pid)); |
40 | 93 | ||
94 | #define pid_next(task, type) \ | ||
95 | ((task)->pids[(type)].node.next) | ||
96 | |||
97 | #define pid_next_task(task, type) \ | ||
98 | hlist_entry(pid_next(task, type), struct task_struct, \ | ||
99 | pids[(type)].node) | ||
100 | |||
101 | |||
102 | /* We could use hlist_for_each_entry_rcu here but it takes more arguments | ||
103 | * than the do_each_task_pid/while_each_task_pid. So we roll our own | ||
104 | * to preserve the existing interface. | ||
105 | */ | ||
41 | #define do_each_task_pid(who, type, task) \ | 106 | #define do_each_task_pid(who, type, task) \ |
42 | if ((task = find_task_by_pid_type(type, who))) { \ | 107 | if ((task = find_task_by_pid_type(type, who))) { \ |
43 | prefetch((task)->pids[type].pid_list.next); \ | 108 | prefetch(pid_next(task, type)); \ |
44 | do { | 109 | do { |
45 | 110 | ||
46 | #define while_each_task_pid(who, type, task) \ | 111 | #define while_each_task_pid(who, type, task) \ |
47 | } while (task = pid_task((task)->pids[type].pid_list.next,\ | 112 | } while (pid_next(task, type) && ({ \ |
48 | type), \ | 113 | task = pid_next_task(task, type); \ |
49 | prefetch((task)->pids[type].pid_list.next), \ | 114 | rcu_dereference(task); \ |
50 | hlist_unhashed(&(task)->pids[type].pid_chain)); \ | 115 | prefetch(pid_next(task, type)); \ |
51 | } \ | 116 | 1; }) ); \ |
117 | } | ||
52 | 118 | ||
53 | #endif /* _LINUX_PID_H */ | 119 | #endif /* _LINUX_PID_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index d04186d8cc68..541f4828f5e7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -100,6 +100,7 @@ DECLARE_PER_CPU(unsigned long, process_counts); | |||
100 | extern int nr_processes(void); | 100 | extern int nr_processes(void); |
101 | extern unsigned long nr_running(void); | 101 | extern unsigned long nr_running(void); |
102 | extern unsigned long nr_uninterruptible(void); | 102 | extern unsigned long nr_uninterruptible(void); |
103 | extern unsigned long nr_active(void); | ||
103 | extern unsigned long nr_iowait(void); | 104 | extern unsigned long nr_iowait(void); |
104 | 105 | ||
105 | #include <linux/time.h> | 106 | #include <linux/time.h> |
@@ -483,6 +484,7 @@ struct signal_struct { | |||
483 | #define MAX_PRIO (MAX_RT_PRIO + 40) | 484 | #define MAX_PRIO (MAX_RT_PRIO + 40) |
484 | 485 | ||
485 | #define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) | 486 | #define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) |
487 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) | ||
486 | 488 | ||
487 | /* | 489 | /* |
488 | * Some day this will be a full-fledged user tracking system.. | 490 | * Some day this will be a full-fledged user tracking system.. |
@@ -683,6 +685,13 @@ static inline void prefetch_stack(struct task_struct *t) { } | |||
683 | struct audit_context; /* See audit.c */ | 685 | struct audit_context; /* See audit.c */ |
684 | struct mempolicy; | 686 | struct mempolicy; |
685 | 687 | ||
688 | enum sleep_type { | ||
689 | SLEEP_NORMAL, | ||
690 | SLEEP_NONINTERACTIVE, | ||
691 | SLEEP_INTERACTIVE, | ||
692 | SLEEP_INTERRUPTED, | ||
693 | }; | ||
694 | |||
686 | struct task_struct { | 695 | struct task_struct { |
687 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 696 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
688 | struct thread_info *thread_info; | 697 | struct thread_info *thread_info; |
@@ -705,7 +714,7 @@ struct task_struct { | |||
705 | unsigned long sleep_avg; | 714 | unsigned long sleep_avg; |
706 | unsigned long long timestamp, last_ran; | 715 | unsigned long long timestamp, last_ran; |
707 | unsigned long long sched_time; /* sched_clock time spent running */ | 716 | unsigned long long sched_time; /* sched_clock time spent running */ |
708 | int activated; | 717 | enum sleep_type sleep_type; |
709 | 718 | ||
710 | unsigned long policy; | 719 | unsigned long policy; |
711 | cpumask_t cpus_allowed; | 720 | cpumask_t cpus_allowed; |
@@ -751,7 +760,7 @@ struct task_struct { | |||
751 | struct task_struct *group_leader; /* threadgroup leader */ | 760 | struct task_struct *group_leader; /* threadgroup leader */ |
752 | 761 | ||
753 | /* PID/PID hash table linkage. */ | 762 | /* PID/PID hash table linkage. */ |
754 | struct pid pids[PIDTYPE_MAX]; | 763 | struct pid_link pids[PIDTYPE_MAX]; |
755 | struct list_head thread_group; | 764 | struct list_head thread_group; |
756 | 765 | ||
757 | struct completion *vfork_done; /* for vfork() */ | 766 | struct completion *vfork_done; /* for vfork() */ |
@@ -890,18 +899,19 @@ static inline pid_t process_group(struct task_struct *tsk) | |||
890 | */ | 899 | */ |
891 | static inline int pid_alive(struct task_struct *p) | 900 | static inline int pid_alive(struct task_struct *p) |
892 | { | 901 | { |
893 | return p->pids[PIDTYPE_PID].nr != 0; | 902 | return p->pids[PIDTYPE_PID].pid != NULL; |
894 | } | 903 | } |
895 | 904 | ||
896 | extern void free_task(struct task_struct *tsk); | 905 | extern void free_task(struct task_struct *tsk); |
897 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 906 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
898 | 907 | ||
899 | extern void __put_task_struct_cb(struct rcu_head *rhp); | 908 | extern void __put_task_struct_cb(struct rcu_head *rhp); |
909 | extern void __put_task_struct(struct task_struct *t); | ||
900 | 910 | ||
901 | static inline void put_task_struct(struct task_struct *t) | 911 | static inline void put_task_struct(struct task_struct *t) |
902 | { | 912 | { |
903 | if (atomic_dec_and_test(&t->usage)) | 913 | if (atomic_dec_and_test(&t->usage)) |
904 | call_rcu(&t->rcu, __put_task_struct_cb); | 914 | __put_task_struct(t); |
905 | } | 915 | } |
906 | 916 | ||
907 | /* | 917 | /* |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 613b9513f8b9..c4619a428d9b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -941,6 +941,25 @@ static inline void skb_reserve(struct sk_buff *skb, int len) | |||
941 | #define NET_IP_ALIGN 2 | 941 | #define NET_IP_ALIGN 2 |
942 | #endif | 942 | #endif |
943 | 943 | ||
944 | /* | ||
945 | * The networking layer reserves some headroom in skb data (via | ||
946 | * dev_alloc_skb). This is used to avoid having to reallocate skb data when | ||
947 | * the header has to grow. In the default case, if the header has to grow | ||
948 | * 16 bytes or less we avoid the reallocation. | ||
949 | * | ||
950 | * Unfortunately this headroom changes the DMA alignment of the resulting | ||
951 | * network packet. As for NET_IP_ALIGN, this unaligned DMA is expensive | ||
952 | * on some architectures. An architecture can override this value, | ||
953 | * perhaps setting it to a cacheline in size (since that will maintain | ||
954 | * cacheline alignment of the DMA). It must be a power of 2. | ||
955 | * | ||
956 | * Various parts of the networking layer expect at least 16 bytes of | ||
957 | * headroom, you should not reduce this. | ||
958 | */ | ||
959 | #ifndef NET_SKB_PAD | ||
960 | #define NET_SKB_PAD 16 | ||
961 | #endif | ||
962 | |||
944 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc); | 963 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc); |
945 | 964 | ||
946 | static inline void __skb_trim(struct sk_buff *skb, unsigned int len) | 965 | static inline void __skb_trim(struct sk_buff *skb, unsigned int len) |
@@ -1030,9 +1049,9 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
1030 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | 1049 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, |
1031 | gfp_t gfp_mask) | 1050 | gfp_t gfp_mask) |
1032 | { | 1051 | { |
1033 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); | 1052 | struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD, gfp_mask); |
1034 | if (likely(skb)) | 1053 | if (likely(skb)) |
1035 | skb_reserve(skb, 16); | 1054 | skb_reserve(skb, NET_SKB_PAD); |
1036 | return skb; | 1055 | return skb; |
1037 | } | 1056 | } |
1038 | #else | 1057 | #else |
@@ -1070,13 +1089,15 @@ static inline struct sk_buff *dev_alloc_skb(unsigned int length) | |||
1070 | */ | 1089 | */ |
1071 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) | 1090 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) |
1072 | { | 1091 | { |
1073 | int delta = (headroom > 16 ? headroom : 16) - skb_headroom(skb); | 1092 | int delta = (headroom > NET_SKB_PAD ? headroom : NET_SKB_PAD) - |
1093 | skb_headroom(skb); | ||
1074 | 1094 | ||
1075 | if (delta < 0) | 1095 | if (delta < 0) |
1076 | delta = 0; | 1096 | delta = 0; |
1077 | 1097 | ||
1078 | if (delta || skb_cloned(skb)) | 1098 | if (delta || skb_cloned(skb)) |
1079 | return pskb_expand_head(skb, (delta + 15) & ~15, 0, GFP_ATOMIC); | 1099 | return pskb_expand_head(skb, (delta + (NET_SKB_PAD-1)) & |
1100 | ~(NET_SKB_PAD-1), 0, GFP_ATOMIC); | ||
1080 | return 0; | 1101 | return 0; |
1081 | } | 1102 | } |
1082 | 1103 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index e78ffc7d5b56..5717147596b6 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -571,5 +571,7 @@ asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | |||
571 | asmlinkage long sys_unshare(unsigned long unshare_flags); | 571 | asmlinkage long sys_unshare(unsigned long unshare_flags); |
572 | asmlinkage long sys_splice(int fdin, int fdout, size_t len, | 572 | asmlinkage long sys_splice(int fdin, int fdout, size_t len, |
573 | unsigned int flags); | 573 | unsigned int flags); |
574 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | ||
575 | int flags); | ||
574 | 576 | ||
575 | #endif | 577 | #endif |
diff --git a/include/linux/timer.h b/include/linux/timer.h index b5caabca553c..0a485beba9f5 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/stddef.h> | 7 | #include <linux/stddef.h> |
8 | 8 | ||
9 | struct timer_base_s; | 9 | struct tvec_t_base_s; |
10 | 10 | ||
11 | struct timer_list { | 11 | struct timer_list { |
12 | struct list_head entry; | 12 | struct list_head entry; |
@@ -15,16 +15,16 @@ struct timer_list { | |||
15 | void (*function)(unsigned long); | 15 | void (*function)(unsigned long); |
16 | unsigned long data; | 16 | unsigned long data; |
17 | 17 | ||
18 | struct timer_base_s *base; | 18 | struct tvec_t_base_s *base; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | extern struct timer_base_s __init_timer_base; | 21 | extern struct tvec_t_base_s boot_tvec_bases; |
22 | 22 | ||
23 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ | 23 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ |
24 | .function = (_function), \ | 24 | .function = (_function), \ |
25 | .expires = (_expires), \ | 25 | .expires = (_expires), \ |
26 | .data = (_data), \ | 26 | .data = (_data), \ |
27 | .base = &__init_timer_base, \ | 27 | .base = &boot_tvec_bases, \ |
28 | } | 28 | } |
29 | 29 | ||
30 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ | 30 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ |
diff --git a/include/linux/tiocl.h b/include/linux/tiocl.h index 2c9e847f6ed1..4756862c4ed4 100644 --- a/include/linux/tiocl.h +++ b/include/linux/tiocl.h | |||
@@ -34,5 +34,6 @@ struct tiocl_selection { | |||
34 | #define TIOCL_SCROLLCONSOLE 13 /* scroll console */ | 34 | #define TIOCL_SCROLLCONSOLE 13 /* scroll console */ |
35 | #define TIOCL_BLANKSCREEN 14 /* keep screen blank even if a key is pressed */ | 35 | #define TIOCL_BLANKSCREEN 14 /* keep screen blank even if a key is pressed */ |
36 | #define TIOCL_BLANKEDSCREEN 15 /* return which vt was blanked */ | 36 | #define TIOCL_BLANKEDSCREEN 15 /* return which vt was blanked */ |
37 | #define TIOCL_GETKMSGREDIRECT 17 /* get the vt the kernel messages are restricted to */ | ||
37 | 38 | ||
38 | #endif /* _LINUX_TIOCL_H */ | 39 | #endif /* _LINUX_TIOCL_H */ |