From c3ef10bb5bcc00fda22d3cbd95ecc7875ef154c9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 6 Apr 2010 12:15:24 -0700 Subject: [PATCH] .33 patches --- queue-2.6.33/series | 3 +- ...-fix-regset-register-window-handling.patch | 87 +++++++++++++++++++ ...-ignore-secondary-output-pci-devices.patch | 67 ++++++++++++++ 3 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 queue-2.6.33/sparc-fix-regset-register-window-handling.patch create mode 100644 queue-2.6.33/sunxvr500-ignore-secondary-output-pci-devices.patch diff --git a/queue-2.6.33/series b/queue-2.6.33/series index 48e792390cc..aeda0689851 100644 --- a/queue-2.6.33/series +++ b/queue-2.6.33/series @@ -21,4 +21,5 @@ setup-correct-int-pipe-type-in-ar9170_usb_exec_cmd.patch mac80211-fix-preq-processing-and-one-small-bug.patch mac80211-move-netdev-queue-enabling-to-correct-spot.patch mac80211-tear-down-all-agg-queues-when-restart-reconfig-hw.patch -wireless-convert-reg_regdb_search_lock-to-mutex.patch +sparc-fix-regset-register-window-handling.patch +sunxvr500-ignore-secondary-output-pci-devices.patch diff --git a/queue-2.6.33/sparc-fix-regset-register-window-handling.patch b/queue-2.6.33/sparc-fix-regset-register-window-handling.patch new file mode 100644 index 00000000000..4194f92ffeb --- /dev/null +++ b/queue-2.6.33/sparc-fix-regset-register-window-handling.patch @@ -0,0 +1,87 @@ +From f64a33efaef98249ae21299fb18fe8e043896001 Mon Sep 17 00:00:00 2001 +From: David S. Miller +Date: Wed, 31 Mar 2010 18:05:05 -0700 +Subject: sparc: Fix regset register window handling. + +From: David S. Miller + +[ Upstream commit b857bd292223f54aaae3693c82fa7299a99991cd ] + +We have to adjust 'reg_window' down by 16 becuase the 'pos' iterator +we'll use to index into the stack slots will be between 16 and 32. + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + arch/sparc/kernel/ptrace_32.c | 4 ++++ + arch/sparc/kernel/ptrace_64.c | 4 ++++ + 2 files changed, 8 insertions(+) + +--- a/arch/sparc/kernel/ptrace_32.c ++++ b/arch/sparc/kernel/ptrace_32.c +@@ -65,6 +65,7 @@ static int genregs32_get(struct task_str + *k++ = regs->u_regs[pos++]; + + reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; ++ reg_window -= 16; + for (; count > 0 && pos < 32; count--) { + if (get_user(*k++, ®_window[pos++])) + return -EFAULT; +@@ -76,6 +77,7 @@ static int genregs32_get(struct task_str + } + + reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; ++ reg_window -= 16; + for (; count > 0 && pos < 32; count--) { + if (get_user(reg, ®_window[pos++]) || + put_user(reg, u++)) +@@ -141,6 +143,7 @@ static int genregs32_set(struct task_str + regs->u_regs[pos++] = *k++; + + reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; ++ reg_window -= 16; + for (; count > 0 && pos < 32; count--) { + if (put_user(*k++, ®_window[pos++])) + return -EFAULT; +@@ -153,6 +156,7 @@ static int genregs32_set(struct task_str + } + + reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; ++ reg_window -= 16; + for (; count > 0 && pos < 32; count--) { + if (get_user(reg, u++) || + put_user(reg, ®_window[pos++])) +--- a/arch/sparc/kernel/ptrace_64.c ++++ b/arch/sparc/kernel/ptrace_64.c +@@ -492,6 +492,7 @@ static int genregs32_get(struct task_str + *k++ = regs->u_regs[pos++]; + + reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; ++ reg_window -= 16; + if (target == current) { + for (; count > 0 && pos < 32; count--) { + if (get_user(*k++, ®_window[pos++])) +@@ -516,6 +517,7 @@ static int genregs32_get(struct task_str + } + + reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; ++ reg_window -= 16; + if (target == current) { + for (; count > 0 && pos < 32; count--) { + if (get_user(reg, ®_window[pos++]) || +@@ -599,6 +601,7 @@ static int genregs32_set(struct task_str + regs->u_regs[pos++] = *k++; + + reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; ++ reg_window -= 16; + if (target == current) { + for (; count > 0 && pos < 32; count--) { + if (put_user(*k++, ®_window[pos++])) +@@ -625,6 +628,7 @@ static int genregs32_set(struct task_str + } + + reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; ++ reg_window -= 16; + if (target == current) { + for (; count > 0 && pos < 32; count--) { + if (get_user(reg, u++) || diff --git a/queue-2.6.33/sunxvr500-ignore-secondary-output-pci-devices.patch b/queue-2.6.33/sunxvr500-ignore-secondary-output-pci-devices.patch new file mode 100644 index 00000000000..345f9cbfff8 --- /dev/null +++ b/queue-2.6.33/sunxvr500-ignore-secondary-output-pci-devices.patch @@ -0,0 +1,67 @@ +From 379bdc1a51cafba489e3f138c3bb6b4c07cb5295 Mon Sep 17 00:00:00 2001 +From: David S. Miller +Date: Sun, 4 Apr 2010 01:12:50 -0700 +Subject: sunxvr500: Ignore secondary output PCI devices. + +From: David S. Miller + +[ Upstream commit bdd32ce95f79fb5cc964cd789d7ae4500bba7c6f ] + +These just represent the secondary and further heads attached to the +card, and they have different sets of PCI bar registers to map. + +So don't try to drive them in the main driver. + +Reported-by: Frans van Berckel +Tested-by: Frans van Berckel +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/video/sunxvr500.c | 24 +++++++++++++++++------- + 1 file changed, 17 insertions(+), 7 deletions(-) + +--- a/drivers/video/sunxvr500.c ++++ b/drivers/video/sunxvr500.c +@@ -242,11 +242,27 @@ static int __devinit e3d_set_fbinfo(stru + static int __devinit e3d_pci_register(struct pci_dev *pdev, + const struct pci_device_id *ent) + { ++ struct device_node *of_node; ++ const char *device_type; + struct fb_info *info; + struct e3d_info *ep; + unsigned int line_length; + int err; + ++ of_node = pci_device_to_OF_node(pdev); ++ if (!of_node) { ++ printk(KERN_ERR "e3d: Cannot find OF node of %s\n", ++ pci_name(pdev)); ++ return -ENODEV; ++ } ++ ++ device_type = of_get_property(of_node, "device_type", NULL); ++ if (!device_type) { ++ printk(KERN_INFO "e3d: Ignoring secondary output device " ++ "at %s\n", pci_name(pdev)); ++ return -ENODEV; ++ } ++ + err = pci_enable_device(pdev); + if (err < 0) { + printk(KERN_ERR "e3d: Cannot enable PCI device %s\n", +@@ -265,13 +281,7 @@ static int __devinit e3d_pci_register(st + ep->info = info; + ep->pdev = pdev; + spin_lock_init(&ep->lock); +- ep->of_node = pci_device_to_OF_node(pdev); +- if (!ep->of_node) { +- printk(KERN_ERR "e3d: Cannot find OF node of %s\n", +- pci_name(pdev)); +- err = -ENODEV; +- goto err_release_fb; +- } ++ ep->of_node = of_node; + + /* Read the PCI base register of the frame buffer, which we + * need in order to interpret the RAMDAC_VID_*FB* values in -- 2.47.3