Merge branch 'master' into upstream-fixes
This commit is contained in:
commit
64c9d27d6a
|
@ -526,12 +526,15 @@ config PPC_IBM_CELL_BLADE
|
|||
select UDBG_RTAS_CONSOLE
|
||||
|
||||
config PPC_PS3
|
||||
bool "Sony PS3"
|
||||
bool "Sony PS3 (incomplete)"
|
||||
depends on PPC_MULTIPLATFORM && PPC64
|
||||
select PPC_CELL
|
||||
help
|
||||
This option enables support for the Sony PS3 game console
|
||||
and other platforms using the PS3 hypervisor.
|
||||
Support for this platform is not yet complete, so
|
||||
enabling this will not result in a bootable kernel on a
|
||||
PS3 system.
|
||||
|
||||
config PPC_NATIVE
|
||||
bool
|
||||
|
|
|
@ -1430,7 +1430,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
|
|||
|
||||
for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) {
|
||||
bus = pci_bus_b(ln);
|
||||
if (in_bus >= bus->number && in_bus < (bus->number + bus->subordinate))
|
||||
if (in_bus >= bus->number && in_bus <= bus->subordinate)
|
||||
break;
|
||||
bus = NULL;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
obj-y += setup.o mm.o smp.o time.o hvcall.o htab.o repository.o
|
||||
obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
|
||||
obj-y += interrupt.o exports.o os-area.o
|
||||
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
obj-$(CONFIG_SPU_BASE) += spu.o
|
||||
|
|
|
@ -71,7 +71,7 @@ int ps3_free_io_irq(unsigned int virq)
|
|||
|
||||
result = lv1_destruct_io_irq_outlet(virq_to_hw(virq));
|
||||
|
||||
if (!result)
|
||||
if (result)
|
||||
pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n",
|
||||
__func__, __LINE__, ps3_result(result));
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ static int verify_command(struct file *file, unsigned char *cmd)
|
|||
static int sg_io(struct file *file, request_queue_t *q,
|
||||
struct gendisk *bd_disk, struct sg_io_hdr *hdr)
|
||||
{
|
||||
unsigned long start_time;
|
||||
unsigned long start_time, timeout;
|
||||
int writing = 0, ret = 0;
|
||||
struct request *rq;
|
||||
char sense[SCSI_SENSE_BUFFERSIZE];
|
||||
|
@ -271,7 +271,8 @@ static int sg_io(struct file *file, request_queue_t *q,
|
|||
|
||||
rq->cmd_type = REQ_TYPE_BLOCK_PC;
|
||||
|
||||
rq->timeout = jiffies_to_msecs(hdr->timeout);
|
||||
timeout = msecs_to_jiffies(hdr->timeout);
|
||||
rq->timeout = (timeout < INT_MAX) ? timeout : INT_MAX;
|
||||
if (!rq->timeout)
|
||||
rq->timeout = q->sg_timeout;
|
||||
if (!rq->timeout)
|
||||
|
|
|
@ -3639,29 +3639,6 @@ static int sky2_resume(struct pci_dev *pdev)
|
|||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
/* BIOS resume runs after device (it's a bug in PM)
|
||||
* as a temporary workaround on suspend/resume leave MSI disabled
|
||||
*/
|
||||
static int sky2_suspend_late(struct pci_dev *pdev, pm_message_t state)
|
||||
{
|
||||
struct sky2_hw *hw = pci_get_drvdata(pdev);
|
||||
|
||||
free_irq(pdev->irq, hw);
|
||||
if (hw->msi) {
|
||||
pci_disable_msi(pdev);
|
||||
hw->msi = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sky2_resume_early(struct pci_dev *pdev)
|
||||
{
|
||||
struct sky2_hw *hw = pci_get_drvdata(pdev);
|
||||
struct net_device *dev = hw->dev[0];
|
||||
|
||||
return request_irq(pdev->irq, sky2_intr, IRQF_SHARED, dev->name, hw);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct pci_driver sky2_driver = {
|
||||
|
@ -3672,8 +3649,6 @@ static struct pci_driver sky2_driver = {
|
|||
#ifdef CONFIG_PM
|
||||
.suspend = sky2_suspend,
|
||||
.resume = sky2_resume,
|
||||
.suspend_late = sky2_suspend_late,
|
||||
.resume_early = sky2_resume_early,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -2844,7 +2844,6 @@ int try_to_free_buffers(struct page *page)
|
|||
|
||||
spin_lock(&mapping->private_lock);
|
||||
ret = drop_buffers(page, &buffers_to_free);
|
||||
spin_unlock(&mapping->private_lock);
|
||||
|
||||
/*
|
||||
* If the filesystem writes its buffers by hand (eg ext3)
|
||||
|
@ -2855,9 +2854,14 @@ int try_to_free_buffers(struct page *page)
|
|||
* Also, during truncate, discard_buffer will have marked all
|
||||
* the page's buffers clean. We discover that here and clean
|
||||
* the page also.
|
||||
*
|
||||
* private_lock must be held over this entire operation in order
|
||||
* to synchronise against __set_page_dirty_buffers and prevent the
|
||||
* dirty bit from being lost.
|
||||
*/
|
||||
if (ret)
|
||||
cancel_dirty_page(page, PAGE_CACHE_SIZE);
|
||||
spin_unlock(&mapping->private_lock);
|
||||
out:
|
||||
if (buffers_to_free) {
|
||||
struct buffer_head *bh = buffers_to_free;
|
||||
|
|
|
@ -133,11 +133,9 @@ get_dirty_limits(long *pbackground, long *pdirty,
|
|||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
/*
|
||||
* If this mapping can only allocate from low memory,
|
||||
* we exclude high memory from our count.
|
||||
* We always exclude high memory from our count.
|
||||
*/
|
||||
if (mapping && !(mapping_gfp_mask(mapping) & __GFP_HIGHMEM))
|
||||
available_memory -= totalhigh_pages;
|
||||
available_memory -= totalhigh_pages;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -526,28 +524,25 @@ static struct notifier_block __cpuinitdata ratelimit_nb = {
|
|||
};
|
||||
|
||||
/*
|
||||
* If the machine has a large highmem:lowmem ratio then scale back the default
|
||||
* dirty memory thresholds: allowing too much dirty highmem pins an excessive
|
||||
* number of buffer_heads.
|
||||
* Called early on to tune the page writeback dirty limits.
|
||||
*
|
||||
* We used to scale dirty pages according to how total memory
|
||||
* related to pages that could be allocated for buffers (by
|
||||
* comparing nr_free_buffer_pages() to vm_total_pages.
|
||||
*
|
||||
* However, that was when we used "dirty_ratio" to scale with
|
||||
* all memory, and we don't do that any more. "dirty_ratio"
|
||||
* is now applied to total non-HIGHPAGE memory (by subtracting
|
||||
* totalhigh_pages from vm_total_pages), and as such we can't
|
||||
* get into the old insane situation any more where we had
|
||||
* large amounts of dirty pages compared to a small amount of
|
||||
* non-HIGHMEM memory.
|
||||
*
|
||||
* But we might still want to scale the dirty_ratio by how
|
||||
* much memory the box has..
|
||||
*/
|
||||
void __init page_writeback_init(void)
|
||||
{
|
||||
long buffer_pages = nr_free_buffer_pages();
|
||||
long correction;
|
||||
|
||||
correction = (100 * 4 * buffer_pages) / vm_total_pages;
|
||||
|
||||
if (correction < 100) {
|
||||
dirty_background_ratio *= correction;
|
||||
dirty_background_ratio /= 100;
|
||||
vm_dirty_ratio *= correction;
|
||||
vm_dirty_ratio /= 100;
|
||||
|
||||
if (dirty_background_ratio <= 0)
|
||||
dirty_background_ratio = 1;
|
||||
if (vm_dirty_ratio <= 0)
|
||||
vm_dirty_ratio = 1;
|
||||
}
|
||||
mod_timer(&wb_timer, jiffies + dirty_writeback_interval);
|
||||
writeback_set_ratelimit();
|
||||
register_cpu_notifier(&ratelimit_nb);
|
||||
|
|
Loading…
Reference in New Issue