aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-01-30 09:14:40 -0500
committerJeff Garzik <jeff@garzik.org>2007-01-30 09:14:40 -0500
commit64c9d27d6a692d2c27df14ef44cb400b4aa412b3 (patch)
treeeac635d0a418f9a337048e66b3346cb2e08b5d85
parent03ee5b1cdd09ed1ee2e75d0bc647fc5db66b9d07 (diff)
parentc0d4d573feed199b16094c072e7cb07afb01c598 (diff)
Merge branch 'master' into upstream-fixes
-rw-r--r--arch/powerpc/Kconfig5
-rw-r--r--arch/powerpc/kernel/pci_64.c2
-rw-r--r--arch/powerpc/platforms/ps3/Makefile3
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c2
-rw-r--r--block/scsi_ioctl.c5
-rw-r--r--drivers/net/sky2.c25
-rw-r--r--fs/buffer.c6
-rw-r--r--mm/page-writeback.c41
8 files changed, 34 insertions, 55 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index b268c417c0bf..d6abe495c6b0 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -526,12 +526,15 @@ config PPC_IBM_CELL_BLADE
526 select UDBG_RTAS_CONSOLE 526 select UDBG_RTAS_CONSOLE
527 527
528config PPC_PS3 528config PPC_PS3
529 bool "Sony PS3" 529 bool "Sony PS3 (incomplete)"
530 depends on PPC_MULTIPLATFORM && PPC64 530 depends on PPC_MULTIPLATFORM && PPC64
531 select PPC_CELL 531 select PPC_CELL
532 help 532 help
533 This option enables support for the Sony PS3 game console 533 This option enables support for the Sony PS3 game console
534 and other platforms using the PS3 hypervisor. 534 and other platforms using the PS3 hypervisor.
535 Support for this platform is not yet complete, so
536 enabling this will not result in a bootable kernel on a
537 PS3 system.
535 538
536config PPC_NATIVE 539config PPC_NATIVE
537 bool 540 bool
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 73c59ec49120..01f18c683407 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -1430,7 +1430,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
1430 1430
1431 for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { 1431 for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) {
1432 bus = pci_bus_b(ln); 1432 bus = pci_bus_b(ln);
1433 if (in_bus >= bus->number && in_bus < (bus->number + bus->subordinate)) 1433 if (in_bus >= bus->number && in_bus <= bus->subordinate)
1434 break; 1434 break;
1435 bus = NULL; 1435 bus = NULL;
1436 } 1436 }
diff --git a/arch/powerpc/platforms/ps3/Makefile b/arch/powerpc/platforms/ps3/Makefile
index 3757cfabc8ce..1994904f580f 100644
--- a/arch/powerpc/platforms/ps3/Makefile
+++ b/arch/powerpc/platforms/ps3/Makefile
@@ -1,4 +1,5 @@
1obj-y += setup.o mm.o smp.o time.o hvcall.o htab.o repository.o 1obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
2obj-y += interrupt.o exports.o os-area.o 2obj-y += interrupt.o exports.o os-area.o
3 3
4obj-$(CONFIG_SMP) += smp.o
4obj-$(CONFIG_SPU_BASE) += spu.o 5obj-$(CONFIG_SPU_BASE) += spu.o
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 056c1e4141ba..6f5de438b980 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -71,7 +71,7 @@ int ps3_free_io_irq(unsigned int virq)
71 71
72 result = lv1_destruct_io_irq_outlet(virq_to_hw(virq)); 72 result = lv1_destruct_io_irq_outlet(virq_to_hw(virq));
73 73
74 if (!result) 74 if (result)
75 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", 75 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n",
76 __func__, __LINE__, ps3_result(result)); 76 __func__, __LINE__, ps3_result(result));
77 77
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index 2528a0c0dec8..65c6a3cba6d6 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -223,7 +223,7 @@ static int verify_command(struct file *file, unsigned char *cmd)
223static int sg_io(struct file *file, request_queue_t *q, 223static int sg_io(struct file *file, request_queue_t *q,
224 struct gendisk *bd_disk, struct sg_io_hdr *hdr) 224 struct gendisk *bd_disk, struct sg_io_hdr *hdr)
225{ 225{
226 unsigned long start_time; 226 unsigned long start_time, timeout;
227 int writing = 0, ret = 0; 227 int writing = 0, ret = 0;
228 struct request *rq; 228 struct request *rq;
229 char sense[SCSI_SENSE_BUFFERSIZE]; 229 char sense[SCSI_SENSE_BUFFERSIZE];
@@ -271,7 +271,8 @@ static int sg_io(struct file *file, request_queue_t *q,
271 271
272 rq->cmd_type = REQ_TYPE_BLOCK_PC; 272 rq->cmd_type = REQ_TYPE_BLOCK_PC;
273 273
274 rq->timeout = jiffies_to_msecs(hdr->timeout); 274 timeout = msecs_to_jiffies(hdr->timeout);
275 rq->timeout = (timeout < INT_MAX) ? timeout : INT_MAX;
275 if (!rq->timeout) 276 if (!rq->timeout)
276 rq->timeout = q->sg_timeout; 277 rq->timeout = q->sg_timeout;
277 if (!rq->timeout) 278 if (!rq->timeout)
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index a2e804ddca6c..822dd0b13133 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -3639,29 +3639,6 @@ static int sky2_resume(struct pci_dev *pdev)
3639out: 3639out:
3640 return err; 3640 return err;
3641} 3641}
3642
3643/* BIOS resume runs after device (it's a bug in PM)
3644 * as a temporary workaround on suspend/resume leave MSI disabled
3645 */
3646static int sky2_suspend_late(struct pci_dev *pdev, pm_message_t state)
3647{
3648 struct sky2_hw *hw = pci_get_drvdata(pdev);
3649
3650 free_irq(pdev->irq, hw);
3651 if (hw->msi) {
3652 pci_disable_msi(pdev);
3653 hw->msi = 0;
3654 }
3655 return 0;
3656}
3657
3658static int sky2_resume_early(struct pci_dev *pdev)
3659{
3660 struct sky2_hw *hw = pci_get_drvdata(pdev);
3661 struct net_device *dev = hw->dev[0];
3662
3663 return request_irq(pdev->irq, sky2_intr, IRQF_SHARED, dev->name, hw);
3664}
3665#endif 3642#endif
3666 3643
3667static struct pci_driver sky2_driver = { 3644static struct pci_driver sky2_driver = {
@@ -3672,8 +3649,6 @@ static struct pci_driver sky2_driver = {
3672#ifdef CONFIG_PM 3649#ifdef CONFIG_PM
3673 .suspend = sky2_suspend, 3650 .suspend = sky2_suspend,
3674 .resume = sky2_resume, 3651 .resume = sky2_resume,
3675 .suspend_late = sky2_suspend_late,
3676 .resume_early = sky2_resume_early,
3677#endif 3652#endif
3678}; 3653};
3679 3654
diff --git a/fs/buffer.c b/fs/buffer.c
index 460f1c43238e..1ad674fd348c 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2844,7 +2844,6 @@ int try_to_free_buffers(struct page *page)
2844 2844
2845 spin_lock(&mapping->private_lock); 2845 spin_lock(&mapping->private_lock);
2846 ret = drop_buffers(page, &buffers_to_free); 2846 ret = drop_buffers(page, &buffers_to_free);
2847 spin_unlock(&mapping->private_lock);
2848 2847
2849 /* 2848 /*
2850 * If the filesystem writes its buffers by hand (eg ext3) 2849 * If the filesystem writes its buffers by hand (eg ext3)
@@ -2855,9 +2854,14 @@ int try_to_free_buffers(struct page *page)
2855 * Also, during truncate, discard_buffer will have marked all 2854 * Also, during truncate, discard_buffer will have marked all
2856 * the page's buffers clean. We discover that here and clean 2855 * the page's buffers clean. We discover that here and clean
2857 * the page also. 2856 * the page also.
2857 *
2858 * private_lock must be held over this entire operation in order
2859 * to synchronise against __set_page_dirty_buffers and prevent the
2860 * dirty bit from being lost.
2858 */ 2861 */
2859 if (ret) 2862 if (ret)
2860 cancel_dirty_page(page, PAGE_CACHE_SIZE); 2863 cancel_dirty_page(page, PAGE_CACHE_SIZE);
2864 spin_unlock(&mapping->private_lock);
2861out: 2865out:
2862 if (buffers_to_free) { 2866 if (buffers_to_free) {
2863 struct buffer_head *bh = buffers_to_free; 2867 struct buffer_head *bh = buffers_to_free;
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 1d2fc89ca56d..be0efbde4994 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -133,11 +133,9 @@ get_dirty_limits(long *pbackground, long *pdirty,
133 133
134#ifdef CONFIG_HIGHMEM 134#ifdef CONFIG_HIGHMEM
135 /* 135 /*
136 * If this mapping can only allocate from low memory, 136 * We always exclude high memory from our count.
137 * we exclude high memory from our count.
138 */ 137 */
139 if (mapping && !(mapping_gfp_mask(mapping) & __GFP_HIGHMEM)) 138 available_memory -= totalhigh_pages;
140 available_memory -= totalhigh_pages;
141#endif 139#endif
142 140
143 141
@@ -526,28 +524,25 @@ static struct notifier_block __cpuinitdata ratelimit_nb = {
526}; 524};
527 525
528/* 526/*
529 * If the machine has a large highmem:lowmem ratio then scale back the default 527 * Called early on to tune the page writeback dirty limits.
530 * dirty memory thresholds: allowing too much dirty highmem pins an excessive 528 *
531 * number of buffer_heads. 529 * We used to scale dirty pages according to how total memory
530 * related to pages that could be allocated for buffers (by
531 * comparing nr_free_buffer_pages() to vm_total_pages.
532 *
533 * However, that was when we used "dirty_ratio" to scale with
534 * all memory, and we don't do that any more. "dirty_ratio"
535 * is now applied to total non-HIGHPAGE memory (by subtracting
536 * totalhigh_pages from vm_total_pages), and as such we can't
537 * get into the old insane situation any more where we had
538 * large amounts of dirty pages compared to a small amount of
539 * non-HIGHMEM memory.
540 *
541 * But we might still want to scale the dirty_ratio by how
542 * much memory the box has..
532 */ 543 */
533void __init page_writeback_init(void) 544void __init page_writeback_init(void)
534{ 545{
535 long buffer_pages = nr_free_buffer_pages();
536 long correction;
537
538 correction = (100 * 4 * buffer_pages) / vm_total_pages;
539
540 if (correction < 100) {
541 dirty_background_ratio *= correction;
542 dirty_background_ratio /= 100;
543 vm_dirty_ratio *= correction;
544 vm_dirty_ratio /= 100;
545
546 if (dirty_background_ratio <= 0)
547 dirty_background_ratio = 1;
548 if (vm_dirty_ratio <= 0)
549 vm_dirty_ratio = 1;
550 }
551 mod_timer(&wb_timer, jiffies + dirty_writeback_interval); 546 mod_timer(&wb_timer, jiffies + dirty_writeback_interval);
552 writeback_set_ratelimit(); 547 writeback_set_ratelimit();
553 register_cpu_notifier(&ratelimit_nb); 548 register_cpu_notifier(&ratelimit_nb);