diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ftrace.h | 12 | ||||
| -rw-r--r-- | include/linux/hw_breakpoint.h | 25 | ||||
| -rw-r--r-- | include/linux/i2c.h | 2 | ||||
| -rw-r--r-- | include/linux/mm.h | 4 | ||||
| -rw-r--r-- | include/linux/perf_event.h | 83 | ||||
| -rw-r--r-- | include/linux/ptrace.h | 12 | ||||
| -rw-r--r-- | include/linux/sched.h | 9 | ||||
| -rw-r--r-- | include/linux/usb.h | 18 |
8 files changed, 116 insertions, 49 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index e0ae83bbd9cc..41e46330d9be 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -519,18 +519,6 @@ extern enum ftrace_dump_mode ftrace_dump_on_oops; | |||
| 519 | #define INIT_TRACE_RECURSION | 519 | #define INIT_TRACE_RECURSION |
| 520 | #endif | 520 | #endif |
| 521 | 521 | ||
| 522 | #ifdef CONFIG_HW_BRANCH_TRACER | ||
| 523 | |||
| 524 | void trace_hw_branch(u64 from, u64 to); | ||
| 525 | void trace_hw_branch_oops(void); | ||
| 526 | |||
| 527 | #else /* CONFIG_HW_BRANCH_TRACER */ | ||
| 528 | |||
| 529 | static inline void trace_hw_branch(u64 from, u64 to) {} | ||
| 530 | static inline void trace_hw_branch_oops(void) {} | ||
| 531 | |||
| 532 | #endif /* CONFIG_HW_BRANCH_TRACER */ | ||
| 533 | |||
| 534 | #ifdef CONFIG_FTRACE_SYSCALLS | 522 | #ifdef CONFIG_FTRACE_SYSCALLS |
| 535 | 523 | ||
| 536 | unsigned long arch_syscall_addr(int nr); | 524 | unsigned long arch_syscall_addr(int nr); |
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index c70d27af03f9..a2d6ea49ec56 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
| @@ -9,9 +9,22 @@ enum { | |||
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | enum { | 11 | enum { |
| 12 | HW_BREAKPOINT_R = 1, | 12 | HW_BREAKPOINT_EMPTY = 0, |
| 13 | HW_BREAKPOINT_W = 2, | 13 | HW_BREAKPOINT_R = 1, |
| 14 | HW_BREAKPOINT_X = 4, | 14 | HW_BREAKPOINT_W = 2, |
| 15 | HW_BREAKPOINT_RW = HW_BREAKPOINT_R | HW_BREAKPOINT_W, | ||
| 16 | HW_BREAKPOINT_X = 4, | ||
| 17 | HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X, | ||
| 18 | }; | ||
| 19 | |||
| 20 | enum bp_type_idx { | ||
| 21 | TYPE_INST = 0, | ||
| 22 | #ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS | ||
| 23 | TYPE_DATA = 0, | ||
| 24 | #else | ||
| 25 | TYPE_DATA = 1, | ||
| 26 | #endif | ||
| 27 | TYPE_MAX | ||
| 15 | }; | 28 | }; |
| 16 | 29 | ||
| 17 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
| @@ -34,6 +47,12 @@ static inline void hw_breakpoint_init(struct perf_event_attr *attr) | |||
| 34 | attr->sample_period = 1; | 47 | attr->sample_period = 1; |
| 35 | } | 48 | } |
| 36 | 49 | ||
| 50 | static inline void ptrace_breakpoint_init(struct perf_event_attr *attr) | ||
| 51 | { | ||
| 52 | hw_breakpoint_init(attr); | ||
| 53 | attr->exclude_kernel = 1; | ||
| 54 | } | ||
| 55 | |||
| 37 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) | 56 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) |
| 38 | { | 57 | { |
| 39 | return bp->attr.bp_addr; | 58 | return bp->attr.bp_addr; |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 0a5da639b327..6ed1d59bfb1e 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -355,6 +355,8 @@ struct i2c_adapter { | |||
| 355 | int nr; | 355 | int nr; |
| 356 | char name[48]; | 356 | char name[48]; |
| 357 | struct completion dev_released; | 357 | struct completion dev_released; |
| 358 | |||
| 359 | struct list_head userspace_clients; | ||
| 358 | }; | 360 | }; |
| 359 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) | 361 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) |
| 360 | 362 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 462acaf36f3a..fb19bb92b809 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -19,7 +19,6 @@ struct anon_vma; | |||
| 19 | struct file_ra_state; | 19 | struct file_ra_state; |
| 20 | struct user_struct; | 20 | struct user_struct; |
| 21 | struct writeback_control; | 21 | struct writeback_control; |
| 22 | struct rlimit; | ||
| 23 | 22 | ||
| 24 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ | 23 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ |
| 25 | extern unsigned long max_mapnr; | 24 | extern unsigned long max_mapnr; |
| @@ -1449,9 +1448,6 @@ int vmemmap_populate_basepages(struct page *start_page, | |||
| 1449 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); | 1448 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); |
| 1450 | void vmemmap_populate_print_last(void); | 1449 | void vmemmap_populate_print_last(void); |
| 1451 | 1450 | ||
| 1452 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, | ||
| 1453 | size_t size); | ||
| 1454 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); | ||
| 1455 | 1451 | ||
| 1456 | enum mf_flags { | 1452 | enum mf_flags { |
| 1457 | MF_COUNT_INCREASED = 1 << 0, | 1453 | MF_COUNT_INCREASED = 1 << 0, |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index c8e375440403..3fd5c82e0e18 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -203,8 +203,19 @@ struct perf_event_attr { | |||
| 203 | enable_on_exec : 1, /* next exec enables */ | 203 | enable_on_exec : 1, /* next exec enables */ |
| 204 | task : 1, /* trace fork/exit */ | 204 | task : 1, /* trace fork/exit */ |
| 205 | watermark : 1, /* wakeup_watermark */ | 205 | watermark : 1, /* wakeup_watermark */ |
| 206 | 206 | /* | |
| 207 | __reserved_1 : 49; | 207 | * precise_ip: |
| 208 | * | ||
| 209 | * 0 - SAMPLE_IP can have arbitrary skid | ||
| 210 | * 1 - SAMPLE_IP must have constant skid | ||
| 211 | * 2 - SAMPLE_IP requested to have 0 skid | ||
| 212 | * 3 - SAMPLE_IP must have 0 skid | ||
| 213 | * | ||
| 214 | * See also PERF_RECORD_MISC_EXACT_IP | ||
| 215 | */ | ||
| 216 | precise_ip : 2, /* skid constraint */ | ||
| 217 | |||
| 218 | __reserved_1 : 47; | ||
| 208 | 219 | ||
| 209 | union { | 220 | union { |
| 210 | __u32 wakeup_events; /* wakeup every n events */ | 221 | __u32 wakeup_events; /* wakeup every n events */ |
| @@ -287,11 +298,24 @@ struct perf_event_mmap_page { | |||
| 287 | __u64 data_tail; /* user-space written tail */ | 298 | __u64 data_tail; /* user-space written tail */ |
| 288 | }; | 299 | }; |
| 289 | 300 | ||
| 290 | #define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) | 301 | #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) |
| 291 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) | 302 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) |
| 292 | #define PERF_RECORD_MISC_KERNEL (1 << 0) | 303 | #define PERF_RECORD_MISC_KERNEL (1 << 0) |
| 293 | #define PERF_RECORD_MISC_USER (2 << 0) | 304 | #define PERF_RECORD_MISC_USER (2 << 0) |
| 294 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) | 305 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) |
| 306 | #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) | ||
| 307 | #define PERF_RECORD_MISC_GUEST_USER (5 << 0) | ||
| 308 | |||
| 309 | /* | ||
| 310 | * Indicates that the content of PERF_SAMPLE_IP points to | ||
| 311 | * the actual instruction that triggered the event. See also | ||
| 312 | * perf_event_attr::precise_ip. | ||
| 313 | */ | ||
| 314 | #define PERF_RECORD_MISC_EXACT_IP (1 << 14) | ||
| 315 | /* | ||
| 316 | * Reserve the last bit to indicate some extended misc field | ||
| 317 | */ | ||
| 318 | #define PERF_RECORD_MISC_EXT_RESERVED (1 << 15) | ||
| 295 | 319 | ||
| 296 | struct perf_event_header { | 320 | struct perf_event_header { |
| 297 | __u32 type; | 321 | __u32 type; |
| @@ -439,6 +463,12 @@ enum perf_callchain_context { | |||
| 439 | # include <asm/perf_event.h> | 463 | # include <asm/perf_event.h> |
| 440 | #endif | 464 | #endif |
| 441 | 465 | ||
| 466 | struct perf_guest_info_callbacks { | ||
| 467 | int (*is_in_guest) (void); | ||
| 468 | int (*is_user_mode) (void); | ||
| 469 | unsigned long (*get_guest_ip) (void); | ||
| 470 | }; | ||
| 471 | |||
| 442 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 472 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
| 443 | #include <asm/hw_breakpoint.h> | 473 | #include <asm/hw_breakpoint.h> |
| 444 | #endif | 474 | #endif |
| @@ -468,6 +498,17 @@ struct perf_raw_record { | |||
| 468 | void *data; | 498 | void *data; |
| 469 | }; | 499 | }; |
| 470 | 500 | ||
| 501 | struct perf_branch_entry { | ||
| 502 | __u64 from; | ||
| 503 | __u64 to; | ||
| 504 | __u64 flags; | ||
| 505 | }; | ||
| 506 | |||
| 507 | struct perf_branch_stack { | ||
| 508 | __u64 nr; | ||
| 509 | struct perf_branch_entry entries[0]; | ||
| 510 | }; | ||
| 511 | |||
| 471 | struct task_struct; | 512 | struct task_struct; |
| 472 | 513 | ||
| 473 | /** | 514 | /** |
| @@ -506,6 +547,8 @@ struct hw_perf_event { | |||
| 506 | 547 | ||
| 507 | struct perf_event; | 548 | struct perf_event; |
| 508 | 549 | ||
| 550 | #define PERF_EVENT_TXN_STARTED 1 | ||
| 551 | |||
| 509 | /** | 552 | /** |
| 510 | * struct pmu - generic performance monitoring unit | 553 | * struct pmu - generic performance monitoring unit |
| 511 | */ | 554 | */ |
| @@ -516,6 +559,16 @@ struct pmu { | |||
| 516 | void (*stop) (struct perf_event *event); | 559 | void (*stop) (struct perf_event *event); |
| 517 | void (*read) (struct perf_event *event); | 560 | void (*read) (struct perf_event *event); |
| 518 | void (*unthrottle) (struct perf_event *event); | 561 | void (*unthrottle) (struct perf_event *event); |
| 562 | |||
| 563 | /* | ||
| 564 | * group events scheduling is treated as a transaction, | ||
| 565 | * add group events as a whole and perform one schedulability test. | ||
| 566 | * If test fails, roll back the whole group | ||
| 567 | */ | ||
| 568 | |||
| 569 | void (*start_txn) (const struct pmu *pmu); | ||
| 570 | void (*cancel_txn) (const struct pmu *pmu); | ||
| 571 | int (*commit_txn) (const struct pmu *pmu); | ||
| 519 | }; | 572 | }; |
| 520 | 573 | ||
| 521 | /** | 574 | /** |
| @@ -571,6 +624,14 @@ enum perf_group_flag { | |||
| 571 | PERF_GROUP_SOFTWARE = 0x1, | 624 | PERF_GROUP_SOFTWARE = 0x1, |
| 572 | }; | 625 | }; |
| 573 | 626 | ||
| 627 | #define SWEVENT_HLIST_BITS 8 | ||
| 628 | #define SWEVENT_HLIST_SIZE (1 << SWEVENT_HLIST_BITS) | ||
| 629 | |||
| 630 | struct swevent_hlist { | ||
| 631 | struct hlist_head heads[SWEVENT_HLIST_SIZE]; | ||
| 632 | struct rcu_head rcu_head; | ||
| 633 | }; | ||
| 634 | |||
| 574 | /** | 635 | /** |
| 575 | * struct perf_event - performance event kernel representation: | 636 | * struct perf_event - performance event kernel representation: |
| 576 | */ | 637 | */ |
| @@ -579,6 +640,7 @@ struct perf_event { | |||
| 579 | struct list_head group_entry; | 640 | struct list_head group_entry; |
| 580 | struct list_head event_entry; | 641 | struct list_head event_entry; |
| 581 | struct list_head sibling_list; | 642 | struct list_head sibling_list; |
| 643 | struct hlist_node hlist_entry; | ||
| 582 | int nr_siblings; | 644 | int nr_siblings; |
| 583 | int group_flags; | 645 | int group_flags; |
| 584 | struct perf_event *group_leader; | 646 | struct perf_event *group_leader; |
| @@ -726,6 +788,9 @@ struct perf_cpu_context { | |||
| 726 | int active_oncpu; | 788 | int active_oncpu; |
| 727 | int max_pertask; | 789 | int max_pertask; |
| 728 | int exclusive; | 790 | int exclusive; |
| 791 | struct swevent_hlist *swevent_hlist; | ||
| 792 | struct mutex hlist_mutex; | ||
| 793 | int hlist_refcount; | ||
| 729 | 794 | ||
| 730 | /* | 795 | /* |
| 731 | * Recursion avoidance: | 796 | * Recursion avoidance: |
| @@ -769,9 +834,6 @@ extern void perf_disable(void); | |||
| 769 | extern void perf_enable(void); | 834 | extern void perf_enable(void); |
| 770 | extern int perf_event_task_disable(void); | 835 | extern int perf_event_task_disable(void); |
| 771 | extern int perf_event_task_enable(void); | 836 | extern int perf_event_task_enable(void); |
| 772 | extern int hw_perf_group_sched_in(struct perf_event *group_leader, | ||
| 773 | struct perf_cpu_context *cpuctx, | ||
| 774 | struct perf_event_context *ctx); | ||
| 775 | extern void perf_event_update_userpage(struct perf_event *event); | 837 | extern void perf_event_update_userpage(struct perf_event *event); |
| 776 | extern int perf_event_release_kernel(struct perf_event *event); | 838 | extern int perf_event_release_kernel(struct perf_event *event); |
| 777 | extern struct perf_event * | 839 | extern struct perf_event * |
| @@ -902,6 +964,10 @@ static inline void perf_event_mmap(struct vm_area_struct *vma) | |||
| 902 | __perf_event_mmap(vma); | 964 | __perf_event_mmap(vma); |
| 903 | } | 965 | } |
| 904 | 966 | ||
| 967 | extern struct perf_guest_info_callbacks *perf_guest_cbs; | ||
| 968 | extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | ||
| 969 | extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | ||
| 970 | |||
| 905 | extern void perf_event_comm(struct task_struct *tsk); | 971 | extern void perf_event_comm(struct task_struct *tsk); |
| 906 | extern void perf_event_fork(struct task_struct *tsk); | 972 | extern void perf_event_fork(struct task_struct *tsk); |
| 907 | 973 | ||
| @@ -971,6 +1037,11 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, | |||
| 971 | static inline void | 1037 | static inline void |
| 972 | perf_bp_event(struct perf_event *event, void *data) { } | 1038 | perf_bp_event(struct perf_event *event, void *data) { } |
| 973 | 1039 | ||
| 1040 | static inline int perf_register_guest_info_callbacks | ||
| 1041 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | ||
| 1042 | static inline int perf_unregister_guest_info_callbacks | ||
| 1043 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | ||
| 1044 | |||
| 974 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 1045 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
| 975 | static inline void perf_event_comm(struct task_struct *tsk) { } | 1046 | static inline void perf_event_comm(struct task_struct *tsk) { } |
| 976 | static inline void perf_event_fork(struct task_struct *tsk) { } | 1047 | static inline void perf_event_fork(struct task_struct *tsk) { } |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index e1fb60729979..4272521e29e9 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
| @@ -345,18 +345,6 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, | |||
| 345 | #define arch_ptrace_stop(code, info) do { } while (0) | 345 | #define arch_ptrace_stop(code, info) do { } while (0) |
| 346 | #endif | 346 | #endif |
| 347 | 347 | ||
| 348 | #ifndef arch_ptrace_untrace | ||
| 349 | /* | ||
| 350 | * Do machine-specific work before untracing child. | ||
| 351 | * | ||
| 352 | * This is called for a normal detach as well as from ptrace_exit() | ||
| 353 | * when the tracing task dies. | ||
| 354 | * | ||
| 355 | * Called with write_lock(&tasklist_lock) held. | ||
| 356 | */ | ||
| 357 | #define arch_ptrace_untrace(task) do { } while (0) | ||
| 358 | #endif | ||
| 359 | |||
| 360 | extern int task_current_syscall(struct task_struct *target, long *callno, | 348 | extern int task_current_syscall(struct task_struct *target, long *callno, |
| 361 | unsigned long args[6], unsigned int maxargs, | 349 | unsigned long args[6], unsigned int maxargs, |
| 362 | unsigned long *sp, unsigned long *pc); | 350 | unsigned long *sp, unsigned long *pc); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index dfea40574b2a..2a5b146fbaf9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -99,7 +99,6 @@ struct futex_pi_state; | |||
| 99 | struct robust_list_head; | 99 | struct robust_list_head; |
| 100 | struct bio_list; | 100 | struct bio_list; |
| 101 | struct fs_struct; | 101 | struct fs_struct; |
| 102 | struct bts_context; | ||
| 103 | struct perf_event_context; | 102 | struct perf_event_context; |
| 104 | 103 | ||
| 105 | /* | 104 | /* |
| @@ -1275,12 +1274,6 @@ struct task_struct { | |||
| 1275 | struct list_head ptraced; | 1274 | struct list_head ptraced; |
| 1276 | struct list_head ptrace_entry; | 1275 | struct list_head ptrace_entry; |
| 1277 | 1276 | ||
| 1278 | /* | ||
| 1279 | * This is the tracer handle for the ptrace BTS extension. | ||
| 1280 | * This field actually belongs to the ptracer task. | ||
| 1281 | */ | ||
| 1282 | struct bts_context *bts; | ||
| 1283 | |||
| 1284 | /* PID/PID hash table linkage. */ | 1277 | /* PID/PID hash table linkage. */ |
| 1285 | struct pid_link pids[PIDTYPE_MAX]; | 1278 | struct pid_link pids[PIDTYPE_MAX]; |
| 1286 | struct list_head thread_group; | 1279 | struct list_head thread_group; |
| @@ -2127,10 +2120,8 @@ extern void set_task_comm(struct task_struct *tsk, char *from); | |||
| 2127 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 2120 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
| 2128 | 2121 | ||
| 2129 | #ifdef CONFIG_SMP | 2122 | #ifdef CONFIG_SMP |
| 2130 | extern void wait_task_context_switch(struct task_struct *p); | ||
| 2131 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); | 2123 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
| 2132 | #else | 2124 | #else |
| 2133 | static inline void wait_task_context_switch(struct task_struct *p) {} | ||
| 2134 | static inline unsigned long wait_task_inactive(struct task_struct *p, | 2125 | static inline unsigned long wait_task_inactive(struct task_struct *p, |
| 2135 | long match_state) | 2126 | long match_state) |
| 2136 | { | 2127 | { |
diff --git a/include/linux/usb.h b/include/linux/usb.h index ce1323c4e47c..739f1fd1cc15 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -1085,7 +1085,7 @@ typedef void (*usb_complete_t)(struct urb *); | |||
| 1085 | * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags, | 1085 | * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags, |
| 1086 | * which tell the host controller driver that no such mapping is needed since | 1086 | * which tell the host controller driver that no such mapping is needed since |
| 1087 | * the device driver is DMA-aware. For example, a device driver might | 1087 | * the device driver is DMA-aware. For example, a device driver might |
| 1088 | * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map(). | 1088 | * allocate a DMA buffer with usb_alloc_coherent() or call usb_buffer_map(). |
| 1089 | * When these transfer flags are provided, host controller drivers will | 1089 | * When these transfer flags are provided, host controller drivers will |
| 1090 | * attempt to use the dma addresses found in the transfer_dma and/or | 1090 | * attempt to use the dma addresses found in the transfer_dma and/or |
| 1091 | * setup_dma fields rather than determining a dma address themselves. | 1091 | * setup_dma fields rather than determining a dma address themselves. |
| @@ -1366,11 +1366,23 @@ static inline int usb_urb_dir_out(struct urb *urb) | |||
| 1366 | return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT; | 1366 | return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT; |
| 1367 | } | 1367 | } |
| 1368 | 1368 | ||
| 1369 | void *usb_buffer_alloc(struct usb_device *dev, size_t size, | 1369 | void *usb_alloc_coherent(struct usb_device *dev, size_t size, |
| 1370 | gfp_t mem_flags, dma_addr_t *dma); | 1370 | gfp_t mem_flags, dma_addr_t *dma); |
| 1371 | void usb_buffer_free(struct usb_device *dev, size_t size, | 1371 | void usb_free_coherent(struct usb_device *dev, size_t size, |
| 1372 | void *addr, dma_addr_t dma); | 1372 | void *addr, dma_addr_t dma); |
| 1373 | 1373 | ||
| 1374 | /* Compatible macros while we switch over */ | ||
| 1375 | static inline void *usb_buffer_alloc(struct usb_device *dev, size_t size, | ||
| 1376 | gfp_t mem_flags, dma_addr_t *dma) | ||
| 1377 | { | ||
| 1378 | return usb_alloc_coherent(dev, size, mem_flags, dma); | ||
| 1379 | } | ||
| 1380 | static inline void usb_buffer_free(struct usb_device *dev, size_t size, | ||
| 1381 | void *addr, dma_addr_t dma) | ||
| 1382 | { | ||
| 1383 | return usb_free_coherent(dev, size, addr, dma); | ||
| 1384 | } | ||
| 1385 | |||
| 1374 | #if 0 | 1386 | #if 0 |
| 1375 | struct urb *usb_buffer_map(struct urb *urb); | 1387 | struct urb *usb_buffer_map(struct urb *urb); |
| 1376 | void usb_buffer_dmasync(struct urb *urb); | 1388 | void usb_buffer_dmasync(struct urb *urb); |
