summaryrefslogtreecommitdiffstats
path: root/sys/alpha
Commit message (Collapse)AuthorAgeFilesLines
...
* Always compile PFIL_HOOKS into the kernel and remove the associated kernelandre2004-08-271-1/+0
| | | | | | | | | | | compile option. All FreeBSD packet filters now use the PFIL_HOOKS API and thus it becomes a standard part of the network stack. If no hooks are connected the entire packet filter hooks section and related activities are jumped over. This removes any performance impact if no hooks are active. Both OpenBSD and DragonFlyBSD have integrated PFIL_HOOKS permanently as well.
* Remove unnecessary check for curthread == NULL.alc2004-08-261-1/+1
|
* Regenerate after fcntl() wrappers were marked MP safe.jhb2004-08-246-8/+8
|
* Fix the ABI wrappers to use kern_fcntl() rather than calling fcntl()jhb2004-08-243-22/+15
| | | | | | | | directly. This removes a few more users of the stackgap and also marks the syscalls using these wrappers MP safe where appropriate. Tested on: i386 with linux acroread5 Compiled on: i386, alpha LINT
* Add a new type, l_uintptr_t, which is an unsigned integer type with thetjr2004-08-161-0/+4
| | | | | same width as a pointer under Linux. Add two new macros, PTRIN and PTROUT, which convert between l_uintptr_t and native pointers.
* - Make pmap_emulate_reference() MP and preemption safe. Previously, italc2004-08-151-30/+20
| | | | | | | | | | contained "sanity" checks that could be violated if another CPU modified the pmap between the emulation trap and locking the pmap in pmap_emulate_reference(). As a result, the pte could be inconsistent with the access that caused the emulation trap. In such cases, pmap_emulate_reference() now flushes the current CPU's TLB entry and returns. - Make pmap_changebit() an inline function, reducing object code size.
* Add __elfN(dump_thread). This function is called from __elfN(coredump)marcel2004-08-111-0/+7
| | | | | | | | | 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
* Post-locking clean up/simplification, particularly, the elimination ofalc2004-08-041-57/+49
| | | | | | | | | | vm_page_sleep_if_busy() and the page table page's busy flag as a synchronization mechanism on page table pages. Also, relocate the inline pmap_unwire_pte_hold() so that it can be used to shorten _pmap_unwire_pte_hold() on alpha and amd64. This places pmap_unwire_pte_hold() next to a comment that more accurately describes it than _pmap_unwire_pte_hold().
* 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
* Remove extraneous ';'.markm2004-08-011-1/+1
|
* Turn off PREEMPTION by default while it gets debugged. It's been causingscottl2004-08-011-0/+3
| | | | | 4 weeks of problems including deadlocks and instant panics. Note that the real bugs are likely in the scheduler.
* Break out the MI part of the /dev/[k]mem and /dev/io drivers intomarkm2004-08-013-148/+61
| | | | | | | | 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.
* Advance the state of pmap locking on alpha, amd64, and i386.alc2004-07-291-13/+20
| | | | | | | | | | | | | | | | - Enable recursion on the page queues lock. This allows calls to vm_page_alloc(VM_ALLOC_NORMAL) and UMA's obj_alloc() with the page queues lock held. Such calls are made to allocate page table pages and pv entries. - The previous change enables a partial reversion of vm/vm_page.c revision 1.216, i.e., the call to vm_page_alloc() by vm_page_cowfault() now specifies VM_ALLOC_NORMAL rather than VM_ALLOC_INTERRUPT. - Add partial locking to pmap_copy(). (As a side-effect, pmap_copy() should now be faster on i386 SMP because it no longer generates IPIs for TLB shootdown on the other processors.) - Complete the locking of pmap_enter() and pmap_enter_quick(). (As of now, all changes to a user-level pmap on alpha, amd64, and i386 are performed with appropriate locking.)
* Move a relic to its correct location(s): Put nfs diskless initializationphk2004-07-281-21/+0
| | | | calls with the code they call. (Yet another example of mindless copy&paste).
* 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
* Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This iscperciva2004-07-261-2/+2
| | | | | | | | | | | somewhat clearer, but more importantly allows for a consistent naming scheme for suser_cred flags. The old name is still defined, but will be removed in a few days (unless I hear any complaints...) Discussed with: rwatson, scottl Requested by: jhb
* 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
* Add some additional pmap locking and lock assertions.alc2004-07-211-0/+5
|
* The previous revision introduced a compilation error, i.e., the use of analc2004-07-201-1/+1
| | | | undefined variable. Correct this error.
* - Eliminate the pte object from the pmap. Instead, page table pages arealc2004-07-192-146/+63
| | | | | | | | | | | | | allocated as "no object" pages. Similar changes were made to the amd64 and i386 pmap last year. The primary reason being that maintaining a pte object leads to lock order violations. A secondary reason being that the pte object is redundant, i.e., the page table itself can be used to lookup page table pages. (Historical note: The pte object predates our ability to allocate "no object" pages. Thus, the pte object was a necessary evil.) - Unconditionally check the vm object lock's status in vm_page_remove(). Previously, this assertion could not be made on Alpha due to its use of a pte object.
* As a temporary hack, turn off deferred preemptions that are the result ofjhb2004-07-191-0/+2
| | | | | | | a fast interrupt handler doing an swi_sched(). This fixed the lockups I saw on my laptop when using xmms in KDE and on rwatson's MySQL benchmarks on SMP. This will eventually be removed and/or modified when I figure out what the root cause is and fix that.
* In -CURRENT pseudo devices are not statically assigned at compile time,maxim2004-07-181-1/+1
| | | | | | remove a stale comment. PR: kern/62285
* Only extract a physical address from a pte in pmap_extract() if the pte isalc2004-07-181-9/+13
| | | | | | | valid. Implement the protection check required by the pmap_extract_and_hold() specification. (This enables the elimination of Giant from that function.)
* MFamd64 revision 1.478alc2004-07-171-6/+5
| | | | Simplify pmap_remove_pages(), eliminating unnecessary indirection.
* Remove dead or unused code, such as spl calls.alc2004-07-161-25/+0
|
* Preparation commit for the tty cleanups that will follow in the nearphk2004-07-152-2/+2
| | | | | | | | | future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming.
* Push down the acquisition and release of the page queues lock intoalc2004-07-151-0/+5
| | | | | | 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.
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-0/+1
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Additional pmap lockingalc2004-07-141-28/+49
|
* In pmap_remove_pages(), when clearing a pte, update the correspondingalc2004-07-141-0/+4
| | | | | | page's dirty mask. Reviewed by: gallatin@
* Rev 1.24 of sys/ptrace.h adds ptrace_clear_single_step() prototypekensmith2004-07-131-1/+0
| | | | | | | definition so this one causes "redundant declaration" error and breaks Alpha kernel build. Reviewed by: gallatin@ and test build on beast
* Push down the acquisition and release of the page queues lock intoalc2004-07-131-3/+2
| | | | | | | | pmap_remove_pages(). (The implementation of pmap_remove_pages() is optional. If pmap_remove_pages() is unimplemented, the acquisition and release of the page queues lock is unnecessary.) Remove spl calls from the alpha, arm, and ia64 pmap_remove_pages().
* Now that the console setup is identical to that on other platforms,marcel2004-07-111-0/+2
| | | | | | we also need to have the right sio(4) flags: sio0: flags=0x10 so that it will be console. sio1: flags=0x80 so that it can be used as debug port.
* 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.
* Remove the now unused GDB stubs. See src/sys/gdb/* for the new KDBmarcel2004-07-111-746/+0
| | | | backend.
* Mega update for the KDB framework: turn DDB into a KDB backend.marcel2004-07-104-371/+177
| | | | | | | | | | | | | | | | 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 fr the KDB framework:marcel2004-07-103-50/+28
| | | | | | | | | o Make debugging support conditional upon KDB instead of DDB. o Call kdb_trap() according to the new world order. o Kill the NO_SIO option completely. o Respect the boot_gdb environment variable. o Don't make debug specific kernel options conditional. o Remove implementation of Debugger().
* Update for the KDB framework. Sanitize the alpha console code now thatmarcel2004-07-1012-469/+11
| | | | | | | | | | | | | | | | | | it's in the way even more. Basicly: remove all alpha specific console support from gfb(4), sio(4) and syscons(4). Rewrite the alpha console initialization to be identical to all other platforms. In a nutshell: call cninit(). The platform specific code now only sets or clears RB_SERIAL and thus automaticly causes the right console to be selected. sio.c: o Replace the remote GDB hacks and use the GDB debug port interface instead. o Make debugging code conditional upon KDB instead of DDB. o Call kdb_alt_break() instead of db_alt_break(). o Call kdb_enter() instead of breakpoint(). o Remove the ugly compatibility of using the console as the debug port.
* Update for the KDB framework:marcel2004-07-101-6/+5
| | | | | | o Remove inclusion of opt_ddb.h. o Call kdb_enter() instead of Debugger(). o Make debugging code conditional upon KDB.
* Implement makectx(). The makectx() function is used by KDB to createmarcel2004-07-102-0/+24
| | | | | | | | | 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/+49
| | | | | | | | | | | | | | | 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/+153
| | | | | | | | | 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.
* Change the following environment variables to kernel options:brian2004-07-081-6/+6
| | | | | | | | | | | | | bootp -> BOOTP bootp.nfsroot -> BOOTP_NFSROOT bootp.nfsv3 -> BOOTP_NFSV3 bootp.compat -> BOOTP_COMPAT bootp.wired_to -> BOOTP_WIRED_TO - i.e. back out the previous commit. It's already possible to pxeboot(8) with a GENERIC kernel. Pointed out by: dwmalone
* Change the following kernel options to environment variables:brian2004-07-081-6/+6
| | | | | | | | | | | | | | | | | | BOOTP -> bootp BOOTP_NFSROOT -> bootp.nfsroot BOOTP_NFSV3 -> bootp.nfsv3 BOOTP_COMPAT -> bootp.compat BOOTP_WIRED_TO -> bootp.wired_to This lets you PXE boot with a GENERIC kernel by putting this sort of thing in loader.conf: bootp="YES" bootp.nfsroot="YES" bootp.nfsv3="YES" bootp.wired_to="bge1" or even setting the variables manually from the OK prompt.
* Add pmap locking to pmap_emulate_reference(). Remove unused and once-usedalc2004-07-081-8/+8
| | | | | | variables. Tested by: kensmith@
* Add pmap locking to pmap_protect().alc2004-07-071-0/+2
|
* - Correct pmap_extract()'s return type. It should be vm_paddr_t, notalc2004-07-051-4/+2
| | | | | vm_offset_t. - Convert pmap_extract() to the ANSI style of declaration.
* MFamd64/i386alc2004-07-052-0/+33
| | | | | | Add partial pmap locking. Tested by: kensmith@
* Implement preemption of kernel threads natively in the scheduler ratherjhb2004-07-022-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
OpenPOWER on IntegriCloud