Subject: CIA bridges never use BWX capability
To: None <>
From: Joachim Kuebart <>
List: port-alpha
Date: 04/07/2004 02:09:14

I am puzzled about a change introduced 4 years ago in
sys/arch/alpha/pci/cia.c rev. 1.55: in order to determine the availability
of BWX on the CPU, the CIA interface code relies on the variable cpu_amask.
However, during console initialisation time when cia_init() gets called
from dec_1000a.c, dec_550.c, dec_eb164.c, dec_kn20aa.c and dec_kn300.c,
cpuattach() hasn't run yet and hence cpu_amask is uninitialized. It is
therefore impossible for the CIA bridge to decect BWX availability at the
first initialisation, and after this cn_initted gets set and no further
full initialisation is done. Therefore, BWX is not really used although the
message "using BWX for PCI conf and bus access" is shown at boot time.

If I'm not missing something completely obvious (this is my first time in
the alpha kernel ;), I suggest reverting this change to cia.c rev. 1.54 and
calling alpha_amask() directly. The trouble with SMP is that if one of the
CPUs doesn't support BWX, this gets detected too late for CIA to notice and
it wreaks havoc. Maybe CIA needs to be able to do a full initialisation
after all CPUs have been attached? The comment says this was impossible
because extents got created, but maybe they can be disposed of in an

cu Jo

La perfection est atteinte non quand il ne reste rien à ajouter, mais quand
il ne reste rien à enlever.  (Antoine de Saint-Exupéry)