My main problem is that attempting to scan on the far side of the PCI
bridge causes infinite PYXIS machine checks. Instead of figuring out
how to fix it, I just hacked out the recursion in pci_scan_bus(), effectively
disabling the secondary bus. Any suggestions for a real fix?
One annoying thing, from arch/alpha/Makefile:
CFLAGS := $(CFLAGS) -Wa,-m21164a -DBWX_USABLE
The presence of another comma in the CFLAGS line confuses the FILES_FLAGS
stuff at the bottom of Rules.make thinking that it must always recompile
every file. I stuck "-m21164a" in my gcc specs file and removed it from
the CFLAGS, but there must be a better way.
Symbol pci_devices is exported twice, requiring a few lines to be deleted
from arch/alpha/kernel/alpha_ksyms.c. pcibios_{init,fixup} minor hacks
to be compatible with the new pci handling, and little bug in fs/ext2/file.c.
Patch attached, but I wouldn't recommend relying on it. Thanks for any
suggestions on real fixes.
-- Pete
----------
diff -u --recursive --new-file linux-2.1.93-stock/Makefile linux-2.1.93/Makefile
--- linux-2.1.93-stock/Makefile Thu Apr 2 21:23:00 1998
+++ linux-2.1.93/Makefile Tue Apr 7 07:35:36 1998
@@ -11,7 +11,7 @@
#
# For UP operations COMMENT THIS OUT, simply setting SMP = 0 won't work
#
-SMP = 1
+# SMP = 1
.EXPORT_ALL_VARIABLES:
diff -u --recursive --new-file linux-2.1.93-stock/arch/alpha/Makefile linux-2.1.93/arch/alpha/Makefile
--- linux-2.1.93-stock/arch/alpha/Makefile Mon Mar 30 00:21:39 1998
+++ linux-2.1.93/arch/alpha/Makefile Tue Apr 7 09:12:27 1998
@@ -37,7 +37,11 @@
$(shell rm -f ./GAS_VER)
ifneq ($(OLD_GAS),yes)
- CFLAGS := $(CFLAGS) -Wa,-m21164a -DBWX_USABLE
+# presence of "," in CFLAGS screws up make dependencies, and specification
+# of 21164a seems default for my machine at least. Specs file doesn't say
+# it, but I put it in just to make sure. --pw, 4/7/98
+# CFLAGS := $(CFLAGS) -Wa,-m21164a -DBWX_USABLE
+ CFLAGS := $(CFLAGS) -DBWX_USABLE
# if PYXIS, then enable use of BWIO space
ifeq ($(CONFIG_ALPHA_PYXIS),y)
diff -u --recursive --new-file linux-2.1.93-stock/arch/alpha/kernel/alpha_ksyms.c linux-2.1.93/arch/alpha/kernel/alpha_ksyms.c
--- linux-2.1.93-stock/arch/alpha/kernel/alpha_ksyms.c Tue Mar 17 21:15:40 1998
+++ linux-2.1.93/arch/alpha/kernel/alpha_ksyms.c Tue Apr 7 09:21:28 1998
@@ -148,6 +148,8 @@
EXPORT_SYMBOL_NOVERS(memcpy);
EXPORT_SYMBOL_NOVERS(memset);
+#if 0 /* already in drivers/pci/pcisyms.c --pw */
#if CONFIG_PCI
EXPORT_SYMBOL(pci_devices);
+#endif
#endif
diff -u --recursive --new-file linux-2.1.93-stock/arch/alpha/kernel/bios32.c linux-2.1.93/arch/alpha/kernel/bios32.c
--- linux-2.1.93-stock/arch/alpha/kernel/bios32.c Thu Apr 2 09:12:22 1998
+++ linux-2.1.93/arch/alpha/kernel/bios32.c Mon Apr 6 19:05:44 1998
@@ -245,6 +245,8 @@
* Layout memory and I/O for a device:
*/
#define MAX(val1, val2) ((val1) > (val2) ? (val1) : (val2))
+/* --pw */
+#define PCI_BASE_INDEX(o) (((o)-PCI_BASE_ADDRESS_0)>>2)
static void layout_dev(struct pci_dev *dev)
{
@@ -560,15 +562,22 @@
}
-unsigned long pcibios_init(unsigned long mem_start,
- unsigned long mem_end)
+#if 0 /* --pw */
+unsigned long
+pcibios_init(unsigned long mem_start, unsigned long mem_end)
+#else
+void
+pcibios_init()
+#endif
{
printk("Alpha PCI BIOS32 revision %x.%02x\n", MAJOR_REV, MINOR_REV);
#if !PCI_MODIFY
printk("...NOT modifying existing (SRM) PCI configuration\n");
#endif
+#if 0 /* --pw */
return mem_start;
+#endif
}
/*
@@ -1951,8 +1960,13 @@
extern void tga_console_init(void);
#endif /* CONFIG_TGA_CONSOLE */
+#if 0 /* --pw */
unsigned long __init
pcibios_fixup(unsigned long mem_start, unsigned long mem_end)
+#else
+void __init
+pcibios_fixup(void)
+#endif
{
struct pci_bus *cur;
@@ -2031,7 +2045,9 @@
#endif
#endif
+#if 0 /* --pw */
return mem_start;
+#endif
}
diff -u --recursive --new-file linux-2.1.93-stock/drivers/pci/pci.c linux-2.1.93/drivers/pci/pci.c
--- linux-2.1.93-stock/drivers/pci/pci.c Mon Apr 6 14:01:34 1998
+++ linux-2.1.93/drivers/pci/pci.c Tue Apr 7 10:01:34 1998
@@ -21,7 +21,8 @@
struct pci_dev *pci_devices = NULL;
static struct pci_dev **pci_last_dev_p = &pci_devices;
-#undef DEBUG
+/* --pw */
+#define DEBUG
const char *pcibios_strerror(int error)
{
@@ -101,7 +102,11 @@
int reg;
#ifdef DEBUG
- printk("pci_scan_bus for bus %d\n", bus->number);
+ if (bus->number == 1) {
+ max = bus->secondary;
+ printk("pw: bus 1 scan, returning nop %d\n", max);
+ return max;
+ }
#endif
max = bus->secondary;
diff -u --recursive --new-file linux-2.1.93-stock/fs/ext2/file.c linux-2.1.93/fs/ext2/file.c
--- linux-2.1.93-stock/fs/ext2/file.c Thu Apr 2 13:39:51 1998
+++ linux-2.1.93/fs/ext2/file.c Mon Apr 6 18:50:10 1998
@@ -205,6 +205,7 @@
return -EFBIG;
}
#else
+ {
off_t max = ext2_max_sizes[EXT2_BLOCK_SIZE_BITS(sb)];
if (pos + count > max) {
@@ -212,6 +213,7 @@
if (!count)
return -EFBIG;
}
+ } /* more braces --pw */
if (((pos + count) >> 32) &&
!(sb->u.ext2_sb.s_es->s_feature_ro_compat &
cpu_to_le32(EXT2_FEATURE_RO_COMPAT_LARGE_FILE))) {