#
d9610574 |
| 27-Jul-2005 |
John Baldwin <jhb@FreeBSD.org> |
Add extra constraints to tell the compiler that the memory be modified in the arm __swp() and sparc64 casa() and casax() functions is actually being used as an input and output and not just the value
Add extra constraints to tell the compiler that the memory be modified in the arm __swp() and sparc64 casa() and casax() functions is actually being used as an input and output and not just the value of the register that points to the memory location. This was the underlying source of the mbuf refcount problems on sparc64 a while back. For arm this should be a nop because __swp() has a constraint to clobber all memory which can probably be removed now.
Reviewed by: alc, cognet MFC after: 1 week
show more ...
|
#
122eceef |
| 15-Jul-2005 |
John Baldwin <jhb@FreeBSD.org> |
Convert the atomic_ptr() operations over to operating on uintptr_t variables rather than void * variables. This makes it easier and simpler to get asm constraints and volatile keywords correct.
MFC
Convert the atomic_ptr() operations over to operating on uintptr_t variables rather than void * variables. This makes it easier and simpler to get asm constraints and volatile keywords correct.
MFC after: 3 days Tested on: i386, alpha, sparc64 Compiled on: ia64, powerpc, amd64 Kernel toolchain busted on: arm
show more ...
|
#
dc802c06 |
| 23-Jun-2005 |
John Baldwin <jhb@FreeBSD.org> |
Fix a typo.
Approved by: re (scottl)
|
#
fa7e20fd |
| 24-May-2005 |
Olivier Houchard <cognet@FreeBSD.org> |
Make sure we clean the RAS start address once we're done. This fixes the random segfaults which occurs at high interrupts rate.
|
Revision tags: release/5.4.0_cvs, release/5.4.0 |
|
#
2d93998b |
| 08-Apr-2005 |
Olivier Houchard <cognet@FreeBSD.org> |
Import a basic implementation of the restartable atomic sequences to provide atomic operations to userland (this is OK for UP only, but SMP is still so far away).
|
Revision tags: release/4.11.0_cvs, release/4.11.0 |
|
#
d8315c79 |
| 05-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
Start all license statements with /*-
|
#
31e3e209 |
| 18-Dec-2004 |
Olivier Houchard <cognet@FreeBSD.org> |
Make sure gcc doesn't generate something such as swp r3, r4, [r3] for __swp, as it has unpredictable results.
|
#
432f5e3a |
| 06-Nov-2004 |
Olivier Houchard <cognet@FreeBSD.org> |
Disable interrupts for atomic_cmpset_32, this one is just not atomic. Don't export it to userland.
|
#
a6136908 |
| 04-Nov-2004 |
Olivier Houchard <cognet@FreeBSD.org> |
Try to implement atomic operations using swp, instead of disabling interrupts.
|
Revision tags: release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0 |
|
#
6fc729af |
| 14-May-2004 |
Olivier Houchard <cognet@FreeBSD.org> |
Import FreeBSD/arm kernel bits. It only supports sa1110 (on simics) right now, but xscale support should come soon. Some of the initial work has been provided by : Stephane Potvin <sepotvin at videot
Import FreeBSD/arm kernel bits. It only supports sa1110 (on simics) right now, but xscale support should come soon. Some of the initial work has been provided by : Stephane Potvin <sepotvin at videotron.ca> Most of this comes from NetBSD.
show more ...
|
Revision tags: release/7.2.0_cvs, release/7.2.0 |
|
#
9c797940 |
| 13-Apr-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- Merge from HEAD
|
#
a471e1ed |
| 01-Apr-2009 |
Olivier Houchard <cognet@FreeBSD.org> |
Fix the userland, RAS, version of atomic_fetchadd_32 : return the correct value, and do not store the wrong one in the supplied pointer.
Submitted by: Mark Tinguely <tinguely casselton net>
|
#
1829d5da |
| 12-Mar-2009 |
Warner Losh <imp@FreeBSD.org> |
Update the projects tree to a newer FreeBSD current.
|
#
22f8f5fe |
| 03-Feb-2009 |
Sam Leffler <sam@FreeBSD.org> |
force atomic_cmpset_ptr types to match atomic_cmpset_32; this matches what powerpc does
Submitted by: stass MFC after: 2 weeks
|
Revision tags: release/6.4.0_cvs, release/6.4.0 |
|
#
db7f0b97 |
| 22-Nov-2008 |
Kip Macy <kmacy@FreeBSD.org> |
- bump __FreeBSD version to reflect added buf_ring, memory barriers, and ifnet functions
- add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own
- add
- bump __FreeBSD version to reflect added buf_ring, memory barriers, and ifnet functions
- add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own
- add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers
- add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues
This work was supported by Bitgravity Inc. and Chelsio Inc.
show more ...
|
Revision tags: release/7.0.0_cvs, release/7.0.0 |
|
#
e081d0ac |
| 05-Feb-2008 |
Rafal Jaworowski <raj@FreeBSD.org> |
Improve ARM_TP_ADDRESS and RAS area.
De-hardcode usage of ARM_TP_ADDRESS and RAS local storage, and move this special purpose page to a more convenient place i.e. after the vectors high page, more t
Improve ARM_TP_ADDRESS and RAS area.
De-hardcode usage of ARM_TP_ADDRESS and RAS local storage, and move this special purpose page to a more convenient place i.e. after the vectors high page, more towards the end of address space. Previous location (0xe000_0000) caused grief if KVA was to go beyond the default limit.
Note that ARM world rebuilding is required after this change since the location of ARM_TP_ADDRESS is shared between kernel and userland.
Submitted by: Grzegorz Bernacki (gjb AT semihalf dot com) Reviewed by: imp Approved by: cognet (mentor)
show more ...
|
Revision tags: release/6.3.0_cvs, release/6.3.0 |
|
#
b21a1da5 |
| 02-Dec-2007 |
Olivier Houchard <cognet@FreeBSD.org> |
Close a race.
The RAS implementation would set the end address, then the start address. These were used by the kernel to restart a RAS sequence if it was interrupted. When the thread switching cod
Close a race.
The RAS implementation would set the end address, then the start address. These were used by the kernel to restart a RAS sequence if it was interrupted. When the thread switching code ran, it would check these values and adjust the PC and clear them if it did.
However, there's a small flaw in this scheme. Thread T1, sets the end address and gets preempted. Thread T2 runs and also does a RAS operation. This resets end to zero. Thread T1 now runs again and sets start and then begins the RAS sequence, but is preempted before the RAS sequence executes its last instruction. The kernel code that would ordinarily restart the RAS sequence doesn't because the PC isn't between start and 0, so the PC isn't set to the start of the sequence. So when T1 is resumed again, it is at the wrong location for RAS to produce the correct results. This causes the wrong results for the atomic sequence.
The window for the first race is 3 instructions. The window for the second race is 5-10 instructions depending on the atomic operation. This makes this failure fairly rare and hard to reproduce.
Mutexs are implemented in libthr using atomic operations. When the above race would occur, a lock could get stuck locked, causing many downstream problems, as you might expect.
Also, make sure to reset the start and end address when doing a syscall, or a malicious process could set them before doing a syscall.
Reviewed by: imp, ups (thanks guys) Pointy hat to: cognet MFC After: 3 days
show more ...
|
#
9acb0e65 |
| 27-Nov-2007 |
Olivier Houchard <cognet@FreeBSD.org> |
In atomic_fetchadd_32(), do not blindly increase the value of %3. It should just contain the value we want to add, as if we're interrupted between the add and the str, we will restart from the beginn
In atomic_fetchadd_32(), do not blindly increase the value of %3. It should just contain the value we want to add, as if we're interrupted between the add and the str, we will restart from the beginning. Just use a register we can scratch instead.
MFC After: 1 week
show more ...
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
69b40f4d |
| 05-Jan-2007 |
Bernd Walter <ticso@FreeBSD.org> |
MFp4: Add missing atomic functions Based on a patch by: des
|
#
2c7b82c9 |
| 07-Nov-2006 |
Olivier Houchard <cognet@FreeBSD.org> |
Add atomic_cmpset_acq_32.
|
Revision tags: release/5.5.0_cvs, release/5.5.0 |
|
#
ec213076 |
| 15-May-2006 |
Olivier Houchard <cognet@FreeBSD.org> |
Add definitions for atomic_subtract_rel_32, atomic_add_rel_32 and atomic_load_acq_32, needed for hwpmc.
|
Revision tags: release/6.1.0_cvs, release/6.1.0 |
|
#
b8986f56 |
| 13-Apr-2006 |
Olivier Houchard <cognet@FreeBSD.org> |
Disable/enable fiqs as well as irqs.
|
#
123f3493 |
| 06-Feb-2006 |
Olivier Houchard <cognet@FreeBSD.org> |
Use memory clobbers, to be on the safe side. Suggested by: jhb
|
#
697e7cb7 |
| 05-Feb-2006 |
Olivier Houchard <cognet@FreeBSD.org> |
Backout rev 1.12. It would have been a good thing, if gcc was smart enough not to generate bad code.
|
#
b34658e8 |
| 09-Dec-2005 |
Olivier Houchard <cognet@FreeBSD.org> |
A #define is not enough, we need to cast from u_long * to uint32_t *.
|