Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2003-10-17 08:44:51 +1000
committerAnton Blanchard <anton@samba.org>2003-10-17 08:44:51 +1000
commitcb57e089f961eb8abe3531cf29c0bda65b2ffb52 (patch)
treedaeb1880fd4023e2f23a83ed40af6aab8e40b869
parent83161bf95c31fe6f962e3ead2326ea8c2f1abb81 (diff)
parent535a8a4c73cf48e75599755b2424fb5073c84c54 (diff)
Merge samba.org:/home/anton/ppc64/linux-2.5
into samba.org:/home/anton/ppc64/for-linus-ppc64
-rw-r--r--arch/arm/lib/div64.S2
-rw-r--r--arch/i386/kernel/apic.c19
-rw-r--r--drivers/ide/pci/aec62xx.c4
-rw-r--r--drivers/ide/pci/cmd64x.c4
-rw-r--r--drivers/ide/pci/hpt34x.c12
-rw-r--r--drivers/ide/pci/hpt366.c4
-rw-r--r--drivers/ide/pci/it8172.c4
-rw-r--r--drivers/ide/pci/pdc202xx_new.c4
-rw-r--r--drivers/ide/pci/pdc202xx_old.c4
-rw-r--r--drivers/ide/pci/piix.c4
-rw-r--r--drivers/ide/pci/serverworks.c4
-rw-r--r--drivers/ide/pci/siimage.c4
-rw-r--r--drivers/ide/pci/sis5513.c4
-rw-r--r--drivers/ide/pci/slc90e66.c4
14 files changed, 57 insertions, 20 deletions
diff --git a/arch/arm/lib/div64.S b/arch/arm/lib/div64.S
index b3f42097690d..0870b84c845b 100644
--- a/arch/arm/lib/div64.S
+++ b/arch/arm/lib/div64.S
@@ -30,6 +30,8 @@ ENTRY(do_div64)
moveq lr, #1 @ only divide low bits
moveq nh, onl
+ tst dh, #0x80000000
+ bne 2f
1: cmp nh, dh
bls 2f
add lr, lr, #1
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 2639c2026700..97ac569c8b5e 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -533,14 +533,19 @@ static int lapic_resume(struct sys_device *dev)
if (!apic_pm_state.active)
return 0;
- /* XXX: Pavel needs this for S3 resume, but can't explain why */
- set_fixmap_nocache(FIX_APIC_BASE, APIC_DEFAULT_PHYS_BASE);
-
local_irq_save(flags);
+
+ /*
+ * Make sure the APICBASE points to the right address
+ *
+ * FIXME! This will be wrong if we ever support suspend on
+ * SMP! We'll need to do this as part of the CPU restore!
+ */
rdmsr(MSR_IA32_APICBASE, l, h);
l &= ~MSR_IA32_APICBASE_BASE;
- l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE;
+ l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr;
wrmsr(MSR_IA32_APICBASE, l, h);
+
apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED);
apic_write(APIC_ID, apic_pm_state.apic_id);
apic_write(APIC_DFR, apic_pm_state.apic_dfr);
@@ -680,6 +685,12 @@ static int __init detect_init_APIC (void)
}
set_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
+
+ /* The BIOS may have set up the APIC at some other address */
+ rdmsr(MSR_IA32_APICBASE, l, h);
+ if (l & MSR_IA32_APICBASE_ENABLE)
+ mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
+
if (nmi_watchdog != NMI_NONE)
nmi_watchdog = NMI_LOCAL_APIC;
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index 9b67e7897fc4..2b8fe041babe 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -355,13 +355,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
aec62xx_tune_drive(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
static int aec62xx_irq_timeout (ide_drive_t *drive)
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 4559feb89ebc..99a80803712b 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -484,13 +484,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
config_chipset_for_pio(drive, 1);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
static int cmd64x_alt_dma_status (struct pci_dev *dev)
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
index b43ed1a60630..f4da1f9a2bfd 100644
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -215,17 +215,19 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+#ifndef CONFIG_HPT34X_AUTODMA
+ return hwif->ide_dma_off_quietly(drive);
+#else
+ return hwif->ide_dma_on(drive);
+#endif
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
hpt34x_tune_drive(drive, 255);
return hwif->ide_dma_off_quietly(drive);
}
-
-#ifndef CONFIG_HPT34X_AUTODMA
- return hwif->ide_dma_off_quietly(drive);
-#endif /* CONFIG_HPT34X_AUTODMA */
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
/*
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 6d36d39192dc..4924eebca1e7 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -538,13 +538,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
hpt3xx_tune_drive(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
/*
diff --git a/drivers/ide/pci/it8172.c b/drivers/ide/pci/it8172.c
index 6b86cd033822..525abe5f201d 100644
--- a/drivers/ide/pci/it8172.c
+++ b/drivers/ide/pci/it8172.c
@@ -227,13 +227,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
it8172_tune_drive(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
static unsigned int __init init_chipset_it8172 (struct pci_dev *dev, const char *name)
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index 7c60301aa938..998c3f992971 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -414,13 +414,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
hwif->tuneproc(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
static int pdcnew_quirkproc (ide_drive_t *drive)
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 3ab58903e6a0..51c59cec96b0 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -518,13 +518,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
hwif->tuneproc(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
static int pdc202xx_quirkproc (ide_drive_t *drive)
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index 3ed1a33ab88a..e8679d9cab46 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -588,13 +588,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
hwif->tuneproc(drive, 255);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
/**
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index 513a0c5651d0..66b8d9b4f5fb 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -484,6 +484,7 @@ try_dma_modes:
} else {
goto no_dma_set;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
@@ -491,7 +492,8 @@ no_dma_set:
// hwif->tuneproc(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
/* This can go soon */
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 7f59c39beea0..9f56898c23f1 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -515,13 +515,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
config_chipset_for_pio(drive, 1);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
/* returns 1 if dma irq issued, 0 otherwise */
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 654bad2ce4ee..3068287aefb6 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -696,13 +696,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
sis5513_tune_drive(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
/* initiates/aborts (U)DMA read/write operations on a drive. */
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index ae96a90fcc6f..1f01228f5bb5 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -301,13 +301,15 @@ try_dma_modes:
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
hwif->tuneproc(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}
#endif /* CONFIG_BLK_DEV_IDEDMA */