summaryrefslogtreecommitdiff
path: root/sys/arch/sh
AgeCommit message (Collapse)Author
2010-12-14"Implement fast path TLB miss handling. Walk the page table withoutJasper Lievisse Adriaanse
creating a trapframe, with exceptions disabled and using only BANK1 registers. If a valid pte is found, load it and return. Otherwise create a trapframe and proceed to the full-blown C handler." from uwe@netbsd, ok miod@ speed-ups measured by miod@ and me were between 44% and 50%...
2010-12-06Change the signature of PMAP_PREFER from void PMAP_PREFER(..., vaddr_t *) toMiod Vallat
vaddr_t PMAP_PREFER(..., vaddr_t). This allows better compiler optimization when the function is inlined, and avoids accessing memory on architectures when we can pass function arguments in registers.
2010-12-04Introduce a new pci routine, pci_conf_size(), which returns the size of aMiod Vallat
given pcitag_t configuration address space. Currently, all pci controllers will return the usual 0x100 bytes of PCI configuration space, but this will eventually change on PCIe-capable controlers. ok kettenis@
2010-11-27Remove ddb single-step load and store counters. Most platforms do notMiod Vallat
implement them, and they are of questionable usefulness.
2010-11-20This is a first step towards getting rid of avail_start and avail_end in theMiod Vallat
kernel, currently limited to low-hanging fruit: these variables were used by bus_dma to specify the range in which to allocate memory, back when uvm_pglistalloc() was stupid and would not walk the vm_physseg[]. Nowadays, except on some platforms for early initialization, these variables are not used, or do not need to be global variables. Therefore: - remove `extern' declarations of avail_start and avail_end (or close cousins, such as arm physical_start and physical_end) from files which no longer need to use them. - make them local variables whenever possible. - remove them when they are assigned to but no longer used.
2010-11-18Declare pmap_proc_iflush() in <uvm/uvm_pmap.h> unless <machine/pmap.h>Miod Vallat
provides an inline version of it.
2010-09-28Implement a per-cpu held mutex counter if DIAGNOSTIC on all non-x86 platforms,Miod Vallat
to complete matthew@'s commit of a few days ago, and drop __HAVE_CPU_MUTEX_LEVEL define. With help from, and ok deraadt@.
2010-09-20Get rid of evcount's support for arranging counters in a treeMatthew Dempsky
hierarchy. Everything attached to a single root node anyway, so at best we had a bush. "i think it is good" deraadt@
2010-09-06move away from using /**/ to ## for cpp paste in sh locoreJonathan Gray
so we can drop -traditional-cpp ok miod@
2010-08-07No "\n" needed at the end of panic() strings.Kenneth R Westerback
Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
2010-07-02Move common code for waking up writers on a tty into a function.Nicholas Marriott
ok deraadt matthew millert
2010-07-01- don't do curupte checks if the current miss address is user spaceJasper Lievisse Adriaanse
from netbsd ok miod@
2010-06-29Shave off some instructions:Jasper Lievisse Adriaanse
- Use dt to loop over md_upte in sh3_vector_tlbmiss. - Shrink number of instructions for ldtlb from netbsd "commit it" miod@
2010-06-28Allow tty drivers to request larger buffers at attach time using aTheo de Raadt
max-baud-rate hint. Adjust TTYHOG (the nearly full logic) to this new situation. The larger buffers are required by the very high speed KDDI devices in Japan (CF com, or USB ucom) so those are the only two drivers which currently ask for a larger buffer size. ok yasuoka miod
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-06- add more comments to sh3_vector_tlbmiss (no binary change).Jasper Lievisse Adriaanse
- arrange for data blocks to start on 32B cache line boundary. from uwe@netbsd ok miod@ (with an indentation suggestion)
2010-06-06use .L* for local labels and other small cosmeticsJasper Lievisse Adriaanse
from uwe@netbsd ok miod@
2010-06-02- correctly report the number of wired tlb entriesJasper Lievisse Adriaanse
from uwe@netbsd ok miod@
2010-04-26cut down simple locks (so simple that they don't even lock) to the pointTheo de Raadt
where there is almost nothing left to them, so that we can continue getting rid of them ok oga
2010-04-25Do not include <machine/intr.h> from <sh/psl.h>, and fix <sh/cpu.h> whichMiod Vallat
used to depend on <sh/psl.h> bringing <machine/intr.h>.
2010-04-21more cleanup to cope with the change that tries to make proc.h not actTheo de Raadt
like it is everything.h ok tedu
2010-04-16catch up to the ttyopen() changesTheo de Raadt
2010-04-12Some of the line disciplines want to check for suser. Better to pass themTed Unangst
a process instead of using curproc. ok deraadt
2010-04-04OpenBSD uses bus_space_copy_#, not bus_space_copy_region_#. Make sure only theMiod Vallat
first name is used, and remove any #define foo_region foo compatibility defines. Also, on sparc64, do not provide a `raw' version of bus_space_copy.
2010-01-01Since sh4_emode_icache_sync_all() and sh4_emode_dcache_wbinv_all()Miod Vallat
explicitely process both cache ways, there is no need to give them the whole EMODE cache size as a range to operate on; only half the size will do; this avoid working on the cache twice.
2010-01-01Remove unused *_CACHE_FLUSH() macros.Miod Vallat
2010-01-01Make sure page is cache invalidated in pmap_unmap_direct(), for the next useMiod Vallat
of this page may use different cache indexes. ok kettenis@
2009-12-25Implement bus_space_vaddr().Miod Vallat
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-17Initialize the FPU to be in double precision mode for SH4. This is what theMark Kettenis
Linux kernel does and is obviously what GCC expects. Fixed segmentation faults in omalloc_init() for shared executables linked with the pthreads library. tested by otto@, ok deraadt@, drahn@
2009-11-09Every selwakeup() should have a matching KNOTE() (even if kqueue isn'tNicholas Marriott
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and remove it from any occurences where both are used, except one for kqueue itself and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag). Based on a diff from tedu. ok deraadt
2009-11-04Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.Mark Kettenis
ok jsing@, miod@
2009-10-31Use suser when possible. Suggested by miod@.Federico G. Schwindt
miod@ deraadt@ ok.
2009-10-31Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()Theo de Raadt
calls can go directly into selwakeup() safely long discussion with nicm, murmers of consent from tedu and miod, noone else seems to care of kqueue is busted as long as it makes their sockets move data fast... pretty sad.
2009-08-13A new(er) mtx_enter_try().Tobias Weingartner
Ok oga@, "the time is now" deraadt@.
2009-08-11Do not bother initializing bufpages in the md code if the computation isMiod Vallat
exactly the same the mi could will use if bufinit() is invoked with bufpages == 0.
2009-08-11With the SysV memory allocation changes, allocsys() doesn't do anythingMiod Vallat
anymore. Get rid of it completely.
2009-08-09Another lost bit for SysV message queues.Bret Lambert
2009-07-26Create the pci resource extents as covering the full 4GB address space,Miod Vallat
with only the available range free, instead of that range only. ok kettenis@
2009-07-23Allow __pmap_pv_enter() to fail, instead of dereferencing NULL; and let theMiod Vallat
caller deal with this; this really makes the PMAP_CANFAIL logic work. ok kettenis@
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-25Get rid of pci_addr_fixup machinery; set up the appropriate extents and passMark Kettenis
them along when we attach pci(4). ok miod@
2009-04-19Mutexes for arm and sh softinterrupts.Owain Ainsworth
ok miod@
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-25Deinline softintr_schedule().Miod Vallat
2009-02-14Fix logic error in copyinstr() when deciding whether to return EFAULTMiod Vallat
or ENAMETOOLONG.
2009-02-04Unify memory size reports a bit more: always report size in MB, and reportMiod Vallat
reserved memory on alpha and hppa on its own line (as done on sgi).
2008-12-30savecore(8) wants dumpmag to be an unsigned long.Miod Vallat