summaryrefslogtreecommitdiffstats
path: root/sys/arch/sh (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* jmatthew@ found another case of me getting the number of args wrongdlg2014-09-241-2/+2
| | | | to an atomic_swap_ptr.
* implement atomic_{cas,swap}_{uint,long,ptr) and atomic_{add,sub}_{int,long}dlg2014-09-241-9/+122
| | | | fixes from and ok miod@
* use nitems() instead of handrolling something identicaljasper2014-07-131-3/+2
| | | | ok mpi@ sthen@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-2/+2
| | | | after discussions with beck deraadt kettenis.
* Tackle the endian.h mess. Make it so that:guenther2014-07-121-4/+6
| | | | | | | | | | | | | | | | | | * you can #include <sys/endian.h> instead of <machine/endian.h>, and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first) * those will always export the symbols that POSIX specified for <endian.h>, including the new {be,le}{16,32,64}toh() set. c.f. http://austingroupbugs.net/view.php?id=162 if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h> currently exports (ntohs, NTOHS, dlg's bemtoh*, etc) * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER and betoh* ok deraadt@
* CPU_BUSY_CYCLE(): A new MI statement for busy loop power reductionuebayasi2014-07-111-1/+3
| | | | | | | | | | The new CPU_BUSY_CYCLE() may be put in a busy loop body so that CPU can reduce power consumption, as Linux's cpu_relax() and FreeBSD's cpu_spinwait(). To start minimally, use PAUSE on i386/amd64 and empty on others. The name is chosen following the existing cpu_idle_*() functions. Naming and API may be polished later. OK kettenis@
* remove most of the boolean_t infection outside uvm/ddb/pmap; ok jsgderaadt2014-07-101-4/+4
|
* Move the increment of uvmexp.softs back to the caller of mi_ast():guenther2014-05-111-1/+2
| | | | | | | it needs to be done atomicly on some MP archs and we don't have atomic_add_int() everywhere yet. Also, mi_ast() was meant to be inline. noted by miod@
* bring things syscall_mi.h needs into scope earlierderaadt2014-05-101-3/+2
|
* Factor out the common ast bits into mi_ast()guenther2014-05-101-12/+2
| | | | ok deraadt@
* Format string fixes and removal of -Wno-format for landisk kernelsmiod2014-05-082-4/+4
|
* Have each thread keeps its own (counted!) reference to the process's ucredsguenther2014-04-181-1/+4
| | | | | | | | | to avoid possible use-after-free references when swapping ids in threaded processes. "Do I have the right creds?" checks are always made with the threads creds. Inspired by FreeBSD and NetBSD "right time" deraadt@
* Fewer <uvm/uvm.h>mpi2014-04-141-2/+2
|
* Eliminates struct pcred by moving the real and saved ugids intoguenther2014-03-301-3/+2
| | | | | | | | | struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-03-292-11/+11
| | | | ok dlg@ mpi@ deraadt@
* Move p_emul and p_sigcode from proc to process.guenther2014-03-262-7/+7
| | | | | | | | | Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@
* Move p_sigacts from struct proc to struct process.guenther2014-03-221-2/+2
| | | | testing help mpi@
* It's safe to assumed 'signed' existsguenther2014-03-191-2/+2
|
* DDB supports ELF symbols are all archs, and it's always the same as theguenther2014-03-161-8/+1
| | | | | | native size, so eliminate the #defines. ok miod@
* Move declaration of struct vm_page_md from <machine/vmparam.h> tomiod2014-01-302-20/+21
| | | | | | <machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h> by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all MACHINE_ARCH but amd64 and i386 (and hppa64).
* unifdef -D__HAVE_VM_PAGE_MD - no functional change.miod2014-01-231-2/+1
|
* Threads can't be zombies, only processes, so change zombproc to zombprocess,guenther2014-01-202-5/+22
| | | | | | | | make it a list of processes, and change P_NOZOMBIE and P_STOPPED from thread flags to process flags. Add allprocess list for the code that just wants to see processes. ok tedu@
* Provide MI symbol _STACKALIGNBYTESderaadt2013-12-181-3/+4
|
* We uniformly define size_t to be unsigned long and ssize_t to be long. Makekettenis2013-08-071-4/+4
| | | | | | | sure that SIZE_MAX and SSIZE_MAX are defined as constants with a matching type on all are architectures. ok millert@, matthew@
* unify register_t to long on all platformsderaadt2013-07-131-2/+2
| | | | ok miod kettenis
* Take II, this time without flubbing off_t: : move several internalguenther2013-07-051-6/+1
| | | | | | | type definitions that are the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@ kettenis@ otto@
* backout previous; off_t must be signed and there might be other C++ APIotto2013-07-041-1/+6
| | | | breakage lurking; ok kettenis@
* To ease future changes, move several internal type definitions that areguenther2013-07-041-6/+1
| | | | | | the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@
* final removal of daddr64_t. daddr_t has been 64 bit for a long enoughderaadt2013-06-112-5/+5
| | | | | test period; i think 3 years ago the last bugs fell out. ok otto beck others
* Use a simpler typedef to avoid depending upon <sys/types.h>; repairs librthreadmiod2013-06-041-2/+2
| | | | build.
* cleanup and consolidate the spinlock_lock (what a name!) code.tedu2013-06-011-4/+8
| | | | | | | | | | it's now atomic_lock to better reflect its usage, and librthread now features a new spinlock that's really a ticket lock. thrlseep can handle both types of lock via a flag in the clock arg. (temp back compat hack) remove some old stuff that's accumulated along the way and no longer used. some feedback from dlg, who is concerned with all things ticket lock. (you need to boot a new kernel before installing librthread)
* remove unused cpu_lock code (where it is truly unused). it is nottedu2013-05-211-41/+1
| | | | part of the future we have planned. middling ok from a few
* try to avoid pulling in pte.h and other more crazy things. Checked againstderaadt2013-03-311-2/+3
| | | | the things that libkvm needs.
* Add STRONG_ALIAS macros to be used from assembly code in libc andmartynas2013-03-281-5/+4
| | | | | libm. While at it, remove now unused workarounds for lint. Agreed by kettenis@, guenther@, matthew@.
* Add __strong_alias macros for all architectures to be able to aliasmartynas2013-03-281-11/+8
| | | | | another symbol without weak attribute. To be used in libc and libm soon. Agreed by kettenis@, guenther@, matthew@.
* PGSHIFT and PGOFSET are now contained inside the kernel namespace.deraadt2013-03-261-3/+3
|
* PGOFSET -> PAGE_MASK in a commentderaadt2013-03-251-2/+2
|
* ALIGNBYTES/ALIGN/ALIGNED_POINTER can move to the MI file.deraadt2013-03-251-5/+1
|
* refactor sys/param.h and machine/param.h. A lot of #ifdef _KERNEL is addedderaadt2013-03-231-37/+22
| | | | | | | to keep definitions our of user space. The MD files now follow a consistant order -- all namespace intrusion is at the tail can be cleaned up independently. locore, bootblocks, and libkvm still see enough visibility to build. Checked on 90% of platforms...
* Fix kernel profiling on MP systems by using per-CPU buffers and teachmpi2013-03-121-1/+4
| | | | | | | | | | | kgmon(8) to deal with them, this time without public header changes. Previously various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok deraadt@, mikeb@, haesbaert@
* When stealing an ASID, pass sh_tlb_invalid_asid() the involved ASIDguenther2013-03-021-2/+2
| | | | | | instead of -1. ok and prod from miod@
* Prefer a pc-relative relocation to mcount(); gets rid of the last TEXTRELmiod2013-03-021-36/+35
| | | | relocation in libc.so. From NetBSD.
* Back out per-CPU kernel profiling, it shouldn't modify a public headermpi2013-02-121-4/+1
| | | | at this moment.
* Fix kernel profiling on MP systems by using per-CPU buffer. Previouslympi2013-02-111-1/+4
| | | | | | | | | various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok mikeb@, haesbaert@
* cpu_coredump() also needs to invoke vn_rdwr() without IO_NODELOCKED; onlymiod2013-01-161-4/+3
| | | | affects a.out binaries' core dumps.
* Remove emulation errno mapping code from platforms that no longer haveguenther2012-12-311-3/+1
| | | | | | non-native emulations. ok miod@
* Determine whether we're currently on the alternative signal stackguenther2012-12-023-18/+10
| | | | | | | | | dynamically, by comparing the stack pointer against the altstack base and size, so that you get the correct answer if you longjmp out of the signal handler, as tested by regress/sys/kern/stackjmp/. Also, fix alt stack handling on vax, where it was completely broken. Testing and corrections by miod@, krw@, tobiasu@, pirofti@
* unifdef -D __HAVE_TIMECOUNTERmiod2012-11-051-4/+1
|
* Remove the 'OLF method' used for the transition from a.out to ELF andderaadt2012-09-111-3/+1
| | | | | | | for all the compat layers which are now gone. Linux compat still works because it always used another method in any case, and nothing looks at p_os anymore. ok jsing
* Switch landisk to timecounters. Adapted from NetBSD.miod2012-09-083-79/+60
|