History log of /netbsd-current/sys/arch/alpha/include/intr.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.85 16-Jul-2021 thorpej

The Alpha AXP Architecture Reference Manual is explcit that the only
valid bits in the PSL are the IPL and USER bits, the latter of which
will always be clear when in the kernel, and that all other bits MBZ.
So, when reading the PSL to get the current IPL, don't bother masking
with ALPHA_PSL_IPL_MASK.


# 1.84 04-Jul-2021 thorpej

Reduce code duplication when setting up the interrupt handler data
structures:
- alpha_shared_intr_alloc() no longer takes a "string length" argument,
and just uses kmem_asprintf() to create an "irq %u" string by default.
This is suitable for nearly every caller.
- Add a alpha_shared_intr_set_string() that allows callers to override
the default IRQ description string.
- Related: make alpha_shared_intr_string() return a const char *, since
no callers should need to modify the string directly now.
- Re-factor PCI shared interrupt structure allocation / initialization
into a new alpha_pci_intr_alloc(), which is suitable for nearly every
Alpha PCI platform. Callers are expected to first have initialized
the interrupt hardware to the quiescent state.

Adjust various call sites of above functions to account for changes,
even if they are not able to use the newly re-factored code.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.83 10-Oct-2020 thorpej

Fix cycle counter-based time keeping on Alpha in MP environments by using
a simpler calibration algorithm for the CC timecounter. Proposed in 2018
by Naruaki Etomi:

https://mail-index.netbsd.org/tech-kern/2018/01/14/msg022940.html

This patch is largely based on the proposed change, but avoids changing
any other timecounter logic, and re-factors things a bit to keep them
as MI as possible.


# 1.82 26-Sep-2020 thorpej

Implement cpu_intr_redistribute() for Tusnami/Titan systems.


# 1.81 25-Sep-2020 thorpej

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.80 23-Sep-2020 thorpej

Use a wrapper to acquire the kernel lock for non-MPSAFE interrupts,
rather than doing it in alpha_shared_intr_establish() directly.


# 1.79 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.78 19-Sep-2020 thorpej

Move softintr bits into <machine/intr.h> and define ALPHA_ALL_SOFTINTS
for locore.s


# 1.77 17-Sep-2020 thorpej

Reduce the __HAVE_FAST_SOFTINTS #ifdef perimeter.


# 1.76 16-Sep-2020 thorpej

Implement fast soft interrupts for Alpha. It's not yet enabled, because
there is a bug lurking that causes problems when user space starts up,
so we'll stick with the slow path for now.


# 1.75 05-Sep-2020 thorpej

Track the SSIR per-cpu, rather than globally.


# 1.74 05-Sep-2020 thorpej

- Document all of the various interrupt levels in the Processor Stataus
register, and provide symbolic names for them as well.
- Use ALPHA_PSL_IPL_* values directly for IPL_*.


# 1.73 29-Aug-2020 thorpej

- Centralize per-CPU pmap initialization into a new pmap_init_cpu()
function. Call in from pmap_bootstrap() for the boot CPU, and
from cpu_hatch() for secondaary CPUs.
- Eliminiate the dedicated I-stream memory barrier IPI; handle it all from
the TLB shootdown IPI. Const poison, and add some additional memory
barriers and a TBIA to the PAUSE IPI.
- Completly rewrite TLB management in the alpha pmap module, borrowing
somoe ideas from the x86 pmap and adapting them to the alpha environment.
See the comments for theory of operation. Add a bunch of stats that
can be reported (disabled by default).
- Add some additional symbol decorations to improve cache behavior on
MP systems. Ensure coherency unit alignment for several structures
in the pmap module. Use hashed locks for pmap structures.
- Start out all new processes on the kernel page tables until their
first trip though pmap_activate() to avoid the potential of polluting
the current ASN in TLB with cross-process mappings.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base
# 1.72 14-Jan-2017 christos

fix types.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.71 19-May-2014 rmind

branches: 1.71.4; 1.71.8;
Implement MI IPI interface with cross-call support.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.70 06-Feb-2012 matt

branches: 1.70.6; 1.70.20;
Do a minor cleanup of alpha (this will make applying pullups post branching
easier).
u_int{8,16,32,64}_t -> uint{*}_t
Change all old-style definitions to C89 prototypes.
Whitespace cleanup.
Constification in db_disasm.c


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase rmind-uvmplock-base
# 1.69 07-Jun-2011 matt

branches: 1.69.2; 1.69.6;
Switch alpha to use PCU to manage the FPU.
Tested by mhitch and review by rmind.


Revision tags: cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 jym-xensuspend-base
# 1.68 22-Jun-2010 rmind

branches: 1.68.6;
Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight. Will be used for passive serialization.

OK ad@.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.67 26-Oct-2009 thorpej

branches: 1.67.2; 1.67.4;
Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base mjf-devfs2-base
# 1.66 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-nfs-mp-base
# 1.65 24-Apr-2008 he

branches: 1.65.2;
This file needs <machine/cpu.h> included, for the ALPHA_PSL_IPL_*
constants it uses.


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.64 10-Mar-2008 ad

branches: 1.64.2;
Finish moving alpha over to the MI atomic ops.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.63 04-Jan-2008 ad

branches: 1.63.2; 1.63.6;
More header file cleanup.


Revision tags: vmlocking2-base3 yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.62 03-Dec-2007 ad

branches: 1.62.6;
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.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.61 17-Oct-2007 garbled

branches: 1.61.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.60 18-May-2007 mhitch

branches: 1.60.8; 1.60.10;
Fix alpha build after idlelwp merge. I don't know why machine/cpu.h was
added here, but it does not seem to be needed now, and was resulting in a
circular dependency when sys/sched.h was changed in the yamt-idlelpw branch.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base
# 1.59 16-Feb-2007 ad

branches: 1.59.6; 1.59.8; 1.59.12; 1.59.14;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.


Revision tags: post-newlock2-merge
# 1.58 09-Feb-2007 ad

Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.57 12-Jan-2007 ad

Define ipl_cookie_t._psl as uint8_t so that it can be packed into a
word with other seldomly written fields.


# 1.56 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.55 16-Feb-2006 perry

branches: 1.55.14; 1.55.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.


# 1.54 24-Dec-2005 perry

branches: 1.54.2; 1.54.4; 1.54.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.53 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.52 03-Nov-2005 yamt

- use sys/spl.h.
- add some IPL_ definitions.


Revision tags: yamt-vop-base3
# 1.51 29-Oct-2005 yamt

pull splraiseipl() from newlock branch.


Revision tags: yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base
# 1.50 29-Mar-2005 thorpej

branches: 1.50.2; 1.50.4;
- Add a alpha_shared_intr_reset_strays() function that resets the stray
interrupt counter for a given shared interrupt descriptor.
- When an interrupt is successfully handled, reset the strays counter,
thus preventing a "slow leak" from eventually shutting off the interrupt
vector. Idea taken from pci_kn300.c (which was changed to use the new
alpha_shared_intr_reset_strays() function).


Revision tags: netbsd-2-0-3-RELEASE yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_end nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.49 27-Jul-2001 thorpej

branches: 1.49.2; 1.49.10; 1.49.22; 1.49.28; 1.49.30; 1.49.36;
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.48 15-Jul-2001 thorpej

- Tweak the pmap locking protocol slightly -- require that a pmap must
be locked before it can be marked as `active' on a processor.
- Require that pmaps other than the kernel pmap be locked when they
are passed to pmap_tlb_shootdown(). This, combined with the locking
protocol tweak, allow us to get a consistent view of `activeness' of
a pmap, which means we can optmize away a lot of TLB shootdown traffic
for user pmaps.
- Borrow an idea from the i386mp branch; use the normal SHOOTDOWN IPI
to deal with hitting the entire TLB, and garbage-collect the TBIA
and TBIAP IPIs.


# 1.47 28-Apr-2001 thorpej

branches: 1.47.2;
Add a microtime() implementation that interpolates between ticks
using the cycle counter. MP-safeness is achieved by giving each
CPU its own PCC frequency variables, and kicking the non-primary
processors via an IPI once per second.

Based on the sample code from David Mills' "A Kernel Model for
Precision Timekeeping".


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.46 20-Apr-2001 thorpej

Add splipi() to block interprocessor interrupts (which come in at IPL 5).


# 1.45 20-Apr-2001 thorpej

pmap_asn_alloc(): In a multiprocessor configuration, it's possible
to arrive here referencing the kernel_lev1map without having the
RESERVED ASN -- another CPU may have caused pmap_lev1map_destroy()
to be called, and that routine only invalidates the ASN for the
CPU that called it. So, in the MULTIPROCESSOR case, simply assign
the RESERVED ASN if we reference the kernel_lev1map rather than
asserting that we already have the RESERVED ASN. Thanks to Bill
Sommerfeld for helping me track down the problem.

Also add a new IPI that causes a CPU to re-activate its address
space if the pmap it's using changes level 1 maps (this probably
won't happen very often, but it's correct to have it).

This makes Alpha MP kernels boot multiuser. In fact, this commit
is being made from my dual-CPU AlphaServer 1200 running an MP kernel.


# 1.44 15-Apr-2001 thorpej

In splx(), don't call spl0() unless the ssir != 0.


# 1.43 15-Apr-2001 thorpej

Clean up soft interrupt related stuff a bit.


# 1.42 14-Apr-2001 thorpej

Change the softintr implementation to be a bit more cache friendly
(though, sigh, slightly more expensive at softintr_schedule() time).


# 1.41 13-Apr-2001 thorpej

Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.


# 1.40 15-Jan-2001 thorpej

branches: 1.40.2;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.39 14-Jan-2001 thorpej

Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.


# 1.38 14-Jan-2001 thorpej

Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).


# 1.37 22-Nov-2000 thorpej

Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
in the handlers themselves, and also making it possible for the
"pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
CPUs registers (and thus get e.g. a traceback) from whichever
CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
They don't have a prayer of working properly in multiprocessor
kernels, and didn't really work all that well in uniprocessor kernels.


# 1.36 20-Nov-2000 thorpej

Move IPI processing into a separate function.


# 1.35 18-Nov-2000 thorpej

Count individual interprocessor interrupts -- it's good to know where
they all come from.


# 1.34 22-Aug-2000 thorpej

Add spllock(). See spl(9) for details.


# 1.33 21-Aug-2000 thorpej

Add experimental code for pausing other CPUs upon a CPU's
entry into the debugger. While I'm here, add splsched()
as per spl(9).


# 1.32 15-Aug-2000 thorpej

Implement MP-safe lazy FP context switching, modeled on the
way Bill Sommerfeld implemented it for x86 (and bug fixes
fed back to Bill :-)


# 1.31 13-Aug-2000 thorpej

Add alpha_multicast_ipi().


# 1.30 13-Jul-2000 thorpej

Whitespace police.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.29 09-Jun-2000 cgd

make spl0() and spllowersoftclock() return void. Also, move spl0()
prototype from param.h to intr.h. (there were some big XXXs in param.h
that said to do that, and intr.h is included by param.h, so...)


# 1.28 05-Jun-2000 thorpej

Switch to the new `evcnt' mechanism for counting interrupts. Maintain
a per-CPU interrupt counter for clock, device, and interprocessor
interrupts.


# 1.27 04-Jun-2000 thorpej

Un-__P'ify kernel prototypes.


# 1.26 03-Jun-2000 thorpej

- Clean up clock interrupt code a bit, and provide a CPU_IS_PRIMARY()
macro in the MULTIPROCESSOR case (hardclock() wants it).
- Implement __GENERIC_SOFT_INTERRUPTS, and redefine the legacy
software interrupts in terms of it. Garbage-collect setsoftserial().


Revision tags: minoura-xpg4dl-base
# 1.25 23-May-2000 thorpej

branches: 1.25.2;
Rename the atomic operations to have generic machine-independent
names, and define __HAVE_ATOMIC_OPERATIONS to indicate their
existence.


# 1.24 19-Mar-2000 thorpej

Point back to the alpha_shared_intr in the intrhand structure. This
allows platform-specific code to access the `intr_private' data via
the intrhand structure.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.23 02-Dec-1999 thorpej

Move atomic operations into <machine/atomic.h>, and make them in-line
assembly, rather than function calls.

...except alpha_atomic_testset_l(), which will go away completely once
I commit the new <machine/lock.h>.


# 1.22 29-Nov-1999 thorpej

- Fix a botch in the IPI bitmasks (they were right-shifted by 1), and
add an IPI which causes the target CPU to perform AST processing when
it returns to userspace.
- Add a way to get/set a private pointer in the shared interrupt header.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.21 10-Aug-1999 thorpej

branches: 1.21.2; 1.21.8;
Use atomic operations to manipulate the SSIR, and fix a problem introduced
with the spllowersoftclock() changes where more interrupts than necessary
were blocked while software interrupts were being processed.


# 1.20 05-Aug-1999 thorpej

Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 24-Feb-1999 thorpej

Restructure the IPI code a little, allowing multiple IPIs to be sent at
once. Add a way to broadcast an IPI to all processors (except the sender,
obviously). Add an IPI for TLB shootdown.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.18 26-Sep-1998 thorpej

Add basic interprocessor interrupt sending and receiving code. Current
IPI functions: HALT, IMB, TBIA, TBIAP.

XXX HALT is not yet implemented, it's just a stub.


# 1.17 25-Sep-1998 thorpej

Minor style tweaks.


# 1.16 21-Sep-1998 matt

Add softserial to the alpha port. This significantly improved PPP
throughput on com ports.


# 1.15 01-Aug-1998 thorpej

Implement alpha_shared_intr_disestablish(). Simply removes the handler
fromthe list, allowing the caller to manipulate the sharing type,
if appropriate.


Revision tags: eeh-paddr_t-base
# 1.14 18-Jul-1998 is

Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).


# 1.13 07-Jul-1998 thorpej

On second thought, call that like the rest of the shared intr functions.


# 1.12 07-Jul-1998 thorpej

Define a macro to test if a shared interrupt should be disabled after
a stray has occurred.


# 1.11 10-Nov-1997 mjacob

Protect userland applications from the inline splraise function.


Revision tags: netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base alpha-nwscons-base
# 1.10 07-Jul-1997 cgd

branches: 1.10.6;
mark prototypes for static inline functions as possibly unused
(with __attribute__ ((unused))), to avoid generating warnings when
compiling without optimization but with the default warning flags.


# 1.9 05-Jun-1997 cgd

two more slight bogons


# 1.8 05-Jun-1997 cgd

actually, declare _splraise() as an inline function, because:
(1) it was using 'max', and some functions use a variable
of that name (*sigh*), and
(2) that makes it easier to be a bit trickier, and only call
swpipl if changing the IPL.


# 1.7 05-Jun-1997 cgd

parens around macro arg (this is an old one)


# 1.6 05-Jun-1997 cgd

make sure that splnet(), splbio(), splimp(), spltty(), splclock(),
splstatclock(), and splhigh() all _raise_ the IPL. (splhigh() is _not_
the highest possible IPL; mcheck is...)


# 1.5 06-Apr-1997 cgd

clean up NetBSD RCS ID strings


Revision tags: is-newarp-before-merge is-newarp-base
# 1.4 03-Dec-1996 cgd

branches: 1.4.2;
kill siroff() and resturcture do_sir() to be cleaner and more correct.


# 1.3 17-Nov-1996 cgd

implement a (hack-ish) set of routines to do common chained-interrupt
handler management. It's nasty, but three slightly different copies of
the code is worse.


# 1.2 09-Jul-1996 cgd

various cleanup, move setsoft* and spl* into intr.h.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.1 12-Apr-1996 cgd

the Alpha implementation of <machine/intr.h>


# 1.84 04-Jul-2021 thorpej

Reduce code duplication when setting up the interrupt handler data
structures:
- alpha_shared_intr_alloc() no longer takes a "string length" argument,
and just uses kmem_asprintf() to create an "irq %u" string by default.
This is suitable for nearly every caller.
- Add a alpha_shared_intr_set_string() that allows callers to override
the default IRQ description string.
- Related: make alpha_shared_intr_string() return a const char *, since
no callers should need to modify the string directly now.
- Re-factor PCI shared interrupt structure allocation / initialization
into a new alpha_pci_intr_alloc(), which is suitable for nearly every
Alpha PCI platform. Callers are expected to first have initialized
the interrupt hardware to the quiescent state.

Adjust various call sites of above functions to account for changes,
even if they are not able to use the newly re-factored code.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.83 10-Oct-2020 thorpej

Fix cycle counter-based time keeping on Alpha in MP environments by using
a simpler calibration algorithm for the CC timecounter. Proposed in 2018
by Naruaki Etomi:

https://mail-index.netbsd.org/tech-kern/2018/01/14/msg022940.html

This patch is largely based on the proposed change, but avoids changing
any other timecounter logic, and re-factors things a bit to keep them
as MI as possible.


# 1.82 26-Sep-2020 thorpej

Implement cpu_intr_redistribute() for Tusnami/Titan systems.


# 1.81 25-Sep-2020 thorpej

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.80 23-Sep-2020 thorpej

Use a wrapper to acquire the kernel lock for non-MPSAFE interrupts,
rather than doing it in alpha_shared_intr_establish() directly.


# 1.79 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.78 19-Sep-2020 thorpej

Move softintr bits into <machine/intr.h> and define ALPHA_ALL_SOFTINTS
for locore.s


# 1.77 17-Sep-2020 thorpej

Reduce the __HAVE_FAST_SOFTINTS #ifdef perimeter.


# 1.76 16-Sep-2020 thorpej

Implement fast soft interrupts for Alpha. It's not yet enabled, because
there is a bug lurking that causes problems when user space starts up,
so we'll stick with the slow path for now.


# 1.75 05-Sep-2020 thorpej

Track the SSIR per-cpu, rather than globally.


# 1.74 05-Sep-2020 thorpej

- Document all of the various interrupt levels in the Processor Stataus
register, and provide symbolic names for them as well.
- Use ALPHA_PSL_IPL_* values directly for IPL_*.


# 1.73 29-Aug-2020 thorpej

- Centralize per-CPU pmap initialization into a new pmap_init_cpu()
function. Call in from pmap_bootstrap() for the boot CPU, and
from cpu_hatch() for secondaary CPUs.
- Eliminiate the dedicated I-stream memory barrier IPI; handle it all from
the TLB shootdown IPI. Const poison, and add some additional memory
barriers and a TBIA to the PAUSE IPI.
- Completly rewrite TLB management in the alpha pmap module, borrowing
somoe ideas from the x86 pmap and adapting them to the alpha environment.
See the comments for theory of operation. Add a bunch of stats that
can be reported (disabled by default).
- Add some additional symbol decorations to improve cache behavior on
MP systems. Ensure coherency unit alignment for several structures
in the pmap module. Use hashed locks for pmap structures.
- Start out all new processes on the kernel page tables until their
first trip though pmap_activate() to avoid the potential of polluting
the current ASN in TLB with cross-process mappings.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base
# 1.72 14-Jan-2017 christos

fix types.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.71 19-May-2014 rmind

branches: 1.71.4; 1.71.8;
Implement MI IPI interface with cross-call support.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.70 06-Feb-2012 matt

branches: 1.70.6; 1.70.20;
Do a minor cleanup of alpha (this will make applying pullups post branching
easier).
u_int{8,16,32,64}_t -> uint{*}_t
Change all old-style definitions to C89 prototypes.
Whitespace cleanup.
Constification in db_disasm.c


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase rmind-uvmplock-base
# 1.69 07-Jun-2011 matt

branches: 1.69.2; 1.69.6;
Switch alpha to use PCU to manage the FPU.
Tested by mhitch and review by rmind.


Revision tags: cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 jym-xensuspend-base
# 1.68 22-Jun-2010 rmind

branches: 1.68.6;
Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight. Will be used for passive serialization.

OK ad@.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.67 26-Oct-2009 thorpej

branches: 1.67.2; 1.67.4;
Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base mjf-devfs2-base
# 1.66 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-nfs-mp-base
# 1.65 24-Apr-2008 he

branches: 1.65.2;
This file needs <machine/cpu.h> included, for the ALPHA_PSL_IPL_*
constants it uses.


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.64 10-Mar-2008 ad

branches: 1.64.2;
Finish moving alpha over to the MI atomic ops.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.63 04-Jan-2008 ad

branches: 1.63.2; 1.63.6;
More header file cleanup.


Revision tags: vmlocking2-base3 yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.62 03-Dec-2007 ad

branches: 1.62.6;
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.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.61 17-Oct-2007 garbled

branches: 1.61.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.60 18-May-2007 mhitch

branches: 1.60.8; 1.60.10;
Fix alpha build after idlelwp merge. I don't know why machine/cpu.h was
added here, but it does not seem to be needed now, and was resulting in a
circular dependency when sys/sched.h was changed in the yamt-idlelpw branch.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base
# 1.59 16-Feb-2007 ad

branches: 1.59.6; 1.59.8; 1.59.12; 1.59.14;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.


Revision tags: post-newlock2-merge
# 1.58 09-Feb-2007 ad

Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.57 12-Jan-2007 ad

Define ipl_cookie_t._psl as uint8_t so that it can be packed into a
word with other seldomly written fields.


# 1.56 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.55 16-Feb-2006 perry

branches: 1.55.14; 1.55.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.


# 1.54 24-Dec-2005 perry

branches: 1.54.2; 1.54.4; 1.54.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.53 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.52 03-Nov-2005 yamt

- use sys/spl.h.
- add some IPL_ definitions.


Revision tags: yamt-vop-base3
# 1.51 29-Oct-2005 yamt

pull splraiseipl() from newlock branch.


Revision tags: yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base
# 1.50 29-Mar-2005 thorpej

branches: 1.50.2; 1.50.4;
- Add a alpha_shared_intr_reset_strays() function that resets the stray
interrupt counter for a given shared interrupt descriptor.
- When an interrupt is successfully handled, reset the strays counter,
thus preventing a "slow leak" from eventually shutting off the interrupt
vector. Idea taken from pci_kn300.c (which was changed to use the new
alpha_shared_intr_reset_strays() function).


Revision tags: netbsd-2-0-3-RELEASE yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_end nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.49 27-Jul-2001 thorpej

branches: 1.49.2; 1.49.10; 1.49.22; 1.49.28; 1.49.30; 1.49.36;
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.48 15-Jul-2001 thorpej

- Tweak the pmap locking protocol slightly -- require that a pmap must
be locked before it can be marked as `active' on a processor.
- Require that pmaps other than the kernel pmap be locked when they
are passed to pmap_tlb_shootdown(). This, combined with the locking
protocol tweak, allow us to get a consistent view of `activeness' of
a pmap, which means we can optmize away a lot of TLB shootdown traffic
for user pmaps.
- Borrow an idea from the i386mp branch; use the normal SHOOTDOWN IPI
to deal with hitting the entire TLB, and garbage-collect the TBIA
and TBIAP IPIs.


# 1.47 28-Apr-2001 thorpej

branches: 1.47.2;
Add a microtime() implementation that interpolates between ticks
using the cycle counter. MP-safeness is achieved by giving each
CPU its own PCC frequency variables, and kicking the non-primary
processors via an IPI once per second.

Based on the sample code from David Mills' "A Kernel Model for
Precision Timekeeping".


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.46 20-Apr-2001 thorpej

Add splipi() to block interprocessor interrupts (which come in at IPL 5).


# 1.45 20-Apr-2001 thorpej

pmap_asn_alloc(): In a multiprocessor configuration, it's possible
to arrive here referencing the kernel_lev1map without having the
RESERVED ASN -- another CPU may have caused pmap_lev1map_destroy()
to be called, and that routine only invalidates the ASN for the
CPU that called it. So, in the MULTIPROCESSOR case, simply assign
the RESERVED ASN if we reference the kernel_lev1map rather than
asserting that we already have the RESERVED ASN. Thanks to Bill
Sommerfeld for helping me track down the problem.

Also add a new IPI that causes a CPU to re-activate its address
space if the pmap it's using changes level 1 maps (this probably
won't happen very often, but it's correct to have it).

This makes Alpha MP kernels boot multiuser. In fact, this commit
is being made from my dual-CPU AlphaServer 1200 running an MP kernel.


# 1.44 15-Apr-2001 thorpej

In splx(), don't call spl0() unless the ssir != 0.


# 1.43 15-Apr-2001 thorpej

Clean up soft interrupt related stuff a bit.


# 1.42 14-Apr-2001 thorpej

Change the softintr implementation to be a bit more cache friendly
(though, sigh, slightly more expensive at softintr_schedule() time).


# 1.41 13-Apr-2001 thorpej

Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.


# 1.40 15-Jan-2001 thorpej

branches: 1.40.2;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.39 14-Jan-2001 thorpej

Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.


# 1.38 14-Jan-2001 thorpej

Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).


# 1.37 22-Nov-2000 thorpej

Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
in the handlers themselves, and also making it possible for the
"pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
CPUs registers (and thus get e.g. a traceback) from whichever
CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
They don't have a prayer of working properly in multiprocessor
kernels, and didn't really work all that well in uniprocessor kernels.


# 1.36 20-Nov-2000 thorpej

Move IPI processing into a separate function.


# 1.35 18-Nov-2000 thorpej

Count individual interprocessor interrupts -- it's good to know where
they all come from.


# 1.34 22-Aug-2000 thorpej

Add spllock(). See spl(9) for details.


# 1.33 21-Aug-2000 thorpej

Add experimental code for pausing other CPUs upon a CPU's
entry into the debugger. While I'm here, add splsched()
as per spl(9).


# 1.32 15-Aug-2000 thorpej

Implement MP-safe lazy FP context switching, modeled on the
way Bill Sommerfeld implemented it for x86 (and bug fixes
fed back to Bill :-)


# 1.31 13-Aug-2000 thorpej

Add alpha_multicast_ipi().


# 1.30 13-Jul-2000 thorpej

Whitespace police.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.29 09-Jun-2000 cgd

make spl0() and spllowersoftclock() return void. Also, move spl0()
prototype from param.h to intr.h. (there were some big XXXs in param.h
that said to do that, and intr.h is included by param.h, so...)


# 1.28 05-Jun-2000 thorpej

Switch to the new `evcnt' mechanism for counting interrupts. Maintain
a per-CPU interrupt counter for clock, device, and interprocessor
interrupts.


# 1.27 04-Jun-2000 thorpej

Un-__P'ify kernel prototypes.


# 1.26 03-Jun-2000 thorpej

- Clean up clock interrupt code a bit, and provide a CPU_IS_PRIMARY()
macro in the MULTIPROCESSOR case (hardclock() wants it).
- Implement __GENERIC_SOFT_INTERRUPTS, and redefine the legacy
software interrupts in terms of it. Garbage-collect setsoftserial().


Revision tags: minoura-xpg4dl-base
# 1.25 23-May-2000 thorpej

branches: 1.25.2;
Rename the atomic operations to have generic machine-independent
names, and define __HAVE_ATOMIC_OPERATIONS to indicate their
existence.


# 1.24 19-Mar-2000 thorpej

Point back to the alpha_shared_intr in the intrhand structure. This
allows platform-specific code to access the `intr_private' data via
the intrhand structure.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.23 02-Dec-1999 thorpej

Move atomic operations into <machine/atomic.h>, and make them in-line
assembly, rather than function calls.

...except alpha_atomic_testset_l(), which will go away completely once
I commit the new <machine/lock.h>.


# 1.22 29-Nov-1999 thorpej

- Fix a botch in the IPI bitmasks (they were right-shifted by 1), and
add an IPI which causes the target CPU to perform AST processing when
it returns to userspace.
- Add a way to get/set a private pointer in the shared interrupt header.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.21 10-Aug-1999 thorpej

branches: 1.21.2; 1.21.8;
Use atomic operations to manipulate the SSIR, and fix a problem introduced
with the spllowersoftclock() changes where more interrupts than necessary
were blocked while software interrupts were being processed.


# 1.20 05-Aug-1999 thorpej

Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 24-Feb-1999 thorpej

Restructure the IPI code a little, allowing multiple IPIs to be sent at
once. Add a way to broadcast an IPI to all processors (except the sender,
obviously). Add an IPI for TLB shootdown.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.18 26-Sep-1998 thorpej

Add basic interprocessor interrupt sending and receiving code. Current
IPI functions: HALT, IMB, TBIA, TBIAP.

XXX HALT is not yet implemented, it's just a stub.


# 1.17 25-Sep-1998 thorpej

Minor style tweaks.


# 1.16 21-Sep-1998 matt

Add softserial to the alpha port. This significantly improved PPP
throughput on com ports.


# 1.15 01-Aug-1998 thorpej

Implement alpha_shared_intr_disestablish(). Simply removes the handler
fromthe list, allowing the caller to manipulate the sharing type,
if appropriate.


Revision tags: eeh-paddr_t-base
# 1.14 18-Jul-1998 is

Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).


# 1.13 07-Jul-1998 thorpej

On second thought, call that like the rest of the shared intr functions.


# 1.12 07-Jul-1998 thorpej

Define a macro to test if a shared interrupt should be disabled after
a stray has occurred.


# 1.11 10-Nov-1997 mjacob

Protect userland applications from the inline splraise function.


Revision tags: netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base alpha-nwscons-base
# 1.10 07-Jul-1997 cgd

branches: 1.10.6;
mark prototypes for static inline functions as possibly unused
(with __attribute__ ((unused))), to avoid generating warnings when
compiling without optimization but with the default warning flags.


# 1.9 05-Jun-1997 cgd

two more slight bogons


# 1.8 05-Jun-1997 cgd

actually, declare _splraise() as an inline function, because:
(1) it was using 'max', and some functions use a variable
of that name (*sigh*), and
(2) that makes it easier to be a bit trickier, and only call
swpipl if changing the IPL.


# 1.7 05-Jun-1997 cgd

parens around macro arg (this is an old one)


# 1.6 05-Jun-1997 cgd

make sure that splnet(), splbio(), splimp(), spltty(), splclock(),
splstatclock(), and splhigh() all _raise_ the IPL. (splhigh() is _not_
the highest possible IPL; mcheck is...)


# 1.5 06-Apr-1997 cgd

clean up NetBSD RCS ID strings


Revision tags: is-newarp-before-merge is-newarp-base
# 1.4 03-Dec-1996 cgd

branches: 1.4.2;
kill siroff() and resturcture do_sir() to be cleaner and more correct.


# 1.3 17-Nov-1996 cgd

implement a (hack-ish) set of routines to do common chained-interrupt
handler management. It's nasty, but three slightly different copies of
the code is worse.


# 1.2 09-Jul-1996 cgd

various cleanup, move setsoft* and spl* into intr.h.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.1 12-Apr-1996 cgd

the Alpha implementation of <machine/intr.h>


# 1.83 10-Oct-2020 thorpej

Fix cycle counter-based time keeping on Alpha in MP environments by using
a simpler calibration algorithm for the CC timecounter. Proposed in 2018
by Naruaki Etomi:

https://mail-index.netbsd.org/tech-kern/2018/01/14/msg022940.html

This patch is largely based on the proposed change, but avoids changing
any other timecounter logic, and re-factors things a bit to keep them
as MI as possible.


# 1.82 26-Sep-2020 thorpej

Implement cpu_intr_redistribute() for Tusnami/Titan systems.


# 1.81 25-Sep-2020 thorpej

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.80 23-Sep-2020 thorpej

Use a wrapper to acquire the kernel lock for non-MPSAFE interrupts,
rather than doing it in alpha_shared_intr_establish() directly.


# 1.79 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.78 19-Sep-2020 thorpej

Move softintr bits into <machine/intr.h> and define ALPHA_ALL_SOFTINTS
for locore.s


# 1.77 17-Sep-2020 thorpej

Reduce the __HAVE_FAST_SOFTINTS #ifdef perimeter.


# 1.76 16-Sep-2020 thorpej

Implement fast soft interrupts for Alpha. It's not yet enabled, because
there is a bug lurking that causes problems when user space starts up,
so we'll stick with the slow path for now.


# 1.75 05-Sep-2020 thorpej

Track the SSIR per-cpu, rather than globally.


# 1.74 05-Sep-2020 thorpej

- Document all of the various interrupt levels in the Processor Stataus
register, and provide symbolic names for them as well.
- Use ALPHA_PSL_IPL_* values directly for IPL_*.


# 1.73 29-Aug-2020 thorpej

- Centralize per-CPU pmap initialization into a new pmap_init_cpu()
function. Call in from pmap_bootstrap() for the boot CPU, and
from cpu_hatch() for secondaary CPUs.
- Eliminiate the dedicated I-stream memory barrier IPI; handle it all from
the TLB shootdown IPI. Const poison, and add some additional memory
barriers and a TBIA to the PAUSE IPI.
- Completly rewrite TLB management in the alpha pmap module, borrowing
somoe ideas from the x86 pmap and adapting them to the alpha environment.
See the comments for theory of operation. Add a bunch of stats that
can be reported (disabled by default).
- Add some additional symbol decorations to improve cache behavior on
MP systems. Ensure coherency unit alignment for several structures
in the pmap module. Use hashed locks for pmap structures.
- Start out all new processes on the kernel page tables until their
first trip though pmap_activate() to avoid the potential of polluting
the current ASN in TLB with cross-process mappings.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base
# 1.72 14-Jan-2017 christos

fix types.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.71 19-May-2014 rmind

branches: 1.71.4; 1.71.8;
Implement MI IPI interface with cross-call support.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.70 06-Feb-2012 matt

branches: 1.70.6; 1.70.20;
Do a minor cleanup of alpha (this will make applying pullups post branching
easier).
u_int{8,16,32,64}_t -> uint{*}_t
Change all old-style definitions to C89 prototypes.
Whitespace cleanup.
Constification in db_disasm.c


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase rmind-uvmplock-base
# 1.69 07-Jun-2011 matt

branches: 1.69.2; 1.69.6;
Switch alpha to use PCU to manage the FPU.
Tested by mhitch and review by rmind.


Revision tags: cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 jym-xensuspend-base
# 1.68 22-Jun-2010 rmind

branches: 1.68.6;
Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight. Will be used for passive serialization.

OK ad@.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.67 26-Oct-2009 thorpej

branches: 1.67.2; 1.67.4;
Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base mjf-devfs2-base
# 1.66 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-nfs-mp-base
# 1.65 24-Apr-2008 he

branches: 1.65.2;
This file needs <machine/cpu.h> included, for the ALPHA_PSL_IPL_*
constants it uses.


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.64 10-Mar-2008 ad

branches: 1.64.2;
Finish moving alpha over to the MI atomic ops.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.63 04-Jan-2008 ad

branches: 1.63.2; 1.63.6;
More header file cleanup.


Revision tags: vmlocking2-base3 yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.62 03-Dec-2007 ad

branches: 1.62.6;
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.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.61 17-Oct-2007 garbled

branches: 1.61.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.60 18-May-2007 mhitch

branches: 1.60.8; 1.60.10;
Fix alpha build after idlelwp merge. I don't know why machine/cpu.h was
added here, but it does not seem to be needed now, and was resulting in a
circular dependency when sys/sched.h was changed in the yamt-idlelpw branch.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base
# 1.59 16-Feb-2007 ad

branches: 1.59.6; 1.59.8; 1.59.12; 1.59.14;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.


Revision tags: post-newlock2-merge
# 1.58 09-Feb-2007 ad

Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.57 12-Jan-2007 ad

Define ipl_cookie_t._psl as uint8_t so that it can be packed into a
word with other seldomly written fields.


# 1.56 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.55 16-Feb-2006 perry

branches: 1.55.14; 1.55.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.


# 1.54 24-Dec-2005 perry

branches: 1.54.2; 1.54.4; 1.54.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.53 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.52 03-Nov-2005 yamt

- use sys/spl.h.
- add some IPL_ definitions.


Revision tags: yamt-vop-base3
# 1.51 29-Oct-2005 yamt

pull splraiseipl() from newlock branch.


Revision tags: yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base
# 1.50 29-Mar-2005 thorpej

branches: 1.50.2; 1.50.4;
- Add a alpha_shared_intr_reset_strays() function that resets the stray
interrupt counter for a given shared interrupt descriptor.
- When an interrupt is successfully handled, reset the strays counter,
thus preventing a "slow leak" from eventually shutting off the interrupt
vector. Idea taken from pci_kn300.c (which was changed to use the new
alpha_shared_intr_reset_strays() function).


Revision tags: netbsd-2-0-3-RELEASE yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_end nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.49 27-Jul-2001 thorpej

branches: 1.49.2; 1.49.10; 1.49.22; 1.49.28; 1.49.30; 1.49.36;
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.48 15-Jul-2001 thorpej

- Tweak the pmap locking protocol slightly -- require that a pmap must
be locked before it can be marked as `active' on a processor.
- Require that pmaps other than the kernel pmap be locked when they
are passed to pmap_tlb_shootdown(). This, combined with the locking
protocol tweak, allow us to get a consistent view of `activeness' of
a pmap, which means we can optmize away a lot of TLB shootdown traffic
for user pmaps.
- Borrow an idea from the i386mp branch; use the normal SHOOTDOWN IPI
to deal with hitting the entire TLB, and garbage-collect the TBIA
and TBIAP IPIs.


# 1.47 28-Apr-2001 thorpej

branches: 1.47.2;
Add a microtime() implementation that interpolates between ticks
using the cycle counter. MP-safeness is achieved by giving each
CPU its own PCC frequency variables, and kicking the non-primary
processors via an IPI once per second.

Based on the sample code from David Mills' "A Kernel Model for
Precision Timekeeping".


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.46 20-Apr-2001 thorpej

Add splipi() to block interprocessor interrupts (which come in at IPL 5).


# 1.45 20-Apr-2001 thorpej

pmap_asn_alloc(): In a multiprocessor configuration, it's possible
to arrive here referencing the kernel_lev1map without having the
RESERVED ASN -- another CPU may have caused pmap_lev1map_destroy()
to be called, and that routine only invalidates the ASN for the
CPU that called it. So, in the MULTIPROCESSOR case, simply assign
the RESERVED ASN if we reference the kernel_lev1map rather than
asserting that we already have the RESERVED ASN. Thanks to Bill
Sommerfeld for helping me track down the problem.

Also add a new IPI that causes a CPU to re-activate its address
space if the pmap it's using changes level 1 maps (this probably
won't happen very often, but it's correct to have it).

This makes Alpha MP kernels boot multiuser. In fact, this commit
is being made from my dual-CPU AlphaServer 1200 running an MP kernel.


# 1.44 15-Apr-2001 thorpej

In splx(), don't call spl0() unless the ssir != 0.


# 1.43 15-Apr-2001 thorpej

Clean up soft interrupt related stuff a bit.


# 1.42 14-Apr-2001 thorpej

Change the softintr implementation to be a bit more cache friendly
(though, sigh, slightly more expensive at softintr_schedule() time).


# 1.41 13-Apr-2001 thorpej

Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.


# 1.40 15-Jan-2001 thorpej

branches: 1.40.2;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.39 14-Jan-2001 thorpej

Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.


# 1.38 14-Jan-2001 thorpej

Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).


# 1.37 22-Nov-2000 thorpej

Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
in the handlers themselves, and also making it possible for the
"pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
CPUs registers (and thus get e.g. a traceback) from whichever
CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
They don't have a prayer of working properly in multiprocessor
kernels, and didn't really work all that well in uniprocessor kernels.


# 1.36 20-Nov-2000 thorpej

Move IPI processing into a separate function.


# 1.35 18-Nov-2000 thorpej

Count individual interprocessor interrupts -- it's good to know where
they all come from.


# 1.34 22-Aug-2000 thorpej

Add spllock(). See spl(9) for details.


# 1.33 21-Aug-2000 thorpej

Add experimental code for pausing other CPUs upon a CPU's
entry into the debugger. While I'm here, add splsched()
as per spl(9).


# 1.32 15-Aug-2000 thorpej

Implement MP-safe lazy FP context switching, modeled on the
way Bill Sommerfeld implemented it for x86 (and bug fixes
fed back to Bill :-)


# 1.31 13-Aug-2000 thorpej

Add alpha_multicast_ipi().


# 1.30 13-Jul-2000 thorpej

Whitespace police.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.29 09-Jun-2000 cgd

make spl0() and spllowersoftclock() return void. Also, move spl0()
prototype from param.h to intr.h. (there were some big XXXs in param.h
that said to do that, and intr.h is included by param.h, so...)


# 1.28 05-Jun-2000 thorpej

Switch to the new `evcnt' mechanism for counting interrupts. Maintain
a per-CPU interrupt counter for clock, device, and interprocessor
interrupts.


# 1.27 04-Jun-2000 thorpej

Un-__P'ify kernel prototypes.


# 1.26 03-Jun-2000 thorpej

- Clean up clock interrupt code a bit, and provide a CPU_IS_PRIMARY()
macro in the MULTIPROCESSOR case (hardclock() wants it).
- Implement __GENERIC_SOFT_INTERRUPTS, and redefine the legacy
software interrupts in terms of it. Garbage-collect setsoftserial().


Revision tags: minoura-xpg4dl-base
# 1.25 23-May-2000 thorpej

branches: 1.25.2;
Rename the atomic operations to have generic machine-independent
names, and define __HAVE_ATOMIC_OPERATIONS to indicate their
existence.


# 1.24 19-Mar-2000 thorpej

Point back to the alpha_shared_intr in the intrhand structure. This
allows platform-specific code to access the `intr_private' data via
the intrhand structure.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.23 02-Dec-1999 thorpej

Move atomic operations into <machine/atomic.h>, and make them in-line
assembly, rather than function calls.

...except alpha_atomic_testset_l(), which will go away completely once
I commit the new <machine/lock.h>.


# 1.22 29-Nov-1999 thorpej

- Fix a botch in the IPI bitmasks (they were right-shifted by 1), and
add an IPI which causes the target CPU to perform AST processing when
it returns to userspace.
- Add a way to get/set a private pointer in the shared interrupt header.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.21 10-Aug-1999 thorpej

branches: 1.21.2; 1.21.8;
Use atomic operations to manipulate the SSIR, and fix a problem introduced
with the spllowersoftclock() changes where more interrupts than necessary
were blocked while software interrupts were being processed.


# 1.20 05-Aug-1999 thorpej

Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 24-Feb-1999 thorpej

Restructure the IPI code a little, allowing multiple IPIs to be sent at
once. Add a way to broadcast an IPI to all processors (except the sender,
obviously). Add an IPI for TLB shootdown.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.18 26-Sep-1998 thorpej

Add basic interprocessor interrupt sending and receiving code. Current
IPI functions: HALT, IMB, TBIA, TBIAP.

XXX HALT is not yet implemented, it's just a stub.


# 1.17 25-Sep-1998 thorpej

Minor style tweaks.


# 1.16 21-Sep-1998 matt

Add softserial to the alpha port. This significantly improved PPP
throughput on com ports.


# 1.15 01-Aug-1998 thorpej

Implement alpha_shared_intr_disestablish(). Simply removes the handler
fromthe list, allowing the caller to manipulate the sharing type,
if appropriate.


Revision tags: eeh-paddr_t-base
# 1.14 18-Jul-1998 is

Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).


# 1.13 07-Jul-1998 thorpej

On second thought, call that like the rest of the shared intr functions.


# 1.12 07-Jul-1998 thorpej

Define a macro to test if a shared interrupt should be disabled after
a stray has occurred.


# 1.11 10-Nov-1997 mjacob

Protect userland applications from the inline splraise function.


Revision tags: netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base alpha-nwscons-base
# 1.10 07-Jul-1997 cgd

branches: 1.10.6;
mark prototypes for static inline functions as possibly unused
(with __attribute__ ((unused))), to avoid generating warnings when
compiling without optimization but with the default warning flags.


# 1.9 05-Jun-1997 cgd

two more slight bogons


# 1.8 05-Jun-1997 cgd

actually, declare _splraise() as an inline function, because:
(1) it was using 'max', and some functions use a variable
of that name (*sigh*), and
(2) that makes it easier to be a bit trickier, and only call
swpipl if changing the IPL.


# 1.7 05-Jun-1997 cgd

parens around macro arg (this is an old one)


# 1.6 05-Jun-1997 cgd

make sure that splnet(), splbio(), splimp(), spltty(), splclock(),
splstatclock(), and splhigh() all _raise_ the IPL. (splhigh() is _not_
the highest possible IPL; mcheck is...)


# 1.5 06-Apr-1997 cgd

clean up NetBSD RCS ID strings


Revision tags: is-newarp-before-merge is-newarp-base
# 1.4 03-Dec-1996 cgd

branches: 1.4.2;
kill siroff() and resturcture do_sir() to be cleaner and more correct.


# 1.3 17-Nov-1996 cgd

implement a (hack-ish) set of routines to do common chained-interrupt
handler management. It's nasty, but three slightly different copies of
the code is worse.


# 1.2 09-Jul-1996 cgd

various cleanup, move setsoft* and spl* into intr.h.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.1 12-Apr-1996 cgd

the Alpha implementation of <machine/intr.h>


# 1.82 26-Sep-2020 thorpej

Implement cpu_intr_redistribute() for Tusnami/Titan systems.


# 1.81 25-Sep-2020 thorpej

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.80 23-Sep-2020 thorpej

Use a wrapper to acquire the kernel lock for non-MPSAFE interrupts,
rather than doing it in alpha_shared_intr_establish() directly.


# 1.79 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.78 19-Sep-2020 thorpej

Move softintr bits into <machine/intr.h> and define ALPHA_ALL_SOFTINTS
for locore.s


# 1.77 17-Sep-2020 thorpej

Reduce the __HAVE_FAST_SOFTINTS #ifdef perimeter.


# 1.76 16-Sep-2020 thorpej

Implement fast soft interrupts for Alpha. It's not yet enabled, because
there is a bug lurking that causes problems when user space starts up,
so we'll stick with the slow path for now.


# 1.75 05-Sep-2020 thorpej

Track the SSIR per-cpu, rather than globally.


# 1.74 05-Sep-2020 thorpej

- Document all of the various interrupt levels in the Processor Stataus
register, and provide symbolic names for them as well.
- Use ALPHA_PSL_IPL_* values directly for IPL_*.


# 1.73 29-Aug-2020 thorpej

- Centralize per-CPU pmap initialization into a new pmap_init_cpu()
function. Call in from pmap_bootstrap() for the boot CPU, and
from cpu_hatch() for secondaary CPUs.
- Eliminiate the dedicated I-stream memory barrier IPI; handle it all from
the TLB shootdown IPI. Const poison, and add some additional memory
barriers and a TBIA to the PAUSE IPI.
- Completly rewrite TLB management in the alpha pmap module, borrowing
somoe ideas from the x86 pmap and adapting them to the alpha environment.
See the comments for theory of operation. Add a bunch of stats that
can be reported (disabled by default).
- Add some additional symbol decorations to improve cache behavior on
MP systems. Ensure coherency unit alignment for several structures
in the pmap module. Use hashed locks for pmap structures.
- Start out all new processes on the kernel page tables until their
first trip though pmap_activate() to avoid the potential of polluting
the current ASN in TLB with cross-process mappings.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base
# 1.72 14-Jan-2017 christos

fix types.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.71 19-May-2014 rmind

branches: 1.71.4; 1.71.8;
Implement MI IPI interface with cross-call support.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.70 06-Feb-2012 matt

branches: 1.70.6; 1.70.20;
Do a minor cleanup of alpha (this will make applying pullups post branching
easier).
u_int{8,16,32,64}_t -> uint{*}_t
Change all old-style definitions to C89 prototypes.
Whitespace cleanup.
Constification in db_disasm.c


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase rmind-uvmplock-base
# 1.69 07-Jun-2011 matt

branches: 1.69.2; 1.69.6;
Switch alpha to use PCU to manage the FPU.
Tested by mhitch and review by rmind.


Revision tags: cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 jym-xensuspend-base
# 1.68 22-Jun-2010 rmind

branches: 1.68.6;
Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight. Will be used for passive serialization.

OK ad@.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.67 26-Oct-2009 thorpej

branches: 1.67.2; 1.67.4;
Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base mjf-devfs2-base
# 1.66 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-nfs-mp-base
# 1.65 24-Apr-2008 he

branches: 1.65.2;
This file needs <machine/cpu.h> included, for the ALPHA_PSL_IPL_*
constants it uses.


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.64 10-Mar-2008 ad

branches: 1.64.2;
Finish moving alpha over to the MI atomic ops.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.63 04-Jan-2008 ad

branches: 1.63.2; 1.63.6;
More header file cleanup.


Revision tags: vmlocking2-base3 yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.62 03-Dec-2007 ad

branches: 1.62.6;
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.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.61 17-Oct-2007 garbled

branches: 1.61.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.60 18-May-2007 mhitch

branches: 1.60.8; 1.60.10;
Fix alpha build after idlelwp merge. I don't know why machine/cpu.h was
added here, but it does not seem to be needed now, and was resulting in a
circular dependency when sys/sched.h was changed in the yamt-idlelpw branch.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base
# 1.59 16-Feb-2007 ad

branches: 1.59.6; 1.59.8; 1.59.12; 1.59.14;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.


Revision tags: post-newlock2-merge
# 1.58 09-Feb-2007 ad

Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.57 12-Jan-2007 ad

Define ipl_cookie_t._psl as uint8_t so that it can be packed into a
word with other seldomly written fields.


# 1.56 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.55 16-Feb-2006 perry

branches: 1.55.14; 1.55.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.


# 1.54 24-Dec-2005 perry

branches: 1.54.2; 1.54.4; 1.54.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.53 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.52 03-Nov-2005 yamt

- use sys/spl.h.
- add some IPL_ definitions.


Revision tags: yamt-vop-base3
# 1.51 29-Oct-2005 yamt

pull splraiseipl() from newlock branch.


Revision tags: yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base
# 1.50 29-Mar-2005 thorpej

branches: 1.50.2; 1.50.4;
- Add a alpha_shared_intr_reset_strays() function that resets the stray
interrupt counter for a given shared interrupt descriptor.
- When an interrupt is successfully handled, reset the strays counter,
thus preventing a "slow leak" from eventually shutting off the interrupt
vector. Idea taken from pci_kn300.c (which was changed to use the new
alpha_shared_intr_reset_strays() function).


Revision tags: netbsd-2-0-3-RELEASE yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_end nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.49 27-Jul-2001 thorpej

branches: 1.49.2; 1.49.10; 1.49.22; 1.49.28; 1.49.30; 1.49.36;
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.48 15-Jul-2001 thorpej

- Tweak the pmap locking protocol slightly -- require that a pmap must
be locked before it can be marked as `active' on a processor.
- Require that pmaps other than the kernel pmap be locked when they
are passed to pmap_tlb_shootdown(). This, combined with the locking
protocol tweak, allow us to get a consistent view of `activeness' of
a pmap, which means we can optmize away a lot of TLB shootdown traffic
for user pmaps.
- Borrow an idea from the i386mp branch; use the normal SHOOTDOWN IPI
to deal with hitting the entire TLB, and garbage-collect the TBIA
and TBIAP IPIs.


# 1.47 28-Apr-2001 thorpej

branches: 1.47.2;
Add a microtime() implementation that interpolates between ticks
using the cycle counter. MP-safeness is achieved by giving each
CPU its own PCC frequency variables, and kicking the non-primary
processors via an IPI once per second.

Based on the sample code from David Mills' "A Kernel Model for
Precision Timekeeping".


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.46 20-Apr-2001 thorpej

Add splipi() to block interprocessor interrupts (which come in at IPL 5).


# 1.45 20-Apr-2001 thorpej

pmap_asn_alloc(): In a multiprocessor configuration, it's possible
to arrive here referencing the kernel_lev1map without having the
RESERVED ASN -- another CPU may have caused pmap_lev1map_destroy()
to be called, and that routine only invalidates the ASN for the
CPU that called it. So, in the MULTIPROCESSOR case, simply assign
the RESERVED ASN if we reference the kernel_lev1map rather than
asserting that we already have the RESERVED ASN. Thanks to Bill
Sommerfeld for helping me track down the problem.

Also add a new IPI that causes a CPU to re-activate its address
space if the pmap it's using changes level 1 maps (this probably
won't happen very often, but it's correct to have it).

This makes Alpha MP kernels boot multiuser. In fact, this commit
is being made from my dual-CPU AlphaServer 1200 running an MP kernel.


# 1.44 15-Apr-2001 thorpej

In splx(), don't call spl0() unless the ssir != 0.


# 1.43 15-Apr-2001 thorpej

Clean up soft interrupt related stuff a bit.


# 1.42 14-Apr-2001 thorpej

Change the softintr implementation to be a bit more cache friendly
(though, sigh, slightly more expensive at softintr_schedule() time).


# 1.41 13-Apr-2001 thorpej

Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.


# 1.40 15-Jan-2001 thorpej

branches: 1.40.2;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.39 14-Jan-2001 thorpej

Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.


# 1.38 14-Jan-2001 thorpej

Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).


# 1.37 22-Nov-2000 thorpej

Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
in the handlers themselves, and also making it possible for the
"pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
CPUs registers (and thus get e.g. a traceback) from whichever
CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
They don't have a prayer of working properly in multiprocessor
kernels, and didn't really work all that well in uniprocessor kernels.


# 1.36 20-Nov-2000 thorpej

Move IPI processing into a separate function.


# 1.35 18-Nov-2000 thorpej

Count individual interprocessor interrupts -- it's good to know where
they all come from.


# 1.34 22-Aug-2000 thorpej

Add spllock(). See spl(9) for details.


# 1.33 21-Aug-2000 thorpej

Add experimental code for pausing other CPUs upon a CPU's
entry into the debugger. While I'm here, add splsched()
as per spl(9).


# 1.32 15-Aug-2000 thorpej

Implement MP-safe lazy FP context switching, modeled on the
way Bill Sommerfeld implemented it for x86 (and bug fixes
fed back to Bill :-)


# 1.31 13-Aug-2000 thorpej

Add alpha_multicast_ipi().


# 1.30 13-Jul-2000 thorpej

Whitespace police.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.29 09-Jun-2000 cgd

make spl0() and spllowersoftclock() return void. Also, move spl0()
prototype from param.h to intr.h. (there were some big XXXs in param.h
that said to do that, and intr.h is included by param.h, so...)


# 1.28 05-Jun-2000 thorpej

Switch to the new `evcnt' mechanism for counting interrupts. Maintain
a per-CPU interrupt counter for clock, device, and interprocessor
interrupts.


# 1.27 04-Jun-2000 thorpej

Un-__P'ify kernel prototypes.


# 1.26 03-Jun-2000 thorpej

- Clean up clock interrupt code a bit, and provide a CPU_IS_PRIMARY()
macro in the MULTIPROCESSOR case (hardclock() wants it).
- Implement __GENERIC_SOFT_INTERRUPTS, and redefine the legacy
software interrupts in terms of it. Garbage-collect setsoftserial().


Revision tags: minoura-xpg4dl-base
# 1.25 23-May-2000 thorpej

branches: 1.25.2;
Rename the atomic operations to have generic machine-independent
names, and define __HAVE_ATOMIC_OPERATIONS to indicate their
existence.


# 1.24 19-Mar-2000 thorpej

Point back to the alpha_shared_intr in the intrhand structure. This
allows platform-specific code to access the `intr_private' data via
the intrhand structure.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.23 02-Dec-1999 thorpej

Move atomic operations into <machine/atomic.h>, and make them in-line
assembly, rather than function calls.

...except alpha_atomic_testset_l(), which will go away completely once
I commit the new <machine/lock.h>.


# 1.22 29-Nov-1999 thorpej

- Fix a botch in the IPI bitmasks (they were right-shifted by 1), and
add an IPI which causes the target CPU to perform AST processing when
it returns to userspace.
- Add a way to get/set a private pointer in the shared interrupt header.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.21 10-Aug-1999 thorpej

branches: 1.21.2; 1.21.8;
Use atomic operations to manipulate the SSIR, and fix a problem introduced
with the spllowersoftclock() changes where more interrupts than necessary
were blocked while software interrupts were being processed.


# 1.20 05-Aug-1999 thorpej

Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 24-Feb-1999 thorpej

Restructure the IPI code a little, allowing multiple IPIs to be sent at
once. Add a way to broadcast an IPI to all processors (except the sender,
obviously). Add an IPI for TLB shootdown.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.18 26-Sep-1998 thorpej

Add basic interprocessor interrupt sending and receiving code. Current
IPI functions: HALT, IMB, TBIA, TBIAP.

XXX HALT is not yet implemented, it's just a stub.


# 1.17 25-Sep-1998 thorpej

Minor style tweaks.


# 1.16 21-Sep-1998 matt

Add softserial to the alpha port. This significantly improved PPP
throughput on com ports.


# 1.15 01-Aug-1998 thorpej

Implement alpha_shared_intr_disestablish(). Simply removes the handler
fromthe list, allowing the caller to manipulate the sharing type,
if appropriate.


Revision tags: eeh-paddr_t-base
# 1.14 18-Jul-1998 is

Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).


# 1.13 07-Jul-1998 thorpej

On second thought, call that like the rest of the shared intr functions.


# 1.12 07-Jul-1998 thorpej

Define a macro to test if a shared interrupt should be disabled after
a stray has occurred.


# 1.11 10-Nov-1997 mjacob

Protect userland applications from the inline splraise function.


Revision tags: netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base alpha-nwscons-base
# 1.10 07-Jul-1997 cgd

branches: 1.10.6;
mark prototypes for static inline functions as possibly unused
(with __attribute__ ((unused))), to avoid generating warnings when
compiling without optimization but with the default warning flags.


# 1.9 05-Jun-1997 cgd

two more slight bogons


# 1.8 05-Jun-1997 cgd

actually, declare _splraise() as an inline function, because:
(1) it was using 'max', and some functions use a variable
of that name (*sigh*), and
(2) that makes it easier to be a bit trickier, and only call
swpipl if changing the IPL.


# 1.7 05-Jun-1997 cgd

parens around macro arg (this is an old one)


# 1.6 05-Jun-1997 cgd

make sure that splnet(), splbio(), splimp(), spltty(), splclock(),
splstatclock(), and splhigh() all _raise_ the IPL. (splhigh() is _not_
the highest possible IPL; mcheck is...)


# 1.5 06-Apr-1997 cgd

clean up NetBSD RCS ID strings


Revision tags: is-newarp-before-merge is-newarp-base
# 1.4 03-Dec-1996 cgd

branches: 1.4.2;
kill siroff() and resturcture do_sir() to be cleaner and more correct.


# 1.3 17-Nov-1996 cgd

implement a (hack-ish) set of routines to do common chained-interrupt
handler management. It's nasty, but three slightly different copies of
the code is worse.


# 1.2 09-Jul-1996 cgd

various cleanup, move setsoft* and spl* into intr.h.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.1 12-Apr-1996 cgd

the Alpha implementation of <machine/intr.h>


# 1.75 05-Sep-2020 thorpej

Track the SSIR per-cpu, rather than globally.


# 1.74 05-Sep-2020 thorpej

- Document all of the various interrupt levels in the Processor Stataus
register, and provide symbolic names for them as well.
- Use ALPHA_PSL_IPL_* values directly for IPL_*.


# 1.73 29-Aug-2020 thorpej

- Centralize per-CPU pmap initialization into a new pmap_init_cpu()
function. Call in from pmap_bootstrap() for the boot CPU, and
from cpu_hatch() for secondaary CPUs.
- Eliminiate the dedicated I-stream memory barrier IPI; handle it all from
the TLB shootdown IPI. Const poison, and add some additional memory
barriers and a TBIA to the PAUSE IPI.
- Completly rewrite TLB management in the alpha pmap module, borrowing
somoe ideas from the x86 pmap and adapting them to the alpha environment.
See the comments for theory of operation. Add a bunch of stats that
can be reported (disabled by default).
- Add some additional symbol decorations to improve cache behavior on
MP systems. Ensure coherency unit alignment for several structures
in the pmap module. Use hashed locks for pmap structures.
- Start out all new processes on the kernel page tables until their
first trip though pmap_activate() to avoid the potential of polluting
the current ASN in TLB with cross-process mappings.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base
# 1.72 14-Jan-2017 christos

fix types.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.71 19-May-2014 rmind

branches: 1.71.4; 1.71.8;
Implement MI IPI interface with cross-call support.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.70 06-Feb-2012 matt

branches: 1.70.6; 1.70.20;
Do a minor cleanup of alpha (this will make applying pullups post branching
easier).
u_int{8,16,32,64}_t -> uint{*}_t
Change all old-style definitions to C89 prototypes.
Whitespace cleanup.
Constification in db_disasm.c


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase rmind-uvmplock-base
# 1.69 07-Jun-2011 matt

branches: 1.69.2; 1.69.6;
Switch alpha to use PCU to manage the FPU.
Tested by mhitch and review by rmind.


Revision tags: cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 jym-xensuspend-base
# 1.68 22-Jun-2010 rmind

branches: 1.68.6;
Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight. Will be used for passive serialization.

OK ad@.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.67 26-Oct-2009 thorpej

branches: 1.67.2; 1.67.4;
Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base mjf-devfs2-base
# 1.66 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-nfs-mp-base
# 1.65 24-Apr-2008 he

branches: 1.65.2;
This file needs <machine/cpu.h> included, for the ALPHA_PSL_IPL_*
constants it uses.


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.64 10-Mar-2008 ad

branches: 1.64.2;
Finish moving alpha over to the MI atomic ops.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.63 04-Jan-2008 ad

branches: 1.63.2; 1.63.6;
More header file cleanup.


Revision tags: vmlocking2-base3 yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.62 03-Dec-2007 ad

branches: 1.62.6;
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.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.61 17-Oct-2007 garbled

branches: 1.61.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.60 18-May-2007 mhitch

branches: 1.60.8; 1.60.10;
Fix alpha build after idlelwp merge. I don't know why machine/cpu.h was
added here, but it does not seem to be needed now, and was resulting in a
circular dependency when sys/sched.h was changed in the yamt-idlelpw branch.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base
# 1.59 16-Feb-2007 ad

branches: 1.59.6; 1.59.8; 1.59.12; 1.59.14;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.


Revision tags: post-newlock2-merge
# 1.58 09-Feb-2007 ad

Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.57 12-Jan-2007 ad

Define ipl_cookie_t._psl as uint8_t so that it can be packed into a
word with other seldomly written fields.


# 1.56 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.55 16-Feb-2006 perry

branches: 1.55.14; 1.55.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.


# 1.54 24-Dec-2005 perry

branches: 1.54.2; 1.54.4; 1.54.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.53 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.52 03-Nov-2005 yamt

- use sys/spl.h.
- add some IPL_ definitions.


Revision tags: yamt-vop-base3
# 1.51 29-Oct-2005 yamt

pull splraiseipl() from newlock branch.


Revision tags: yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base
# 1.50 29-Mar-2005 thorpej

branches: 1.50.2; 1.50.4;
- Add a alpha_shared_intr_reset_strays() function that resets the stray
interrupt counter for a given shared interrupt descriptor.
- When an interrupt is successfully handled, reset the strays counter,
thus preventing a "slow leak" from eventually shutting off the interrupt
vector. Idea taken from pci_kn300.c (which was changed to use the new
alpha_shared_intr_reset_strays() function).


Revision tags: netbsd-2-0-3-RELEASE yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_end nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.49 27-Jul-2001 thorpej

branches: 1.49.2; 1.49.10; 1.49.22; 1.49.28; 1.49.30; 1.49.36;
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.48 15-Jul-2001 thorpej

- Tweak the pmap locking protocol slightly -- require that a pmap must
be locked before it can be marked as `active' on a processor.
- Require that pmaps other than the kernel pmap be locked when they
are passed to pmap_tlb_shootdown(). This, combined with the locking
protocol tweak, allow us to get a consistent view of `activeness' of
a pmap, which means we can optmize away a lot of TLB shootdown traffic
for user pmaps.
- Borrow an idea from the i386mp branch; use the normal SHOOTDOWN IPI
to deal with hitting the entire TLB, and garbage-collect the TBIA
and TBIAP IPIs.


# 1.47 28-Apr-2001 thorpej

branches: 1.47.2;
Add a microtime() implementation that interpolates between ticks
using the cycle counter. MP-safeness is achieved by giving each
CPU its own PCC frequency variables, and kicking the non-primary
processors via an IPI once per second.

Based on the sample code from David Mills' "A Kernel Model for
Precision Timekeeping".


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.46 20-Apr-2001 thorpej

Add splipi() to block interprocessor interrupts (which come in at IPL 5).


# 1.45 20-Apr-2001 thorpej

pmap_asn_alloc(): In a multiprocessor configuration, it's possible
to arrive here referencing the kernel_lev1map without having the
RESERVED ASN -- another CPU may have caused pmap_lev1map_destroy()
to be called, and that routine only invalidates the ASN for the
CPU that called it. So, in the MULTIPROCESSOR case, simply assign
the RESERVED ASN if we reference the kernel_lev1map rather than
asserting that we already have the RESERVED ASN. Thanks to Bill
Sommerfeld for helping me track down the problem.

Also add a new IPI that causes a CPU to re-activate its address
space if the pmap it's using changes level 1 maps (this probably
won't happen very often, but it's correct to have it).

This makes Alpha MP kernels boot multiuser. In fact, this commit
is being made from my dual-CPU AlphaServer 1200 running an MP kernel.


# 1.44 15-Apr-2001 thorpej

In splx(), don't call spl0() unless the ssir != 0.


# 1.43 15-Apr-2001 thorpej

Clean up soft interrupt related stuff a bit.


# 1.42 14-Apr-2001 thorpej

Change the softintr implementation to be a bit more cache friendly
(though, sigh, slightly more expensive at softintr_schedule() time).


# 1.41 13-Apr-2001 thorpej

Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.


# 1.40 15-Jan-2001 thorpej

branches: 1.40.2;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.39 14-Jan-2001 thorpej

Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.


# 1.38 14-Jan-2001 thorpej

Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).


# 1.37 22-Nov-2000 thorpej

Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
in the handlers themselves, and also making it possible for the
"pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
CPUs registers (and thus get e.g. a traceback) from whichever
CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
They don't have a prayer of working properly in multiprocessor
kernels, and didn't really work all that well in uniprocessor kernels.


# 1.36 20-Nov-2000 thorpej

Move IPI processing into a separate function.


# 1.35 18-Nov-2000 thorpej

Count individual interprocessor interrupts -- it's good to know where
they all come from.


# 1.34 22-Aug-2000 thorpej

Add spllock(). See spl(9) for details.


# 1.33 21-Aug-2000 thorpej

Add experimental code for pausing other CPUs upon a CPU's
entry into the debugger. While I'm here, add splsched()
as per spl(9).


# 1.32 15-Aug-2000 thorpej

Implement MP-safe lazy FP context switching, modeled on the
way Bill Sommerfeld implemented it for x86 (and bug fixes
fed back to Bill :-)


# 1.31 13-Aug-2000 thorpej

Add alpha_multicast_ipi().


# 1.30 13-Jul-2000 thorpej

Whitespace police.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.29 09-Jun-2000 cgd

make spl0() and spllowersoftclock() return void. Also, move spl0()
prototype from param.h to intr.h. (there were some big XXXs in param.h
that said to do that, and intr.h is included by param.h, so...)


# 1.28 05-Jun-2000 thorpej

Switch to the new `evcnt' mechanism for counting interrupts. Maintain
a per-CPU interrupt counter for clock, device, and interprocessor
interrupts.


# 1.27 04-Jun-2000 thorpej

Un-__P'ify kernel prototypes.


# 1.26 03-Jun-2000 thorpej

- Clean up clock interrupt code a bit, and provide a CPU_IS_PRIMARY()
macro in the MULTIPROCESSOR case (hardclock() wants it).
- Implement __GENERIC_SOFT_INTERRUPTS, and redefine the legacy
software interrupts in terms of it. Garbage-collect setsoftserial().


Revision tags: minoura-xpg4dl-base
# 1.25 23-May-2000 thorpej

branches: 1.25.2;
Rename the atomic operations to have generic machine-independent
names, and define __HAVE_ATOMIC_OPERATIONS to indicate their
existence.


# 1.24 19-Mar-2000 thorpej

Point back to the alpha_shared_intr in the intrhand structure. This
allows platform-specific code to access the `intr_private' data via
the intrhand structure.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.23 02-Dec-1999 thorpej

Move atomic operations into <machine/atomic.h>, and make them in-line
assembly, rather than function calls.

...except alpha_atomic_testset_l(), which will go away completely once
I commit the new <machine/lock.h>.


# 1.22 29-Nov-1999 thorpej

- Fix a botch in the IPI bitmasks (they were right-shifted by 1), and
add an IPI which causes the target CPU to perform AST processing when
it returns to userspace.
- Add a way to get/set a private pointer in the shared interrupt header.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.21 10-Aug-1999 thorpej

branches: 1.21.2; 1.21.8;
Use atomic operations to manipulate the SSIR, and fix a problem introduced
with the spllowersoftclock() changes where more interrupts than necessary
were blocked while software interrupts were being processed.


# 1.20 05-Aug-1999 thorpej

Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 24-Feb-1999 thorpej

Restructure the IPI code a little, allowing multiple IPIs to be sent at
once. Add a way to broadcast an IPI to all processors (except the sender,
obviously). Add an IPI for TLB shootdown.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.18 26-Sep-1998 thorpej

Add basic interprocessor interrupt sending and receiving code. Current
IPI functions: HALT, IMB, TBIA, TBIAP.

XXX HALT is not yet implemented, it's just a stub.


# 1.17 25-Sep-1998 thorpej

Minor style tweaks.


# 1.16 21-Sep-1998 matt

Add softserial to the alpha port. This significantly improved PPP
throughput on com ports.


# 1.15 01-Aug-1998 thorpej

Implement alpha_shared_intr_disestablish(). Simply removes the handler
fromthe list, allowing the caller to manipulate the sharing type,
if appropriate.


Revision tags: eeh-paddr_t-base
# 1.14 18-Jul-1998 is

Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).


# 1.13 07-Jul-1998 thorpej

On second thought, call that like the rest of the shared intr functions.


# 1.12 07-Jul-1998 thorpej

Define a macro to test if a shared interrupt should be disabled after
a stray has occurred.


# 1.11 10-Nov-1997 mjacob

Protect userland applications from the inline splraise function.


Revision tags: netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base alpha-nwscons-base
# 1.10 07-Jul-1997 cgd

branches: 1.10.6;
mark prototypes for static inline functions as possibly unused
(with __attribute__ ((unused))), to avoid generating warnings when
compiling without optimization but with the default warning flags.


# 1.9 05-Jun-1997 cgd

two more slight bogons


# 1.8 05-Jun-1997 cgd

actually, declare _splraise() as an inline function, because:
(1) it was using 'max', and some functions use a variable
of that name (*sigh*), and
(2) that makes it easier to be a bit trickier, and only call
swpipl if changing the IPL.


# 1.7 05-Jun-1997 cgd

parens around macro arg (this is an old one)


# 1.6 05-Jun-1997 cgd

make sure that splnet(), splbio(), splimp(), spltty(), splclock(),
splstatclock(), and splhigh() all _raise_ the IPL. (splhigh() is _not_
the highest possible IPL; mcheck is...)


# 1.5 06-Apr-1997 cgd

clean up NetBSD RCS ID strings


Revision tags: is-newarp-before-merge is-newarp-base
# 1.4 03-Dec-1996 cgd

branches: 1.4.2;
kill siroff() and resturcture do_sir() to be cleaner and more correct.


# 1.3 17-Nov-1996 cgd

implement a (hack-ish) set of routines to do common chained-interrupt
handler management. It's nasty, but three slightly different copies of
the code is worse.


# 1.2 09-Jul-1996 cgd

various cleanup, move setsoft* and spl* into intr.h.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.1 12-Apr-1996 cgd

the Alpha implementation of <machine/intr.h>


# 1.73 29-Aug-2020 thorpej

- Centralize per-CPU pmap initialization into a new pmap_init_cpu()
function. Call in from pmap_bootstrap() for the boot CPU, and
from cpu_hatch() for secondaary CPUs.
- Eliminiate the dedicated I-stream memory barrier IPI; handle it all from
the TLB shootdown IPI. Const poison, and add some additional memory
barriers and a TBIA to the PAUSE IPI.
- Completly rewrite TLB management in the alpha pmap module, borrowing
somoe ideas from the x86 pmap and adapting them to the alpha environment.
See the comments for theory of operation. Add a bunch of stats that
can be reported (disabled by default).
- Add some additional symbol decorations to improve cache behavior on
MP systems. Ensure coherency unit alignment for several structures
in the pmap module. Use hashed locks for pmap structures.
- Start out all new processes on the kernel page tables until their
first trip though pmap_activate() to avoid the potential of polluting
the current ASN in TLB with cross-process mappings.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base
# 1.72 14-Jan-2017 christos

fix types.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.71 19-May-2014 rmind

branches: 1.71.4; 1.71.8;
Implement MI IPI interface with cross-call support.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.70 06-Feb-2012 matt

branches: 1.70.6; 1.70.20;
Do a minor cleanup of alpha (this will make applying pullups post branching
easier).
u_int{8,16,32,64}_t -> uint{*}_t
Change all old-style definitions to C89 prototypes.
Whitespace cleanup.
Constification in db_disasm.c


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase rmind-uvmplock-base
# 1.69 07-Jun-2011 matt

branches: 1.69.2; 1.69.6;
Switch alpha to use PCU to manage the FPU.
Tested by mhitch and review by rmind.


Revision tags: cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 jym-xensuspend-base
# 1.68 22-Jun-2010 rmind

branches: 1.68.6;
Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight. Will be used for passive serialization.

OK ad@.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.67 26-Oct-2009 thorpej

branches: 1.67.2; 1.67.4;
Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base mjf-devfs2-base
# 1.66 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-nfs-mp-base
# 1.65 24-Apr-2008 he

branches: 1.65.2;
This file needs <machine/cpu.h> included, for the ALPHA_PSL_IPL_*
constants it uses.


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.64 10-Mar-2008 ad

branches: 1.64.2;
Finish moving alpha over to the MI atomic ops.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.63 04-Jan-2008 ad

branches: 1.63.2; 1.63.6;
More header file cleanup.


Revision tags: vmlocking2-base3 yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.62 03-Dec-2007 ad

branches: 1.62.6;
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.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.61 17-Oct-2007 garbled

branches: 1.61.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.60 18-May-2007 mhitch

branches: 1.60.8; 1.60.10;
Fix alpha build after idlelwp merge. I don't know why machine/cpu.h was
added here, but it does not seem to be needed now, and was resulting in a
circular dependency when sys/sched.h was changed in the yamt-idlelpw branch.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base
# 1.59 16-Feb-2007 ad

branches: 1.59.6; 1.59.8; 1.59.12; 1.59.14;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.


Revision tags: post-newlock2-merge
# 1.58 09-Feb-2007 ad

Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.57 12-Jan-2007 ad

Define ipl_cookie_t._psl as uint8_t so that it can be packed into a
word with other seldomly written fields.


# 1.56 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.55 16-Feb-2006 perry

branches: 1.55.14; 1.55.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.


# 1.54 24-Dec-2005 perry

branches: 1.54.2; 1.54.4; 1.54.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.53 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.52 03-Nov-2005 yamt

- use sys/spl.h.
- add some IPL_ definitions.


Revision tags: yamt-vop-base3
# 1.51 29-Oct-2005 yamt

pull splraiseipl() from newlock branch.


Revision tags: yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base
# 1.50 29-Mar-2005 thorpej

branches: 1.50.2; 1.50.4;
- Add a alpha_shared_intr_reset_strays() function that resets the stray
interrupt counter for a given shared interrupt descriptor.
- When an interrupt is successfully handled, reset the strays counter,
thus preventing a "slow leak" from eventually shutting off the interrupt
vector. Idea taken from pci_kn300.c (which was changed to use the new
alpha_shared_intr_reset_strays() function).


Revision tags: netbsd-2-0-3-RELEASE yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_end nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.49 27-Jul-2001 thorpej

branches: 1.49.2; 1.49.10; 1.49.22; 1.49.28; 1.49.30; 1.49.36;
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.48 15-Jul-2001 thorpej

- Tweak the pmap locking protocol slightly -- require that a pmap must
be locked before it can be marked as `active' on a processor.
- Require that pmaps other than the kernel pmap be locked when they
are passed to pmap_tlb_shootdown(). This, combined with the locking
protocol tweak, allow us to get a consistent view of `activeness' of
a pmap, which means we can optmize away a lot of TLB shootdown traffic
for user pmaps.
- Borrow an idea from the i386mp branch; use the normal SHOOTDOWN IPI
to deal with hitting the entire TLB, and garbage-collect the TBIA
and TBIAP IPIs.


# 1.47 28-Apr-2001 thorpej

branches: 1.47.2;
Add a microtime() implementation that interpolates between ticks
using the cycle counter. MP-safeness is achieved by giving each
CPU its own PCC frequency variables, and kicking the non-primary
processors via an IPI once per second.

Based on the sample code from David Mills' "A Kernel Model for
Precision Timekeeping".


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.46 20-Apr-2001 thorpej

Add splipi() to block interprocessor interrupts (which come in at IPL 5).


# 1.45 20-Apr-2001 thorpej

pmap_asn_alloc(): In a multiprocessor configuration, it's possible
to arrive here referencing the kernel_lev1map without having the
RESERVED ASN -- another CPU may have caused pmap_lev1map_destroy()
to be called, and that routine only invalidates the ASN for the
CPU that called it. So, in the MULTIPROCESSOR case, simply assign
the RESERVED ASN if we reference the kernel_lev1map rather than
asserting that we already have the RESERVED ASN. Thanks to Bill
Sommerfeld for helping me track down the problem.

Also add a new IPI that causes a CPU to re-activate its address
space if the pmap it's using changes level 1 maps (this probably
won't happen very often, but it's correct to have it).

This makes Alpha MP kernels boot multiuser. In fact, this commit
is being made from my dual-CPU AlphaServer 1200 running an MP kernel.


# 1.44 15-Apr-2001 thorpej

In splx(), don't call spl0() unless the ssir != 0.


# 1.43 15-Apr-2001 thorpej

Clean up soft interrupt related stuff a bit.


# 1.42 14-Apr-2001 thorpej

Change the softintr implementation to be a bit more cache friendly
(though, sigh, slightly more expensive at softintr_schedule() time).


# 1.41 13-Apr-2001 thorpej

Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.


# 1.40 15-Jan-2001 thorpej

branches: 1.40.2;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.39 14-Jan-2001 thorpej

Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.


# 1.38 14-Jan-2001 thorpej

Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).


# 1.37 22-Nov-2000 thorpej

Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
in the handlers themselves, and also making it possible for the
"pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
CPUs registers (and thus get e.g. a traceback) from whichever
CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
They don't have a prayer of working properly in multiprocessor
kernels, and didn't really work all that well in uniprocessor kernels.


# 1.36 20-Nov-2000 thorpej

Move IPI processing into a separate function.


# 1.35 18-Nov-2000 thorpej

Count individual interprocessor interrupts -- it's good to know where
they all come from.


# 1.34 22-Aug-2000 thorpej

Add spllock(). See spl(9) for details.


# 1.33 21-Aug-2000 thorpej

Add experimental code for pausing other CPUs upon a CPU's
entry into the debugger. While I'm here, add splsched()
as per spl(9).


# 1.32 15-Aug-2000 thorpej

Implement MP-safe lazy FP context switching, modeled on the
way Bill Sommerfeld implemented it for x86 (and bug fixes
fed back to Bill :-)


# 1.31 13-Aug-2000 thorpej

Add alpha_multicast_ipi().


# 1.30 13-Jul-2000 thorpej

Whitespace police.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.29 09-Jun-2000 cgd

make spl0() and spllowersoftclock() return void. Also, move spl0()
prototype from param.h to intr.h. (there were some big XXXs in param.h
that said to do that, and intr.h is included by param.h, so...)


# 1.28 05-Jun-2000 thorpej

Switch to the new `evcnt' mechanism for counting interrupts. Maintain
a per-CPU interrupt counter for clock, device, and interprocessor
interrupts.


# 1.27 04-Jun-2000 thorpej

Un-__P'ify kernel prototypes.


# 1.26 03-Jun-2000 thorpej

- Clean up clock interrupt code a bit, and provide a CPU_IS_PRIMARY()
macro in the MULTIPROCESSOR case (hardclock() wants it).
- Implement __GENERIC_SOFT_INTERRUPTS, and redefine the legacy
software interrupts in terms of it. Garbage-collect setsoftserial().


Revision tags: minoura-xpg4dl-base
# 1.25 23-May-2000 thorpej

branches: 1.25.2;
Rename the atomic operations to have generic machine-independent
names, and define __HAVE_ATOMIC_OPERATIONS to indicate their
existence.


# 1.24 19-Mar-2000 thorpej

Point back to the alpha_shared_intr in the intrhand structure. This
allows platform-specific code to access the `intr_private' data via
the intrhand structure.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.23 02-Dec-1999 thorpej

Move atomic operations into <machine/atomic.h>, and make them in-line
assembly, rather than function calls.

...except alpha_atomic_testset_l(), which will go away completely once
I commit the new <machine/lock.h>.


# 1.22 29-Nov-1999 thorpej

- Fix a botch in the IPI bitmasks (they were right-shifted by 1), and
add an IPI which causes the target CPU to perform AST processing when
it returns to userspace.
- Add a way to get/set a private pointer in the shared interrupt header.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.21 10-Aug-1999 thorpej

branches: 1.21.2; 1.21.8;
Use atomic operations to manipulate the SSIR, and fix a problem introduced
with the spllowersoftclock() changes where more interrupts than necessary
were blocked while software interrupts were being processed.


# 1.20 05-Aug-1999 thorpej

Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 24-Feb-1999 thorpej

Restructure the IPI code a little, allowing multiple IPIs to be sent at
once. Add a way to broadcast an IPI to all processors (except the sender,
obviously). Add an IPI for TLB shootdown.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.18 26-Sep-1998 thorpej

Add basic interprocessor interrupt sending and receiving code. Current
IPI functions: HALT, IMB, TBIA, TBIAP.

XXX HALT is not yet implemented, it's just a stub.


# 1.17 25-Sep-1998 thorpej

Minor style tweaks.


# 1.16 21-Sep-1998 matt

Add softserial to the alpha port. This significantly improved PPP
throughput on com ports.


# 1.15 01-Aug-1998 thorpej

Implement alpha_shared_intr_disestablish(). Simply removes the handler
fromthe list, allowing the caller to manipulate the sharing type,
if appropriate.


Revision tags: eeh-paddr_t-base
# 1.14 18-Jul-1998 is

Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).


# 1.13 07-Jul-1998 thorpej

On second thought, call that like the rest of the shared intr functions.


# 1.12 07-Jul-1998 thorpej

Define a macro to test if a shared interrupt should be disabled after
a stray has occurred.


# 1.11 10-Nov-1997 mjacob

Protect userland applications from the inline splraise function.


Revision tags: netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base alpha-nwscons-base
# 1.10 07-Jul-1997 cgd

branches: 1.10.6;
mark prototypes for static inline functions as possibly unused
(with __attribute__ ((unused))), to avoid generating warnings when
compiling without optimization but with the default warning flags.


# 1.9 05-Jun-1997 cgd

two more slight bogons


# 1.8 05-Jun-1997 cgd

actually, declare _splraise() as an inline function, because:
(1) it was using 'max', and some functions use a variable
of that name (*sigh*), and
(2) that makes it easier to be a bit trickier, and only call
swpipl if changing the IPL.


# 1.7 05-Jun-1997 cgd

parens around macro arg (this is an old one)


# 1.6 05-Jun-1997 cgd

make sure that splnet(), splbio(), splimp(), spltty(), splclock(),
splstatclock(), and splhigh() all _raise_ the IPL. (splhigh() is _not_
the highest possible IPL; mcheck is...)


# 1.5 06-Apr-1997 cgd

clean up NetBSD RCS ID strings


Revision tags: is-newarp-before-merge is-newarp-base
# 1.4 03-Dec-1996 cgd

branches: 1.4.2;
kill siroff() and resturcture do_sir() to be cleaner and more correct.


# 1.3 17-Nov-1996 cgd

implement a (hack-ish) set of routines to do common chained-interrupt
handler management. It's nasty, but three slightly different copies of
the code is worse.


# 1.2 09-Jul-1996 cgd

various cleanup, move setsoft* and spl* into intr.h.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.1 12-Apr-1996 cgd

the Alpha implementation of <machine/intr.h>


# 1.72 14-Jan-2017 christos

fix types.


Revision tags: pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.71 19-May-2014 rmind

Implement MI IPI interface with cross-call support.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.70 06-Feb-2012 matt

branches: 1.70.6; 1.70.20;
Do a minor cleanup of alpha (this will make applying pullups post branching
easier).
u_int{8,16,32,64}_t -> uint{*}_t
Change all old-style definitions to C89 prototypes.
Whitespace cleanup.
Constification in db_disasm.c


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase rmind-uvmplock-base
# 1.69 07-Jun-2011 matt

branches: 1.69.2; 1.69.6;
Switch alpha to use PCU to manage the FPU.
Tested by mhitch and review by rmind.


Revision tags: cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 jym-xensuspend-base
# 1.68 22-Jun-2010 rmind

branches: 1.68.6;
Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight. Will be used for passive serialization.

OK ad@.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.67 26-Oct-2009 thorpej

branches: 1.67.2; 1.67.4;
Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base mjf-devfs2-base
# 1.66 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-nfs-mp-base
# 1.65 24-Apr-2008 he

branches: 1.65.2;
This file needs <machine/cpu.h> included, for the ALPHA_PSL_IPL_*
constants it uses.


Revision tags: yamt-pf42-baseX yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.64 10-Mar-2008 ad

branches: 1.64.2;
Finish moving alpha over to the MI atomic ops.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.63 04-Jan-2008 ad

branches: 1.63.2; 1.63.6;
More header file cleanup.


Revision tags: vmlocking2-base3 yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.62 03-Dec-2007 ad

branches: 1.62.6;
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.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.61 17-Oct-2007 garbled

branches: 1.61.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.60 18-May-2007 mhitch

branches: 1.60.8; 1.60.10;
Fix alpha build after idlelwp merge. I don't know why machine/cpu.h was
added here, but it does not seem to be needed now, and was resulting in a
circular dependency when sys/sched.h was changed in the yamt-idlelpw branch.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base
# 1.59 16-Feb-2007 ad

branches: 1.59.6; 1.59.8; 1.59.12; 1.59.14;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.


Revision tags: post-newlock2-merge
# 1.58 09-Feb-2007 ad

Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.57 12-Jan-2007 ad

Define ipl_cookie_t._psl as uint8_t so that it can be packed into a
word with other seldomly written fields.


# 1.56 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.55 16-Feb-2006 perry

branches: 1.55.14; 1.55.16;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.


# 1.54 24-Dec-2005 perry

branches: 1.54.2; 1.54.4; 1.54.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.53 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.52 03-Nov-2005 yamt

- use sys/spl.h.
- add some IPL_ definitions.


Revision tags: yamt-vop-base3
# 1.51 29-Oct-2005 yamt

pull splraiseipl() from newlock branch.


Revision tags: yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base
# 1.50 29-Mar-2005 thorpej

branches: 1.50.2; 1.50.4;
- Add a alpha_shared_intr_reset_strays() function that resets the stray
interrupt counter for a given shared interrupt descriptor.
- When an interrupt is successfully handled, reset the strays counter,
thus preventing a "slow leak" from eventually shutting off the interrupt
vector. Idea taken from pci_kn300.c (which was changed to use the new
alpha_shared_intr_reset_strays() function).


Revision tags: netbsd-2-0-3-RELEASE yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_end nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.49 27-Jul-2001 thorpej

branches: 1.49.2; 1.49.10; 1.49.22; 1.49.28; 1.49.30; 1.49.36;
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.48 15-Jul-2001 thorpej

- Tweak the pmap locking protocol slightly -- require that a pmap must
be locked before it can be marked as `active' on a processor.
- Require that pmaps other than the kernel pmap be locked when they
are passed to pmap_tlb_shootdown(). This, combined with the locking
protocol tweak, allow us to get a consistent view of `activeness' of
a pmap, which means we can optmize away a lot of TLB shootdown traffic
for user pmaps.
- Borrow an idea from the i386mp branch; use the normal SHOOTDOWN IPI
to deal with hitting the entire TLB, and garbage-collect the TBIA
and TBIAP IPIs.


# 1.47 28-Apr-2001 thorpej

branches: 1.47.2;
Add a microtime() implementation that interpolates between ticks
using the cycle counter. MP-safeness is achieved by giving each
CPU its own PCC frequency variables, and kicking the non-primary
processors via an IPI once per second.

Based on the sample code from David Mills' "A Kernel Model for
Precision Timekeeping".


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.46 20-Apr-2001 thorpej

Add splipi() to block interprocessor interrupts (which come in at IPL 5).


# 1.45 20-Apr-2001 thorpej

pmap_asn_alloc(): In a multiprocessor configuration, it's possible
to arrive here referencing the kernel_lev1map without having the
RESERVED ASN -- another CPU may have caused pmap_lev1map_destroy()
to be called, and that routine only invalidates the ASN for the
CPU that called it. So, in the MULTIPROCESSOR case, simply assign
the RESERVED ASN if we reference the kernel_lev1map rather than
asserting that we already have the RESERVED ASN. Thanks to Bill
Sommerfeld for helping me track down the problem.

Also add a new IPI that causes a CPU to re-activate its address
space if the pmap it's using changes level 1 maps (this probably
won't happen very often, but it's correct to have it).

This makes Alpha MP kernels boot multiuser. In fact, this commit
is being made from my dual-CPU AlphaServer 1200 running an MP kernel.


# 1.44 15-Apr-2001 thorpej

In splx(), don't call spl0() unless the ssir != 0.


# 1.43 15-Apr-2001 thorpej

Clean up soft interrupt related stuff a bit.


# 1.42 14-Apr-2001 thorpej

Change the softintr implementation to be a bit more cache friendly
(though, sigh, slightly more expensive at softintr_schedule() time).


# 1.41 13-Apr-2001 thorpej

Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.


# 1.40 15-Jan-2001 thorpej

branches: 1.40.2;
Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.39 14-Jan-2001 thorpej

Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>. This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.


# 1.38 14-Jan-2001 thorpej

Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).


# 1.37 22-Nov-2000 thorpej

Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
in the handlers themselves, and also making it possible for the
"pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
CPUs registers (and thus get e.g. a traceback) from whichever
CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
They don't have a prayer of working properly in multiprocessor
kernels, and didn't really work all that well in uniprocessor kernels.


# 1.36 20-Nov-2000 thorpej

Move IPI processing into a separate function.


# 1.35 18-Nov-2000 thorpej

Count individual interprocessor interrupts -- it's good to know where
they all come from.


# 1.34 22-Aug-2000 thorpej

Add spllock(). See spl(9) for details.


# 1.33 21-Aug-2000 thorpej

Add experimental code for pausing other CPUs upon a CPU's
entry into the debugger. While I'm here, add splsched()
as per spl(9).


# 1.32 15-Aug-2000 thorpej

Implement MP-safe lazy FP context switching, modeled on the
way Bill Sommerfeld implemented it for x86 (and bug fixes
fed back to Bill :-)


# 1.31 13-Aug-2000 thorpej

Add alpha_multicast_ipi().


# 1.30 13-Jul-2000 thorpej

Whitespace police.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.29 09-Jun-2000 cgd

make spl0() and spllowersoftclock() return void. Also, move spl0()
prototype from param.h to intr.h. (there were some big XXXs in param.h
that said to do that, and intr.h is included by param.h, so...)


# 1.28 05-Jun-2000 thorpej

Switch to the new `evcnt' mechanism for counting interrupts. Maintain
a per-CPU interrupt counter for clock, device, and interprocessor
interrupts.


# 1.27 04-Jun-2000 thorpej

Un-__P'ify kernel prototypes.


# 1.26 03-Jun-2000 thorpej

- Clean up clock interrupt code a bit, and provide a CPU_IS_PRIMARY()
macro in the MULTIPROCESSOR case (hardclock() wants it).
- Implement __GENERIC_SOFT_INTERRUPTS, and redefine the legacy
software interrupts in terms of it. Garbage-collect setsoftserial().


Revision tags: minoura-xpg4dl-base
# 1.25 23-May-2000 thorpej

branches: 1.25.2;
Rename the atomic operations to have generic machine-independent
names, and define __HAVE_ATOMIC_OPERATIONS to indicate their
existence.


# 1.24 19-Mar-2000 thorpej

Point back to the alpha_shared_intr in the intrhand structure. This
allows platform-specific code to access the `intr_private' data via
the intrhand structure.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.23 02-Dec-1999 thorpej

Move atomic operations into <machine/atomic.h>, and make them in-line
assembly, rather than function calls.

...except alpha_atomic_testset_l(), which will go away completely once
I commit the new <machine/lock.h>.


# 1.22 29-Nov-1999 thorpej

- Fix a botch in the IPI bitmasks (they were right-shifted by 1), and
add an IPI which causes the target CPU to perform AST processing when
it returns to userspace.
- Add a way to get/set a private pointer in the shared interrupt header.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.21 10-Aug-1999 thorpej

branches: 1.21.2; 1.21.8;
Use atomic operations to manipulate the SSIR, and fix a problem introduced
with the spllowersoftclock() changes where more interrupts than necessary
were blocked while software interrupts were being processed.


# 1.20 05-Aug-1999 thorpej

Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 24-Feb-1999 thorpej

Restructure the IPI code a little, allowing multiple IPIs to be sent at
once. Add a way to broadcast an IPI to all processors (except the sender,
obviously). Add an IPI for TLB shootdown.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.18 26-Sep-1998 thorpej

Add basic interprocessor interrupt sending and receiving code. Current
IPI functions: HALT, IMB, TBIA, TBIAP.

XXX HALT is not yet implemented, it's just a stub.


# 1.17 25-Sep-1998 thorpej

Minor style tweaks.


# 1.16 21-Sep-1998 matt

Add softserial to the alpha port. This significantly improved PPP
throughput on com ports.


# 1.15 01-Aug-1998 thorpej

Implement alpha_shared_intr_disestablish(). Simply removes the handler
fromthe list, allowing the caller to manipulate the sharing type,
if appropriate.


Revision tags: eeh-paddr_t-base
# 1.14 18-Jul-1998 is

Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).


# 1.13 07-Jul-1998 thorpej

On second thought, call that like the rest of the shared intr functions.


# 1.12 07-Jul-1998 thorpej

Define a macro to test if a shared interrupt should be disabled after
a stray has occurred.


# 1.11 10-Nov-1997 mjacob

Protect userland applications from the inline splraise function.


Revision tags: netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base alpha-nwscons-base
# 1.10 07-Jul-1997 cgd

branches: 1.10.6;
mark prototypes for static inline functions as possibly unused
(with __attribute__ ((unused))), to avoid generating warnings when
compiling without optimization but with the default warning flags.


# 1.9 05-Jun-1997 cgd

two more slight bogons


# 1.8 05-Jun-1997 cgd

actually, declare _splraise() as an inline function, because:
(1) it was using 'max', and some functions use a variable
of that name (*sigh*), and
(2) that makes it easier to be a bit trickier, and only call
swpipl if changing the IPL.


# 1.7 05-Jun-1997 cgd

parens around macro arg (this is an old one)


# 1.6 05-Jun-1997 cgd

make sure that splnet(), splbio(), splimp(), spltty(), splclock(),
splstatclock(), and splhigh() all _raise_ the IPL. (splhigh() is _not_
the highest possible IPL; mcheck is...)


# 1.5 06-Apr-1997 cgd

clean up NetBSD RCS ID strings


Revision tags: is-newarp-before-merge is-newarp-base
# 1.4 03-Dec-1996 cgd

branches: 1.4.2;
kill siroff() and resturcture do_sir() to be cleaner and more correct.


# 1.3 17-Nov-1996 cgd

implement a (hack-ish) set of routines to do common chained-interrupt
handler management. It's nasty, but three slightly different copies of
the code is worse.


# 1.2 09-Jul-1996 cgd

various cleanup, move setsoft* and spl* into intr.h.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.1 12-Apr-1996 cgd

the Alpha implementation of <machine/intr.h>