summaryrefslogtreecommitdiffstats
path: root/sys/alpha
Commit message (Collapse)AuthorAgeFilesLines
* Remove the Alpha specific linuxolator files.netchild2006-05-0813-3478/+0
|
* - change the example of compiling only specific modules to not containnetchild2006-05-072-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | the linux module, since it is not cross-platform - move linprocfs from "files" and "options" to architecture specific files, since it only makes sense to build this for those architectures, where we also have a linuxolator - disable the build of the linuxolator on our tier-2 architecture "Alpha": * we don't have a linux_base port which supports Alpha and at the same time is not outdated/obsoleted upstream/in a good condition/ currently working * the upcomming new default linux base port is based upon Fedora Core 3 (security support via http://www.fedoralegacy.org), which isn't available for Alpha (like the current default linux base port which is based upon Red Hat 8) * nobody answered my request for testing it ~1 month ago on current@ and alpha@ (it doesn't surprises me, see above) * a SoC student wouldn't have to waste time on something which nobody is willing to test This does not remove the alpha specific MD files of the linuxolator yet. Discussed on: arch (mostly silence) Spiritual support by: scottl
* Enhance the Linux emulation layer to make MegaRAID SAS managements tool happy.ambrisko2006-05-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add back in a scheme to emulate old type major/minor numbers via hooks into stat, linprocfs to return major/minors that Linux app's expect. Currently only /dev/null is always registered. Drivers can register via the Linux type shim similar to the ioctl shim but by using linux_device_register_handler/linux_device_unregister_handler functions. The structure is: struct linux_device_handler { char *bsd_driver_name; char *linux_driver_name; char *bsd_device_name; char *linux_device_name; int linux_major; int linux_minor; int linux_char_device; }; Linprocfs uses this to display the major number of the driver. The soon to be available linsysfs will use it to fill in the driver name. Linux_stat uses it to translate the major/minor into Linux type values. Note major numbers are dynamically assigned via passing in a -1 for the major number so we don't need to keep track of them. This is somewhat needed due to us switching to our devfs. MegaCli will not run until I add in the linsysfs and mfi Linux compat changes. Sponsored by: IronPort Systems
* Fix previous commit: the resource returned by rman_reserve_resource()marcel2006-05-021-10/+8
| | | | | can be NULL. Make sure to only call rman_set_rid() when the resource is not NULL. While here, improve readability and style.
* Rewrite of puc(4). Significant changes are:marcel2006-04-281-2/+0
| | | | | | | | | | | | | | | | | | | | o Properly use rman(9) to manage resources. This eliminates the need to puc-specific hacks to rman. It also allows devinfo(8) to be used to find out the specific assignment of resources to serial/parallel ports. o Compress the PCI device "database" by optimizing for the common case and to use a procedural interface to handle the exceptions. The procedural interface also generalizes the need to setup the hardware (program chipsets, program clock frequencies). o Eliminate the need for PUC_FASTINTR. Serdev devices are fast by default and non-serdev devices are handled by the bus. o Use the serdev I/F to collect interrupt status and to handle interrupts across ports in priority order. o Sync the PCI device configuration to include devices found in NetBSD and not yet merged to FreeBSD. o Add support for Quatech 2, 4 and 8 port UARTs. o Add support for a couple dozen Timedia serial cards as found in Linux.
* Move AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT belowdelphij2006-04-241-2/+2
| | | | their corresponding devices.
* Revert part of previous commit. In alpha_platform_alloc_ide_intr(),marcel2006-04-221-6/+1
| | | | there's no RID for us to work with.
* Set the rid for any resources that are allocated at the level whereimp2006-04-204-10/+29
| | | | they first emerge from the rman_* system.
* Retire pmap_track_modified(). We no longer need it because we do notalc2006-04-121-41/+14
| | | | | | | | create managed mappings within the clean submap. To prevent regressions, add assertions blocking the creation of managed mappings within the clean submap. Reviewed by: tegge
* Eliminate HAVE_STOPPEDPCBS. On ia64 the PCPU holds a pointer to themarcel2006-04-031-0/+2
| | | | | | | | PCB in which the context of stopped CPUs is stored. To access this PCB from KDB, we introduce a new define, called KDB_STOPPEDPCB. The definition, when present, lives in <machine/kdb.h> and abstracts where MD code saves the context. Define KDB_STOPPEDPCB on i386, amd64, alpha and sparc64 in accordance to previous code.
* Remove the unused sva and eva arguments from pmap_remove_pages().peter2006-04-031-8/+1
|
* Use the read_cycle_count() function recently added for cpu_ticks() forjhb2006-03-282-2/+2
| | | | | | get_cyclecount() as that results in a saner value and makes schedgraph much happier on Alpha. (schedgraph doesn't handle the fact that the counters are out of sync though)
* Remove some dummy functions, we have corresponding real ones now.netchild2006-03-211-3/+0
|
* regennetchild2006-03-203-15/+45
|
* Fix tinderbox on alpha.netchild2006-03-201-15/+12
| | | | Tested by: cross-compile
* regennetchild2006-03-183-4/+3
|
* Fixup some problems in my previous commit (COMPAT_43).netchild2006-03-181-5/+1
| | | | Pointyhat to: netchild
* regen after COMPAT_43 removalnetchild2006-03-184-14/+17
|
* Get rid of the need of COMPAT_43 in the linuxolator.netchild2006-03-181-6/+3
| | | | | Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz> Obtained from: DragonFly (some parts)
* Use the Alpha PCC as a cpu ticker for process runtime accounting. This isjhb2006-03-072-1/+29
| | | | | | | | | slightly more tricky than on x86 as although the PCC is 64-bits, it is not a simple 64-bit counter like the TSC. Instead, the upper 32-bits have PAL-defined behavior and the lower 32-bits run as a free-running 32-bit counter. To handle this, we detect overflows by maintaining a small amount of per-cpu state and use this to simulate the upper 32-bits of the counter providing a full 64-bit counter to the consumers of cpu_ticks().
* - Simplify the i8254 timecounter for the alpha since we don't actually havejhb2006-03-071-97/+12
| | | | | | | | | | | | | | | an interrupt handler for the i8254. (Our clock interrupts come from elsewhere.) Instead, use the same algo that i386 uses when the lapic timer is in use. This lets us remove a lot of cruft that tried to handle the i8254 interrupts that we weren't even using or setting up a handler for. - G/C a bunch of unused cruft while I'm here. - Fix the code to not use the rpcc timecounter (similar to TSC) on SMP machines to only disable that timecounter if more than one CPU is in use by the kernel. Previously, a UP kernel on a machine with multiple CPUs would needlessly disable this timecounter. MFC after: 1 week
* Close some races between procfs/ptrace and exit(2):jhb2006-02-222-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reorder the events in exit(2) slightly so that we trigger the S_EXIT stop event earlier. After we have signalled that, we set P_WEXIT and then wait for any processes with a hold on the vmspace via PHOLD to release it. PHOLD now KASSERT()'s that P_WEXIT is clear when it is invoked, and PRELE now does a wakeup if P_WEXIT is set and p_lock drops to zero. - Change proc_rwmem() to require that the processing read from has its vmspace held via PHOLD by the caller and get rid of all the junk to screw around with the vmspace reference count as we no longer need it. - In ptrace() and pseudofs(), treat a process with P_WEXIT set as if it doesn't exist. - Only do one PHOLD in kern_ptrace() now, and do it earlier so it covers FIX_SSTEP() (since on alpha at least this can end up calling proc_rwmem() to clear an earlier single-step simualted via a breakpoint). We only do one to avoid races. Also, by making the EINVAL error for unknown requests be part of the default: case in the switch, the various switch cases can now just break out to return which removes a _lot_ of duplicated PRELE and proc unlocks, etc. Also, it fixes at least one bug where a LWP ptrace command could return EINVAL with the proc lock still held. - Changed the locking for ptrace_single_step(), ptrace_set_pc(), and ptrace_clear_single_step() to always be called with the proc lock held (it was a mixed bag previously). Alpha and arm have to drop the lock while the mess around with breakpoints, but other archs avoid extra lock release/acquires in ptrace(). I did have to fix a couple of other consumers in kern_kse and a few other places to hold the proc lock and PHOLD. Tested by: ps (1 mostly, but some bits of 2-4 as well) MFC after: 1 week
* Fix the hw.realmem sysctl. The global realmem variable is a count ofjhb2006-02-141-1/+1
| | | | | | | | | pages, not a count of bytes. The sysctl handler for hw.realmem already uses ctob() to convert realmem from pages to bytes. Thus, on archs that were storing a byte count in the realmem variable, hw.realmem was inflated. Reported by: Valerio daelli valerio dot daelli at gmail dot com (alpha) MFC after: 3 days
* Simplify system time accounting for profiling.phk2006-02-081-7/+4
| | | | | | | | | | Rename struct thread's td_sticks to td_pticks, we will need the other name for more appropriately named use shortly. Reduce it from uint64_t to u_int. Clear td_pticks whenever we enter the kernel instead of recording its value as reference for userret(). Use the absolute value of td->pticks in userret() and eliminate third argument.
* Modify the way we account for CPU time spent (step 1)phk2006-02-071-1/+1
| | | | | | | | | | | | | | | | Keep track of time spent by the cpu in various contexts in units of "cputicks" and scale to real-world microsec^H^H^H^H^H^H^H^Hclock_t only when somebody wants to inspect the numbers. For now "cputicks" are still derived from the current timecounter and therefore things should by definition remain sensible also on SMP machines. (The main reason for this first milestone commit is to verify that hypothesis.) On slower machines, the avoided multiplications to normalize timestams at every context switch, comes out as a 5-7% better score on the unixbench/context1 microbenchmark. On more modern hardware no change in performance is seen.
* - Always call exec_free_args() in kern_execve() instead of doing it in alljhb2006-02-062-2/+0
| | | | | | the callers if the exec either succeeds or fails early. - Move the code to call exit1() if the exec fails after the vmspace is gone to the bottom of kern_execve() to cut down on some code duplication.
* Regenerate.rwatson2006-02-063-164/+164
|
* Reflect fix in Linux setfsgid() event name from OpenBSM in the alpharwatson2006-02-061-1/+1
| | | | | | linux system call table. Obtained from: TrustedBSD Project
* Assign audit identifiers to alpha/linux system calls so that they willrwatson2006-02-041-173/+174
| | | | | | be audited. Obtained from: TrustedBSD Project
* Move the old BSD4.3 tty compatibility from (!BURN_BRIDGES && COMPAT_43)phk2006-01-101-0/+1
| | | | | | | | | | | | to COMPAT_43TTY. Add COMPAT_43TTY to NOTES and */conf/GENERIC Compile tty_compat.c only under the new option. Spit out #warning "Old BSD tty API used, please upgrade." if ioctl_compat.h gets #included from userland.
* By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT intoimp2006-01-092-2/+2
| | | | | | | | param.h. Per request, I've placed these just after the _NO_NAMESPACE_POLLUTION ifndef. I've not renamed anything yet, but may since we don't need the __. Submitted by: bde, jhb, scottl, many others.
* Define __HAVE_ACPI and/or __PCI_REROUTE_INTERRUPT, as appropriate forimp2006-01-011-0/+2
| | | | | each platform. These will be used in the pci code in preference to the complicated #ifdefs we have there now.
* MI changes:netchild2005-12-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | - provide an interface (macros) to the page coloring part of the VM system, this allows to try different coloring algorithms without the need to touch every file [1] - make the page queue tuning values readable: sysctl vm.stats.pagequeue - autotuning of the page coloring values based upon the cache size instead of options in the kernel config (disabling of the page coloring as a kernel option is still possible) MD changes: - detection of the cache size: only IA32 and AMD64 (untested) contains cache size detection code, every other arch just comes with a dummy function (this results in the use of default values like it was the case without the autotuning of the page coloring) - print some more info on Intel CPU's (like we do on AMD and Transmeta CPU's) Note to AMD owners (IA32 and AMD64): please run "sysctl vm.stats.pagequeue" and report if the cache* values are zero (= bug in the cache detection code) or not. Based upon work by: Chad David <davidc@acns.ab.ca> [1] Reviewed by: alc, arch (in 2004) Discussed with: alc, Chad David, arch (in 2004)
* Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structuresobomax2005-12-262-0/+4
| | | | | | | | | | with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually allow executing elf dynamic binaries (aka shared libraries). When it is requested to execute ET_DYN elf image check if this flag is on after we know the elf brand allowing execution if so. PR: kern/87615 Submitted by: Marcin Koziej <creep@desk.pl>
* Tweak how the MD code calls the fooclock() methods some. Instead ofjhb2005-12-224-50/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | passing a pointer to an opaque clockframe structure and requiring the MD code to supply CLKF_FOO() macros to extract needed values out of the opaque structure, just pass the needed values directly. In practice this means passing the pair (usermode, pc) to hardclock() and profclock() and passing the boolean (usermode) to hardclock_cpu() and hardclock_process(). Other details: - Axe clockframe and CLKF_FOO() macros on all architectures. Basically, all the archs were taking a trapframe and converting it into a clockframe one way or another. Now they can just extract the PC and usermode values directly out of the trapframe and pass it to fooclock(). - Renamed hardclock_process() to hardclock_cpu() as the latter is more accurate. - On Alpha, we now run profclock() at hz (profhz == hz) rather than at the slower stathz. - On Alpha, for the TurboLaser machines that don't have an 8254 timecounter, call hardclock() directly. This removes an extra conditional check from every clock interrupt on Alpha on the BSP. There is probably room for even further pruning here by changing Alpha to use the simplified timecounter we use on x86 with the lapic timer since we don't get interrupts from the 8254 on Alpha anyway. - On x86, clkintr() shouldn't ever be called now unless using_lapic_timer is false, so add a KASSERT() to that affect and remove a condition to slightly optimize the non-lapic case. - Change prototypeof arm_handler_execute() so that it's first arg is a trapframe pointer rather than a void pointer for clarity. - Use KCOUNT macro in profclock() to lookup the kernel profiling bucket. Tested on: alpha, amd64, arm, i386, ia64, sparc64 Reviewed by: bde (mostly)
* Make our ELF64 type definitions match standards. In particular thismarcel2005-12-181-1/+1
| | | | | | | | | | | | | means: o Remove Elf64_Quarter, o Redefine Elf64_Half to be 16-bit, o Redefine Elf64_Word to be 32-bit, o Add Elf64_Xword and Elf64_Sxword for 64-bit entities, o Use Elf_Size in MI code to abstract the difference between Elf32_Word and Elf64_Word. o Add Elf_Ssize as the signed counterpart of Elf_Size. MFC after: 2 weeks
* Remove linux_mib_destroy() (which I actually added in between 5.0 and 5.1)jhb2005-12-151-1/+0
| | | | | | | | | which existed to cleanup the linux_osname mutex. Now that MTX_SYSINIT() has grown a SYSUNINIT to destroy mutexes on unload, the extra destroy here was redundant and resulted in panics in debug kernels. MFC after: 1 week Reported by: Goran Gajic ggajic at afrodita dot rcub dot bg dot ac dot yu
* Whitespace.jhb2005-12-141-2/+2
|
* - Cleanup whitespace and extra ()s in vtophys() macros.jhb2005-12-061-2/+1
| | | | | | | | | | | - Move vtophys() macros next to vtopte() where vtopte() exists to match comments above vtopte(). - Remove references to the alternate address space in the comment above vtopte(). amd64 never had the alternate address space, and i386 lost it prior to PAE support being added. - s/entires/entries/ in comments. Reviewed by: alc
* Drop _MACHINE_ARCH and _MACHINE defines (not to be confused withru2005-12-061-7/+0
| | | | | | | MACHINE_ARCH and MACHINE). Their purpose was to be able to test in cpp(1), but cpp(1) only understands integer type expressions. Using such unsupported expressions introduced a number of subtle bugs, which were discovered by compiling with -Wundef.
* Fix -Wundef warnings from compiling GENERIC and LINT kernels ofru2005-12-061-1/+1
| | | | all architectures.
* Change pmap_enter_quick() to use the vm_prot_t parameter introduced inalc2005-12-021-3/+4
| | | | | | | | | | | | | | | revision 1.179 to correctly set/clear execute permission on the mapping it creates. Thus, mmap(2)ing a memory resident file will not result in the file being mapped with execute permission when execute permission was not requested. Eliminate an unneeded Instruction Memory Barrier (IMB) in pmap_enter_quick(). Since there was no previous (instruction) mapping for the given virtual address prior to pmap_enter_quick(), there can be no instructions from the given virtual address in the pipeline that need flushing. MFC after: 1 week
* - Allow duplicate "machine" directives with the same arguments.ru2005-11-273-9/+1
| | | | - Move existing "machine" directives to DEFAULTS.
* Don't enable PUC_FASTINTR by default in the source. Instead, enable itjhb2005-11-211-0/+2
| | | | | | | | | | | via the DEFAULTS kernel configs. This allows folks to turn it that option off in the kernel configs if desired without having to hack the source. This is especially useful since PUC_FASTINTR hangs the kernel boot on my ultra60 which has two uart(4) devices hung off of a puc(4) device. I did not enable PUC_FASTINTR by default on powerpc since powerpc does not currently allow sharing of INTR_FAST with non-INTR_FAST like the other archs.
* Create DEFAULTS files for alpha, ia64, powerpc, and sparc64 and movejhb2005-11-212-1/+10
| | | | | | 'device mem' over from GENERIC to DEFAULTS to be consistent with i386 and amd64. Additionally, on ia64 enable ACPI by default since ia64 requires acpi.
* Eliminate pmap_init2(). It's no longer used.alc2005-11-201-5/+0
|
* Improve inittodr(). Assume the real-time clock is reliable and onlymarcel2005-11-201-52/+40
| | | | | | | | | use the base time in case the real-time clock is bogus or behind the base time. Most importantly, don't sanity-check the base time up front because it may be zero. This is not a preposterous condition. It just means that none of the file systems have their mount time updated. MFC after: 1 week
* In get_pv_entry() use PMAP_LOCK() instead of PMAP_TRYLOCK() when deadlockalc2005-11-131-1/+4
| | | | cannot possibly occur.
* Reimplement the reclamation of PV entries. Specifically, performalc2005-11-091-30/+41
| | | | | | | | | | | | | | | | | | reclamation synchronously from get_pv_entry() instead of asynchronously as part of the page daemon. Additionally, limit the reclamation to inactive pages unless allocation from the PV entry zone or reclamation from the inactive queue fails. Previously, reclamation destroyed mappings to both inactive and active pages. get_pv_entry() still, however, wakes up the page daemon when reclamation occurs. The reason being that the page daemon may move some pages from the active queue to the inactive queue, making some new pages available to future reclamations. Print the "reclaiming PV entries" message at most once per minute, but don't stop printing it after the fifth time. This way, we do not give the impression that the problem has gone away. Reviewed by: tegge
* Add uart(4). When both sio(4) and uart(4) can handle a serial port,marcel2005-11-051-2/+3
| | | | | | | | sio(4) will claim it. This change therefore only affects how ports are handled when they are not claimed by sio(4), and in principle will improve hardware support. MFC after: 2 months
OpenPOWER on IntegriCloud