From: Bjoern Brauel <bjb@gentoo.org>
To: marcelo@conectiva.com.br, linux-kernel@vger.kernel.org
Subject: patch: linux-2.4.20 alpha broken cia(rev1) fix
Date: Fri, 29 Nov 2002 18:37:56 +0100 [thread overview]
Message-ID: <3DE7A5F4.5030503@gentoo.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
Hi,
The attached patch fixes the initialization for CIA revision 1 chips
that can be found on most Alcor machines. As it is impossible to boot
such a box together with the Qlogic ISP SCSI controller without this
patch I believe it is important to include it in the official kernel.
cheers .. Bjoern
[-- Attachment #2: linux-2.4.20-alpha-broken-cia.patch --]
[-- Type: text/plain, Size: 2168 bytes --]
--- linux-2.4.20/arch/alpha/kernel/core_cia.c 2002-11-29 17:09:02.000000000 +0000
+++ linux-2.4.20-bjb/arch/alpha/kernel/core_cia.c 2002-11-29 17:09:10.000000000 +0000
@@ -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,21 @@
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 +726,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 +745,7 @@
}
/* Prepare workaround for apparently broken tbia. */
- cia_prepare_tbia_workaround();
+ cia_prepare_tbia_workaround(cia_rev, is_pyxis);
}
void __init
next reply other threads:[~2002-11-29 17:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-29 17:37 Bjoern Brauel [this message]
2002-12-02 7:33 ` patch: linux-2.4.20 alpha broken cia(rev1) fix Richard Henderson
2002-12-02 21:23 ` Folkert van Heusden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DE7A5F4.5030503@gentoo.org \
--to=bjb@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.