summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/include
AgeCommit message (Collapse)Author
2015-04-09Make the sparc64 pmap (more) mpsafe by protecting both the pmap itself and theMark Kettenis
pv lists with a mutex. Some minor code adjustments to prevent holding locks too long. This should make pmap_enter(9), pmap_remove(9) and pmap_page_protect(9) safe to use without holding the kernel lock.
2015-02-11make the rwlock implementation MI.David Gwynne
each arch used to have to provide an rw_cas operation, but now we have the rwlock code build its own version. on smp machines it uses atomic_cas_ulong. on uniproc machines it avoids interlocked instructions by using straight loads and stores. this is safe because rwlocks are only used from process context and processes are currently not preemptible in our kernel. so alpha/ppc/etc might get a benefit. ok miod@ kettenis@ deraadt@
2015-02-10increase min address to page size for all remaining min == 0 systems.Ted Unangst
not necessary, but consistent with other platforms. ok deraadt
2015-02-08Hilarious! We are not ready yet for large stack random biases, due toTheo de Raadt
the stack region handling in uvm.
2015-02-07Oh well, APM_USER_HIBERNATE_REQ being used in MI code, needs to be definedMiod Vallat
in all MD apmvar.h.
2015-02-05Expand STACKGAP_RANDOM to 2MB on machines with large user VATheo de Raadt
ok kettenis
2014-12-17minimal removal of simplelock to eliminate lock.h dependencyTed Unangst
2014-11-30SPARC T4 and later have a pause instruction to voluntarily pause a virtualMark Kettenis
processor in order to give other strands a chance to run. Use it in __mp_lock_spin_hook() to avoid wasting CPU cycles if we're waiting for the kernel or scheduler locks. This is instruction is patched in, just like we already do for the sleep instruction on SPARC64 VI processors. We look at the hwcap-list property of the cpu nodes in the machine description to decide whether the pause instruction is available.
2014-11-26Add a new ELF segment .openbsd.bootdata to the sparc64 kernel.Stefan Sperling
This can be used to pass boot parameters to the kernel which can't be passed safely via the Open Firmware interface, such as softraid volume IDs and keys. The kernel already reads the arguments if available but ofwboot won't provide them until further changes are committed there. With support from deraadt, kettenis and matthew. ok deraadt@
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!