Home | History | Annotate | Download | only in include
History log of /src/sys/arch/vax/include/lock.h
RevisionDateAuthorComments
 1.34  13-Feb-2022  riastradh vax: __cpu_simple_lock audit.

Fix missing "memory" asm clobber so the compiler can't reorder memory
access around __cpu_simple_lock/lock_try/unlock.
 1.33  12-Feb-2022  riastradh __cpu_simple_lock(9): Omit needless barriers in init.

It is, and always has been, the caller's responsibility to ensure the
lock is initialized before it can be used -- otherwise the memory
could hold garbage; it is nonsensical to even attempt locking
operations on it before initialization.

So there's no need to issue explicit barriers here. The barrier
seems to have been introduced in sys/arch/alpha/alpha/lock_machdep.c
rev. 1.1 (since moved to inline asm in alpha/include/lock.h) and then
copied & pasted into several other architectures.
 1.32  29-Nov-2019  riastradh Nix mb_* on vax.
 1.31  17-Sep-2017  christos branches: 1.31.4;
more const.
 1.30  22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.29  14-Jan-2009  pooka branches: 1.29.24; 1.29.42;
Use kernel locking routines only with _HARDKERNEL
 1.28  23-Feb-2008  matt branches: 1.28.4; 1.28.12;
A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu(). This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.
 1.27  17-Oct-2007  garbled branches: 1.27.12; 1.27.16;
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.
 1.26  10-Sep-2007  skrll Merge nick-csl-alignment.
 1.25  04-Mar-2007  ragge branches: 1.25.2; 1.25.10; 1.25.14; 1.25.18; 1.25.20;
cpu_simple_lock() calls are emitted in the UP case if DEBUG || DIAGNOSTIC.
This should probably be fixed somewhere else, but currently just include
it here. Fixes PR#35866 from Henry R. Bent.
 1.24  26-Feb-2007  christos - use __inline like the other ports do.
- use __ in parameter names
- provide separate prototype lines.
 1.23  24-Feb-2007  mrg fix a typo - s/_inline/inline/
 1.22  16-Feb-2007  matt branches: 1.22.2;
Partially adapt the VAX port to the newlock2 changes. These are untested
but they do at least compile.
 1.21  28-Dec-2005  perry inline -> __inline
 1.20  24-Dec-2005  perry __asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.19  24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.18  11-Dec-2005  christos merge ktrace-lwp.
 1.17  20-Jul-2005  he Fixes to make GENERIC.MP build again. Several changes:
o Rename global variable "tramp" to "vax_mp_tramp" to avoid warning
with -Wshadow when compiling the signal code.
o Rename a macro-local variable _s to __s in __cpu_simple_lock()
to avoid -Wshadow warning when MALLOC() is used (also declares _s).
o Follow up -Wcast-qual by making a number of function arguments const char*
where string literals are used.
 1.16  19-May-2004  he branches: 1.16.12;
Hm, let ipfresend also compile; move <machine/intr.h> include
in under the _KERNEL_OPT define.
 1.15  19-May-2004  he Since we are using the spl() functions here, also include <machine/intr.h>.
 1.14  26-Sep-2003  nathanw Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.h
so that they can be used in a namespace-friendly way.
 1.13  26-Jun-2003  he branches: 1.13.2;
#ifdef _KERNEL_OPT police; identd defines _KERNEL before some includes.
 1.12  23-Jun-2003  martin Make sure to include opt_foo.h if a defflag option FOO is used.
 1.11  25-Feb-2003  matt This file has a _KERNEL dependency on <machine/cpu.h>. So include it.
[GENERIC.MP builds again.]
 1.10  10-Oct-2002  thorpej Add missing register prefixes.
 1.9  12-Sep-2002  matt Add non-_KERNEL variants so regress/sys/kern/lock will compile.
 1.8  04-Jun-2001  ragge branches: 1.8.2; 1.8.8;
Add rudimentary multiprocessor support for DDB.
 1.7  04-Jun-2001  ragge Check for console printf's in spinlocks, per discussion on tech-smp.
 1.6  03-Jun-2001  ragge Implement spinlocks as subroutines instead of inlines.
Add SPINLOCK_SPIN_HOOK; the VAX has low-priority IPIs like Alpha.
 1.5  01-Jul-2000  matt branches: 1.5.2; 1.5.4;
GCC 2.96 wants the = constraint first. Also change to be a bit more
efficient. Instead of using indirect register access, change the
constraint to memory and use the value directly. This allow PC-rel
access among other things.
 1.4  02-May-2000  thorpej Let each platform typedef the new __cpu_simple_lock_t, which should
be the most efficient type used for the atomic operations in the
simplelock structure, and should also be __volatile.
 1.3  01-May-2000  ragge #define __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED.
 1.2  29-Apr-2000  thorpej Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.1  19-Mar-2000  ragge First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.
 1.5.4.1  21-Jun-2001  nathanw Catch up to -current.
 1.5.2.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.2.1  01-Jul-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 20:32:56 +0000
 1.8.8.3  18-Oct-2002  nathanw Catch up to -current.
 1.8.8.2  17-Sep-2002  nathanw Catch up to -current.
 1.8.8.1  04-Jun-2001  nathanw file lock.h was added on branch nathanw_sa on 2002-09-17 21:18:28 +0000
 1.8.2.1  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.13.2.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.13.2.1  03-Aug-2004  skrll Sync with HEAD
 1.16.12.5  27-Feb-2008  yamt sync with head.
 1.16.12.4  27-Oct-2007  yamt sync with head.
 1.16.12.3  03-Sep-2007  yamt sync with head.
 1.16.12.2  26-Feb-2007  yamt sync with head.
 1.16.12.1  21-Jun-2006  yamt sync with head.
 1.22.2.2  12-Mar-2007  rmind Sync with HEAD.
 1.22.2.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.25.20.2  23-Mar-2008  matt sync with HEAD
 1.25.20.1  06-Nov-2007  matt sync with HEAD
 1.25.18.1  02-Oct-2007  joerg Sync with HEAD.
 1.25.14.1  15-Aug-2007  skrll Provide __SIMPLELOCK_{UN,}LOCKED_P and __cpu_simple_lock_{set,clear}
for all architectures.
 1.25.10.1  03-Oct-2007  garbled Sync with HEAD
 1.25.2.1  09-Oct-2007  ad Sync with head.
 1.27.16.2  17-Jan-2009  mjf Sync with HEAD.
 1.27.16.1  03-Apr-2008  mjf Sync with HEAD.
 1.27.12.1  24-Mar-2008  keiichi sync with head.
 1.28.12.1  19-Jan-2009  skrll Sync with HEAD.
 1.28.4.1  04-May-2009  yamt sync with head.
 1.29.42.1  28-Aug-2017  skrll Sync with HEAD
 1.29.24.1  03-Dec-2017  jdolecek update from HEAD
 1.31.4.1  08-Apr-2020  martin Merge changes from current as of 20200406

RSS XML Feed