aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-07-21 15:45:02 -0400
committerIngo Molnar <mingo@elte.hu>2010-07-21 15:45:08 -0400
commitdca45ad8af54963c005393a484ad117b8ba6150f (patch)
tree7c9a6966283a6bb12b54e5680a67d203be292930 /include
parent68c38fc3cb4e5a60f502ee9c45f3dfe70e5165ad (diff)
parentcd5b8f8755a89a57fc8c408d284b8b613f090345 (diff)
Merge branch 'linus' into sched/core
Merge reason: Move from the -rc3 to the almost-rc6 base. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acexcep.h2
-rw-r--r--include/acpi/acpixf.h1
-rw-r--r--include/acpi/actypes.h3
-rw-r--r--include/drm/ttm/ttm_page_alloc.h4
-rw-r--r--include/linux/agp_backend.h1
-rw-r--r--include/linux/backing-dev.h6
-rw-r--r--include/linux/compiler-gcc.h10
-rw-r--r--include/linux/compiler-gcc4.h4
-rw-r--r--include/linux/drbd.h2
-rw-r--r--include/linux/dynamic_debug.h4
-rw-r--r--include/linux/ethtool.h2
-rw-r--r--include/linux/fb.h6
-rw-r--r--include/linux/fdtable.h3
-rw-r--r--include/linux/fs.h13
-rw-r--r--include/linux/i8042.h12
-rw-r--r--include/linux/jbd2.h11
-rw-r--r--include/linux/list.h15
-rw-r--r--include/linux/lmb.h89
-rw-r--r--include/linux/memblock.h89
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/mv643xx_eth.h5
-rw-r--r--include/linux/net.h3
-rw-r--r--include/linux/netdevice.h5
-rw-r--r--include/linux/pci.h1
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/rbtree.h13
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/suspend.h26
-rw-r--r--include/linux/syscalls.h6
-rw-r--r--include/linux/tracepoint.h1
-rw-r--r--include/linux/vgaarb.h1
-rw-r--r--include/linux/writeback.h7
-rw-r--r--include/math-emu/op-common.h2
-rw-r--r--include/media/tuner.h1
-rw-r--r--include/net/sch_generic.h20
-rw-r--r--include/net/snmp.h2
-rw-r--r--include/net/sock.h7
-rw-r--r--include/net/xfrm.h2
38 files changed, 224 insertions, 160 deletions
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index 5958d7845bd5..17714beb868e 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -212,7 +212,7 @@ char const *acpi_gbl_exception_names_env[] = {
212 "AE_NO_GLOBAL_LOCK", 212 "AE_NO_GLOBAL_LOCK",
213 "AE_ABORT_METHOD", 213 "AE_ABORT_METHOD",
214 "AE_SAME_HANDLER", 214 "AE_SAME_HANDLER",
215 "AE_WAKE_ONLY_GPE", 215 "AE_NO_HANDLER",
216 "AE_OWNER_ID_LIMIT" 216 "AE_OWNER_ID_LIMIT"
217}; 217};
218 218
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 0e4ab1fe5966..1371cc997393 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -69,6 +69,7 @@ extern acpi_name acpi_gbl_trace_method_name;
69extern u32 acpi_gbl_trace_flags; 69extern u32 acpi_gbl_trace_flags;
70extern u8 acpi_gbl_enable_aml_debug_object; 70extern u8 acpi_gbl_enable_aml_debug_object;
71extern u8 acpi_gbl_copy_dsdt_locally; 71extern u8 acpi_gbl_copy_dsdt_locally;
72extern u8 acpi_gbl_truncate_io_addresses;
72 73
73extern u32 acpi_current_gpe_count; 74extern u32 acpi_current_gpe_count;
74extern struct acpi_table_fadt acpi_gbl_FADT; 75extern struct acpi_table_fadt acpi_gbl_FADT;
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index bade172cad47..d55f4a7b824d 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -663,10 +663,11 @@ typedef u32 acpi_event_status;
663#define ACPI_GPE_MAX 0xFF 663#define ACPI_GPE_MAX 0xFF
664#define ACPI_NUM_GPE 256 664#define ACPI_NUM_GPE 256
665 665
666/* Actions for acpi_set_gpe */ 666/* Actions for acpi_set_gpe and acpi_hw_low_set_gpe */
667 667
668#define ACPI_GPE_ENABLE 0 668#define ACPI_GPE_ENABLE 0
669#define ACPI_GPE_DISABLE 1 669#define ACPI_GPE_DISABLE 1
670#define ACPI_GPE_COND_ENABLE 2
670 671
671/* gpe_types for acpi_enable_gpe and acpi_disable_gpe */ 672/* gpe_types for acpi_enable_gpe and acpi_disable_gpe */
672 673
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index 8bb4de567b2c..116821448c38 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -56,10 +56,6 @@ void ttm_put_pages(struct list_head *pages,
56 enum ttm_caching_state cstate); 56 enum ttm_caching_state cstate);
57/** 57/**
58 * Initialize pool allocator. 58 * Initialize pool allocator.
59 *
60 * Pool allocator is internaly reference counted so it can be initialized
61 * multiple times but ttm_page_alloc_fini has to be called same number of
62 * times.
63 */ 59 */
64int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages); 60int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages);
65/** 61/**
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h
index 9101ed64f803..09ea4a1e9505 100644
--- a/include/linux/agp_backend.h
+++ b/include/linux/agp_backend.h
@@ -79,7 +79,6 @@ struct agp_memory {
79 u32 physical; 79 u32 physical;
80 bool is_bound; 80 bool is_bound;
81 bool is_flushed; 81 bool is_flushed;
82 bool vmalloc_flag;
83 /* list of agp_memory mapped to the aperture */ 82 /* list of agp_memory mapped to the aperture */
84 struct list_head mapped_list; 83 struct list_head mapped_list;
85 /* DMA-mapped addresses */ 84 /* DMA-mapped addresses */
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index aee5f6ce166e..e9aec0d099df 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -82,8 +82,6 @@ struct backing_dev_info {
82 struct bdi_writeback wb; /* default writeback info for this bdi */ 82 struct bdi_writeback wb; /* default writeback info for this bdi */
83 spinlock_t wb_lock; /* protects update side of wb_list */ 83 spinlock_t wb_lock; /* protects update side of wb_list */
84 struct list_head wb_list; /* the flusher threads hanging off this bdi */ 84 struct list_head wb_list; /* the flusher threads hanging off this bdi */
85 unsigned long wb_mask; /* bitmask of registered tasks */
86 unsigned int wb_cnt; /* number of registered tasks */
87 85
88 struct list_head work_list; 86 struct list_head work_list;
89 87
@@ -105,8 +103,8 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
105int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); 103int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);
106void bdi_unregister(struct backing_dev_info *bdi); 104void bdi_unregister(struct backing_dev_info *bdi);
107int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); 105int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int);
108void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, 106void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages);
109 long nr_pages); 107void bdi_start_background_writeback(struct backing_dev_info *bdi);
110int bdi_writeback_task(struct bdi_writeback *wb); 108int bdi_writeback_task(struct bdi_writeback *wb);
111int bdi_has_dirty_io(struct backing_dev_info *bdi); 109int bdi_has_dirty_io(struct backing_dev_info *bdi);
112void bdi_arm_supers_timer(void); 110void bdi_arm_supers_timer(void);
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 73dcf804bc94..0da5b187f124 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -58,8 +58,12 @@
58 * naked functions because then mcount is called without stack and frame pointer 58 * naked functions because then mcount is called without stack and frame pointer
59 * being set up and there is no chance to restore the lr register to the value 59 * being set up and there is no chance to restore the lr register to the value
60 * before mcount was called. 60 * before mcount was called.
61 *
62 * The asm() bodies of naked functions often depend on standard calling conventions,
63 * therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce
64 * this, so we must do so ourselves. See GCC PR44290.
61 */ 65 */
62#define __naked __attribute__((naked)) notrace 66#define __naked __attribute__((naked)) noinline __noclone notrace
63 67
64#define __noreturn __attribute__((noreturn)) 68#define __noreturn __attribute__((noreturn))
65 69
@@ -85,3 +89,7 @@
85#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) 89#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
86#define gcc_header(x) _gcc_header(x) 90#define gcc_header(x) _gcc_header(x)
87#include gcc_header(__GNUC__) 91#include gcc_header(__GNUC__)
92
93#if !defined(__noclone)
94#define __noclone /* not needed */
95#endif
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
index 94dea3ffbfa1..fcfa5b9a4317 100644
--- a/include/linux/compiler-gcc4.h
+++ b/include/linux/compiler-gcc4.h
@@ -48,6 +48,10 @@
48 * unreleased. Really, we need to have autoconf for the kernel. 48 * unreleased. Really, we need to have autoconf for the kernel.
49 */ 49 */
50#define unreachable() __builtin_unreachable() 50#define unreachable() __builtin_unreachable()
51
52/* Mark a function definition as prohibited from being cloned. */
53#define __noclone __attribute__((__noclone__))
54
51#endif 55#endif
52 56
53#endif 57#endif
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index 30da4ae48972..b8d2516668aa 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -53,7 +53,7 @@
53 53
54 54
55extern const char *drbd_buildtag(void); 55extern const char *drbd_buildtag(void);
56#define REL_VERSION "8.3.8rc2" 56#define REL_VERSION "8.3.8"
57#define API_VERSION 88 57#define API_VERSION 88
58#define PRO_VERSION_MIN 86 58#define PRO_VERSION_MIN 86
59#define PRO_VERSION_MAX 94 59#define PRO_VERSION_MAX 94
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index b3cd4de9432b..52c0da4bdd18 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -40,7 +40,7 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n,
40 const char *modname); 40 const char *modname);
41 41
42#if defined(CONFIG_DYNAMIC_DEBUG) 42#if defined(CONFIG_DYNAMIC_DEBUG)
43extern int ddebug_remove_module(char *mod_name); 43extern int ddebug_remove_module(const char *mod_name);
44 44
45#define __dynamic_dbg_enabled(dd) ({ \ 45#define __dynamic_dbg_enabled(dd) ({ \
46 int __ret = 0; \ 46 int __ret = 0; \
@@ -73,7 +73,7 @@ extern int ddebug_remove_module(char *mod_name);
73 73
74#else 74#else
75 75
76static inline int ddebug_remove_module(char *mod) 76static inline int ddebug_remove_module(const char *mod)
77{ 77{
78 return 0; 78 return 0;
79} 79}
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 276b40a16835..b4207ca3ad52 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -379,6 +379,8 @@ struct ethtool_rxnfc {
379 __u32 flow_type; 379 __u32 flow_type;
380 /* The rx flow hash value or the rule DB size */ 380 /* The rx flow hash value or the rule DB size */
381 __u64 data; 381 __u64 data;
382 /* The following fields are not valid and must not be used for
383 * the ETHTOOL_{G,X}RXFH commands. */
382 struct ethtool_rx_flow_spec fs; 384 struct ethtool_rx_flow_spec fs;
383 __u32 rule_cnt; 385 __u32 rule_cnt;
384 __u32 rule_locs[0]; 386 __u32 rule_locs[0];
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 907ace3a64c8..e7445df44d6c 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -786,8 +786,6 @@ struct fb_tile_ops {
786#define FBINFO_MISC_USEREVENT 0x10000 /* event request 786#define FBINFO_MISC_USEREVENT 0x10000 /* event request
787 from userspace */ 787 from userspace */
788#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ 788#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */
789#define FBINFO_MISC_FIRMWARE 0x40000 /* a replaceable firmware
790 inited framebuffer */
791 789
792/* A driver may set this flag to indicate that it does want a set_par to be 790/* A driver may set this flag to indicate that it does want a set_par to be
793 * called every time when fbcon_switch is executed. The advantage is that with 791 * called every time when fbcon_switch is executed. The advantage is that with
@@ -801,6 +799,8 @@ struct fb_tile_ops {
801 */ 799 */
802#define FBINFO_MISC_ALWAYS_SETPAR 0x40000 800#define FBINFO_MISC_ALWAYS_SETPAR 0x40000
803 801
802/* where the fb is a firmware driver, and can be replaced with a proper one */
803#define FBINFO_MISC_FIRMWARE 0x80000
804/* 804/*
805 * Host and GPU endianness differ. 805 * Host and GPU endianness differ.
806 */ 806 */
@@ -873,6 +873,8 @@ struct fb_info {
873static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { 873static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
874 struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct) 874 struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct)
875 + max_num * sizeof(struct aperture), GFP_KERNEL); 875 + max_num * sizeof(struct aperture), GFP_KERNEL);
876 if (!a)
877 return NULL;
876 a->count = max_num; 878 a->count = max_num;
877 return a; 879 return a;
878} 880}
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index 013dc529e95f..d147461bc271 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -61,7 +61,8 @@ struct files_struct {
61 (rcu_dereference_check((fdtfd), \ 61 (rcu_dereference_check((fdtfd), \
62 rcu_read_lock_held() || \ 62 rcu_read_lock_held() || \
63 lockdep_is_held(&(files)->file_lock) || \ 63 lockdep_is_held(&(files)->file_lock) || \
64 atomic_read(&(files)->count) == 1)) 64 atomic_read(&(files)->count) == 1 || \
65 rcu_my_thread_group_empty()))
65 66
66#define files_fdtable(files) \ 67#define files_fdtable(files) \
67 (rcu_dereference_check_fdtable((files), (files)->fdt)) 68 (rcu_dereference_check_fdtable((files), (files)->fdt))
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 471e1ff5079a..68ca1b0491af 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1783,6 +1783,19 @@ extern int get_sb_pseudo(struct file_system_type *, char *,
1783 struct vfsmount *mnt); 1783 struct vfsmount *mnt);
1784extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); 1784extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
1785 1785
1786static inline void sb_mark_dirty(struct super_block *sb)
1787{
1788 sb->s_dirt = 1;
1789}
1790static inline void sb_mark_clean(struct super_block *sb)
1791{
1792 sb->s_dirt = 0;
1793}
1794static inline int sb_is_dirty(struct super_block *sb)
1795{
1796 return sb->s_dirt;
1797}
1798
1786/* Alas, no aliases. Too much hassle with bringing module.h everywhere */ 1799/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
1787#define fops_get(fops) \ 1800#define fops_get(fops) \
1788 (((fops) && try_module_get((fops)->owner) ? (fops) : NULL)) 1801 (((fops) && try_module_get((fops)->owner) ? (fops) : NULL))
diff --git a/include/linux/i8042.h b/include/linux/i8042.h
index 9bf6870ee5f4..a986ff588944 100644
--- a/include/linux/i8042.h
+++ b/include/linux/i8042.h
@@ -46,31 +46,31 @@ int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str,
46 46
47#else 47#else
48 48
49void i8042_lock_chip(void) 49static inline void i8042_lock_chip(void)
50{ 50{
51} 51}
52 52
53void i8042_unlock_chip(void) 53static inline void i8042_unlock_chip(void)
54{ 54{
55} 55}
56 56
57int i8042_command(unsigned char *param, int command) 57static inline int i8042_command(unsigned char *param, int command)
58{ 58{
59 return -ENODEV; 59 return -ENODEV;
60} 60}
61 61
62bool i8042_check_port_owner(const struct serio *serio) 62static inline bool i8042_check_port_owner(const struct serio *serio)
63{ 63{
64 return false; 64 return false;
65} 65}
66 66
67int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str, 67static inline int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str,
68 struct serio *serio)) 68 struct serio *serio))
69{ 69{
70 return -ENODEV; 70 return -ENODEV;
71} 71}
72 72
73int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str, 73static inline int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str,
74 struct serio *serio)) 74 struct serio *serio))
75{ 75{
76 return -ENODEV; 76 return -ENODEV;
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index a4d2e9f7088a..adf832dec3f3 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1026,11 +1026,12 @@ void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *);
1026 1026
1027struct jbd2_buffer_trigger_type { 1027struct jbd2_buffer_trigger_type {
1028 /* 1028 /*
1029 * Fired just before a buffer is written to the journal. 1029 * Fired a the moment data to write to the journal are known to be
1030 * mapped_data is a mapped buffer that is the frozen data for 1030 * stable - so either at the moment b_frozen_data is created or just
1031 * commit. 1031 * before a buffer is written to the journal. mapped_data is a mapped
1032 * buffer that is the frozen data for commit.
1032 */ 1033 */
1033 void (*t_commit)(struct jbd2_buffer_trigger_type *type, 1034 void (*t_frozen)(struct jbd2_buffer_trigger_type *type,
1034 struct buffer_head *bh, void *mapped_data, 1035 struct buffer_head *bh, void *mapped_data,
1035 size_t size); 1036 size_t size);
1036 1037
@@ -1042,7 +1043,7 @@ struct jbd2_buffer_trigger_type {
1042 struct buffer_head *bh); 1043 struct buffer_head *bh);
1043}; 1044};
1044 1045
1045extern void jbd2_buffer_commit_trigger(struct journal_head *jh, 1046extern void jbd2_buffer_frozen_trigger(struct journal_head *jh,
1046 void *mapped_data, 1047 void *mapped_data,
1047 struct jbd2_buffer_trigger_type *triggers); 1048 struct jbd2_buffer_trigger_type *triggers);
1048extern void jbd2_buffer_abort_trigger(struct journal_head *jh, 1049extern void jbd2_buffer_abort_trigger(struct journal_head *jh,
diff --git a/include/linux/list.h b/include/linux/list.h
index 8392884a2977..5d57a3a1fa1b 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -544,6 +544,21 @@ static inline void list_splice_tail_init(struct list_head *list,
544 &pos->member != (head); \ 544 &pos->member != (head); \
545 pos = n, n = list_entry(n->member.prev, typeof(*n), member)) 545 pos = n, n = list_entry(n->member.prev, typeof(*n), member))
546 546
547/**
548 * list_safe_reset_next - reset a stale list_for_each_entry_safe loop
549 * @pos: the loop cursor used in the list_for_each_entry_safe loop
550 * @n: temporary storage used in list_for_each_entry_safe
551 * @member: the name of the list_struct within the struct.
552 *
553 * list_safe_reset_next is not safe to use in general if the list may be
554 * modified concurrently (eg. the lock is dropped in the loop body). An
555 * exception to this is if the cursor element (pos) is pinned in the list,
556 * and list_safe_reset_next is called after re-taking the lock and before
557 * completing the current iteration of the loop body.
558 */
559#define list_safe_reset_next(pos, n, member) \
560 n = list_entry(pos->member.next, typeof(*pos), member)
561
547/* 562/*
548 * Double linked lists with a single pointer list head. 563 * Double linked lists with a single pointer list head.
549 * Mostly useful for hash tables where the two pointer list head is 564 * Mostly useful for hash tables where the two pointer list head is
diff --git a/include/linux/lmb.h b/include/linux/lmb.h
deleted file mode 100644
index f3d14333ebed..000000000000
--- a/include/linux/lmb.h
+++ /dev/null
@@ -1,89 +0,0 @@
1#ifndef _LINUX_LMB_H
2#define _LINUX_LMB_H
3#ifdef __KERNEL__
4
5/*
6 * Logical memory blocks.
7 *
8 * Copyright (C) 2001 Peter Bergner, IBM Corp.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
14 */
15
16#include <linux/init.h>
17#include <linux/mm.h>
18
19#define MAX_LMB_REGIONS 128
20
21struct lmb_property {
22 u64 base;
23 u64 size;
24};
25
26struct lmb_region {
27 unsigned long cnt;
28 u64 size;
29 struct lmb_property region[MAX_LMB_REGIONS+1];
30};
31
32struct lmb {
33 unsigned long debug;
34 u64 rmo_size;
35 struct lmb_region memory;
36 struct lmb_region reserved;
37};
38
39extern struct lmb lmb;
40
41extern void __init lmb_init(void);
42extern void __init lmb_analyze(void);
43extern long lmb_add(u64 base, u64 size);
44extern long lmb_remove(u64 base, u64 size);
45extern long __init lmb_free(u64 base, u64 size);
46extern long __init lmb_reserve(u64 base, u64 size);
47extern u64 __init lmb_alloc_nid(u64 size, u64 align, int nid,
48 u64 (*nid_range)(u64, u64, int *));
49extern u64 __init lmb_alloc(u64 size, u64 align);
50extern u64 __init lmb_alloc_base(u64 size,
51 u64, u64 max_addr);
52extern u64 __init __lmb_alloc_base(u64 size,
53 u64 align, u64 max_addr);
54extern u64 __init lmb_phys_mem_size(void);
55extern u64 lmb_end_of_DRAM(void);
56extern void __init lmb_enforce_memory_limit(u64 memory_limit);
57extern int __init lmb_is_reserved(u64 addr);
58extern int lmb_is_region_reserved(u64 base, u64 size);
59extern int lmb_find(struct lmb_property *res);
60
61extern void lmb_dump_all(void);
62
63static inline u64
64lmb_size_bytes(struct lmb_region *type, unsigned long region_nr)
65{
66 return type->region[region_nr].size;
67}
68static inline u64
69lmb_size_pages(struct lmb_region *type, unsigned long region_nr)
70{
71 return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT;
72}
73static inline u64
74lmb_start_pfn(struct lmb_region *type, unsigned long region_nr)
75{
76 return type->region[region_nr].base >> PAGE_SHIFT;
77}
78static inline u64
79lmb_end_pfn(struct lmb_region *type, unsigned long region_nr)
80{
81 return lmb_start_pfn(type, region_nr) +
82 lmb_size_pages(type, region_nr);
83}
84
85#include <asm/lmb.h>
86
87#endif /* __KERNEL__ */
88
89#endif /* _LINUX_LMB_H */
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
new file mode 100644
index 000000000000..a59faf2b5edd
--- /dev/null
+++ b/include/linux/memblock.h
@@ -0,0 +1,89 @@
1#ifndef _LINUX_MEMBLOCK_H
2#define _LINUX_MEMBLOCK_H
3#ifdef __KERNEL__
4
5/*
6 * Logical memory blocks.
7 *
8 * Copyright (C) 2001 Peter Bergner, IBM Corp.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
14 */
15
16#include <linux/init.h>
17#include <linux/mm.h>
18
19#define MAX_MEMBLOCK_REGIONS 128
20
21struct memblock_property {
22 u64 base;
23 u64 size;
24};
25
26struct memblock_region {
27 unsigned long cnt;
28 u64 size;
29 struct memblock_property region[MAX_MEMBLOCK_REGIONS+1];
30};
31
32struct memblock {
33 unsigned long debug;
34 u64 rmo_size;
35 struct memblock_region memory;
36 struct memblock_region reserved;
37};
38
39extern struct memblock memblock;
40
41extern void __init memblock_init(void);
42extern void __init memblock_analyze(void);
43extern long memblock_add(u64 base, u64 size);
44extern long memblock_remove(u64 base, u64 size);
45extern long __init memblock_free(u64 base, u64 size);
46extern long __init memblock_reserve(u64 base, u64 size);
47extern u64 __init memblock_alloc_nid(u64 size, u64 align, int nid,
48 u64 (*nid_range)(u64, u64, int *));
49extern u64 __init memblock_alloc(u64 size, u64 align);
50extern u64 __init memblock_alloc_base(u64 size,
51 u64, u64 max_addr);
52extern u64 __init __memblock_alloc_base(u64 size,
53 u64 align, u64 max_addr);
54extern u64 __init memblock_phys_mem_size(void);
55extern u64 memblock_end_of_DRAM(void);
56extern void __init memblock_enforce_memory_limit(u64 memory_limit);
57extern int __init memblock_is_reserved(u64 addr);
58extern int memblock_is_region_reserved(u64 base, u64 size);
59extern int memblock_find(struct memblock_property *res);
60
61extern void memblock_dump_all(void);
62
63static inline u64
64memblock_size_bytes(struct memblock_region *type, unsigned long region_nr)
65{
66 return type->region[region_nr].size;
67}
68static inline u64
69memblock_size_pages(struct memblock_region *type, unsigned long region_nr)
70{
71 return memblock_size_bytes(type, region_nr) >> PAGE_SHIFT;
72}
73static inline u64
74memblock_start_pfn(struct memblock_region *type, unsigned long region_nr)
75{
76 return type->region[region_nr].base >> PAGE_SHIFT;
77}
78static inline u64
79memblock_end_pfn(struct memblock_region *type, unsigned long region_nr)
80{
81 return memblock_start_pfn(type, region_nr) +
82 memblock_size_pages(type, region_nr);
83}
84
85#include <asm/memblock.h>
86
87#endif /* __KERNEL__ */
88
89#endif /* _LINUX_MEMBLOCK_H */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index b969efb03787..a2b48041b910 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -999,7 +999,7 @@ static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm)
999 * querying the cache size, so a fastpath for that case is appropriate. 999 * querying the cache size, so a fastpath for that case is appropriate.
1000 */ 1000 */
1001struct shrinker { 1001struct shrinker {
1002 int (*shrink)(int nr_to_scan, gfp_t gfp_mask); 1002 int (*shrink)(struct shrinker *, int nr_to_scan, gfp_t gfp_mask);
1003 int seeks; /* seeks to recreate an obj */ 1003 int seeks; /* seeks to recreate an obj */
1004 1004
1005 /* These are for internal use */ 1005 /* These are for internal use */
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h
index cbbbe9bfecad..30b0c4e78f91 100644
--- a/include/linux/mv643xx_eth.h
+++ b/include/linux/mv643xx_eth.h
@@ -19,6 +19,11 @@ struct mv643xx_eth_shared_platform_data {
19 struct mbus_dram_target_info *dram; 19 struct mbus_dram_target_info *dram;
20 struct platform_device *shared_smi; 20 struct platform_device *shared_smi;
21 unsigned int t_clk; 21 unsigned int t_clk;
22 /*
23 * Max packet size for Tx IP/Layer 4 checksum, when set to 0, default
24 * limit of 9KiB will be used.
25 */
26 int tx_csum_limit;
22}; 27};
23 28
24#define MV643XX_ETH_PHY_ADDR_DEFAULT 0 29#define MV643XX_ETH_PHY_ADDR_DEFAULT 0
diff --git a/include/linux/net.h b/include/linux/net.h
index 2b4deeeb8646..dee0b11a8759 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -129,10 +129,9 @@ struct socket_wq {
129 * @type: socket type (%SOCK_STREAM, etc) 129 * @type: socket type (%SOCK_STREAM, etc)
130 * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc) 130 * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc)
131 * @ops: protocol specific socket operations 131 * @ops: protocol specific socket operations
132 * @fasync_list: Asynchronous wake up list
133 * @file: File back pointer for gc 132 * @file: File back pointer for gc
134 * @sk: internal networking protocol agnostic socket representation 133 * @sk: internal networking protocol agnostic socket representation
135 * @wait: wait queue for several uses 134 * @wq: wait queue for several uses
136 */ 135 */
137struct socket { 136struct socket {
138 socket_state state; 137 socket_state state;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 40291f375024..b21e4054c12c 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1656,6 +1656,9 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
1656 return (dev->num_tx_queues > 1); 1656 return (dev->num_tx_queues > 1);
1657} 1657}
1658 1658
1659extern void netif_set_real_num_tx_queues(struct net_device *dev,
1660 unsigned int txq);
1661
1659/* Use this variant when it is known for sure that it 1662/* Use this variant when it is known for sure that it
1660 * is executing from hardware interrupt context or with hardware interrupts 1663 * is executing from hardware interrupt context or with hardware interrupts
1661 * disabled. 1664 * disabled.
@@ -2329,7 +2332,7 @@ do { \
2329#endif 2332#endif
2330 2333
2331#if defined(VERBOSE_DEBUG) 2334#if defined(VERBOSE_DEBUG)
2332#define netif_vdbg netdev_dbg 2335#define netif_vdbg netif_dbg
2333#else 2336#else
2334#define netif_vdbg(priv, type, dev, format, args...) \ 2337#define netif_vdbg(priv, type, dev, format, args...) \
2335({ \ 2338({ \
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 7cb00845f150..f26fda76b87f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -288,6 +288,7 @@ struct pci_dev {
288 */ 288 */
289 unsigned int irq; 289 unsigned int irq;
290 struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ 290 struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
291 resource_size_t fw_addr[DEVICE_COUNT_RESOURCE]; /* FW-assigned addr */
291 292
292 /* These fields are used by common fixups */ 293 /* These fields are used by common fixups */
293 unsigned int transparent:1; /* Transparent PCI bridge */ 294 unsigned int transparent:1; /* Transparent PCI bridge */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 4eb467910a45..3bedcc149c84 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1261,6 +1261,7 @@
1261#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 1261#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759
1262#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8 1262#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8
1263#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2 1263#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2
1264#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA 0x0D85
1264 1265
1265#define PCI_VENDOR_ID_IMS 0x10e0 1266#define PCI_VENDOR_ID_IMS 0x10e0
1266#define PCI_DEVICE_ID_IMS_TT128 0x9128 1267#define PCI_DEVICE_ID_IMS_TT128 0x9128
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h
index fe1872e5b37e..7066acb2c530 100644
--- a/include/linux/rbtree.h
+++ b/include/linux/rbtree.h
@@ -110,7 +110,6 @@ struct rb_node
110struct rb_root 110struct rb_root
111{ 111{
112 struct rb_node *rb_node; 112 struct rb_node *rb_node;
113 void (*augment_cb)(struct rb_node *node);
114}; 113};
115 114
116 115
@@ -130,9 +129,7 @@ static inline void rb_set_color(struct rb_node *rb, int color)
130 rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; 129 rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
131} 130}
132 131
133#define RB_ROOT (struct rb_root) { NULL, NULL, } 132#define RB_ROOT (struct rb_root) { NULL, }
134#define RB_AUGMENT_ROOT(x) (struct rb_root) { NULL, x}
135
136#define rb_entry(ptr, type, member) container_of(ptr, type, member) 133#define rb_entry(ptr, type, member) container_of(ptr, type, member)
137 134
138#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) 135#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
@@ -142,6 +139,14 @@ static inline void rb_set_color(struct rb_node *rb, int color)
142extern void rb_insert_color(struct rb_node *, struct rb_root *); 139extern void rb_insert_color(struct rb_node *, struct rb_root *);
143extern void rb_erase(struct rb_node *, struct rb_root *); 140extern void rb_erase(struct rb_node *, struct rb_root *);
144 141
142typedef void (*rb_augment_f)(struct rb_node *node, void *data);
143
144extern void rb_augment_insert(struct rb_node *node,
145 rb_augment_f func, void *data);
146extern struct rb_node *rb_augment_erase_begin(struct rb_node *node);
147extern void rb_augment_erase_end(struct rb_node *node,
148 rb_augment_f func, void *data);
149
145/* Find logical next and previous nodes in a tree */ 150/* Find logical next and previous nodes in a tree */
146extern struct rb_node *rb_next(const struct rb_node *); 151extern struct rb_node *rb_next(const struct rb_node *);
147extern struct rb_node *rb_prev(const struct rb_node *); 152extern struct rb_node *rb_prev(const struct rb_node *);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index ff154e10752b..9a7bc5ba7e7e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -139,7 +139,7 @@ extern int nr_processes(void);
139extern unsigned long nr_running(void); 139extern unsigned long nr_running(void);
140extern unsigned long nr_uninterruptible(void); 140extern unsigned long nr_uninterruptible(void);
141extern unsigned long nr_iowait(void); 141extern unsigned long nr_iowait(void);
142extern unsigned long nr_iowait_cpu(void); 142extern unsigned long nr_iowait_cpu(int cpu);
143extern unsigned long this_cpu_load(void); 143extern unsigned long this_cpu_load(void);
144 144
145 145
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 5e781d824e6d..bc7d6bb4cd8e 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -256,22 +256,22 @@ static inline int hibernate(void) { return -ENOSYS; }
256static inline bool system_entering_hibernation(void) { return false; } 256static inline bool system_entering_hibernation(void) { return false; }
257#endif /* CONFIG_HIBERNATION */ 257#endif /* CONFIG_HIBERNATION */
258 258
259#ifdef CONFIG_HIBERNATION_NVS 259#ifdef CONFIG_SUSPEND_NVS
260extern int hibernate_nvs_register(unsigned long start, unsigned long size); 260extern int suspend_nvs_register(unsigned long start, unsigned long size);
261extern int hibernate_nvs_alloc(void); 261extern int suspend_nvs_alloc(void);
262extern void hibernate_nvs_free(void); 262extern void suspend_nvs_free(void);
263extern void hibernate_nvs_save(void); 263extern void suspend_nvs_save(void);
264extern void hibernate_nvs_restore(void); 264extern void suspend_nvs_restore(void);
265#else /* CONFIG_HIBERNATION_NVS */ 265#else /* CONFIG_SUSPEND_NVS */
266static inline int hibernate_nvs_register(unsigned long a, unsigned long b) 266static inline int suspend_nvs_register(unsigned long a, unsigned long b)
267{ 267{
268 return 0; 268 return 0;
269} 269}
270static inline int hibernate_nvs_alloc(void) { return 0; } 270static inline int suspend_nvs_alloc(void) { return 0; }
271static inline void hibernate_nvs_free(void) {} 271static inline void suspend_nvs_free(void) {}
272static inline void hibernate_nvs_save(void) {} 272static inline void suspend_nvs_save(void) {}
273static inline void hibernate_nvs_restore(void) {} 273static inline void suspend_nvs_restore(void) {}
274#endif /* CONFIG_HIBERNATION_NVS */ 274#endif /* CONFIG_SUSPEND_NVS */
275 275
276#ifdef CONFIG_PM_SLEEP 276#ifdef CONFIG_PM_SLEEP
277void save_processor_state(void); 277void save_processor_state(void);
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 7f614ce274a9..13ebb5413a79 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -124,7 +124,8 @@ extern struct trace_event_functions enter_syscall_print_funcs;
124extern struct trace_event_functions exit_syscall_print_funcs; 124extern struct trace_event_functions exit_syscall_print_funcs;
125 125
126#define SYSCALL_TRACE_ENTER_EVENT(sname) \ 126#define SYSCALL_TRACE_ENTER_EVENT(sname) \
127 static struct syscall_metadata __syscall_meta_##sname; \ 127 static struct syscall_metadata \
128 __attribute__((__aligned__(4))) __syscall_meta_##sname; \
128 static struct ftrace_event_call \ 129 static struct ftrace_event_call \
129 __attribute__((__aligned__(4))) event_enter_##sname; \ 130 __attribute__((__aligned__(4))) event_enter_##sname; \
130 static struct ftrace_event_call __used \ 131 static struct ftrace_event_call __used \
@@ -138,7 +139,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
138 } 139 }
139 140
140#define SYSCALL_TRACE_EXIT_EVENT(sname) \ 141#define SYSCALL_TRACE_EXIT_EVENT(sname) \
141 static struct syscall_metadata __syscall_meta_##sname; \ 142 static struct syscall_metadata \
143 __attribute__((__aligned__(4))) __syscall_meta_##sname; \
142 static struct ftrace_event_call \ 144 static struct ftrace_event_call \
143 __attribute__((__aligned__(4))) event_exit_##sname; \ 145 __attribute__((__aligned__(4))) event_exit_##sname; \
144 static struct ftrace_event_call __used \ 146 static struct ftrace_event_call __used \
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 9a59d1f98cd4..103d1b61aacb 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -14,6 +14,7 @@
14 * See the file COPYING for more details. 14 * See the file COPYING for more details.
15 */ 15 */
16 16
17#include <linux/errno.h>
17#include <linux/types.h> 18#include <linux/types.h>
18#include <linux/rcupdate.h> 19#include <linux/rcupdate.h>
19 20
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index c9a975976995..814f294d4cd0 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -29,6 +29,7 @@
29 */ 29 */
30 30
31#ifndef LINUX_VGA_H 31#ifndef LINUX_VGA_H
32#define LINUX_VGA_H
32 33
33#include <asm/vga.h> 34#include <asm/vga.h>
34 35
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index d63ef8f9609f..c24eca71e80c 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -27,10 +27,6 @@ enum writeback_sync_modes {
27 * in a manner such that unspecified fields are set to zero. 27 * in a manner such that unspecified fields are set to zero.
28 */ 28 */
29struct writeback_control { 29struct writeback_control {
30 struct backing_dev_info *bdi; /* If !NULL, only write back this
31 queue */
32 struct super_block *sb; /* if !NULL, only write inodes from
33 this super_block */
34 enum writeback_sync_modes sync_mode; 30 enum writeback_sync_modes sync_mode;
35 unsigned long *older_than_this; /* If !NULL, only write back inodes 31 unsigned long *older_than_this; /* If !NULL, only write back inodes
36 older than this */ 32 older than this */
@@ -66,7 +62,8 @@ int inode_wait(void *);
66void writeback_inodes_sb(struct super_block *); 62void writeback_inodes_sb(struct super_block *);
67int writeback_inodes_sb_if_idle(struct super_block *); 63int writeback_inodes_sb_if_idle(struct super_block *);
68void sync_inodes_sb(struct super_block *); 64void sync_inodes_sb(struct super_block *);
69void writeback_inodes_wbc(struct writeback_control *wbc); 65void writeback_inodes_wb(struct bdi_writeback *wb,
66 struct writeback_control *wbc);
70long wb_do_writeback(struct bdi_writeback *wb, int force_wait); 67long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
71void wakeup_flusher_threads(long nr_pages); 68void wakeup_flusher_threads(long nr_pages);
72 69
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h
index fd882261225e..9696a5e2c437 100644
--- a/include/math-emu/op-common.h
+++ b/include/math-emu/op-common.h
@@ -799,7 +799,7 @@ do { \
799 X##_e -= (_FP_W_TYPE_SIZE - rsize); \ 799 X##_e -= (_FP_W_TYPE_SIZE - rsize); \
800 X##_e = rsize - X##_e - 1; \ 800 X##_e = rsize - X##_e - 1; \
801 \ 801 \
802 if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs < X##_e) \ 802 if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs <= X##_e) \
803 __FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\ 803 __FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\
804 _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \ 804 _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \
805 if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \ 805 if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \
diff --git a/include/media/tuner.h b/include/media/tuner.h
index 5505c5360ca3..51811eac46f1 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -130,6 +130,7 @@
130#define TUNER_PHILIPS_CU1216L 82 130#define TUNER_PHILIPS_CU1216L 82
131#define TUNER_NXP_TDA18271 83 131#define TUNER_NXP_TDA18271 83
132#define TUNER_SONY_BTF_PXN01Z 84 132#define TUNER_SONY_BTF_PXN01Z 84
133#define TUNER_PHILIPS_FQ1236_MK5 85 /* NTSC, TDA9885, no FM radio */
133 134
134/* tv card specific */ 135/* tv card specific */
135#define TDA9887_PRESENT (1<<0) 136#define TDA9887_PRESENT (1<<0)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 03ca5d826757..433604bb3fe8 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -313,12 +313,24 @@ extern void qdisc_calculate_pkt_len(struct sk_buff *skb,
313extern void tcf_destroy(struct tcf_proto *tp); 313extern void tcf_destroy(struct tcf_proto *tp);
314extern void tcf_destroy_chain(struct tcf_proto **fl); 314extern void tcf_destroy_chain(struct tcf_proto **fl);
315 315
316/* Reset all TX qdiscs of a device. */ 316/* Reset all TX qdiscs greater then index of a device. */
317static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i)
318{
319 struct Qdisc *qdisc;
320
321 for (; i < dev->num_tx_queues; i++) {
322 qdisc = netdev_get_tx_queue(dev, i)->qdisc;
323 if (qdisc) {
324 spin_lock_bh(qdisc_lock(qdisc));
325 qdisc_reset(qdisc);
326 spin_unlock_bh(qdisc_lock(qdisc));
327 }
328 }
329}
330
317static inline void qdisc_reset_all_tx(struct net_device *dev) 331static inline void qdisc_reset_all_tx(struct net_device *dev)
318{ 332{
319 unsigned int i; 333 qdisc_reset_all_tx_gt(dev, 0);
320 for (i = 0; i < dev->num_tx_queues; i++)
321 qdisc_reset(netdev_get_tx_queue(dev, i)->qdisc);
322} 334}
323 335
324/* Are all TX queues of the device empty? */ 336/* Are all TX queues of the device empty? */
diff --git a/include/net/snmp.h b/include/net/snmp.h
index 92456f1035f5..899003d18db9 100644
--- a/include/net/snmp.h
+++ b/include/net/snmp.h
@@ -134,7 +134,7 @@ struct linux_xfrm_mib {
134#define SNMP_ADD_STATS_USER(mib, field, addend) \ 134#define SNMP_ADD_STATS_USER(mib, field, addend) \
135 this_cpu_add(mib[1]->mibs[field], addend) 135 this_cpu_add(mib[1]->mibs[field], addend)
136#define SNMP_ADD_STATS(mib, field, addend) \ 136#define SNMP_ADD_STATS(mib, field, addend) \
137 this_cpu_add(mib[0]->mibs[field], addend) 137 this_cpu_add(mib[!in_softirq()]->mibs[field], addend)
138/* 138/*
139 * Use "__typeof__(*mib[0]) *ptr" instead of "__typeof__(mib[0]) ptr" 139 * Use "__typeof__(*mib[0]) *ptr" instead of "__typeof__(mib[0]) ptr"
140 * to make @ptr a non-percpu pointer. 140 * to make @ptr a non-percpu pointer.
diff --git a/include/net/sock.h b/include/net/sock.h
index 731150d52799..0a691ea7654a 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1224,12 +1224,7 @@ static inline void sk_tx_queue_clear(struct sock *sk)
1224 1224
1225static inline int sk_tx_queue_get(const struct sock *sk) 1225static inline int sk_tx_queue_get(const struct sock *sk)
1226{ 1226{
1227 return sk->sk_tx_queue_mapping; 1227 return sk ? sk->sk_tx_queue_mapping : -1;
1228}
1229
1230static inline bool sk_tx_queue_recorded(const struct sock *sk)
1231{
1232 return (sk && sk->sk_tx_queue_mapping >= 0);
1233} 1228}
1234 1229
1235static inline void sk_set_socket(struct sock *sk, struct socket *sock) 1230static inline void sk_set_socket(struct sock *sk, struct socket *sock)
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 1913af67c43d..fc8f36dd0f5c 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1586,7 +1586,7 @@ static inline struct xfrm_state *xfrm_input_state(struct sk_buff *skb)
1586static inline int xfrm_mark_get(struct nlattr **attrs, struct xfrm_mark *m) 1586static inline int xfrm_mark_get(struct nlattr **attrs, struct xfrm_mark *m)
1587{ 1587{
1588 if (attrs[XFRMA_MARK]) 1588 if (attrs[XFRMA_MARK])
1589 memcpy(m, nla_data(attrs[XFRMA_MARK]), sizeof(m)); 1589 memcpy(m, nla_data(attrs[XFRMA_MARK]), sizeof(struct xfrm_mark));
1590 else 1590 else
1591 m->v = m->m = 0; 1591 m->v = m->m = 0;
1592 1592