aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/include
Commit message (Collapse)AuthorAgeFilesLines
* MFC: Add atomic_fetchadd(9) operation for types int and 32.John Baldwin2005-10-061-0/+38
| | | | | | | | | | | Other small updates to atomic(9) include: - Note that arm and ppc don't provide 64-bit atomic ops. - Update sample code. Approved by: re (scottl) Notes: svn path=/stable/6/; revision=151008
* MFC: Add extra constraints to inform the compiler that the memory beingJohn Baldwin2005-08-051-2/+4
| | | | | | | | | | modified is an input and output rather than just the register holding the pointer being the input and output. Approved by: re (kensmith) Notes: svn path=/stable/6/; revision=148751
* MFC: Convert the atomic pointer operations to operate on uintptr_t ratherJohn Baldwin2005-08-051-8/+4
| | | | | | | | | than void *. Approved by: re (kensmith) Notes: svn path=/stable/6/; revision=148750
* Fix a typo.John Baldwin2005-06-231-1/+1
| | | | | | | Approved by: re (scottl) Notes: svn path=/head/; revision=147555
* MFP4:Joseph Koshy2005-06-091-0/+14
| | | | | | | | | | | | | | | | | | | - Implement sampling modes and logging support in hwpmc(4). - Separate MI and MD parts of hwpmc(4) and allow sharing of PMC implementations across different architectures. Add support for P4 (EMT64) style PMCs to the amd64 code. - New pmcstat(8) options: -E (exit time counts) -W (counts every context switch), -R (print log file). - pmc(3) API changes, improve our ability to keep ABI compatibility in the future. Add more 'alias' names for commonly used events. - bug fixes & documentation. Notes: svn path=/head/; revision=147191
* - MFp4: modify slightly the arm intr API, there's arm CPUs with more than 32Olivier Houchard2005-06-091-4/+4
| | | | | | | | interrupts. - Implement teardown methods where appropriate. Notes: svn path=/head/; revision=147166
* Add a new arm-specific option, ARM_USE_SMALL_ALLOC. If defined, it providesOlivier Houchard2005-06-072-0/+16
| | | | | | | | an implementation of uma_small_alloc() which tries to preallocate memory 1MB per 1MB, and maps it into a section mapping. Notes: svn path=/head/; revision=147114
* Bring in bits I forgot while importing write back support for arm9.Olivier Houchard2005-06-031-11/+13
| | | | Notes: svn path=/head/; revision=146948
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-292-66/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* s/_KLD_MODULE/KLD_MODULE/Olivier Houchard2005-05-261-1/+1
| | | | Notes: svn path=/head/; revision=146649
* Remove bits specific to CPUs we won't support (< armv4).Olivier Houchard2005-05-251-36/+4
| | | | Notes: svn path=/head/; revision=146619
* Use asm versions of in_cksum() and friends.Olivier Houchard2005-05-241-1/+11
| | | | Notes: svn path=/head/; revision=146594
* Asm version of bswap16().Olivier Houchard2005-05-241-5/+6
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=146592
* Make sure we clean the RAS start address once we're done.Olivier Houchard2005-05-241-0/+12
| | | | | | | This fixes the random segfaults which occurs at high interrupts rate. Notes: svn path=/head/; revision=146591
* Add empty header (except of the multiple-inclusion protection) toMarcel Moolenaar2005-04-201-0/+10
| | | | | | | get hwpmc(4) to compile on this platform. Notes: svn path=/head/; revision=145332
* Break out the definition of bus_space_{tag,handle}_t and a few other typesWarner Losh2005-04-182-11/+47
| | | | | | | | | | | | | into _bus.h to help with name space polution from including all of bus.h. In a few days, I'll commit changes to the MI code to take advantage of thse sepration (after I've made sure that these changes don't break anything in the main tree, I've tested in my trees, but you never know...). Suggested by: bde (in 2002 or 2003 I think) Reviewed in principle by: jhb Notes: svn path=/head/; revision=145253
* Import a basic implementation of the restartable atomic sequences to provideOlivier Houchard2005-04-072-38/+148
| | | | | | | | atomic operations to userland (this is OK for UP only, but SMP is still so far away). Notes: svn path=/head/; revision=144761
* - Try harder to report dirty page.Olivier Houchard2005-04-071-0/+2
| | | | | | | - Garbage-collect pmap_update(), it became quite useless. Notes: svn path=/head/; revision=144760
* Divorce critical sections from spinlocks. Critical sections as denoted byJohn Baldwin2005-04-042-55/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | critical_enter() and critical_exit() are now solely a mechanism for deferring kernel preemptions. They no longer have any affect on interrupts. This means that standalone critical sections are now very cheap as they are simply unlocked integer increments and decrements for the common case. Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter() and spinlock_exit(). This KPI is responsible for providing whatever MD guarantees are needed to ensure that a thread holding a spin lock won't be preempted by any other code that will try to lock the same lock. For now all archs continue to block interrupts in a "spinlock section" as they did formerly in all critical sections. Note that I've also taken this opportunity to push a few things into MD code rather than MI. For example, critical_fork_exit() no longer exists. Instead, MD code ensures that new threads have the correct state when they are created. Also, we no longer try to fixup the idlethreads for APs in MI code. Instead, each arch sets the initial curthread and adjusts the state of the idle thread it borrows in order to perform the initial context switch. This change is largely a big NOP, but the cleaner separation it provides will allow for more efficient alternative locking schemes in other parts of the kernel (bare critical sections rather than per-CPU spin mutexes for per-CPU data for example). Reviewed by: grehan, cognet, arch@, others Tested on: i386, alpha, sparc64, powerpc, arm, possibly more Notes: svn path=/head/; revision=144637
* Bring in a version of float.h more correct for softfloat.Olivier Houchard2005-03-201-12/+17
| | | | Notes: svn path=/head/; revision=143857
* Refactor the bus_dma header files so that the interface is described inScott Long2005-03-142-152/+108
| | | | | | | | | | | | | sys/bus_dma.h instead of being copied in every single arch. This slightly reorders a flag that was specific to AXP and thus changes the ABI there. The interface still relies on bus_space definitions found in <machine/bus.h> so it cannot be included on its own yet, but that will be fixed at a later date. Add an MD <machine/bus_dma.h> for ever arch for consistency and to allow for future MD augmentation of the API. sparc64 makes heavy use of this right now due to its different bus_dma implemenation. Notes: svn path=/head/; revision=143598
* netchild's mega-patch to isolate compiler dependencies into a centralJoerg Wunsch2005-03-023-11/+18
| | | | | | | | | | | | | | | | | | | place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago Notes: svn path=/head/; revision=143063
* Instead of using sysarch() to store-retrieve the tp, add a magic address,Olivier Houchard2005-02-263-0/+5
| | | | | | | | | | | | | | ARM_TP_ADDRESS, where the tp will be stored. On CPUs that support it, a cache line will be allocated and locked for this address, so that it will never go to RAM. On CPUs that does not, a page is allocated for it (it will be a bit slower, and is wrong for SMP, but should be fine for UP). The tp is still stored in the mdthread struct, and at each context switch, ARM_TP_ADDRESS gets updated. Suggested by: davidxu Notes: svn path=/head/; revision=142570
* Add the field in the md part of the struct thread required by ARM_[GET|SET]_TP.Olivier Houchard2005-02-261-0/+1
| | | | Notes: svn path=/head/; revision=142528
* Implement two new sysarch for arm, ARM_GET_TP and ARM_SET_TP, to work aroundOlivier Houchard2005-02-251-0/+3
| | | | | | | the lack of tls on arm. Notes: svn path=/head/; revision=142519
* Use a common multi-inclusion protection, and add such aRuslan Ermilov2005-02-191-4/+4
| | | | | | | protection to alpha/include/exec.h. Notes: svn path=/head/; revision=142107
* Define NIRQ to 64 for CPU_ARM9, because Cirrus Logic EP93XX cores providesOlivier Houchard2005-02-131-0/+4
| | | | | | | | 64 irqs. This should be re-thought later. Notes: svn path=/head/; revision=141820
* Sort functions.Nate Lawson2005-02-011-4/+4
| | | | Notes: svn path=/head/; revision=141094
* Start to support the big endian case as well.Olivier Houchard2005-01-181-0/+13
| | | | Notes: svn path=/head/; revision=140425
* Add the prototype for bus_dmamap_load_mbuf_sg().Olivier Houchard2005-01-151-0/+3
| | | | | | | Spotted out by: scottl Notes: svn path=/head/; revision=140312
* Add support for ptrace() and gdb breakpoints.Olivier Houchard2005-01-102-0/+8
| | | | Notes: svn path=/head/; revision=140001
* Start all license statements with /*-Warner Losh2005-01-0540-43/+39
| | | | Notes: svn path=/head/; revision=139735
* Make sure gcc doesn't generate something such as swp r3, r4, [r3] for __swp,Olivier Houchard2004-12-181-1/+1
| | | | | | | as it has unpredictable results. Notes: svn path=/head/; revision=139021
* Remove an unused field from the struct pv_entry.Olivier Houchard2004-12-051-4/+3
| | | | | | | While I'm there, fix style. Notes: svn path=/head/; revision=138413
* Implement breakpoints and single stepping on arm.Olivier Houchard2004-11-212-6/+13
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=137975
* Implement enough to be able to enter and leave DDB.Olivier Houchard2004-11-202-3/+20
| | | | Notes: svn path=/head/; revision=137940
* Get the kernel stack right now that the u-area is gone.Olivier Houchard2004-11-201-1/+1
| | | | Notes: svn path=/head/; revision=137939
* Remove UAREA_PAGES and USPACE definitions. The definitions ofDavid Schultz2004-11-201-9/+1
| | | | | | | | | | | USPACE_SVC_STACK_TOP, USPACE_SVC_STACK_BOTTOM, USPACE_UNDEF_STACK_TOP, and USPACE_UNDEF_STACK_BOTTOM look wrong to me, so I'm leaving them alone. Reviewed by: arch@ Notes: svn path=/head/; revision=137919
* Import a RET macro, that will use bx if the arch supports it.Olivier Houchard2004-11-091-0/+36
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=137462
* Import md bits for mem(4) on arm.Olivier Houchard2004-11-072-45/+44
| | | | | | | While I'm there, cleanup a bit pmap.h. Notes: svn path=/head/; revision=137362
* Disable interrupts for atomic_cmpset_32, this one is just not atomic.Olivier Houchard2004-11-051-10/+13
| | | | | | | Don't export it to userland. Notes: svn path=/head/; revision=137282
* Protect the function declarations with #ifdef _KERNEL.Olivier Houchard2004-11-041-0/+2
| | | | Notes: svn path=/head/; revision=137229
* Directly use __pcpu for PCPU_* instead of pcpup.Olivier Houchard2004-11-041-3/+4
| | | | Notes: svn path=/head/; revision=137228
* Decrease KSTACK_PAGES and UAREA_PAGES.Olivier Houchard2004-11-041-2/+2
| | | | Notes: svn path=/head/; revision=137227
* Use interrupts_disable() and interrupts_restore() as intr_disable() andOlivier Houchard2004-11-041-24/+6
| | | | | | | intr_restore() instead of re-implement it. Notes: svn path=/head/; revision=137226
* Don't barf if no CPU type is defined while compiling kernel modules.Olivier Houchard2004-11-041-2/+2
| | | | Notes: svn path=/head/; revision=137224
* Implement get_cyclecount().Olivier Houchard2004-11-041-1/+7
| | | | Notes: svn path=/head/; revision=137223
* Try to implement atomic operations using swp, instead of disabling interrupts.Olivier Houchard2004-11-041-76/+65
| | | | Notes: svn path=/head/; revision=137222
* Use casts to enforce the return type of bswap16() and bswap32().Olivier Houchard2004-11-041-6/+6
| | | | Notes: svn path=/head/; revision=137216
* Add optimized version of the bswap macroes for constants if __OPTIMIZED__ isOlivier Houchard2004-10-011-2/+30
| | | | | | | defined. Notes: svn path=/head/; revision=136033