summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_smp.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow SMP systems with an MCA bus to work properly.mdodd2000-01-131-4/+6
| | | | Reviewed by: peter
* Allow SMP && NCPU == 1 to work. From now on, there's no restriction on theluoqi2000-01-071-2/+4
| | | | | value of NCPU relative to the number of cpus physically present, the actual number of cpus utilized will be the smaller of the two.
* ISA device drivers use the ISA source interrupt number in locations wheretegge2000-01-041-6/+64
| | | | | | | | | | | | | | the low level interrupt handler number should be used. Change setup_apic_irq_mapping() to allocate low level interrupt handler X (Xintr${X}) for any ISA interrupt X mentioned in the MP table. Remove an assumption in the driver for the system clock (clock.c) that interrupts mentioned in the MP table as delivered to IOAPIC #0 intpin Y is handled by low level interrupt handler Y (Xintr${Y}) but don't assume that low level interrupt handler 0 (Xintr0) is used. Don't allocate two low level interrupt handlers for the system clock. Reviewed by: NOKUBI Hirotaka <hnokubi@yyy.or.jp>
* Moved scheduling-related code to kern_synch.c so that it is easier to fixbde1999-11-271-8/+1
| | | | | | | | and extend. The new function containing the code is named schedclock() as in NetBSD, but it has slightly different semantics (it already handles incrementation of p->p_cpticks, and it should handle any calling frequency). Agreed with in principle by: dufault
* Eliminate remaining part of incorrect PCI bus numbering sanity check on ↵tegge1999-10-151-7/+0
| | | | systems with more than one PCI bus.
* Zap unneeded #includespeter1999-10-111-2/+0
| | | | Submitted by: phk
* Set up FPU state on the AP.peter1999-09-051-0/+4
| | | | Tested by: phk
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-091-3/+2
| | | | may not compile, I can't test it.
* Implement an all-CPU shootdown-style rendezvous facility. This allowsmsmith1999-07-201-1/+85
| | | | | | | | | | | the caller to specify a function to be guarded between an entry and exit barrier, as well as pre- and post-barrier functions. The primary use for this function is synchronised update of per-cpu private data. The implementation is almost (but not quite) MI; with a better mechanism for masking per-CPU interrupts it could probably be hoisted. Reviewed by: peter (partially)
* Changes in the way that the APs are started appears to have removed themsmith1999-06-231-11/+3
| | | | | | | problem with having more CPUs than NCPU. PR: kern/4255 Submitted by: peter
* Do not setup 4M pdir until all APs are up.luoqi1999-06-231-8/+9
|
* Remove an unnecessary panic when sparse PCI bus numbering is encountered.msmith1999-06-221-3/+1
| | | | | | This is found eg. on some Compaq Proliant systems. Submitted by: peter
* Unifdef VM86.jlemon1999-06-011-4/+1
| | | | Reviewed by: silence on on -current
* Unbreak VESA on SMP.luoqi1999-05-121-2/+3
|
* Make sure the mem_range_AP_init() prototype is seen where it's needed, andpeter1999-05-081-1/+3
| | | | #ifdef SMP around it for fun.
* Add a hook that can be called to initialise a slave processor's memorymsmith1999-04-301-1/+4
| | | | | | | | | | range attributes after they have been extracted from the master. Hook up the i686 MP code to do this for each AP. Be more careful about printing the default memory type for the i686. Suggestions from: luoqi
* Enable vmspace sharing on SMP. Major changes are,luoqi1999-04-281-113/+54
| | | | | | | | | | | | | | | | | - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
* Backout early start of APs since it caused some machines to hang.tegge1999-04-131-4/+1
|
* Add prototype for wait_ap().tegge1999-04-111-1/+4
|
* Let BSP wait until all APs are initialized.tegge1999-04-101-1/+4
|
* Disable the mtrr copy calls, it doesn't work with the i686_mem.c stuff.peter1999-04-071-1/+7
| | | | This should make it compile/link again.
* The magic "no-cpu" cpu number is 0xff. Don't misrepresent cpubde1999-03-051-3/+3
| | | | | | numbers as chars or use bogus casts in an attempt to unmisrepresnt them. In top, don't assume that 0xff is the only negative cpu number when cpu numbers are (mis)represented.
* Don't call assign_apic_irq with a value for irq that is out of range.tegge1999-02-261-2/+2
|
* Introduce machine-dependent macro pgtok() to convert page count to numberluoqi1999-02-191-5/+5
| | | | | of kilobytes. Its definition for each architecture could be optimized to avoid potential numerical overflows.
* Hide access to vmspace:vm_pmap with inline function vmspace_pmap(). Thisluoqi1999-02-191-3/+2
| | | | | | | is the preparation step for moving pmap storage out of vmspace proper. Reviewed by: Alan Cox <alc@cs.rice.edu> Matthew Dillion <dillon@apollo.backplane.com>
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-2/+2
| | | | kernel compile
* Make more messages conditional on bootverbosejkh1999-01-201-3/+5
|
* Silence warnings.eivind1999-01-121-3/+3
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-2/+1
| | | | and local variables, goto labels, and functions declared but not defined.
* Attempt to handle interrupts delivered to all IO APICs by using the firsttegge1998-11-261-2/+17
| | | | IO APIC with a sufficient number of pins.
* Staticize.eivind1998-11-261-3/+3
|
* mp_machdep.c: Set a vector to boot code (PC-98).kato1998-10-101-4/+4
| | | | locore.s: Tell the bios to warmboot next time (PC-98).
* PC-98 doesn't have CMOS ram.kato1998-10-101-2/+8
|
* BIOS ROM base address is 0xe8000 on PC-98.kato1998-10-081-1/+6
|
* Maintain a mapping from irq number to (ioapic number, int pin) tuple,tegge1998-09-061-14/+115
| | | | | | | | | | | | and use this when masking/unmasking interrupts. Maintain a mapping from (iopaic number, int pin) tuple to irq number, and use this when configuring devices and programming the ioapics. Previous code assumed that irq number was equal to int pin number, and that the ioapic number was 0. Don't let an AP enter _cpu_switch before all local apics are initialized.
* Fixed printf format errors. Only one left in LINT on i386's.bde1998-08-241-2/+2
|
* Presently there is only one `currentldt' variable for all cpusmsmith1998-08-181-1/+5
| | | | | | | | | | | | in a SMP system. Unexpected things could happen if each cpu has a different ldt setting and one cpu tries to use value of currentldt set by another cpu. The fix is to move currentldt to the per-cpu area. It includes patches I filed in PR i386/6219 which are also user ldt related. PR: i386/7591, i386/6219 Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
* pmap.c:bde1998-08-161-4/+4
| | | | | | | | | | | | | | | | | Cast pointers to (vm_offset_t) instead of to (u_long) (as before) or to (uintptr_t)(void *) (as would be more correct). Don't cast vm_offset_t's to (u_long) just to do arithmetic on them. mp_machdep.c: Cast pointers to (uintptr_t) instead of to (u_long). Don't forget to cast pointers to (void *) first or to recover from integral possible integral promotions, although this is too much work for machine-dependent code. vm code generally avoids warnings for pointer vs long size mismatches by using vm_offset_t to represent pointers; pmap.c often uses plain `unsigned int' instead of vm_offset_t and didn't use u_long elsewhere, but this style was messed up by code apparently imported from mp_machdep.c.
* Add forwarding of roundrobin to other cpus. This gives a more regulartegge1998-05-171-10/+48
| | | | | | | | | | | update of cpu usage as shown by top when one process is cpu bound (no system calls) while the system is otherwise idle (except for top). Don't attempt to switch to the BSP in boot(). If the system was idle when an interrupt caused a panic, this won't work. Instead, switch to the BSP in cpu_reset. Remove some spurious forward_statclock/forward_hardclock warnings.
* For SMP, use prv_PPAGE1/prv_PMAP1 instead of PADDR1/PMAP1.tegge1998-05-171-1/+3
| | | | | get_ptbase and pmap_pte_quick no longer generates IPIs. This should reduce the number of IPIs during heavy paging.
* Attempt to set write combining mode for graphics devices.dyson1998-05-111-59/+5
|
* Use real types for the SMP pages being allocated rather than arrays ofpeter1998-04-061-17/+11
| | | | | | ints. Remove some no longer needed casts. Initialize the per-cpu global data area using the structs rather than knowing too much about layout, alignment, etc.
* Make a kernel version of the timer* functions called timerval* to bephk1998-04-061-3/+3
| | | | | | more consistent. OK'ed by: bde
* Add two workarounds for broken MP tables:tegge1998-04-011-2/+49
| | | | | | | | | | | | | - Attempt to handle PCI devices where the interrupt is an ISA/EISA interrupt according to the mp table. - Attempt to handle multiple IO APIC pins connected to the same PCI or ISA/EISA interrupt source. Print a warning if this happens, since performance is suboptimal. This workaround is only used for PCI devices. With these two workarounds, the -SMP kernel is capable of running on my Asus P/I-P65UP5 motherboard when version 1.4 of the MP table is disabled.
* The APs now reload the interrupt descriptor table pointer aftertegge1998-03-071-1/+6
| | | | | | | | | f00f_hack has run. Use the global r_idt descriptor in f00f_hack when in SMP mode, so the APs find the relocated interrupt descriptor table. Submitted by: Partially from David A Adkins <adkin003@tc.umn.edu>
* When entering the apic version of slow interrupt handler, leveltegge1998-03-031-1/+60
| | | | | | | | | interrupts are masked, and EOI is sent iff the corresponding ISR bit is set in the local apic. If the CPU cannot obtain the interrupt service lock (currently the global kernel lock) the interrupt is forwarded to the CPU holding that lock. Clock interrupts now have higher priority than other slow interrupts.
* Forward the signal if the process runs on a different CPU. This reducestegge1998-03-031-2/+54
| | | | | | | | the signal handling latency for cpu-bound processes that performs very few system calls. The IPI for forcing an additional software trap is no longer dependent upon BETTER_CLOCK being defined.
* Reduce timeout before assuming that forwarding of hardclock or softclocktegge1998-03-031-7/+11
| | | | | failed. Don't complain on forwarding failure, unless BETTER_CLOCK_DIAGNOSTIC is defined.
* 1) Use a more consistent page wait methodology.dyson1998-03-011-2/+2
| | | | | | | | | | | | | 2) Do not unnecessarily force page blocking when paging pages out. 3) Further improve swap pager performance and correctness, including fixing the paging in progress deadlock (except in severe I/O error conditions.) 4) Enable vfs_ioopt=1 as a default. 5) Fix and enable the page prezeroing in SMP mode. All in all, SMP systems especially should show a significant improvement in "snappyness."
OpenPOWER on IntegriCloud