summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/include
AgeCommit message (Collapse)Author
2014-10-24Bring phys_map to sparc64 and use it in vmapbuf(9) and vunmapbuf(9).Mark Kettenis
2014-10-22make [bl]emtoh{16,32,64} take volatile const foo *, not volatile foo *David Gwynne
while in the manpage add volatile where the code has it too. ok miod@ guenther@
2014-10-15move CPU_BUSY_CYCLES define out of #ifdef/else MULTIPROCESSOR, its meant toSebastian Reitenbach
be for both cases. OK ketennis@
2014-10-09revert unintentional commit unrelated to LKMTed Unangst
2014-10-09remove LKM devicesTed Unangst
2014-07-20RB_MINIROOT is never checked by anything, so stop setting it.Theo de Raadt
2014-07-18atomic_swap_ptr is special.David Gwynne
for jmatthew@
2014-07-18pass atomic_{cas,swap}_uint a volatile void * instead of a volatileDavid Gwynne
void **. the latter is really hard to cast for, and not what what solaris does. ok kettenis@
2014-07-12Tackle the endian.h mess. Make it so that:Philip Guenther
* 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@
2014-07-11CPU_BUSY_CYCLE(): A new MI statement for busy loop power reductionMasao Uebayashi
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@
2014-03-29It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
ok dlg@ mpi@ deraadt@
2014-03-25the memory constraints are correct on the MD_SWAPIO bits, so we dont needDavid Gwynne
the extra restrictions that __volatile provides on the __asm statements.
2014-03-19It's safe to assumed 'signed' existsPhilip Guenther
2014-03-16DDB supports ELF symbols are all archs, and it's always the same as thePhilip Guenther
native size, so eliminate the #defines. ok miod@
2014-03-15make the membars look more correct for any memory ordering mode.David Gwynne
ok kettenis@
2014-03-14provide an MI api for doing byteswapping loads and stores. someDavid Gwynne
archs have instrutions that can do this, and the rest that dont get to use wrappers around the byteswap(3) api. this provides MI backends for sparc64 and powerpc which get a big benefit from this because byteswapping in registers is really hard for them. the intended use case is for reading and writing bits of dma memory handed to and from hardware. discussed with miod@ guenther@ deraadt@ ok miod@ kettenis@
2014-03-14rework mplock as ticket locks instead of spinlocks. this providesDavid Gwynne
fairer access to the kernel lock (which suffers very heavy contention at the moment). i wrote this at n2k14 and reworked it shortly after to use the mi atomic ops api when that was agreed on. ive been running it on my systems ever since. the version before the atomic op tweaks was tested by kettenis@ n2k14 (deraadt@ and kettenis@ in particular if i recall correctly) oked this going in after 5.5
2014-03-11lint is gone, and the 'lint' conditional was never in the implementationPhilip Guenther
namespace, so stop changing behavior when it's #defined ok beck@ krw@
2014-01-30Move declaration of struct vm_page_md from <machine/vmparam.h> toMiod Vallat
<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).
2014-01-30Undef def_atomic_op_nv instead of def_atomic_opf.Mark Kettenis
2014-01-30move sparc64 behind the MI atomic api.David Gwynne
this basically replaces sparc64_cas and sparc64_casx with atomic_cas_uint and atomic_cas_ulong respectively. it then builds atomic_add and atomic_sub out of those. this avoids the gcc atomic builtins that the MI atomic_foo api uses by default, so we dont get the extra membars that the builtins do but the atomic_foo api doesnt promise. it also fixes up the code that used to use sparc64_{cas,casx} to use the atomic_cas api instead. use of the sparc64 membar() macros are left untouched for now. ok kettenis@
2014-01-23Add defines for resumable and nonresumable error queues.Mark Kettenis
2014-01-23unifdef -D__HAVE_VM_PAGE_MD - no functional change.Miod Vallat
2013-12-18Provide MI symbol _STACKALIGNBYTESTheo de Raadt
2013-11-05Add a stub for the new MD hook needed to handle ACPI Power Resources.Martin Pieuchot
ok kettenis@
2013-10-17Remove a.out leftovers now that libsa loadfile() will only boot ELF binaries.Miod Vallat
2013-08-08Add PMAP_NOCACHE as an alias for PMAP_NC for use in semi-MI code.Mark Kettenis
2013-07-14To prevent lock ordering problems with the kernel lock, we need to make sureMark Kettenis
we block all interrupts that can grab the kernel lock. The simplest way to achieve this is to make sure mutexes always raise the ipl to the highest level that has interrupts that grab the kernel lock. This will allow us to have "mpsafe" interrupt handlers at lower priority levels. No change for non-MULTIPROCESSOR kernels.
2013-07-13unify register_t to long on all platformsTheo de Raadt
ok miod kettenis
2013-07-05Take II, this time without flubbing off_t: : move several internalPhilip Guenther
type definitions that are the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@ kettenis@ otto@
2013-07-04backout previous; off_t must be signed and there might be other C++ APIOtto Moerbeek
breakage lurking; ok kettenis@
2013-07-04To ease future changes, move several internal type definitions that arePhilip Guenther
the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughTheo de Raadt
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-06-02Add the TLS relocationsPhilip Guenther
2013-06-01cleanup and consolidate the spinlock_lock (what a name!) code.Ted Unangst
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)
2013-05-31remove counters for simplelocksTed Unangst
2013-05-21remove unused cpu_lock code (where it is truly unused). it is notTed Unangst
part of the future we have planned. middling ok from a few
2013-05-17Implement IPL_MPSAFE for pci bus interrupt handlers.Mark Kettenis
2013-05-13Implement support for running interrupt handlers without taking the kernelMark Kettenis
lock, by adding a new BUS_INTR_ESTABLISH_MPSAFE flag for use with the (sparc64-specific) bus_intr_establish(9) interface. Add support for this flag to schizo(4); other bus drivers will ignore it for now. While there, remove the BUS_INTR_ESTABLISH_FASTTRAP flag which serves no purpose.
2013-04-21Unify the zs tty driver.Sebastian Reitenbach
Most of the hard work by mpi@, who provided the initial diff. Fixes for sparc from myself. Tested on sgi and sparc myself. Compiles and detects zstty on my powerbook, compile tested on sparc64 by me. Real testing with zs device on sparc64 by miod@ who also gave a lot of help and feedback. ok miod@, mpi@
2013-04-02Get rid of SYSCALL_G7RFLAG. iIt's been deprecated for a long time already,Mark Kettenis
and we've started using %g7 as a per-thread register now. If you have any binaries left that use this flag they'll probably crash and burn!
2013-04-01Do not expose the trap T_* values to userland, since they invade theTheo de Raadt
namespace a bit much. These are the names for the value encoded in core.c_ucode or siginfo.si_trapno, but userland never looks directly and only cares about the abstract signal code. ok guenther
2013-03-31try to avoid pulling in pte.h and other more crazy things. Checked againstTheo de Raadt
the things that libkvm needs.
2013-03-28Add STRONG_ALIAS macros to be used from assembly code in libc andMartynas Venckus
libm. While at it, remove now unused workarounds for lint. Agreed by kettenis@, guenther@, matthew@.
2013-03-28Add __strong_alias macros for all architectures to be able to aliasMartynas Venckus
another symbol without weak attribute. To be used in libc and libm soon. Agreed by kettenis@, guenther@, matthew@.
2013-03-26PGSHIFT and PGOFSET are now contained inside the kernel namespace.Theo de Raadt
2013-03-25ALIGNBYTES/ALIGN/ALIGNED_POINTER can move to the MI file.Theo de Raadt
2013-03-23refactor sys/param.h and machine/param.h. A lot of #ifdef _KERNEL is addedTheo de Raadt
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...
2013-03-12Fix kernel profiling on MP systems by using per-CPU buffers and teachMartin Pieuchot
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@
2013-02-12Back out per-CPU kernel profiling, it shouldn't modify a public headerMartin Pieuchot
at this moment.