summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
AgeCommit message (Collapse)Author
2015-10-05alpha ramdisk ran out of space, very slightly. Probably due to theTheo de Raadt
development of tame? option CD9660 and mount_cd9660 are already absent, so remove the cd(4) driver ok miod
2015-10-01Remove more blinding trailing whitespace.Kenneth R Westerback
2015-10-01Make the alpha pmap (more) mpsafe by protecting both the pmap itself and theMark Kettenis
pv lists with a mutex. This should make pmap_enter(9), pmap_remove(9) and pmap_page_protect(9) safe to use without holding the kernel lock. This largely reverts rev. 1.75, but now of course the pmap locks are defined to actually call mtx_enter(9) and mtx_leave(9). ok visa@
2015-09-30Use consistant whitespace/comments for #define'ing LABELSECTOR,Kenneth R Westerback
LABELOFFSET and MAXPARTITIONS. Easier on the eye when scanning through all these files. No functional change.
2015-09-28Mechanical changes from manual buf set up to readdisksector().Kenneth R Westerback
ok deraadt@
2015-09-27free(x, 0) cleanup:Sebastien Marie
- set size argument of free() - remove pointless if expression around free() call ok guenther@
2015-09-26lint is dead and C99 may be old enough to drive a car: delete LONGLONGPhilip Guenther
comments ok millert@
2015-09-21Fix membar positioning in mtx_enter_try() and (critically!) mtx_leave()Philip Guenther
Problem noticed and initial diff by kettenis@ ok kettenis@ visa@ dlg@
2015-09-19No need for wsmux on these installation media, which lack USB support.Miod Vallat
2015-09-13intr_barrier(9) for alpha.Mark Kettenis
2015-09-08Give the pool page allocator backends more sensible names. We now have:Mark Kettenis
* pool_allocator_single: single page allocator, always interrupt safe * pool_allocator_multi: multi-page allocator, interrupt safe * pool_allocator_multi_ni: multi-page allocator, not interrupt-safe ok deraadt@, dlg@
2015-09-02sizes 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-15If the SRM has explicitely set up some ISA interrupts level-triggered,Miod Vallat
honour this setting and consider them level-triggered instead of `polarity decided by the first driver to use it'. Add explicit code to turn registration of edge-triggered interrupts 3 and 4 into level-triggered, if they were set up a level-triggered by the SRM. Based upon a NetBSD diff which eventually got reverted in NetBSD. However, it turns out this is necessary for the kernel to correctly run with serial console on my Multia.
2015-08-15Store the {e,}isa_chipset_t in the softc, rather than on sio_bridge_callback()'sMiod Vallat
stack, for {e,}isa drivers might have a need for them way after autoconf - at least pcic@isa does.
2015-08-15No need to cargo-cult include <alpha/pci/sioreg.h> here.Miod Vallat
2015-08-15Fix isa_chipset_t ic_intr_{alloc,check} prototype: these take anMiod Vallat
isa_chipset_tag_t, not an isa_chipset_tag_t *, as isa_chipset_tag_t is already a pointer.
2015-08-15Enable AlphaBook 1 support in bsd.rd tooMiod Vallat
2015-08-15When resetting the hwrpb after a succesfull secondary processor spinup,Miod Vallat
make its start routine point to cpu_halt, just in case.
2015-07-26Make sure pci_intr_map() will perform proper interrupt swizzling for devicesMiod Vallat
behind a bridge, if the SRM didn't pick an interrupt line for them.
2015-07-20go a bit further with miods last change to copy{in,out}{,str} andDavid Gwynne
stash the address of the user structure to avoid having to always follow two pointers to get to the address of the onfault handler. this lets the code shrink and avoids some register use. while here, move the range checking of the arguments before saving the callers args onto the stack so we can ret faster on error. ok miod@
2015-07-20Make pmap_remove() grab the kernel lock. This is a big hammer but makes MPMark Kettenis
machines work again with the unlocked reaper. ok mpi@, deraadt@ no objection from miod@
2015-07-18Correctly set up interrupts; now the kernel no longer get stuck with an SCSIMiod Vallat
interrupt storm at the end of autoconf.
2015-07-18Check for errors in the status register after performing a PCI configurationMiod Vallat
space read, for errors may not cause a machine check. This makes phantom PCI devices disappear on alphabook.
2015-07-17remove obsolete INET kernel optionTed Unangst
2015-07-17Remove {LOAD,COUNT}_TEXTA from libsa loadfile, it only made sense for a.outMiod Vallat
kernels and we no longer have any.
2015-07-17Proper prototypes and return values.Miod Vallat
2015-07-03Correctly restore ipl in fpusave_proc() when we have to busy loop.Miod Vallat
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-27MP_LOCKDEBUG code should only be compiled if MULTIPROCESSOR is definedDavid Gwynne
too.
2015-06-23Disable some of the pmap_emulate_reference() DEBUG checks if optionMiod Vallat
MULTIPROCESSOR, and quote the alpha ARM to explain why; while there, make the failure messages a bit more detailed.
2015-06-23In the copy(9) function, make sure to remember curproc accross the bcopy()Miod Vallat
call, instead of &curproc. The copy routine may sleep and we may resume on a different processor. This has been plaguing the alpha MULTIPROCESSOR kernels since the very beginning; it's amazing this did not cause more havoc. Joint debugging and hair pulling with dlg@ and deraadt@; ok dlg@
2015-06-23delete more p==NULL checks; discussed with miod, kettenis, dlg beforeTheo de Raadt
2015-06-11In the copyout family of functions, if the address is out of rangeTheo de Raadt
ensure the register containing the proc pointer is initialized. ok miod
2015-06-05And ... more discussion occurs between miod and kettenis aboutTheo de Raadt
what register dance copyerr should do.....
2015-06-05And part 2 of the onfault repair. Do the actual clearing of pcb_onfaultTheo de Raadt
in copyerr itself, like other architectures of this type do. as a result of chatter between miod and kettenis
2015-06-05Do not unconditionally clear pcb_onfault after a uvm_fault. That willTheo de Raadt
permit the active copyout/copyin to continue work on subsequent faulting pages and not misinterpret & fault them as kernel bcopy against userland addresses. Old bug -- fall of 1996. This should fix getentropy issues on MP systems which have become more apparent recently, probably due to some combo of increased ASLR with unlocked getentropy happening very soon after vfork/fork... ok miod
2015-06-05these days, curproc is never NULL, so skip those checks.Theo de Raadt
Discussed with kettenis
2015-05-29Make ld.so on alpha cope with binaries built with secureplt (where secure hereMiod Vallat
means read-only, which our ld.so already enforced, but a smaller plt section).
2015-05-28when machdep.allowaperture sysctl is set to 3, allow concurrent accessJoshua Stein
2015-05-19Move acquisition of the kernel lock deeper in the interrupt path, and makeMiod Vallat
sure clock interrupts do not attempt to acquire it. This will also eventually allow for IPL_MPSAFE interrupts on alpha. Tested by dlg@ and I.
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-02fix build with option DEBUGMiod 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-17while trying to reproduce lockups on mp alpha i hit anDavid Gwynne
MUTEX_ASSERT_UNLOCKED, but it turns out alpha mutexes arent very friendly to diagnostics on smp systems. alpha mutexes contained an mtx_lock member. when 0 the mutex was unlocked, and when 1 it was locked. the MUTEX_ASSERT_UNLOCKED checked if mtx_lock was 1 to see if the current cpu owned the mutex, but in an mp system another cpu may have set mtx_lock to 1, which causes the assert to fire. this changes alpha mutexes so they record which cpu owns the lock rather than just if the lock is held or not. the diagnostics compare the owner to the current cpus curcpu() address so they can actually tell if the current cpu holds the lock instead of whether any cpu holds the lock. instead of using custom asm to implement a cas this uses atomic_cas_ptr, which on alpha uses gcc cas code. miod says he has far more confidence in the gcc cas than the code that was there before. while im here i also shuffled the code. on MULTIPROCESSOR systems instead of duplicating code between mtx_enter and mtx_enter_try, mtx_enter simply loops on mtx_enter_try until it succeeds. this also provides an alternative implementation of mutexes on !MULTIPROCESSOR systems that avoids interlocking opcodes. mutexes wont contend on UP boxes, theyre basically wrappers around spls. we can just do the splraise, stash the owner as a guard value for DIAGNOSTIC and return. similarly, mtx_enter_try on UP will never fail, so we can just call mtx_enter and return 1. ok miod@
2015-04-16Enable ualea(4) where we have uhub(4), these USB device lists cry forMartin Pieuchot
unification...
2015-03-24unwire lmc(4) and san(4).David Gwynne
they do "interesting" things with APIs i want to change, and i can't find any evidence anyone uses them anymore. instead of burning time on changes i cant test, ill take a chance that noone will miss them. no objections from anyone ok mpi@ deraadt@ henning@ sthen@
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-11the only user of __cpu_cas is lock_machdep, so move it there.David Gwynne
machine/lock.h only provides SPINLOCK_SPIN_HOOK which is included directly by the three files that use it.
2015-02-11get SPINLOCK bits from machine/lock.h instead of sys/lock.hDavid Gwynne