Home | History | Annotate | Download | only in include
History log of /src/sys/arch/arm/include/lock.h
RevisionDateAuthorComments
 1.39  30-May-2021  joerg Don't use V8 atomic instruction for AA32 mode.
 1.38  27-Apr-2021  skrll branches: 1.38.2;
Fix the barrier confusion. From Riastradh - thanks!.
 1.37  26-Apr-2021  skrll Change #ifdef FOO to #if defined(FOO). NFCI.
 1.36  24-Apr-2021  skrll branches: 1.36.2;
Fix ARMv8 instructions
 1.35  24-Apr-2021  skrll G/C
 1.34  29-Nov-2019  riastradh Nix mb_* on arm.
 1.33  17-Sep-2017  christos branches: 1.33.4; 1.33.8;
more const.
 1.32  25-Feb-2015  joerg branches: 1.32.10;
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.31  23-Feb-2015  joerg Indentation.
 1.30  19-Feb-2015  joerg Don't use plain inline in that might end up compiled with -ansi.
 1.29  02-Jan-2015  christos add constcond.
 1.28  10-Aug-2014  matt branches: 1.28.2; 1.28.4;
Correct _ARM_ARCH_8 instructions
 1.27  13-Mar-2014  matt Fix non-armv6 case.
 1.26  12-Mar-2014  matt Rather than having long complicated asm statements, use inlines for
ldrex/strex and let the compiler arrange the code how it wants.
 1.25  18-Aug-2013  matt Support thumb1 indirectly and thumb2 directly
 1.24  28-Jan-2013  matt branches: 1.24.2;
Use uint32_t for __asm to appease clang.
 1.23  24-Jan-2013  matt Shut up clang but returning the result to a uint32_t variable.
 1.22  25-Nov-2012  pgoyette For consistency, define the _KERNEL version of __swp() using a non-volatile
type, similar to how it is defined in non-KERNEL

Fixes the 'build.sh release' for evbarm-{eb,el}
 1.21  31-Aug-2012  matt branches: 1.21.2;
The arm11 barriers are mcr (write), not mrc (read)
 1.20  29-Aug-2012  matt Add required dsb/dmb instructions (or placeholders for them) required for
the weak memory ordering of the ARMV7-A architecture.
 1.19  23-Jul-2012  matt Change cmpeq to cmp and add "cc" to clobber in the ldrex/strex asm.
 1.18  15-Jul-2012  matt Use ldrexb/strexb for ARMv6 and above platforms since
"swp{b} use is deprecated" for them.
 1.17  28-Apr-2008  martin branches: 1.17.18; 1.17.34; 1.17.42;
Remove clause 3 and 4 from TNF licenses
 1.16  27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.15  17-Oct-2007  garbled branches: 1.15.16; 1.15.18; 1.15.20;
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.14  10-Sep-2007  skrll Merge nick-csl-alignment.
 1.13  09-Mar-2007  thorpej branches: 1.13.2; 1.13.10; 1.13.14; 1.13.16; 1.13.18; 1.13.20; 1.13.22;
Make __cpu_simple_lock_t an unsigned char if _KERNEL, and operate on it
using SWPB.

Approved by Matt Thomas.
 1.12  20-Feb-2007  matt Protect MB_* and <arm/cpufunc.h> by _KERNEL
 1.11  19-Feb-2007  he Since drain_writebuf() is #defined in <arm/cpufunc.h>, we need to
include it here.
 1.10  18-Feb-2007  ad + mb_memory()
 1.9  18-Feb-2007  matt Equate mb_write and mb_read to drain_writebuf (from cpu.h)
 1.8  18-Feb-2007  matt Add <arm/mutex.h> and <arm/rwlock.h>
Add atomic_cas to <arm/atomic.h> for use by <rwlock.h>
 1.7  28-Dec-2005  perry branches: 1.7.26;
inline -> __inline
 1.6  24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5  11-Dec-2005  christos merge ktrace-lwp.
 1.4  26-Sep-2003  nathanw branches: 1.4.16;
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.3  07-Oct-2002  bjh21 branches: 1.3.8;
Minor tidy-up, mostly to improve readability. The SWP instruction is now
in its own little inline function, and this allows us to get rid of all the
automatic variables elsewhere. This subtly changes the semantics of
__cpu_simple_lock() such that the loop ends up one instruction longer, but
I'm not sure that's a particularly bad thing.
 1.2  15-Nov-2001  thorpej Implement __cpu_simple_lock*() primitives using the SWP insn. Note
this insn is available only on ARM arch v3 and later (and 2a). We
don't expect to be using these ops in the kernel on processors too
old to have SWP, and for userland uses (in e.g. a pthread library),
the kernel will simply have to trap and emulate the insn (it needs
to be "atomic", so a kernel trap of some sort will be necessary on
such platforms anyway).
 1.1  10-Jan-2001  bjh21 branches: 1.1.2; 1.1.6; 1.1.10;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.10.2  18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1  15-Nov-2001  thorpej Merge from -current; locking primitives implemented.
 1.1.6.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2  10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1  10-Jan-2001  bjh21 file lock.h was added on branch thorpej_scsipi on 2001-01-10 19:02:08 +0000
 1.3.8.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.8.2  18-Sep-2004  skrll Sync with HEAD.
 1.3.8.1  03-Aug-2004  skrll Sync with HEAD
 1.4.16.4  27-Oct-2007  yamt sync with head.
 1.4.16.3  03-Sep-2007  yamt sync with head.
 1.4.16.2  26-Feb-2007  yamt sync with head.
 1.4.16.1  21-Jun-2006  yamt sync with head.
 1.7.26.2  12-Mar-2007  rmind Sync with HEAD.
 1.7.26.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.13.22.2  06-Nov-2007  matt sync with HEAD
 1.13.22.1  09-Sep-2007  matt Use & constraint to avoid swpb/swp compile bug.
 1.13.20.1  01-Jan-2008  chris Sync with HEAD.
 1.13.18.1  02-Oct-2007  joerg Sync with HEAD.
 1.13.16.1  02-Oct-2007  rjs Sync with HEAD.
 1.13.14.1  15-Aug-2007  skrll Provide __SIMPLELOCK_{UN,}LOCKED_P and __cpu_simple_lock_{set,clear}
for all architectures.
 1.13.10.1  03-Oct-2007  garbled Sync with HEAD
 1.13.2.1  09-Oct-2007  ad Sync with head.
 1.15.20.1  16-May-2008  yamt sync with head.
 1.15.18.1  18-May-2008  yamt sync with head.
 1.15.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.17.42.2  28-Nov-2012  matt Make __swp for the kernel return unsigned char and restore __cpu_simple_lock_t
(match what -HEAD has).
 1.17.42.1  28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.17.34.3  22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.34.2  16-Jan-2013  yamt sync with (a bit old) head
 1.17.34.1  30-Oct-2012  yamt sync with head
 1.17.18.1  15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.21.2.3  03-Dec-2017  jdolecek update from HEAD
 1.21.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.2.1  25-Feb-2013  tls resync with head
 1.24.2.2  18-May-2014  rmind sync with head
 1.24.2.1  28-Aug-2013  rmind sync with head
 1.28.4.1  06-Apr-2015  skrll Sync with HEAD
 1.28.2.2  27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.28.2.1  21-Feb-2015  martin Pull up following revision(s) (requested by joerg in ticket #536):
sys/arch/arm/include/lock.h: revision 1.30
Don't use plain inline in that might end up compiled with -ansi.
 1.32.10.1  26-Apr-2021  martin Pull up following revision(s) (requested by skrll in ticket #1672):

sys/arch/arm/include/lock.h: revision 1.37
common/lib/libc/arch/arm/atomic/atomic_swap_64.S: revision 1.11
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.15
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.16
sys/arch/arm/include/lock.h: revision 1.36

Fix ARMv8 instructions

Fix __sync_lock_release_4 to actually zeroise the whole 4bytes/32bits.

Trailing whitespace

Change #ifdef FOO to #if defined(FOO). NFCI.
 1.33.8.2  30-Apr-2021  martin Pull up following revision(s) (requested by skrll in ticket #1261):

sys/arch/arm/include/lock.h: revision 1.38
common/lib/libc/arch/arm/atomic/membar_ops.S: revision 1.7
common/lib/libc/arch/arm/atomic/atomic_swap_16.S: revision 1.5
common/lib/libc/arch/arm/atomic/atomic_swap_64.S: revision 1.12
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.17

Add the appropriate memory barrier before the lock is cleared in
__sync_lock_release_{1,2,4,8}. That is, all reads and write for the
inner shareability domain before the lock clear store.

Improve the membar_ops barriers - no need to use dsb and wait for
completion. Also, we only to act on the inner shareability domain.

Fix the barrier confusion. From Riastradh - thanks!.
 1.33.8.1  26-Apr-2021  martin Pull up following revision(s) (requested by skrll in ticket #1254):

sys/arch/arm/include/lock.h: revision 1.37
common/lib/libc/arch/arm/atomic/atomic_swap_64.S: revision 1.11
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.15
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.16
sys/arch/arm/include/lock.h: revision 1.36

Fix ARMv8 instructions

Fix __sync_lock_release_4 to actually zeroise the whole 4bytes/32bits.

Trailing whitespace

Change #ifdef FOO to #if defined(FOO). NFCI.
 1.33.4.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.36.2.2  17-Jun-2021  thorpej Sync w/ HEAD.
 1.36.2.1  13-May-2021  thorpej Sync with HEAD.
 1.38.2.1  31-May-2021  cjep sync with head

RSS XML Feed