summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Move UPCALL related data structure out of kse, introduce a newdavidxu2003-01-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data structure called kse_upcall to manage UPCALL. All KSE binding and loaning code are gone. A thread owns an upcall can collect all completed syscall contexts in its ksegrp, turn itself into UPCALL mode, and takes those contexts back to userland. Any thread without upcall structure has to export their contexts and exit at user boundary. Any thread running in user mode owns an upcall structure, when it enters kernel, if the kse mailbox's current thread pointer is not NULL, then when the thread is blocked in kernel, a new UPCALL thread is created and the upcall structure is transfered to the new UPCALL thread. if the kse mailbox's current thread pointer is NULL, then when a thread is blocked in kernel, no UPCALL thread will be created. Each upcall always has an owner thread. Userland can remove an upcall by calling kse_exit, when all upcalls in ksegrp are removed, the group is atomatically shutdown. An upcall owner thread also exits when process is in exiting state. when an owner thread exits, the upcall it owns is also removed. KSE is a pure scheduler entity. it represents a virtual cpu. when a thread is running, it always has a KSE associated with it. scheduler is free to assign a KSE to thread according thread priority, if thread priority is changed, KSE can be moved from one thread to another. When a ksegrp is created, there is always N KSEs created in the group. the N is the number of physical cpu in the current system. This makes it is possible that even an userland UTS is single CPU safe, threads in kernel still can execute on different cpu in parallel. Userland calls kse_create to add more upcall structures into ksegrp to increase concurrent in userland itself, kernel is not restricted by number of upcalls userland provides. The code hasn't been tested under SMP by author due to lack of hardware. Reviewed by: julian
* - Introduce the SCHED_ULE and SCHED_4BSD options for compile time selectionjeff2003-01-261-0/+1
| | | | | of the scheduler. - Add SCHED_4BSD as the scheduler for all kernel config files in cvs.
* Remove BAT invalidation. This is done later in the boot sequence,grehan2003-01-222-34/+0
| | | | | | | so isn't required here, and seems to cause problems when booting from disk. Approved by: benno
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-216-7/+7
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Resolve relative relocations in klds before trying to parse the module'sjake2003-01-211-2/+16
| | | | | | | | | | | | metadata. This fixes module dependency resolution by the kernel linker on sparc64, where the relocations for the metadata are different than on other architectures; the relative offset is in the addend of an Elf_Rela record instead of the original value of the location being patched. Also fix printf formats in debug code. Submitted by: Hartmut Brandt <brandt@fokus.gmd.de> PR: 46732 Tested on: alpha (obrien), i386, sparc64
* include cdefs.h so as to unbreak the libc buildgallatin2003-01-201-0/+2
|
* Removed unnecessary includes and brought up to date with atagrehan2003-01-181-4/+15
| | | | common code by adding lock functions.
* Stub profile.h, required for userland builds.grehan2003-01-181-0/+65
| | | | Approved by: Benno
* <machine/ieee.h>, taken from sparc64grehan2003-01-181-0/+146
| | | | Approved by: Benno
* Fix bugs with operand ordering and unnecessary sync/eieio ops. Mostlygrehan2003-01-181-59/+71
| | | | | | obtained from Alpha atomic.h Approved by: Benno
* Allow the MD frame definition to be seen in. Required for truss/ptrace.grehan2003-01-181-3/+1
| | | | Approved by: Benno
* RAIDframe requires LONG_BITgrehan2003-01-182-0/+6
| | | | Approved by: Benno
* Prepended underscores to macro local vars, avoiding gcc "declarationgrehan2003-01-181-6/+6
| | | | | | shadows global" warning Approved by: benno
* Change definition of int64 to avoid gcc3.2.1 complaints. Taken from i386grehan2003-01-181-2/+13
| | | | Approved by: benno
* Merge all the various copies of vm_fault_quick() into a singledillon2003-01-162-32/+0
| | | | portable copy.
* Merge all the various copies of vmapbuf() and vunmapbuf() into a singledillon2003-01-152-148/+0
| | | | | | | | portable copy. Note that pmap_extract() must be used instead of pmap_kextract(). This is precursor work to a reorganization of vmapbuf() to close remaining user/kernel races (which can lead to a panic).
* Correct an off-by-one error in the calculation of the number of interruptbenno2003-01-131-1/+1
| | | | resources we're managing.
* Make ofw_pci_find_node() use the reg property instead of thebenno2003-01-091-5/+5
| | | | assigned-addresses property. This works a lot better.
* Add a pcib variant to allow us to fix up interrupt assignments.benno2003-01-091-0/+118
| | | | We probably want to do something wrt bus enumeration as well at some point.
* Allocate interrupts from the resource list.benno2003-01-091-2/+4
|
* - Remove the ignore list and replace it with a quirk list of sorts.benno2003-01-092-23/+58
| | | | | | | | - Add a quirk type for devices whose interrupt properties are actually attached to their children. - Flag the "escc" (zs-alike serial controller) device as having this quirk. - Rework the interrupt discovery code to deal with devices that have more than one interrupt.
* - remove unneeded includesgrehan2003-01-091-5/+17
| | | | | - fix big in use of rid for SYS_RES_IRQ - catch up with ATA common code by adding lock function
* Remove obsolete GEOM option, and bring diskless options up-to-dategrehan2003-01-091-7/+3
| | | | Approved by: benno
* Add page queues locking to vunmapbuf().grehan2003-01-082-0/+4
| | | | | Obtained from: sparc64 Approved by: benno
* Sync the i-cache after copying down the interrupt codegrehan2003-01-082-0/+2
| | | | Approved by: benno
* Be more conservative about re-enabling interrupts during trap processinggrehan2003-01-082-2/+2
| | | | | | until atomic issues are fully sorted. Approved by: benno
* Fix incorrect error returns and sign-extension.grehan2003-01-082-14/+14
| | | | Approved by: benno
* Fetch the initial time from the rtc OpenFirmware node. This is a short-termgrehan2003-01-082-0/+42
| | | | | | | measure until the rtc h/w driver is written, and it's a lot better than having "jan 1 1970" on filesys times. Approved by: benno
* Remove obsolete NFS_ROOT conditional.grehan2003-01-081-23/+3
| | | | Approved by: benno
* Implement bus_dmamap_load_mbuf/bus_dmamap_load_uio.grehan2003-01-081-16/+206
| | | | | | Tested load_mbuf with GEM ethernet driver. Submitted by: Hiten Pandya <hiten@unixdaemons.com> (modified by grehan)
* - define HAS_STREAM_METHODS correctlygrehan2003-01-081-2/+25
| | | | | | - dmamap_load_mbuf/load_uio prototypes Submitted partly by: Hiten Pandya <hiten@unixdaemons.com>
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-012-4/+4
| | | | especially in troff files.
* MB_LEN_MAX is not MD, move it to the MI limits.h.tjr2002-12-222-2/+0
|
* Unbreak the KSE code. Keep track of zobie threads using the Per-CPU storagejulian2002-12-102-2/+2
| | | | | | | | during the context switch. Rearrange thread cleanups to avoid problems with Giant. Clean threads when freed or when recycled. Approved by: re (jhb)
* Under certain circumstances, we were calling kmem_free() frommux2002-11-222-0/+10
| | | | | | | | | | i386 cpu_thread_exit(). This resulted in a panic with WITNESS since we need to hold Giant to call kmem_free(), and we weren't helding it anymore in cpu_thread_exit(). We now do this from a new MD function, cpu_thread_dtor(), called by thread_dtor(). Approved by: re@ Suggested by: jhb
* Add getcontext, setcontext, and swapcontext as system calls.deischen2002-11-162-0/+28
| | | | | | | | | | | Previously these were libc functions but were requested to be made into system calls for atomicity and to coalesce what might be two entrances into the kernel (signal mask setting and floating point trap) into one. A few style nits and comments from bde are also included. Tested on alpha by: gallatin
* Move pmap_collect() out of the machine-dependent code, rename italc2002-11-133-18/+0
| | | | | | | | to reflect its new location, and add page queue and flag locking. Notes: (1) alpha, i386, and ia64 had identical implementations of pmap_collect() in terms of machine-independent interfaces; (2) sparc64 doesn't require it; (3) powerpc had it as a TODO.
* Print real / avail memory in megabytes rather than kilobytes.des2002-11-092-8/+8
|
* Move the definitions of the hw.physmem, hw.usermem and hw.availpagestmm2002-11-072-26/+0
| | | | | | | | | | | sysctls to MI code; this reduces code duplication and makes all of them available on sparc64, and the latter two on powerpc. The semantics by the i386 and pc98 hw.availpages is slightly changed: previously, holes between ranges of available pages would be included, while they are excluded now. The new behaviour should be more correct and brings i386 in line with the other architectures. Move physmem to vm/vm_init.c, where this variable is used in MI code.
* Remove what was a temporary bogus assignment of bits of siginfo_t, as it doesjmallett2002-11-062-4/+0
| | | | | | not look like the prerequisites to fill it in properly will be in the tree for the upcoming release, but it's mostly done, so there is no need for these to stay around to remind us.
* Split 4.x and 5.x signal handling so that we can keep 4.x signalpeter2002-10-253-45/+18
| | | | | | | | | | | | | | | | handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re
* Add the USER_SR segment register to pcb state. Initialize correctly,grehan2002-10-217-0/+22
| | | | | | | | | and save/restore during a context switch. The USER_SR could be overwritten when the current thread was switched out with a faulting copyin/copyout. Approved by: Benno
* Add two hooks to signal module load and module unload to MD code.marcel2002-10-191-0/+14
| | | | | | | | | | | | The primary reason for this is to allow MD code to process machine specific attributes, segments or sections in the ELF file and update machine specific state accordingly. An immediate use of this is in the ia64 port where unwind information is updated to allow debugging and tracing in/across modules. Note that this commit does not add the functionality to the ia64 port. See revision 1.9 of ia64/ia64/elf_machdep.c. Validated on: alpha, i386, ia64
* Permits UFS ACLs to be used with the GENERIC kernel. Due to recentrwatson2002-10-191-0/+1
| | | | | | | | | | | | | ACL configuration changes, this shouldn't result in different code paths for file systems not explicitly configured for ACLs by the system administrator. For UFS1, administrators must still recompile their kernel to add support for extended attributes; for UFS2, it's sufficient to enable ACLs using tunefs or at mount-time (tunefs preferred for reliability reasons). UFS2, for a variety of reasons, including performance and reliability, is the preferred file system for use with ACLs. Approved by: re
* The a.out md_coredump stuff isn't referenced anywhere anymore, andpeter2002-10-151-5/+0
| | | | hasn't been filled in for ages.. Nuked.
* Remove the P1003_1B kernel option; it is no longer used.mike2002-10-131-2/+1
|
* Add standards visibility conditionals. Change any uses of sigset_t tomike2002-10-131-5/+14
| | | | struct __sigset to avoid depending on objects from <sys/signal.h>.
* Add conditionals to allow va_list to be defined in other headers.mike2002-10-061-0/+4
|
* o Add conditionals to allow va_list to be defined in other headers.mike2002-10-061-3/+11
| | | | | o Standardize on _MACHINE_STDARG_H_ to allow multiple header includes. o Restrict the definition of va_copy() to C99 environments.
* Roll back to previous version, no need for NO_GEOM when GEOM isgrehan2002-10-061-2/+0
| | | | standard.
OpenPOWER on IntegriCloud