aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-06-01 03:37:23 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-06-01 03:37:23 -0400
commit9d5432979951c8761c2b4517007039b9bcc1c110 (patch)
tree9441cb1cd4a7674a2292936bfb42514f33d24cd4 /include
parenta913829e90e2af7a6e98f5aadcc9fec4dcf1ef64 (diff)
parent21e3024cbddb712f6a078bf4132d7682d3c4e35e (diff)
Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/timer.h1
-rw-r--r--include/asm-ia64/perfmon.h8
-rw-r--r--include/asm-ia64/sn/sn_sal.h28
-rw-r--r--include/asm-ppc/cpm2.h46
-rw-r--r--include/asm-ppc/m8260_pci.h1
-rw-r--r--include/asm-ppc/mpc8260.h2
-rw-r--r--include/asm-sh/thread_info.h2
-rw-r--r--include/asm-sh64/thread_info.h2
-rw-r--r--include/asm-um/page.h8
-rw-r--r--include/asm-um/pgtable.h8
-rw-r--r--include/asm-um/thread_info.h9
-rw-r--r--include/linux/cpufreq.h2
-rw-r--r--include/linux/etherdevice.h22
-rw-r--r--include/linux/ethtool.h1
-rw-r--r--include/linux/hardirq.h6
-rw-r--r--include/linux/inetdevice.h2
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/linux/netdevice.h3
-rw-r--r--include/linux/notifier.h1
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/net/route.h3
21 files changed, 129 insertions, 28 deletions
diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h
index 40c54f69780e..c34709849839 100644
--- a/include/asm-i386/timer.h
+++ b/include/asm-i386/timer.h
@@ -53,6 +53,7 @@ extern struct init_timer_opts timer_cyclone_init;
53 53
54extern unsigned long calibrate_tsc(void); 54extern unsigned long calibrate_tsc(void);
55extern void init_cpu_khz(void); 55extern void init_cpu_khz(void);
56extern int recalibrate_cpu_khz(void);
56#ifdef CONFIG_HPET_TIMER 57#ifdef CONFIG_HPET_TIMER
57extern struct init_timer_opts timer_hpet_init; 58extern struct init_timer_opts timer_hpet_init;
58extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr); 59extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr);
diff --git a/include/asm-ia64/perfmon.h b/include/asm-ia64/perfmon.h
index ed5416c5b1ac..7f3333dd00e4 100644
--- a/include/asm-ia64/perfmon.h
+++ b/include/asm-ia64/perfmon.h
@@ -177,6 +177,10 @@ typedef union {
177 177
178extern long perfmonctl(int fd, int cmd, void *arg, int narg); 178extern long perfmonctl(int fd, int cmd, void *arg, int narg);
179 179
180typedef struct {
181 void (*handler)(int irq, void *arg, struct pt_regs *regs);
182} pfm_intr_handler_desc_t;
183
180extern void pfm_save_regs (struct task_struct *); 184extern void pfm_save_regs (struct task_struct *);
181extern void pfm_load_regs (struct task_struct *); 185extern void pfm_load_regs (struct task_struct *);
182 186
@@ -187,6 +191,10 @@ extern void pfm_syst_wide_update_task(struct task_struct *, unsigned long info,
187extern void pfm_inherit(struct task_struct *task, struct pt_regs *regs); 191extern void pfm_inherit(struct task_struct *task, struct pt_regs *regs);
188extern void pfm_init_percpu(void); 192extern void pfm_init_percpu(void);
189extern void pfm_handle_work(void); 193extern void pfm_handle_work(void);
194extern int pfm_install_alt_pmu_interrupt(pfm_intr_handler_desc_t *h);
195extern int pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *h);
196
197
190 198
191/* 199/*
192 * Reset PMD register flags 200 * Reset PMD register flags
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h
index 56d74ca76b5d..eb0395ad0d6a 100644
--- a/include/asm-ia64/sn/sn_sal.h
+++ b/include/asm-ia64/sn/sn_sal.h
@@ -115,6 +115,13 @@
115#define SAL_IROUTER_INTR_XMIT SAL_CONSOLE_INTR_XMIT 115#define SAL_IROUTER_INTR_XMIT SAL_CONSOLE_INTR_XMIT
116#define SAL_IROUTER_INTR_RECV SAL_CONSOLE_INTR_RECV 116#define SAL_IROUTER_INTR_RECV SAL_CONSOLE_INTR_RECV
117 117
118/*
119 * Error Handling Features
120 */
121#define SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV 0x1
122#define SAL_ERR_FEAT_LOG_SBES 0x2
123#define SAL_ERR_FEAT_MFR_OVERRIDE 0x4
124#define SAL_ERR_FEAT_SBE_THRESHOLD 0xffff0000
118 125
119/* 126/*
120 * SAL Error Codes 127 * SAL Error Codes
@@ -342,6 +349,25 @@ ia64_sn_plat_cpei_handler(void)
342} 349}
343 350
344/* 351/*
352 * Set Error Handling Features
353 */
354static inline u64
355ia64_sn_plat_set_error_handling_features(void)
356{
357 struct ia64_sal_retval ret_stuff;
358
359 ret_stuff.status = 0;
360 ret_stuff.v0 = 0;
361 ret_stuff.v1 = 0;
362 ret_stuff.v2 = 0;
363 SAL_CALL_REENTRANT(ret_stuff, SN_SAL_SET_ERROR_HANDLING_FEATURES,
364 (SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV | SAL_ERR_FEAT_LOG_SBES),
365 0, 0, 0, 0, 0, 0);
366
367 return ret_stuff.status;
368}
369
370/*
345 * Checks for console input. 371 * Checks for console input.
346 */ 372 */
347static inline u64 373static inline u64
@@ -472,7 +498,7 @@ static inline u64
472ia64_sn_pod_mode(void) 498ia64_sn_pod_mode(void)
473{ 499{
474 struct ia64_sal_retval isrv; 500 struct ia64_sal_retval isrv;
475 SAL_CALL(isrv, SN_SAL_POD_MODE, 0, 0, 0, 0, 0, 0, 0); 501 SAL_CALL_REENTRANT(isrv, SN_SAL_POD_MODE, 0, 0, 0, 0, 0, 0, 0);
476 if (isrv.status) 502 if (isrv.status)
477 return 0; 503 return 0;
478 return isrv.v0; 504 return isrv.v0;
diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h
index 42fd1068cf2a..c5883dbed63f 100644
--- a/include/asm-ppc/cpm2.h
+++ b/include/asm-ppc/cpm2.h
@@ -1039,6 +1039,52 @@ typedef struct im_idma {
1039#define CMXSCR_TS4CS_CLK7 0x00000006 /* SCC4 Tx Clock Source is CLK7 */ 1039#define CMXSCR_TS4CS_CLK7 0x00000006 /* SCC4 Tx Clock Source is CLK7 */
1040#define CMXSCR_TS4CS_CLK8 0x00000007 /* SCC4 Tx Clock Source is CLK8 */ 1040#define CMXSCR_TS4CS_CLK8 0x00000007 /* SCC4 Tx Clock Source is CLK8 */
1041 1041
1042/*-----------------------------------------------------------------------
1043 * SIUMCR - SIU Module Configuration Register 4-31
1044 */
1045#define SIUMCR_BBD 0x80000000 /* Bus Busy Disable */
1046#define SIUMCR_ESE 0x40000000 /* External Snoop Enable */
1047#define SIUMCR_PBSE 0x20000000 /* Parity Byte Select Enable */
1048#define SIUMCR_CDIS 0x10000000 /* Core Disable */
1049#define SIUMCR_DPPC00 0x00000000 /* Data Parity Pins Configuration*/
1050#define SIUMCR_DPPC01 0x04000000 /* - " - */
1051#define SIUMCR_DPPC10 0x08000000 /* - " - */
1052#define SIUMCR_DPPC11 0x0c000000 /* - " - */
1053#define SIUMCR_L2CPC00 0x00000000 /* L2 Cache Pins Configuration */
1054#define SIUMCR_L2CPC01 0x01000000 /* - " - */
1055#define SIUMCR_L2CPC10 0x02000000 /* - " - */
1056#define SIUMCR_L2CPC11 0x03000000 /* - " - */
1057#define SIUMCR_LBPC00 0x00000000 /* Local Bus Pins Configuration */
1058#define SIUMCR_LBPC01 0x00400000 /* - " - */
1059#define SIUMCR_LBPC10 0x00800000 /* - " - */
1060#define SIUMCR_LBPC11 0x00c00000 /* - " - */
1061#define SIUMCR_APPC00 0x00000000 /* Address Parity Pins Configuration*/
1062#define SIUMCR_APPC01 0x00100000 /* - " - */
1063#define SIUMCR_APPC10 0x00200000 /* - " - */
1064#define SIUMCR_APPC11 0x00300000 /* - " - */
1065#define SIUMCR_CS10PC00 0x00000000 /* CS10 Pin Configuration */
1066#define SIUMCR_CS10PC01 0x00040000 /* - " - */
1067#define SIUMCR_CS10PC10 0x00080000 /* - " - */
1068#define SIUMCR_CS10PC11 0x000c0000 /* - " - */
1069#define SIUMCR_BCTLC00 0x00000000 /* Buffer Control Configuration */
1070#define SIUMCR_BCTLC01 0x00010000 /* - " - */
1071#define SIUMCR_BCTLC10 0x00020000 /* - " - */
1072#define SIUMCR_BCTLC11 0x00030000 /* - " - */
1073#define SIUMCR_MMR00 0x00000000 /* Mask Masters Requests */
1074#define SIUMCR_MMR01 0x00004000 /* - " - */
1075#define SIUMCR_MMR10 0x00008000 /* - " - */
1076#define SIUMCR_MMR11 0x0000c000 /* - " - */
1077#define SIUMCR_LPBSE 0x00002000 /* LocalBus Parity Byte Select Enable*/
1078
1079/*-----------------------------------------------------------------------
1080 * SCCR - System Clock Control Register 9-8
1081*/
1082#define SCCR_PCI_MODE 0x00000100 /* PCI Mode */
1083#define SCCR_PCI_MODCK 0x00000080 /* Value of PCI_MODCK pin */
1084#define SCCR_PCIDF_MSK 0x00000078 /* PCI division factor */
1085#define SCCR_PCIDF_SHIFT 3
1086
1087
1042#endif /* __CPM2__ */ 1088#endif /* __CPM2__ */
1043#endif /* __KERNEL__ */ 1089#endif /* __KERNEL__ */
1044 1090
diff --git a/include/asm-ppc/m8260_pci.h b/include/asm-ppc/m8260_pci.h
index 163a6b91d5b2..bf9e05dd54b5 100644
--- a/include/asm-ppc/m8260_pci.h
+++ b/include/asm-ppc/m8260_pci.h
@@ -19,6 +19,7 @@
19 * Define the vendor/device ID for the MPC8265. 19 * Define the vendor/device ID for the MPC8265.
20 */ 20 */
21#define PCI_DEVICE_ID_MPC8265 ((0x18C0 << 16) | PCI_VENDOR_ID_MOTOROLA) 21#define PCI_DEVICE_ID_MPC8265 ((0x18C0 << 16) | PCI_VENDOR_ID_MOTOROLA)
22#define PCI_DEVICE_ID_MPC8272 ((0x18C1 << 16) | PCI_VENDOR_ID_MOTOROLA)
22 23
23#define M8265_PCIBR0 0x101ac 24#define M8265_PCIBR0 0x101ac
24#define M8265_PCIBR1 0x101b0 25#define M8265_PCIBR1 0x101b0
diff --git a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h
index d820894e5991..89eb8a2ac693 100644
--- a/include/asm-ppc/mpc8260.h
+++ b/include/asm-ppc/mpc8260.h
@@ -41,7 +41,7 @@
41#endif 41#endif
42 42
43#ifdef CONFIG_PCI_8260 43#ifdef CONFIG_PCI_8260
44#include <syslib/m8260_pci.h> 44#include <syslib/m82xx_pci.h>
45#endif 45#endif
46 46
47/* Make sure the memory translation stuff is there if PCI not used. 47/* Make sure the memory translation stuff is there if PCI not used.
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h
index d82f883d8e6d..4bbbd9f3c37e 100644
--- a/include/asm-sh/thread_info.h
+++ b/include/asm-sh/thread_info.h
@@ -27,7 +27,7 @@ struct thread_info {
27 27
28#endif 28#endif
29 29
30#define PREEMPT_ACTIVE 0x4000000 30#define PREEMPT_ACTIVE 0x10000000
31 31
32/* 32/*
33 * macros/functions for gaining access to the thread information structure 33 * macros/functions for gaining access to the thread information structure
diff --git a/include/asm-sh64/thread_info.h b/include/asm-sh64/thread_info.h
index e65f394da472..8a32d6bd0b79 100644
--- a/include/asm-sh64/thread_info.h
+++ b/include/asm-sh64/thread_info.h
@@ -73,7 +73,7 @@ static inline struct thread_info *current_thread_info(void)
73 73
74#define THREAD_SIZE 8192 74#define THREAD_SIZE 8192
75 75
76#define PREEMPT_ACTIVE 0x4000000 76#define PREEMPT_ACTIVE 0x10000000
77 77
78/* thread information flags */ 78/* thread information flags */
79#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 79#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
diff --git a/include/asm-um/page.h b/include/asm-um/page.h
index 504ea8e486b0..5afee8a8cdf3 100644
--- a/include/asm-um/page.h
+++ b/include/asm-um/page.h
@@ -98,7 +98,13 @@ extern unsigned long uml_physmem;
98 98
99extern unsigned long to_phys(void *virt); 99extern unsigned long to_phys(void *virt);
100extern void *to_virt(unsigned long phys); 100extern void *to_virt(unsigned long phys);
101#define __pa(virt) to_phys((void *) virt) 101
102/* Cast to unsigned long before casting to void * to avoid a warning from
103 * mmap_kmem about cutting a long long down to a void *. Not sure that
104 * casting is the right thing, but 32-bit UML can't have 64-bit virtual
105 * addresses
106 */
107#define __pa(virt) to_phys((void *) (unsigned long) virt)
102#define __va(phys) to_virt((unsigned long) phys) 108#define __va(phys) to_virt((unsigned long) phys)
103 109
104#define page_to_pfn(page) ((page) - mem_map) 110#define page_to_pfn(page) ((page) - mem_map)
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h
index 510e513c7f88..a88040920311 100644
--- a/include/asm-um/pgtable.h
+++ b/include/asm-um/pgtable.h
@@ -114,17 +114,9 @@ extern unsigned long end_iomem;
114extern unsigned long pg0[1024]; 114extern unsigned long pg0[1024];
115 115
116/* 116/*
117 * BAD_PAGETABLE is used when we need a bogus page-table, while
118 * BAD_PAGE is used for a bogus page.
119 *
120 * ZERO_PAGE is a global shared page that is always zero: used 117 * ZERO_PAGE is a global shared page that is always zero: used
121 * for zero-mapped memory areas etc.. 118 * for zero-mapped memory areas etc..
122 */ 119 */
123extern pte_t __bad_page(void);
124extern pte_t * __bad_pagetable(void);
125
126#define BAD_PAGETABLE __bad_pagetable()
127#define BAD_PAGE __bad_page()
128 120
129#define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page) 121#define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page)
130 122
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h
index a10ea155907e..1feaaf148ef1 100644
--- a/include/asm-um/thread_info.h
+++ b/include/asm-um/thread_info.h
@@ -41,18 +41,17 @@ struct thread_info {
41#define init_thread_info (init_thread_union.thread_info) 41#define init_thread_info (init_thread_union.thread_info)
42#define init_stack (init_thread_union.stack) 42#define init_stack (init_thread_union.stack)
43 43
44#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
44/* how to get the thread information struct from C */ 45/* how to get the thread information struct from C */
45static inline struct thread_info *current_thread_info(void) 46static inline struct thread_info *current_thread_info(void)
46{ 47{
47 struct thread_info *ti; 48 struct thread_info *ti;
48 unsigned long mask = PAGE_SIZE * 49 unsigned long mask = THREAD_SIZE - 1;
49 (1 << CONFIG_KERNEL_STACK_ORDER) - 1; 50 ti = (struct thread_info *) (((unsigned long) &ti) & ~mask);
50 ti = (struct thread_info *) (((unsigned long) &ti) & ~mask);
51 return ti; 51 return ti;
52} 52}
53 53
54/* thread information allocation */ 54/* thread information allocation */
55#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
56#define alloc_thread_info(tsk) \ 55#define alloc_thread_info(tsk) \
57 ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) 56 ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL))
58#define free_thread_info(ti) kfree(ti) 57#define free_thread_info(ti) kfree(ti)
@@ -62,7 +61,7 @@ static inline struct thread_info *current_thread_info(void)
62 61
63#endif 62#endif
64 63
65#define PREEMPT_ACTIVE 0x4000000 64#define PREEMPT_ACTIVE 0x10000000
66 65
67#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 66#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
68#define TIF_SIGPENDING 1 /* signal pending */ 67#define TIF_SIGPENDING 1 /* signal pending */
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index f21af067d015..927daa86c9b3 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -49,7 +49,7 @@ int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
49/* Frequency values here are CPU kHz so that hardware which doesn't run 49/* Frequency values here are CPU kHz so that hardware which doesn't run
50 * with some frequencies can complain without having to guess what per 50 * with some frequencies can complain without having to guess what per
51 * cent / per mille means. 51 * cent / per mille means.
52 * Maximum transition latency is in microseconds - if it's unknown, 52 * Maximum transition latency is in nanoseconds - if it's unknown,
53 * CPUFREQ_ETERNAL shall be used. 53 * CPUFREQ_ETERNAL shall be used.
54 */ 54 */
55 55
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 220748b7abea..a1478258d002 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -56,18 +56,32 @@ static inline int is_zero_ether_addr(const u8 *addr)
56} 56}
57 57
58/** 58/**
59 * is_multicast_ether_addr - Determine if the given Ethernet address is a
60 * multicast address.
61 *
62 * @addr: Pointer to a six-byte array containing the Ethernet address
63 *
64 * Return true if the address is a multicast address.
65 */
66static inline int is_multicast_ether_addr(const u8 *addr)
67{
68 return addr[0] & 0x01;
69}
70
71/**
59 * is_valid_ether_addr - Determine if the given Ethernet address is valid 72 * is_valid_ether_addr - Determine if the given Ethernet address is valid
60 * @addr: Pointer to a six-byte array containing the Ethernet address 73 * @addr: Pointer to a six-byte array containing the Ethernet address
61 * 74 *
62 * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not 75 * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not
63 * a multicast address, and is not FF:FF:FF:FF:FF:FF. The multicast 76 * a multicast address, and is not FF:FF:FF:FF:FF:FF.
64 * and FF:FF:... tests are combined into the single test "!(addr[0]&1)".
65 * 77 *
66 * Return true if the address is valid. 78 * Return true if the address is valid.
67 */ 79 */
68static inline int is_valid_ether_addr(const u8 *addr) 80static inline int is_valid_ether_addr(const u8 *addr)
69{ 81{
70 return !(addr[0]&1) && !is_zero_ether_addr(addr); 82 /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to
83 * explicitly check for it here. */
84 return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
71} 85}
72 86
73/** 87/**
@@ -83,6 +97,6 @@ static inline void random_ether_addr(u8 *addr)
83 addr [0] &= 0xfe; /* clear multicast bit */ 97 addr [0] &= 0xfe; /* clear multicast bit */
84 addr [0] |= 0x02; /* set local assignment bit (IEEE802) */ 98 addr [0] |= 0x02; /* set local assignment bit (IEEE802) */
85} 99}
86#endif 100#endif /* __KERNEL__ */
87 101
88#endif /* _LINUX_ETHERDEVICE_H */ 102#endif /* _LINUX_ETHERDEVICE_H */
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index c85b210490ea..a0ab26aab450 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -256,6 +256,7 @@ struct net_device;
256u32 ethtool_op_get_link(struct net_device *dev); 256u32 ethtool_op_get_link(struct net_device *dev);
257u32 ethtool_op_get_tx_csum(struct net_device *dev); 257u32 ethtool_op_get_tx_csum(struct net_device *dev);
258int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); 258int ethtool_op_set_tx_csum(struct net_device *dev, u32 data);
259int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data);
259u32 ethtool_op_get_sg(struct net_device *dev); 260u32 ethtool_op_get_sg(struct net_device *dev);
260int ethtool_op_set_sg(struct net_device *dev, u32 data); 261int ethtool_op_set_sg(struct net_device *dev, u32 data);
261u32 ethtool_op_get_tso(struct net_device *dev); 262u32 ethtool_op_get_tso(struct net_device *dev);
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index ebc712e91066..8336dba18971 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -43,13 +43,17 @@
43#define __IRQ_MASK(x) ((1UL << (x))-1) 43#define __IRQ_MASK(x) ((1UL << (x))-1)
44 44
45#define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT) 45#define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
46#define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
47#define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) 46#define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
47#define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
48 48
49#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) 49#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
50#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) 50#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
51#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) 51#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
52 52
53#if PREEMPT_ACTIVE < (1 << (HARDIRQ_SHIFT + HARDIRQ_BITS))
54#error PREEMPT_ACTIVE is too low!
55#endif
56
53#define hardirq_count() (preempt_count() & HARDIRQ_MASK) 57#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
54#define softirq_count() (preempt_count() & SOFTIRQ_MASK) 58#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
55#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK)) 59#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index 6fafb27877a7..7e1e15f934f3 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -29,6 +29,7 @@ struct ipv4_devconf
29 int no_xfrm; 29 int no_xfrm;
30 int no_policy; 30 int no_policy;
31 int force_igmp_version; 31 int force_igmp_version;
32 int promote_secondaries;
32 void *sysctl; 33 void *sysctl;
33}; 34};
34 35
@@ -71,6 +72,7 @@ struct in_device
71#define IN_DEV_SEC_REDIRECTS(in_dev) (ipv4_devconf.secure_redirects || (in_dev)->cnf.secure_redirects) 72#define IN_DEV_SEC_REDIRECTS(in_dev) (ipv4_devconf.secure_redirects || (in_dev)->cnf.secure_redirects)
72#define IN_DEV_IDTAG(in_dev) ((in_dev)->cnf.tag) 73#define IN_DEV_IDTAG(in_dev) ((in_dev)->cnf.tag)
73#define IN_DEV_MEDIUM_ID(in_dev) ((in_dev)->cnf.medium_id) 74#define IN_DEV_MEDIUM_ID(in_dev) ((in_dev)->cnf.medium_id)
75#define IN_DEV_PROMOTE_SECONDARIES(in_dev) (ipv4_devconf.promote_secondaries || (in_dev)->cnf.promote_secondaries)
74 76
75#define IN_DEV_RX_REDIRECTS(in_dev) \ 77#define IN_DEV_RX_REDIRECTS(in_dev) \
76 ((IN_DEV_FORWARD(in_dev) && \ 78 ((IN_DEV_FORWARD(in_dev) && \
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 1f7e2039a04e..e74f301e9bae 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -410,6 +410,7 @@ extern u8 ata_chk_err(struct ata_port *ap);
410extern void ata_exec_command(struct ata_port *ap, struct ata_taskfile *tf); 410extern void ata_exec_command(struct ata_port *ap, struct ata_taskfile *tf);
411extern int ata_port_start (struct ata_port *ap); 411extern int ata_port_start (struct ata_port *ap);
412extern void ata_port_stop (struct ata_port *ap); 412extern void ata_port_stop (struct ata_port *ap);
413extern void ata_host_stop (struct ata_host_set *host_set);
413extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); 414extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
414extern void ata_qc_prep(struct ata_queued_cmd *qc); 415extern void ata_qc_prep(struct ata_queued_cmd *qc);
415extern int ata_qc_issue_prot(struct ata_queued_cmd *qc); 416extern int ata_qc_issue_prot(struct ata_queued_cmd *qc);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index b25bd02720d3..470af8c1a4a0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -401,7 +401,7 @@ struct net_device
401 } reg_state; 401 } reg_state;
402 402
403 /* Net device features */ 403 /* Net device features */
404 int features; 404 unsigned long features;
405#define NETIF_F_SG 1 /* Scatter/gather IO. */ 405#define NETIF_F_SG 1 /* Scatter/gather IO. */
406#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ 406#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */
407#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ 407#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */
@@ -913,6 +913,7 @@ extern void dev_mc_discard(struct net_device *dev);
913extern void dev_set_promiscuity(struct net_device *dev, int inc); 913extern void dev_set_promiscuity(struct net_device *dev, int inc);
914extern void dev_set_allmulti(struct net_device *dev, int inc); 914extern void dev_set_allmulti(struct net_device *dev, int inc);
915extern void netdev_state_change(struct net_device *dev); 915extern void netdev_state_change(struct net_device *dev);
916extern void netdev_features_change(struct net_device *dev);
916/* Load a device via the kmod */ 917/* Load a device via the kmod */
917extern void dev_load(const char *name); 918extern void dev_load(const char *name);
918extern void dev_mcast_init(void); 919extern void dev_mcast_init(void);
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 9303a003e9ab..5937dd6053c3 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -56,6 +56,7 @@ extern int notifier_call_chain(struct notifier_block **n, unsigned long val, voi
56#define NETDEV_CHANGEADDR 0x0008 56#define NETDEV_CHANGEADDR 0x0008
57#define NETDEV_GOING_DOWN 0x0009 57#define NETDEV_GOING_DOWN 0x0009
58#define NETDEV_CHANGENAME 0x000A 58#define NETDEV_CHANGENAME 0x000A
59#define NETDEV_FEAT_CHANGE 0x000B
59 60
60#define SYS_DOWN 0x0001 /* Notify of system down */ 61#define SYS_DOWN 0x0001 /* Notify of system down */
61#define SYS_RESTART SYS_DOWN 62#define SYS_RESTART SYS_DOWN
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 772998147e3e..23032d9d6071 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -399,6 +399,7 @@ enum
399 NET_IPV4_CONF_FORCE_IGMP_VERSION=17, 399 NET_IPV4_CONF_FORCE_IGMP_VERSION=17,
400 NET_IPV4_CONF_ARP_ANNOUNCE=18, 400 NET_IPV4_CONF_ARP_ANNOUNCE=18,
401 NET_IPV4_CONF_ARP_IGNORE=19, 401 NET_IPV4_CONF_ARP_IGNORE=19,
402 NET_IPV4_CONF_PROMOTE_SECONDARIES=20,
402 __NET_IPV4_CONF_MAX 403 __NET_IPV4_CONF_MAX
403}; 404};
404 405
diff --git a/include/net/route.h b/include/net/route.h
index efe92b239ef1..d34ca8fc6756 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -181,9 +181,6 @@ static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport,
181 memcpy(&fl, &(*rp)->fl, sizeof(fl)); 181 memcpy(&fl, &(*rp)->fl, sizeof(fl));
182 fl.fl_ip_sport = sport; 182 fl.fl_ip_sport = sport;
183 fl.fl_ip_dport = dport; 183 fl.fl_ip_dport = dport;
184#if defined(CONFIG_IP_ROUTE_MULTIPATH_CACHED)
185 fl.flags |= FLOWI_FLAG_MULTIPATHOLDROUTE;
186#endif
187 ip_rt_put(*rp); 184 ip_rt_put(*rp);
188 *rp = NULL; 185 *rp = NULL;
189 return ip_route_output_flow(rp, &fl, sk, 0); 186 return ip_route_output_flow(rp, &fl, sk, 0);