summaryrefslogtreecommitdiffstats
path: root/sys/ia64
Commit message (Collapse)AuthorAgeFilesLines
* Correct LDBL_* constants based on values from i386.das2003-03-271-9/+9
|
* - Add vm_paddr_t, a physical address type. This is required for systemsjake2003-03-252-1/+2
| | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
* Remove bitrot associated with `maxusers'.ru2003-03-222-2/+0
| | | | Submitted by: bde
* Use atomic operations to increment and decrement the refcountmux2003-03-201-4/+4
| | | | | | | in busdma tags. There are currently no tags shared accross different drivers so this isn't needed at the moment, but it will be required when we'll have a proper newbus method to get the parent busdma tag.
* Made the prototypes for pmap_kenter and pmap_kremove MD. These functionsjake2003-03-161-0/+2
| | | | | | | | | are machine dependent because they are not required to update the tlb when mappings are added or removed, and doing so is machine dependent. In addition, an implementation may require that pages mapped with pmap_kenter have a backing vm_page_t, which is not necessarily true of all physical pages, and so may choose to pass the vm_page_t to pmap_kenter instead of the physical address in order to make this requirement clear.
* Bah, get it right this time and add sys/lock.h before sys/mutex.h.mux2003-03-141-0/+1
|
* Oops, add missing includes. Pass me the pointy hat.mux2003-03-141-0/+1
| | | | Reported by: jake
* Grab Giant around calls to contigmalloc() and contigfree() somux2003-03-131-1/+8
| | | | that drivers converted to be MP safe don't have to deal with it.
* Memory allocated with contigmalloc() should be freed withmux2003-03-131-1/+4
| | | | contigfree(), not with free().
* Fix two rounds of breakages and cleanup. Remove the sccdebug sysctlmarcel2003-03-101-55/+11
| | | | | | while I'm here and garbage collect dead code (ssc_clone). Define d_maxsize as DFLTPHYS for now because that's what it will be if we don't define it.
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-082-10/+1
| | | | | | | | in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again.
* Fix threaded applications on ia64 that are linked dynamicly. We didmarcel2003-03-051-1/+2
| | | | | | | | | | | | | | | | | not save (restore) the global pointer (GP) in the jmpbuf in setjmp (longjmp) because it's not needed in general. GP is considered a scratch register at callsites and hence is always restored after a call (when it's possible that the call resolves to a symbol in a different loadmodule; otherwise GP does not have to be saved and restored at all), including calls to setjmp/longjmp. There's just one problem with this now that we use setjmp/longjmp for context switching: A new context must have GP defined properly for the thread's entry point. This means that we need to put GP in the jmpbuf and consequently that we have to restore is in longjmp. This automaticly requires us to save it as well. When setjmp/longjmp isn't used for context switching, this can be reverted again.
* ABI breaker: Move the J_SIGMASK field in the jmpbuf beforemarcel2003-03-051-3/+2
| | | | | | | | | | | the J_SIG0 field. While here, rename J_SIG0 to J_SIGSET and remove J_SIG1. The main reason for this change is that the 128-bit sigset_t is now aligned on a 16-byte boundary, which allows us to use 16-byte atomic loads and stores on CPUs that support it. The removal of J_SIG1 is done to avoid confusion: it is never accessed and should not be. Renaming J_SIG0 to J_SIGSET is the icing on the cake that's better done now than later.
* Replace calls to WITNESS_SLEEP() and witness_list() with equivalent callsjhb2003-03-041-13/+4
| | | | to WITNESS_WARN().
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-032-26/+17
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* MFi386 revision 1.88alc2003-03-011-3/+0
| | | | Remove some long unused declarations.
* Needn't kse.hdavidxu2003-02-271-1/+0
|
* Change the process flags P_KSES to be P_THREADED.julian2003-02-271-1/+1
| | | | This is just a cosmetic change but I've been meaning to do it for about a year.
* Correctly set BUS_SPACE_MAXSIZE in all the busdma backends.mux2003-02-262-2/+2
| | | | | It was bogusly set to 64 * 1024 or 128 * 1024 because it was bogusly reused in the BUS_DMAMAP_NSEGS definition.
* Cleanup of the d_mmap_t interface.mux2003-02-252-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386
* Change the console interface to pass a "struct consdev *" instead of aphk2003-02-201-5/+5
| | | | | | | | | dev_t to the method functions. The dev_t can still be found at struct consdev *->cn_dev. Add a void *cn_arg element to struct consdev which the drivers can use for retrieving their softc.
* Back out M_* changes, per decision of the TRB.imp2003-02-196-14/+14
| | | | Approved by: trb
* Fix missed patch in last commitjulian2003-02-172-10/+6
|
* Move a bunch of flags from the KSE to the thread.julian2003-02-173-16/+11
| | | | | | | | I was in two minds as to where to put them in the first case.. I should have listenned to the other mind. Submitted by: parts by davidxu@ Reviewed by: jeff@ mini@
* Define _ALIGNBYTES to be 15. This should have been done right away.marcel2003-02-171-1/+1
|
* Print two new processor features:marcel2003-02-171-2/+4
| | | | | o Spontaneous deferral (A feature required by dutch railways :-) o 16-byte atomic operations (ld, st, cmpxchg)
* - Split the struct kse into struct upcall and struct kse. struct kse willjeff2003-02-171-1/+1
| | | | | | | soon be visible only to schedulers. This greatly simplifies much the KSE code. Submitted by: davidxu
* - Move ke_sticks, ke_iticks, ke_uticks, ke_uu, ke_su, and ke_iu back intojeff2003-02-171-3/+3
| | | | | | | the proc. These counters are only examined through calcru. Submitted by: davidxu Tested on: x86, alpha, UP/SMP
* Remove #include <sys/dkstat.h>phk2003-02-161-1/+0
|
* Fix misuse of Maxmem in the calculation of the VHPT size. Maxmemmarcel2003-02-151-1/+1
| | | | | | | | is already in pages, so we should not convert from bytes to pages. The result of this bug was bad scaling of the VHPT relative to the available memory. Submitted by: Arun Sharma <arun@sharma-home.net>
* Fix the style of the SCHED_4BSD commit.obrien2003-02-131-1/+1
|
* MFi386alc2003-02-131-8/+2
| | | | Remove kptobj. Instead, use VM_ALLOC_NOOBJ.
* Implement fpclassify():mike2003-02-082-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a MD header private to libc called _fpmath.h; this header contains bitfield layouts of MD floating-point types. o Add a MI header private to libc called fpmath.h; this header contains bitfield layouts of MI floating-point types. o Add private libc variables to lib/libc/$arch/gen/infinity.c for storing NaN values. o Add __double_t and __float_t to <machine/_types.h>, and provide double_t and float_t typedefs in <math.h>. o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF, HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to <math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via <machine/float.h>. o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based on the size of its argument. __fpclassifyl() is never called on alpha because (sizeof(long double) == sizeof(double)), which is good since __fpclassifyl() can't deal with such a small `long double'. This was developed by David Schultz and myself with input from bde and fenner. PR: 23103 Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> (significant portions) Reviewed by: bde, fenner (earlier versions)
* Fix a problem in bus_dmamap_load_{mbuf,uio} when the first mbuf or the firstharti2003-02-041-11/+16
| | | | | | | | | | | | uio segment is empty. In this case no dma segment is create by bus_dmamap_load_buffer, but the calling routine clears the first flag. Under certain combinations of addresses of the first and second mbuf/uio buffer this leads to corrupted DMA segment descriptors. This was already fixed by tmm in sparc64/sparc64/iommu.c. PR: kern/47733 Reviewed by: sam Approved by: jake (mentor)
* Split statclock into statclock and profclock, and made the method for drivingjake2003-02-032-10/+20
| | | | | | | | | | | | | statclock based on profhz when profiling is enabled MD, since most platforms don't use this anyway. This removes the need for statclock_process, whose only purpose was to subdivide profhz, and gets the profiling clock running outside of sched_lock on platforms that implement suswintr. Also changed the interface for starting and stopping the profiling clock to do just that, instead of changing the rate of statclock, since they can now be separate. Reviewed by: jhb, tmm Tested on: i386, sparc64
* Don't use the 'c' partition for mounting root. A disklabel is verymarcel2003-02-031-2/+1
| | | | | | | | likely not present under the simulator. If multiple partitions are present on the virtual disk, then the 'a' partition would be the most logical choice. Nowadays partitions are GPT based, which would make the assumption of a disklabel even more questionable. Given all the possible scenarios, assuming a raw "device" seems best.
* Consolidate MIN/MAX macros into one place (param.h).alfred2003-02-021-2/+0
| | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* We don't need sscopen() and sscclose().phk2003-02-021-53/+9
| | | | | | Register sscstrategy directly, instead of using a cdevsw{} for the purpose. Tested by: marcel
* Export IA32 from opt_ia32.h to assembly so that we can eliminatemarcel2003-02-022-0/+16
| | | | | | | | | | | | | saving and restoring ia32 specific registers when switching context and ia32 support has not been compiled-in. The primary reason for this change is that one of the ia32 registers (ar.fcr) is wrongly marked as invalid by the simulator. Now that we avoid using the register when possible, usability is improved. The secundary reason is that it saves us 7 loads and stores. Note that the PCB will continue to have room for these registers, irrespective of the IA32 option. There are no benefits that make it worthwhile.
* Remove special casing for running in the simulator from the kernelmarcel2003-02-0115-428/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and instead add platform, firmware and EFI stubs to the loader. The net effect of this change is that besides a special console and disk driver, the kernel has no knowledge of the simulator. This has the following advantages: o Simulator support is much harder to break, o It's easier to make use of more feature complete simulators. This would only need a change in the simulator specific loader, o Running SMP kernels within the simulator. Note that ski at this time does not simulate IPIs, so there's no way to start APs. The platform, firmware and EFI stubs describe the following hardware: o 4 CPU Itanium, o 128 MB RAM within the 4GB address space, o 64 MB RAM above the 4GB address space. NOTE: The stubs in the skiloader describe a machine that should in parts be defined by the simulator. Things like processor interrupt block and AP wakeup vector cannot be choosen at random because they require interpretation by the simulator. Currently the simulator is ignorant of this. This change introduces an unofficial SSC call SSC_SAL_SET_VECTORS which is ignored by the simulator. Tested with: ski (version 0.943 for linux)
* Put replace spaces with tabs in keeping with the rest of the file.joe2003-02-011-1/+1
|
* Reversion of commit by Davidxu plus fixes since applied.julian2003-02-013-5/+5
| | | | | | | | I'm not convinced there is anything major wrong with the patch but them's the rules.. I am using my "David's mentor" hat to revert this as he's offline for a while.
* Remove D_CANFREE from sscdisk.c.phk2003-01-301-4/+2
| | | | | | I belive it got here by copy&paste and I see no signs in the source code that BIO_DELETE was dealt with correctly and can only wonder what kind of trouble this may have caused.
* Unbreak SMP cases for these architectures.julian2003-01-271-1/+1
| | | | | | statclock_process() changed arguments. note: it may be worth checking if curkse is needed on these architectures.. (and if so, why?)
* Move UPCALL related data structure out of kse, introduce a newdavidxu2003-01-262-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-262-0/+2
| | | | | of the scheduler. - Add SCHED_4BSD as the scheduler for all kernel config files in cvs.
* Fix pmap_extract so that it doesn't panic if the user typesdfr2003-01-241-3/+10
| | | | | | 'cat /proc/pid/map' Submitted by: Arun Sharma <arun.sharma@intel.com>
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-216-13/+13
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* - Add a VM_WAIT in the appropriate cases where vm_page_alloc() fails and flagsjeff2003-01-211-7/+15
| | | | | | | | | | indicate that uma_small_alloc should not. This code should be refactored so that there is not so much cross arch duplication. Reviewed by: jake Spotted by: tmm Tested on: alpha, sparc64 Pointy hat to: jeff and everyone who cut and pasted the bad code. :-)
* Resolve relative relocations in klds before trying to parse the module'sjake2003-01-211-3/+22
| | | | | | | | | | | | 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
OpenPOWER on IntegriCloud