summaryrefslogtreecommitdiffstats
path: root/sys/arch/sh/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add intr_{disable,restore}() for sh.visa2019-03-241-1/+13
| | | | Reminded by deraadt@
* sprinle some casts to quiet compiler; ok millertderaadt2019-02-171-3/+3
|
* Add END() macro to set symbol size like every other archguenther2018-11-111-1/+3
| | | | ok deraadt@
* Provide an MD 64-bit byteswapping function build on 32-bit swapsnaddy2018-10-051-2/+11
| | | | | | | | | | | | | as we do on arm and i386. Copied from arm. If there are no MD byteswapping functions, MI macros are used. These are wrapped by static inline functions to prevent multiple evaluation of their argument. If there are MD functions, they are used directly and therefore we must implicitly guarantee that they are safe from multiple evaluation. Defining an MD function to an MI macro breaks this promise. ok deraadt@
* Unify the MD byteswapping code as much as possible across architectures.naddy2018-10-021-21/+26
| | | | | | | Use inline functions instead of GNU C statement expressions, and make them available to userland. With clues from guenther@. ok guenther@ kettenis@
* Unify and bump some of the NMBCLUSTERS defines. Some archs had it set toclaudio2018-09-141-2/+2
| | | | | | | | | 4MB which is far too low especially when the platform is able to run MP. New limits are, amd64 = 256M; arm64, mips64, sparc64 = 64M; alpha, arm, hppa, i386, powerpc = 32M; m88k, sh = 8M Still rather conservative numbers but much better than before. At least some hangs of arm64 build boxes was caused by this. OK kettenis@, visa@
* #define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an archderaadt2018-03-051-1/+2
| | | | | | | | | | needs (looking at you sgi, but others required this before). This is for the circumstances we need pagesize known at compile time, not getpagesize() runtime. Use it for malloc storage sizes, for shm, and to set pthread stack default sizes. The stack sizes were a mess, and pushing them towards page-aligned is healthy move (which will also be needed by the coming stack register checker) ok guenther kettenis, discussion with stefan
* Move landisk to MI mutex.mpi2018-02-111-61/+2
| | | | ok dlg@
* Move mutex, condvar, and thread-specific data routes, pthread_once, andguenther2017-09-051-5/+1
| | | | | | | | pthread_exit from libpthread to libc, along with low-level bits to support them. Major bump to both libc and libpthread. Requested by libressl team. Ports testing by naddy@ ok kettenis@
* kill RCSID macros; discussed with millertderaadt2017-06-291-4/+1
|
* Unbreak profiling assembly functions in userland by defining thempi2017-06-231-2/+2
| | | | | | correct prologue if compiled with -DPROF. ok deraadt@
* Fix kernel build on armv7 and sh.visa2017-05-181-2/+2
| | | | Pointed out by deraadt@
* Hook up mutex(9) to witness(4).visa2017-04-201-3/+4
|
* Provide mips64 with kernel-facing TCB_{GET,SET} macros that store itguenther2017-04-131-3/+1
| | | | | | | in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB macro can be unifdef'ed as always defined. ok kettenis@ visa@ jsing@
* In exec_elf.c: expand ELFNAME(), ELFNAME2(), and ELFNAMEEND() exceptguenther2017-02-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | leaving out the size, so that ELFNAME2(exec,makecmds) becomes exec_elf_makecmds instead of exec_elf{32,64}_makecmds and then delete the ELFNAME2() and ELFNAMEEND() macros. Move the prototypes for functions local to exec_elf.c to there from exec_elf.h. Simplify the SMALL_KERNEL conditionals around the ELF coredump code. Change exec_conf.c to use the size-generic names and macros Remove exec_elf{32,64}.c and just build exec_elf.c; delete the _KERN_DO_ELF and _KERN_DO_ELF64 #defines. ok jca@, encouragement from deraadt@ and tom@
* Increase the number of mbufs on most architectures. This is basedbluhm2016-09-031-2/+2
| | | | | | | on a guess how much memory a typical machine has. If the value is too high, users may run out of kernel memory. Then we will have to adjust this again. OK claudio@ deraadt@
* Remove the non ELF macrosderaadt2016-05-272-32/+3
| | | | ok millert
* Save and restore 'gbr' register when enter/leaving the kernel, and useguenther2016-05-184-5/+25
| | | | | | it for the TCB pointer. Eliminate __cerror. "looks good" kettenis@, testing and ok deraadt@
* SROP mitigation. sendsig() stores a (per-process ^ &sigcontext) cookiederaadt2016-05-101-3/+3
| | | | | | | | inside the sigcontext. sigreturn(2) checks syscall entry was from the exact PC addr in the (per-process ASLR) sigtramp, verifies the cookie, and clears it to prevent sigcontext reuse. not yet tested on landisk, sparc, *88k, socppc. ok kettenis
* G/C DDB_REGS.mpi2016-04-271-2/+1
|
* Rename kdb_trap() into db_ktrap().mpi2016-02-271-2/+2
| | | | | | | | The goal is to include it in the list of functions that must not be instrumented. All ddb(8) functions should be in this list and have their names start with 'db_'. ok visa@, deraadt@
* intr_barrier for sh/landisk; tobiasu noticed the need as wellderaadt2016-01-151-1/+3
|
* Use #ifndef _MACHINE_DISKLABEL_H_ everywhere. Replace _ARM_DISKLABEL_H_krw2015-09-301-4/+4
| | | | | | and _SH_DISKLABEL_H_ with _MACHINE_DISKLABEL_H_. Add the guard to loongson and octeon. The #defines are not used anywhere else in the tree so no functional change.
* Use consistant whitespace/comments for #define'ing LABELSECTOR,krw2015-09-301-4/+4
| | | | | LABELOFFSET and MAXPARTITIONS. Easier on the eye when scanning through all these files. No functional change.
* lint is dead and C99 may be old enough to drive a car: delete LONGLONGguenther2015-09-261-3/+1
| | | | | | comments ok millert@
* _NLIST_DO_ELF is no longer needed: it's the only optionguenther2015-08-291-2/+1
| | | | ok deraadt@
* emul_native is only used for kernel threads which can't dump core, soguenther2015-05-051-4/+1
| | | | | | | | | | | delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump, and various #includes that are superfluous. This leaves compat_linux processes without a coredump callback. If that ability is desired, someone should update it to use coredump_elf32() and verify the results... ok kettenis@
* Remove SIZE_MAX from limits.h. It was added years ago before wemillert2015-04-301-4/+1
| | | | had a proper stdint.h. No ports fallout. OK guenther@ miod@
* Change pmap_remove_holes() to take a vmspace instead of a map as its argument.miod2015-02-151-2/+2
| | | | | Use this on vax to correctly pick the end of the stack area now that the stackgap adjustment code will no longer guarantee it is a fixed location.
* no md code wants lockmgr locks, so no md code needs to include sys/lock.hdlg2015-02-111-2/+1
| | | | with and ok miod@
* split the int and long implementations to avoid compiler warnings.dlg2014-11-171-13/+70
| | | | tested by and ok jsg@
* 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@
* 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@
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-03-291-9/+9
| | | | ok dlg@ mpi@ deraadt@
* 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
|
* 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-111-2/+2
| | | | | 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