Home | History | Annotate | Download | only in jensenio
History log of /src/sys/arch/alpha/jensenio/com_jensenio.c
RevisionDateAuthorComments
 1.19  07-May-2021  thorpej Liberally sprinkle static around to get more symbols out of the
global namespace. A small bit of const poisoning in the TC code.
 1.18  25-Sep-2020  thorpej branches: 1.18.6;
Changes to make interrupt {,dis}establish MP-safe on Alpha:
- Protect all of the system interrupt linkage with the cpu_lock mutex.
- Re-order some of the stores to the SCB vector table to make it safe
in the face of lockless interrupt dispatch.
- Add a framework for routing interrupts to specific CPUs. Interrupts
are still funneled only to the primary CPU, but that will change for
some systems soon. Ensure that interrupt handler lists are manipulated
only on the CPUs that handle that specific interrupt source. This required
a re-factor of the alpha_shared_intr_*() family of functions.
- Enable __HAVE_INTR_CONTROL, although interrupt redistribution is still
a no-op.
- Reduce code duplication in the Jenson direct-SCB interrupt handlers.
 1.17  22-Sep-2020  thorpej Changes to make MPSAFE interrupts work on Alpha:

- Remove the ipl argument to scb_set() and the associated array of
"mpsafe" booleans initialized based on the ipl. It was bogus
anyway; all IPL_{BIO,NET,TTY}, etc. values are aliases of IPL_VM,
and for all practical purposes, there is really only one device
interrrupt level on Alpha anyway. Intead, we now treat all dispatches
from the SCB vector table as MP-safe, and it is now the handler for
that vector who is responsible for acquiring the KERNEL_LOCK if needed.

- Update the direct interrupt vector handlers in jensenio and TURBOchannel
to acquire the KERNEL_LOCK.

- Introduce a new ALPHA_INTR_MPSAFE flag, and add a flags argument to
alpha_shared_intr_establish(). When it is set, indicate that the
handler is MP-safe. Update alpha_shared_intr_dispatch() to pay
attention and acquire the KERNEL_LOCK (or not) as indicated.

- Re-factor all of the PCI interrupt handling, providing "generic PCI"
"PCI interrupts through ISA IRQs" implementations to significantly
reduce code duplication. Supplement the PCI chipset tag with more
info to facilitate this, and make the PCI interrupt-related routines
take a pci_chipset_tag_t argument rather than a void * argument.

- Because PCI interrupts on KN8AE are dispatched directly from the
SCB, provide a wrapper for non-MPSAFE interrupt handlers that
acquires the KERNEL_LOCK.

- Change the pci_intr_handle_t type to be a struct rather than an
integer type in order to catch any direct use of it as a value.
Add a set of functions to interact with pci_intr_handle_t, including
setting interrupt flags.

- Implement pci_intr_setattr() so that the PCI_INTR_MPSAFE attribute
can be set on a pci_intr_handle_t.

- While I'm here, make all of the MI PCI back-end operations call
through real functions rather than hopping directly through function
pointers in the chipset tag.

This change looks a lot bigger than it really is because of the re-factor
in the plethora of model-specific PCI interrupt back-ends. The KN8AE,
KN300, and T2/T3/T4 (Sable) are largely un-changed.
 1.16  19-Sep-2020  tsutsui Possible fix for hangup on Jensen mentioned in PR/36628.

According to comments in Linux drivers/tty/serial/8250/8250.h,
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/8250/8250.h?h=v5.8#n242
the driver has to set OUT1 and OUT2 lines for "some ALPHA"
otherwise "the machine locks up with endless interrupts."
Note OUT2 (MCR_IENABLE) is set in MI com_attach_subr()
so we have to set OUT1 (MCR_DSR) in the MD attachment.

The information was notified from Miod Vallat.
 1.15  08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.14  21-Mar-2014  christos branches: 1.14.28; 1.14.30;
gc sprintf; reduce local static usage of interrupt strings that are only
used once for autoconf printing.
 1.13  01-Jul-2011  dyoung branches: 1.13.2; 1.13.12; 1.13.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.12  14-Jun-2011  matt Major cleanup of alpha device drivers.
Switch to CFATTACH_DECL_NEW.
struct device * -> device_t
struct cfdata * -> cfdata_t
Use of device_xname. No direct access to struct device members.
Use aprint* (not complete).
 1.11  21-Nov-2009  rmind branches: 1.11.10;
- Use lwp_getpcb() on Alpha.
- Replace and clean struct user usage, slightly simplify some code parts.
- Include sys/user.h in MD proc.h .
 1.10  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.9  14-Mar-2008  cube branches: 1.9.2; 1.9.4;
Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend). Use proper types and ansify where appropriate.
 1.8  29-Feb-2008  dyoung Use pmf_device_register1() instead of shutdownhook_establish() to
register com_cleanup() as the shutdown hook.

Add a generic suspend routine. Suspend and resume com@isa.

Protect against dereferencing a NULL softc in comioctl().

Destroy both a mutex and a callout in com_detach().

Cosmetic: use aprint_*_dev(). Use PMF_FN_ARGS, PMF_FN_PROTO.
 1.7  03-Dec-2007  ad branches: 1.7.10; 1.7.14;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.6  13-Jul-2006  gdamore branches: 1.6.14; 1.6.32; 1.6.34; 1.6.40;
Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@. Fixes PR port-evbmips/32362.
 1.5  02-Oct-2002  thorpej branches: 1.5.22; 1.5.36; 1.5.40; 1.5.48;
Use CFATTACH_DECL().
 1.4  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3  27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.2  27-Jul-2001  thorpej branches: 1.2.2;
Rework the interrupt code, shaving some cycles off in the process.
Rather than an "iointr" routine that decomposes a vector into an
IRQ, we maintain a vector table directly, hooking up each "iointr"
routine at the correct vector. This also allows us to hook device
interrupts up to specific vectors (c.f. Jensen).

We can shave even more cycles off, here, and I will, but it requires
some changes to the alpha_shared_intr stuff.
 1.1  12-Jul-2000  thorpej branches: 1.1.2; 1.1.4; 1.1.8;
Code to support the DEC 2000/300 (DECpc AXP 150, a.k.a. "Jensen")
systems. Thanks to Gyenes Istvan for the rounds of testing.
 1.1.8.2  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.1  03-Aug-2001  lukem update to -current
 1.1.4.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.4.1  12-Jul-2000  bouyer file com_jensenio.c was added on branch thorpej_scsipi on 2000-11-20 19:56:57 +0000
 1.1.2.2  12-Jul-2000  thorpej Update from trunk:
Code to support the DEC 2000/300 (DECpc AXP 150, a.k.a. "Jensen")
systems. Thanks to Gyenes Istvan for the rounds of testing.
 1.1.2.1  12-Jul-2000  thorpej file com_jensenio.c was added on branch netbsd-1-5 on 2000-07-12 20:59:11 +0000
 1.2.2.2  18-Oct-2002  nathanw Catch up to -current.
 1.2.2.1  27-Jul-2001  nathanw file com_jensenio.c was added on branch nathanw_sa on 2002-10-18 02:34:15 +0000
 1.5.48.4  17-Jun-2006  gdamore Undo the undo. Restore COM_INIT_REGS.
 1.5.48.3  17-Jun-2006  gdamore Undo most of the work I did, but leave in the change to use a common
com_cleanup().
 1.5.48.2  16-Jun-2006  gdamore Convert MD specific cleanups to com_cleanup.
 1.5.48.1  15-Jun-2006  gdamore Alpha com(4) ports.
 1.5.40.1  11-Aug-2006  yamt sync with head
 1.5.36.1  09-Sep-2006  rpaulo sync with head
 1.5.22.3  17-Mar-2008  yamt sync with head.
 1.5.22.2  07-Dec-2007  yamt sync with head
 1.5.22.1  30-Dec-2006  yamt sync with head.
 1.6.40.1  08-Dec-2007  mjf Sync with HEAD.
 1.6.34.2  23-Mar-2008  matt sync with HEAD
 1.6.34.1  09-Jan-2008  matt sync with HEAD
 1.6.32.1  09-Dec-2007  jmcneill Sync with HEAD.
 1.6.14.1  03-Dec-2007  ad Sync with HEAD.
 1.7.14.2  02-Jun-2008  mjf Sync with HEAD.
 1.7.14.1  03-Apr-2008  mjf Sync with HEAD.
 1.7.10.1  24-Mar-2008  keiichi sync with head.
 1.9.4.2  11-Mar-2010  yamt sync with head
 1.9.4.1  16-May-2008  yamt sync with head.
 1.9.2.1  18-May-2008  yamt sync with head.
 1.11.10.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.13.16.1  18-May-2014  rmind sync with head
 1.13.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.30.1  10-Jun-2019  christos Sync with HEAD
 1.14.28.1  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.18.6.1  13-May-2021  thorpej Sync with HEAD.

RSS XML Feed