#
259065 |
|
07-Dec-2013 |
gjb |
- Copy stable/10 (r259064) to releng/10.0 as part of the 10.0-RELEASE cycle. - Update __FreeBSD_version [1] - Set branch name to -RC1
[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so start releng/10.0 at '100' so the branch is started with a value ending in zero.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
253489 |
|
20-Jul-2013 |
andrew |
Start adding support to build bits of our code using the Thumb-2 instruction set. Thumb-2 requires an if-then instruction to implement conditional codes.
When building for ARM mode the it-then instructions do not generate any assembled instruction as per the ARMv7-A Architecture Reference Manual, and are safe to use.
While this allows the atomic instructions to be built, it doesn't mean we fully support Thumb code. It works in small tests, but is still known to fail in a large number of places.
While here add a check for the armv6t2 architecture.
|
#
245475 |
|
15-Jan-2013 |
cognet |
Don't define rel/acq variants of some atomic operations as the regular version for armv6.
|
#
245135 |
|
07-Jan-2013 |
gonzo |
Implement barriers for AMRv6 and ARMv7
Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp> Reviewed by: ian, cognet
|
#
241080 |
|
01-Oct-2012 |
andrew |
Fix the clobber list on the atomic operators that do comparisons. Without this some compilers will place a cmp instruction before the atomic operation and expect to be able to use the result afterwards. By adding "cc" to the list of used registers we tell the compiler to not do this.
|
#
239268 |
|
15-Aug-2012 |
gonzo |
Merging projects/armv6, part 1
Cummulative patch of changes that are not vendor-specific: - ARMv6 and ARMv7 architecture support - ARM SMP support - VFP/Neon support - ARM Generic Interrupt Controller driver - Simplification of startup code for all platforms
|
#
238347 |
|
10-Jul-2012 |
imp |
Revert committal of local change accidentally swept up in r238329.
|
#
238329 |
|
09-Jul-2012 |
imp |
Remove some unused variables/externs that have been copied too many times...
|
#
236992 |
|
13-Jun-2012 |
imp |
trim trailing whitespace
|
#
190603 |
|
31-Mar-2009 |
cognet |
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>
|
#
188085 |
|
03-Feb-2009 |
sam |
force atomic_cmpset_ptr types to match atomic_cmpset_32; this matches what powerpc does
Submitted by: stass MFC after: 2 weeks
|
#
185162 |
|
22-Nov-2008 |
kmacy |
- 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.
|
#
175982 |
|
05-Feb-2008 |
raj |
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)
|
#
174170 |
|
02-Dec-2007 |
cognet |
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
|
#
173999 |
|
27-Nov-2007 |
cognet |
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
|
#
165786 |
|
05-Jan-2007 |
ticso |
MFp4: Add missing atomic functions Based on a patch by: des
|
#
164059 |
|
07-Nov-2006 |
cognet |
Add atomic_cmpset_acq_32.
|
#
158593 |
|
15-May-2006 |
cognet |
Add definitions for atomic_subtract_rel_32, atomic_add_rel_32 and atomic_load_acq_32, needed for hwpmc.
|
#
157725 |
|
13-Apr-2006 |
cognet |
Disable/enable fiqs as well as irqs.
|
#
155391 |
|
06-Feb-2006 |
cognet |
Use memory clobbers, to be on the safe side. Suggested by: jhb
|
#
155355 |
|
05-Feb-2006 |
cognet |
Backout rev 1.12. It would have been a good thing, if gcc was smart enough not to generate bad code.
|
#
153276 |
|
09-Dec-2005 |
cognet |
A #define is not enough, we need to cast from u_long * to uint32_t *.
|
#
153275 |
|
09-Dec-2005 |
cognet |
Define atomic_whatever_long
|
#
151340 |
|
14-Oct-2005 |
jhb |
Whitespace.
|
#
151334 |
|
14-Oct-2005 |
jhb |
Change the userland atomic operations on arm to use memory operands for the modified memory rather than using register operands that held a pointer to the memory. The biggest effect is that we now correctly tell the compiler that these functions change the memory that these functions modify.
Reviewed by: cognet
|
#
150627 |
|
27-Sep-2005 |
jhb |
Add a new atomic_fetchadd() primitive that atomically adds a value to a variable and returns the previous value of the variable.
Tested on: i386, alpha, sparc64, arm (cognet) Reviewed by: arch@ Submitted by: cognet (arm) MFC after: 1 week
|
#
148453 |
|
27-Jul-2005 |
jhb |
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
|
#
148067 |
|
15-Jul-2005 |
jhb |
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
|
#
147555 |
|
23-Jun-2005 |
jhb |
Fix a typo.
Approved by: re (scottl)
|
#
146591 |
|
24-May-2005 |
cognet |
Make sure we clean the RAS start address once we're done. This fixes the random segfaults which occurs at high interrupts rate.
|
#
144761 |
|
07-Apr-2005 |
cognet |
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).
|
#
139735 |
|
05-Jan-2005 |
imp |
Start all license statements with /*-
|
#
139021 |
|
18-Dec-2004 |
cognet |
Make sure gcc doesn't generate something such as swp r3, r4, [r3] for __swp, as it has unpredictable results.
|
#
137282 |
|
05-Nov-2004 |
cognet |
Disable interrupts for atomic_cmpset_32, this one is just not atomic. Don't export it to userland.
|
#
137222 |
|
04-Nov-2004 |
cognet |
Try to implement atomic operations using swp, instead of disabling interrupts.
|
#
129198 |
|
14-May-2004 |
cognet |
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.
|