From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id BB6F23EDA8 for ; Mon, 10 Jun 2002 14:15:04 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g5AIF3v23763 for axp-list@listman.redhat.com; Mon, 10 Jun 2002 14:15:03 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g5AIF3323759 for ; Mon, 10 Jun 2002 14:15:03 -0400 Received: from ztxmail05.ztx.compaq.com (ztxmail05.ztx.compaq.com [161.114.1.209]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g5AI6q931454 for ; Mon, 10 Jun 2002 14:06:52 -0400 Received: from mailrelay01.cce.cpqcorp.net (mailrelay01.cce.cpqcorp.net [16.47.68.171]) by ztxmail05.ztx.compaq.com (Postfix) with ESMTP id 5F77A37C7 for ; Mon, 10 Jun 2002 13:14:57 -0500 (CDT) Received: from linux04.mro.cpqcorp.net (linux04.mro.cpqcorp.net [16.129.9.99]) by mailrelay01.cce.cpqcorp.net (Postfix) with ESMTP id E280013BF for ; Mon, 10 Jun 2002 13:14:56 -0500 (CDT) Received: (from jestabro@localhost) by linux04.mro.cpqcorp.net (8.11.6/8.11.6) id g5AI77p01433 for axp-list@redhat.com; Mon, 10 Jun 2002 14:07:07 -0400 Date: Mon, 10 Jun 2002 14:07:07 -0400 From: Jay Estabrook To: axp-list@redhat.com Subject: Re: [LONG] CIA breakage in 2.4.13 (was Re: AS500 and 2.4 SCSI blues) Message-ID: <20020610140707.A1355@linux04.mro.cpqcorp.net> Mail-Followup-To: Jay Estabrook , axp-list@redhat.com References: <20020609154137.B1919@linux04.mro.cpqcorp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mzyngier@freesurf.fr on Mon, Jun 10, 2002 at 08:08:07AM +0200 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: On Mon, Jun 10, 2002 at 08:08:07AM +0200, Marc Zyngier wrote: > >>>>> "Jay" == Jay Estabrook writes: > > Jay> I will post patches against 2.4.19-preX when I get in to work > Jay> Monday. > > I'll be very happy to test it. OK, here you go, apply as usual... These have worked fine for me on CIA-1 machines such as XLT and EB164. ----------------------------------------------------------------------------- diff -ur old/arch/alpha/kernel/core_cia.c new/arch/alpha/kernel/core_cia.c --- old/arch/alpha/kernel/core_cia.c Sun Oct 21 13:30:58 2001 +++ new/arch/alpha/kernel/core_cia.c Tue May 28 15:02:42 2002 @@ -370,7 +370,7 @@ } static inline void -cia_prepare_tbia_workaround(void) +cia_prepare_tbia_workaround(int cia_rev, int is_pyxis) { unsigned long *ppte, pte; long i; @@ -382,10 +382,20 @@ for (i = 0; i < CIA_BROKEN_TBIA_SIZE / sizeof(unsigned long); ++i) ppte[i] = pte; - *(vip)CIA_IOC_PCI_W1_BASE = CIA_BROKEN_TBIA_BASE | 3; - *(vip)CIA_IOC_PCI_W1_MASK = (CIA_BROKEN_TBIA_SIZE*1024 - 1) - & 0xfff00000; - *(vip)CIA_IOC_PCI_T1_BASE = virt_to_phys(ppte) >> 2; + if (is_pyxis || cia_rev != 1) { + /* We can use W1 for SG on PYXIS/CIA rev 2. */ + *(vip)CIA_IOC_PCI_W1_BASE = CIA_BROKEN_TBIA_BASE | 3; + *(vip)CIA_IOC_PCI_W1_MASK = (CIA_BROKEN_TBIA_SIZE*1024 - 1) + & 0xfff00000; + *(vip)CIA_IOC_PCI_T1_BASE = virt_to_phys(ppte) >> 2; + } else { + /* CIA rev 1 can't use W1 or W2 for SG, apparently, + so use W3, which we made sure is not used for DAC. */ + *(vip)CIA_IOC_PCI_W3_BASE = CIA_BROKEN_TBIA_BASE | 3; + *(vip)CIA_IOC_PCI_W3_MASK = (CIA_BROKEN_TBIA_SIZE*1024 - 1) + & 0xfff00000; + *(vip)CIA_IOC_PCI_T3_BASE = virt_to_phys(ppte) >> 2; + } } static void __init @@ -715,8 +725,14 @@ are compared against W_DAC. We can, however, directly map 4GB, which is better than before. However, due to assumptions made elsewhere, we should not claim that we support DAC unless that - 4GB covers all of physical memory. */ - if (is_pyxis || max_low_pfn > (0x100000000 >> PAGE_SHIFT)) { + 4GB covers all of physical memory. + + Also, don't do DAC on CIA rev 1, it has other problems and is + unlikely to have more than 2GB of memory anyway, so direct is + fine. + */ + if (cia_rev == 1 || is_pyxis || + max_low_pfn > (0x100000000 >> PAGE_SHIFT)) { *(vip)CIA_IOC_PCI_W3_BASE = 0; } else { *(vip)CIA_IOC_PCI_W3_BASE = 0x00000000 | 1 | 8; @@ -728,7 +744,7 @@ } /* Prepare workaround for apparently broken tbia. */ - cia_prepare_tbia_workaround(); + cia_prepare_tbia_workaround(cia_rev, is_pyxis); } void __init ----------------------------------------------------------------------------- --Jay++ ----------------------------------------------------------------------------- Jay A Estabrook HPTC - LINUX support Hewlett-Packard Company - MRO1-2/K15 (508) 467-2080 200 Forest Street, Marlboro MA 01752 Jay.Estabrook@hp.com -----------------------------------------------------------------------------