summaryrefslogtreecommitdiffstats
path: root/sys/alpha
Commit message (Collapse)AuthorAgeFilesLines
* - Call fork1() directly instead of calling rfork() so that it doesn't maskjhb2001-03-111-9/+5
| | | | | | | | out RFSTOPPED. - Lock the child process when settings p_sigparent instead of locking the parent. Pointy-hat to: me
* Fix mtx_legal2block. The only time that it is bad to block on a mutex isjhb2001-03-091-2/+0
| | | | | | | | | | | | | | | | if we hold a spin mutex, since we can trivially get into deadlocks if we start switching out of processes that hold spinlocks. Checking to see if interrupts were disabled was a sort of cheap way of doing this since most of the time interrupts were only disabled when holding a spin lock. At least on the i386. To fix this properly, use a per-process counter p_spinlocks that counts the number of spin locks currently held, and instead of checking to see if interrupts are disabled in the witness code, check to see if we hold any spin locks. Since child processes always start up with the sched lock magically held in fork_exit(), we initialize p_spinlocks to 1 for child processes. Note that proc0 doesn't go through fork_exit(), so it starts with no spin locks held. Consulting from: cp
* Unrevert the pmap_map() changes. They weren't broken on x86.jhb2001-03-071-9/+9
| | | | Sense beaten into me by: peter
* - Release Giant a bit earlier on syscall exit.jhb2001-03-071-14/+9
| | | | | | - Don't try to grab Giant before postsig() in userret() as it is no longer needed. - Don't grab Giant before psignal() in ast() but get the proc lock instead.
* Grab the process lock while calling psignal and before calling psignal.jhb2001-03-072-3/+3
|
* Use the proc lock to protect p_pptr when waking up our parent in cpu_exit()jhb2001-03-071-1/+2
| | | | and remove the mpfixme() message that is now fixed.
* Just use proc lock to protect reading of p_pptr rather than a proctreejhb2001-03-071-21/+17
| | | | lock.
* Back out the pmap_map() change for now, it isn't completely stable on thejhb2001-03-071-9/+9
| | | | i386.
* - Rework pmap_map() to take advantage of direct-mapped segments onjhb2001-03-061-9/+9
| | | | | | | | | | | | | | | | | | | supported architectures such as the alpha. This allows us to save on kernel virtual address space, TLB entries, and (on the ia64) VHPT entries. pmap_map() now modifies the passed in virtual address on architectures that do not support direct-mapped segments to point to the next available virtual address. It also returns the actual address that the request was mapped to. - On the IA64 don't use a special zone of PV entries needed for early calls to pmap_kenter() during pmap_init(). This gets us in trouble because we end up trying to use the zone allocator before it is initialized. Instead, with the pmap_map() change, the number of needed PV entries is small enough that we can get by with a static pool that is used until pmap_init() is complete. Submitted by: dfr Debugging help: peter Tested by: me
* Create clone'd linux processes as stopped processes at first and don'tjhb2001-03-061-2/+9
| | | | | actually make them runnable until after the emulator layer has had a chance to perform fixups.
* Quiet a warning due to bus_size_t being a long on the alpha.jhb2001-03-061-1/+1
|
* handle reserved/unimplemented instruction (opDec) faultsgallatin2001-03-052-2/+187
| | | | | | | | | This lets us run programs containing newer (eg bwx) instructions on older (eg EV5 and less) machines. One win is that we can now run Acrobat4 on EV4s and EV5s. Obtained from: NetBSD Glanced at by: mjacob
* Add MODULE_DEPEND() for the sysvipc modules. This allows the linulatorgallatin2001-03-051-0/+3
| | | | | | to load when sysvipc is not in the kernel Reported by: naddy@mips.inka.de (Christian Weisgerber)
* sync with i386:gallatin2001-03-051-0/+2
| | | | | | | | | MFS: bring the consistent `compat_3_brand' support This should fix the linux-related panics reported by naddy@mips.inka.de (Christian Weisgerber) Forgotten by: obrien
* Fix the unaligned access code to handle stores from R31 (zero)gallatin2001-03-051-2/+3
| | | | PR alpha/25535
* Disable interrupts while sanity checking the owner of the floating pointdfr2001-03-041-0/+5
| | | | | state. It is possible that we could be preempted part way through the check.
* Account for the new flags field in struct trapframe.dfr2001-03-031-1/+1
|
* Rename switch_trampoline() to fork_trampoline() on the alpha and ia64.jhb2001-02-223-5/+5
| | | | Suggested by: dfr
* - Use TRAPF_PC() on the alpha to acess the PC in the trap frame.jhb2001-02-221-4/+3
| | | | | | | - Don't hold sched_lock around addupc_task() as this apparently breaks profiling badly due to sched_lock being held across copyin(). Reported by: bde (2)
* GC unused and now obsolete assertion macros.jhb2001-02-221-10/+0
|
* Cleanup and clarify the comments above switch_trampoline().jhb2001-02-221-2/+5
|
* Remove attempt to add in PREEMPTION #ifdef test in MI code that didn'tjhb2001-02-211-0/+4
| | | | | | work because opt_preemption.h wasn't #include'd. Instead, make use of the do_switch parameter to ithread_schedule() and do the check in the alpha interrupt code.
* Fix the osfulator in the face of Doug's optimized system call return path.gallatin2001-02-211-0/+2
| | | | | | | We now need to set [FRAME_FLAGS] to zero to force a full restore of state after a signal. reported by: naddy@mips.inka.de (Christian Weisgerber)
* - Add a new ithread_schedule() function to do the bulk of the work ofjhb2001-02-201-38/+3
| | | | | | | | | | | | | | | | scheduling an interrupt thread to run when needed. This has the side effect of enabling support for entropy gathering from interrupts on all architectures. - Change the software interrupt and x86 and alpha hardware interrupt code to use ithread_schedule() for most of their processing when scheduling an interrupt to run. - Remove the pesky Warning message about interrupt threads having entropy enabled. I'm not sure why I put that in there in the first place. - Add more error checking for parameters and change some cases that returned EINVAL to panic on failure instead via KASSERT(). - Instead of doing a documented evil hack of setting the P_NOLOAD flag on every interrupt thread whose pri was SWI_CLOCK, set the flag explicity for clk_ithd's proc during start_softintr().
* - Don't call clear_resched() in userret(), instead, clear the resched flagjhb2001-02-205-26/+0
| | | | | | | | | | | | in mi_switch() just before calling cpu_switch() so that the first switch after a resched request will satisfy the request. - While I'm at it, move a few things into mi_switch() and out of cpu_switch(), specifically set the p_oncpu and p_lastcpu members of proc in mi_switch(), and handle the sched_lock state change across a context switch in mi_switch(). - Since cpu_switch() no longer handles the sched_lock state change, we have to setup an initial state for sched_lock in fork_exit() before we release it.
* Regengallatin2001-02-203-13/+13
|
* Sort out the umount breakage introduced in the last 2 revisions.gallatin2001-02-201-4/+4
| | | | | | | | | Please note: When committing changes to this file, it is important to note that linux is not freebsd -- their system call numbers (and sometimes names) are different on different platforms. When in doubt (and you always need to be) check the arch-specific unistd.h and entry.S files in the linux kernel sources to see what the syscall numbers really are.
* Regenerate.jlemon2001-02-203-15/+10
|
* Fix duplicate linux_mount definitionjlemon2001-02-201-4/+4
|
* Changed the aston() family to operate on a specified process instead ofbde2001-02-192-3/+3
| | | | | | | | | | | | | | always on curproc. This is needed to implement signal delivery properly (see a future log message for kern_sig.c). Debogotified the definition of aston(). aston() was defined in terms of signotify() (perhaps because only the latter already operated on a specified process), but aston() is the primitive. Similar changes are needed in the ia64 versions of cpu.h and trap.c. I didn't make them because the ia64 is missing the prerequisite changes to make astpending and need_resched per-process and those changes are too large to make without testing.
* Correct disordering which is corresponding to bde's fix toume2001-02-171-1/+1
| | | | i386/include/ansi.h.
* Allow debugging output to be controlled on a per-syscall granularity.jlemon2001-02-162-35/+53
| | | | | | Also clean up debugging output in a slightly more uniform fashion. The default behavior remains the same (all debugging output is turned on)
* Re-gen auto generated files.jlemon2001-02-163-6/+27
|
* Remove dummy stub functions.jlemon2001-02-161-2/+0
|
* Add mount syscall to linux emulation. Also improve emulation of reboot.jlemon2001-02-162-4/+15
|
* Correct 2nd argument of getnameinfo(3) to socklen_t.ume2001-02-151-0/+1
| | | | Reviewed by: itojun
* Doug found that doing a W1C on MCPCIA_INT_REQ just around the time youmjacob2001-02-131-12/+27
| | | | | | | | clear MCPCIA_INT_MASK0 helps things substantially. So, why not indeed? Rearrange irq and cookie calculation to use shifts/masks instead of division. Fix things to correctly remember the intpin for that one in a million non-INTA PCI device.
* add defines for EISA, NCR IRQs; add defines for MID and SLOT shift valuesmjacob2001-02-131-0/+5
|
* add mcbus minimum id valuemjacob2001-02-131-1/+2
|
* Doug noticed that the bit values for _MCPCIA_INT_ACK0/_MCPCIA_INT_ACK1mjacob2001-02-131-4/+13
| | | | | | | | | made no sense in the context of wrapping them within the _SYBRIDGE macro- or anything like it- so we concluded that this must have been a typo in the docs. This also doesn't use the same bridge offset as anything else. Add some defines for the INT_CTL register.
* Implement a unified run queue and adjust priority levels accordingly.jake2001-02-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - All processes go into the same array of queues, with different scheduling classes using different portions of the array. This allows user processes to have their priorities propogated up into interrupt thread range if need be. - I chose 64 run queues as an arbitrary number that is greater than 32. We used to have 4 separate arrays of 32 queues each, so this may not be optimal. The new run queue code was written with this in mind; changing the number of run queues only requires changing constants in runq.h and adjusting the priority levels. - The new run queue code takes the run queue as a parameter. This is intended to be used to create per-cpu run queues. Implement wrappers for compatibility with the old interface which pass in the global run queue structure. - Group the priority level, user priority, native priority (before propogation) and the scheduling class into a struct priority. - Change any hard coded priority levels that I found to use symbolic constants (TTIPRI and TTOPRI). - Remove the curpriority global variable and use that of curproc. This was used to detect when a process' priority had lowered and it should yield. We now effectively yield on every interrupt. - Activate propogate_priority(). It should now have the desired effect without needing to also propogate the scheduling class. - Temporarily comment out the call to vm_page_zero_idle() in the idle loop. It interfered with propogate_priority() because the idle process needed to do a non-blocking acquire of Giant and then other processes would try to propogate their priority onto it. The idle process should not do anything except idle. vm_page_zero_idle() will return in the form of an idle priority kernel thread which is woken up at apprioriate times by the vm system. - Update struct kinfo_proc to the new priority interface. Deliberately change its size by adjusting the spare fields. It remained the same size, but the layout has changed, so userland processes that use it would parse the data incorrectly. The size constraint should really be changed to an arbitrary version number. Also add a debug.sizeof sysctl node for struct kinfo_proc.
* RIP <machine/lock.h>.markm2001-02-112-40/+0
| | | | | | | Some things needed bits of <i386/include/lock.h> - cy.c now has its own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK() has been moved to <i386/include/apic.h> (AKA <machine/apic.h>). Reviewed by: jhb
* Temporary workaround to get things to compile. I could have updatedmjacob2001-02-102-2/+9
| | | | | | | | genassym here, but what I've also noticed is that we're dorking with a mutex directly at assembler level- I'm not sure that this is wise at this stage in the SMP port- I think it's going to be much safer for a while to do things in C until SMP wunderkind figure out what works and slow down this 3 order differential...
* Clear the reschedule flag after finding it set in userret(). Thisjake2001-02-101-0/+1
| | | | | used to be in cpu_switch(), but I don't see any difference between doing it here.
* Reenable preemption on interrupts. My last commit accidentally revertedjhb2001-02-101-1/+13
| | | | | | | it as I was playing with some other ways of doing kernel preemption. You must still specify the PREEMPTION option in your config file to get a preemptive kernel.
* - Make astpending and need_resched process attributes rather than CPUjhb2001-02-106-58/+31
| | | | | | | | | | | attributes. This is needed for AST's to be properly posted in a preemptive kernel. They are backed by two new flags in p_sflag: PS_ASTPENDING and PS_NEEDRESCHED. They are still accesssed by their old macros: aston(), astoff(), etc. For completeness, an astpending() macro has been added to check for a pending AST, and clear_resched() has been added to clear need_resched(). - Rename syscall2() on the x86 back to syscall() to be consistent with other architectures.
* Add a macro mtx_intr_enable() to alter a spin lock such that interruptsjhb2001-02-101-0/+1
| | | | will be enabled when it is released.
* Use the MI ithread helper functions in the alpha hardware interrupt code.jhb2001-02-099-266/+63
|
* - Catch up to the new swi API changes:jhb2001-02-091-1/+1
| | | | | | | - Use swi_* function names. - Use void * to hold cookies to handlers instead of struct intrhand *. - In sio.c, use 'driver_name' instead of "sio" as the name of the driver lock to minimize diffs with cy(4).
* Move the initailization of the proc lock for proc0 very early into the MDjhb2001-02-091-0/+1
| | | | startup code.
OpenPOWER on IntegriCloud