summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
AgeCommit message (Collapse)Author
2010-06-27Bunch of include adjustements to restore compilability.Miod Vallat
2010-06-26Don't #include <sys/user.h> into files that don't need the stuffPhilip Guenthe
it defines. In some cases, this means pulling in uvm.h or pcb.h instead, but most of the inclusions were just noise. Tested on alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax, mostly by krw and naddy. ok krw@
2010-06-22Don't play with cacheability in vmapbuf() - pmap_enter() knows what it does.Miod Vallat
This is a leftover from a very old workaround for a very old and long gone pmap_enter() bug.
2010-06-22Since our caches are snooping, we only need to broadcast cache invalidatesMiod Vallat
on 88110 designs. Brings a ~8% speedup on GENERIC.MP on 197DP.
2010-05-09hander -> handlerJasper Lievisse Adriaanse
ok miod@
2010-05-02Precompute the userland process apr cache bits into a global variable.Miod Vallat
On AViiON systems with the 6:1 CMMU:CPU configuration, force cached mappings to be writethrough - this probably hides a bug in the code, but that's the only way so far to get such a system running stably.
2010-04-25Update various comments.Miod Vallat
2010-04-21<sys/systm.h> required now.Miod Vallat
2010-04-20destintation -> destinationMiod Vallat
2010-04-18Work in progress support for AViiON models 4600 and 530.Miod Vallat
Also features support for {awkw,bast}ard 6:1 CMMU:CPU configurations (4I2D). Tested on model 4605, which runs up to cpu_initclocks(), which is not written for this system family yet. No regression on model 4300.
2009-12-16zap two more handrolled equivalents of nitems().Jasper Lievisse Adriaanse
ok miod@
2009-11-27Move MB_LEN_MAX into the machine-independent sys/limits.h header,Philip Guenthe
rather than defining it separately for each architecture. Also set it to 4, to accommodate for future UTF-8 support (rfc3629). Diff by stsp, committing to catch the libc major bump ok kettenis@, guenther@
2009-11-04Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.Mark Kettenis
ok jsing@, miod@
2009-09-27In pmap_proc_iflush(), do not bother checking for pmap being curpmap on anyMiod Vallat
processor, since caches are physically addressed and we are working on physical addresses.
2009-08-13A new(er) mtx_enter_try().Tobias Weingartner
Ok oga@, "the time is now" deraadt@.
2009-05-02Drop the pm_cpus bitmask field from struct pmap, and instead remember theMiod Vallat
currently active userland pmap in each processors struct cpu_info. This thus skips the complete tlb flush if idle switches back to the proc previously running on this processor.
2009-04-27Revert mtx_enter_try. It didn't compile on hppa, it doesn't compile onMark Kettenis
landisk, and the sparc implementation is obviously wrong. That's where I stopped looking, so who knows what else was broken. A simple comparison of the existing mtx_enter with the new mtx_enter_try would have told anybody.
2009-04-25Enter mtx_enter_try. In part for completeness, things may startTobias Weingartner
using this soon(ish). Ok oga@, sorta yes kettenis@.
2009-04-19Rename max_cpus to ncpusfound and compute it regardless of optionMiod Vallat
MULTIPROCESSOR.
2009-03-26Remove cpu_wait(). It's original use was to be called from the reaper soOwain Ainsworth
MD code would free resources that couldn't be freed until we were no longer running in that processor. However, it's is unused on all architectures since mikeb@'s tss changes on x86 earlier in the year. ok miod@
2009-03-15Generic softinterrupt support for m88k based platforms, adapted from armMiod Vallat
with different locking mechanism. 88110 soft ipi are replaced with an ipi callback which is checked upon return from exception (it can not be kept as a softintr, as the generic softinterrupt code doesn't have per-cpu pending softintr queues).
2009-03-15Introduce splsoftassert(), similar to splassert() but for soft interruptMiod Vallat
levels. This will allow for platforms where soft interrupt levels do not map to real hardware interrupt levels to have soft ipl values overlapping hard ipl values without breaking spl asserts.
2009-03-04Since 88110 processors can not flush individual TLB entries, instead ofMiod Vallat
flushing the whole TLB block every time a pte is modified, store a bitmask of pending flushes and do them at pmap_update() time. 88100 behaviour is unchanged.
2009-03-04Introduce atomic_clear_int() as an MD atomic operation to perform atomicMiod Vallat
exchange with zero; use it in the soft interrupt code to make it simpler and faster.
2009-03-04Fix stupid logic bug in rw_cas_m88k(), makes NFS much happier on SMP kernels.Miod Vallat
2009-03-01Files forgotten during last commit:Miod Vallat
Rework nmi handling to handle ``complex'' NMI faster, and return as fast as possible from the exception, without doing the AST and softintr dance. This should avoid too much stack usage under load. ok deraadt@
2009-02-21Move part of the mp lock logic into per-cpu callbacks; on MVME197DP we needMiod Vallat
to disable NMI sources in addition to interrupt sources, and we can not use a quick sequence with shadowing frozen as done for atomic ops. This lets GENERIC.MP boot multiuser on MVME197DP boards, and is so far stable enough to be able to recompile a kernel from scratch (with make -j2).
2009-02-21Get rid of 88110 nmi stacks. This was a good idea, but I outsmarted myselfMiod Vallat
since it was intended to service NMI occuring in user mode, and we could end up invoking preempt() and have another cpu start using this stack, with interesting results.
2009-02-20This should get me nominated for the ``stupidest bug of the year'' award.Miod Vallat
2009-02-20atomic_{set,clear}bits_int were not safe enough on 88110 systems, as theyMiod Vallat
can be interrupted by NMI; move the SMP version of these routines from inlines to a separate file (kernel text shrinks 20KB...). Since the implementation for 88110 becomes really hairy, the pre-main() code is responsible for copying the appropriate code over for kernels configured for both 88100 and 88110 cpus, to avoid having to choose the atomicity strategy at runtime. Hairy, I said. This gets GENERIC.MP run much further on 197DP. Not enough to reach multiuser mode, but boots up to starting sshd and then panics.
2009-02-18In __cpu_simple_lock(), do not hog the bus with exclusive accesses; ifMiod Vallat
xmem didn't return the expected value, spin doing regular loads until it appears we have a chance to grab the lock again.
2009-02-18typoMiod Vallat
2009-02-17Pass a cpu_info * to setsoftipi() so it does not need to curcpu(), whichMiod Vallat
synchronizes the pipeline on 88110.
2009-02-16More 88110 SMP work. Contains, horribly entangled:Miod Vallat
- dma_cachectl() split into a ``local cpu only'' and ``all cpus'', and an ipi to broadcast ``local dma_cachectl'' is added. - cpu_info fields are rearranged, to have the 88100-specific information and the 88110-specific information overlap, and has many more 88110 ugly things. - more ipi handling in the 197-specific area. Since it is not possible to have the second processor receive any hardware interrupt (selection is done on a level basis via ISEL, and we definitely do not want the main cpu to lose interrupts), the best we can do is to inflict ourselves a soft interrupt for late ipi processing. It gets used for softclock and hardclock on the secondary processor, but since the soft interrupt dispatcher doesn't have an exception frame, we have to remember parts of it to build a fake clockframe from the soft ipi handler (ugly but works). This now lets GENERIC.MP run a few userland binaries before bugs trigger.
2009-02-16Since NMI are now handled separately, remove the ``interrupt type'' argumentMiod Vallat
from interrupt() and related function pointers.
2009-02-16Rewrite the way the initial processing of exceptions is done on 88110 - weMiod Vallat
now set up both the exception frame structure and the exception stack as soon as possible, so that we can safely get interrupted by an NMI as soon as we reenable shadowing.
2009-02-15If we are on the NMI stack, do not switch to the curpcb stack moments later,Miod Vallat
this defeats the purpose of having a separate stack at this point... Oopsie
2009-02-13Use a different dispatcher for the NMI traps on 88110, these are tooMiod Vallat
different from regular hardware interrupts to be worth handling the same way. Disable IPI reception while we are handling pending IPIs. And do not reenable them by mistake if we need to send an IPI in return. This lets GENERIC.MP boot single user on a MVME197DP. There are still many bugs to fix.
2009-02-13When switching processes, do not reenable interrupts until pmap_activate()Miod Vallat
has been invoked on the new process.
2009-02-08On 88110 processors, use a separate stack to handle NMI; these can occurMiod Vallat
while we are switching pcbs and all sort of bad things could happen.
2009-02-08Don't bother trying to recover from DSR_WE data faults in kernel mode,Miod Vallat
pmap makes sure these can't happen.
2009-02-01Remove dma_cachectl() and rename dma_cachectl_pa() to dma_cachectl() now thatMiod Vallat
the old vs(4) code is gone.
2008-12-21Proper cpu_unidle() function for MP kernels. ok art@ long agoMiod Vallat
2008-11-27On 88100 cpus, make sure userland processes start with SNIP and SFIP validMiod Vallat
(i.e. with the valid bit set in them). Found the hard way by Anders Gavare trying his latest gxemul, proves the hardware is more permitting than one would expect it to be...
2008-10-30In cpu_switchto(), always pmap_deactivate() the process being switched out,Miod Vallat
even in non-MP kernels, to avoid unnecessary tlb flushes later when pmap operates on shared pages.
2008-10-27Rename "machine cpu" to "machine ddbcpu" in MP kernels, for consistency withMiod Vallat
other MP platforms.
2008-10-23Move the va_copy define to <sys/stdrag.h> making sure it is uniformalyMark Kettenis
protected by __ISO_C_VISIBLE > 1999. With a little help from miod@. ok miod@
2008-10-15make random(9) return per-cpu values (by saving the seed in the cpuinfo),Theo de Raadt
which are uniform for the profclock on each cpu in a SMP system (but using a different seed for each cpu). on all cpus, avoid seeding with a value out of the [0, 2^31-1] range (since that is not stable) ok kettenis drahn
2008-10-10Add empty cpu_unidle() macros for architectures that currently don't doArtur Grabowski
anything special to prod a cpu to leave the idle loop in signotify. powerpc, i386, amd64 and sparc64 will follow soon so that everyone has the same interface to wake an idling cpu.
2008-10-10Define MAXCPUS on all architectures.Artur Grabowski
For now, sparc64 is arbitrarily set to 256 (only architecture that didn't have a practical limit in the code on the number of cpus).