summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
AgeCommit message (Collapse)Author
2015-11-02Only define KERNBASE if defined(_KERNEL), for nothing in userland needs it,Miod Vallat
and only if not already defined. Allows for KERNBASE to be defined elsewhere.
2015-09-29Use the DMTC0 macro and MTC0_HAZARD in the UPAGES > 1 case. Now R8000 kernelMiod Vallat
have all their m[ft]c0 instructions correctly wrapped.
2015-09-27Don't forget to put the necessary MFC0_HAZARD in SAVE_CPU. For some reason IMiod Vallat
had put the MTC0_HAZARD in RESTORE_CPU years ago but forgot their counterparts.
2015-09-27On R8000, make trap() behave closer to interrupt() when servicing a realMiod Vallat
interrupt by not invoking refreshcreds(), but closer to itsa() when servicing a trap-reported-as-interrupt by invoking userret() in that case. No change on !defined(CPU_R8000) kernels.
2015-09-26lint is dead and C99 may be old enough to drive a car: delete LONGLONGPhilip Guenther
comments ok millert@
2015-09-26Add a spinout check to the mips64 mutex, to aid debugging.Visa Hankala
ok kettenis@
2015-09-24It is no longer necessary to include CR_BERR in CR_INT_MASK if CPU_R8000.Miod Vallat
2015-09-23That PICA reference ought to have been removed 20 years ago!Miod Vallat
2015-09-23In tlb_update(), when inserting an entry for a KV1 address, reuse theMiod Vallat
current ASID value rather than using zero, so that we can avoid writing back the ASID on exit (and waste cycles because of expensive coprocessor 0 hazards). While there, use conditional instructions when picking a random TLB set number, in order to waste one branch prediction cache entry.
2015-09-23Reorder subtractions and branches to shave one cycle per call toMiod Vallat
tfp_inval_icache().
2015-09-23Output operands of movn and movz in the correct order.Miod Vallat
2015-09-21After reading IRIX header files again, add one more SSNOP to MTC0_HAZARD (andMiod Vallat
remove one from constructs based upon it) when building for R8000.
2015-09-21Fix membar positioning in mtx_enter_try() and (critically!) mtx_leave()Mark Kettenis
Same diff as guenther@ committed for alpha. ok guenther@
2015-09-20Correctly compute the userland pte index in a pte page in the userland tlb missMiod Vallat
handler; from Naruaki Etomi (nullnilaki on gmail), thanks!
2015-09-20Reset the `pending I$ flushes' flag in tfp_InvalidateICache() if invalidatingMiod Vallat
the whole I$.
2015-09-13intr_barrier(9) for loongson, octeon and sgi.Mark Kettenis
2015-09-10Initialize `pc' earlier so that the siginfo pc value is correct in case ofMiod Vallat
genuine FPU exception.
2015-09-09The mplock implementations on MP-enabled mips64 platforms, octeon andVisa Hankala
sgi, are identical. Put one implementation in mips64 and drop the platform-specific copies, to remove duplicated code. ok miod@
2015-09-02simple size for free()Theo de Raadt
2015-08-29_NLIST_DO_ELF is no longer needed: it's the only optionPhilip Guenther
ok deraadt@
2015-08-27Access the image of the floating point registers via p_md.md_regs, instead ofMiod Vallat
directly on the frame, or any updates will get lost. This went unnoticed for so long because FPU emulation traps usually use the first frame of the U area, so values kind of stick. This fixes a rare occurrence of wrong floating-point values with MP kernels on Octeon. ok visa@
2015-08-19Prevent mips64 FPU emulation from corrupting the page queuesVisa Hankala
in MP systems. ok miod@
2015-08-15Some bits for Loongson 3A support.Miod Vallat
2015-08-11Remove unnecessary pmap == NULL checks in mips64 pmap.Visa Hankala
ok miod@
2015-08-03On mips64, enable IPIs before calling refreshcreds() in trap(), toVisa Hankala
avoid a potential deadlock. ok miod@, deraadt@
2015-07-30Make mips64 pmap prepared for the unlocked reaper.Visa Hankala
ok miod@, deraadt@
2015-07-27Allow coalescing of IPI requests on mips64, to make IPI sendingVisa Hankala
non-blocking. This improves performance on systems that have more than a few cores and where there is a heavy IPI load. Currently the only place where coalescing must not happen is rendezvous processing, but there invocations are serialized by the rendezvous mutex. ok miod@
2015-07-19Add proper kernel locking in the fpe_branch_emulate() function, tovisa
prevent race conditions that could corrupt amap entries, among other things. ok miod@ pirofti@
2015-07-17remove obsolete INET kernel optionTed Unangst
2015-07-08unify the mutex implementations on all the mips64 platforms.David Gwynne
this basically copies the sgi implementation to mips64 and removes it from the rest. this way they get an optimised UP mutex implementation and correct asserts on all platforms. ok miod@ jmatthew@
2015-07-02introduce srp, which according to the manpage i wrote is short forDavid Gwynne
"shared reference pointers". srp allows concurrent access to a data structure by multiple cpus while avoiding interlocking cpu opcodes. it manages its own reference counts and the garbage collection of those data structure to avoid use after frees. internally srp is a twisted version of hazard pointers, which are a relative of RCU. jmatthew wrote the bulk of a hazard pointer implementation and changed bpf to use it to allow mpsafe access to bpfilters. however, at s2k15 we were trying to apply it to other data structures but the memory overhead of every hazard pointer would have blown out significantly in several uses cases. a bulk of our time at s2k15 was spent reworking hazard pointers into srp. this diff adds the srp api and adds the necessary metadata to struct cpuinfo on our MP architectures. srp on uniprocessor platforms has alternate code that is optimised because it knows there'll be no concurrent access to data by multiple cpus. srp is made available to the system via param.h, so it should be available everywhere in the kernel. the docs likely need improvement cos im too close to the implementation. ok mpi@
2015-06-16alloc_contiguous_pages() is supposed to round the allocation size to a pageMiod Vallat
boundary, not to an u area boundary. Oops.
2015-06-05trunc_page() generally.... succeeds at clearing the page offsetTheo de Raadt
bits the first time it is called, so don't do it again. ok miod
2015-05-05no need to swizzle load/store addresses for 32bit values on big endian systemsJonathan Matthew
ok miod@
2015-05-05emul_native is only used for kernel threads which can't dump core, soPhilip Guenther
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@
2015-05-02add missing splx callsJonathan Gray
ok miod@
2015-05-01Do not grab the kernel lock for clock interrupts. Help and ok kettenis@Miod Vallat
2015-04-30Remove SIZE_MAX from limits.h. It was added years ago before weTodd C. Miller
had a proper stdint.h. No ports fallout. OK guenther@ miod@
2015-04-20Remove most static, gives us much better ddb tracebacks from secondaryMiod Vallat
processors.
2015-02-15Change pmap_remove_holes() to take a vmspace instead of a map as its argument.Miod Vallat
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.
2015-02-11no md code wants lockmgr locks, so no md code needs to include sys/lock.hDavid Gwynne
with and ok miod@
2015-02-11Explicitely include <sys/atomic.h>Miod Vallat
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-10atomic_{cas,swap}_ptr takes a volatile void *, not a volatile void **.David Gwynne
this makes mips64 consistent with the api and all other archs. testing and ok miod@
2015-02-10Convert to uiomove().Miod Vallat
ok guenther@
2015-02-10First step towards making uiomove() take a size_t size argument:Miod Vallat
- rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
2015-02-09Do not even try to call uvm_grow() from sendsig. It will be invokedMiod Vallat
automagically if copyout() of the signal frame faults.
2015-02-08ANSI'fy.Masao Uebayashi
2015-02-08Fix stack trace of tail calls. From NetBSD. OK miod@Masao Uebayashi
2015-02-08Give up tracing if RA is corrupted. OK miod@Masao Uebayashi