From: Greg Kroah-Hartman Date: Thu, 15 Jan 2009 00:05:39 +0000 (-0800) Subject: some .27 patches X-Git-Tag: v2.6.27.12~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c35bc647a776eadc270a0c5c10599fc6bb3058ea;p=thirdparty%2Fkernel%2Fstable-queue.git some .27 patches --- diff --git a/queue-2.6.27/alsa-caiaq-fix-oops-with-midi.patch b/queue-2.6.27/alsa-caiaq-fix-oops-with-midi.patch new file mode 100644 index 00000000000..47a278a308b --- /dev/null +++ b/queue-2.6.27/alsa-caiaq-fix-oops-with-midi.patch @@ -0,0 +1,108 @@ +From f3f80a9205da74fa56d613f4c14b88b6e4e6caa8 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 8 Jan 2009 15:32:56 +0100 +Subject: ALSA: caiaq - Fix Oops with MIDI + +From: Takashi Iwai + +commit f3f80a9205da74fa56d613f4c14b88b6e4e6caa8 upstream. + +The snd-usb-caiaq driver causes Oops occasionally when accessing MIDI +devices. This patch fixes the Oops and invalid URB submission errors +as well. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/caiaq/caiaq-device.h | 1 + + sound/usb/caiaq/caiaq-midi.c | 32 ++++++++++++++++++-------------- + 2 files changed, 19 insertions(+), 14 deletions(-) + +--- a/sound/usb/caiaq/caiaq-device.h ++++ b/sound/usb/caiaq/caiaq-device.h +@@ -75,6 +75,7 @@ struct snd_usb_caiaqdev { + wait_queue_head_t ep1_wait_queue; + wait_queue_head_t prepare_wait_queue; + int spec_received, audio_parm_answer; ++ int midi_out_active; + + char vendor_name[CAIAQ_USB_STR_LEN]; + char product_name[CAIAQ_USB_STR_LEN]; +--- a/sound/usb/caiaq/caiaq-midi.c ++++ b/sound/usb/caiaq/caiaq-midi.c +@@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_ope + + static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream *substream) + { ++ struct snd_usb_caiaqdev *dev = substream->rmidi->private_data; ++ if (dev->midi_out_active) { ++ usb_kill_urb(&dev->midi_out_urb); ++ dev->midi_out_active = 0; ++ } + return 0; + } + +@@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(stru + + dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE; + dev->midi_out_buf[1] = 0; /* port */ +- len = snd_rawmidi_transmit_peek(substream, dev->midi_out_buf+3, EP1_BUFSIZE-3); ++ len = snd_rawmidi_transmit(substream, dev->midi_out_buf + 3, ++ EP1_BUFSIZE - 3); + + if (len <= 0) + return; +@@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(stru + + ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC); + if (ret < 0) +- log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed, %d\n", +- substream, ret); ++ log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed," ++ "ret=%d, len=%d\n", ++ substream, ret, len); ++ else ++ dev->midi_out_active = 1; + } + + static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) + { + struct snd_usb_caiaqdev *dev = substream->rmidi->private_data; + +- if (dev->midi_out_substream != NULL) +- return; +- +- if (!up) { ++ if (up) { ++ dev->midi_out_substream = substream; ++ if (!dev->midi_out_active) ++ snd_usb_caiaq_midi_send(dev, substream); ++ } else { + dev->midi_out_substream = NULL; +- return; + } +- +- dev->midi_out_substream = substream; +- snd_usb_caiaq_midi_send(dev, substream); + } + + +@@ -161,16 +167,14 @@ int snd_usb_caiaq_midi_init(struct snd_u + void snd_usb_caiaq_midi_output_done(struct urb* urb) + { + struct snd_usb_caiaqdev *dev = urb->context; +- char *buf = urb->transfer_buffer; + ++ dev->midi_out_active = 0; + if (urb->status != 0) + return; + + if (!dev->midi_out_substream) + return; + +- snd_rawmidi_transmit_ack(dev->midi_out_substream, buf[2]); +- dev->midi_out_substream = NULL; + snd_usb_caiaq_midi_send(dev, dev->midi_out_substream); + } + diff --git a/queue-2.6.27/alsa-hda-add-quirk-for-hp6730b-laptop.patch b/queue-2.6.27/alsa-hda-add-quirk-for-hp6730b-laptop.patch new file mode 100644 index 00000000000..c6d51a90049 --- /dev/null +++ b/queue-2.6.27/alsa-hda-add-quirk-for-hp6730b-laptop.patch @@ -0,0 +1,30 @@ +From 11d518e07d700eeb5bcec36bfd5f501e405230dd Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 10 Dec 2008 10:37:33 +0100 +Subject: ALSA: hda - Add quirk for HP6730B laptop + +From: Takashi Iwai + +commit 11d518e07d700eeb5bcec36bfd5f501e405230dd upstream. + +Added model=laptop for HP 6730B laptop with AD1984A codec. +Reference: Novell bnc#457909 + https://bugzilla.novell.com/show_bug.cgi?id=457909 + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_analog.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_analog.c ++++ b/sound/pci/hda/patch_analog.c +@@ -3848,6 +3848,7 @@ static const char *ad1884a_models[AD1884 + static struct snd_pci_quirk ad1884a_cfg_tbl[] = { + SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), + SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), ++ SND_PCI_QUIRK(0x103c, 0x30e6, "HP 6730b", AD1884A_LAPTOP), + SND_PCI_QUIRK(0x103c, 0x30e7, "HP EliteBook 8530p", AD1884A_LAPTOP), + SND_PCI_QUIRK(0x103c, 0x3614, "HP 6730s", AD1884A_LAPTOP), + SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), diff --git a/queue-2.6.27/cgroups-fix-a-race-between-cgroup_clone-and-umount.patch b/queue-2.6.27/cgroups-fix-a-race-between-cgroup_clone-and-umount.patch new file mode 100644 index 00000000000..84911f8f9b2 --- /dev/null +++ b/queue-2.6.27/cgroups-fix-a-race-between-cgroup_clone-and-umount.patch @@ -0,0 +1,59 @@ +From 7b574b7b0124ed344911f5d581e9bc2d83bbeb19 Mon Sep 17 00:00:00 2001 +From: Li Zefan +Date: Sun, 4 Jan 2009 12:00:45 -0800 +Subject: cgroups: fix a race between cgroup_clone and umount + +From: Li Zefan + +commit 7b574b7b0124ed344911f5d581e9bc2d83bbeb19 upstream. + +The race is calling cgroup_clone() while umounting the ns cgroup subsys, +and thus cgroup_clone() might access invalid cgroup_fs, or kill_sb() is +called after cgroup_clone() created a new dir in it. + +The BUG I triggered is BUG_ON(root->number_of_cgroups != 1); + + ------------[ cut here ]------------ + kernel BUG at kernel/cgroup.c:1093! + invalid opcode: 0000 [#1] SMP + ... + Process umount (pid: 5177, ti=e411e000 task=e40c4670 task.ti=e411e000) + ... + Call Trace: + [] ? deactivate_super+0x3f/0x51 + [] ? mntput_no_expire+0xb3/0xdd + [] ? sys_umount+0x265/0x2ac + [] ? sys_oldumount+0xd/0xf + [] ? sysenter_do_call+0x12/0x31 + ... + EIP: [] cgroup_kill_sb+0x23/0xe0 SS:ESP 0068:e411ef2c + ---[ end trace c766c1be3bf944ac ]--- + +Cc: Serge E. Hallyn +Signed-off-by: Li Zefan +Cc: Paul Menage +Cc: "Serge E. Hallyn" +Cc: Balbir Singh +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/cgroup.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/kernel/cgroup.c ++++ b/kernel/cgroup.c +@@ -2885,7 +2885,11 @@ int cgroup_clone(struct task_struct *tsk + parent = task_cgroup(tsk, subsys->subsys_id); + + /* Pin the hierarchy */ +- atomic_inc(&parent->root->sb->s_active); ++ if (!atomic_inc_not_zero(&parent->root->sb->s_active)) { ++ /* We race with the final deactivate_super() */ ++ mutex_unlock(&cgroup_mutex); ++ return 0; ++ } + + /* Keep the cgroup alive */ + get_css_set(cg); diff --git a/queue-2.6.27/devices-cgroup-allow-mkfifo.patch b/queue-2.6.27/devices-cgroup-allow-mkfifo.patch new file mode 100644 index 00000000000..b031fb55b62 --- /dev/null +++ b/queue-2.6.27/devices-cgroup-allow-mkfifo.patch @@ -0,0 +1,46 @@ +From 0b82ac37b889ec881b645860da3775118effb3ca Mon Sep 17 00:00:00 2001 +From: Serge E. Hallyn +Date: Wed, 7 Jan 2009 18:07:46 -0800 +Subject: devices cgroup: allow mkfifo + +From: Serge E. Hallyn + +commit 0b82ac37b889ec881b645860da3775118effb3ca upstream. + +The devcgroup_inode_permission() hook in the devices whitelist cgroup has +always bypassed access checks on fifos. But the mknod hook did not. The +devices whitelist is only about block and char devices, and fifos can't +even be added to the whitelist, so fifos can't be created at all except by +tasks which have 'a' in their whitelist (meaning they have access to all +devices). + +Fix the behavior by bypassing access checks to mkfifo. + +Signed-off-by: Serge E. Hallyn +Cc: Li Zefan +Cc: Pavel Emelyanov +Cc: Paul Menage +Cc: Lai Jiangshan +Cc: KOSAKI Motohiro +Cc: James Morris +Reported-by: Daniel Lezcano +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + security/device_cgroup.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/security/device_cgroup.c ++++ b/security/device_cgroup.c +@@ -543,6 +543,9 @@ int devcgroup_inode_mknod(int mode, dev_ + struct dev_cgroup *dev_cgroup; + struct dev_whitelist_item *wh; + ++ if (!S_ISBLK(mode) && !S_ISCHR(mode)) ++ return 0; ++ + rcu_read_lock(); + + dev_cgroup = task_devcgroup(current); diff --git a/queue-2.6.27/dm-log-fix-dm_io_client-leak-on-error-paths.patch b/queue-2.6.27/dm-log-fix-dm_io_client-leak-on-error-paths.patch new file mode 100644 index 00000000000..59e93a42317 --- /dev/null +++ b/queue-2.6.27/dm-log-fix-dm_io_client-leak-on-error-paths.patch @@ -0,0 +1,50 @@ +From c7a2bd19b7c1e0bd2c7604c53d2583e91e536948 Mon Sep 17 00:00:00 2001 +From: Takahiro Yasui +Date: Tue, 6 Jan 2009 03:04:56 +0000 +Subject: dm log: fix dm_io_client leak on error paths + +From: Takahiro Yasui + +commit c7a2bd19b7c1e0bd2c7604c53d2583e91e536948 upstream. + +In create_log_context function, dm_io_client_destroy function needs +to be called, when memory allocation of disk_header, sync_bits and +recovering_bits failed, but dm_io_client_destroy is not called. + +Signed-off-by: Takahiro Yasui +Acked-by: Jonathan Brassow +Signed-off-by: Alasdair G Kergon +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/dm-log.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/md/dm-log.c ++++ b/drivers/md/dm-log.c +@@ -467,6 +467,7 @@ static int create_log_context(struct dm_ + lc->disk_header = vmalloc(buf_size); + if (!lc->disk_header) { + DMWARN("couldn't allocate disk log buffer"); ++ dm_io_client_destroy(lc->io_req.client); + kfree(lc); + return -ENOMEM; + } +@@ -482,6 +483,8 @@ static int create_log_context(struct dm_ + DMWARN("couldn't allocate sync bitset"); + if (!dev) + vfree(lc->clean_bits); ++ else ++ dm_io_client_destroy(lc->io_req.client); + vfree(lc->disk_header); + kfree(lc); + return -ENOMEM; +@@ -495,6 +498,8 @@ static int create_log_context(struct dm_ + vfree(lc->sync_bits); + if (!dev) + vfree(lc->clean_bits); ++ else ++ dm_io_client_destroy(lc->io_req.client); + vfree(lc->disk_header); + kfree(lc); + return -ENOMEM; diff --git a/queue-2.6.27/dm-raid1-fix-error-count.patch b/queue-2.6.27/dm-raid1-fix-error-count.patch new file mode 100644 index 00000000000..f0e2bdfa0a7 --- /dev/null +++ b/queue-2.6.27/dm-raid1-fix-error-count.patch @@ -0,0 +1,50 @@ +From d460c65a6a9ec9e0d284864ec3a9a2d1b73f0e43 Mon Sep 17 00:00:00 2001 +From: Jonathan Brassow +Date: Tue, 6 Jan 2009 03:04:57 +0000 +Subject: dm raid1: fix error count + +From: Jonathan Brassow + +commit d460c65a6a9ec9e0d284864ec3a9a2d1b73f0e43 upstream. + +Always increase the error count when I/O on a leg of a mirror fails. + +The error count is used to decide whether to select an alternative +mirror leg. If the target doesn't use the "handle_errors" feature, the +error count is not updated and the bio can get requeued forever by the +read callback. + +Fix it by increasing error_count before the handle_errors feature +checking. + +Signed-off-by: Milan Broz +Signed-off-by: Jonathan Brassow +Signed-off-by: Alasdair G Kergon +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/dm-raid1.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/md/dm-raid1.c ++++ b/drivers/md/dm-raid1.c +@@ -727,9 +727,6 @@ static void fail_mirror(struct mirror *m + struct mirror_set *ms = m->ms; + struct mirror *new; + +- if (!errors_handled(ms)) +- return; +- + /* + * error_count is used for nothing more than a + * simple way to tell if a device has encountered +@@ -740,6 +737,9 @@ static void fail_mirror(struct mirror *m + if (test_and_set_bit(error_type, &m->error_type)) + return; + ++ if (!errors_handled(ms)) ++ return; ++ + if (m != get_default_mirror(ms)) + goto out; + diff --git a/queue-2.6.27/ioat-fix-self-test-for-multi-channel-case.patch b/queue-2.6.27/ioat-fix-self-test-for-multi-channel-case.patch new file mode 100644 index 00000000000..68923cddc53 --- /dev/null +++ b/queue-2.6.27/ioat-fix-self-test-for-multi-channel-case.patch @@ -0,0 +1,67 @@ +From b9bdcbba010c2e49c8f837ea7a49fe006b636f41 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 6 Jan 2009 11:38:22 -0700 +Subject: ioat: fix self test for multi-channel case + +From: Dan Williams + +commit b9bdcbba010c2e49c8f837ea7a49fe006b636f41 upstream. + +In the multiple device case we need to re-arm the completion and protect +against concurrent self-tests. The printk from the test callback is +removed as it can arbitrarily delay completion of the test. + +Cc: Maciej Sosnowski +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/dma/ioat_dma.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +--- a/drivers/dma/ioat_dma.c ++++ b/drivers/dma/ioat_dma.c +@@ -1337,12 +1337,11 @@ static void ioat_dma_start_null_desc(str + */ + #define IOAT_TEST_SIZE 2000 + +-DECLARE_COMPLETION(test_completion); + static void ioat_dma_test_callback(void *dma_async_param) + { +- printk(KERN_ERR "ioatdma: ioat_dma_test_callback(%p)\n", +- dma_async_param); +- complete(&test_completion); ++ struct completion *cmp = dma_async_param; ++ ++ complete(cmp); + } + + /** +@@ -1359,6 +1358,7 @@ static int ioat_dma_self_test(struct ioa + dma_addr_t dma_dest, dma_src; + dma_cookie_t cookie; + int err = 0; ++ struct completion cmp; + + src = kzalloc(sizeof(u8) * IOAT_TEST_SIZE, GFP_KERNEL); + if (!src) +@@ -1398,8 +1398,9 @@ static int ioat_dma_self_test(struct ioa + } + + async_tx_ack(tx); ++ init_completion(&cmp); + tx->callback = ioat_dma_test_callback; +- tx->callback_param = (void *)0x8086; ++ tx->callback_param = &cmp; + cookie = tx->tx_submit(tx); + if (cookie < 0) { + dev_err(&device->pdev->dev, +@@ -1409,7 +1410,7 @@ static int ioat_dma_self_test(struct ioa + } + device->common.device_issue_pending(dma_chan); + +- wait_for_completion_timeout(&test_completion, msecs_to_jiffies(3000)); ++ wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000)); + + if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL) + != DMA_SUCCESS) { diff --git a/queue-2.6.27/iwlwifi-use-gfp_kernel-to-allocate-rx-skb-memory.patch b/queue-2.6.27/iwlwifi-use-gfp_kernel-to-allocate-rx-skb-memory.patch new file mode 100644 index 00000000000..1cfe1a6d8fe --- /dev/null +++ b/queue-2.6.27/iwlwifi-use-gfp_kernel-to-allocate-rx-skb-memory.patch @@ -0,0 +1,142 @@ +From f1bc4ac61f2c08515afd80c6dc3962aa6d0b138b Mon Sep 17 00:00:00 2001 +From: Zhu Yi +Date: Wed, 17 Dec 2008 16:52:33 +0800 +Subject: iwlwifi: use GFP_KERNEL to allocate Rx SKB memory + +From: Zhu Yi + +commit f1bc4ac61f2c08515afd80c6dc3962aa6d0b138b upstream. + +Previously we allocate Rx SKB with GFP_ATOMIC flag. This is because we need +to hold a spinlock to protect the two rx_used and rx_free lists operation +in the rxq. + + spin_lock(); + ... + element = rxq->rx_used.next; + element->skb = alloc_skb(..., GFP_ATOMIC); + list_del(element); + list_add_tail(&element->list, &rxq->rx_free); + ... + spin_unlock(); + +After spliting the rx_used delete and rx_free insert into two operations, +we don't require the skb allocation in an atomic context any more (the +function itself is scheduled in a workqueue). + + spin_lock(); + ... + element = rxq->rx_used.next; + list_del(element); + ... + spin_unlock(); + ... + element->skb = alloc_skb(..., GFP_KERNEL); + ... + spin_lock() + ... + list_add_tail(&element->list, &rxq->rx_free); + ... + spin_unlock(); + +This patch should fix the "iwlagn: Can not allocate SKB buffers" warning +we see recently. + +Signed-off-by: Zhu Yi +Acked-by: Tomas Winkler +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/iwl-agn.c | 12 +----------- + drivers/net/wireless/iwlwifi/iwl-rx.c | 29 +++++++++++++++++++---------- + 2 files changed, 20 insertions(+), 21 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/iwl-agn.c ++++ b/drivers/net/wireless/iwlwifi/iwl-agn.c +@@ -1334,16 +1334,6 @@ static void iwl_setup_rx_handlers(struct + priv->cfg->ops->lib->rx_handler_setup(priv); + } + +-/* +- * this should be called while priv->lock is locked +-*/ +-static void __iwl_rx_replenish(struct iwl_priv *priv) +-{ +- iwl_rx_allocate(priv); +- iwl_rx_queue_restock(priv); +-} +- +- + /** + * iwl_rx_handle - Main entry function for receiving responses from uCode + * +@@ -1449,7 +1439,7 @@ void iwl_rx_handle(struct iwl_priv *priv + count++; + if (count >= 8) { + priv->rxq.read = i; +- __iwl_rx_replenish(priv); ++ iwl_rx_queue_restock(priv); + count = 0; + } + } +--- a/drivers/net/wireless/iwlwifi/iwl-rx.c ++++ b/drivers/net/wireless/iwlwifi/iwl-rx.c +@@ -245,25 +245,31 @@ void iwl_rx_allocate(struct iwl_priv *pr + struct list_head *element; + struct iwl_rx_mem_buffer *rxb; + unsigned long flags; +- spin_lock_irqsave(&rxq->lock, flags); +- while (!list_empty(&rxq->rx_used)) { ++ ++ while (1) { ++ spin_lock_irqsave(&rxq->lock, flags); ++ ++ if (list_empty(&rxq->rx_used)) { ++ spin_unlock_irqrestore(&rxq->lock, flags); ++ return; ++ } + element = rxq->rx_used.next; + rxb = list_entry(element, struct iwl_rx_mem_buffer, list); ++ list_del(element); ++ ++ spin_unlock_irqrestore(&rxq->lock, flags); + + /* Alloc a new receive buffer */ + rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256, +- __GFP_NOWARN | GFP_ATOMIC); ++ GFP_KERNEL); + if (!rxb->skb) { +- if (net_ratelimit()) +- printk(KERN_CRIT DRV_NAME +- ": Can not allocate SKB buffers\n"); ++ printk(KERN_CRIT DRV_NAME ++ "Can not allocate SKB buffers\n"); + /* We don't reschedule replenish work here -- we will + * call the restock method and if it still needs + * more buffers it will schedule replenish */ + break; + } +- priv->alloc_rxb_skb++; +- list_del(element); + + /* Get physical address of RB/SKB */ + rxb->real_dma_addr = pci_map_single( +@@ -277,12 +283,15 @@ void iwl_rx_allocate(struct iwl_priv *pr + rxb->aligned_dma_addr = ALIGN(rxb->real_dma_addr, 256); + skb_reserve(rxb->skb, rxb->aligned_dma_addr - rxb->real_dma_addr); + ++ spin_lock_irqsave(&rxq->lock, flags); ++ + list_add_tail(&rxb->list, &rxq->rx_free); + rxq->free_count++; ++ priv->alloc_rxb_skb++; ++ ++ spin_unlock_irqrestore(&rxq->lock, flags); + } +- spin_unlock_irqrestore(&rxq->lock, flags); + } +-EXPORT_SYMBOL(iwl_rx_allocate); + + void iwl_rx_replenish(struct iwl_priv *priv) + { diff --git a/queue-2.6.27/md-fix-bitmap-on-external-file-bug.patch b/queue-2.6.27/md-fix-bitmap-on-external-file-bug.patch new file mode 100644 index 00000000000..97ded32b654 --- /dev/null +++ b/queue-2.6.27/md-fix-bitmap-on-external-file-bug.patch @@ -0,0 +1,39 @@ +From 538452700d95480c16e7aa6b10ff77cd937d33f4 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Fri, 9 Jan 2009 08:31:05 +1100 +Subject: md: fix bitmap-on-external-file bug. + +From: NeilBrown + +commit 538452700d95480c16e7aa6b10ff77cd937d33f4 upstream. + +commit a2ed9615e3222645007fc19991aedf30eed3ecfd +fixed a bug with 'internal' bitmaps, but in the process broke +'in a file' bitmaps. So they are broken in 2.6.28 + +This fixes it, and needs to go in 2.6.28-stable. + +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/bitmap.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/md/bitmap.c ++++ b/drivers/md/bitmap.c +@@ -964,9 +964,11 @@ static int bitmap_init_from_disk(struct + */ + page = bitmap->sb_page; + offset = sizeof(bitmap_super_t); +- read_sb_page(bitmap->mddev, bitmap->offset, +- page, +- index, count); ++ if (!file) ++ read_sb_page(bitmap->mddev, ++ bitmap->offset, ++ page, ++ index, count); + } else if (file) { + page = read_page(file, index, bitmap, count); + offset = 0; diff --git a/queue-2.6.27/minix-fix-add-link-s-wrong-position-calculation.patch b/queue-2.6.27/minix-fix-add-link-s-wrong-position-calculation.patch new file mode 100644 index 00000000000..bebefe955fc --- /dev/null +++ b/queue-2.6.27/minix-fix-add-link-s-wrong-position-calculation.patch @@ -0,0 +1,34 @@ +From d6b54841f4ddd836c886d1e6ac381cf309ee98a3 Mon Sep 17 00:00:00 2001 +From: Evgeniy Dushistov +Date: Tue, 6 Jan 2009 14:42:38 -0800 +Subject: minix: fix add link's wrong position calculation + +From: Evgeniy Dushistov + +commit d6b54841f4ddd836c886d1e6ac381cf309ee98a3 upstream. + +Fix the add link method. The oosition in the directory was calculated in +wrong way - it had the incorrect shift direction. + +[akpm@linux-foundation.org: coding-style fixes] +Signed-off-by: Evgeniy Dushistov +Cc: Nick Piggin +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/minix/dir.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/minix/dir.c ++++ b/fs/minix/dir.c +@@ -280,7 +280,7 @@ int minix_add_link(struct dentry *dentry + return -EINVAL; + + got_it: +- pos = (page->index >> PAGE_CACHE_SHIFT) + p - (char*)page_address(page); ++ pos = page_offset(page) + p - (char *)page_address(page); + err = __minix_write_begin(NULL, page->mapping, pos, sbi->s_dirsize, + AOP_FLAG_UNINTERRUPTIBLE, &page, NULL); + if (err) diff --git a/queue-2.6.27/sched_clock-prevent-scd-clock-from-moving-backwards-take-2.patch b/queue-2.6.27/sched_clock-prevent-scd-clock-from-moving-backwards-take-2.patch new file mode 100644 index 00000000000..a6bd1039ca4 --- /dev/null +++ b/queue-2.6.27/sched_clock-prevent-scd-clock-from-moving-backwards-take-2.patch @@ -0,0 +1,94 @@ +From 1c5745aa380efb6417b5681104b007c8612fb496 Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Mon, 22 Dec 2008 23:05:28 +0100 +Subject: sched_clock: prevent scd->clock from moving backwards, take #2 + +From: Thomas Gleixner + +commit 1c5745aa380efb6417b5681104b007c8612fb496 upstream. + +Redo: + + 5b7dba4: sched_clock: prevent scd->clock from moving backwards + +which had to be reverted due to s2ram hangs: + + ca7e716: Revert "sched_clock: prevent scd->clock from moving backwards" + +... this time with resume restoring GTOD later in the sequence +taken into account as well. + +The "timekeeping_suspended" flag is not very nice but we cannot call into +GTOD before it has been properly resumed and the scheduler will run very +early in the resume sequence. + +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/time.h | 1 + + kernel/sched_clock.c | 5 ++++- + kernel/time/timekeeping.c | 7 +++++-- + 3 files changed, 10 insertions(+), 3 deletions(-) + +--- a/include/linux/time.h ++++ b/include/linux/time.h +@@ -99,6 +99,7 @@ extern unsigned long read_persistent_clo + extern int update_persistent_clock(struct timespec now); + extern int no_sync_cmos_clock __read_mostly; + void timekeeping_init(void); ++extern int timekeeping_suspended; + + unsigned long get_seconds(void); + struct timespec current_kernel_time(void); +--- a/kernel/sched_clock.c ++++ b/kernel/sched_clock.c +@@ -124,7 +124,7 @@ static u64 __update_sched_clock(struct s + + clock = scd->tick_gtod + delta; + min_clock = wrap_max(scd->tick_gtod, scd->clock); +- max_clock = scd->tick_gtod + TICK_NSEC; ++ max_clock = wrap_max(scd->clock, scd->tick_gtod + TICK_NSEC); + + clock = wrap_max(clock, min_clock); + clock = wrap_min(clock, max_clock); +@@ -227,6 +227,9 @@ EXPORT_SYMBOL_GPL(sched_clock_idle_sleep + */ + void sched_clock_idle_wakeup_event(u64 delta_ns) + { ++ if (timekeeping_suspended) ++ return; ++ + sched_clock_tick(); + touch_softlockup_watchdog(); + } +--- a/kernel/time/timekeeping.c ++++ b/kernel/time/timekeeping.c +@@ -46,6 +46,9 @@ struct timespec xtime __attribute__ ((al + struct timespec wall_to_monotonic __attribute__ ((aligned (16))); + static unsigned long total_sleep_time; /* seconds */ + ++/* flag for if timekeeping is suspended */ ++int __read_mostly timekeeping_suspended; ++ + static struct timespec xtime_cache __attribute__ ((aligned (16))); + void update_xtime_cache(u64 nsec) + { +@@ -92,6 +95,8 @@ void getnstimeofday(struct timespec *ts) + unsigned long seq; + s64 nsecs; + ++ WARN_ON(timekeeping_suspended); ++ + do { + seq = read_seqbegin(&xtime_lock); + +@@ -261,8 +266,6 @@ void __init timekeeping_init(void) + write_sequnlock_irqrestore(&xtime_lock, flags); + } + +-/* flag for if timekeeping is suspended */ +-static int timekeeping_suspended; + /* time in seconds when suspend began */ + static unsigned long timekeeping_suspend_time; + /* xtime offset when we went into suspend */ diff --git a/queue-2.6.27/scsi-aha152x_cs-fix-regression-that-keeps-driver-from-using-shared-interrupts.patch b/queue-2.6.27/scsi-aha152x_cs-fix-regression-that-keeps-driver-from-using-shared-interrupts.patch new file mode 100644 index 00000000000..090bf2716cc --- /dev/null +++ b/queue-2.6.27/scsi-aha152x_cs-fix-regression-that-keeps-driver-from-using-shared-interrupts.patch @@ -0,0 +1,36 @@ +From 58607b30fc0f2230a189500112c7a7cca02804cf Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Sat, 3 Jan 2009 23:28:25 -0600 +Subject: SCSI: aha152x_cs: Fix regression that keeps driver from using shared interrupts + +From: Larry Finger + +commit 58607b30fc0f2230a189500112c7a7cca02804cf upstream. + +At some point since 2.6.22, the aha152x_cs driver stopped working and +started erring on load with the following messages: + +kernel: pcmcia: request for exclusive IRQ could not be fulfilled. +kernel: pcmcia: the driver needs updating to supported shared IRQ lines. + +With the following change, the driver works with shared IRQs. + +Signed-off-by: Larry Finger +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/pcmcia/aha152x_stub.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/pcmcia/aha152x_stub.c ++++ b/drivers/scsi/pcmcia/aha152x_stub.c +@@ -114,7 +114,7 @@ static int aha152x_probe(struct pcmcia_d + link->io.NumPorts1 = 0x20; + link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; + link->io.IOAddrLines = 10; +- link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; ++ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; + link->irq.IRQInfo1 = IRQ_LEVEL_ID; + link->conf.Attributes = CONF_ENABLE_IRQ; + link->conf.IntType = INT_MEMORY_AND_IO; diff --git a/queue-2.6.27/scsi-eata-fix-the-data-buffer-accessors-conversion-regression.patch b/queue-2.6.27/scsi-eata-fix-the-data-buffer-accessors-conversion-regression.patch new file mode 100644 index 00000000000..d00b9a416a2 --- /dev/null +++ b/queue-2.6.27/scsi-eata-fix-the-data-buffer-accessors-conversion-regression.patch @@ -0,0 +1,61 @@ +From 20c09df7eb9c92a40e0ecf654b6e8f14c8583b9e Mon Sep 17 00:00:00 2001 +From: FUJITA Tomonori +Date: Tue, 23 Dec 2008 04:01:35 +0900 +Subject: SCSI: eata: fix the data buffer accessors conversion regression + +From: FUJITA Tomonori + +commit 20c09df7eb9c92a40e0ecf654b6e8f14c8583b9e upstream. + +This fixes the regression introduced by the commit +58e2a02eb18393e76a469580fedf7caec190eb5e (eata: convert to use the +data buffer accessors), reported: + +http://marc.info/?t=122987621300006&r=1&w=2 + +- fix DMA_NONE handling in map_dma() + +- this driver can't use scsi_dma_map since host->shost_gendev.parent +is not set properly (it uses scsi_register). + +Signed-off-by: FUJITA Tomonori +Reported-by: Arthur Marsh +Tested-by: Arthur Marsh +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/eata.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +--- a/drivers/scsi/eata.c ++++ b/drivers/scsi/eata.c +@@ -1626,8 +1626,15 @@ static void map_dma(unsigned int i, stru + + cpp->sense_len = SCSI_SENSE_BUFFERSIZE; + +- count = scsi_dma_map(SCpnt); +- BUG_ON(count < 0); ++ if (!scsi_sg_count(SCpnt)) { ++ cpp->data_len = 0; ++ return; ++ } ++ ++ count = pci_map_sg(ha->pdev, scsi_sglist(SCpnt), scsi_sg_count(SCpnt), ++ pci_dir); ++ BUG_ON(!count); ++ + scsi_for_each_sg(SCpnt, sg, count, k) { + cpp->sglist[k].address = H2DEV(sg_dma_address(sg)); + cpp->sglist[k].num_bytes = H2DEV(sg_dma_len(sg)); +@@ -1655,7 +1662,9 @@ static void unmap_dma(unsigned int i, st + pci_unmap_single(ha->pdev, DEV2H(cpp->sense_addr), + DEV2H(cpp->sense_len), PCI_DMA_FROMDEVICE); + +- scsi_dma_unmap(SCpnt); ++ if (scsi_sg_count(SCpnt)) ++ pci_unmap_sg(ha->pdev, scsi_sglist(SCpnt), scsi_sg_count(SCpnt), ++ pci_dir); + + if (!DEV2H(cpp->data_len)) + pci_dir = PCI_DMA_BIDIRECTIONAL; diff --git a/queue-2.6.27/series b/queue-2.6.27/series new file mode 100644 index 00000000000..43091fc9dcf --- /dev/null +++ b/queue-2.6.27/series @@ -0,0 +1,19 @@ +alsa-caiaq-fix-oops-with-midi.patch +alsa-hda-add-quirk-for-hp6730b-laptop.patch +cgroups-fix-a-race-between-cgroup_clone-and-umount.patch +devices-cgroup-allow-mkfifo.patch +dm-log-fix-dm_io_client-leak-on-error-paths.patch +dm-raid1-fix-error-count.patch +ioat-fix-self-test-for-multi-channel-case.patch +iwlwifi-use-gfp_kernel-to-allocate-rx-skb-memory.patch +md-fix-bitmap-on-external-file-bug.patch +minix-fix-add-link-s-wrong-position-calculation.patch +sched_clock-prevent-scd-clock-from-moving-backwards-take-2.patch +scsi-aha152x_cs-fix-regression-that-keeps-driver-from-using-shared-interrupts.patch +scsi-eata-fix-the-data-buffer-accessors-conversion-regression.patch +usb-emi26-fix-oops-on-load.patch +usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch +usb-unusual_devs.h-additions-for-pentax-k10d.patch +x86-default-to-swiotlb-y-on-x86_64.patch +x86-fix-incorrect-__read_mostly-on-_boot_cpu_pda.patch +x86-uv-remove-erroneous-bau-initialization.patch diff --git a/queue-2.6.27/usb-emi26-fix-oops-on-load.patch b/queue-2.6.27/usb-emi26-fix-oops-on-load.patch new file mode 100644 index 00000000000..83832b4ea70 --- /dev/null +++ b/queue-2.6.27/usb-emi26-fix-oops-on-load.patch @@ -0,0 +1,92 @@ +From 327d74f6b65ddc8a042c43c11fdd4be0bb354668 Mon Sep 17 00:00:00 2001 +From: Marcin Slusarz +Date: Sun, 4 Jan 2009 13:25:13 +0100 +Subject: USB: emi26: fix oops on load + +From: Marcin Slusarz + +commit 327d74f6b65ddc8a042c43c11fdd4be0bb354668 upstream. + +Fix oops introduced by commit ae93a55bf948753de0bb8e43fa9c027f786abb05 +(emi26: use request_firmware()): + +usb 1-1: new full speed USB device using uhci_hcd and address 2 +usb 1-1: configuration #1 chosen from 1 choice +emi26 - firmware loader 1-1:1.0: emi26_probe start +usb 1-1: firmware: requesting emi26/loader.fw +usb 1-1: firmware: requesting emi26/bitstream.fw +usb 1-1: firmware: requesting emi26/firmware.fw +usb 1-1: emi26_set_reset - 1 +usb 1-1: emi26_set_reset - 0 +BUG: unable to handle kernel NULL pointer dereference at 00000000 +IP: [] emi26_probe+0x2f7/0x620 [emi26] +*pde = 00000000 +Oops: 0000 [#1] SMP +last sysfs file: /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/firmware/1-1/loading +Modules linked in: emi26(+) ipv6 cpufreq_ondemand coretemp arc4 ecb iwl3945 irtty_sir sir_dev nsc_ircc ehci_hcd uhci_hcd mac80211 irda usbcore snd_hda_intel thinkpad_acpi rfkill hwmon led_class e1000e snd_pcm cfg80211 snd_timer crc_ccitt snd snd_page_alloc aes_generic + +Pid: 5082, comm: modprobe Not tainted (2.6.28 #2) 17023QG +EIP: 0060:[] EFLAGS: 00010206 CPU: 0 +EIP is at emi26_probe+0x2f7/0x620 [emi26] +EAX: 0000015c EBX: 00000000 ECX: c1ffd9c0 EDX: 00000000 +ESI: 0000015c EDI: f6bb215c EBP: f6bb0400 ESP: f00ebcfc + DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 +Process modprobe (pid: 5082, ti=f00ea000 task=f5c7c700 task.ti=f00ea000) +Stack: + 0000015c 000000a5 f6a67cb8 f80dc7e0 c01c6262 fbef2986 f6bb2000 00008fe0 + 0000015c f715f748 f715f740 f715f738 f715f748 f6a67c00 f80dd040 f80dcfc0 + f6bb0400 fbacb290 f6a67c94 fbae0160 c01c70bf 00000000 f6a67c1c 00000000 +Call Trace: + [] sysfs_add_one+0x12/0x50 + [] usb_probe_interface+0xa0/0x140 [usbcore] + [] sysfs_create_link+0xf/0x20 + [] driver_probe_device+0x82/0x180 + [] usb_match_id+0x3b/0x50 [usbcore] + [] __driver_attach+0x7e/0x80 + [] bus_for_each_dev+0x3a/0x60 + [] driver_attach+0x16/0x20 + [] __driver_attach+0x0/0x80 + [] bus_add_driver+0x1a1/0x220 + [] driver_register+0x4d/0x120 + [] idr_get_empty_slot+0xf2/0x290 + [] usb_register_driver+0x81/0x100 [usbcore] + [] emi26_init+0x0/0x14 [emi26] + [] do_one_initcall+0x36/0x1b0 + [] sysfs_ilookup_test+0x0/0x10 + [] ifind+0x31/0x90 + [] __sysfs_add_one+0x59/0x80 + [] sysfs_addrm_finish+0x14/0x1c0 + [] __vunmap+0xa3/0xd0 + [] load_module+0x1544/0x1640 + [] sys_init_module+0x87/0x1b0 + [] sys_read+0x41/0x70 + [] sysenter_do_call+0x12/0x21 + [] wait_for_common+0x40/0x110 +Code: 66 c1 e8 08 66 09 d0 75 a5 31 d2 89 e8 e8 72 fc ff ff 85 c0 0f 88 9a 02 00 00 b8 fa 00 00 00 e8 30 46 05 c8 8b 74 24 28 8b 5e 04 <8b> 03 89 44 24 1c 0f c8 89 44 24 1c 0f b7 4b 04 c7 44 24 20 00 +EIP: [] emi26_probe+0x2f7/0x620 [emi26] SS:ESP 0068:f00ebcfc +---[ end trace 2eefa13825431230 ]--- + +After the last "package" of firmware data is sent to the device, we dereference +NULL pointer (on access to rec->addr). Fix it. + +Reported--by: David Flatz +Tested-by: David Flatz +Signed-off-by: Marcin Slusarz +Cc: David Woodhouse +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/misc/emi26.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/misc/emi26.c ++++ b/drivers/usb/misc/emi26.c +@@ -157,7 +157,7 @@ static int emi26_load_firmware (struct u + err("%s - error loading firmware: error = %d", __func__, err); + goto wraperr; + } +- } while (i > 0); ++ } while (rec); + + /* Assert reset (stop the CPU in the EMI) */ + err = emi26_set_reset(dev,1); diff --git a/queue-2.6.27/usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch b/queue-2.6.27/usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch new file mode 100644 index 00000000000..ccdac31d677 --- /dev/null +++ b/queue-2.6.27/usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch @@ -0,0 +1,46 @@ +From 6c0735687d37e25a65866823881bcbf39a6a023f Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Sun, 30 Nov 2008 16:50:04 +0100 +Subject: USB: isp1760: use a specific PLX bridge instead of any bdridge + +From: Sebastian Andrzej Siewior + +commit 6c0735687d37e25a65866823881bcbf39a6a023f upstream. + +this driver can't handle (of course) any brdige class devices. So we +now are just active on one specific bridge which should be only the +isp1761 chip behind a PLX bridge. + +Signed-off-by: Sebastian Andrzej Siewior +Tested-by: Karl Bongers +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/isp1760-if.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +--- a/drivers/usb/host/isp1760-if.c ++++ b/drivers/usb/host/isp1760-if.c +@@ -267,12 +267,16 @@ static void isp1761_pci_shutdown(struct + printk(KERN_ERR "ips1761_pci_shutdown\n"); + } + +-static const struct pci_device_id isp1760_plx [] = { { +- /* handle any USB 2.0 EHCI controller */ +- PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_OTHER << 8) | (0x06 << 16)), ~0), +- .driver_data = 0, +-}, +-{ /* end: all zeroes */ } ++static const struct pci_device_id isp1760_plx [] = { ++ { ++ .class = PCI_CLASS_BRIDGE_OTHER << 8, ++ .class_mask = ~0, ++ .vendor = PCI_VENDOR_ID_PLX, ++ .device = 0x5406, ++ .subvendor = PCI_VENDOR_ID_PLX, ++ .subdevice = 0x9054, ++ }, ++ { } + }; + MODULE_DEVICE_TABLE(pci, isp1760_plx); + diff --git a/queue-2.6.27/usb-unusual_devs.h-additions-for-pentax-k10d.patch b/queue-2.6.27/usb-unusual_devs.h-additions-for-pentax-k10d.patch new file mode 100644 index 00000000000..c582d22a61d --- /dev/null +++ b/queue-2.6.27/usb-unusual_devs.h-additions-for-pentax-k10d.patch @@ -0,0 +1,50 @@ +From e3f47f89a57ef115755184a8b3f03a47ee227418 Mon Sep 17 00:00:00 2001 +From: Daniel Drake +Date: Wed, 10 Dec 2008 23:28:25 +0200 +Subject: USB: unusual_devs.h additions for Pentax K10D + +From: Daniel Drake + +commit e3f47f89a57ef115755184a8b3f03a47ee227418 upstream. + +Jaak Ristioja reported problems with his Pentax K10D camera: +https://bugs.gentoo.org/show_bug.cgi?id=250406 + +/proc/bus/usb/devices: +T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 +D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=0a17 ProdID=006e Rev= 1.00 +S: Manufacturer=PENTAX Corporation +S: Product=K10D +C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA +I:* If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage +E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms +E: Ad=83(I) Atr=03(Int.) MxPS= 64 Ivl=100ms +The number of reported sectors is off-by-one. + +Signed-off-by: Daniel Drake +Cc: Kadianakis George +Signed-off-by: Phil Dibowitz +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/unusual_devs.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -1425,6 +1425,13 @@ UNUSUAL_DEV( 0x0a17, 0x006, 0x0000, 0xff + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_INQUIRY ), + ++/* Reported by Jaak Ristioja */ ++UNUSUAL_DEV( 0x0a17, 0x006e, 0x0100, 0x0100, ++ "Pentax", ++ "K10D", ++ US_SC_DEVICE, US_PR_DEVICE, NULL, ++ US_FL_FIX_CAPACITY ), ++ + /* These are virtual windows driver CDs, which the zd1211rw driver + * automatically converts into WLAN devices. */ + UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101, diff --git a/queue-2.6.27/x86-default-to-swiotlb-y-on-x86_64.patch b/queue-2.6.27/x86-default-to-swiotlb-y-on-x86_64.patch new file mode 100644 index 00000000000..f9c95716c9d --- /dev/null +++ b/queue-2.6.27/x86-default-to-swiotlb-y-on-x86_64.patch @@ -0,0 +1,35 @@ +From a1afd01c175324656d0e8f1c82ea94b474953c04 Mon Sep 17 00:00:00 2001 +From: Joerg Roedel +Date: Tue, 18 Nov 2008 12:44:21 +0100 +Subject: x86: default to SWIOTLB=y on x86_64 + +From: Joerg Roedel + +commit a1afd01c175324656d0e8f1c82ea94b474953c04 upstream. + +Impact: fixes korg bugzilla 11980 + +A kernel for a 64bit x86 system should always contain the swiotlb code +in case it is booted on a machine without any hardware IOMMU supported +by the kernel and more than 4GB of RAM. This patch changes Kconfig to +always compile swiotlb into the kernel for x86_64. + +Signed-off-by: Joerg Roedel +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/Kconfig ++++ b/arch/x86/Kconfig +@@ -567,7 +567,7 @@ config AMD_IOMMU + + # need this always selected by IOMMU for the VIA workaround + config SWIOTLB +- bool ++ def_bool y if X86_64 + help + Support for software bounce buffers used on x86-64 systems + which don't have a hardware IOMMU (e.g. the current generation diff --git a/queue-2.6.27/x86-fix-incorrect-__read_mostly-on-_boot_cpu_pda.patch b/queue-2.6.27/x86-fix-incorrect-__read_mostly-on-_boot_cpu_pda.patch new file mode 100644 index 00000000000..f02b71c1d86 --- /dev/null +++ b/queue-2.6.27/x86-fix-incorrect-__read_mostly-on-_boot_cpu_pda.patch @@ -0,0 +1,37 @@ +From 26799a63110dcbe81291ea53178f6b4810d07424 Mon Sep 17 00:00:00 2001 +From: Ravikiran G Thirumalai +Date: Wed, 31 Dec 2008 13:44:46 -0800 +Subject: x86: fix incorrect __read_mostly on _boot_cpu_pda + +From: Ravikiran G Thirumalai + +commit 26799a63110dcbe81291ea53178f6b4810d07424 upstream. + +The pda rework (commit 3461b0af025251bbc6b3d56c821c6ac2de6f7209) +to remove static boot cpu pdas introduced a performance bug. + +_boot_cpu_pda is the actual pda used by the boot cpu and is definitely +not "__read_mostly" and ended up polluting the read mostly section with +writes. This bug caused regression of about 8-10% on certain syscall +intensive workloads. + +Signed-off-by: Ravikiran Thirumalai +Acked-by: Mike Travis +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/head64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kernel/head64.c ++++ b/arch/x86/kernel/head64.c +@@ -26,7 +26,7 @@ + #include + + /* boot cpu pda */ +-static struct x8664_pda _boot_cpu_pda __read_mostly; ++static struct x8664_pda _boot_cpu_pda; + + #ifdef CONFIG_SMP + /* diff --git a/queue-2.6.27/x86-uv-remove-erroneous-bau-initialization.patch b/queue-2.6.27/x86-uv-remove-erroneous-bau-initialization.patch new file mode 100644 index 00000000000..5f9f5eb9acf --- /dev/null +++ b/queue-2.6.27/x86-uv-remove-erroneous-bau-initialization.patch @@ -0,0 +1,66 @@ +From 46814dded1b972a07b1609d81632eef3009fbb10 Mon Sep 17 00:00:00 2001 +From: Cliff Wickman +Date: Wed, 31 Dec 2008 13:20:50 -0600 +Subject: x86, UV: remove erroneous BAU initialization + +From: Cliff Wickman + +commit 46814dded1b972a07b1609d81632eef3009fbb10 upstream. + +Impact: fix crash on x86/UV + +UV is the SGI "UltraViolet" machine, which is x86_64 based. +BAU is the "Broadcast Assist Unit", used for TLB shootdown in UV. + +This patch removes the allocation and initialization of an unused table. + +This table is left over from a development test mode. It is unused in +the present code. + +And it was incorrectly initialized: 8 entries allocated but 17 initialized, +causing slab corruption. + +This patch should go into 2.6.27 and 2.6.28 as well as the current tree. + +Diffed against 2.6.28 (linux-next, 12/30/08) + +Signed-off-by: Cliff Wickman +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/tlb_uv.c | 9 --------- + 1 file changed, 9 deletions(-) + +--- a/arch/x86/kernel/tlb_uv.c ++++ b/arch/x86/kernel/tlb_uv.c +@@ -586,7 +586,6 @@ static int __init uv_ptc_init(void) + static struct bau_control * __init uv_table_bases_init(int blade, int node) + { + int i; +- int *ip; + struct bau_msg_status *msp; + struct bau_control *bau_tabp; + +@@ -603,13 +602,6 @@ static struct bau_control * __init uv_ta + bau_cpubits_clear(&msp->seen_by, (int) + uv_blade_nr_possible_cpus(blade)); + +- bau_tabp->watching = +- kmalloc_node(sizeof(int) * DEST_NUM_RESOURCES, GFP_KERNEL, node); +- BUG_ON(!bau_tabp->watching); +- +- for (i = 0, ip = bau_tabp->watching; i < DEST_Q_SIZE; i++, ip++) +- *ip = 0; +- + uv_bau_table_bases[blade] = bau_tabp; + + return bau_tabp; +@@ -632,7 +624,6 @@ uv_table_bases_finish(int blade, int nod + bcp->bau_msg_head = bau_tablesp->va_queue_first; + bcp->va_queue_first = bau_tablesp->va_queue_first; + bcp->va_queue_last = bau_tablesp->va_queue_last; +- bcp->watching = bau_tablesp->watching; + bcp->msg_statuses = bau_tablesp->msg_statuses; + bcp->descriptor_base = adp; + }