diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/alpha/kernel/core_cia.c linux.pre11.5/arch/alpha/kernel/core_cia.c --- linux.pre11.4/arch/alpha/kernel/core_cia.c Fri Aug 6 18:49:40 1999 +++ linux.pre11.5/arch/alpha/kernel/core_cia.c Fri Aug 6 20:32:56 1999 @@ -31,30 +31,13 @@ */ /* - * Machine check reasons. Defined according to PALcode sources - * (osf.h and platform.h). - */ -#define MCHK_K_TPERR 0x0080 -#define MCHK_K_TCPERR 0x0082 -#define MCHK_K_HERR 0x0084 -#define MCHK_K_ECC_C 0x0086 -#define MCHK_K_ECC_NC 0x0088 -#define MCHK_K_OS_BUGCHECK 0x008A -#define MCHK_K_PAL_BUGCHECK 0x0090 - -/* * BIOS32-style PCI interface: */ -#define DEBUG_MCHECK 0 +#define DEBUG_MCHECK 0 /* 0 = minimal, 1 = debug, 2 = dump */ + #define DEBUG_CONFIG 0 -/* #define DEBUG_DUMP_REGS */ -#if DEBUG_MCHECK -# define DBGM(args) printk args -#else -# define DBGM(args) -#endif #if DEBUG_CONFIG # define DBGC(args) printk args #else @@ -533,19 +516,25 @@ case 0: /* * Set up the PCI->physical memory translation windows. - * For now, windows 1,2 and 3 are disabled. In the future, + * For now, windows 2 and 3 are disabled. In the future, * we may want to use them to do scatter/gather DMA. * * Window 0 goes at 1 GB and is 1 GB large. + * Window 1 goes at 2 GB and is 1 GB large. */ + *(vuip)CIA_IOC_PCI_W0_BASE = CIA_DMA_WIN0_BASE_DEFAULT | 1U; + *(vuip)CIA_IOC_PCI_W0_MASK = (CIA_DMA_WIN0_SIZE_DEFAULT - 1) & + 0xfff00000U; + *(vuip)CIA_IOC_PCI_T0_BASE = CIA_DMA_WIN0_TRAN_DEFAULT >> 2; + + *(vuip)CIA_IOC_PCI_W1_BASE = CIA_DMA_WIN1_BASE_DEFAULT | 1U; + *(vuip)CIA_IOC_PCI_W1_MASK = (CIA_DMA_WIN1_SIZE_DEFAULT - 1) & + 0xfff00000U; + *(vuip)CIA_IOC_PCI_T1_BASE = CIA_DMA_WIN1_TRAN_DEFAULT >> 2; - *(vuip)CIA_IOC_PCI_W0_BASE = 1U | (CIA_DMA_WIN_BASE_DEFAULT & 0xfff00000U); - *(vuip)CIA_IOC_PCI_W0_MASK = (CIA_DMA_WIN_SIZE_DEFAULT - 1) & 0xfff00000U; - *(vuip)CIA_IOC_PCI_T0_BASE = 0; - - *(vuip)CIA_IOC_PCI_W1_BASE = 0x0; *(vuip)CIA_IOC_PCI_W2_BASE = 0x0; *(vuip)CIA_IOC_PCI_W3_BASE = 0x0; + mb(); break; } @@ -593,16 +582,6 @@ } } -static int -cia_pci_clr_err(void) -{ - CIA_jd = *(vuip)CIA_IOC_CIA_ERR; - DBGM(("CIA_pci_clr_err: CIA ERR after read 0x%x\n", CIA_jd)); - *(vuip)CIA_IOC_CIA_ERR = CIA_jd; - mb(); - return 0; -} - void cia_machine_check(unsigned long vector, unsigned long la_ptr, struct pt_regs * regs) @@ -610,10 +589,6 @@ struct el_common *mchk_header; struct el_CIA_procdata *mchk_procdata; struct el_CIA_sysdata_mcheck *mchk_sysdata; - unsigned long * ptr; - const char * reason; - char buf[128]; - long i; mchk_header = (struct el_common *)la_ptr; @@ -623,98 +598,22 @@ mchk_sysdata = (struct el_CIA_sysdata_mcheck *) (la_ptr + mchk_header->sys_offset); - DBGM(("cia_machine_check: vector=0x%lx la_ptr=0x%lx\n", - vector, la_ptr)); - DBGM((" pc=0x%lx size=0x%x procoffset=0x%x " - "sysoffset 0x%x\n", regs->pc, mchk_header->size, - mchk_header->proc_offset, mchk_header->sys_offset)); - DBGM(("cia_machine_check: expected %d DCSR 0x%lx PEAR 0x%lx\n", - CIA_mcheck_expected, mchk_sysdata->epic_dcsr, - mchk_sysdata->epic_pear)); - -#if DEBUG_MCHECK - { - unsigned long *ptr; - int i; - - ptr = (unsigned long *)la_ptr; - for (i = 0; i < mchk_header->size / sizeof(long); i += 2) { - printk(" +%lx %lx %lx\n", i*sizeof(long), - ptr[i], ptr[i+1]); - } - } -#endif - - /* - * Check if machine check is due to a badaddr() and if so, - * ignore the machine check. - */ + /* Clear the error before any reporting. */ mb(); mb(); /* magic */ - if (CIA_mcheck_expected) { - DBGM(("CIA machine check expected\n")); - CIA_mcheck_expected = 0; - CIA_mcheck_taken = 1; - mb(); - mb(); /* magic */ - draina(); - cia_pci_clr_err(); - wrmces(0x7); - mb(); - return; - } + draina(); - switch ((unsigned int) mchk_header->code) { - case MCHK_K_TPERR: reason = "tag parity error"; break; - case MCHK_K_TCPERR: reason = "tag control parity error"; break; - case MCHK_K_HERR: reason = "generic hard error"; break; - case MCHK_K_ECC_C: reason = "correctable ECC error"; break; - case MCHK_K_ECC_NC: reason = "uncorrectable ECC error"; break; - case MCHK_K_OS_BUGCHECK: reason = "OS-specific PAL bugcheck"; break; - case MCHK_K_PAL_BUGCHECK: reason = "callsys in kernel mode"; break; - case 0x96: reason = "i-cache read retryable error"; break; - case 0x98: reason = "processor detected hard error"; break; - - /* System specific (these are for Alcor, at least): */ - case 0x203: reason = "system detected uncorrectable ECC error"; break; - case 0x205: reason = "parity error detected by CIA"; break; - case 0x207: reason = "non-existent memory error"; break; - case 0x209: reason = "PCI SERR detected"; break; - case 0x20b: reason = "PCI data parity error detected"; break; - case 0x20d: reason = "PCI address parity error detected"; break; - case 0x20f: reason = "PCI master abort error"; break; - case 0x211: reason = "PCI target abort error"; break; - case 0x213: reason = "scatter/gather PTE invalid error"; break; - case 0x215: reason = "flash ROM write error"; break; - case 0x217: reason = "IOA timeout detected"; break; - case 0x219: reason = "IOCHK#, EISA add-in board parity or other catastrophic error"; break; - case 0x21b: reason = "EISA fail-safe timer timeout"; break; - case 0x21d: reason = "EISA bus time-out"; break; - case 0x21f: reason = "EISA software generated NMI"; break; - case 0x221: reason = "unexpected ev5 IRQ[3] interrupt"; break; - default: - sprintf(buf, "reason for machine-check unknown (0x%x)", - (unsigned int) mchk_header->code); - reason = buf; - break; - } + CIA_jd = *(vuip)CIA_IOC_CIA_ERR; + *(vuip)CIA_IOC_CIA_ERR = CIA_jd; mb(); - mb(); /* magic */ - draina(); - cia_pci_clr_err(); + CIA_jd = *(vuip)CIA_IOC_CIA_ERR; /* re-read to force write */ + wrmces(rdmces()); /* reset machine check pending flag */ mb(); - printk(KERN_CRIT "CIA machine check: %s%s\n", - reason, mchk_header->retry ? " (retryable)" : ""); - printk(KERN_CRIT " vector=0x%lx la_ptr=0x%lx pc=0x%lx\n", - vector, la_ptr, regs->pc); - - /* Dump the logout area to give all info. */ - - ptr = (unsigned long *)la_ptr; - for (i = 0; i < mchk_header->size / sizeof(long); i += 2) { - printk(KERN_CRIT " +%8lx %016lx %016lx\n", - i*sizeof(long), ptr[i], ptr[i+1]); - } + process_mcheck_info(vector, la_ptr, regs, "CIA", + DEBUG_MCHECK, CIA_mcheck_expected); + + CIA_mcheck_expected = 0; + CIA_mcheck_taken = 1; } diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/alpha/kernel/core_mcpcia.c linux.pre11.5/arch/alpha/kernel/core_mcpcia.c --- linux.pre11.4/arch/alpha/kernel/core_mcpcia.c Fri Aug 6 18:38:11 1999 +++ linux.pre11.5/arch/alpha/kernel/core_mcpcia.c Fri Aug 6 20:32:56 1999 @@ -45,17 +45,11 @@ # define DBG_CFG(args) #endif - -#define DEBUG_MCHECK - -#ifdef DEBUG_MCHECK -# define DBG_MCK(args) printk args -#else -# define DBG_MCK(args) -#endif +#define DEBUG_MCHECK 0 /* 0 = minimal, 1 = debug, 2 = dump */ static volatile unsigned int MCPCIA_mcheck_expected[NR_CPUS]; static volatile unsigned int MCPCIA_mcheck_taken[NR_CPUS]; +static volatile unsigned int MCPCIA_mcheck_hose[NR_CPUS]; static unsigned int MCPCIA_jd[NR_CPUS]; #define MCPCIA_MAX_HOSES 2 @@ -128,6 +122,7 @@ draina(); MCPCIA_mcheck_expected[cpu] = 1; MCPCIA_mcheck_taken[cpu] = 0; + MCPCIA_mcheck_hose[cpu] = hoseno; mb(); /* Access configuration space. */ @@ -169,6 +164,7 @@ draina(); MCPCIA_mcheck_expected[cpu] = 1; + MCPCIA_mcheck_hose[cpu] = hoseno; mb(); /* Access configuration space. */ @@ -554,19 +550,12 @@ } } -static int -mcpcia_pci_clr_err(int h) +static void +mcpcia_pci_clr_err(int cpu, int hose) { - unsigned int cpu = smp_processor_id(); - - MCPCIA_jd[cpu] = *(vuip)MCPCIA_CAP_ERR(h); -#if 0 - DBG_MCK(("MCPCIA_pci_clr_err: MCPCIA CAP_ERR(%d) after read 0x%x\n", - h, MCPCIA_jd[cpu])); -#endif - *(vuip)MCPCIA_CAP_ERR(h) = 0xffffffff; mb(); /* clear them all */ - MCPCIA_jd[cpu] = *(vuip)MCPCIA_CAP_ERR(h); - return 0; + MCPCIA_jd[cpu] = *(vuip)MCPCIA_CAP_ERR(hose); + *(vuip)MCPCIA_CAP_ERR(hose) = 0xffffffff; mb(); /* clear them all */ + MCPCIA_jd[cpu] = *(vuip)MCPCIA_CAP_ERR(hose); /* read to force write */ } static void @@ -642,70 +631,36 @@ } void -mcpcia_machine_check(unsigned long type, unsigned long la_ptr, +mcpcia_machine_check(unsigned long vector, unsigned long la_ptr, struct pt_regs * regs) { -#if 0 - printk("mcpcia machine check ignored\n") ; -#else struct el_common *mchk_header; struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout; unsigned int cpu = smp_processor_id(); - int h = 0; mchk_header = (struct el_common *)la_ptr; mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr; -#if 0 - DBG_MCK(("mcpcia_machine_check: type=0x%lx la_ptr=0x%lx\n", - type, la_ptr)); - DBG_MCK(("\t\t pc=0x%lx size=0x%x procoffset=0x%x sysoffset 0x%x\n", - regs->pc, mchk_header->size, mchk_header->proc_offset, - mchk_header->sys_offset)); -#endif - /* - * Check if machine check is due to a badaddr() and if so, - * ignore the machine check. - */ mb(); mb(); /* magic */ - if (MCPCIA_mcheck_expected[cpu]) { -#if 0 - DBG_MCK(("MCPCIA machine check expected\n")); -#endif - MCPCIA_mcheck_expected[cpu] = 0; - MCPCIA_mcheck_taken[cpu] = 1; - mb(); - mb(); /* magic */ - draina(); - mcpcia_pci_clr_err(h); - wrmces(0x7); - mb(); - } -#if 1 + draina(); + if (MCPCIA_mcheck_expected[cpu]) + mcpcia_pci_clr_err(cpu, MCPCIA_mcheck_hose[cpu]); else { - printk("MCPCIA machine check NOT expected on CPU %d\n", cpu); - DBG_MCK(("mcpcia_machine_check: type=0x%lx pc=0x%lx" - " code=0x%lx\n", - type, regs->pc, mchk_header->code)); + /* FIXME: how do we figure out which hose the error was on? */ + mcpcia_pci_clr_err(cpu, 0); + mcpcia_pci_clr_err(cpu, 1); + } + wrmces(0x7); + mb(); - MCPCIA_mcheck_expected[cpu] = 0; - MCPCIA_mcheck_taken[cpu] = 1; - mb(); - mb(); /* magic */ - draina(); - mcpcia_pci_clr_err(h); - wrmces(0x7); - mb(); -#ifdef DEBUG_MCHECK_DUMP - if (type == 0x620) - printk("MCPCIA machine check: system CORRECTABLE!\n"); - else if (type == 0x630) - printk("MCPCIA machine check: processor CORRECTABLE!\n"); - else -#endif /* DEBUG_MCHECK_DUMP */ - mcpcia_print_uncorrectable(mchk_logout); + process_mcheck_info(vector, la_ptr, regs, "MCPCIA", + DEBUG_MCHECK, MCPCIA_mcheck_expected[cpu]); + + if (vector != 0x620 && vector != 0x630) { + mcpcia_print_uncorrectable(mchk_logout); } -#endif -#endif + + MCPCIA_mcheck_expected[cpu] = 0; + MCPCIA_mcheck_taken[cpu] = 1; } diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/alpha/kernel/core_pyxis.c linux.pre11.5/arch/alpha/kernel/core_pyxis.c --- linux.pre11.4/arch/alpha/kernel/core_pyxis.c Fri Aug 6 18:38:11 1999 +++ linux.pre11.5/arch/alpha/kernel/core_pyxis.c Fri Aug 6 20:32:56 1999 @@ -31,8 +31,9 @@ * BIOS32-style PCI interface: */ +#define DEBUG_MCHECK 0 /* 0 = minimum, 1 = debug, 2 = dump */ + #define DEBUG_CONFIG 0 -#define DEBUG_MCHECK 0 #if DEBUG_CONFIG # define DBG_CNF(args) printk args @@ -40,14 +41,6 @@ # define DBG_CNF(args) #endif -#if DEBUG_MCHECK -# define DBG_MCK(args) printk args -# define DEBUG_MCHECK_DUMP -#else -# define DBG_MCK(args) -#endif - - static volatile unsigned int PYXIS_mcheck_expected = 0; static volatile unsigned int PYXIS_mcheck_taken = 0; static unsigned int PYXIS_jd; @@ -432,14 +425,13 @@ * Window 1 goes at 2 GB and is 1 GB large. */ - *(vuip)PYXIS_W0_BASE = PYXIS_DMA_WIN_BASE_DEFAULT | 1U; - *(vuip)PYXIS_W0_MASK = (PYXIS_DMA_WIN_SIZE_DEFAULT - 1) & 0xfff00000U; - *(vuip)PYXIS_T0_BASE = 0; - - *(vuip)PYXIS_W1_BASE = (PYXIS_DMA_WIN_BASE_DEFAULT + - PYXIS_DMA_WIN_SIZE_DEFAULT) | 1U; - *(vuip)PYXIS_W1_MASK = (PYXIS_DMA_WIN_SIZE_DEFAULT - 1) & 0xfff00000U; - *(vuip)PYXIS_T1_BASE = PYXIS_DMA_WIN_SIZE_DEFAULT; + *(vuip)PYXIS_W0_BASE = PYXIS_DMA_WIN0_BASE_DEFAULT | 1U; + *(vuip)PYXIS_W0_MASK = (PYXIS_DMA_WIN0_SIZE_DEFAULT - 1) & 0xfff00000U; + *(vuip)PYXIS_T0_BASE = PYXIS_DMA_WIN0_TRAN_DEFAULT >> 2; + + *(vuip)PYXIS_W1_BASE = PYXIS_DMA_WIN1_BASE_DEFAULT | 1U; + *(vuip)PYXIS_W1_MASK = (PYXIS_DMA_WIN1_SIZE_DEFAULT - 1) & 0xfff00000U; + *(vuip)PYXIS_T1_BASE = PYXIS_DMA_WIN1_TRAN_DEFAULT >> 2; *(vuip)PYXIS_W2_BASE = 0x0 ; *(vuip)PYXIS_W3_BASE = 0x0 ; @@ -530,16 +522,6 @@ pyxis_finish_init_arch(); } -static int -pyxis_pci_clr_err(void) -{ - PYXIS_jd = *(vuip)PYXIS_ERR; - DBG_MCK(("PYXIS_pci_clr_err: PYXIS ERR after read 0x%x\n", PYXIS_jd)); - *(vuip)PYXIS_ERR = 0x0180; mb(); - PYXIS_jd = *(vuip)PYXIS_ERR; /* re-read to force write */ - return 0; -} - void pyxis_machine_check(unsigned long vector, unsigned long la_ptr, struct pt_regs * regs) @@ -552,61 +534,26 @@ mchk_sysdata = (struct el_PYXIS_sysdata_mcheck *) (la_ptr + mchk_header->sys_offset); -#if 0 - DBG_MCK(("pyxis_machine_check: vector=0x%lx la_ptr=0x%lx\n", - vector, la_ptr)); - DBG_MCK(("\t\t pc=0x%lx size=0x%x procoffset=0x%x sysoffset 0x%x\n", - regs->pc, mchk_header->size, mchk_header->proc_offset, - mchk_header->sys_offset)); - DBG_MCK(("pyxis_machine_check: expected %d DCSR 0x%lx PEAR 0x%lx\n", - PYXIS_mcheck_expected, mchk_sysdata->epic_dcsr, - mchk_sysdata->epic_pear)); -#endif + /* Clear the error before reporting anything. */ + mb(); + mb(); /* magic */ + draina(); + + PYXIS_jd = *(vuip)PYXIS_ERR; + *(vuip)PYXIS_ERR = PYXIS_jd; + mb(); + PYXIS_jd = *(vuip)PYXIS_ERR; /* re-read to force write */ + + wrmces(0x7); + mb(); /* - * Check if machine check is due to a badaddr() and if so, - * ignore the machine check. + * See if the machine check is due to a badaddr() and if so, + * ignore it. */ - mb(); - mb(); /* magic */ - if (PYXIS_mcheck_expected) { - DBG_MCK(("PYXIS machine check expected\n")); - PYXIS_mcheck_expected = 0; - PYXIS_mcheck_taken = 1; - mb(); - mb(); /* magic */ - draina(); - pyxis_pci_clr_err(); - wrmces(0x7); - mb(); - } - else { - printk("PYXIS machine check NOT expected\n") ; - DBG_MCK(("pyxis_machine_check: vector=0x%lx la_ptr=0x%lx\n", - vector, la_ptr)); - DBG_MCK(("\t\t pc=0x%lx size=0x%x procoffset=0x%x" - " sysoffset 0x%x\n", - regs->pc, mchk_header->size, mchk_header->proc_offset, - mchk_header->sys_offset)); - PYXIS_mcheck_expected = 0; - PYXIS_mcheck_taken = 1; - mb(); - mb(); /* magic */ - draina(); - pyxis_pci_clr_err(); - wrmces(0x7); - mb(); + process_mcheck_info(vector, la_ptr, regs, "PYXIS", + DEBUG_MCHECK, PYXIS_mcheck_expected); -#ifdef DEBUG_MCHECK_DUMP - { - unsigned long *ptr = (unsigned long *)la_ptr;; - long n = mchk_header->size / (2*sizeof(long)); - - do - printk(" +%lx %lx %lx\n", i*sizeof(long), - ptr[i], ptr[i+1]); - while (--i); - } -#endif - } + PYXIS_mcheck_expected = 0; + PYXIS_mcheck_taken = 1; } diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/alpha/kernel/core_tsunami.c linux.pre11.5/arch/alpha/kernel/core_tsunami.c --- linux.pre11.4/arch/alpha/kernel/core_tsunami.c Fri Aug 6 17:36:42 1999 +++ linux.pre11.5/arch/alpha/kernel/core_tsunami.c Fri Aug 6 20:32:56 1999 @@ -36,20 +36,16 @@ * BIOS32-style PCI interface: */ -#ifdef DEBUG_CONFIG +#define DEBUG_MCHECK 0 /* 0 = minimum, 1 = debug, 2 = dump */ + +#define DEBUG_CONFIG 0 + +#if DEBUG_CONFIG > 0 # define DBG_CFG(args) printk args #else # define DBG_CFG(args) #endif -#define DEBUG_MCHECK -#ifdef DEBUG_MCHECK -# define DBG_MCK(args) printk args -#define DEBUG_MCHECK_DUMP -#else -# define DBG_MCK(args) -#endif - static volatile unsigned int TSUNAMI_mcheck_expected[NR_CPUS]; static volatile unsigned int TSUNAMI_mcheck_taken[NR_CPUS]; static unsigned int TSUNAMI_jd[NR_CPUS]; @@ -302,20 +298,18 @@ * we may want to use them to do scatter/gather DMA. * * Window 0 goes at 1 GB and is 1 GB large, mapping to 0. + * Window 1 goes at 2 GB and is 1 GB large, mapping to 1GB. */ - pchip->wsba[0].csr = 1L | (TSUNAMI_DMA_WIN_BASE_DEFAULT & 0xfff00000U); - pchip->wsm[0].csr = (TSUNAMI_DMA_WIN_SIZE_DEFAULT - 1) & 0xfff00000UL; - pchip->tba[0].csr = 0; - -#if 0 - pchip->wsba[1].csr = 0; -#else - /* make the second window at 2Gb for 1Gb mapping to 1Gb */ - pchip->wsba[1].csr = 1L | ((0x80000000U) & 0xfff00000U); - pchip->wsm[1].csr = (0x40000000UL - 1) & 0xfff00000UL; - pchip->tba[1].csr = 0x40000000; -#endif + pchip->wsba[0].csr = TSUNAMI_DMA_WIN0_BASE_DEFAULT | 1UL; + pchip->wsm[0].csr = (TSUNAMI_DMA_WIN0_SIZE_DEFAULT - 1) & + 0xfff00000UL; + pchip->tba[0].csr = TSUNAMI_DMA_WIN0_TRAN_DEFAULT; + + pchip->wsba[1].csr = TSUNAMI_DMA_WIN1_BASE_DEFAULT | 1UL; + pchip->wsm[1].csr = (TSUNAMI_DMA_WIN1_SIZE_DEFAULT - 1) & + 0xfff00000UL; + pchip->tba[1].csr = TSUNAMI_DMA_WIN1_TRAN_DEFAULT; pchip->wsba[2].csr = 0; pchip->wsba[3].csr = 0; @@ -365,8 +359,8 @@ *mem_start = (*mem_start | 31) + 1; /* Find how many hoses we have, and initialize them. */ + /* TSUNAMI and TYPHOON can have 2, but might only have 1 (DS10) */ tsunami_init_one_pchip(TSUNAMI_pchip0, 0, mem_start); - /* must change this for TYPHOON which may have 4 */ if (TSUNAMI_cchip->csc.csr & 1L<<14) tsunami_init_one_pchip(TSUNAMI_pchip1, 1, mem_start); } @@ -375,8 +369,6 @@ tsunami_pci_clr_err_1(tsunami_pchip *pchip, int cpu) { TSUNAMI_jd[cpu] = pchip->perror.csr; - DBG_MCK(("TSUNAMI_pci_clr_err: PERROR after read 0x%x\n", - TSUNAMI_jd[cpu])); pchip->perror.csr = 0x040; mb(); TSUNAMI_jd[cpu] = pchip->perror.csr; @@ -386,10 +378,13 @@ tsunami_pci_clr_err(void) { int cpu = smp_processor_id(); + tsunami_pci_clr_err_1(TSUNAMI_pchip0, cpu); - /* must change this for TYPHOON which may have 4 */ + + /* TSUNAMI and TYPHOON can have 2, but might only have 1 (DS10) */ if (TSUNAMI_cchip->csc.csr & 1L<<14) tsunami_pci_clr_err_1(TSUNAMI_pchip1, cpu); + return 0; } @@ -397,9 +392,6 @@ tsunami_machine_check(unsigned long vector, unsigned long la_ptr, struct pt_regs * regs) { -#if 0 - printk("TSUNAMI machine check ignored\n") ; -#else struct el_common *mchk_header; struct el_TSUNAMI_sysdata_mcheck *mchk_sysdata; unsigned int cpu = smp_processor_id(); @@ -410,61 +402,21 @@ mchk_sysdata = (struct el_TSUNAMI_sysdata_mcheck *) (la_ptr + mchk_header->sys_offset); -#if 0 - DBG_MCK(("tsunami_machine_check: vector=0x%lx la_ptr=0x%lx\n", - vector, la_ptr)); - DBG_MCK(("\t\t pc=0x%lx size=0x%x procoffset=0x%x sysoffset 0x%x\n", - regs->pc, mchk_header->size, mchk_header->proc_offset, - mchk_header->sys_offset)); - DBG_MCK(("tsunami_machine_check: expected %d DCSR 0x%lx PEAR 0x%lx\n", - TSUNAMI_mcheck_expected[cpu], mchk_sysdata->epic_dcsr, - mchk_sysdata->epic_pear)); -#endif -#ifdef DEBUG_MCHECK_DUMP - { - unsigned long *ptr; - int i; + /* Clear error before any reporting. */ + mb(); + mb(); /* magic */ + draina(); + tsunami_pci_clr_err(); + wrmces(0x7); + mb(); - ptr = (unsigned long *)la_ptr; - for (i = 0; i < mchk_header->size / sizeof(long); i += 2) { - printk(" +%lx %lx %lx\n", i*sizeof(long), ptr[i], ptr[i+1]); - } - } -#endif /* DEBUG_MCHECK_DUMP */ /* * Check if machine check is due to a badaddr() and if so, * ignore the machine check. */ - mb(); - mb(); /* magic */ - if (TSUNAMI_mcheck_expected[cpu]) { - DBG_MCK(("TSUNAMI machine check expected\n")); - TSUNAMI_mcheck_expected[cpu] = 0; - TSUNAMI_mcheck_taken[cpu] = 1; - mb(); - mb(); /* magic */ - draina(); - tsunami_pci_clr_err(); - wrmces(0x7); - mb(); - } -#if 1 - else { - printk("TSUNAMI machine check NOT expected\n") ; - DBG_MCK(("tsunami_machine_check: vector=0x%lx la_ptr=0x%lx\n", - vector, la_ptr)); - DBG_MCK(("\t\t pc=0x%lx size=0x%x procoffset=0x%x sysoffset 0x%x\n", - regs->pc, mchk_header->size, mchk_header->proc_offset, - mchk_header->sys_offset)); - TSUNAMI_mcheck_expected[cpu] = 0; - TSUNAMI_mcheck_taken[cpu] = 1; - mb(); - mb(); /* magic */ - draina(); - tsunami_pci_clr_err(); - wrmces(0x7); - mb(); - } -#endif -#endif + process_mcheck_info(vector, la_ptr, regs, "TSUNAMI", + DEBUG_MCHECK, TSUNAMI_mcheck_expected[cpu]); + + TSUNAMI_mcheck_expected[cpu] = 0; + TSUNAMI_mcheck_taken[cpu] = 1; } diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/alpha/kernel/irq.c linux.pre11.5/arch/alpha/kernel/irq.c --- linux.pre11.4/arch/alpha/kernel/irq.c Fri Aug 6 17:36:42 1999 +++ linux.pre11.5/arch/alpha/kernel/irq.c Fri Aug 6 20:32:56 1999 @@ -868,31 +868,23 @@ unsigned long a3, unsigned long a4, unsigned long a5, struct pt_regs regs) { - unsigned long flags; - switch (type) { case 0: #ifdef __SMP__ - __save_and_cli(flags); handle_ipi(®s); - __restore_flags(flags); return; #else printk("Interprocessor interrupt? You must be kidding\n"); #endif break; case 1: - __save_and_cli(flags); handle_irq(RTC_IRQ, -1, ®s); - __restore_flags(flags); return; case 2: alpha_mv.machine_check(vector, la_ptr, ®s); return; case 3: - __save_and_cli(flags); alpha_mv.device_interrupt(vector, ®s); - __restore_flags(flags); return; case 4: perf_irq(vector, ®s); @@ -908,4 +900,85 @@ { wrent(entInt, 0); alpha_mv.init_irq(); +} + +/* + * Machine check reasons. Defined according to PALcode sources + * (osf.h and platform.h). + */ +#define MCHK_K_TPERR 0x0080 +#define MCHK_K_TCPERR 0x0082 +#define MCHK_K_HERR 0x0084 +#define MCHK_K_ECC_C 0x0086 +#define MCHK_K_ECC_NC 0x0088 +#define MCHK_K_OS_BUGCHECK 0x008A +#define MCHK_K_PAL_BUGCHECK 0x0090 + +void +process_mcheck_info(unsigned long vector, unsigned long la_ptr, + struct pt_regs *regs, char *machine, + unsigned int debug, unsigned int expected) +{ + struct el_common *mchk_header; + unsigned long *ptr; + char *reason; + int i; + + /* + * See if the machine check is due to a badaddr() and if so, + * ignore it. + */ + if (debug) + printk(KERN_CRIT "%s machine check %s\n", machine, + (expected?"expected.":"NOT expected!!!")); + if (expected) + return; + + mchk_header = (struct el_common *)la_ptr; + + printk(KERN_CRIT "%s machine check: vector=0x%lx pc=0x%lx code=0x%lx\n", + machine, vector, regs->pc, mchk_header->code); + + switch ((unsigned int) mchk_header->code) { + case MCHK_K_TPERR: reason = "tag parity error"; break; + case MCHK_K_TCPERR: reason = "tag control parity error"; break; + case MCHK_K_HERR: reason = "generic hard error"; break; + case MCHK_K_ECC_C: reason = "correctable ECC error"; break; + case MCHK_K_ECC_NC: reason = "uncorrectable ECC error"; break; + case MCHK_K_OS_BUGCHECK: reason = "OS-specific PAL bugcheck"; break; + case MCHK_K_PAL_BUGCHECK: reason = "callsys in kernel mode"; break; + case 0x96: reason = "i-cache read retryable error"; break; + case 0x98: reason = "processor detected hard error"; break; + + /* System specific (these are for Alcor, at least): */ + case 0x203: reason = "system detected uncorrectable ECC error"; break; + case 0x205: reason = "parity error detected by CIA"; break; + case 0x207: reason = "non-existent memory error"; break; + case 0x209: reason = "PCI SERR detected"; break; + case 0x20b: reason = "PCI data parity error detected"; break; + case 0x20d: reason = "PCI address parity error detected"; break; + case 0x20f: reason = "PCI master abort error"; break; + case 0x211: reason = "PCI target abort error"; break; + case 0x213: reason = "scatter/gather PTE invalid error"; break; + case 0x215: reason = "flash ROM write error"; break; + case 0x217: reason = "IOA timeout detected"; break; + case 0x219: reason = "IOCHK#, EISA add-in board parity or other catastrophic error"; break; + case 0x21b: reason = "EISA fail-safe timer timeout"; break; + case 0x21d: reason = "EISA bus time-out"; break; + case 0x21f: reason = "EISA software generated NMI"; break; + case 0x221: reason = "unexpected ev5 IRQ[3] interrupt"; break; + default: reason = "unknown"; break; + } + printk(KERN_CRIT "machine check type: %s%s\n", + reason, mchk_header->retry ? " (retryable)" : ""); + + if (debug > 1) { + + /* Dump the logout area to give all info. */ + ptr = (unsigned long *)la_ptr; + for (i = 0; i < mchk_header->size / sizeof(long); i += 2) { + printk(KERN_CRIT " +%8lx %016lx %016lx\n", + i*sizeof(long), ptr[i], ptr[i+1]); + } + } } diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/alpha/kernel/proto.h linux.pre11.5/arch/alpha/kernel/proto.h --- linux.pre11.4/arch/alpha/kernel/proto.h Fri Aug 6 18:38:11 1999 +++ linux.pre11.5/arch/alpha/kernel/proto.h Fri Aug 6 20:32:56 1999 @@ -201,3 +201,9 @@ /* ../mm/init.c */ void srm_paging_stop(void); + +/* irq.c */ +extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr, + struct pt_regs *regs, char *machine, + unsigned int debug, unsigned int expected); + diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/alpha/kernel/setup.c linux.pre11.5/arch/alpha/kernel/setup.c --- linux.pre11.4/arch/alpha/kernel/setup.c Fri Aug 6 18:49:48 1999 +++ linux.pre11.5/arch/alpha/kernel/setup.c Fri Aug 6 20:32:56 1999 @@ -224,9 +224,16 @@ alpha_using_srm = strncmp((const char *)hwrpb->ssn, "MILO", 4) != 0; #endif - printk("Booting on %s%s%s using machine vector %s\n", + printk("%s on %s%s%s using machine vector %s from %s\n", +#ifdef CONFIG_ALPHA_GENERIC + "Booting GENERIC", +#else + "Booting" +#endif type_name, (*var_name ? " variation " : ""), - var_name, alpha_mv.vector_name); + var_name, alpha_mv.vector_name, + (alpha_using_srm ? "SRM" : "MILO")); + printk("Command line: %s\n", command_line); /* diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/alpha/kernel/sys_miata.c linux.pre11.5/arch/alpha/kernel/sys_miata.c --- linux.pre11.4/arch/alpha/kernel/sys_miata.c Fri Aug 6 17:36:43 1999 +++ linux.pre11.5/arch/alpha/kernel/sys_miata.c Fri Aug 6 20:32:56 1999 @@ -271,6 +271,17 @@ es1888_init(); } +static void +miata_kill_arch (int mode, char *reboot_cmd) +{ + /* Who said DEC engineers have no sense of humor? ;-) */ + if (alpha_using_srm) { + *(vuip) PYXIS_RESET = 0x0000dead; + mb(); + } + generic_kill_arch(mode, reboot_cmd); +} + /* * The System Vector @@ -295,6 +306,6 @@ init_irq: miata_init_irq, init_pit: generic_init_pit, pci_fixup: miata_pci_fixup, - kill_arch: generic_kill_arch, + kill_arch: miata_kill_arch, }; ALIAS_MV(miata) diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/i386/kernel/i386_ksyms.c linux.pre11.5/arch/i386/kernel/i386_ksyms.c --- linux.pre11.4/arch/i386/kernel/i386_ksyms.c Fri Aug 6 18:38:12 1999 +++ linux.pre11.5/arch/i386/kernel/i386_ksyms.c Fri Aug 6 20:40:22 1999 @@ -112,6 +112,7 @@ EXPORT_SYMBOL(mca_mark_as_used); EXPORT_SYMBOL(mca_mark_as_unused); EXPORT_SYMBOL(mca_find_unused_adapter); +EXPORT_SYMBOL(mca_is_adapter_used); #endif #ifdef CONFIG_VT diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/arch/sparc/mm/srmmu.c linux.pre11.5/arch/sparc/mm/srmmu.c --- linux.pre11.4/arch/sparc/mm/srmmu.c Fri Aug 6 17:36:44 1999 +++ linux.pre11.5/arch/sparc/mm/srmmu.c Fri Aug 6 20:39:07 1999 @@ -114,6 +114,7 @@ #define srmmu_ahashfn(addr) ((addr) >> 24) int viking_mxcc_present = 0; +static spinlock_t srmmu_context_spinlock = SPIN_LOCK_UNLOCKED; /* Physical memory can be _very_ non-contiguous on the sun4m, especially * the SS10/20 class machines and with the latest openprom revisions. @@ -819,7 +820,9 @@ static void srmmu_switch_to_context(struct task_struct *tsk) { if(tsk->mm->context == NO_CONTEXT) { + spin_lock(&srmmu_context_spinlock); alloc_context(tsk->mm); + spin_unlock(&srmmu_context_spinlock); ctxd_set(&srmmu_context_table[tsk->mm->context], tsk->mm->pgd); } srmmu_set_context(tsk->mm->context); @@ -827,7 +830,9 @@ static void srmmu_init_new_context(struct mm_struct *mm) { + spin_lock(&srmmu_context_spinlock); alloc_context(mm); + spin_unlock(&srmmu_context_spinlock); flush_cache_mm(mm); ctxd_set(&srmmu_context_table[mm->context], mm->pgd); @@ -1398,7 +1403,9 @@ if(tsk->mm->context == NO_CONTEXT) { ctxd_t *ctxp; + spin_lock(&srmmu_context_spinlock); alloc_context(tsk->mm); + spin_unlock(&srmmu_context_spinlock); ctxp = &srmmu_context_table[tsk->mm->context]; srmmu_set_entry((pte_t *)ctxp, __pte((SRMMU_ET_PTD | (srmmu_v2p((unsigned long) tsk->mm->pgd) >> 4)))); hypersparc_flush_page_to_ram((unsigned long)ctxp); @@ -1411,7 +1418,9 @@ { ctxd_t *ctxp; + spin_lock(&srmmu_context_spinlock); alloc_context(mm); + spin_unlock(&srmmu_context_spinlock); ctxp = &srmmu_context_table[mm->context]; srmmu_set_entry((pte_t *)ctxp, __pte((SRMMU_ET_PTD | (srmmu_v2p((unsigned long) mm->pgd) >> 4)))); diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/drivers/misc/parport_pc.c linux.pre11.5/drivers/misc/parport_pc.c --- linux.pre11.4/drivers/misc/parport_pc.c Fri Aug 6 17:37:54 1999 +++ linux.pre11.5/drivers/misc/parport_pc.c Fri Aug 6 20:43:22 1999 @@ -829,9 +829,9 @@ /* Done probing. Now put the port into a sensible start-up state. */ if (p->modes & PARPORT_MODE_PCECR) /* - * Put the ECP detected port in the more SPP like mode. + * Put the ECP detected port in the more PS2 like mode. */ - parport_pc_write_econtrol(p, 0x0); + parport_pc_write_econtrol(p, 0x34); parport_pc_write_control(p, 0x8); parport_pc_write_data(p, 0); udelay (50); diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/drivers/net/cs89x0.c linux.pre11.5/drivers/net/cs89x0.c --- linux.pre11.4/drivers/net/cs89x0.c Fri Aug 6 17:37:02 1999 +++ linux.pre11.5/drivers/net/cs89x0.c Fri Aug 6 20:42:53 1999 @@ -30,7 +30,7 @@ */ static char *version = -"cs89x0.c:v1.02 11/26/96 Russell Nelson \n"; +"cs89x0.c:v1.03 11/26/96 Russell Nelson \n"; /* ======================= configure the driver here ======================= */ @@ -306,7 +306,7 @@ else if (get_eeprom_data(dev, START_EEPROM_DATA,CHKSUM_LEN,eeprom_buff) < 0) { printk("\ncs89x0: EEPROM read failed, relying on command line.\n"); } else if (get_eeprom_cksum(START_EEPROM_DATA,CHKSUM_LEN,eeprom_buff) < 0) { - printk("\ncs89x0: EEPROM checksum bad, relyong on command line\n"); + printk("\ncs89x0: EEPROM checksum bad, relying on command line\n"); } else { /* get transmission control word but keep the autonegotiation bits */ if (!lp->auto_neg_cnf) lp->auto_neg_cnf = eeprom_buff[AUTO_NEG_CNF_OFFSET/2]; @@ -843,6 +843,13 @@ lp->send_underrun++; if (lp->send_underrun == 3) lp->send_cmd = TX_AFTER_381; else if (lp->send_underrun == 6) lp->send_cmd = TX_AFTER_ALL; + /* transmit cycle is done, although + frame wasn't transmitted - this + avoids having to wait for the upper + layers to timeout on us, in the + event of a tx underrun */ + dev->tbusy = 0; + mark_bh(NET_BH); /* Inform upper layers. */ } break; case ISQ_RX_MISS_EVENT: diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/drivers/net/cs89x0.h linux.pre11.5/drivers/net/cs89x0.h --- linux.pre11.4/drivers/net/cs89x0.h Fri Aug 6 17:37:04 1999 +++ linux.pre11.5/drivers/net/cs89x0.h Fri Aug 6 20:42:59 1999 @@ -319,8 +319,8 @@ #define TX_FRAME_PORT RX_FRAME_PORT #define TX_CMD_PORT 0x0004 #define TX_NOW 0x0000 /* Tx packet after 5 bytes copied */ -#define TX_AFTER_381 0x0020 /* Tx packet after 381 bytes copied */ -#define TX_AFTER_ALL 0x0060 /* Tx packet after all bytes copied */ +#define TX_AFTER_381 0x0040 /* Tx packet after 381 bytes copied */ +#define TX_AFTER_ALL 0x00c0 /* Tx packet after all bytes copied */ #define TX_LEN_PORT 0x0006 #define ISQ_PORT 0x0008 #define ADD_PORT 0x000A diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/drivers/net/sk_mca.c linux.pre11.5/drivers/net/sk_mca.c --- linux.pre11.4/drivers/net/sk_mca.c Fri Aug 6 18:49:42 1999 +++ linux.pre11.5/drivers/net/sk_mca.c Fri Aug 6 20:40:22 1999 @@ -62,9 +62,14 @@ implemented LANCE multicast filter Jun 6th, 1999 additions for Linux 2.2 + Aug 2nd, 1999 + small fixes (David Weinehall) *************************************************************************/ +#include +#include + #include #include #include @@ -80,11 +85,6 @@ #include #include -#ifdef MODULE -#include -#include -#endif - #include #include #include @@ -872,7 +872,7 @@ return &(priv->stat); } -/* we don't support runtime reconfiguration, since am MCA card can +/* we don't support runtime reconfiguration, since an MCA card can be unambigously identified by its POS registers. */ static int skmca_config(struct device *dev, struct ifmap *map) @@ -963,9 +963,6 @@ getaddrs(slot, junior, &base, &irq, &medium); -#if 0 - /* this should work, but it doesn't with 2.2.9 :-( - somehow 'mca_is_adapter_used()' is missing in kernel syms... */ #if LINUX_VERSION_CODE >= 0x020200 /* slot already in use ? */ @@ -974,7 +971,6 @@ slot = dofind(&junior, slot + 1); continue; } -#endif #endif /* were we looking for something different ? */ diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/drivers/scsi/sd.c linux.pre11.5/drivers/scsi/sd.c --- linux.pre11.4/drivers/scsi/sd.c Fri Aug 6 18:38:28 1999 +++ linux.pre11.5/drivers/scsi/sd.c Fri Aug 6 20:44:14 1999 @@ -74,7 +74,7 @@ * Time out in seconds for disks and Magneto-opticals (which are slower). */ -#define SD_TIMEOUT (15 * HZ) +#define SD_TIMEOUT (30 * HZ) #define SD_MOD_TIMEOUT (75 * HZ) #define CLUSTERABLE_DEVICE(SC) (SC->host->use_clustering && \ diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/fs/ext2/file.c linux.pre11.5/fs/ext2/file.c --- linux.pre11.4/fs/ext2/file.c Fri Aug 6 18:38:30 1999 +++ linux.pre11.5/fs/ext2/file.c Fri Aug 6 20:36:46 1999 @@ -229,7 +229,7 @@ if (!count) return -EFBIG; } - if (((pos + count) >> 33) && + if (((pos + count) >> 31) && !(sb->u.ext2_sb.s_es->s_feature_ro_compat & cpu_to_le32(EXT2_FEATURE_RO_COMPAT_LARGE_FILE))) { /* If this is the first large file created, add a flag diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/fs/nfs/inode.c linux.pre11.5/fs/nfs/inode.c --- linux.pre11.4/fs/nfs/inode.c Fri Aug 6 18:49:44 1999 +++ linux.pre11.5/fs/nfs/inode.c Fri Aug 6 20:34:15 1999 @@ -727,6 +727,7 @@ inode->i_ino); status = nfs_proc_getattr(server, NFS_FH(dentry), &fattr); if (status) { + int error; u32 *fh; struct nfs_fh fhandle; dfprintk(PAGECACHE, "nfs_revalidate_inode: %s/%s getattr failed, ino=%ld, error=%d\n", @@ -741,10 +742,10 @@ fh = (u32 *) NFS_FH(dentry); dfprintk(PAGECACHE, "NFS: bad fh %08x%08x%08x%08x%08x%08x%08x%08x\n", fh[0],fh[1],fh[2],fh[3],fh[4],fh[5],fh[6],fh[7]); - status = nfs_proc_lookup(server, NFS_FH(dentry->d_parent), + error = nfs_proc_lookup(server, NFS_FH(dentry->d_parent), dentry->d_name.name, &fhandle, &fattr); - if (status) { - dfprintk(PAGECACHE, "NFS: lookup failed, error=%d\n", status); + if (error) { + dfprintk(PAGECACHE, "NFS: lookup failed, error=%d\n", error); goto out; } fh = (u32 *) &fhandle; diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/include/asm-alpha/core_cia.h linux.pre11.5/include/asm-alpha/core_cia.h --- linux.pre11.4/include/asm-alpha/core_cia.h Fri Aug 6 18:49:44 1999 +++ linux.pre11.5/include/asm-alpha/core_cia.h Fri Aug 6 20:32:56 1999 @@ -77,8 +77,18 @@ #define CIA_MEM_R2_MASK 0x07ffffff /* SPARSE Mem region 2 mask is 27 bits */ #define CIA_MEM_R3_MASK 0x03ffffff /* SPARSE Mem region 3 mask is 26 bits */ -#define CIA_DMA_WIN_BASE_DEFAULT (1024*1024*1024) -#define CIA_DMA_WIN_SIZE_DEFAULT (1024*1024*1024) +#define CIA_DMA_WIN_BASE_DEFAULT (1024*1024*1024U) +#define CIA_DMA_WIN_SIZE_DEFAULT (2*1024*1024*1024U) + +/* window 0 at 1GB size 1GB mapping to 0 */ +#define CIA_DMA_WIN0_BASE_DEFAULT (1024*1024*1024U) +#define CIA_DMA_WIN0_SIZE_DEFAULT (1024*1024*1024U) +#define CIA_DMA_WIN0_TRAN_DEFAULT (0U) + +/* window 1 at 2GB size 1GB mapping to 1GB */ +#define CIA_DMA_WIN1_BASE_DEFAULT (2*1024*1024*1024U) +#define CIA_DMA_WIN1_SIZE_DEFAULT (1024*1024*1024U) +#define CIA_DMA_WIN1_TRAN_DEFAULT (1024*1024*1024U) #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM_SETUP) #define CIA_DMA_WIN_BASE alpha_mv.dma_win_base diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/include/asm-alpha/core_pyxis.h linux.pre11.5/include/asm-alpha/core_pyxis.h --- linux.pre11.4/include/asm-alpha/core_pyxis.h Fri Aug 6 18:49:44 1999 +++ linux.pre11.5/include/asm-alpha/core_pyxis.h Fri Aug 6 20:32:56 1999 @@ -74,8 +74,18 @@ #define PYXIS_MEM_R2_MASK 0x07ffffff /* SPARSE Mem region 2 mask is 27 bits */ #define PYXIS_MEM_R3_MASK 0x03ffffff /* SPARSE Mem region 3 mask is 26 bits */ -#define PYXIS_DMA_WIN_BASE_DEFAULT (1024*1024*1024) -#define PYXIS_DMA_WIN_SIZE_DEFAULT (1024*1024*1024) +#define PYXIS_DMA_WIN_BASE_DEFAULT (1024*1024*1024U) +#define PYXIS_DMA_WIN_SIZE_DEFAULT (2*1024*1024*1024U) + +/* window 0 at 1GB size 1GB mapping 0 */ +#define PYXIS_DMA_WIN0_BASE_DEFAULT (1024*1024*1024U) +#define PYXIS_DMA_WIN0_SIZE_DEFAULT (1024*1024*1024U) +#define PYXIS_DMA_WIN0_TRAN_DEFAULT (0U) + +/* window 0 at 2GB size 1GB mapping 1GB */ +#define PYXIS_DMA_WIN1_BASE_DEFAULT (2*1024*1024*1024U) +#define PYXIS_DMA_WIN1_SIZE_DEFAULT (1024*1024*1024U) +#define PYXIS_DMA_WIN1_TRAN_DEFAULT (1024*1024*1024U) #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM_SETUP) #define PYXIS_DMA_WIN_BASE alpha_mv.dma_win_base diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/include/asm-alpha/core_tsunami.h linux.pre11.5/include/asm-alpha/core_tsunami.h --- linux.pre11.4/include/asm-alpha/core_tsunami.h Fri Aug 6 17:38:20 1999 +++ linux.pre11.5/include/asm-alpha/core_tsunami.h Fri Aug 6 20:32:56 1999 @@ -16,8 +16,24 @@ * */ +/* + * We must actually use 2 windows to direct-map the 2GB space, because + * of an "idiot-syncracy" of the CYPRESS chip used on DS20 and others. + * It may respond to a PCI bus address in the last 1MB of the 4GB + * address range, and that is where real memory may appear. + * + * Sigh... + */ #define TSUNAMI_DMA_WIN_BASE_DEFAULT (1024*1024*1024U) -#define TSUNAMI_DMA_WIN_SIZE_DEFAULT (1024*1024*1024U) +#define TSUNAMI_DMA_WIN_SIZE_DEFAULT (2*1024*1024*1024U) + +#define TSUNAMI_DMA_WIN0_BASE_DEFAULT (1024*1024*1024UL) +#define TSUNAMI_DMA_WIN0_SIZE_DEFAULT (1024*1024*1024UL) +#define TSUNAMI_DMA_WIN0_TRAN_DEFAULT (0UL) + +#define TSUNAMI_DMA_WIN1_BASE_DEFAULT (2*1024*1024*1024UL) +#define TSUNAMI_DMA_WIN1_SIZE_DEFAULT (1024*1024*1024UL) +#define TSUNAMI_DMA_WIN1_TRAN_DEFAULT (1024*1024*1024UL) #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM_SETUP) #define TSUNAMI_DMA_WIN_BASE alpha_mv.dma_win_base diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/include/asm-alpha/ptrace.h linux.pre11.5/include/asm-alpha/ptrace.h --- linux.pre11.4/include/asm-alpha/ptrace.h Fri Aug 6 17:38:18 1999 +++ linux.pre11.5/include/asm-alpha/ptrace.h Fri Aug 6 20:32:56 1999 @@ -67,7 +67,7 @@ }; #ifdef __KERNEL__ -#define user_mode(regs) ((regs)->ps & 8) +#define user_mode(regs) (((regs)->ps & 8) != 0) #define instruction_pointer(regs) ((regs)->pc) extern void show_regs(struct pt_regs *); #endif diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/net/bridge/br.c linux.pre11.5/net/bridge/br.c --- linux.pre11.4/net/bridge/br.c Fri Aug 6 18:38:39 1999 +++ linux.pre11.5/net/bridge/br.c Fri Aug 6 20:41:18 1999 @@ -39,6 +39,8 @@ * Alan Cox: Merged Jean-Rene's stuff, reformatted stuff a bit * so blame me first if its broken ;) * + * Robert Pintarelli: fixed bug in bpdu time values + * * Todo: * Don't bring up devices automatically. Start ports disabled * and use a netlink notifier so a daemon can maintain the bridge @@ -284,13 +286,13 @@ config_bpdu.message_age = Zero; /* (4.6.1.3.2(5)) */ } else { config_bpdu.message_age - = message_age_timer[bridge_info.root_port].value - + Message_age_increment; /* (4.6.1.3.2(6)) */ + = (message_age_timer[bridge_info.root_port].value + + Message_age_increment) << 8; /* (4.6.1.3.2(6)) */ } - config_bpdu.max_age = bridge_info.max_age;/* (4.6.1.3.2(7)) */ - config_bpdu.hello_time = bridge_info.hello_time; - config_bpdu.forward_delay = bridge_info.forward_delay; + config_bpdu.max_age = bridge_info.max_age << 8;/* (4.6.1.3.2(7)) */ + config_bpdu.hello_time = bridge_info.hello_time << 8; + config_bpdu.forward_delay = bridge_info.forward_delay << 8; config_bpdu.top_change_ack = port_info[port_no].top_change_ack; /* (4.6.1.3.2(8)) */ @@ -363,10 +365,10 @@ static void record_config_timeout_values(Config_bpdu *config) /* (4.6.3) */ { - bridge_info.max_age = config->max_age; /* (4.6.3.3) */ - bridge_info.hello_time = config->hello_time; - bridge_info.forward_delay = config->forward_delay; - bridge_info.top_change = config->top_change; + bridge_info.max_age = config->max_age >> 8; /* (4.6.3.3) */ + bridge_info.hello_time = config->hello_time >> 8; + bridge_info.forward_delay = config->forward_delay >> 8; + bridge_info.top_change = config->top_change >> 8; } static void config_bpdu_generation(void) diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/net/ipv4/devinet.c linux.pre11.5/net/ipv4/devinet.c --- linux.pre11.4/net/ipv4/devinet.c Fri Aug 6 18:38:39 1999 +++ linux.pre11.5/net/ipv4/devinet.c Fri Aug 6 20:41:53 1999 @@ -652,9 +652,10 @@ for_primary_ifa(in_dev) { if (ifa->ifa_scope > scope) continue; - addr = ifa->ifa_local; if (!dst || inet_ifa_match(dst, ifa)) - return addr; + return ifa->ifa_local; + if (!addr) + addr = ifa->ifa_local; } endfor_ifa(in_dev); if (addr || scope >= RT_SCOPE_LINK) diff -u --new-file --recursive --exclude-from ../exclude linux.pre11.4/net/ipv4/ip_fw.c linux.pre11.5/net/ipv4/ip_fw.c --- linux.pre11.4/net/ipv4/ip_fw.c Fri Aug 6 18:49:44 1999 +++ linux.pre11.5/net/ipv4/ip_fw.c Fri Aug 6 20:32:26 1999 @@ -611,17 +611,6 @@ offset = ntohs(ip->frag_off) & IP_OFFSET; - /* If it is a truncated first fragment then it can be - * used to rewrite port information, and thus should - * be blocked. - */ - if (offset && (ntohs(ip->frag_off) & IP_MF)) { - if (!testing && net_ratelimit()) { - /*printk(KERN_ERR "Suspect short first fragment.\n");*/ - dump_packet(ip,rif,NULL,NULL,0,0,0,0); - } - return FW_BLOCK; - } /* * Don't allow a fragment of TCP 8 bytes in. Nobody * normal causes this. Its a cracker trying to break @@ -659,6 +648,18 @@ size_req = 0; } offset = (ntohs(ip->tot_len) < (ip->ihl<<2)+size_req); + + /* If it is a truncated first fragment then it can be + * used to rewrite port information, and thus should + * be blocked. + */ + if (offset && (ntohs(ip->frag_off) & IP_MF)) { + if (!testing && net_ratelimit()) { + printk("Suspect short first fragment.\n"); + dump_packet(ip,rif,NULL,NULL,0,0,0,0); + } + return FW_BLOCK; + } } src = ip->saddr;