[kernel] r11063 - in dists/trunk/linux-2.6/debian/patches: bugfix/all series
Maximilian Attems
maks at alioth.debian.org
Tue Apr 8 19:58:22 UTC 2008
Author: maks
Date: Tue Apr 8 19:58:21 2008
New Revision: 11063
Log:
update to 2.6.25-rc8-git7
no new conflicts, upstream sparc, net, drivers net fixes..
Added:
dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc8-git7
- copied, changed from r11059, /dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc8-git5
Removed:
dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc8-git5
Modified:
dists/trunk/linux-2.6/debian/patches/series/1~experimental.1
Copied: dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc8-git7 (from r11059, /dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc8-git5)
==============================================================================
--- /dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc8-git5 (original)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc8-git7 Tue Apr 8 19:58:21 2008
@@ -15881,6 +15881,92 @@
/*
* GDB stub needs to call kgdb_wait on all processor with interrupts
+diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
+index 6496925..77aefb4 100644
+--- a/arch/mips/mm/c-r4k.c
++++ b/arch/mips/mm/c-r4k.c
+@@ -361,6 +361,16 @@ static inline int has_valid_asid(const struct mm_struct *mm)
+ #endif
+ }
+
++static void r4k__flush_cache_vmap(void)
++{
++ r4k_blast_dcache();
++}
++
++static void r4k__flush_cache_vunmap(void)
++{
++ r4k_blast_dcache();
++}
++
+ static inline void local_r4k_flush_cache_range(void * args)
+ {
+ struct vm_area_struct *vma = args;
+@@ -1281,6 +1291,10 @@ void __cpuinit r4k_cache_init(void)
+ PAGE_SIZE - 1);
+ else
+ shm_align_mask = PAGE_SIZE-1;
++
++ __flush_cache_vmap = r4k__flush_cache_vmap;
++ __flush_cache_vunmap = r4k__flush_cache_vunmap;
++
+ flush_cache_all = cache_noop;
+ __flush_cache_all = r4k___flush_cache_all;
+ flush_cache_mm = r4k_flush_cache_mm;
+diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c
+index b09d569..a9f7f1f 100644
+--- a/arch/mips/mm/c-tx39.c
++++ b/arch/mips/mm/c-tx39.c
+@@ -122,6 +122,16 @@ static inline void tx39_blast_icache(void)
+ local_irq_restore(flags);
+ }
+
++static void tx39__flush_cache_vmap(void)
++{
++ tx39_blast_dcache();
++}
++
++static void tx39__flush_cache_vunmap(void)
++{
++ tx39_blast_dcache();
++}
++
+ static inline void tx39_flush_cache_all(void)
+ {
+ if (!cpu_has_dc_aliases)
+@@ -344,6 +354,8 @@ void __cpuinit tx39_cache_init(void)
+ switch (current_cpu_type()) {
+ case CPU_TX3912:
+ /* TX39/H core (writethru direct-map cache) */
++ __flush_cache_vmap = tx39__flush_cache_vmap;
++ __flush_cache_vunmap = tx39__flush_cache_vunmap;
+ flush_cache_all = tx39h_flush_icache_all;
+ __flush_cache_all = tx39h_flush_icache_all;
+ flush_cache_mm = (void *) tx39h_flush_icache_all;
+@@ -369,6 +381,9 @@ void __cpuinit tx39_cache_init(void)
+ write_c0_wired(0); /* set 8 on reset... */
+ /* board-dependent init code may set WBON */
+
++ __flush_cache_vmap = tx39__flush_cache_vmap;
++ __flush_cache_vunmap = tx39__flush_cache_vunmap;
++
+ flush_cache_all = tx39_flush_cache_all;
+ __flush_cache_all = tx39___flush_cache_all;
+ flush_cache_mm = tx39_flush_cache_mm;
+diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
+index 51ab1fa..f590367 100644
+--- a/arch/mips/mm/cache.c
++++ b/arch/mips/mm/cache.c
+@@ -30,6 +30,9 @@ void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
+ unsigned long pfn);
+ void (*flush_icache_range)(unsigned long start, unsigned long end);
+
++void (*__flush_cache_vmap)(void);
++void (*__flush_cache_vunmap)(void);
++
+ /* MIPS specific cache operations */
+ void (*flush_cache_sigtramp)(unsigned long addr);
+ void (*local_flush_data_cache_page)(void * addr);
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
index 30737ea..c6ca631 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
@@ -16928,6 +17014,206 @@
}
/* Calculate next page pointer for contiguous check */
+diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
+index aaae865..7963595 100644
+--- a/arch/sparc64/kernel/ptrace.c
++++ b/arch/sparc64/kernel/ptrace.c
+@@ -138,8 +138,17 @@ static int genregs64_get(struct task_struct *target,
+ (regs->u_regs[UREG_I6] + STACK_BIAS);
+ unsigned long window[16];
+
+- if (copy_from_user(window, reg_window, sizeof(window)))
+- return -EFAULT;
++ if (target == current) {
++ if (copy_from_user(window, reg_window, sizeof(window)))
++ return -EFAULT;
++ } else {
++ if (access_process_vm(target,
++ (unsigned long) reg_window,
++ window,
++ sizeof(window), 0) !=
++ sizeof(window))
++ return -EFAULT;
++ }
+
+ ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
+ window,
+@@ -190,16 +199,37 @@ static int genregs64_set(struct task_struct *target,
+ (regs->u_regs[UREG_I6] + STACK_BIAS);
+ unsigned long window[16];
+
+- if (copy_from_user(window, reg_window, sizeof(window)))
+- return -EFAULT;
++ if (target == current) {
++ if (copy_from_user(window, reg_window, sizeof(window)))
++ return -EFAULT;
++ } else {
++ if (access_process_vm(target,
++ (unsigned long) reg_window,
++ window,
++ sizeof(window), 0) !=
++ sizeof(window))
++ return -EFAULT;
++ }
+
+ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
+ window,
+ 16 * sizeof(u64),
+ 32 * sizeof(u64));
+- if (!ret &&
+- copy_to_user(reg_window, window, sizeof(window)))
+- return -EFAULT;
++ if (!ret) {
++ if (target == current) {
++ if (copy_to_user(reg_window, window,
++ sizeof(window)))
++ return -EFAULT;
++ } else {
++ if (access_process_vm(target,
++ (unsigned long)
++ reg_window,
++ window,
++ sizeof(window), 1) !=
++ sizeof(window))
++ return -EFAULT;
++ }
++ }
+ }
+
+ if (!ret && count > 0) {
+@@ -412,9 +442,22 @@ static int genregs32_get(struct task_struct *target,
+ *k++ = regs->u_regs[pos++];
+
+ reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
+- for (; count > 0 && pos < 32; count--) {
+- if (get_user(*k++, ®_window[pos++]))
+- return -EFAULT;
++ if (target == current) {
++ for (; count > 0 && pos < 32; count--) {
++ if (get_user(*k++, ®_window[pos++]))
++ return -EFAULT;
++ }
++ } else {
++ for (; count > 0 && pos < 32; count--) {
++ if (access_process_vm(target,
++ (unsigned long)
++ ®_window[pos],
++ k, sizeof(*k), 0)
++ != sizeof(*k))
++ return -EFAULT;
++ k++;
++ pos++;
++ }
+ }
+ } else {
+ for (; count > 0 && pos < 16; count--) {
+@@ -423,10 +466,28 @@ static int genregs32_get(struct task_struct *target,
+ }
+
+ reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
+- for (; count > 0 && pos < 32; count--) {
+- if (get_user(reg, ®_window[pos++]) ||
+- put_user(reg, u++))
+- return -EFAULT;
++ if (target == current) {
++ for (; count > 0 && pos < 32; count--) {
++ if (get_user(reg, ®_window[pos++]) ||
++ put_user(reg, u++))
++ return -EFAULT;
++ }
++ } else {
++ for (; count > 0 && pos < 32; count--) {
++ if (access_process_vm(target,
++ (unsigned long)
++ ®_window[pos],
++ ®, sizeof(reg), 0)
++ != sizeof(reg))
++ return -EFAULT;
++ if (access_process_vm(target,
++ (unsigned long) u,
++ ®, sizeof(reg), 1)
++ != sizeof(reg))
++ return -EFAULT;
++ pos++;
++ u++;
++ }
+ }
+ }
+ while (count > 0) {
+@@ -488,9 +549,23 @@ static int genregs32_set(struct task_struct *target,
+ regs->u_regs[pos++] = *k++;
+
+ reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
+- for (; count > 0 && pos < 32; count--) {
+- if (put_user(*k++, ®_window[pos++]))
+- return -EFAULT;
++ if (target == current) {
++ for (; count > 0 && pos < 32; count--) {
++ if (put_user(*k++, ®_window[pos++]))
++ return -EFAULT;
++ }
++ } else {
++ for (; count > 0 && pos < 32; count--) {
++ if (access_process_vm(target,
++ (unsigned long)
++ ®_window[pos],
++ (void *) k,
++ sizeof(*k), 1)
++ != sizeof(*k))
++ return -EFAULT;
++ k++;
++ pos++;
++ }
+ }
+ } else {
+ for (; count > 0 && pos < 16; count--) {
+@@ -500,10 +575,29 @@ static int genregs32_set(struct task_struct *target,
+ }
+
+ reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
+- for (; count > 0 && pos < 32; count--) {
+- if (get_user(reg, u++) ||
+- put_user(reg, ®_window[pos++]))
+- return -EFAULT;
++ if (target == current) {
++ for (; count > 0 && pos < 32; count--) {
++ if (get_user(reg, u++) ||
++ put_user(reg, ®_window[pos++]))
++ return -EFAULT;
++ }
++ } else {
++ for (; count > 0 && pos < 32; count--) {
++ if (access_process_vm(target,
++ (unsigned long)
++ u,
++ ®, sizeof(reg), 0)
++ != sizeof(reg))
++ return -EFAULT;
++ if (access_process_vm(target,
++ (unsigned long)
++ ®_window[pos],
++ ®, sizeof(reg), 1)
++ != sizeof(reg))
++ return -EFAULT;
++ pos++;
++ u++;
++ }
+ }
+ }
+ while (count > 0) {
+diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
+index 94a9d64..9d51956 100644
+--- a/arch/sparc64/kernel/signal.c
++++ b/arch/sparc64/kernel/signal.c
+@@ -357,7 +357,7 @@ static int invalid_frame_pointer(void __user *fp, int fplen)
+ static inline int
+ save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)
+ {
+- unsigned long *fpregs = (unsigned long *)(regs+1);
++ unsigned long *fpregs = current_thread_info()->fpregs;
+ unsigned long fprs;
+ int err = 0;
+
diff --git a/arch/sparc64/mm/tlb.c b/arch/sparc64/mm/tlb.c
index a0f000b..ae24919 100644
--- a/arch/sparc64/mm/tlb.c
@@ -17094,88 +17380,35 @@
}
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
-index f14cfd9..d7498b3 100644
+index f14cfd9..c2241e0 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
-@@ -287,14 +287,27 @@ core_initcall(cpufreq_tsc);
- /* clock source code */
-
- static unsigned long current_tsc_khz = 0;
-+static struct clocksource clocksource_tsc;
-
-+/*
-+ * We compare the TSC to the cycle_last value in the clocksource
-+ * structure to avoid a nasty time-warp issue. This can be observed in
-+ * a very small window right after one CPU updated cycle_last under
-+ * xtime lock and the other CPU reads a TSC value which is smaller
-+ * than the cycle_last reference value due to a TSC which is slighty
-+ * behind. This delta is nowhere else observable, but in that case it
-+ * results in a forward time jump in the range of hours due to the
-+ * unsigned delta calculation of the time keeping core code, which is
-+ * necessary to support wrapping clocksources like pm timer.
-+ */
- static cycle_t read_tsc(void)
- {
- cycle_t ret;
-
- rdtscll(ret);
-
-- return ret;
-+ return ret >= clocksource_tsc.cycle_last ?
-+ ret : clocksource_tsc.cycle_last;
- }
-
- static struct clocksource clocksource_tsc = {
+@@ -256,9 +256,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data)
+ ref_freq, freq->new);
+ if (!(freq->flags & CPUFREQ_CONST_LOOPS)) {
+ tsc_khz = cpu_khz;
+- preempt_disable();
+- set_cyc2ns_scale(cpu_khz, smp_processor_id());
+- preempt_enable();
++ set_cyc2ns_scale(cpu_khz, freq->cpu);
+ /*
+ * TSC based sched_clock turns
+ * to junk w/ cpufreq
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c
-index 947554d..01fc9f0 100644
+index 947554d..d3bebaa 100644
--- a/arch/x86/kernel/tsc_64.c
+++ b/arch/x86/kernel/tsc_64.c
-@@ -11,6 +11,7 @@
- #include <asm/hpet.h>
- #include <asm/timex.h>
- #include <asm/timer.h>
-+#include <asm/vgtod.h>
-
- static int notsc __initdata = 0;
-
-@@ -290,18 +291,34 @@ int __init notsc_setup(char *s)
-
- __setup("notsc", notsc_setup);
-
-+static struct clocksource clocksource_tsc;
+@@ -148,9 +148,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
+ mark_tsc_unstable("cpufreq changes");
+ }
--/* clock source code: */
-+/*
-+ * We compare the TSC to the cycle_last value in the clocksource
-+ * structure to avoid a nasty time-warp. This can be observed in a
-+ * very small window right after one CPU updated cycle_last under
-+ * xtime/vsyscall_gtod lock and the other CPU reads a TSC value which
-+ * is smaller than the cycle_last reference value due to a TSC which
-+ * is slighty behind. This delta is nowhere else observable, but in
-+ * that case it results in a forward time jump in the range of hours
-+ * due to the unsigned delta calculation of the time keeping core
-+ * code, which is necessary to support wrapping clocksources like pm
-+ * timer.
-+ */
- static cycle_t read_tsc(void)
- {
- cycle_t ret = (cycle_t)get_cycles();
-- return ret;
-+
-+ return ret >= clocksource_tsc.cycle_last ?
-+ ret : clocksource_tsc.cycle_last;
- }
+- preempt_disable();
+- set_cyc2ns_scale(tsc_khz_ref, smp_processor_id());
+- preempt_enable();
++ set_cyc2ns_scale(tsc_khz_ref, freq->cpu);
- static cycle_t __vsyscall_fn vread_tsc(void)
- {
- cycle_t ret = (cycle_t)vget_cycles();
-- return ret;
-+
-+ return ret >= __vsyscall_gtod_data.clock.cycle_last ?
-+ ret : __vsyscall_gtod_data.clock.cycle_last;
+ return 0;
}
-
- static struct clocksource clocksource_tsc = {
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index de4e6f0..27ee26a 100644
--- a/arch/x86/xen/enlighten.c
@@ -18035,6 +18268,19 @@
module_init(cmd640x_init);
+
+MODULE_LICENSE("GPL");
+diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
+index cc4be96..8d624af 100644
+--- a/drivers/ide/pci/siimage.c
++++ b/drivers/ide/pci/siimage.c
+@@ -492,7 +492,7 @@ static void proc_reports_siimage (struct pci_dev *dev, u8 clocking, const char *
+
+ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
+ {
+- unsigned long bar5 = pci_resource_start(dev, 5);
++ resource_size_t bar5 = pci_resource_start(dev, 5);
+ unsigned long barsize = pci_resource_len(dev, 5);
+ u8 tmpbyte = 0;
+ void __iomem *ioaddr;
diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c
index 38fbfb8..ebaba01 100644
--- a/drivers/ide/ppc/mpc8xx.c
@@ -18467,10 +18713,10 @@
dev->clk_freq = 28000000;
} else
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
-index 4df6d6d..98557ce 100644
+index 4df6d6d..fe9991c 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
-@@ -155,6 +155,37 @@ static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
+@@ -155,6 +155,41 @@ static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
/*------------------------------------------------------------------------*/
@@ -18494,12 +18740,16 @@
+ .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
+ .flag_has_cx25840 = !0,
+ .flag_has_hauppauge_rom = !0,
++#if 0
+ .flag_has_analogtuner = !0,
+ .flag_has_composite = !0,
+ .flag_has_svideo = !0,
+ .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
+ .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
+ .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
++#else
++ .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
++#endif
+};
+
+
@@ -18508,7 +18758,7 @@
/* Hauppauge PVR-USB2 Model 75xxx */
static const char *pvr2_client_75xxx[] = {
-@@ -198,8 +229,12 @@ struct usb_device_id pvr2_device_table[] = {
+@@ -198,8 +233,12 @@ struct usb_device_id pvr2_device_table[] = {
{ USB_DEVICE(0x11ba, 0x1001),
.driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
#endif
@@ -18633,7 +18883,7 @@
{}
};
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
-index 6f7e3fd..980c2c2 100644
+index 6f7e3fd..419f533 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -1854,6 +1854,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
@@ -18712,6 +18962,18 @@
dprintk(KERN_DEBUG "%s: nv_start_xmit_optimized: entries %d queued for transmission. tx_flags_extra: %x\n",
dev->name, entries, tx_flags_extra);
+@@ -2110,9 +2112,8 @@ static inline void nv_tx_flip_ownership(struct net_device *dev)
+
+ np->tx_pkts_in_progress--;
+ if (np->tx_change_owner) {
+- __le32 flaglen = le32_to_cpu(np->tx_change_owner->first_tx_desc->flaglen);
+- flaglen |= NV_TX2_VALID;
+- np->tx_change_owner->first_tx_desc->flaglen = cpu_to_le32(flaglen);
++ np->tx_change_owner->first_tx_desc->flaglen |=
++ cpu_to_le32(NV_TX2_VALID);
+ np->tx_pkts_in_progress++;
+
+ np->tx_change_owner = np->tx_change_owner->next_tx_ctx;
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index 0789802..378a239 100644
--- a/drivers/net/ibm_newemac/core.c
@@ -18727,6 +18989,19 @@
++dev->stats.tx_packets_csum;
return EMAC_TX_CTRL_TAH_CSUM;
}
+diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
+index 3353991..32a8503 100644
+--- a/drivers/net/phy/marvell.c
++++ b/drivers/net/phy/marvell.c
+@@ -211,8 +211,6 @@ static int m88e1111_config_init(struct phy_device *phydev)
+ }
+
+ if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
+- int temp;
+-
+ temp = phy_read(phydev, MII_M1111_PHY_EXT_SR);
+ if (temp < 0)
+ return temp;
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 3c915b8..c082cf0 100644
--- a/drivers/net/s2io.c
@@ -18768,6 +19043,444 @@
if (netif_running(dev)) {
err = sky2_up(dev);
if (err) {
+diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
+index 98a832a..51d4134 100644
+--- a/drivers/net/smc91x.h
++++ b/drivers/net/smc91x.h
+@@ -92,14 +92,14 @@
+ #define SMC_insw(a, r, p, l) insw ((unsigned long *)((a) + (r)), p, l)
+ # endif
+ /* check if the mac in reg is valid */
+-#define SMC_GET_MAC_ADDR(lp, addr) \
++#define SMC_GET_MAC_ADDR(addr) \
+ do { \
+ unsigned int __v; \
+- __v = SMC_inw(ioaddr, ADDR0_REG(lp)); \
++ __v = SMC_inw(ioaddr, ADDR0_REG); \
+ addr[0] = __v; addr[1] = __v >> 8; \
+- __v = SMC_inw(ioaddr, ADDR1_REG(lp)); \
++ __v = SMC_inw(ioaddr, ADDR1_REG); \
+ addr[2] = __v; addr[3] = __v >> 8; \
+- __v = SMC_inw(ioaddr, ADDR2_REG(lp)); \
++ __v = SMC_inw(ioaddr, ADDR2_REG); \
+ addr[4] = __v; addr[5] = __v >> 8; \
+ if (*(u32 *)(&addr[0]) == 0xFFFFFFFF) { \
+ random_ether_addr(addr); \
+diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
+index f9ef8bd..d4655b2 100644
+--- a/drivers/net/tg3.c
++++ b/drivers/net/tg3.c
+@@ -64,8 +64,8 @@
+
+ #define DRV_MODULE_NAME "tg3"
+ #define PFX DRV_MODULE_NAME ": "
+-#define DRV_MODULE_VERSION "3.88"
+-#define DRV_MODULE_RELDATE "March 20, 2008"
++#define DRV_MODULE_VERSION "3.89"
++#define DRV_MODULE_RELDATE "April 03, 2008"
+
+ #define TG3_DEF_MAC_MODE 0
+ #define TG3_DEF_RX_MODE 0
+@@ -804,6 +804,12 @@ static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
+ return ret;
+ }
+
++static void tg3_phydsp_write(struct tg3 *tp, u32 reg, u32 val)
++{
++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, reg);
++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, val);
++}
++
+ static void tg3_phy_toggle_automdix(struct tg3 *tp, int enable)
+ {
+ u32 phy;
+@@ -886,6 +892,49 @@ static int tg3_bmcr_reset(struct tg3 *tp)
+ return 0;
+ }
+
++static void tg3_phy_apply_otp(struct tg3 *tp)
++{
++ u32 otp, phy;
++
++ if (!tp->phy_otp)
++ return;
++
++ otp = tp->phy_otp;
++
++ /* Enable SM_DSP clock and tx 6dB coding. */
++ phy = MII_TG3_AUXCTL_SHDWSEL_AUXCTL |
++ MII_TG3_AUXCTL_ACTL_SMDSP_ENA |
++ MII_TG3_AUXCTL_ACTL_TX_6DB;
++ tg3_writephy(tp, MII_TG3_AUX_CTRL, phy);
++
++ phy = ((otp & TG3_OTP_AGCTGT_MASK) >> TG3_OTP_AGCTGT_SHIFT);
++ phy |= MII_TG3_DSP_TAP1_AGCTGT_DFLT;
++ tg3_phydsp_write(tp, MII_TG3_DSP_TAP1, phy);
++
++ phy = ((otp & TG3_OTP_HPFFLTR_MASK) >> TG3_OTP_HPFFLTR_SHIFT) |
++ ((otp & TG3_OTP_HPFOVER_MASK) >> TG3_OTP_HPFOVER_SHIFT);
++ tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH0, phy);
++
++ phy = ((otp & TG3_OTP_LPFDIS_MASK) >> TG3_OTP_LPFDIS_SHIFT);
++ phy |= MII_TG3_DSP_AADJ1CH3_ADCCKADJ;
++ tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH3, phy);
++
++ phy = ((otp & TG3_OTP_VDAC_MASK) >> TG3_OTP_VDAC_SHIFT);
++ tg3_phydsp_write(tp, MII_TG3_DSP_EXP75, phy);
++
++ phy = ((otp & TG3_OTP_10BTAMP_MASK) >> TG3_OTP_10BTAMP_SHIFT);
++ tg3_phydsp_write(tp, MII_TG3_DSP_EXP96, phy);
++
++ phy = ((otp & TG3_OTP_ROFF_MASK) >> TG3_OTP_ROFF_SHIFT) |
++ ((otp & TG3_OTP_RCOFF_MASK) >> TG3_OTP_RCOFF_SHIFT);
++ tg3_phydsp_write(tp, MII_TG3_DSP_EXP97, phy);
++
++ /* Turn off SM_DSP clock. */
++ phy = MII_TG3_AUXCTL_SHDWSEL_AUXCTL |
++ MII_TG3_AUXCTL_ACTL_TX_6DB;
++ tg3_writephy(tp, MII_TG3_AUX_CTRL, phy);
++}
++
+ static int tg3_wait_macro_done(struct tg3 *tp)
+ {
+ int limit = 100;
+@@ -1073,6 +1122,7 @@ static void tg3_link_report(struct tg3 *);
+ */
+ static int tg3_phy_reset(struct tg3 *tp)
+ {
++ u32 cpmuctrl;
+ u32 phy_status;
+ int err;
+
+@@ -1102,10 +1152,28 @@ static int tg3_phy_reset(struct tg3 *tp)
+ goto out;
+ }
+
++ cpmuctrl = 0;
++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
++ GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) {
++ cpmuctrl = tr32(TG3_CPMU_CTRL);
++ if (cpmuctrl & CPMU_CTRL_GPHY_10MB_RXONLY)
++ tw32(TG3_CPMU_CTRL,
++ cpmuctrl & ~CPMU_CTRL_GPHY_10MB_RXONLY);
++ }
++
+ err = tg3_bmcr_reset(tp);
+ if (err)
+ return err;
+
++ if (cpmuctrl & CPMU_CTRL_GPHY_10MB_RXONLY) {
++ u32 phy;
++
++ phy = MII_TG3_DSP_EXP8_AEDW | MII_TG3_DSP_EXP8_REJ2MHz;
++ tg3_phydsp_write(tp, MII_TG3_DSP_EXP8, phy);
++
++ tw32(TG3_CPMU_CTRL, cpmuctrl);
++ }
++
+ if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) {
+ u32 val;
+
+@@ -1124,6 +1192,8 @@ static int tg3_phy_reset(struct tg3 *tp)
+ MII_TG3_MISC_SHDW_APD_WKTM_84MS);
+ }
+
++ tg3_phy_apply_otp(tp);
++
+ out:
+ if (tp->tg3_flags2 & TG3_FLG2_PHY_ADC_BUG) {
+ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00);
+@@ -9464,7 +9534,8 @@ static int tg3_test_loopback(struct tg3 *tp)
+ if (err)
+ return TG3_LOOPBACK_FAILED;
+
+- if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) {
++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
++ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) {
+ int i;
+ u32 status;
+
+@@ -9481,17 +9552,23 @@ static int tg3_test_loopback(struct tg3 *tp)
+ if (status != CPMU_MUTEX_GNT_DRIVER)
+ return TG3_LOOPBACK_FAILED;
+
+- /* Turn off power management based on link speed. */
++ /* Turn off link-based power management. */
+ cpmuctrl = tr32(TG3_CPMU_CTRL);
+- tw32(TG3_CPMU_CTRL,
+- cpmuctrl & ~(CPMU_CTRL_LINK_SPEED_MODE |
+- CPMU_CTRL_LINK_AWARE_MODE));
++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
++ GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5761_AX)
++ tw32(TG3_CPMU_CTRL,
++ cpmuctrl & ~(CPMU_CTRL_LINK_SPEED_MODE |
++ CPMU_CTRL_LINK_AWARE_MODE));
++ else
++ tw32(TG3_CPMU_CTRL,
++ cpmuctrl & ~CPMU_CTRL_LINK_AWARE_MODE);
+ }
+
+ if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK))
+ err |= TG3_MAC_LOOPBACK_FAILED;
+
+- if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) {
++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
++ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) {
+ tw32(TG3_CPMU_CTRL, cpmuctrl);
+
+ /* Release the mutex */
+@@ -10724,9 +10801,8 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
+ tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL)
+ tp->led_ctrl = LED_CTRL_MODE_PHY_2;
+
+- if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0 ||
+- tp->pci_chip_rev_id == CHIPREV_ID_5784_A1)
+- tp->led_ctrl = LED_CTRL_MODE_MAC;
++ if (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5784_AX)
++ tp->led_ctrl = LED_CTRL_MODE_PHY_1;
+
+ if (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP) {
+ tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT;
+@@ -10773,6 +10849,55 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
+ }
+ }
+
++static int __devinit tg3_issue_otp_command(struct tg3 *tp, u32 cmd)
++{
++ int i;
++ u32 val;
++
++ tw32(OTP_CTRL, cmd | OTP_CTRL_OTP_CMD_START);
++ tw32(OTP_CTRL, cmd);
++
++ /* Wait for up to 1 ms for command to execute. */
++ for (i = 0; i < 100; i++) {
++ val = tr32(OTP_STATUS);
++ if (val & OTP_STATUS_CMD_DONE)
++ break;
++ udelay(10);
++ }
++
++ return (val & OTP_STATUS_CMD_DONE) ? 0 : -EBUSY;
++}
++
++/* Read the gphy configuration from the OTP region of the chip. The gphy
++ * configuration is a 32-bit value that straddles the alignment boundary.
++ * We do two 32-bit reads and then shift and merge the results.
++ */
++static u32 __devinit tg3_read_otp_phycfg(struct tg3 *tp)
++{
++ u32 bhalf_otp, thalf_otp;
++
++ tw32(OTP_MODE, OTP_MODE_OTP_THRU_GRC);
++
++ if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_INIT))
++ return 0;
++
++ tw32(OTP_ADDRESS, OTP_ADDRESS_MAGIC1);
++
++ if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ))
++ return 0;
++
++ thalf_otp = tr32(OTP_READ_DATA);
++
++ tw32(OTP_ADDRESS, OTP_ADDRESS_MAGIC2);
++
++ if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ))
++ return 0;
++
++ bhalf_otp = tr32(OTP_READ_DATA);
++
++ return ((thalf_otp & 0x0000ffff) << 16) | (bhalf_otp >> 16);
++}
++
+ static int __devinit tg3_phy_probe(struct tg3 *tp)
+ {
+ u32 hw_phy_id_1, hw_phy_id_2;
+@@ -11586,6 +11711,13 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
+ tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG;
+ }
+
++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
++ GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) {
++ tp->phy_otp = tg3_read_otp_phycfg(tp);
++ if (tp->phy_otp == 0)
++ tp->phy_otp = TG3_OTP_DEFAULT;
++ }
++
+ tp->coalesce_mode = 0;
+ if (GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_AX &&
+ GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_BX)
+diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
+index 3938eb3..c1075a7 100644
+--- a/drivers/net/tg3.h
++++ b/drivers/net/tg3.h
+@@ -138,6 +138,8 @@
+ #define CHIPREV_5704_BX 0x21
+ #define CHIPREV_5750_AX 0x40
+ #define CHIPREV_5750_BX 0x41
++#define CHIPREV_5784_AX 0x57840
++#define CHIPREV_5761_AX 0x57610
+ #define GET_METAL_REV(CHIP_REV_ID) ((CHIP_REV_ID) & 0xff)
+ #define METAL_REV_A0 0x00
+ #define METAL_REV_A1 0x01
+@@ -866,6 +868,7 @@
+ #define CPMU_CTRL_LINK_IDLE_MODE 0x00000200
+ #define CPMU_CTRL_LINK_AWARE_MODE 0x00000400
+ #define CPMU_CTRL_LINK_SPEED_MODE 0x00004000
++#define CPMU_CTRL_GPHY_10MB_RXONLY 0x00010000
+ #define TG3_CPMU_LSPD_10MB_CLK 0x00003604
+ #define CPMU_LSPD_10MB_MACCLK_MASK 0x001f0000
+ #define CPMU_LSPD_10MB_MACCLK_6_25 0x00130000
+@@ -1559,7 +1562,24 @@
+ /* 0x702c unused */
+
+ #define NVRAM_ADDR_LOCKOUT 0x00007030
+-/* 0x7034 --> 0x7c00 unused */
++/* 0x7034 --> 0x7500 unused */
++
++#define OTP_MODE 0x00007500
++#define OTP_MODE_OTP_THRU_GRC 0x00000001
++#define OTP_CTRL 0x00007504
++#define OTP_CTRL_OTP_PROG_ENABLE 0x00200000
++#define OTP_CTRL_OTP_CMD_READ 0x00000000
++#define OTP_CTRL_OTP_CMD_INIT 0x00000008
++#define OTP_CTRL_OTP_CMD_START 0x00000001
++#define OTP_STATUS 0x00007508
++#define OTP_STATUS_CMD_DONE 0x00000001
++#define OTP_ADDRESS 0x0000750c
++#define OTP_ADDRESS_MAGIC1 0x000000a0
++#define OTP_ADDRESS_MAGIC2 0x00000080
++/* 0x7510 unused */
++
++#define OTP_READ_DATA 0x00007514
++/* 0x7518 --> 0x7c04 unused */
+
+ #define PCIE_TRANSACTION_CFG 0x00007c04
+ #define PCIE_TRANS_CFG_1SHOT_MSI 0x20000000
+@@ -1568,6 +1588,28 @@
+ #define PCIE_PWR_MGMT_THRESH 0x00007d28
+ #define PCIE_PWR_MGMT_L1_THRESH_MSK 0x0000ff00
+
++
++/* OTP bit definitions */
++#define TG3_OTP_AGCTGT_MASK 0x000000e0
++#define TG3_OTP_AGCTGT_SHIFT 1
++#define TG3_OTP_HPFFLTR_MASK 0x00000300
++#define TG3_OTP_HPFFLTR_SHIFT 1
++#define TG3_OTP_HPFOVER_MASK 0x00000400
++#define TG3_OTP_HPFOVER_SHIFT 1
++#define TG3_OTP_LPFDIS_MASK 0x00000800
++#define TG3_OTP_LPFDIS_SHIFT 11
++#define TG3_OTP_VDAC_MASK 0xff000000
++#define TG3_OTP_VDAC_SHIFT 24
++#define TG3_OTP_10BTAMP_MASK 0x0000f000
++#define TG3_OTP_10BTAMP_SHIFT 8
++#define TG3_OTP_ROFF_MASK 0x00e00000
++#define TG3_OTP_ROFF_SHIFT 11
++#define TG3_OTP_RCOFF_MASK 0x001c0000
++#define TG3_OTP_RCOFF_SHIFT 16
++
++#define TG3_OTP_DEFAULT 0x286c1640
++
++
+ #define TG3_EEPROM_MAGIC 0x669955aa
+ #define TG3_EEPROM_MAGIC_FW 0xa5000000
+ #define TG3_EEPROM_MAGIC_FW_MSK 0xff000000
+@@ -1705,15 +1747,31 @@
+
+ #define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */
+
+-#define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */
+ #define MII_TG3_EPHY_PTEST 0x17 /* 5906 PHY register */
++#define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */
++
++#define MII_TG3_DSP_TAP1 0x0001
++#define MII_TG3_DSP_TAP1_AGCTGT_DFLT 0x0007
++#define MII_TG3_DSP_AADJ1CH0 0x001f
++#define MII_TG3_DSP_AADJ1CH3 0x601f
++#define MII_TG3_DSP_AADJ1CH3_ADCCKADJ 0x0002
++#define MII_TG3_DSP_EXP8 0x0708
++#define MII_TG3_DSP_EXP8_REJ2MHz 0x0001
++#define MII_TG3_DSP_EXP8_AEDW 0x0200
++#define MII_TG3_DSP_EXP75 0x0f75
++#define MII_TG3_DSP_EXP96 0x0f96
++#define MII_TG3_DSP_EXP97 0x0f97
+
+ #define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */
+
+ #define MII_TG3_AUXCTL_MISC_WREN 0x8000
+ #define MII_TG3_AUXCTL_MISC_FORCE_AMDIX 0x0200
+ #define MII_TG3_AUXCTL_MISC_RDSEL_MISC 0x7000
+-#define MII_TG3_AUXCTL_SHDWSEL_MISC 0x0007
++#define MII_TG3_AUXCTL_SHDWSEL_MISC 0x0007
++
++#define MII_TG3_AUXCTL_ACTL_SMDSP_ENA 0x0800
++#define MII_TG3_AUXCTL_ACTL_TX_6DB 0x0400
++#define MII_TG3_AUXCTL_SHDWSEL_AUXCTL 0x0000
+
+ #define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */
+ #define MII_TG3_AUX_STAT_LPASS 0x0004
+@@ -1743,6 +1801,20 @@
+ #define MII_TG3_INT_DUPLEXCHG 0x0008
+ #define MII_TG3_INT_ANEG_PAGE_RX 0x0400
+
++#define MII_TG3_MISC_SHDW 0x1c
++#define MII_TG3_MISC_SHDW_WREN 0x8000
++#define MII_TG3_MISC_SHDW_SCR5_SEL 0x1400
++#define MII_TG3_MISC_SHDW_APD_SEL 0x2800
++
++#define MII_TG3_MISC_SHDW_SCR5_C125OE 0x0001
++#define MII_TG3_MISC_SHDW_SCR5_DLLAPD 0x0002
++#define MII_TG3_MISC_SHDW_SCR5_SDTL 0x0004
++#define MII_TG3_MISC_SHDW_SCR5_DLPTLM 0x0008
++#define MII_TG3_MISC_SHDW_SCR5_LPED 0x0010
++
++#define MII_TG3_MISC_SHDW_APD_WKTM_84MS 0x0001
++#define MII_TG3_MISC_SHDW_APD_ENABLE 0x0020
++
+ #define MII_TG3_EPHY_TEST 0x1f /* 5906 PHY register */
+ #define MII_TG3_EPHY_SHADOW_EN 0x80
+
+@@ -2473,6 +2545,7 @@ struct tg3 {
+ #define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */
+
+ u32 led_ctrl;
++ u32 phy_otp;
+ u16 pci_cmd;
+
+ char board_part_number[24];
+diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
+index 433c994..db4ca4f 100644
+--- a/drivers/net/tokenring/olympic.c
++++ b/drivers/net/tokenring/olympic.c
+@@ -117,7 +117,7 @@
+ * Official releases will only have an a.b.c version number format.
+ */
+
+-static char version[] __devinitdata =
++static char version[] =
+ "Olympic.c v1.0.5 6/04/02 - Peter De Schrijver & Mike Phillips" ;
+
+ static char *open_maj_error[] = {"No error", "Lobe Media Test", "Physical Insertion",
+@@ -290,7 +290,7 @@ op_disable_dev:
+ return i;
+ }
+
+-static int __devinit olympic_init(struct net_device *dev)
++static int olympic_init(struct net_device *dev)
+ {
+ struct olympic_private *olympic_priv;
+ u8 __iomem *olympic_mmio, *init_srb,*adapter_addr;
+@@ -434,7 +434,7 @@ static int __devinit olympic_init(struct net_device *dev)
+
+ }
+
+-static int __devinit olympic_open(struct net_device *dev)
++static int olympic_open(struct net_device *dev)
+ {
+ struct olympic_private *olympic_priv=netdev_priv(dev);
+ u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*init_srb;
diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c
index 206918b..da2206f 100644
--- a/drivers/net/tulip/eeprom.c
@@ -18854,6 +19567,18 @@
return 0;
}
+diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
+index b58472c..d1a200f 100644
+--- a/drivers/net/virtio_net.c
++++ b/drivers/net/virtio_net.c
+@@ -284,7 +284,6 @@ again:
+ /* Activate callback for using skbs: if this returns false it
+ * means some were used in the meantime. */
+ if (unlikely(!vi->svq->vq_ops->enable_cb(vi->svq))) {
+- printk("Unlikely: restart svq race\n");
+ vi->svq->vq_ops->disable_cb(vi->svq);
+ netif_start_queue(dev);
+ goto again;
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index fb37b80..824df3b 100644
--- a/drivers/net/wan/lapbether.c
@@ -20669,6 +21394,21 @@
.num_ports = 2,
.open = visor_open,
.close = visor_close,
+diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
+index aa71402..c2fa5c6 100644
+--- a/drivers/virtio/virtio_ring.c
++++ b/drivers/virtio/virtio_ring.c
+@@ -214,10 +214,7 @@ static void vring_disable_cb(struct virtqueue *_vq)
+ {
+ struct vring_virtqueue *vq = to_vvq(_vq);
+
+- START_USE(vq);
+- BUG_ON(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT);
+ vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT;
+- END_USE(vq);
+ }
+
+ static bool vring_enable_cb(struct virtqueue *_vq)
diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c
index ca90c51..445b7e8 100644
--- a/drivers/watchdog/it8712f_wdt.c
@@ -21004,6 +21744,35 @@
+/* m68knommu does not support KVM */
+
+#endif
+diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h
+index 01e7ead..d5c0f2f 100644
+--- a/include/asm-mips/cacheflush.h
++++ b/include/asm-mips/cacheflush.h
+@@ -63,8 +63,22 @@ static inline void flush_icache_page(struct vm_area_struct *vma,
+ }
+
+ extern void (*flush_icache_range)(unsigned long start, unsigned long end);
+-#define flush_cache_vmap(start, end) flush_cache_all()
+-#define flush_cache_vunmap(start, end) flush_cache_all()
++
++extern void (*__flush_cache_vmap)(void);
++
++static inline void flush_cache_vmap(unsigned long start, unsigned long end)
++{
++ if (cpu_has_dc_aliases)
++ __flush_cache_vmap();
++}
++
++extern void (*__flush_cache_vunmap)(void);
++
++static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
++{
++ if (cpu_has_dc_aliases)
++ __flush_cache_vunmap();
++}
+
+ extern void copy_to_user_page(struct vm_area_struct *vma,
+ struct page *page, unsigned long vaddr, void *dst, const void *src,
diff --git a/include/asm-mips/kvm.h b/include/asm-mips/kvm.h
new file mode 100644
index 0000000..093a5b7
@@ -21195,6 +21964,44 @@
static inline int raw_irqs_disabled(void)
{
+diff --git a/include/asm-x86/nops.h b/include/asm-x86/nops.h
+index e3b2bce..b3930ae 100644
+--- a/include/asm-x86/nops.h
++++ b/include/asm-x86/nops.h
+@@ -73,16 +73,7 @@
+ #define P6_NOP7 ".byte 0x0f,0x1f,0x80,0,0,0,0\n"
+ #define P6_NOP8 ".byte 0x0f,0x1f,0x84,0x00,0,0,0,0\n"
+
+-#if defined(CONFIG_MK8)
+-#define ASM_NOP1 K8_NOP1
+-#define ASM_NOP2 K8_NOP2
+-#define ASM_NOP3 K8_NOP3
+-#define ASM_NOP4 K8_NOP4
+-#define ASM_NOP5 K8_NOP5
+-#define ASM_NOP6 K8_NOP6
+-#define ASM_NOP7 K8_NOP7
+-#define ASM_NOP8 K8_NOP8
+-#elif defined(CONFIG_MK7)
++#if defined(CONFIG_MK7)
+ #define ASM_NOP1 K7_NOP1
+ #define ASM_NOP2 K7_NOP2
+ #define ASM_NOP3 K7_NOP3
+@@ -100,6 +91,15 @@
+ #define ASM_NOP6 P6_NOP6
+ #define ASM_NOP7 P6_NOP7
+ #define ASM_NOP8 P6_NOP8
++#elif defined(CONFIG_X86_64)
++#define ASM_NOP1 K8_NOP1
++#define ASM_NOP2 K8_NOP2
++#define ASM_NOP3 K8_NOP3
++#define ASM_NOP4 K8_NOP4
++#define ASM_NOP5 K8_NOP5
++#define ASM_NOP6 K8_NOP6
++#define ASM_NOP7 K8_NOP7
++#define ASM_NOP8 K8_NOP8
+ #else
+ #define ASM_NOP1 GENERIC_NOP1
+ #define ASM_NOP2 GENERIC_NOP2
diff --git a/include/asm-xtensa/kvm.h b/include/asm-xtensa/kvm.h
new file mode 100644
index 0000000..bda4e33
@@ -21351,6 +22158,29 @@
*/
extern void dev_kfree_skb_any(struct sk_buff *skb);
+diff --git a/include/linux/virtio.h b/include/linux/virtio.h
+index 12c18ac..e7d1084 100644
+--- a/include/linux/virtio.h
++++ b/include/linux/virtio.h
+@@ -41,6 +41,8 @@ struct virtqueue
+ * Returns NULL or the "data" token handed to add_buf.
+ * @disable_cb: disable callbacks
+ * vq: the struct virtqueue we're talking about.
++ * Note that this is not necessarily synchronous, hence unreliable and only
++ * useful as an optimization.
+ * @enable_cb: restart callbacks after disable_cb.
+ * vq: the struct virtqueue we're talking about.
+ * This re-enables callbacks; it returns "false" if there are pending
+@@ -48,7 +50,8 @@ struct virtqueue
+ * checking for more work, and enabling callbacks.
+ *
+ * Locking rules are straightforward: the driver is responsible for
+- * locking. No two operations may be invoked simultaneously.
++ * locking. No two operations may be invoked simultaneously, with the exception
++ * of @disable_cb.
+ *
+ * All operations can be called in any context.
+ */
diff --git a/include/net/llc.h b/include/net/llc.h
index f502458..7940da1 100644
--- a/include/net/llc.h
@@ -21518,6 +22348,33 @@
call_rcu(&entry->rcu, free_old_closure);
remove_marker(entry->name); /* Ignore busy error message */
end:
+diff --git a/lib/random32.c b/lib/random32.c
+index ec7f81d..ca87d86 100644
+--- a/lib/random32.c
++++ b/lib/random32.c
+@@ -97,13 +97,18 @@ EXPORT_SYMBOL(random32);
+ * @seed: seed value
+ *
+ * Add some additional seeding to the random32() pool.
+- * Note: this pool is per cpu so it only affects current CPU.
+ */
+ void srandom32(u32 entropy)
+ {
+- struct rnd_state *state = &get_cpu_var(net_rand_state);
+- __set_random32(state, state->s1 ^ entropy);
+- put_cpu_var(state);
++ int i;
++ /*
++ * No locking on the CPUs, but then somewhat random results are, well,
++ * expected.
++ */
++ for_each_possible_cpu (i) {
++ struct rnd_state *state = &per_cpu(net_rand_state, i);
++ __set_random32(state, state->s1 ^ entropy);
++ }
+ }
+ EXPORT_SYMBOL(srandom32);
+
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 9b648bd..23b5fa4 100644
--- a/mm/memcontrol.c
@@ -21636,6 +22493,39 @@
+}
+
#endif /* !(__BEN_VLAN_802_1Q_INC__) */
+diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
+index 480ea90..41a76a0 100644
+--- a/net/8021q/vlan_dev.c
++++ b/net/8021q/vlan_dev.c
+@@ -692,6 +692,20 @@ static int vlan_dev_init(struct net_device *dev)
+ return 0;
+ }
+
++static void vlan_dev_uninit(struct net_device *dev)
++{
++ struct vlan_priority_tci_mapping *pm;
++ struct vlan_dev_info *vlan = vlan_dev_info(dev);
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) {
++ while ((pm = vlan->egress_priority_map[i]) != NULL) {
++ vlan->egress_priority_map[i] = pm->next;
++ kfree(pm);
++ }
++ }
++}
++
+ void vlan_setup(struct net_device *dev)
+ {
+ ether_setup(dev);
+@@ -701,6 +715,7 @@ void vlan_setup(struct net_device *dev)
+
+ dev->change_mtu = vlan_dev_change_mtu;
+ dev->init = vlan_dev_init;
++ dev->uninit = vlan_dev_uninit;
+ dev->open = vlan_dev_open;
+ dev->stop = vlan_dev_stop;
+ dev->set_mac_address = vlan_dev_set_mac_address;
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 146cfb0..9671aa5 100644
--- a/net/8021q/vlanproc.c
@@ -21813,6 +22703,61 @@
goto out;
if (elen <= 0)
+diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
+index a944e80..40508ba 100644
+--- a/net/ipv4/icmp.c
++++ b/net/ipv4/icmp.c
+@@ -591,7 +591,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
+ }
+
+ if (xfrm_decode_session_reverse(skb_in, &fl, AF_INET))
+- goto ende;
++ goto relookup_failed;
+
+ if (inet_addr_type(net, fl.fl4_src) == RTN_LOCAL)
+ err = __ip_route_output_key(net, &rt2, &fl);
+@@ -601,7 +601,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
+
+ fl2.fl4_dst = fl.fl4_src;
+ if (ip_route_output_key(net, &rt2, &fl2))
+- goto ende;
++ goto relookup_failed;
+
+ /* Ugh! */
+ odst = skb_in->dst;
+@@ -614,21 +614,23 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
+ }
+
+ if (err)
+- goto ende;
++ goto relookup_failed;
+
+ err = xfrm_lookup((struct dst_entry **)&rt2, &fl, NULL,
+ XFRM_LOOKUP_ICMP);
+- if (err == -ENOENT) {
++ switch (err) {
++ case 0:
++ dst_release(&rt->u.dst);
++ rt = rt2;
++ break;
++ case -EPERM:
++ goto ende;
++ default:
++relookup_failed:
+ if (!rt)
+ goto out_unlock;
+- goto route_done;
++ break;
+ }
+-
+- dst_release(&rt->u.dst);
+- rt = rt2;
+-
+- if (err)
+- goto out_unlock;
+ }
+
+ route_done:
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index 724d69a..a0a3c78 100644
--- a/net/ipv4/inet_fragment.c
@@ -21941,7 +22886,7 @@
else
sk = udp_get_next(seq, v);
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
-index 101e0e7..e7a1882 100644
+index 101e0e7..a65935a 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -776,6 +776,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i
@@ -21986,6 +22931,84 @@
spin_lock(&ift->lock);
flags = ift->flags;
if (ift->valid_lft > valid_lft &&
+@@ -2437,7 +2456,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
+
+ ASSERT_RTNL();
+
+- if (dev == init_net.loopback_dev && how == 1)
++ if ((dev->flags & IFF_LOOPBACK) && how == 1)
+ how = 0;
+
+ rt6_ifdown(dev);
+@@ -2450,7 +2469,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
+ /* Step 1: remove reference to ipv6 device from parent device.
+ Do not dev_put!
+ */
+- if (how == 1) {
++ if (how) {
+ idev->dead = 1;
+
+ /* protected by rtnl_lock */
+@@ -2482,12 +2501,12 @@ static int addrconf_ifdown(struct net_device *dev, int how)
+ write_lock_bh(&idev->lock);
+
+ /* Step 3: clear flags for stateless addrconf */
+- if (how != 1)
++ if (!how)
+ idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);
+
+ /* Step 4: clear address list */
+ #ifdef CONFIG_IPV6_PRIVACY
+- if (how == 1 && del_timer(&idev->regen_timer))
++ if (how && del_timer(&idev->regen_timer))
+ in6_dev_put(idev);
+
+ /* clear tempaddr list */
+@@ -2524,7 +2543,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
+
+ /* Step 5: Discard multicast list */
+
+- if (how == 1)
++ if (how)
+ ipv6_mc_destroy_dev(idev);
+ else
+ ipv6_mc_down(idev);
+@@ -2533,7 +2552,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
+
+ /* Shot the device (if unregistered) */
+
+- if (how == 1) {
++ if (how) {
+ addrconf_sysctl_unregister(idev);
+ neigh_parms_release(&nd_tbl, idev->nd_parms);
+ neigh_ifdown(&nd_tbl, dev);
+diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
+index 9c7f83f..e5f56c9 100644
+--- a/net/ipv6/anycast.c
++++ b/net/ipv6/anycast.c
+@@ -334,9 +334,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr)
+ idev->ac_list = aca;
+ write_unlock_bh(&idev->lock);
+
+- dst_hold(&rt->u.dst);
+- if (ip6_ins_rt(rt))
+- dst_release(&rt->u.dst);
++ ip6_ins_rt(rt);
+
+ addrconf_join_solict(dev, &aca->aca_addr);
+
+@@ -378,10 +376,7 @@ int __ipv6_dev_ac_dec(struct inet6_dev *idev, struct in6_addr *addr)
+ addrconf_leave_solict(idev, &aca->aca_addr);
+
+ dst_hold(&aca->aca_rt->u.dst);
+- if (ip6_del_rt(aca->aca_rt))
+- dst_free(&aca->aca_rt->u.dst);
+- else
+- dst_release(&aca->aca_rt->u.dst);
++ ip6_del_rt(aca->aca_rt);
+
+ aca_put(aca);
+ return 0;
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 0ec1402..c6bb4c6 100644
--- a/net/ipv6/esp6.c
@@ -22000,22 +23023,46 @@
goto out;
}
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
-index 121d517..f204a72 100644
+index 121d517..893287e 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
-@@ -436,10 +436,10 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
+@@ -436,24 +436,26 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
}
if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6))
- goto out;
-+ goto out_dst_release;
++ goto relookup_failed;
if (ip6_dst_lookup(sk, &dst2, &fl))
- goto out;
-+ goto out_dst_release;
++ goto relookup_failed;
err = xfrm_lookup(&dst2, &fl, sk, XFRM_LOOKUP_ICMP);
- if (err == -ENOENT) {
+- if (err == -ENOENT) {
++ switch (err) {
++ case 0:
++ dst_release(dst);
++ dst = dst2;
++ break;
++ case -EPERM:
++ goto out_dst_release;
++ default:
++relookup_failed:
+ if (!dst)
+ goto out;
+- goto route_done;
++ break;
+ }
+
+- dst_release(dst);
+- dst = dst2;
+-
+- if (err)
+- goto out;
+-
+ route_done:
+ if (ipv6_addr_is_multicast(&fl.fl6_dst))
+ hlimit = np->mcast_hops;
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 178aebc..98ab4f4 100644
--- a/net/ipv6/ip6_input.c
@@ -22801,7 +23848,7 @@
clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
}
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
-index 41a049f..820d07a 100644
+index 41a049f..89bb6d3 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -180,7 +180,7 @@ static int inode_alloc_security(struct inode *inode)
@@ -22813,7 +23860,35 @@
if (!isec)
return -ENOMEM;
-@@ -1630,6 +1630,12 @@ static inline u32 file_to_av(struct file *file)
+@@ -1143,7 +1143,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
+ }
+
+ len = INITCONTEXTLEN;
+- context = kmalloc(len, GFP_KERNEL);
++ context = kmalloc(len, GFP_NOFS);
+ if (!context) {
+ rc = -ENOMEM;
+ dput(dentry);
+@@ -1161,7 +1161,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
+ }
+ kfree(context);
+ len = rc;
+- context = kmalloc(len, GFP_KERNEL);
++ context = kmalloc(len, GFP_NOFS);
+ if (!context) {
+ rc = -ENOMEM;
+ dput(dentry);
+@@ -1185,7 +1185,8 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
+ rc = 0;
+ } else {
+ rc = security_context_to_sid_default(context, rc, &sid,
+- sbsec->def_sid);
++ sbsec->def_sid,
++ GFP_NOFS);
+ if (rc) {
+ printk(KERN_WARNING "%s: context_to_sid(%s) "
+ "returned %d for dev=%s ino=%ld\n",
+@@ -1630,6 +1631,12 @@ static inline u32 file_to_av(struct file *file)
else
av |= FILE__WRITE;
}
@@ -22826,7 +23901,7 @@
return av;
}
-@@ -2423,7 +2429,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
+@@ -2423,7 +2430,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
return -EOPNOTSUPP;
if (name) {
@@ -22835,3 +23910,63 @@
if (!namep)
return -ENOMEM;
*name = namep;
+diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h
+index f7d2f03..44e12ec 100644
+--- a/security/selinux/include/security.h
++++ b/security/selinux/include/security.h
+@@ -86,7 +86,8 @@ int security_sid_to_context(u32 sid, char **scontext,
+ int security_context_to_sid(char *scontext, u32 scontext_len,
+ u32 *out_sid);
+
+-int security_context_to_sid_default(char *scontext, u32 scontext_len, u32 *out_sid, u32 def_sid);
++int security_context_to_sid_default(char *scontext, u32 scontext_len,
++ u32 *out_sid, u32 def_sid, gfp_t gfp_flags);
+
+ int security_get_user_sids(u32 callsid, char *username,
+ u32 **sids, u32 *nel);
+diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
+index f374186..3f2bad2 100644
+--- a/security/selinux/ss/services.c
++++ b/security/selinux/ss/services.c
+@@ -680,7 +680,8 @@ out:
+
+ }
+
+-static int security_context_to_sid_core(char *scontext, u32 scontext_len, u32 *sid, u32 def_sid)
++static int security_context_to_sid_core(char *scontext, u32 scontext_len,
++ u32 *sid, u32 def_sid, gfp_t gfp_flags)
+ {
+ char *scontext2;
+ struct context context;
+@@ -709,7 +710,7 @@ static int security_context_to_sid_core(char *scontext, u32 scontext_len, u32 *s
+ null suffix to the copy to avoid problems with the existing
+ attr package, which doesn't view the null terminator as part
+ of the attribute value. */
+- scontext2 = kmalloc(scontext_len+1,GFP_KERNEL);
++ scontext2 = kmalloc(scontext_len+1, gfp_flags);
+ if (!scontext2) {
+ rc = -ENOMEM;
+ goto out;
+@@ -809,7 +810,7 @@ out:
+ int security_context_to_sid(char *scontext, u32 scontext_len, u32 *sid)
+ {
+ return security_context_to_sid_core(scontext, scontext_len,
+- sid, SECSID_NULL);
++ sid, SECSID_NULL, GFP_KERNEL);
+ }
+
+ /**
+@@ -829,10 +830,11 @@ int security_context_to_sid(char *scontext, u32 scontext_len, u32 *sid)
+ * Returns -%EINVAL if the context is invalid, -%ENOMEM if insufficient
+ * memory is available, or 0 on success.
+ */
+-int security_context_to_sid_default(char *scontext, u32 scontext_len, u32 *sid, u32 def_sid)
++int security_context_to_sid_default(char *scontext, u32 scontext_len, u32 *sid,
++ u32 def_sid, gfp_t gfp_flags)
+ {
+ return security_context_to_sid_core(scontext, scontext_len,
+- sid, def_sid);
++ sid, def_sid, gfp_flags);
+ }
+
+ static int compute_sid_handle_invalid_context(
Modified: dists/trunk/linux-2.6/debian/patches/series/1~experimental.1
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/1~experimental.1 (original)
+++ dists/trunk/linux-2.6/debian/patches/series/1~experimental.1 Tue Apr 8 19:58:21 2008
@@ -1,4 +1,4 @@
-+ bugfix/all/patch-2.6.25-rc8-git5
++ bugfix/all/patch-2.6.25-rc8-git7
+ debian/version.patch
+ debian/kernelvariables.patch
+ debian/doc-build-parallel.patch
More information about the Kernel-svn-changes
mailing list