Al Viro | a1f8e7f | 2006-10-19 16:08:53 -0400 | [diff] [blame] | 1 | #include <linux/highmem.h> |
| 2 | |
| 3 | static inline void *kmap_skb_frag(const skb_frag_t *frag) |
| 4 | { |
| 5 | #ifdef CONFIG_HIGHMEM |
| 6 | BUG_ON(in_irq()); |
| 7 | |
| 8 | local_bh_disable(); |
| 9 | #endif |
Cong Wang | 0352bc5 | 2011-11-25 23:14:39 +0800 | [diff] [blame] | 10 | return kmap_atomic(skb_frag_page(frag)); |
Al Viro | a1f8e7f | 2006-10-19 16:08:53 -0400 | [diff] [blame] | 11 | } |
| 12 | |
| 13 | static inline void kunmap_skb_frag(void *vaddr) |
| 14 | { |
Cong Wang | 0352bc5 | 2011-11-25 23:14:39 +0800 | [diff] [blame] | 15 | kunmap_atomic(vaddr); |
Al Viro | a1f8e7f | 2006-10-19 16:08:53 -0400 | [diff] [blame] | 16 | #ifdef CONFIG_HIGHMEM |
| 17 | local_bh_enable(); |
| 18 | #endif |
| 19 | } |