summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
...
* Turn some CTR's into CTR0's.benno2002-04-153-6/+6
|
* GC an extraneous prototype of delay().benno2002-04-151-1/+0
|
* Include <sys/cdefs.h> for definition of __BSD_VISIBLE.mike2002-04-121-0/+1
| | | | Pointy hat to: mike
* Remove the hack for segsz_t from <sys/types.h>; use the normalmike2002-04-101-0/+1
| | | | _BSD_FOO_T_ method for defining segsz_t.
* Add manifest constants: _LITTLE_ENDIAN, _BIG_ENDIAN, _PDP_ENDIAN, andmike2002-04-101-6/+15
| | | | | | _BYTE_ORDER. These are far more useful than their non-underscored equivalents as these can be used in restricted namespace environments. Mark the non-underscored variants as deprecated.
* GC various bits and pieces of USERCONFIG from all over the place.phk2002-04-092-24/+0
|
* GC the "dumplo" variable, which is no longer used.phk2002-04-072-2/+0
| | | | A lot of sys/*/*/machdep.c seems not to be.
* - Move the MI mutexes sched_lock and Giant from being declared in thejhb2002-04-022-46/+6
| | | | | | | | | | various machdep.c's to being declared in kern_mutex.c. - Add a new function mutex_init() used to perform early initialization needed for mutexes such as setting up thread0's contested lock list and initializing MI mutexes. Change the various MD startup routines to call this function instead of duplicating all the code themselves. Tested on: alpha, i386
* Stage-2 commit of the critical*() code. This re-inlines cpu_critical_enter()dillon2002-04-013-26/+76
| | | | | | | | | | | | | | | | | | | | | and cpu_critical_exit() and moves associated critical prototypes into their own header file, <arch>/<arch>/critical.h, which is only included by the three MI source files that need it. Backout and re-apply improperly comitted syntactical cleanups made to files that were still under active development. Backout improperly comitted program structure changes that moved localized declarations to the top of two procedures. Partially re-apply one of the program structure changes to move 'mask' into an intermediate block rather then in three separate sub-blocks to make the code more readable. Re-integrate bug fixes that Jake made to the sparc64 code. Note: In general, developers should not gratuitously move declarations out of sub-blocks. They are where they are for reasons of structure, grouping, readability, compiler-localizability, and to avoid developer-introduced bugs similar to several found in recent years in the VFS and VM code. Reviewed by: jake
* Centralize the "bootdev" and "dumpdev" variables. They are still prettyphk2002-03-311-3/+0
| | | | | bogus all things considered, but at least now they don't camouflage as being MD variables.
* Use the MI vm_map_growstack() instead of the MD grow_stack() in trap(). Removealc2002-03-304-34/+6
| | | | the MD grow_stack().
* Add a new mtx_init option "MTX_DUPOK" which allows duplicate acquires of locksjeff2002-03-272-2/+2
| | | | | | | | | | | with this flag. Remove the dup_list and dup_ok code from subr_witness. Now we just check for the flag instead of doing string compares. Also, switch the process lock, process group lock, and uma per cpu locks over to this interface. The original mechanism did not work well for uma because per cpu lock names are unique to each zone. Approved by: jhb
* Compromise for critical*()/cpu_critical*() recommit. Cleanup the interruptdillon2002-03-273-22/+70
| | | | | | | | | | | | | | | | | | | disablement assumptions in kern_fork.c by adding another API call, cpu_critical_fork_exit(). Cleanup the td_savecrit field by moving it from MI to MD. Temporarily move cpu_critical*() from <arch>/include/cpufunc.h to <arch>/<arch>/critical.c (stage-2 will clean this up). Implement interrupt deferral for i386 that allows interrupts to remain enabled inside critical sections. This also fixes an IPI interlock bug, and requires uses of icu_lock to be enclosed in a true interrupt disablement. This is the stage-1 commit. Stage-2 will occur after stage-1 has stabilized, and will move cpu_critical*() into its own header file(s) + other things. This commit may break non-i386 architectures in trivial ways. This should be temporary. Reviewed by: core Approved by: core
* Guard against redefining __gnuc_va_list.obrien2002-03-241-1/+2
|
* ASM versions of __FBSDID.obrien2002-03-231-0/+6
|
* Collect all functions for copying to and from userspace into the one file.benno2002-03-219-475/+520
| | | | | This allows me to reimplement [sf]u{byte,word} as separate functions and not as calls to copy{in,out}.
* - Make all inlines for manipulating supervisor-level registers accept/returnbenno2002-03-211-6/+13
| | | | | register_t values. - Implement an inline for isync.
* GC some unused, bogus interrupt functions and replace them with properbenno2002-03-211-20/+6
| | | | implementations of intr_disable and intr_restore.
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-213-36/+36
|
* Remove __P.alfred2002-03-2019-136/+132
| | | | Reveiwed by: benno
* Change the way we ensure td_ucred is NULL if DIAGNOSTIC is defined.jhb2002-03-202-26/+6
| | | | | | | | | | | | Instead of caching the ucred reference, just go ahead and eat the decerement and increment of the refcount. Now that Giant is pushed down into crfree(), we no longer have to get Giant in the common case. In the case when we are actually free'ing the ucred, we would normally free it on the next kernel entry, so the cost there is not new, just in a different place. This also removse td_cache_ucred from struct thread. This is still only done #ifdef DIAGNOSTIC. Tested on: i386, alpha
* Increment pmap_pvo_count in the right place.benno2002-03-203-3/+3
|
* This is the first part of the new kernel memory allocator. This replacesjeff2002-03-193-0/+69
| | | | | | malloc(9) and vm_zone with a slab like allocator. Reviewed by: arch@
* Changes and fixes in preparation for UMA:benno2002-03-173-36/+87
| | | | | | - Bootstrap pvo entries are now allocated by stealing pages. - Just return if we're pmap_enter'ing a mapping that's already there. Don't remove it and re-enter it.
* Lowercase all of the trap names.benno2002-03-172-96/+96
|
* Clean up and fix up copyin and copyout.benno2002-03-172-28/+40
|
* Move the definition of PT_[GS]ET{,DB,FP}REGS from the MD ptrace.h to thedes2002-03-161-10/+0
| | | | | MI ptrace.h, since all platforms define them. Keep the MD ptrace.h around for FIX_SSTEP (which is currently only needed on Alpha).
* Correct a typo. (* that should've been &)benno2002-03-113-3/+3
|
* o Don't require long long support in bswap64() functions.mike2002-03-091-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | o In i386's <machine/endian.h>, macros have some advantages over inlines, so change some inlines to macros. o In i386's <machine/endian.h>, ungarbage collect word_swap_int() (previously __uint16_swap_uint32), it has some uses on i386's with PDP endianness. Submitted by: bde o Move a comment up in <machine/endian.h> that was accidentially moved down a few revisions ago. o Reenable userland's use of optimized inline-asm versions of byteorder(3) functions. o Fix ordering of prototypes vs. redefinition of byteorder(3) functions, so that the non-GCC (libc asm) case has proper prototypes. o Add proper prototypes for byteorder(3) functions in <sys/param.h>. o Prevent redundant duplicate prototypes by making use of the _BYTEORDER_PROTOTYPED define. o Move the bswap16(), bswap32(), bswap64() C functions into MD space for platforms in which asm versions don't exist. This significantly reduces the complexity of some things at the cost of duplicate code. Reviewed by: bde
* Install the DSI and ISI trap handlers and their appropriate locations.benno2002-03-072-0/+4
|
* Copy the "implementation" of pmap_prefault from sparc64.benno2002-03-073-6/+12
|
* Move tunable initialisation so it can get access to physmem.benno2002-03-072-12/+12
|
* Calculate physmem.benno2002-03-073-3/+12
|
* - Move a comment from being on the same line as a #ifdef to the linearr2002-02-282-2/+4
| | | | | | | following it. This should have gone in the previous commit, but misviewed Bruce's patch. Requested by: bde
* cpu_switch now works, for kthreads at least.benno2002-02-283-39/+78
|
* Various cleanups.benno2002-02-282-48/+44
|
* - Prevent the decrementer interrupt handler from nesting.benno2002-02-283-6/+48
| | | | - Catch some more cases of PSL_EE and PSL_RI getting out of sync.
* - Modify pmap_activate so it only marks the pmap as active.benno2002-02-284-0/+37
| | | | - Add a pmap_deactivate function.
* GC an unused variable in cpu_fork().benno2002-02-282-2/+0
|
* - Fix panic() message and a couple style nits that snuck in from thearr2002-02-282-6/+6
| | | | recent diagnostics commit (rev. 1.84).
* Make fork work, at least for kthreads. Switching still has some issues.benno2002-02-2811-110/+77
|
* - Rearrange the sequence of events in powerpc_init() somewhat.benno2002-02-282-42/+48
| | | | - Catch another instance of PSL_EE being cleared without PSL_RI.
* - When enabling/disabling interrupts, set/clear both PSL_EE and PSL_RI, notbenno2002-02-281-5/+12
| | | | | just PSL_EE. - Make cpu_critical_enter/exit independant of save_intr/restore_intr.
* Add a missing (.benno2002-02-281-1/+1
|
* Implement the following functions:benno2002-02-283-12/+93
| | | | | | - pmap_remove - pmap_kremove - pmap_qremove
* Remove most of the usage of critical_enter/exit.benno2002-02-283-87/+0
| | | | | | | | I put these in to match the use of spl*() in the NetBSD code I was basing this on, but it appears to cause problems. I'm doing this in a separate commit so as to be able to refer back if locking becomes an issue at a later stage.
* Fix a horribly suboptimal algorithm in the vm_daemon.silby2002-02-273-3/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to determine what to page out, the vm_daemon checks reference bits on all pages belonging to all processes. Unfortunately, the algorithm used reacted badly with shared pages; each shared page would be checked once per process sharing it; this caused an O(N^2) growth of tlb invalidations. The algorithm has been changed so that each page will be checked only 16 times. Prior to this change, a fork/sleepbomb of 1300 processes could cause the vm_daemon to take over 60 seconds to complete, effectively freezing the system for that time period. With this change in place, the vm_daemon completes in less than a second. Any system with hundreds of processes sharing pages should benefit from this change. Note that the vm_daemon is only run when the system is under extreme memory pressure. It is likely that many people with loaded systems saw no symptoms of this problem until they reached the point where swapping began. Special thanks go to dillon, peter, and Chuck Cranor, who helped me get up to speed with vm internals. PR: 33542, 20393 Reviewed by: dillon MFC after: 1 week
* Add the following functions/macros to support byte order conversions andtmm2002-02-271-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD): - bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess). htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land. Make use of the new functions in a few places where local implementations of the same functionality existed. Reviewed by: mike, bde Tested on alpha by: mike
* Add makeoptions NO_WERROR=true so that we can build. =)benno2002-02-261-0/+1
|
* Make atomic_cmpset_32 correctly return 0 on failure.benno2002-02-241-0/+3
|
OpenPOWER on IntegriCloud