summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* - Change fast interrupts on x86 to push a full interrupt frame and tojhb2000-10-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | return through doreti to handle ast's. This is necessary for the clock interrupts to work properly. - Change the clock interrupts on the x86 to be fast instead of threaded. This is needed because both hardclock() and statclock() need to run in the context of the current process, not in a separate thread context. - Kill the prevproc hack as it is no longer needed. - We really need Giant when we call psignal(), but we don't want to block during the clock interrupt. Instead, use two p_flag's in the proc struct to mark the current process as having a pending SIGVTALRM or a SIGPROF and let them be delivered during ast() when hardclock() has finished running. - Remove CLKF_BASEPRI, which was #ifdef'd out on the x86 anyways. It was broken on the x86 if it was turned on since cpl is gone. It's only use was to bogusly run softclock() directly during hardclock() rather than scheduling an SWI. - Remove the COM_LOCK simplelock and replace it with a clock_lock spin mutex. Since the spin mutex already handles disabling/restoring interrupts appropriately, this also lets us axe all the *_intr() fu. - Back out the hacks in the APIC_IO x86 cpu_initclocks() code to use temporary fast interrupts for the APIC trial. - Add two new process flags P_ALRMPEND and P_PROFPEND to mark the pending signals in hardclock() that are to be delivered in ast(). Submitted by: jakeb (making statclock safe in a fast interrupt) Submitted by: cp (concept of delaying signals until ast())
* - Heavyweight interrupt threads on the alpha for device I/O interrupts.jhb2000-10-051-2/+4
| | | | | | | | | | | - Make softinterrupts (SWI's) almost completely MI, and divorce them completely from the x86 hardware interrupt code. - The ihandlers array is now gone. Instead, there is a MI shandlers array that just contains SWI handlers. - Most of the former machine/ipl.h files have moved to a new sys/ipl.h. - Stub out all the spl*() functions on all architectures. Submitted by: dfr
* Reduce userland namespace polution.jasone2000-10-041-1/+4
|
* Clear pcb_schednest in cpu_fork() for the child process. This isdfr2000-10-032-0/+14
| | | | | is necessary since the child's call stack only includes one recursive hold of sched_lock.
* #include <sys/proc.h> in order to get curproc. This seems to be the lesserjasone2000-09-231-2/+1
| | | | | of two evils; the greater evil is requiring sys/proc.h to be included before including machine/mutex.h.
* Remove the NCPU, NAPIC, NBUS, NINTR config options. Make NAPIC,ps2000-09-221-2/+0
| | | | | | NBUS, NINTR dynamic and set NCPU to a maximum of 16 under SMP. Reviewed by: peter
* Remove the mtx_t, witness_t, and witness_blessed_t types. Instead, justjhb2000-09-141-25/+23
| | | | | | use struct mtx, struct witness, and struct witness_blessed. Requested by: bde
* - Fix spinlock exiting to handle recursion properly and only enablejhb2000-09-131-5/+7
| | | | | | interrupts at the proper time. - Remove an uneeded test and just always set the MTX_RECURSE bit when recursing on a sleep lock.
* Really disable interrupts for spin mutexes instead of just pretending.dfr2000-09-121-8/+6
|
* The alpha doesn't have a eflags register, so don't refer to it here.jhb2000-09-111-2/+0
|
* Style cleanups. No functional changes.jasone2000-09-091-71/+63
|
* Add file and line arguments to WITNESS_ENTER() and WITNESS_EXIT, sincejasone2000-09-091-16/+16
| | | | | | __FILE__ and __LINE__ don't get expanded usefully in inline functions. Add const to all witness*() arguments that are filenames.
* Add missing \'s to multline macros used for assertions.jhb2000-09-091-2/+2
|
* Use inline functions instead of macros for mtx_enter(), mtx_try_enter(),jasone2000-09-081-146/+160
| | | | | | | | | | | and mtx_exit(). This change tracks the i386 version. Rename mtx_enter(), mtx_try_enter(), and mtx_exit() and wrap them with cpp macros that expand to pass filename and line number information. This is necessary since we're using inline functions instead of macros now. Add const to the filename pointers passed througout the mtx and witness code.
* Major update to the way synchronization is done in the kernel. Highlightsjasone2000-09-077-8/+817
| | | | | | | | | | | | | | | include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
* Support bounce buffers for ISA DMA on the alpha. This is required for thegallatin2000-06-193-4/+1
| | | | | | | irongate chipset (used in the UP1000) which does not support scatter/gather DMA. We'll still use scatter gather if the core logic chipset supports it. Reviewed by: dfr
* cpu_fork(): Check "flags" before dereferencing "p2". Otherwise,alc2000-06-112-6/+4
| | | | | the call "vm_fork(p1, 0, flags);" early in fork1 can cause a kernel panic.
* Handle PCI devices that actually use an ISA IRQ for the cia and tsunamijhb2000-05-101-0/+6
| | | | | | | | chipsets. An example of this is the USB controller on these chipsets. With this, I can now use USB devices on the test Alpha I am borrowing at the moment. Reviewed by: dfr, obrien
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-053-0/+3
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-202-2/+2
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* Update the ata driver to take more advantage of newbus, thissos2000-02-181-1/+6
| | | | | | | | | | | | | | | | was needed to make attach/detach of devices work, which is needed for the PCCARD support. (PCCARD support is still not working though, more to come on that) Support the CMD646 chip which is used on many alphas, sadly only in WDMA2 mode, as the silicon is broken beyond belief for UDMA modes. Lots of cosmetic fixes here and there. Sorry for the size of this megapatchfromhell but it was not possible otherwise... newbus patches based on work from: dfr (Doug Rabson)
* The kernel side of per-process unaligned access control (printing, fixing &gallatin2000-01-162-2/+2
| | | | | | | | | delivering SIGBUS). This will allow a non-superuser to control unaligned access behaviour on a per-process basis once a userland control program (uac) is written. Reviewed by: obrien Tested by: obrien
* Sync with i386marcel2000-01-081-2/+1
| | | | | | | | | | | | | | \begin{quote} Compile genassym.c with ordinary ${CFLAGS}. The (small) needs for ${GEN_CFLAGS} and -U_KERNEL became negative when all all the genassym.c's were converted to be cross-built. Makefile.*: - Cleanups associated with the old genassym. - Fixed deprecated spelling of ${.IMPSRC} as "$<". \end{quote} Submitted by: bde
* Use genassym(1).marcel2000-01-071-107/+92
|
* Revert back all the way to 1.11 - the problem was that Makefile.alpha waspeter2000-01-071-0/+3
| | | | out of sync.
* Don't include <sys/systm.h>. It doesn't do anything, and with recentmsmith2000-01-071-1/+0
| | | | changes it breaks building genassym.
* untangle some includes and clean up for compilation cleanliness.mjacob2000-01-031-3/+1
|
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-293-6/+6
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Make this compile again. (missing #include for RFPROC)peter1999-12-062-0/+2
|
* User ldt sharing.luoqi1999-12-062-2/+10
|
* Use %ll instead of %q as gcc moans bitterly about it.peter1999-11-221-1/+1
|
* Re-organise the code which manages the owner of the FP state (fpcurproc).dfr1999-11-102-24/+16
| | | | | | | | | | | | | | | The old code was spread out through the machdep code and was sloppy about enabling and disabling the FEN bit (which controls access to the FP register set). This caused a DIAGNOSTIC warning "DANGER WILL ROBINSON: FEN SET IN cpu_fork!" sometimes when operating under high loads and could conceivably lead to processes getting incorrect FP results. The new code is much more strict about the FEN bit and makes sure that *only* fpcurproc ever has it enabled. This also allows us to remove a section of code from the exception_return path which might improve performance marginally. Reviewed by: gallatin
* The core of this patch is to vm/vm_page.h. The effects are two-fold: (1) toalc1999-10-302-4/+4
| | | | | | | | | eliminate an extra (useless) level of indirection in half of the page queue accesses and (2) to use a single name for each queue throughout, instead of, e.g., "vm_page_queue_active" in some places and "vm_page_queues[PQ_ACTIVE]" in others. Reviewed by: dillon
* useracc() the prequel:phk1999-10-292-2/+0
| | | | | | | | | | | Merge the contents (less some trivial bordering the silly comments) of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>. This puts the #defines for the vm_inherit_t and vm_prot_t types next to their typedefs. This paves the road for the commit to follow shortly: change useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE} as argument.
* * Implement bus_set/get/delete_resource for pci.dfr1999-10-141-2/+1
| | | | | | | * Change the hack used on the alpha for mapping devices into DENSE or BWX memory spaces to a simpler one. Its still a hack and should be a seperate api to explicitly map the resource. * Add $FreeBSD$ as necessary.
* sigset_t change (part 3 of 5)marcel1999-09-291-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- By introducing a new sigframe so that the signal handler operates on the new siginfo_t and on ucontext_t instead of sigcontext, we now need two version of sendsig and sigreturn. A flag in struct proc determines whether the process expects an old sigframe or a new sigframe. The signal trampoline handles which sigreturn to call. It does this by testing for a magic cookie in the frame. The alpha uses osigreturn to implement longjmp. This means that osigreturn is not only used for compatibility with existing binaries. To handle the new sigset_t, setjmp saves it in sc_reserved (see NOTE). the struct sigframe has been moved from frame.h to sigframe.h to handle the complex header dependencies that was caused by the new sigframe. NOTE: For the i386, the size of jmp_buf has been increased to hold the new sigset_t. On the alpha this has been prevented by using sc_reserved in sigcontext.
* Fix bug in pipe code relating to writes of mmap'd but illegal addressdillon1999-09-202-6/+10
| | | | | | | | | spaces which cross a segment boundry in the page table. pmap_kextract() is not designed for access to the user space portion of the page table and cannot handle the null-page-directory-entry case. The fix is to have vm_fault_quick() return a success or failure which is then used to avoid calling pmap_kextract().
* $Id$ -> $FreeBSD$peter1999-08-2811-11/+11
|
* Fix the child's return path from fork so that fork will return 0gallatin1999-08-272-8/+8
| | | | | | | | | in the child. This corrects a problem where linux/alpha binaries see the child's return value of fork as the parent's pid. This happens because linux/alpha binaries apparently check the return value directly, rather than looking for a non-zero value in a4, as *BSD & OSF/1 do. Reviewed by:dfr@nlsystems.com
* Fix a nasty kld bug where modules with objects of type GLOB_DAT which hadgallatin1999-08-201-1/+2
| | | | non-zero addends were being loaded incorrectly
* Update for MI switch code, and trim a heap of unused (I believe) entries.peter1999-08-191-44/+1
|
* Sync with alc's revision 1.125 of i386/i386/vm_machdep.c. Thisjdp1999-08-052-6/+6
| | | | fixes the kernel build breakage.
* Add support for SYS_RES_DENSE and SYS_RES_BWX resource types. These aredfr1999-07-281-4/+6
| | | | | | | | | equivalent to SYS_RES_MEMORY for x86 but for alpha, the rman_get_virtual() address of the resource is initialised to point into either dense-mapped or bwx-mapped space respectively, allowing direct memory pointers to be used to device memory. Reviewed by: Andrew Gallatin <gallatin@cs.duke.edu>
* Reduce the number of "magic constants" used for page coloringalc1999-07-222-4/+4
| | | | | by one: PQ_PRIME2 and PQ_PRIME3 are used to accomplish the same thing at different places in the kernel. Drop PQ_PRIME3.
* Handle R_ALPHA_NONE relocations in KLD.dfr1999-07-161-1/+4
|
* Add in dbregs stubs that a committer for changes on the i386 ought to have done.mjacob1999-07-091-1/+20
| | | | PR: 12579
* Implement support for hardware debug registers on the i386.jlemon1999-07-091-1/+3
| | | | Submitted by: Brian Dean <brdean@unx.sas.com>
* Add alpha_platform_setup_ide_intr() and alpha_platform_assign_pciintr()peter1999-07-011-1/+6
| | | | prototypes.
* Declare busdma_swi() like on i386 version.peter1999-07-011-1/+2
|
* Slight reorganization of kernel thread/process creation. Instead of usingpeter1999-07-012-6/+6
| | | | | | | | | | | | | | | SYSINIT_KT() etc (which is a static, compile-time procedure), use a NetBSD-style kthread_create() interface. kproc_start is still available as a SYSINIT() hook. This allowed simplification of chunks of the sysinit code in the process. This kthread_create() is our old kproc_start internals, with the SYSINIT_KT fork hooks grafted in and tweaked to work the same as the NetBSD one. One thing I'd like to do shortly is get rid of nfsiod as a user initiated process. It makes sense for the nfs client code to create them on the fly as needed up to a user settable limit. This means that nfsiod doesn't need to be in /sbin and is always "available". This is a fair bit easier to do outside of the SYSINIT_KT() framework.
OpenPOWER on IntegriCloud