summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
AgeCommit message (Collapse)Author
2014-04-18Have each thread keeps its own (counted!) reference to the process's ucredsPhilip Guenther
to avoid possible use-after-free references when swapping ids in threaded processes. "Do I have the right creds?" checks are always made with the threads creds. Inspired by FreeBSD and NetBSD "right time" deraadt@
2014-04-14Fewer <uvm/uvm.h>Martin Pieuchot
2014-04-13Clean up last bits of TCP_WRAPPERS and ELF_TOOLCHAIN.Brad Smith
ok miod@
2014-04-07Enable upd(4) on archs where uhidev(4) is present, requested by mpi@.andre
2014-04-07Add axen(4) wherever axe(4) is.Brad Smith
ok mpi@ yuo@
2014-04-04It seems that, when the on-board USB controller is an ALI M5237 USB and itsMiod Vallat
interrupt is routed through the ISA PIC, the interrupt is edge-triggered (despite PCI interrupts being level-triggered). Attempt to recognize this and correctly setup the PIC ELCR register to `edge'. This allows ES40 systems (and maybe others, but apparently all the other alpha systems with on-board M5237 correctly route its interrupt as a PCI interrupt) to reliably boot multiuser without suffering from USB interrupt storms (this is especially noticeable when using glass console which, unlike serial console, does not trigger other interrupts to give other devices a chance to run). However, this is not enough yet to allow for proper USB device usage; your mileage may vary. Tested by bluhm@ and me. Putting it early in the release cycle so that regressions on other systems, if any, can hopefully get noticed soon enough.
2014-03-31Use extent_alloc_with_descr(9) and add a mutex to protect the extent.Mark Kettenis
This should make bus_dmamap_load(9) and bus_dmamap_unload(9) "mpsafe". As a bonus this gets rid of a potential memory allocation in the IO path. ok miod@
2014-03-31give up on isp, and only use ql[wae]Theo de Raadt
Be a bit cynical about firmware fitting, of course.. ok jmatthew
2014-03-30Eliminates struct pcred by moving the real and saved ugids intoPhilip Guenther
struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
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-26Move p_emul and p_sigcode from proc to process.Philip Guenther
Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@
2014-03-22Move p_sigacts from struct proc to struct process.Philip Guenther
testing help mpi@
2014-03-19It's safe to assumed 'signed' existsPhilip Guenther
2014-03-18To 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. ok miod@
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-14enable qla(4) and qle(4) in ramdisks, except on sgi where the cdfs overflowsJonathan Matthew
2014-03-13get rid of the assumption that the head of the alldevs list is theDavid Gwynne
"mainbus" device. this breaks when mpath is enabled because it attaches before mainbus and therefore takes the head position. have autoconf provide device_mainbus() which looks up mainbus_cd, and use that instead. discussed with deraadt who just wants mpath stuff to move forward despite there being many ways to shine this particular turd.
2014-03-12enable qla(4) and qle(4) in GENERIC configs where isp(4) is alreadyJonathan Matthew
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-03-08Enable qlw(4) on alpha/amd64/i386/macppc/sgi/sparc64 to force people to test.Mark Kettenis
2014-02-23fix a printf in a debug pathJonathan Gray
ok miod@
2014-02-22disable alipm for now. Since GENERIC.MP showed up, a variety of machinesTheo de Raadt
are having trouble, dejavu from sparc64 when we hit multiple-bus-master iic machines using this chipset. In that case, it was chip read/write PCI timeouts, at the moment we do not know. Future work would be to figure this out and re-enable this. ok miod.
2014-02-19Don't try to close(-1) if EPERM.Miod Vallat
2014-02-19/etc/random.seed support.Miod Vallat
2014-02-19add qla and qle everywhere we currently have isp, commented out except forJonathan Matthew
qle in GENERIC on i386, amd64 and sparc64, where it's reasonably well tested and likely to be useful. requested by deraadt@ and kettenis@, ok dlg@
2014-02-18sio_intr_shutdown() used to be a shutdown hook, and eventually became anMiod Vallat
unconditional call in machdep.c!boot(). Except that the cpp conditional enabling its use was not in machdep.c's scope, so this function was never called. Ouch. Remove it from boot() and grow a ca_activate method to the sio(4/alpha) device, which will take care of invoking sio_intr_shutdown() if DVACT_POWERDOWN.
2014-02-06Fix an MP race in the fpu context saving code; from NetBSD.Miod Vallat
2014-02-04Restore spl (lowering it) with alpha_pal_swpipl() instead of splx() in theMiod Vallat
code paths which can be run from ipi handlers, to avoid running soft interrupt handlers if lowering ipl to 0. Soft interrupts will be processed upon returning from the ipi interrupt anyway.
2014-02-03Make sure sched_init_cpu() on the secondary processors is invoked with theMiod Vallat
kernel lock held.
2014-02-02Force an fpu context synchronization before halting secondary processors.Miod Vallat
Similar to what other platforms do.
2014-02-01Use splipi() instead of splhigh() to protect lazy fpu saving code.Miod Vallat
In MP kernel, replace a TOCTTOU-vulnerable assert with a ``loop until we have achieved our goals'' logic.
2014-02-01On MP kernels, invoke SPINLOCK_SPIN_HOOK in mtx_enter() when it spins.Miod Vallat
2014-02-01Simplify try_lock() to avoid one forward branch in the common case.Miod Vallat
2014-02-01pools aren't mp-safe; since the TLB shootdown code will allocate up to 6 jobMiod Vallat
entries per processor, don't bother using a pool and allocate the job entries statically, and manage a per cpu free entries queue in addition to the in-use queue. This avoids corrupting memory...
2014-02-01Lower IPL_SCHED to IPL_CLOCK where it belongs.Miod Vallat
2014-02-01Use atomic_loadlatch_ulong() to speedup and simplify the ipi dispatcher.Miod Vallat
No functional change.
2014-02-01Allow MP_LOCKDEBUG kernels to get tracebacks from other processors whenMiod Vallat
entering ddb. No change for !MP_LOCKDEBUG kernels.
2014-02-01Reset the hwrpb cpu start address after booting the secondaries, in order toMiod Vallat
give dire kernel panics a better chance to reach the SRM.
2014-01-30Abort traceback when a new ra has not been found, instead of looping on itMiod Vallat
and printing the same traceback line several times.
2014-01-30Narrow ci_flags to be able to print ci_mutex_level in the `machine ddbcpu'Miod Vallat
output.
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-28In MUTEX_ASSERT_LOCKED, check we are the mutex owner if MULTIPROCESSOR.Miod Vallat
2014-01-28In cpu_fork(), make sure to set the IPL of the new process to IPL_IPI onMiod Vallat
MULTIPROCESSOR kernels, instead of IPL_NONE; they need to be ipi-safe until proc_trampoline_mp() runs, which will also take care of lowering the ipl to IPL_NONE. One less race in the MP kernel, unfortunately a few more to go...
2014-01-26Work in progress work towards SMP, heavily based upon NetBSD. The MP kernelMiod Vallat
will boot multiuser, but will deadlock under load, and I can't find my mistake yet.
2014-01-23unifdef -D__HAVE_VM_PAGE_MD - no functional change.Miod Vallat
2014-01-19Initialize ci_randseed better using arc4random() + a trick. Remove theTheo de Raadt
libkern srandom() API since it is not suitable for this use. ok kettenis miod
2014-01-06Put PG_EXEC and PG_FOE into the PG_PROT mask, and make sure the defaultMiod Vallat
pte protection masks, as initialized in alpha_protection_init(), set PG_FOE by default when VM_PROT_EXECUTE is not set. Also, change pmap_emulate_reference() to only clear PG_FOE if the affected pte has executable permission. This allows various pmap_pte_exec() checks (added to explicitely set PG_FOE) to be removed. All tests of regress/sys/kern/noexec now reliably pass on EV5. EV6 systems still see spurious (but no longer 100% reproduceable) failures of the `catch a signal' tests, which is likely caused by the effect of mprotect() removing execute permission not taking effect correctly, despite PAL IMB being issued (and no, this is not caused by the previous pmap_changebit() change), to be investigated.
2014-01-06Remove I-sync stuff from pmap_changebit(). The AARM says that weMiod Vallat
only have to sync the I-stream when the mapping is removed or changed, and since the I-stream is fetch-only, changing protection bits does not constitute changing the mapping (the VA->PA translation is still the same). From NetBSD
2014-01-06Program window #2 to allow the second GB of low memory to use direct DMA;Miod Vallat
adapted from a long gone FreeBSD.
2014-01-05Cleanup some leftovers from previous changes.Miod Vallat