summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* Add __elfN(dump_thread). This function is called from __elfN(coredump)marcel2004-08-111-0/+8
| | | | | | | | | to allow dumping per-thread machine specific notes. On ia64 we use this function to flush the dirty registers onto the backingstore before we write out the PRSTATUS notes. Tested on: alpha, amd64, i386, ia64 & sparc64 Not tested on: arm, powerpc
* Add pmap locking to many of the functions.alc2004-08-104-20/+72
| | | | | | | | | | | | | Implement the protection check required by the pmap_extract_and_hold() specification. Remove the acquisition and release of Giant from pmap_extract_and_hold() and pmap_protect(). Many thanks to Ken Smith for resolving a sparc64-specific initialization problem in my original patch. Tested by: kensmith@
* - Push down the acquisition and release of Giant into pmap_enter_quick()alc2004-08-041-0/+2
| | | | | on those architectures without pmap locking. - Eliminate the acquisition and release of Giant in vm_map_pmap_enter().
* Making a loadable null.ko for /dev/(null|zero) proved rathermarkm2004-08-031-1/+0
| | | | | | unpopular, so remove this (mis)feature. Encouragement provided by: jhb (and others)
* Instead of calling ia32_pause() conditionally on __i386__ or __amd64__mux2004-08-031-0/+1
| | | | | | | | | being defined, define and use a new MD macro, cpu_spinwait(). It only expands to something on i386 and amd64, so the compiled code should be identical. Name of the macro found by: jhb Reviewed by: jhb
* Break out the MI part of the /dev/[k]mem and /dev/io drivers intomarkm2004-08-013-84/+58
| | | | | | | | their own directory and module, leaving the MD parts in the MD area (the MD parts _are_ part of the modules). /dev/mem and /dev/io are now loadable modules, thus taking us one step further towards a kernel created entirely out of modules. Of course, there is nothing preventing the kernel from having these statically compiled.
* - Push down the acquisition and release of Giant into pmap_protect() onalc2004-07-301-0/+4
| | | | | | | | those architectures without pmap locking. - Eliminate the acquisition and release of Giant from vm_map_protect(). (Translation: mprotect(2) runs to completion without touching Giant on alpha, amd64, i386 and ia64.)
* Pass a thread argument into cpu_critical_{enter,exit}() rather thanrwatson2004-07-271-8/+4
| | | | | | | | | dereference curthread. It is called only from critical_{enter,exit}(), which already dereferences curthread. This doesn't seem to affect SMP performance in my benchmarks, but improves MySQL transaction throughput by about 1% on UP on my Xeon. Head nodding: jhb, bmilekic
* Use kmem_alloc_nofault() rather than kmem_alloc_pageable() for allocatingalc2004-07-231-1/+1
| | | | | KVA for explicitly managed mappings, i.e., mappings created with pmap_qenter().
* Unify db_stack_trace_cmd(). All it did was look up the thread givenmarcel2004-07-211-14/+0
| | | | | | | | | | | | | | | the thread ID and call db_trace_thread(). Since arm has all the logic in db_stack_trace_cmd(), rename the new DB_COMMAND function to db_stack_trace to avoid conflicts on arm. While here, have db_stack_trace parse its own arguments so that we can use a more natural radix for IDs. If the ID is not a thread ID, or more precisely when no thread exists with the ID, try if there's a process with that ID and return the first thread in it. This makes it easier to print stack traces from the ps output. requested by: rwatson@ tested on: amd64, i386, ia64
* In -CURRENT pseudo devices are not statically assigned at compile time,maxim2004-07-181-1/+1
| | | | | | remove a stale comment. PR: kern/62285
* Push down the acquisition and release of the page queues lock intoalc2004-07-151-1/+4
| | | | | | pmap_protect() and pmap_remove(). In general, they require the lock in order to modify a page's pv list or flags. In some cases, however, pmap_protect() can avoid acquiring the lock.
* Add ptrace_clear_single_step(), alpha already has it for years, the functiondavidxu2004-07-131-0/+7
| | | | will be used by ptrace to clear a thread's single step state.
* The SC_DISABLE_DDBKEY options has been renamed to SC_DISABLE_KDBKEY.marcel2004-07-111-1/+1
|
* Add options KDB and GDB. KDB takes on the function of what DDB usedmarcel2004-07-111-1/+3
| | | | to be. Both DDB and GDB specify which KDB backends to include.
* Mega update for the KDB framework: turn DDB into a KDB backend.marcel2004-07-103-217/+178
| | | | | | | | | | | | | | | | Most of the changes are a direct result of adding thread awareness. Typically, DDB_REGS is gone. All registers are taken from the trapframe and backtraces use the PCB based contexts. DDB_REGS was defined to be a trapframe on all platforms anyway. Thread awareness introduces the following new commands: thread X switch to thread X (where X is the TID), show threads list all threads. The backtrace code has been made more flexible so that one can create backtraces for any thread by giving the thread ID as an argument to trace. With this change, ia64 has support for breakpoints.
* Update for the KDB framework:marcel2004-07-103-25/+24
| | | | | | | | o Make debugging code conditional upon KDB instead of DDB. o Call kdb_enter() instead of Debugger(). o Remove implementation of Debugger(). o Check kdb_active instead of db_active. o Call kdb_trap() according to the new world order.
* Update for the KDB framework:marcel2004-07-101-1/+2
| | | | o Call kdb_enter() instead of Debugger().
* Remove obsolete prototype of kdb_trap().marcel2004-07-101-2/+0
|
* Implement makectx(). The makectx() function is used by KDB to createmarcel2004-07-102-0/+16
| | | | | | | | | a PCB from a trapframe for purposes of unwinding the stack. The PCB is used as the thread context and all but the thread that entered the debugger has a valid PCB. This function can also be used to create a context for the threads running on the CPUs that have been stopped when the debugger got entered. This however is not done at the time of this commit.
* Introduce the KDB debugger frontend. The frontend provides a frameworkmarcel2004-07-101-0/+50
| | | | | | | | | | | | | | | in which multiple (presumably different) debugger backends can be configured and which provides basic services to those backends. Besides providing services to backends, it also serves as the single point of contact for any and all code that wants to make use of the debugger functions, such as entering the debugger or handling of the alternate break sequence. For this purpose, the frontend has been made non-optional. All debugger requests are forwarded or handed over to the current backend, if applicable. Selection of the current backend is done by the debug.kdb.current sysctl. A list of configured backends can be obtained with the debug.kdb.available sysctl. One can enter the debugger by writing to the debug.kdb.enter sysctl.
* Introduce the GDB debugger backend for the new KDB framework. Themarcel2004-07-102-0/+127
| | | | | | | | | backend improves over the old GDB support in the following ways: o Unified implementation with minimal MD code. o A simple interface for devices to register themselves as debug ports, ala consoles. o Compression by using run-length encoding. o Implements GDB threading support.
* - Add missing <sys/module.h>. [1]marius2004-07-091-1/+3
| | | | | | | - Remove unused includes. - Sort includes. Reported by: Pyun YongHyeon <yongari@kt-is.co.kr> [1]
* These don't need RMAN_RESOURCE_VISIBLE now that rman is visibleimp2004-07-034-4/+0
|
* Really remove __RMAN_RESORUCE_VISIBLEimp2004-07-032-2/+0
|
* Use the rman_* functions in preference to reaching into struct resource.imp2004-07-032-5/+5
| | | | | Remove __RMAN_RESOURCE_VISIBLE after compilation confirms it is now not needed.
* Implement preemption of kernel threads natively in the scheduler ratherjhb2004-07-021-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than as one-off hacks in various other parts of the kernel: - Add a function maybe_preempt() that is called from sched_add() to determine if a thread about to be added to a run queue should be preempted to directly. If it is not safe to preempt or if the new thread does not have a high enough priority, then the function returns false and sched_add() adds the thread to the run queue. If the thread should be preempted to but the current thread is in a nested critical section, then the flag TDF_OWEPREEMPT is set and the thread is added to the run queue. Otherwise, mi_switch() is called immediately and the thread is never added to the run queue since it is switch to directly. When exiting an outermost critical section, if TDF_OWEPREEMPT is set, then clear it and call mi_switch() to perform the deferred preemption. - Remove explicit preemption from ithread_schedule() as calling setrunqueue() now does all the correct work. This also removes the do_switch argument from ithread_schedule(). - Do not use the manual preemption code in mtx_unlock if the architecture supports native preemption. - Don't call mi_switch() in a loop during shutdown to give ithreads a chance to run if the architecture supports native preemption since the ithreads will just preempt DELAY(). - Don't call mi_switch() from the page zeroing idle thread for architectures that support native preemption as it is unnecessary. - Native preemption is enabled on the same archs that supported ithread preemption, namely alpha, i386, and amd64. This change should largely be a NOP for the default case as committed except that we will do fewer context switches in a few cases and will avoid the run queues completely when preempting. Approved by: scottl (with his re@ hat)
* These need __RMAN_RESOURCE_VISIBLE, too.marius2004-06-306-0/+8
|
* Retire BUS_DMAMAP_NSEGS for sparc64scottl2004-06-282-9/+1
|
* Switch sparc64 busdma to use a dynamically allocated segment list ratherscottl2004-06-283-60/+45
| | | | | | than a a stack-limited list. This removes the artifical limit on s/g list size. cvs: ----------------------------------------------------------------------
* Better OFW console support on Sun Ultra2 machines.obrien2004-06-241-0/+2
| | | | | | | | | Ultra2 users may want to set OFWCONS_POLL_HZ to a value of '20'. I have left default value at '4' as higher values can consume a more than is acceptable amount of CPU, and we don't have a consensus yet what is an optimal value. Submitted by: Pyun YongHyeon <yongari@kt-is.co.kr>
* Backed out previous commit. Blind substitution of dev_t by `struct cdev *'bde2004-06-201-1/+1
| | | | was just wrong here because the dev_t's are user dev_t's.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-164-10/+10
| | | | Bump __FreeBSD_version accordingly.
* Add esp to the sparc64 GENERICscottl2004-06-101-0/+1
|
* Port the NetBSD esp(4) driver. This only includes the sbus front-end, soscottl2004-06-103-0/+1041
| | | | | | | | | | | its primary use is for the FEPS/FAS366 SCSI found in Sun Ultra 1e and 2 machines. Once the pci front-end is ported, this driver can replace the amd(4) driver. The code as-is is fairly stable. I've disabled tagged-queueing until I can figure out a corruption bug related to it. I'm importing it now so that people with these machines can (finally) stop netbooting and report bugs before 5.3.
* Remove filename+line number from panic messages.phk2004-06-061-4/+2
|
* Add missing <sys/module.h> #includesphk2004-06-046-0/+6
|
* Remove checks for curthread == NULL - it can't happen.tjr2004-06-031-5/+3
|
* Add missing <sys/module.h> instances which were shadowed by the nestedphk2004-06-036-0/+7
| | | | include in <sys/kernel.h>
* Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoidtjr2004-06-031-9/+4
| | | | | | | having to acquire sched_lock when manipulating it in lockmgr(), uiomove(), and uiomove_fromphys(). Reviewed by: jhb
* Bring in mbuma to replace mballoc.bmilekic2004-05-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mbuma is an Mbuf & Cluster allocator built on top of a number of extensions to the UMA framework, all included herein. Extensions to UMA worth noting: - Better layering between slab <-> zone caches; introduce Keg structure which splits off slab cache away from the zone structure and allows multiple zones to be stacked on top of a single Keg (single type of slab cache); perhaps we should look into defining a subset API on top of the Keg for special use by malloc(9), for example. - UMA_ZONE_REFCNT zones can now be added, and reference counters automagically allocated for them within the end of the associated slab structures. uma_find_refcnt() does a kextract to fetch the slab struct reference from the underlying page, and lookup the corresponding refcnt. mbuma things worth noting: - integrates mbuf & cluster allocations with extended UMA and provides caches for commonly-allocated items; defines several zones (two primary, one secondary) and two kegs. - change up certain code paths that always used to do: m_get() + m_clget() to instead just use m_getcl() and try to take advantage of the newly defined secondary Packet zone. - netstat(1) and systat(1) quickly hacked up to do basic stat reporting but additional stats work needs to be done once some other details within UMA have been taken care of and it becomes clearer to how stats will work within the modified framework. From the user perspective, one implication is that the NMBCLUSTERS compile-time option is no longer used. The maximum number of clusters is still capped off according to maxusers, but it can be made unlimited by setting the kern.ipc.nmbclusters boot-time tunable to zero. Work should be done to write an appropriate sysctl handler allowing dynamic tuning of kern.ipc.nmbclusters at runtime. Additional things worth noting/known issues (READ): - One report of 'ips' (ServeRAID) driver acting really slow in conjunction with mbuma. Need more data. Latest report is that ips is equally sucking with and without mbuma. - Giant leak in NFS code sometimes occurs, can't reproduce but currently analyzing; brueffer is able to reproduce but THIS IS NOT an mbuma-specific problem and currently occurs even WITHOUT mbuma. - Issues in network locking: there is at least one code path in the rip code where one or more locks are acquired and we end up in m_prepend() with M_WAITOK, which causes WITNESS to whine from within UMA. Current temporary solution: force all UMA allocations to be M_NOWAIT from within UMA for now to avoid deadlocks unless WITNESS is defined and we can determine with certainty that we're not holding any locks when we're M_WAITOK. - I've seen at least one weird socketbuffer empty-but- mbuf-still-attached panic. I don't believe this to be related to mbuma but please keep your eyes open, turn on debugging, and capture crash dumps. This change removes more code than it adds. A paper is available detailing the change and considering various performance issues, it was presented at BSDCan2004: http://www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf Please read the paper for Future Work and implementation details, as well as credits. Testing and Debugging: rwatson, brueffer, Ketrien I. Saihr-Kesenchedra, ... Reviewed by: Lots of people (for different parts)
* Retire cpu_sched_exit(); it is not used any more.tmm2004-05-261-5/+0
|
* Move the per-CPU vmspace pointer fixup that is required before atmm2004-05-265-36/+41
| | | | | | | | | | | | | struct vmspace is freed from cpu_sched_exit() to pmap_release(). This has the advantage of being able to rely on MI code to decide when a free should occur, instead of having to inspect the reference count ourselves. At the same time, turn the per-CPU vmspace pointer into a pmap pointer, so that pmap_release() can deal with pmaps exclusively. Reviewed (and embrassing bug spotted) by: jake
* Use unsigned types for the arguments of the atomic(9) operations,marius2004-05-221-4/+4
| | | | | | like described in the man page and done on all other architectures. OK'ed by: tmm
* Switch from BSD-style u_intXX_t to ISO C99 uintXX_t.marius2004-05-222-5/+5
|
* In cpu_sched_exit(), we must check vm_refcnt against 0, not 1, sincetmm2004-05-201-1/+1
| | | | exit1() decrements the reference count before calling this function.
* Moved most of the "MI" definitions and declarations from <machine/profile.h>bde2004-05-191-30/+1
| | | | | | to <sys/gmon.h>. Cleaned them up a little by not attempting to ifdef for incomplete and out of date support for GUPROF in userland, as in the sparc64 version.
* <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN isstefanf2004-05-181-1/+1
| | | | | | | | defined. Otherwise first including <wchar.h> and then <stdint.h> leads to no WINT_M{AX,IN} at all. PR: 64956 Approved by: das (mentor)
* Oops, I left a duplicate 'relocbase' declaration.peter2004-05-171-1/+0
| | | | Submitted by: Koop Mast <kwm@rainbow-runner.nl>
* Make a small revision to the api between the elf linker core and thepeter2004-05-161-4/+5
| | | | | | elf_reloc() backends for two reasons. First, to support the possibility of there being two elf linkers in the kernel (eg: amd64), and second, to pass the relocbase explicitly (for relocating .o format kld files).
OpenPOWER on IntegriCloud