diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-17 21:19:25 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-17 21:19:25 -0500 |
commit | 82a0a1cc8f94bc59e5919715bc03fc8353fa770d (patch) | |
tree | c25f19a0ae1f7cb75319b585c1d473cfed463f22 /include | |
parent | 8d30c14cab30d405a05f2aaceda1e9ad57800f36 (diff) | |
parent | 5955c7a2cfb6a35429adea5dc480002b15ca8cfc (diff) |
Merge commit 'origin/master' into next
Manual merge of:
arch/powerpc/include/asm/pgtable-ppc32.h
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-frv/pgtable.h | 2 | ||||
-rw-r--r-- | include/linux/cgroup.h | 1 | ||||
-rw-r--r-- | include/linux/init_task.h | 11 | ||||
-rw-r--r-- | include/linux/jbd2.h | 3 | ||||
-rw-r--r-- | include/linux/kvm.h | 10 | ||||
-rw-r--r-- | include/linux/kvm_host.h | 1 | ||||
-rw-r--r-- | include/linux/mm.h | 1 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
-rw-r--r-- | include/linux/pkt_sched.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 64 | ||||
-rw-r--r-- | include/linux/soundcard.h | 74 | ||||
-rw-r--r-- | include/linux/syscalls.h | 28 | ||||
-rw-r--r-- | include/net/sock.h | 2 |
13 files changed, 90 insertions, 110 deletions
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index 83c51aba534b..e16fdb1f4f4f 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
@@ -478,7 +478,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
478 | #define __swp_type(x) (((x).val >> 2) & 0x1f) | 478 | #define __swp_type(x) (((x).val >> 2) & 0x1f) |
479 | #define __swp_offset(x) ((x).val >> 8) | 479 | #define __swp_offset(x) ((x).val >> 8) |
480 | #define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 2) | ((offset) << 8) }) | 480 | #define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 2) | ((offset) << 8) }) |
481 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte }) | 481 | #define __pte_to_swp_entry(_pte) ((swp_entry_t) { (_pte).pte }) |
482 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 482 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
483 | 483 | ||
484 | static inline int pte_file(pte_t pte) | 484 | static inline int pte_file(pte_t pte) |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e4e8e117d27d..499900d0cee7 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -378,6 +378,7 @@ struct cgroup_subsys { | |||
378 | * - initiating hotplug events | 378 | * - initiating hotplug events |
379 | */ | 379 | */ |
380 | struct mutex hierarchy_mutex; | 380 | struct mutex hierarchy_mutex; |
381 | struct lock_class_key subsys_key; | ||
381 | 382 | ||
382 | /* | 383 | /* |
383 | * Link to parent, and list entry in parent's children. | 384 | * Link to parent, and list entry in parent's children. |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index ea0ea1a4c36f..e752d973fa21 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -48,12 +48,11 @@ extern struct fs_struct init_fs; | |||
48 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ | 48 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ |
49 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ | 49 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ |
50 | .rlim = INIT_RLIMITS, \ | 50 | .rlim = INIT_RLIMITS, \ |
51 | .cputime = { .totals = { \ | 51 | .cputimer = { \ |
52 | .utime = cputime_zero, \ | 52 | .cputime = INIT_CPUTIME, \ |
53 | .stime = cputime_zero, \ | 53 | .running = 0, \ |
54 | .sum_exec_runtime = 0, \ | 54 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \ |
55 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputime.totals.lock), \ | 55 | }, \ |
56 | }, }, \ | ||
57 | } | 56 | } |
58 | 57 | ||
59 | extern struct nsproxy init_nsproxy; | 58 | extern struct nsproxy init_nsproxy; |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index b28b37eb11c6..4d248b3f1323 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1150,7 +1150,8 @@ extern int jbd2_journal_clear_err (journal_t *); | |||
1150 | extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *); | 1150 | extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *); |
1151 | extern int jbd2_journal_force_commit(journal_t *); | 1151 | extern int jbd2_journal_force_commit(journal_t *); |
1152 | extern int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *inode); | 1152 | extern int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *inode); |
1153 | extern int jbd2_journal_begin_ordered_truncate(struct jbd2_inode *inode, loff_t new_size); | 1153 | extern int jbd2_journal_begin_ordered_truncate(journal_t *journal, |
1154 | struct jbd2_inode *inode, loff_t new_size); | ||
1154 | extern void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode); | 1155 | extern void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode); |
1155 | extern void jbd2_journal_release_jbd_inode(journal_t *journal, struct jbd2_inode *jinode); | 1156 | extern void jbd2_journal_release_jbd_inode(journal_t *journal, struct jbd2_inode *jinode); |
1156 | 1157 | ||
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 5715f1907601..0424326f1679 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -58,10 +58,10 @@ struct kvm_irqchip { | |||
58 | __u32 pad; | 58 | __u32 pad; |
59 | union { | 59 | union { |
60 | char dummy[512]; /* reserving space */ | 60 | char dummy[512]; /* reserving space */ |
61 | #ifdef CONFIG_X86 | 61 | #ifdef __KVM_HAVE_PIT |
62 | struct kvm_pic_state pic; | 62 | struct kvm_pic_state pic; |
63 | #endif | 63 | #endif |
64 | #if defined(CONFIG_X86) || defined(CONFIG_IA64) | 64 | #ifdef __KVM_HAVE_IOAPIC |
65 | struct kvm_ioapic_state ioapic; | 65 | struct kvm_ioapic_state ioapic; |
66 | #endif | 66 | #endif |
67 | } chip; | 67 | } chip; |
@@ -384,16 +384,16 @@ struct kvm_trace_rec { | |||
384 | #define KVM_CAP_MP_STATE 14 | 384 | #define KVM_CAP_MP_STATE 14 |
385 | #define KVM_CAP_COALESCED_MMIO 15 | 385 | #define KVM_CAP_COALESCED_MMIO 15 |
386 | #define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ | 386 | #define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ |
387 | #if defined(CONFIG_X86)||defined(CONFIG_IA64) | 387 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT |
388 | #define KVM_CAP_DEVICE_ASSIGNMENT 17 | 388 | #define KVM_CAP_DEVICE_ASSIGNMENT 17 |
389 | #endif | 389 | #endif |
390 | #define KVM_CAP_IOMMU 18 | 390 | #define KVM_CAP_IOMMU 18 |
391 | #if defined(CONFIG_X86) | 391 | #ifdef __KVM_HAVE_MSI |
392 | #define KVM_CAP_DEVICE_MSI 20 | 392 | #define KVM_CAP_DEVICE_MSI 20 |
393 | #endif | 393 | #endif |
394 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ | 394 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ |
395 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 | 395 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 |
396 | #if defined(CONFIG_X86) | 396 | #ifdef __KVM_HAVE_USER_NMI |
397 | #define KVM_CAP_USER_NMI 22 | 397 | #define KVM_CAP_USER_NMI 22 |
398 | #endif | 398 | #endif |
399 | 399 | ||
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ec49d0be7f52..bf6f703642fc 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -285,6 +285,7 @@ void kvm_free_physmem(struct kvm *kvm); | |||
285 | struct kvm *kvm_arch_create_vm(void); | 285 | struct kvm *kvm_arch_create_vm(void); |
286 | void kvm_arch_destroy_vm(struct kvm *kvm); | 286 | void kvm_arch_destroy_vm(struct kvm *kvm); |
287 | void kvm_free_all_assigned_devices(struct kvm *kvm); | 287 | void kvm_free_all_assigned_devices(struct kvm *kvm); |
288 | void kvm_arch_sync_events(struct kvm *kvm); | ||
288 | 289 | ||
289 | int kvm_cpu_get_interrupt(struct kvm_vcpu *v); | 290 | int kvm_cpu_get_interrupt(struct kvm_vcpu *v); |
290 | int kvm_cpu_has_interrupt(struct kvm_vcpu *v); | 291 | int kvm_cpu_has_interrupt(struct kvm_vcpu *v); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 323561582c10..7dc04ff5ab89 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1304,5 +1304,6 @@ void vmemmap_populate_print_last(void); | |||
1304 | 1304 | ||
1305 | extern void *alloc_locked_buffer(size_t size); | 1305 | extern void *alloc_locked_buffer(size_t size); |
1306 | extern void free_locked_buffer(void *buffer, size_t size); | 1306 | extern void free_locked_buffer(void *buffer, size_t size); |
1307 | extern void release_locked_buffer(void *buffer, size_t size); | ||
1307 | #endif /* __KERNEL__ */ | 1308 | #endif /* __KERNEL__ */ |
1308 | #endif /* _LINUX_MM_H */ | 1309 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b20ab9d642dc..807f1ad8b760 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1312,6 +1312,7 @@ | |||
1312 | #define PCI_DEVICE_ID_VIA_VT3351 0x0351 | 1312 | #define PCI_DEVICE_ID_VIA_VT3351 0x0351 |
1313 | #define PCI_DEVICE_ID_VIA_VT3364 0x0364 | 1313 | #define PCI_DEVICE_ID_VIA_VT3364 0x0364 |
1314 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 | 1314 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 |
1315 | #define PCI_DEVICE_ID_VIA_6415 0x0415 | ||
1315 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 | 1316 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 |
1316 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 | 1317 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 |
1317 | #define PCI_DEVICE_ID_VIA_82C586_1 0x0571 | 1318 | #define PCI_DEVICE_ID_VIA_82C586_1 0x0571 |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index b2648e8e4987..d51a2b3e221e 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -515,7 +515,7 @@ enum | |||
515 | 515 | ||
516 | struct tc_drr_stats | 516 | struct tc_drr_stats |
517 | { | 517 | { |
518 | u32 deficit; | 518 | __u32 deficit; |
519 | }; | 519 | }; |
520 | 520 | ||
521 | #endif | 521 | #endif |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2127e959e0f4..8981e52c714f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -443,7 +443,6 @@ struct pacct_struct { | |||
443 | * @utime: time spent in user mode, in &cputime_t units | 443 | * @utime: time spent in user mode, in &cputime_t units |
444 | * @stime: time spent in kernel mode, in &cputime_t units | 444 | * @stime: time spent in kernel mode, in &cputime_t units |
445 | * @sum_exec_runtime: total time spent on the CPU, in nanoseconds | 445 | * @sum_exec_runtime: total time spent on the CPU, in nanoseconds |
446 | * @lock: lock for fields in this struct | ||
447 | * | 446 | * |
448 | * This structure groups together three kinds of CPU time that are | 447 | * This structure groups together three kinds of CPU time that are |
449 | * tracked for threads and thread groups. Most things considering | 448 | * tracked for threads and thread groups. Most things considering |
@@ -454,23 +453,33 @@ struct task_cputime { | |||
454 | cputime_t utime; | 453 | cputime_t utime; |
455 | cputime_t stime; | 454 | cputime_t stime; |
456 | unsigned long long sum_exec_runtime; | 455 | unsigned long long sum_exec_runtime; |
457 | spinlock_t lock; | ||
458 | }; | 456 | }; |
459 | /* Alternate field names when used to cache expirations. */ | 457 | /* Alternate field names when used to cache expirations. */ |
460 | #define prof_exp stime | 458 | #define prof_exp stime |
461 | #define virt_exp utime | 459 | #define virt_exp utime |
462 | #define sched_exp sum_exec_runtime | 460 | #define sched_exp sum_exec_runtime |
463 | 461 | ||
462 | #define INIT_CPUTIME \ | ||
463 | (struct task_cputime) { \ | ||
464 | .utime = cputime_zero, \ | ||
465 | .stime = cputime_zero, \ | ||
466 | .sum_exec_runtime = 0, \ | ||
467 | } | ||
468 | |||
464 | /** | 469 | /** |
465 | * struct thread_group_cputime - thread group interval timer counts | 470 | * struct thread_group_cputimer - thread group interval timer counts |
466 | * @totals: thread group interval timers; substructure for | 471 | * @cputime: thread group interval timers. |
467 | * uniprocessor kernel, per-cpu for SMP kernel. | 472 | * @running: non-zero when there are timers running and |
473 | * @cputime receives updates. | ||
474 | * @lock: lock for fields in this struct. | ||
468 | * | 475 | * |
469 | * This structure contains the version of task_cputime, above, that is | 476 | * This structure contains the version of task_cputime, above, that is |
470 | * used for thread group CPU clock calculations. | 477 | * used for thread group CPU timer calculations. |
471 | */ | 478 | */ |
472 | struct thread_group_cputime { | 479 | struct thread_group_cputimer { |
473 | struct task_cputime totals; | 480 | struct task_cputime cputime; |
481 | int running; | ||
482 | spinlock_t lock; | ||
474 | }; | 483 | }; |
475 | 484 | ||
476 | /* | 485 | /* |
@@ -519,10 +528,10 @@ struct signal_struct { | |||
519 | cputime_t it_prof_incr, it_virt_incr; | 528 | cputime_t it_prof_incr, it_virt_incr; |
520 | 529 | ||
521 | /* | 530 | /* |
522 | * Thread group totals for process CPU clocks. | 531 | * Thread group totals for process CPU timers. |
523 | * See thread_group_cputime(), et al, for details. | 532 | * See thread_group_cputimer(), et al, for details. |
524 | */ | 533 | */ |
525 | struct thread_group_cputime cputime; | 534 | struct thread_group_cputimer cputimer; |
526 | 535 | ||
527 | /* Earliest-expiration cache. */ | 536 | /* Earliest-expiration cache. */ |
528 | struct task_cputime cputime_expires; | 537 | struct task_cputime cputime_expires; |
@@ -559,7 +568,7 @@ struct signal_struct { | |||
559 | * Live threads maintain their own counters and add to these | 568 | * Live threads maintain their own counters and add to these |
560 | * in __exit_signal, except for the group leader. | 569 | * in __exit_signal, except for the group leader. |
561 | */ | 570 | */ |
562 | cputime_t cutime, cstime; | 571 | cputime_t utime, stime, cutime, cstime; |
563 | cputime_t gtime; | 572 | cputime_t gtime; |
564 | cputime_t cgtime; | 573 | cputime_t cgtime; |
565 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 574 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
@@ -568,6 +577,14 @@ struct signal_struct { | |||
568 | struct task_io_accounting ioac; | 577 | struct task_io_accounting ioac; |
569 | 578 | ||
570 | /* | 579 | /* |
580 | * Cumulative ns of schedule CPU time fo dead threads in the | ||
581 | * group, not including a zombie group leader, (This only differs | ||
582 | * from jiffies_to_ns(utime + stime) if sched_clock uses something | ||
583 | * other than jiffies.) | ||
584 | */ | ||
585 | unsigned long long sum_sched_runtime; | ||
586 | |||
587 | /* | ||
571 | * We don't bother to synchronize most readers of this at all, | 588 | * We don't bother to synchronize most readers of this at all, |
572 | * because there is no reader checking a limit that actually needs | 589 | * because there is no reader checking a limit that actually needs |
573 | * to get both rlim_cur and rlim_max atomically, and either one | 590 | * to get both rlim_cur and rlim_max atomically, and either one |
@@ -2183,27 +2200,14 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
2183 | /* | 2200 | /* |
2184 | * Thread group CPU time accounting. | 2201 | * Thread group CPU time accounting. |
2185 | */ | 2202 | */ |
2186 | 2203 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | |
2187 | static inline | 2204 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); |
2188 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times) | ||
2189 | { | ||
2190 | struct task_cputime *totals = &tsk->signal->cputime.totals; | ||
2191 | unsigned long flags; | ||
2192 | |||
2193 | spin_lock_irqsave(&totals->lock, flags); | ||
2194 | *times = *totals; | ||
2195 | spin_unlock_irqrestore(&totals->lock, flags); | ||
2196 | } | ||
2197 | 2205 | ||
2198 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2206 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
2199 | { | 2207 | { |
2200 | sig->cputime.totals = (struct task_cputime){ | 2208 | sig->cputimer.cputime = INIT_CPUTIME; |
2201 | .utime = cputime_zero, | 2209 | spin_lock_init(&sig->cputimer.lock); |
2202 | .stime = cputime_zero, | 2210 | sig->cputimer.running = 0; |
2203 | .sum_exec_runtime = 0, | ||
2204 | }; | ||
2205 | |||
2206 | spin_lock_init(&sig->cputime.totals.lock); | ||
2207 | } | 2211 | } |
2208 | 2212 | ||
2209 | static inline void thread_group_cputime_free(struct signal_struct *sig) | 2213 | static inline void thread_group_cputime_free(struct signal_struct *sig) |
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index 523d069c862c..1904afedb82f 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h | |||
@@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table { | |||
1045 | */ | 1045 | */ |
1046 | #define LOCL_STARTAUDIO 1 | 1046 | #define LOCL_STARTAUDIO 1 |
1047 | 1047 | ||
1048 | #if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) | 1048 | #if !defined(__KERNEL__) || defined(USE_SEQ_MACROS) |
1049 | /* | 1049 | /* |
1050 | * Some convenience macros to simplify programming of the | 1050 | * Some convenience macros to simplify programming of the |
1051 | * /dev/sequencer interface | 1051 | * /dev/sequencer interface |
1052 | * | 1052 | * |
1053 | * These macros define the API which should be used when possible. | 1053 | * This is a legacy interface for applications written against |
1054 | * the OSSlib-3.8 style interface. It is no longer possible | ||
1055 | * to actually link against OSSlib with this header, but we | ||
1056 | * still provide these macros for programs using them. | ||
1057 | * | ||
1058 | * If you want to use OSSlib, it is recommended that you get | ||
1059 | * the GPL version of OSS-4.x and build against that version | ||
1060 | * of the header. | ||
1061 | * | ||
1062 | * We redefine the extern keyword so that make headers_check | ||
1063 | * does not complain about SEQ_USE_EXTBUF. | ||
1054 | */ | 1064 | */ |
1055 | #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() | 1065 | #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() |
1056 | 1066 | ||
1057 | void seqbuf_dump(void); /* This function must be provided by programs */ | 1067 | void seqbuf_dump(void); /* This function must be provided by programs */ |
1058 | 1068 | ||
1059 | extern int OSS_init(int seqfd, int buflen); | ||
1060 | extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen); | ||
1061 | extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen); | ||
1062 | extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen); | ||
1063 | extern void OSS_patch_caching(int dev, int chn, int patch, | ||
1064 | int fd, unsigned char *buf, int buflen); | ||
1065 | extern void OSS_drum_caching(int dev, int chn, int patch, | ||
1066 | int fd, unsigned char *buf, int buflen); | ||
1067 | extern void OSS_write_patch(int fd, unsigned char *buf, int len); | ||
1068 | extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | ||
1069 | |||
1070 | #define SEQ_PM_DEFINES int __foo_bar___ | 1069 | #define SEQ_PM_DEFINES int __foo_bar___ |
1071 | #ifdef OSSLIB | 1070 | |
1072 | # define SEQ_USE_EXTBUF() \ | 1071 | #define SEQ_LOAD_GMINSTR(dev, instr) |
1073 | extern unsigned char *_seqbuf; \ | 1072 | #define SEQ_LOAD_GMDRUM(dev, drum) |
1074 | extern int _seqbuflen;extern int _seqbufptr | 1073 | |
1075 | # define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len | 1074 | #define _SEQ_EXTERN extern |
1076 | # define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen) | 1075 | #define SEQ_USE_EXTBUF() \ |
1077 | # define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen) | 1076 | _SEQ_EXTERN unsigned char _seqbuf[]; \ |
1078 | # define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen) | 1077 | _SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr |
1079 | |||
1080 | # define SEQ_LOAD_GMINSTR(dev, instr) \ | ||
1081 | OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen) | ||
1082 | # define SEQ_LOAD_GMDRUM(dev, drum) \ | ||
1083 | OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen) | ||
1084 | #else /* !OSSLIB */ | ||
1085 | |||
1086 | # define SEQ_LOAD_GMINSTR(dev, instr) | ||
1087 | # define SEQ_LOAD_GMDRUM(dev, drum) | ||
1088 | |||
1089 | # define SEQ_USE_EXTBUF() \ | ||
1090 | extern unsigned char _seqbuf[]; \ | ||
1091 | extern int _seqbuflen;extern int _seqbufptr | ||
1092 | 1078 | ||
1093 | #ifndef USE_SIMPLE_MACROS | 1079 | #ifndef USE_SIMPLE_MACROS |
1094 | /* Sample seqbuf_dump() implementation: | 1080 | /* Sample seqbuf_dump() implementation: |
@@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | |||
1131 | */ | 1117 | */ |
1132 | #define _SEQ_NEEDBUF(len) /* empty */ | 1118 | #define _SEQ_NEEDBUF(len) /* empty */ |
1133 | #endif | 1119 | #endif |
1134 | #endif /* !OSSLIB */ | ||
1135 | 1120 | ||
1136 | #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ | 1121 | #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ |
1137 | _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ | 1122 | _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ |
@@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | |||
1215 | _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) | 1200 | _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) |
1216 | 1201 | ||
1217 | #define SEQ_SET_PATCH SEQ_PGM_CHANGE | 1202 | #define SEQ_SET_PATCH SEQ_PGM_CHANGE |
1218 | #ifdef OSSLIB | 1203 | #define SEQ_PGM_CHANGE(dev, chn, patch) \ |
1219 | # define SEQ_PGM_CHANGE(dev, chn, patch) \ | ||
1220 | {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \ | ||
1221 | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);} | ||
1222 | #else | ||
1223 | # define SEQ_PGM_CHANGE(dev, chn, patch) \ | ||
1224 | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) | 1204 | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) |
1225 | #endif | ||
1226 | 1205 | ||
1227 | #define SEQ_CONTROL(dev, chn, controller, value) \ | 1206 | #define SEQ_CONTROL(dev, chn, controller, value) \ |
1228 | _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) | 1207 | _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) |
@@ -1300,19 +1279,12 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | |||
1300 | /* | 1279 | /* |
1301 | * Patch loading. | 1280 | * Patch loading. |
1302 | */ | 1281 | */ |
1303 | #ifdef OSSLIB | 1282 | #define SEQ_WRPATCH(patchx, len) \ |
1304 | # define SEQ_WRPATCH(patchx, len) \ | ||
1305 | OSS_write_patch(seqfd, (char*)(patchx), len) | ||
1306 | # define SEQ_WRPATCH2(patchx, len) \ | ||
1307 | OSS_write_patch2(seqfd, (char*)(patchx), len) | ||
1308 | #else | ||
1309 | # define SEQ_WRPATCH(patchx, len) \ | ||
1310 | {if (_seqbufptr) SEQ_DUMPBUF();\ | 1283 | {if (_seqbufptr) SEQ_DUMPBUF();\ |
1311 | if (write(seqfd, (char*)(patchx), len)==-1) \ | 1284 | if (write(seqfd, (char*)(patchx), len)==-1) \ |
1312 | perror("Write patch: /dev/sequencer");} | 1285 | perror("Write patch: /dev/sequencer");} |
1313 | # define SEQ_WRPATCH2(patchx, len) \ | 1286 | #define SEQ_WRPATCH2(patchx, len) \ |
1314 | (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) | 1287 | (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) |
1315 | #endif | ||
1316 | 1288 | ||
1317 | #endif | 1289 | #endif |
1318 | #endif | 1290 | #endif |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 0eda02ff2414..f9f900cfd066 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -95,13 +95,13 @@ struct old_linux_dirent; | |||
95 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | 95 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) |
96 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | 96 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) |
97 | 97 | ||
98 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | 98 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) |
99 | #define SYSCALL_DEFINE1(...) SYSCALL_DEFINEx(1, __VA_ARGS__) | 99 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) |
100 | #define SYSCALL_DEFINE2(...) SYSCALL_DEFINEx(2, __VA_ARGS__) | 100 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) |
101 | #define SYSCALL_DEFINE3(...) SYSCALL_DEFINEx(3, __VA_ARGS__) | 101 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) |
102 | #define SYSCALL_DEFINE4(...) SYSCALL_DEFINEx(4, __VA_ARGS__) | 102 | #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) |
103 | #define SYSCALL_DEFINE5(...) SYSCALL_DEFINEx(5, __VA_ARGS__) | 103 | #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) |
104 | #define SYSCALL_DEFINE6(...) SYSCALL_DEFINEx(6, __VA_ARGS__) | 104 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) |
105 | 105 | ||
106 | #ifdef CONFIG_PPC64 | 106 | #ifdef CONFIG_PPC64 |
107 | #define SYSCALL_ALIAS(alias, name) \ | 107 | #define SYSCALL_ALIAS(alias, name) \ |
@@ -121,21 +121,21 @@ struct old_linux_dirent; | |||
121 | 121 | ||
122 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name | 122 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name |
123 | #define SYSCALL_DEFINEx(x, name, ...) \ | 123 | #define SYSCALL_DEFINEx(x, name, ...) \ |
124 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)); \ | 124 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)); \ |
125 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)); \ | 125 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)); \ |
126 | asmlinkage long SyS_##name(__SC_LONG##x(__VA_ARGS__)) \ | 126 | asmlinkage long SyS##name(__SC_LONG##x(__VA_ARGS__)) \ |
127 | { \ | 127 | { \ |
128 | __SC_TEST##x(__VA_ARGS__); \ | 128 | __SC_TEST##x(__VA_ARGS__); \ |
129 | return (long) SYSC_##name(__SC_CAST##x(__VA_ARGS__)); \ | 129 | return (long) SYSC##name(__SC_CAST##x(__VA_ARGS__)); \ |
130 | } \ | 130 | } \ |
131 | SYSCALL_ALIAS(sys_##name, SyS_##name); \ | 131 | SYSCALL_ALIAS(sys##name, SyS##name); \ |
132 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)) | 132 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)) |
133 | 133 | ||
134 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 134 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
135 | 135 | ||
136 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name | 136 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name |
137 | #define SYSCALL_DEFINEx(x, name, ...) \ | 137 | #define SYSCALL_DEFINEx(x, name, ...) \ |
138 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)) | 138 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)) |
139 | 139 | ||
140 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 140 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
141 | 141 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 5a3a151bd730..ce3b5b622683 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1308,7 +1308,7 @@ static inline int sock_writeable(const struct sock *sk) | |||
1308 | 1308 | ||
1309 | static inline gfp_t gfp_any(void) | 1309 | static inline gfp_t gfp_any(void) |
1310 | { | 1310 | { |
1311 | return in_atomic() ? GFP_ATOMIC : GFP_KERNEL; | 1311 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; |
1312 | } | 1312 | } |
1313 | 1313 | ||
1314 | static inline long sock_rcvtimeo(const struct sock *sk, int noblock) | 1314 | static inline long sock_rcvtimeo(const struct sock *sk, int noblock) |