summaryrefslogtreecommitdiffstats
path: root/sys/alpha
Commit message (Collapse)AuthorAgeFilesLines
* This is the first part of the new kernel memory allocator. This replacesjeff2002-03-191-2/+16
| | | | | | malloc(9) and vm_zone with a slab like allocator. Reviewed by: arch@
* Move the definition of PT_[GS]ET{,DB,FP}REGS from the MD ptrace.h to thedes2002-03-161-10/+1
| | | | | MI ptrace.h, since all platforms define them. Keep the MD ptrace.h around for FIX_SSTEP (which is currently only needed on Alpha).
* Remove a bogus cast and deconstification that broke the Alpha kernel build.des2002-03-131-2/+3
|
* Back out previous commit, it was the wrong patch!des2002-03-131-0/+1
|
* Remove a bogus cast that breaks the Alpha kernel build due to -Werror.des2002-03-131-1/+0
|
* Fix a misspelling of mine: s/optomization/optimization/.jhb2002-03-111-1/+1
| | | | Noticed by: bmilekic
* Grrr, turn preemption back off on the alpha again. It is still not stable.jhb2002-03-111-1/+1
| | | | Noticed by: wilko, mjacob, jhb, peter, and others
* o Don't require long long support in bswap64() functions.mike2002-03-091-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add needed includes of machine/smp.h, remove nested include in sys/smp.hjake2002-03-072-0/+2
| | | | so that inlines in machine/smp.h can use variables declared in sys/smp.h.
* Add a new variable mp_maxid. This is used so that per cpu datastructures mayjeff2002-03-051-0/+2
| | | | | | | | | | | | | be allocated as arrays indexed by the cpu id. Previously the only reliable way to know the max cpu id was through MAXCPU. mp_ncpus isn't useful here because cpu ids may be sparsely mapped, although x86 and alpha do not do this. Also, call cpu_mp_probe much earlier so the max cpu id is known before the VM starts up. This is intended to help support per cpu queues for the new allocator, but may be useful elsewhere. Reviewed by: jake Approved by: jake
* Make it compile again.mjacob2002-03-011-1/+1
|
* Fix mcpcia.c so it compiles again.mjacob2002-03-011-1/+2
|
* - Move a comment from being on the same line as a #ifdef to the linearr2002-02-281-1/+2
| | | | | | | following it. This should have gone in the previous commit, but misviewed Bruce's patch. Requested by: bde
* add inlines for bswap*.gallatin2002-02-281-5/+38
| | | | smaller versions of the byteswap routines were obtained from NetBSD
* recover from namespace collision caused by un-static'ing pci_alloc_resource()gallatin2002-02-288-8/+8
| | | | in rev 1.187 of sys/dev/pci/pci.c
* - Fix panic() message and a couple style nits that snuck in from thearr2002-02-281-3/+3
| | | | recent diagnostics commit (rev. 1.84).
* Fix a minor swap leak.silby2002-02-281-0/+20
| | | | | | | | | | | Previously, the UPAGES/KSTACK area of processes/threads would leak memory at the time that a previously swapped process was terminated. Lukcily, the leak was only 12K/proc, so it was unlikely to be a major problem unless you had an undersized swap partition. Submitted by: dillon Reviewed by: silby MFC after: 1 week
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-273-3/+3
| | | | reference.
* Fix a horribly suboptimal algorithm in the vm_daemon.silby2002-02-271-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-272-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | 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 some DIAGNOSTIC code.julian2002-02-221-12/+22
| | | | | | | | | | | | While in userland, keep the thread's ucred reference in a shadow field so that the usual place to store it is NULL. If DIAGNOSTIC is not set, the thread ucred is kept valid until the next kernel entry, at which time it is checked against the process cred and possibly corrected. Produces a BIG speedup in kernels with INVARIANTS set. (A previous commit corrected it for the non INVARIANTS case already) Reviewed by: dillon@freebsd.org
* Convert p->p_runtime and PCPU(switchtime) to bintime format.phk2002-02-221-1/+1
|
* recovery from new binutils part II: fix the alpha kernel so thatgallatin2002-02-211-1/+1
| | | | | | it handles R_ALPHA_RELATIVE relocs with addends properly. tested by: ticso
* MFi386: merge changes from i386/trap.c rev 1.212gallatin2002-02-191-6/+8
| | | | | | | If the credential on an incoming thread is correct, don't bother reaquiring it. In the same vein, don't bother dropping the thread cred when going to userland. We are guaranteed to need it when we come back, (which we are guaranteed to do).
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-45/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm
* Use struct __ucontext in prototypes and associated functions instead ofdeischen2002-02-173-4/+12
| | | | | | | | | | ucontext_t. Forward declare struct __ucontext in <sys/signal.h> and remove reliance on <sys/ucontext.h> being included. While I'm here, also hide osigcontext types from userland; suggested by bde. Namespace pollution noticed by: Kevin Day <toasty@shell.dragondata.com>
* Resurrect one of the easiest changes from my big include files roll-upwollman2002-02-151-0/+1
| | | | | | patch from a year ago: give file flags their own type. This does not (yet) change the type used by system calls or library functions. The underlying type was chosen to match what is returned by stat().
* Remove WITNESS from GENERIC by default: as we grow more locks, this getsrwatson2002-02-132-2/+2
| | | | | | | | | slower, and may be impeding adoption of -CURRENT by developers. We recommend turning on WITNESS by default on crash boxes, and when doing locking development. It will probably get turned on by default for a week or two following any major locking commits, also. Approved by: all and sundry (jhb, phk, ...)
* Don't grab the ICU lock while reading the current pending interrupts andjhb2002-02-081-4/+0
| | | | | | current masked interrupts from the AT PIC. Requested by: bde
* Turn SMP back on by default in GENERIC on the Alpha.jhb2002-02-082-2/+2
|
* Turn interrupt thread preemption back on on the alpha.jhb2002-02-081-1/+1
| | | | Tested by: mjacob
* Bah, I managed to turn cosmetic things into real bugs. Fix shadowedpeter2002-02-082-10/+10
| | | | variable declarations. :-( Definately not my day today.
* Fix a long line introduced in previous commit.peter2002-02-071-1/+2
|
* Fix long line added in previous commit.peter2002-02-071-1/+3
|
* Patch up some long lines introduced in previous commit.peter2002-02-071-3/+7
|
* Fix style bug introduced in previous commit.peter2002-02-071-1/+1
|
* You cannot take the address of a variable with the 'register' qualifier.mjacob2002-02-071-1/+1
| | | | MFC after: 1 day
* Pre-KSE/M3 commit.julian2002-02-0710-31/+29
| | | | | | | | | | this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
* GC the PC_SWITCH* symbols which are not used in assembly anymore.phk2002-02-071-1/+0
|
* Replace the MFREE that Marshal (Quick Draw) Dillon apparently didn't look for.mjacob2002-02-071-3/+6
| | | | MFC after: 1 day
* Fixes for alpha pmap on SMP machines:jhb2002-02-062-52/+65
| | | | | | | | | | | | | | | | | | | | - Create a private list of active pmaps rather than abusing the list of all processes when we need to look up pmaps. The process list needs a sx lock and we can't be getting sx locks in the middle of cpu_switch() (pmap_activate() can call pmap_get_asn() from cpu_switch()). Instead, we protect the list with a spinlock. This also means the list is shorter since a pmap can be used by more than one process and we could (at least in thoery) dink with pmap's more than once, but now we only touch each pmap once when we have to update all of them. - Wrap pmap_activate()'s code to get a new ASN in an explicit critical section so that when it is called while doing an exec() we can't get preempted. - Replace splhigh() in pmap_growkernel() with a critical section to prevent preemption while we are adjusting the kernel page tables. - Fixes abuse of PCPU_GET(), which doesn't return an L-value. - Also adds some slight cleanups to the ASN handling by adding some macros instead of magic numbers in relation to the ASN and ASN generations. Reviewed by: dfr
* Improve the change in the previous commit: use a stub for osigreturn()bde2002-02-031-0/+4
| | | | when it is not really used instead of unconditionalizing all of it.
* Compile osigreturn() unconditionally since it will always be needed onbde2002-02-011-2/+0
| | | | | | | | | | | | | | | | | | some arches and the syscall table is machine-independent. It was (bogusly) conditional on COMPAT_43, so this usually makes no difference. ia64: in addition: - replace the bogus cloned comment before osigreturn() by a correct one. osigreturn() is just a stub fo ia64's. - fix the formatting of cloned comment before sigreturn(). - fix the return code. use nosys() instead of returning ENOSYS to get the same semantics as if the syscall is not in the syscall table. Generating SIGSYS is actually correct here. - fix style bugs. powerpc: copy the cleaned up ia64 stub. This mainly fixes a bogus comment. sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
* Regenerated file from previous commit to syscalls.mastergallatin2002-01-233-18/+6
|
* Linux/alpha uses the same BSDish return mechanism we do forgallatin2002-01-231-4/+4
| | | | | | | | getpid, getuid, getgid and pipe, since they bootstrapped from OSF/1 and never cleaned up. Switch to the native syscalls on alpha so that the above functions work MFC after: 7 days
* Don't read the sigcontext pointer directly from userspace. If the processgallatin2002-01-221-6/+14
| | | | | | is swapped out, this can cause a system panic. Copy it in, instead tested by: Bernd Walter <ticso@cicely8.cicely.de>
* Avoid __func__ string concatenationpeter2002-01-181-1/+1
|
* Allow alpha kernels to compile again- make sure opt_ddb.h is includedmjacob2002-01-172-1/+5
| | | | | | and the reference to db_regs is *extern* from alpha/include/db_machdep.h (put it in alpha/alpha/machdep.c)- this avoids the problems we've had about different 'common' sizes prohibiting the kernel from linking.
* - Catch up printtrap() to KSE by using curthread and testing it againstjhb2002-01-151-5/+9
| | | | | | | | | NULL rather than curproc. Without this, if we trap early before curthread is set, we recursively panic. - In an SMP kernel, if we trap before curthread is set, then trap is going to recursively panic trying to bump td->td_md.md_kernnest. The trap is fatal anyways, so to make debugging easier just call printtrap() to dump the trap info to the console and then halt.
* Replace ffind_* with fget calls.alfred2002-01-141-4/+2
| | | | | | | | Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf().
OpenPOWER on IntegriCloud