summaryrefslogtreecommitdiffstats
path: root/sys/alpha
Commit message (Collapse)AuthorAgeFilesLines
* These are no longer relevant. They are scripts for extracting hintsimp2005-01-071-116/+0
| | | | | | from 4.x kernel config files. User's wishing to upgrade from 4.x to 6 will need to go through 5.x, or grab this script from there. These scripts will remain in RELENG_5...
* These appear to be unused in our tree, so remove them.imp2005-01-051-66/+0
|
* Begin all license/copyright comments with /*- or #-imp2005-01-05114-128/+128
|
* o Use tab instead of spaces for puc(4) line.kuriyama2005-01-051-1/+1
| | | | o Use capitalized "Ethernet" for consistency.
* - make machine model list more comprehensive, the whole Alpha family treewilko2005-01-012-51/+66
| | | | | | | should now be present - clean up comment a bit MFC after: 1 week
* Sync with i386 GENERIC some:jhb2004-12-301-41/+46
| | | | | | - Update comments to newer style (space after #) - Bring across various comment updates. - Add AHC_REG_PRETTY_PRINT, ADAPTIVE_GIANT, and rue(4).
* LCA is 21066 and 21068. Add EV7 (bloody optimist.. :)wilko2004-12-261-2/+3
|
* Modify pmap_enter_quick() so that it expects the page queues to be lockedalc2004-12-231-3/+2
| | | | | | | | | | | on entry and it assumes the responsibility for releasing the page queues lock if it must sleep. Remove a bogus comment from pmap_enter_quick(). Using the first change, modify vm_map_pmap_enter() so that the page queues lock is acquired and released once, rather than each time that a page is mapped.
* In the common case, pmap_enter_quick() completes without sleeping.alc2004-12-151-13/+30
| | | | | | | | | | | | | | | | | | In such cases, the busying of the page and the unlocking of the containing object by vm_map_pmap_enter() and vm_fault_prefault() is unnecessary overhead. To eliminate this overhead, this change modifies pmap_enter_quick() so that it expects the object to be locked on entry and it assumes the responsibility for busying the page and unlocking the object if it must sleep. Note: alpha, amd64, i386 and ia64 are the only implementations optimized by this change; arm, powerpc, and sparc64 still conservatively busy the page and unlock the object within every pmap_enter_quick() call. Additionally, this change is the first case where we synchronize access to the page's PG_BUSY flag and busy field using the containing object's lock rather than the global page queues lock. (Modifications to the page's PG_BUSY flag and busy field have asserted both locks for several weeks, enabling an incremental transition.)
* Change gdb_cpu_setreg() to not take the value to which to set themarcel2004-12-012-2/+2
| | | | | | | | | | | | | | | | | | | | | specified register, but a pointer to the in-memory representation of that value. The reason for this is twofold: 1. Not all registers can be represented by a register_t. In particular FP registers fall in that category. Passing the new register value by reference instead of by value makes this point moot. 2. When we receive a G or P packet, both are for writing a register, the packet will have the register value in target-byte order and in the memory representation (modulo the fact that bytes are sent as 2 printable hexadecimal numbers of course). We only need to decode the packet to have a pointer to the register value. This change fixes the bug of extracting the register value of the P packet as a hexadecimal number instead of as a bit array. The quick (and dirty) fix to bswap the register value in gdb_cpu_setreg() as it has been added on i386 and amd64 can therefore be removed and has in fact been that. Tested on: alpha, amd64, i386, ia64, sparc64
* When required to negate the absoulte result of a division/remainderpeadar2004-11-271-1/+1
| | | | | | | | | | | | | | operation (by subtracting the absolute result from 0), don't test for overflow. This avoids an arithmetic exception when dividing LONG_MIN by 1: This is the only case that causes overflow, and the resulting value is correct under 2's compliment arithmetic. PR: 72024 Approved by: dwmalone@ Obtained from: NetBSD MFC after: 4 days
* Don't include sys/user.h merely for its side-effect of recursivelydas2004-11-2712-14/+15
| | | | including other headers.
* Fix a cpuid mismatch from the recent cpuid rototill in Alpha: boot_cpu_idjhb2004-11-231-1/+1
| | | | | | is a PAL ID, while PCPU_GET(cpuid) is a FreeBSD CPU ID. The FreeBSD CPU ID of the BSP is always zero, so use that to see which CPU should run the full clock functions.
* Remove UAREA_PAGES.das2004-11-201-1/+0
| | | | Reviewed by: arch@
* U areas are going away, so don't allocate them. It's worrisome thatdas2004-11-202-6/+2
| | | | | | | | mp_machdep.c was using UAREA_PAGES to allocate something that isn't a U area, and that there seems to be an implicit assumption that the PCB is just past the end of the kernel stack. Reviewed by: arch@
* user.h is included only to get pcb.h, so use the latter directly instead.das2004-11-201-1/+1
|
* Get in sync with reality: TurboLaser was never really well supported towilko2004-11-092-6/+0
| | | | | start with, so let it die in peace. While there, remove Multia-class as 486-like performance will not buy us much when 6.x arrives.
* - Add a new MD per-CPU field for Alpha 'pal_id' which is the PAL IDjhb2004-11-054-41/+54
| | | | | | | | | | associated with each processor. This ID is inferred from the index of the pcs structure in the hwprb. - Give Alpha CPUs FreeBSD CPU IDs more like other architectures where the boot processor is always CPU 0 and the other processors are numbered 1 ... N. List active CPUs in the system in cpu_mp_announce() as well. Silence on: alpha@
* Reduce annoying SCSI probing delay from 15 to 5 seconds in all GENRIC kernels.andre2004-11-021-1/+1
| | | | Discussed on: -current
* - Change the ddb paging "support" to use a variable (db_lines_per_page) tojhb2004-11-011-1/+1
| | | | | | | | | | | | | | | | | control the number of lines per page rather than a constant. The variable can be examined and changed in ddb as '$lines'. Setting the variable to 0 will effectively turn off paging. - Change db_putchar() to force out pending whitespace before outputting newlines and carriage returns so that one can rub out content on the current line via '\r \r' type strings. - Change the simple pager to rub out the --More-- prompt explicitly when the routine exits. - Add some aliases to the simple pager to make it more compatible with more(1): 'e' and 'j' do a single line. 'd' does half a page, and 'f' does a full page. MFC after: 1 month Inspired by: kris
* Fix a typo so that this compiles.jhb2004-10-201-1/+1
|
* Add new function ttyinitmode() which sets our systemwide defaultphk2004-10-182-12/+2
| | | | | | | | | | | | | | modes on a tty structure. Both the ".init" and the current settings are initialized allowing the function to be used both at attach and open time. The function takes an argument to decide if echoing should be enabled. Echoing should not be enabled for regular physical serial ports unless they are consoles, in which case they should be configured by ttyconsolemode() instead. Use the new function throughout.
* Add missing flag to userland_sysctl()phk2004-10-141-1/+1
|
* Rework how we store process times in the kernel such that we always storejhb2004-10-051-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the raw values including for child process statistics and only compute the system and user timevals on demand. - Fix the various kern_wait() syscall wrappers to only pass in a rusage pointer if they are going to use the result. - Add a kern_getrusage() function for the ABI syscalls to use so that they don't have to play stackgap games to call getrusage(). - Fix the svr4_sys_times() syscall to just call calcru() to calculate the times it needs rather than calling getrusage() twice with associated stackgap, etc. - Add a new rusage_ext structure to store raw time stats such as tick counts for user, system, and interrupt time as well as a bintime of the total runtime. A new p_rux field in struct proc replaces the same inline fields from struct proc (i.e. p_[isu]ticks, p_[isu]u, and p_runtime). A new p_crux field in struct proc contains the "raw" child time usage statistics. ruadd() has been changed to handle adding the associated rusage_ext structures as well as the values in rusage. Effectively, the values in rusage_ext replace the ru_utime and ru_stime values in struct rusage. These two fields in struct rusage are no longer used in the kernel. - calcru() has been split into a static worker function calcru1() that calculates appropriate timevals for user and system time as well as updating the rux_[isu]u fields of a passed in rusage_ext structure. calcru() uses a copy of the process' p_rux structure to compute the timevals after updating the runtime appropriately if any of the threads in that process are currently executing. It also now only locks sched_lock internally while doing the rux_runtime fixup. calcru() now only requires the caller to hold the proc lock and calcru1() only requires the proc lock internally. calcru() also no longer allows callers to ask for an interrupt timeval since none of them actually did. - calcru() now correctly handles threads executing on other CPUs. - A new calccru() function computes the child system and user timevals by calling calcru1() on p_crux. Note that this means that any code that wants child times must now call this function rather than reading from p_cru directly. This function also requires the proc lock. - This finishes the locking for rusage and friends so some of the Giant locks in exit1() and kern_wait() are now gone. - The locking in ttyinfo() has been tweaked so that a shared lock of the proctree lock is used to protect the process group rather than the process group lock. By holding this lock until the end of the function we now ensure that the process/thread that we pick to dump info about will no longer vanish while we are trying to output its info to the console. Submitted by: bde (mostly) MFC after: 1 month
* The physical address stored in the vm_page is page aligned. There is noalc2004-10-031-1/+1
| | | | | | need to mask off the page offset bits. (This operation made some sense prior to i386/i386/pmap.c revision 1.254 when we passed a physical address rather than a vm_page pointer to pmap_enter().)
* Eliminate unnecessary uses of PHYS_TO_VM_PAGE() from pmap_enter(). Thesealc2004-10-021-5/+2
| | | | | | | uses predate the change in the pmap_enter() interface that replaced the page's physical address by the address of its vm_page structure. The PHYS_TO_VM_PAGE() was being used to compute the address of the same vm_page structure that was being passed in.
* - Add support for "paging" in stack trace output. That is, when you dojhb2004-09-201-2/+4
| | | | | | | | | | | | | a stack trace from ddb, the output will pause with a '--More--' prompt every 18 lines. If you hit Enter, it will print another line and prompt again. If you hit space it will output another page and then prompt. If you hit 'q' or 'x' it will abort the rest of the stack trace. - Fix the sparc64 userland stack trace to honor the total count of lines to print. This is useful if your trace happens to walk back onto 0xdeadc0de and gets stuck in an endless loop. MFC after: 1 month Tested on: i386, alpha, sparc64
* Simplify the reference counting of page table pages. Specifically, usealc2004-09-191-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the page table page's wired count rather than its hold count to contain the reference count. My rationale for this change is based on several factors: 1. The machine-independent and pmap layers used the same hold count field in subtly different ways. The machine-independent layer uses the hold count to implement a form of ephemeral wiring that is used by pipes, physio, etc. In other words, subsystems where we wish to temporarily block a page from being swapped out while it is mapped into the kernel's address space. Such pages are never removed from the page queues. Instead, the page daemon recognizes a non-zero hold count to mean "hands off this page." In contrast, page table pages are never in the page queues; they are wired from birth to death. The hold count was being used as a kind of reference count, specifically, the number of valid page table entries within the page. Not surprisingly, these two different uses imply different synchronization rules: in the machine- independent layer access to the hold count requires the page queues lock; whereas in the pmap layer the pmap lock is required. Thus, continued use by the pmap layer of vm_page_unhold(), which asserts that the page queues lock is held, made no sense. 2. _pmap_unwire_pte_hold() was too forgiving in its handling of the wired count. An unexpected wired count on a page table page was ignored and the underlying page leaked. 3. In a word, microoptimization. Using the wired count exclusively, rather than a combination of the wired and hold counts, makes the code slightly smaller and faster. Reviewed by: tegge@
* MFamd64/i386alc2004-09-191-1/+2
| | | | Avoid recomputing PHYS_TO_VM_PAGE() unnecessarily in pmap_protect().
* Remove an outdated assertion from _pmap_allocpte(). (When vm_page_alloc()alc2004-09-191-3/+0
| | | | | succeeds, the page's queue field is unconditionally set to PQ_NONE by vm_pageq_remove_nowakeup().)
* Allocate tty at attach time instead of open time.phk2004-09-171-9/+17
|
* Be slightly less bogus in struct tty allocation.phk2004-09-171-3/+2
|
* Add new a function isa_dma_init() which returns an errno when it failsphk2004-09-151-10/+8
| | | | | | | | | and which takes a M_WAITOK/M_NOWAIT flag argument. Add compatibility isa_dmainit() macro which whines loudly if isa_dma_init() fails. Problem uncovered by: tegge
* Add nge. (I've used one for about a week in an XP1000.)alc2004-09-111-0/+1
|
* The previous commit, roughly one and a half years ago removed themarcel2004-09-101-62/+14
| | | | | | | | | | | | | | | | | | | | | | branch prediction optimization for LINT, because the kernel was too large. This commit now removes it altogether since it causes build failures for GENERIC kernels and the various applicable trends are such that one can expect that it these failure will cause more problems than they're worth in the future. These trends include: 1. Alpha was demoted from tier 1 to tier 2 due to lack of active support. The number of people willing to fix build breakages is not likely to increase and those developers that do have the gumption to test MI changes on alpha are not likely to spend time fixing unexpected build failures first. 2. The kernel will only increase in size. Even though stripped-down kernels do link without problems now, compiler optimizations (like inlining) and new (non-optional) functionality will likely cause stripped-down kernels to break in the future as well. So, with my asbestos suit on, get rid of potential problems before they happen. MT5 candidate.
* Fix a problem with tag->boundary inheritence that has existed since day onescottl2004-09-081-5/+5
| | | | | | | | | | | | | | and was propagated to nearly every platform. The boundary of the child needs to consider the boundary of the parent and pick the minimum of the two, not the maximum. However, if either is 0 then pick the appropriate one. This bug was exposed by a recent change to ATA, which should now be fixed by this change. The alignment and maxsegsz tag attributes likely also need a similar review in the near future. This is a MT5 candidate. Reviewed by: marcel Submitted by: sos (in part)
* Switch the default scheduler to 4BSD to match what will go into RELENG_5 soon.scottl2004-09-071-1/+3
| | | | | | | It can be switched back once 5.3 is tested and released. Also turn on PREEMPTION as many of the stability problems with it have been fixed. MT5: 3 days.
* Make the alpha timecounter preferable to the i8254.phk2004-09-071-1/+2
|
* Refactor a bunch of scheduler code to give basically the same behaviourjulian2004-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | but with slightly cleaned up interfaces. The KSE structure has become the same as the "per thread scheduler private data" structure. In order to not make the diffs too great one is #defined as the other at this time. The KSE (or td_sched) structure is now allocated per thread and has no allocation code of its own. Concurrency for a KSEGRP is now kept track of via a simple pair of counters rather than using KSE structures as tokens. Since the KSE structure is different in each scheduler, kern_switch.c is now included at the end of each scheduler. Nothing outside the scheduler knows the contents of the KSE (aka td_sched) structure. The fields in the ksegrp structure that are to do with the scheduler's queueing mechanisms are now moved to the kg_sched structure. (per ksegrp scheduler private data structure). In other words how the scheduler queues and keeps track of threads is no-one's business except the scheduler's. This should allow people to write experimental schedulers with completely different internal structuring. A scheduler call sched_set_concurrency(kg, N) has been added that notifies teh scheduler that no more than N threads from that ksegrp should be allowed to be on concurrently scheduled. This is also used to enforce 'fainess' at this time so that a ksegrp with 10000 threads can not swamp a the run queue and force out a process with 1 thread, since the current code will not set the concurrency above NCPU, and both schedulers will not allow more than that many onto the system run queue at a time. Each scheduler should eventualy develop their own methods to do this now that they are effectively separated. Rejig libthr's kernel interface to follow the same code paths as linkse for scope system threads. This has slightly hurt libthr's performance but I will work to recover as much of it as I can. Thread exit code has been cleaned up greatly. exit and exec code now transitions a process back to 'standard non-threaded mode' before taking the next step. Reviewed by: scottl, peter MFC after: 1 week
* Turn PREEMPTION into a kernel option. Make sure that it's defined ifscottl2004-09-021-5/+0
| | | | | | FULL_PREEMPTION is defined. Add a runtime warning to ULE if PREEMPTION is enabled (code inspired by the PREEMPTION warning in kern_switch.c). This is a possible MT5 candidate.
* Give setrunqueue() and sched_add() more of a clue as tojulian2004-09-011-1/+1
| | | | | | where they are coming from and what is expected from them. MFC after: 2 days
* Remove an unneeded argument..julian2004-08-311-1/+1
| | | | | | | | | The removed argument could trivially be derived from the remaining one. That in turn should be the same as curthread, but it is possible that curthread could be expensive to derive on some syste,s so leave it as an argument. Having both proc and thread as an argumen tjust gives an opportunity for them to get out sync. MFC after: 3 days
* Remove sched_free_thread() which was only usedjulian2004-08-311-6/+0
| | | | | | | | in diagnostics. It has outlived its usefulness and has started causing panics for people who turn on DIAGNOSTIC, in what is otherwise good code. MFC after: 2 days
* Add em(4) to Alpha. I had a couple running recently on Alpha and itwilko2004-08-301-0/+1
| | | | | | appeared to work fine. Submitted by: Konstantin Saurbier saurbier at mathematik uni-bielefeld de
* In alpha_pci_alloc_resource(), when allocating a memory resource,marcel2004-08-291-1/+1
| | | | | | | | | | | do not set the virtual address to the bus address when the bus doesn't have either of the PCI_RF_DENSE or PCI_RF_BWX flags set. The TGA driver uses the virtual address to access the registers, which on some machines can cause a memory management fault. Map the bus address as K0SEG virtual memory instead. Note that with some hardware combinations involving the TGA2 adapter this change merely results that the memory management fault is replaced by a machine check.
* Stop pretending: TurboLaser support is really brokenwilko2004-08-281-1/+2
| | | | MFC after: 2 days
* Stop pretending: TurboLaser support is really broken.wilko2004-08-281-1/+2
| | | | MFC after: 2 days
* Move the kernel-specific logic to adjust frompc from MI to MD. Formarcel2004-08-271-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | these two reasons: 1. On ia64 a function pointer does not hold the address of the first instruction of a functions implementation. It holds the address of a function descriptor. Hence the user(), btrap(), eintr() and bintr() prototypes are wrong for getting the actual code address. 2. The logic forces interrupt, trap and exception entry points to be layed-out contiguously. This can not be achieved on ia64 and is generally just bad programming. The MCOUNT_FROMPC_USER macro is used to set the frompc argument to some kernel address which represents any frompc that falls outside the kernel text range. The macro can expand to ~0U to bail out in that case. The MCOUNT_FROMPC_INTR macro is used to set the frompc argument to some kernel address to represent a call to a trap or interrupt handler. This to avoid that the trap or interrupt handler appear to be called from everywhere in the call graph. The macro can expand to ~0U to prevent adjusting frompc. Note that the argument is selfpc, not frompc. This commit defines the macros on all architectures equivalently to the original code in sys/libkern/mcount.c. People can take it from here... Compile-tested on: alpha, amd64, i386, ia64 and sparc64 Boot-tested on: i386
* Provide extern declarations for btext and etext when GPROF is defined.marcel2004-08-271-0/+5
| | | | These are referenced in subr_prof.c when building a profiling kernel.
* The machine-independent parts of the virtual memory system always pass aalc2004-08-271-16/+0
| | | | | | | valid pmap to the pmap functions that require one. Remove the checks for NULL. (These checks have their origins in the Mach pmap.c that was integrated into BSD. None of the new code written specifically for FreeBSD included them.)
OpenPOWER on IntegriCloud