Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75484
b: refs/heads/master
c: d262c32
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Jan 15, 2008
1 parent b9fa865 commit 1b28f15
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 74 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d5d80001df3fbd06bd2b8893b6e3847e38a12d6
refs/heads/master: d262c32a4bcc3e5fda0325a64e53c25fe1e999d7
2 changes: 0 additions & 2 deletions trunk/arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ config BCM47XX
select SYS_SUPPORTS_LITTLE_ENDIAN
select SSB
select SSB_DRIVER_MIPS
select SSB_DRIVER_EXTIF
select SSB_PCICORE_HOSTMODE if PCI
select GENERIC_GPIO
select SYS_HAS_EARLY_PRINTK
select CFE
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/mips/cobalt/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@
#include <linux/io.h>
#include <linux/serial_reg.h>

#include <cobalt.h>

#define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000))

void prom_putchar(char c)
{
if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
return;

while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE))
;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/pci/fixup-cobalt.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static char irq_tab_raq2[] __initdata = {

int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
if (cobalt_board_id < COBALT_BRD_ID_QUBE2)
return irq_tab_qube1[slot];

if (cobalt_board_id == COBALT_BRD_ID_RAQ2)
Expand Down
17 changes: 14 additions & 3 deletions trunk/arch/powerpc/kernel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ int iommu_map_sg(struct iommu_table *tbl, struct scatterlist *sglist,
unsigned long flags;
struct scatterlist *s, *outs, *segstart;
int outcount, incount, i;
unsigned int align;
unsigned long handle;

BUG_ON(direction == DMA_NONE);
Expand Down Expand Up @@ -309,7 +310,12 @@ int iommu_map_sg(struct iommu_table *tbl, struct scatterlist *sglist,
/* Allocate iommu entries for that segment */
vaddr = (unsigned long) sg_virt(s);
npages = iommu_num_pages(vaddr, slen);
entry = iommu_range_alloc(tbl, npages, &handle, mask >> IOMMU_PAGE_SHIFT, 0);
align = 0;
if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && slen >= PAGE_SIZE &&
(vaddr & ~PAGE_MASK) == 0)
align = PAGE_SHIFT - IOMMU_PAGE_SHIFT;
entry = iommu_range_alloc(tbl, npages, &handle,
mask >> IOMMU_PAGE_SHIFT, align);

DBG(" - vaddr: %lx, size: %lx\n", vaddr, slen);

Expand Down Expand Up @@ -572,16 +578,21 @@ dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
{
dma_addr_t dma_handle = DMA_ERROR_CODE;
unsigned long uaddr;
unsigned int npages;
unsigned int npages, align;

BUG_ON(direction == DMA_NONE);

uaddr = (unsigned long)vaddr;
npages = iommu_num_pages(uaddr, size);

if (tbl) {
align = 0;
if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && size >= PAGE_SIZE &&
((unsigned long)vaddr & ~PAGE_MASK) == 0)
align = PAGE_SHIFT - IOMMU_PAGE_SHIFT;

dma_handle = iommu_alloc(tbl, vaddr, npages, direction,
mask >> IOMMU_PAGE_SHIFT, 0);
mask >> IOMMU_PAGE_SHIFT, align);
if (dma_handle == DMA_ERROR_CODE) {
if (printk_ratelimit()) {
printk(KERN_INFO "iommu_alloc failed, "
Expand Down
51 changes: 0 additions & 51 deletions trunk/drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ enum {
ich8_2port_sata,
ich8m_apple_sata_ahci, /* locks up on second port enable */
tolapai_sata_ahci,
piix_pata_vmw, /* PIIX4 for VMware, spurious DMA_ERR */

/* constants for mapping table */
P0 = 0, /* port 0 */
Expand Down Expand Up @@ -166,7 +165,6 @@ static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev);
static void piix_set_dmamode(struct ata_port *ap, struct ata_device *adev);
static void ich_set_dmamode(struct ata_port *ap, struct ata_device *adev);
static int ich_pata_cable_detect(struct ata_port *ap);
static u8 piix_vmw_bmdma_status(struct ata_port *ap);
#ifdef CONFIG_PM
static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
static int piix_pci_device_resume(struct pci_dev *pdev);
Expand All @@ -177,8 +175,6 @@ static unsigned int in_module_init = 1;
static const struct pci_device_id piix_pci_tbl[] = {
/* Intel PIIX3 for the 430HX etc */
{ 0x8086, 0x7010, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_mwdma },
/* VMware ICH4 */
{ 0x8086, 0x7111, 0x15ad, 0x1976, 0, 0, piix_pata_vmw },
/* Intel PIIX4 for the 430TX/440BX/MX chipset: UDMA 33 */
/* Also PIIX4E (fn3 rev 2) and PIIX4M (fn3 rev 3) */
{ 0x8086, 0x7111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
Expand Down Expand Up @@ -387,38 +383,6 @@ static const struct ata_port_operations piix_sata_ops = {
.port_start = ata_port_start,
};

static const struct ata_port_operations piix_vmw_ops = {
.set_piomode = piix_set_piomode,
.set_dmamode = piix_set_dmamode,
.mode_filter = ata_pci_default_filter,

.tf_load = ata_tf_load,
.tf_read = ata_tf_read,
.check_status = ata_check_status,
.exec_command = ata_exec_command,
.dev_select = ata_std_dev_select,

.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
.bmdma_stop = ata_bmdma_stop,
.bmdma_status = piix_vmw_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.data_xfer = ata_data_xfer,

.freeze = ata_bmdma_freeze,
.thaw = ata_bmdma_thaw,
.error_handler = piix_pata_error_handler,
.post_internal_cmd = ata_bmdma_post_internal_cmd,
.cable_detect = ata_cable_40wire,

.irq_handler = ata_interrupt,
.irq_clear = ata_bmdma_irq_clear,
.irq_on = ata_irq_on,

.port_start = ata_port_start,
};

static const struct piix_map_db ich5_map_db = {
.mask = 0x7,
.port_enable = 0x3,
Expand Down Expand Up @@ -659,16 +623,6 @@ static struct ata_port_info piix_port_info[] = {
.port_ops = &piix_sata_ops,
},

[piix_pata_vmw] =
{
.sht = &piix_sht,
.flags = PIIX_PATA_FLAGS,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
.udma_mask = ATA_UDMA_MASK_40C,
.port_ops = &piix_vmw_ops,
},

};

static struct pci_bits piix_enable_bits[] = {
Expand Down Expand Up @@ -1181,11 +1135,6 @@ static int piix_pci_device_resume(struct pci_dev *pdev)
}
#endif

static u8 piix_vmw_bmdma_status(struct ata_port *ap)
{
return ata_bmdma_status(ap) & ~ATA_DMA_ERR;
}

#define AHCI_PCI_BAR 5
#define AHCI_GLOBAL_CTL 0x04
#define AHCI_ENABLE (1 << 31)
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,6 @@ static void ata_scsi_dev_config(struct scsi_device *sdev,
blk_queue_max_hw_segments(q, q->max_hw_segments - 1);
}

if (dev->class == ATA_DEV_ATA)
sdev->manage_start_stop = 1;

if (dev->flags & ATA_DFLAG_AN)
set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);

Expand Down Expand Up @@ -875,6 +872,9 @@ int ata_scsi_slave_config(struct scsi_device *sdev)

ata_scsi_sdev_config(sdev);

if (dev->class == ATA_DEV_ATA)
sdev->manage_start_stop = 1;

if (dev)
ata_scsi_dev_config(sdev, dev);

Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/ata/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ static struct sil24_cerr_info {
[PORT_CERR_PKT_PROT] = { AC_ERR_HSM, ATA_EH_SOFTRESET,
"invalid data directon for ATAPI CDB" },
[PORT_CERR_SGT_BOUNDARY] = { AC_ERR_SYSTEM, ATA_EH_SOFTRESET,
"SGT not on qword boundary" },
"SGT no on qword boundary" },
[PORT_CERR_SGT_TGTABRT] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET,
"PCI target abort while fetching SGT" },
[PORT_CERR_SGT_MSTABRT] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET,
Expand Down Expand Up @@ -1094,13 +1094,10 @@ static void sil24_error_intr(struct ata_port *ap)
if (ci && ci->desc) {
err_mask |= ci->err_mask;
action |= ci->action;
if (action & ATA_EH_RESET_MASK)
freeze = 1;
ata_ehi_push_desc(ehi, "%s", ci->desc);
} else {
err_mask |= AC_ERR_OTHER;
action |= ATA_EH_SOFTRESET;
freeze = 1;
ata_ehi_push_desc(ehi, "unknown command error %d",
cerr);
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
if (wbc->nr_to_write <= 0)
break;
}
if (!list_empty(&sb->s_more_io))
wbc->more_io = 1;
return; /* Leave any unwritten inodes on s_io */
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-mips/cacheops.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#define Page_Invalidate_T 0x16

/*
* R10000-specific cacheops
* R1000-specific cacheops
*
* Cacheops 0x02, 0x06, 0x0a, 0x0c-0x0e, 0x16, 0x1a and 0x1e are unused.
* Most of the _S cacheops are identical to the R4000SC _SD cacheops.
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/writeback.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ struct writeback_control {
unsigned for_reclaim:1; /* Invoked from the page allocator */
unsigned for_writepages:1; /* This is a writepages() call */
unsigned range_cyclic:1; /* range_start is cyclic */
unsigned more_io:1; /* more io to be dispatched */
};

/*
Expand Down
9 changes: 6 additions & 3 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,15 +558,17 @@ static void background_writeout(unsigned long _min_pages)
global_page_state(NR_UNSTABLE_NFS) < background_thresh
&& min_pages <= 0)
break;
wbc.more_io = 0;
wbc.encountered_congestion = 0;
wbc.nr_to_write = MAX_WRITEBACK_PAGES;
wbc.pages_skipped = 0;
writeback_inodes(&wbc);
min_pages -= MAX_WRITEBACK_PAGES - wbc.nr_to_write;
if (wbc.nr_to_write > 0 || wbc.pages_skipped > 0) {
/* Wrote less than expected */
congestion_wait(WRITE, HZ/10);
if (!wbc.encountered_congestion)
if (wbc.encountered_congestion || wbc.more_io)
congestion_wait(WRITE, HZ/10);
else
break;
}
}
Expand Down Expand Up @@ -631,11 +633,12 @@ static void wb_kupdate(unsigned long arg)
global_page_state(NR_UNSTABLE_NFS) +
(inodes_stat.nr_inodes - inodes_stat.nr_unused);
while (nr_to_write > 0) {
wbc.more_io = 0;
wbc.encountered_congestion = 0;
wbc.nr_to_write = MAX_WRITEBACK_PAGES;
writeback_inodes(&wbc);
if (wbc.nr_to_write > 0) {
if (wbc.encountered_congestion)
if (wbc.encountered_congestion || wbc.more_io)
congestion_wait(WRITE, HZ/10);
else
break; /* All the old data is written */
Expand Down

0 comments on commit 1b28f15

Please sign in to comment.