diff options
| author | Len Brown <len.brown@intel.com> | 2006-12-20 02:53:13 -0500 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2006-12-20 02:53:13 -0500 |
| commit | 9774f3384125912eb491ca77f77907324db3ed05 (patch) | |
| tree | 0bdc7486e911dd9e955b41283ee19ac74521f7bd /include/linux | |
| parent | 3be11c8f4f2fa194834c2e83540f34da442b8977 (diff) | |
| parent | f238085415c56618e042252894f2fcc971add645 (diff) | |
merge linus into test branch
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/connector.h | 2 | ||||
| -rw-r--r-- | include/linux/input.h | 15 | ||||
| -rw-r--r-- | include/linux/unwind.h | 63 | ||||
| -rw-r--r-- | include/linux/workqueue.h | 36 |
4 files changed, 42 insertions, 74 deletions
diff --git a/include/linux/connector.h b/include/linux/connector.h index 3ea1cd58de97..10eb56b2940a 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
| @@ -133,7 +133,7 @@ struct cn_callback_data { | |||
| 133 | struct cn_callback_entry { | 133 | struct cn_callback_entry { |
| 134 | struct list_head callback_entry; | 134 | struct list_head callback_entry; |
| 135 | struct cn_callback *cb; | 135 | struct cn_callback *cb; |
| 136 | struct delayed_work work; | 136 | struct work_struct work; |
| 137 | struct cn_queue_dev *pdev; | 137 | struct cn_queue_dev *pdev; |
| 138 | 138 | ||
| 139 | struct cn_callback_id id; | 139 | struct cn_callback_id id; |
diff --git a/include/linux/input.h b/include/linux/input.h index 4e61158b06a0..bde65c8a3519 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -491,6 +491,21 @@ struct input_absinfo { | |||
| 491 | #define KEY_DIGITS 0x19d | 491 | #define KEY_DIGITS 0x19d |
| 492 | #define KEY_TEEN 0x19e | 492 | #define KEY_TEEN 0x19e |
| 493 | #define KEY_TWEN 0x19f | 493 | #define KEY_TWEN 0x19f |
| 494 | #define KEY_VIDEOPHONE 0x1a0 | ||
| 495 | #define KEY_GAMES 0x1a1 | ||
| 496 | #define KEY_ZOOMIN 0x1a2 | ||
| 497 | #define KEY_ZOOMOUT 0x1a3 | ||
| 498 | #define KEY_ZOOMRESET 0x1a4 | ||
| 499 | #define KEY_WORDPROCESSOR 0x1a5 | ||
| 500 | #define KEY_EDITOR 0x1a6 | ||
| 501 | #define KEY_SPREADSHEET 0x1a7 | ||
| 502 | #define KEY_GRAPHICSEDITOR 0x1a8 | ||
| 503 | #define KEY_PRESENTATION 0x1a9 | ||
| 504 | #define KEY_DATABASE 0x1aa | ||
| 505 | #define KEY_NEWS 0x1ab | ||
| 506 | #define KEY_VOICEMAIL 0x1ac | ||
| 507 | #define KEY_ADDRESSBOOK 0x1ad | ||
| 508 | #define KEY_MESSENGER 0x1ae | ||
| 494 | 509 | ||
| 495 | #define KEY_DEL_EOL 0x1c0 | 510 | #define KEY_DEL_EOL 0x1c0 |
| 496 | #define KEY_DEL_EOS 0x1c1 | 511 | #define KEY_DEL_EOS 0x1c1 |
diff --git a/include/linux/unwind.h b/include/linux/unwind.h index 749928c161fb..7760860fa170 100644 --- a/include/linux/unwind.h +++ b/include/linux/unwind.h | |||
| @@ -14,63 +14,6 @@ | |||
| 14 | 14 | ||
| 15 | struct module; | 15 | struct module; |
| 16 | 16 | ||
| 17 | #ifdef CONFIG_STACK_UNWIND | ||
| 18 | |||
| 19 | #include <asm/unwind.h> | ||
| 20 | |||
| 21 | #ifndef ARCH_UNWIND_SECTION_NAME | ||
| 22 | #define ARCH_UNWIND_SECTION_NAME ".eh_frame" | ||
| 23 | #endif | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Initialize unwind support. | ||
| 27 | */ | ||
| 28 | extern void unwind_init(void); | ||
| 29 | extern void unwind_setup(void); | ||
| 30 | |||
| 31 | #ifdef CONFIG_MODULES | ||
| 32 | |||
| 33 | extern void *unwind_add_table(struct module *, | ||
| 34 | const void *table_start, | ||
| 35 | unsigned long table_size); | ||
| 36 | |||
| 37 | extern void unwind_remove_table(void *handle, int init_only); | ||
| 38 | |||
| 39 | #endif | ||
| 40 | |||
| 41 | extern int unwind_init_frame_info(struct unwind_frame_info *, | ||
| 42 | struct task_struct *, | ||
| 43 | /*const*/ struct pt_regs *); | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Prepare to unwind a blocked task. | ||
| 47 | */ | ||
| 48 | extern int unwind_init_blocked(struct unwind_frame_info *, | ||
| 49 | struct task_struct *); | ||
| 50 | |||
| 51 | /* | ||
| 52 | * Prepare to unwind the currently running thread. | ||
| 53 | */ | ||
| 54 | extern int unwind_init_running(struct unwind_frame_info *, | ||
| 55 | asmlinkage int (*callback)(struct unwind_frame_info *, | ||
| 56 | void *arg), | ||
| 57 | void *arg); | ||
| 58 | |||
| 59 | /* | ||
| 60 | * Unwind to previous to frame. Returns 0 if successful, negative | ||
| 61 | * number in case of an error. | ||
| 62 | */ | ||
| 63 | extern int unwind(struct unwind_frame_info *); | ||
| 64 | |||
| 65 | /* | ||
| 66 | * Unwind until the return pointer is in user-land (or until an error | ||
| 67 | * occurs). Returns 0 if successful, negative number in case of | ||
| 68 | * error. | ||
| 69 | */ | ||
| 70 | extern int unwind_to_user(struct unwind_frame_info *); | ||
| 71 | |||
| 72 | #else | ||
| 73 | |||
| 74 | struct unwind_frame_info {}; | 17 | struct unwind_frame_info {}; |
| 75 | 18 | ||
| 76 | static inline void unwind_init(void) {} | 19 | static inline void unwind_init(void) {} |
| @@ -85,12 +28,12 @@ static inline void *unwind_add_table(struct module *mod, | |||
| 85 | return NULL; | 28 | return NULL; |
| 86 | } | 29 | } |
| 87 | 30 | ||
| 88 | #endif | ||
| 89 | |||
| 90 | static inline void unwind_remove_table(void *handle, int init_only) | 31 | static inline void unwind_remove_table(void *handle, int init_only) |
| 91 | { | 32 | { |
| 92 | } | 33 | } |
| 93 | 34 | ||
| 35 | #endif | ||
| 36 | |||
| 94 | static inline int unwind_init_frame_info(struct unwind_frame_info *info, | 37 | static inline int unwind_init_frame_info(struct unwind_frame_info *info, |
| 95 | struct task_struct *tsk, | 38 | struct task_struct *tsk, |
| 96 | const struct pt_regs *regs) | 39 | const struct pt_regs *regs) |
| @@ -122,6 +65,4 @@ static inline int unwind_to_user(struct unwind_frame_info *info) | |||
| 122 | return -ENOSYS; | 65 | return -ENOSYS; |
| 123 | } | 66 | } |
| 124 | 67 | ||
| 125 | #endif | ||
| 126 | |||
| 127 | #endif /* _LINUX_UNWIND_H */ | 68 | #endif /* _LINUX_UNWIND_H */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index edef8d50b26b..2a7b38d87018 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -8,16 +8,21 @@ | |||
| 8 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
| 9 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
| 10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
| 11 | #include <asm/atomic.h> | ||
| 11 | 12 | ||
| 12 | struct workqueue_struct; | 13 | struct workqueue_struct; |
| 13 | 14 | ||
| 14 | struct work_struct; | 15 | struct work_struct; |
| 15 | typedef void (*work_func_t)(struct work_struct *work); | 16 | typedef void (*work_func_t)(struct work_struct *work); |
| 16 | 17 | ||
| 18 | /* | ||
| 19 | * The first word is the work queue pointer and the flags rolled into | ||
| 20 | * one | ||
| 21 | */ | ||
| 22 | #define work_data_bits(work) ((unsigned long *)(&(work)->data)) | ||
| 23 | |||
| 17 | struct work_struct { | 24 | struct work_struct { |
| 18 | /* the first word is the work queue pointer and the flags rolled into | 25 | atomic_long_t data; |
| 19 | * one */ | ||
| 20 | unsigned long management; | ||
| 21 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ | 26 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ |
| 22 | #define WORK_STRUCT_NOAUTOREL 1 /* F if work item automatically released on exec */ | 27 | #define WORK_STRUCT_NOAUTOREL 1 /* F if work item automatically released on exec */ |
| 23 | #define WORK_STRUCT_FLAG_MASK (3UL) | 28 | #define WORK_STRUCT_FLAG_MASK (3UL) |
| @@ -26,6 +31,9 @@ struct work_struct { | |||
| 26 | work_func_t func; | 31 | work_func_t func; |
| 27 | }; | 32 | }; |
| 28 | 33 | ||
| 34 | #define WORK_DATA_INIT(autorelease) \ | ||
| 35 | ATOMIC_LONG_INIT((autorelease) << WORK_STRUCT_NOAUTOREL) | ||
| 36 | |||
| 29 | struct delayed_work { | 37 | struct delayed_work { |
| 30 | struct work_struct work; | 38 | struct work_struct work; |
| 31 | struct timer_list timer; | 39 | struct timer_list timer; |
| @@ -36,13 +44,13 @@ struct execute_work { | |||
| 36 | }; | 44 | }; |
| 37 | 45 | ||
| 38 | #define __WORK_INITIALIZER(n, f) { \ | 46 | #define __WORK_INITIALIZER(n, f) { \ |
| 39 | .management = 0, \ | 47 | .data = WORK_DATA_INIT(0), \ |
| 40 | .entry = { &(n).entry, &(n).entry }, \ | 48 | .entry = { &(n).entry, &(n).entry }, \ |
| 41 | .func = (f), \ | 49 | .func = (f), \ |
| 42 | } | 50 | } |
| 43 | 51 | ||
| 44 | #define __WORK_INITIALIZER_NAR(n, f) { \ | 52 | #define __WORK_INITIALIZER_NAR(n, f) { \ |
| 45 | .management = (1 << WORK_STRUCT_NOAUTOREL), \ | 53 | .data = WORK_DATA_INIT(1), \ |
| 46 | .entry = { &(n).entry, &(n).entry }, \ | 54 | .entry = { &(n).entry, &(n).entry }, \ |
| 47 | .func = (f), \ | 55 | .func = (f), \ |
| 48 | } | 56 | } |
| @@ -82,17 +90,21 @@ struct execute_work { | |||
| 82 | 90 | ||
| 83 | /* | 91 | /* |
| 84 | * initialize all of a work item in one go | 92 | * initialize all of a work item in one go |
| 93 | * | ||
| 94 | * NOTE! No point in using "atomic_long_set()": useing a direct | ||
| 95 | * assignment of the work data initializer allows the compiler | ||
| 96 | * to generate better code. | ||
| 85 | */ | 97 | */ |
| 86 | #define INIT_WORK(_work, _func) \ | 98 | #define INIT_WORK(_work, _func) \ |
| 87 | do { \ | 99 | do { \ |
| 88 | (_work)->management = 0; \ | 100 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(0); \ |
| 89 | INIT_LIST_HEAD(&(_work)->entry); \ | 101 | INIT_LIST_HEAD(&(_work)->entry); \ |
| 90 | PREPARE_WORK((_work), (_func)); \ | 102 | PREPARE_WORK((_work), (_func)); \ |
| 91 | } while (0) | 103 | } while (0) |
| 92 | 104 | ||
| 93 | #define INIT_WORK_NAR(_work, _func) \ | 105 | #define INIT_WORK_NAR(_work, _func) \ |
| 94 | do { \ | 106 | do { \ |
| 95 | (_work)->management = (1 << WORK_STRUCT_NOAUTOREL); \ | 107 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(1); \ |
| 96 | INIT_LIST_HEAD(&(_work)->entry); \ | 108 | INIT_LIST_HEAD(&(_work)->entry); \ |
| 97 | PREPARE_WORK((_work), (_func)); \ | 109 | PREPARE_WORK((_work), (_func)); \ |
| 98 | } while (0) | 110 | } while (0) |
| @@ -114,15 +126,15 @@ struct execute_work { | |||
| 114 | * @work: The work item in question | 126 | * @work: The work item in question |
| 115 | */ | 127 | */ |
| 116 | #define work_pending(work) \ | 128 | #define work_pending(work) \ |
| 117 | test_bit(WORK_STRUCT_PENDING, &(work)->management) | 129 | test_bit(WORK_STRUCT_PENDING, work_data_bits(work)) |
| 118 | 130 | ||
| 119 | /** | 131 | /** |
| 120 | * delayed_work_pending - Find out whether a delayable work item is currently | 132 | * delayed_work_pending - Find out whether a delayable work item is currently |
| 121 | * pending | 133 | * pending |
| 122 | * @work: The work item in question | 134 | * @work: The work item in question |
| 123 | */ | 135 | */ |
| 124 | #define delayed_work_pending(work) \ | 136 | #define delayed_work_pending(w) \ |
| 125 | test_bit(WORK_STRUCT_PENDING, &(work)->work.management) | 137 | work_pending(&(w)->work) |
| 126 | 138 | ||
| 127 | /** | 139 | /** |
| 128 | * work_release - Release a work item under execution | 140 | * work_release - Release a work item under execution |
| @@ -143,7 +155,7 @@ struct execute_work { | |||
| 143 | * This should also be used to release a delayed work item. | 155 | * This should also be used to release a delayed work item. |
| 144 | */ | 156 | */ |
| 145 | #define work_release(work) \ | 157 | #define work_release(work) \ |
| 146 | clear_bit(WORK_STRUCT_PENDING, &(work)->management) | 158 | clear_bit(WORK_STRUCT_PENDING, work_data_bits(work)) |
| 147 | 159 | ||
| 148 | 160 | ||
| 149 | extern struct workqueue_struct *__create_workqueue(const char *name, | 161 | extern struct workqueue_struct *__create_workqueue(const char *name, |
| @@ -188,7 +200,7 @@ static inline int cancel_delayed_work(struct delayed_work *work) | |||
| 188 | 200 | ||
| 189 | ret = del_timer_sync(&work->timer); | 201 | ret = del_timer_sync(&work->timer); |
| 190 | if (ret) | 202 | if (ret) |
| 191 | clear_bit(WORK_STRUCT_PENDING, &work->work.management); | 203 | work_release(&work->work); |
| 192 | return ret; | 204 | return ret; |
| 193 | } | 205 | } |
| 194 | 206 | ||
