4542 Commits

Author SHA1 Message Date
ups
ceb214c91f MFC: 1.271
Enable global pages TLB extension on Application Processors.

Approved by:    re (kensmith)
2006-03-22 13:45:47 +00:00
jhb
bc610ba42b MFC: Don't allow userland to set hardware watch points on kernel memory.
Approved by:	re (mux)
2006-03-20 19:56:44 +00:00
jhb
167b2f3ee2 MFC: Don't route interrupts to hyperthreads in an HT system. This
eliminates some performance degradation seen in some workloads when
the change was made from logical APIC addresses to physical APIC addresses.

Approved by:	re (scottl)
2006-03-14 21:07:35 +00:00
jeff
1b2823246d MFC Rev 1.72
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:03:51 +00:00
jhb
025e3d0a95 MFC: Split struct ithd into struct intr_thread and intr_event and
associated changes.  More details below:

  Remove public declarations of variables that were forgotten when they were
  made static.

  Revision  Changes    Path
  1.31      +0 -1      src/sys/sys/interrupt.h

  Make sure the interrupt is masked before processing it, or bad things
  can happen.

  Revision  Changes    Path
  1.10      +3 -3      src/sys/arm/arm/intr.c

  Reorganize the interrupt handling code a bit to make a few things cleaner
  and increase flexibility to allow various different approaches to be tried
  in the future.
  - Split struct ithd up into two pieces.  struct intr_event holds the list
    of interrupt handlers associated with interrupt sources.
    struct intr_thread contains the data relative to an interrupt thread.
    Currently we still provide a 1:1 relationship of events to threads
    with the exception that events only have an associated thread if there
    is at least one threaded interrupt handler attached to the event.  This
    means that on x86 we no longer have 4 bazillion interrupt threads with
    no handlers.  It also means that interrupt events with only INTR_FAST
    handlers no longer have an associated thread either.
  - Renamed struct intrhand to struct intr_handler to follow the struct
    intr_foo naming convention.  This did require renaming the powerpc
    MD struct intr_handler to struct ppc_intr_handler.
  - INTR_FAST no longer implies INTR_EXCL on all architectures except for
    powerpc.  This means that multiple INTR_FAST handlers can attach to the
    same interrupt and that INTR_FAST and non-INTR_FAST handlers can attach
    to the same interrupt.  Sharing INTR_FAST handlers may not always be
    desirable, but having sio(4) and uhci(4) fight over an IRQ isn't fun
    either.  Drivers can always still use INTR_EXCL to ask for an interrupt
    exclusively.  The way this sharing works is that when an interrupt
    comes in, all the INTR_FAST handlers are executed first, and if any
    threaded handlers exist, the interrupt thread is scheduled afterwards.
    This type of layout also makes it possible to investigate using interrupt
    filters ala OS X where the filter determines whether or not its companion
    threaded handler should run.
  - Aside from the INTR_FAST changes above, the impact on MD interrupt code
    is mostly just 's/ithread/intr_event/'.
  - A new MI ddb command 'show intrs' walks the list of interrupt events
    dumping their state.  It also has a '/v' verbose switch which dumps
    info about all of the handlers attached to each event.
  - We currently don't destroy an interrupt thread when the last threaded
    handler is removed because it would suck for things like ppbus(8)'s
    braindead behavior.  The code is present, though, it is just under
    #if 0 for now.
  - Move the code to actually execute the threaded handlers for an interrrupt
    event into a separate function so that ithread_loop() becomes more
    readable.  Previously this code was all in the middle of ithread_loop()
    and indented halfway across the screen.
  - Made struct intr_thread private to kern_intr.c and replaced td_ithd
    with a thread private flag TDP_ITHREAD.
  - In statclock, check curthread against idlethread directly rather than
    curthread's proc against idlethread's proc. (Not really related to intr
    changes)

  Tested on:      alpha, amd64, i386, sparc64
  Tested on:      arm, ia64 (older version of patch by cognet and marcel)

  Revision  Changes    Path
  1.88      +43 -29    src/sys/alpha/alpha/interrupt.c
  1.38      +5 -5      src/sys/alpha/isa/isa.c
  1.16      +58 -52    src/sys/amd64/amd64/intr_machdep.c
  1.6       +1 -1      src/sys/amd64/include/intr_machdep.h
  1.16      +2 -2      src/sys/amd64/isa/atpic.c
  1.11      +28 -22    src/sys/arm/arm/intr.c
  1.462     +2 -2      src/sys/dev/sio/sio.c
  1.6       +1 -1      src/sys/dev/uart/uart_kbd_sun.c
  1.24      +2 -2      src/sys/dev/uart/uart_tty.c
  1.15      +58 -52    src/sys/i386/i386/intr_machdep.c
  1.8       +1 -1      src/sys/i386/include/intr_machdep.h
  1.21      +2 -2      src/sys/i386/isa/atpic.c
  1.52      +32 -25    src/sys/ia64/ia64/interrupt.c
  1.180     +3 -2      src/sys/kern/kern_clock.c
  1.127     +437 -270  src/sys/kern/kern_intr.c
  1.206     +0 -1      src/sys/kern/subr_witness.c
  1.6       +3 -3      src/sys/powerpc/include/intr_machdep.h
  1.7       +35 -32    src/sys/powerpc/powerpc/intr_machdep.c
  1.14      +1 -1      src/sys/sparc64/include/intr_machdep.h
  1.24      +43 -36    src/sys/sparc64/sparc64/intr_machdep.c
  1.32      +36 -36    src/sys/sys/interrupt.h
  1.440     +1 -3      src/sys/sys/proc.h

  Catch up with interrupt-thread changes.

  Revision  Changes    Path
  1.32      +1 -1      src/sys/dev/zs/zs.c

  Catch up with new interrupt handling code.

  Revision  Changes    Path
  1.16      +3 -3      src/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c

  Catch up with new interrupt handling code.

  Revision  Changes    Path
  1.162     +2 -2      src/sys/dev/cy/cy.c
  1.101     +2 -2      src/sys/dev/rc/rc.c

  Catch up with new interrupt handling code.

  Revision  Changes    Path
  1.50      +2 -2      src/sys/dev/cx/if_cx.c
  1.41      +1 -1      src/sys/dev/sab/sab.c
  1.238     +2 -2      src/sys/pc98/cbus/sio.c

  Add a swi_remove() function to teardown software interrupt handlers.  For
  now it just calls intr_event_remove_handler(), but at some point it might
  also be responsible for tearing down interrupt events created via swi_add.

  Revision  Changes    Path
  1.128     +17 -0     src/sys/kern/kern_intr.c
  1.33      +1 -0      src/sys/sys/interrupt.h

  - Use swi_remove() to teardown swi handlers rather than
    intr_event_remove_handler().
  - Remove tty: prefix from a couple of swi handler names.

  Revision  Changes    Path
  1.51      +1 -1      src/sys/dev/cx/if_cx.c
  1.102     +2 -2      src/sys/dev/rc/rc.c
  1.42      +1 -1      src/sys/dev/sab/sab.c
  1.25      +1 -1      src/sys/dev/uart/uart_tty.c
  1.33      +1 -1      src/sys/dev/zs/zs.c
  1.17      +2 -2      src/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c

  Remove a stray return statement in the interrupt dispatch function
  that caused a premature exit after calling a fast interrupt handler
  and bypassing a much needed critical_exit() and the scheduling of
  the interrupt thread for non-fast handlers. In short: unbreak :-)

  Revision  Changes    Path
  1.53      +0 -1      src/sys/ia64/ia64/interrupt.c

  If we get a stray interrupt, return after logging it.  In the extremely
  rare case of a stray interrupt to an unregistered source (such as a stray
  interrupt from the 8259As when using APIC), this could result in a page
  fault when it tried to walk the list of interrupt handlers to execute
  INTR_FAST handlers.  This bug was introduced with the intr_event changes,
  so it's not present in 5.x or 6.x.

  Submitted by:   Mark Tinguely tinguely at casselton dot net

  Revision  Changes    Path
  1.17      +1 -0      src/sys/amd64/amd64/intr_machdep.c
  1.16      +1 -0      src/sys/i386/i386/intr_machdep.c

Approved by:	re (scottl)
2006-03-10 19:37:35 +00:00
jhb
4e42f99cdd MFC: Throw out all the logical APIC ID stuff and just wire up interrupts
to individual CPUs using physical addressing and fixed delivery mode.

Approved by:	re (scottl)
2006-03-07 18:33:21 +00:00
scottl
621b0991ac Disable some code that isn't ready for prime time.
Approved by: re
2006-03-02 06:17:52 +00:00
jhb
1169153605 MFC: Change the x86 interrupt code to allocate IDT vectors on-demand.
Approved by:	re (scottl)
2006-03-01 20:50:10 +00:00
jhb
f9dfac8905 MFC: Various apic fixes and tweaks from io_apic.c 1.16 and
local_apic.c 1.18.

Approved by:	re (scottl)
2006-03-01 20:46:52 +00:00
sam
9c034455ca guard function decls with _KERNEL so user code can include this file
Approved by:	re (scottl)
2006-03-01 06:02:42 +00:00
dwmalone
ab251f7d8e MFC: Print Virtual Machine Extensions feature and remove stale comment.
Approved by: re (scottl)
2006-02-23 15:03:42 +00:00
davidxu
7bd3a09a50 MFC amd64/amd64/machdep.c revision 1.646, i386/i386/machdep.c
revision 1.622
>
> Clear carry flag in get_mcontext so that setcontext does not
> return a bogus error.
>
> PR: misc/92110

Approved by:	re (scottl)
2006-02-07 00:29:33 +00:00
marcel
14fe1a0c49 MFC standardization of the ELF types and update of the ELF constants:
lib/libc/gen/nlist.c:1.19
	libexec/rtld-elf/rtld.c:1.108
	libexec/rtld-elf/rtld.h:1.36
	libexec/rtld-elf/alpha/reloc.c:1.21
	libexec/rtld-elf/amd64/reloc.c:1.16
	libexec/rtld-elf/ia64/reloc.c:1.16
	libexec/rtld-elf/sparc64/reloc.c:1.11
	share/man/man5/elf.5:1.32-1.33
	sys/alpha/alpha/elf_machdep.c:1.20
	sys/amd64/amd64/elf_machdep.c:1.24
	sys/boot/common/bootstrap.h:1.42
	sys/boot/common/load_elf.c:1.33
	sys/boot/common/load_elf_obj.c:1.2
	sys/boot/common/reloc_elf.c:1.2
	sys/ia64/ia64/elf_machdep.c:1.21
	sys/kern/link_elf.c:1.87
	sys/kern/link_elf_obj.c:1.90
	sys/sparc64/sparc64/elf_machdep.c:1.20
	sys/sys/elf32.h:1.9-1.10
	sys/sys/elf64.h:1.11-1.13
	sys/sys/elf_common.h:1.16
	sys/sys/elf_generic.h:1.7
	sys/sys/imgact_elf.h:1.28
	sys/sys/linker.h:1.40
	usr.bin/elf2aout/elf2aout.c:1.10
	usr.bin/elfdump/elfdump.c:1.13
	usr.sbin/crunch/crunchide/exec_elf32.c:1.15
	usr.sbin/kldxref/ef.c:1.9
	usr.sbin/kldxref/ef.h:1.6
	usr.sbin/kldxref/ef_amd64.c:1.3
	usr.sbin/kldxref/ef_i386.c:1.3
	usr.sbin/kldxref/ef_obj.c:1.4
	usr.sbin/kldxref/ef_powerpc.c:1.3
	usr.sbin/kldxref/ef_sparc64.c:1.4-1.5
2005-12-30 22:13:59 +00:00
ps
a2a837b8b0 MFC: 32bit compat for recvmsg, sendmsg, osigaction, osigprocmask,
osigpending, osigvec, osigblock, osigsetmask, osigsuspend, osigstack,
clock_gettime, clock_settime, and clock_getres.

Also correct the prototype for freebsd32_nanosleep in syscalls.master.
2005-12-28 19:30:41 +00:00
jhb
c240b8f56c MFC: Remove linux_mib_destroy() since MTX_SYSINIT's gaining of a SYSUNINIT
that called mtx_destroy() made it obsolete.
2005-12-22 21:25:20 +00:00
anholt
63922011a7 MFC DRM. Notable changes:
- i915 (i830-i915) driver ported.
- S3 Savage driver ported.
- Added support for ATI_fragment_shader registers for r200.
- Improved r300 support, needed for latest r300 DRI driver.
- (possibly) r300 PCIE support, needs X.Org server from CVS.
- Added support for PCI Matrox cards.
- Software fallbacks fixed for Rage 128, which used to render badly or hang.
- Some issues reported by WITNESS are fixed.
2005-12-14 00:52:59 +00:00
jhb
786e4e87b4 MFC: Slam the door more forcefully on mixed mode. 2005-12-13 16:47:33 +00:00
jhb
0629d9c388 MFC: Always print the trap number for fatal traps and add trap messages
for T_XMMFLT and T_RESERVED.
2005-11-28 20:03:15 +00:00
jhb
eee0b465b9 MFC: More fully setup the ATPICs including setting up spurious interrupt
handlers if 'device atpic' is not in the kernel.
2005-11-28 19:42:10 +00:00
jhb
ee240d82b4 MFC: Check for -1 using 0xffffffff rather than 0xffffff. 2005-11-23 19:06:53 +00:00
alc
7c1f2732db MFC
Begin and end the initialization of pvzone in pmap_init().
  Previously, pvzone's initialization was split between pmap_init() and
  pmap_init2().  This split initialization was the underlying cause of
  some UMA panics during initialization.  Specifically, if the UMA boot
  pages was exhausted before the pvzone was fully initialized, then UMA,
  through no fault of its own, would use an inappropriate back-end
  allocator leading to a panic.  (Previously, as a workaround, we have
  increased the UMA boot pages.)  Fortunately, there is no longer any
  reason that pvzone's initialization cannot be completed in
  pmap_init().

  Eliminate a check for whether pv_entry_high_water has been initialized
  or not from get_pv_entry().  Since pvzone's initialization is
  completed in pmap_init(), this check is no longer needed.

  Use cnt.v_page_count, the actual count of available physical pages,
  instead of vm_page_array_size to compute the maximum number of pv
  entries.

  Introduce the vm.pmap.pv_entries tunable on alpha and ia64.

  Eliminate some unnecessary white space.
2005-11-19 20:31:31 +00:00
alc
6b204eeefe MFC revision 1.517
When support for 2MB/4MB pages was added in revision 1.148 an error was
  made in pmap_protect(): The pmap's resident count should not be reduced
  unless mappings are removed.

  The errant change to the pmap's resident count could result in a later
  pmap_remove() failing to remove any mappings if the errant change has set
  the pmap's resident count to zero.

MFC revision 1.518
  Decouple the unrefing of a page table page from the removal of a pv entry.
  In other words, change pmap_remove_entry() such that it no longer unrefs
  the page table page.  Now, it only removes the pv entry.

MFC revision 1.519
  Eliminate unneeded diagnostic code.

MFC revision 1.520
  Eliminate unneeded diagnostic code.

  Eliminate an unused #include.  (Kernel stack allocation and deallocation
  long ago migrated to the machine-independent code.)

MFC revision 1.521
  Simplify the page table page reference counting by pmap_enter()'s change of
  mapping case.

  Eliminate a stale comment from pmap_enter().

MFC revision 1.522
  Correct a performance bug in revision 1.462.  The effect of the bug is to
  execute the outer loop in procedures such as pmap_protect() many more times
  than necessary.

MFC revision 1.523
  Introduce pmap_pml4e_to_pdpe() and pmap_pdpe_to_pde() and use them to avoid
  recomputation of the pml4e and pdpe in pmap_copy(), pmap_protect(), and
  pmap_remove().

MFC revision 1.524
  Change pmap_extract() and pmap_extract_and_hold() to use PG_FRAME rather
  than ~PDRMASK to extract the physical address of a superpage from a PDE.
  The use of ~PDRMASK is problematic if the PDE has PG_NX set.  Specifically,
  the PG_NX bit will be included in the physical address if ~PDRMASK is used.

MFC revision 1.525
  Pass the PDE from pmap_remove() to pmap_remove_page() so that the latter
  procedure doesn't have to recompute it.

MFC revision 1.526
  Remedy the following three problems:

  1. The amd64 pmap, unlike the i386 pmap, maintains a reference count
     for each page directory (PD) page.  However, in the transformation
     of the i386 pmap into the amd64 pmap, operations, such as
     pmap_copy() and pmap_object_init_pt(), that create 2MB "superpage"
     mappings by setting the PG_PS bit in a PD entry were not modified
     to adjust the underlying PD page's reference count.  Consequently,
     superpage mappings could disappear prematurely.

  2. pmap_object_init_pt() could crash or corrupt memory if either the
     virtual address range being mapped crosses a 1GB boundary in the
     virtual address space or nothing is mapped in the 1GB area.

  3. When pmap_allocpte() destroys a 2MB "superpage" mapping it does not
     reduce the pmap's resident count accordingly.  It should.  (This
     bug is inherited from i386.)

MFC revision 1.528
  Eliminate unnecessary TLB invalidations by pmap_enter().  Specifically,
  eliminate TLB invalidations when permissions are relaxed, such as when a
  read-only mapping is changed to a read/write mapping.  Additionally,
  eliminate TLB invalidations when bits that are ignored by the hardware,
  such as PG_W ("wired mapping"), are changed.
2005-11-19 05:06:32 +00:00
peter
5499dea20e MFC: Label the apic timer interrupt as 'cpuN: timer' like on i386 2005-11-17 01:16:23 +00:00
ru
3b474f83c7 MFC: Bring /dev/speaker support to amd64. 2005-11-16 10:50:12 +00:00
ru
111bd917a5 MFC: Sort ath_rate_* entries. Mark ath_rate_sample as the desired algorithm. 2005-11-16 08:59:51 +00:00
peter
52c2c8deb5 MFC: eliminate pcb_rflags, replacing it with padding. It just wastes
cpu cycles.
2005-11-15 00:26:00 +00:00
alc
245bd5abe3 MFC
Pass a value of type vm_prot_t to pmap_enter_quick() so that it determine
  whether the mapping should permit execute access.

  Revision  Changes    Path
  1.179     +2 -2      src/sys/alpha/alpha/pmap.c
  1.527     +4 -2      src/sys/amd64/amd64/pmap.c
  1.37      +3 -3      src/sys/arm/arm/pmap.c
  1.531     +2 -2      src/sys/i386/i386/pmap.c
  1.163     +4 -3      src/sys/ia64/ia64/pmap.c
  1.100     +3 -2      src/sys/powerpc/powerpc/pmap.c
  1.149     +3 -2      src/sys/sparc64/sparc64/pmap.c
  1.72      +1 -1      src/sys/vm/pmap.h
  1.207     +2 -1      src/sys/vm/vm_fault.c
  1.368     +2 -2      src/sys/vm/vm_map.c
2005-11-13 21:45:49 +00:00
jhb
6aa34b36b0 MFC: Hook nve(4) up in i386 and amd64 NOTES. 2005-11-08 16:02:21 +00:00
davidxu
c02ae3fc5e Merge cpu_swtch.S:1.154, machdep.c:1.642 from HEAD:
Micro optimization for context switch.
2005-11-08 00:55:36 +00:00
obrien
ef0977219f MFC: canonify the include of acpi.h. 2005-11-07 09:53:25 +00:00
obrien
94fa0522c4 MFC: for AMD dual-core processors, nullify CPUID.HTT. 2005-11-07 08:41:12 +00:00
peter
99103990ce MFC: allow FreeBSD/amd64 to boot on certain Dell machines that have more
than 8 entries in the 0xe821 map.  This includes things like ACPI
exclusion zones, memory segments and recoverable memory segments after
the kernel has booted.
2005-11-05 00:41:12 +00:00
jhb
4587967874 MFC: Add DEFAULTS files for amd64, i386, and pc98.
Approved by:	re (scottl)
2005-10-28 19:21:27 +00:00
cvs2svn
c2300784b4 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-10-28 15:30:52 +00:00
ade
04d2b88bd5 MFC:
Specifically panic() in the case where pmap_insert_entry() fails to
get a new pv under high system load where the available pv entries
have been exhausted before the pagedaemon has a chance to wake up
to reclaim some.

Approved by:	re (scottl)
2005-10-28 06:49:49 +00:00
peter
904c7279ad MFC: 1.2: don't set segment registers yet.
Approved by:  re
2005-10-26 22:07:03 +00:00
glebius
97d261903e Big overall MFC of polling(4) cleanup:
o First attempt on removing Giant from polling. Details:
  http://lists.freebsd.org/pipermail/cvs-src/2005-September/051848.html
o Second attempt, and big polling cleanup including:
  - Functinal approach to turning polling on/off
  - Deprecating of poll_in_trap
  - Removal of ifnet knowledge from kern_poll.c
  Details:
  http://lists.freebsd.org/pipermail/cvs-src/2005-October/053267.html
o Improved checking of user configurable sysctls. Details:
  http://lists.freebsd.org/pipermail/cvs-src/2005-October/053351.html
o Moving DEVICE_POLLING from opt_global.h to opt_device_polling.h:
  http://lists.freebsd.org/pipermail/cvs-src/2005-October/053479.html

o All related documentation fixes.

Approved by:	re (kensmith)
Thanks to:	everyone, who helped with testing
2005-10-07 14:00:06 +00:00
jkim
9acbd23179 MFC: Minor fixes and add amd64 support:
- Fix SMBIOS entry point structure.
- Add structure length sanity check.
- Fix revision number output.

Approved by:	re (kensmith)
2005-10-06 20:43:44 +00:00
delphij
e0c014b695 MFC Import of the new version of the HPTMV driver from Highpoint.
The major change here is the support for amd64, as well as possible
support for PAE.  Many thanks to Highpoint for continuing to support
FreeBSD.

Obtained from:  Steve Chang @ Highpoint

Merged revisions:

| 1.3      dev/hptmv/access601.h
| 1.1      dev/hptmv/amd64-elf.raid.o.uu
| 1.3      dev/hptmv/array.h
| 1.3      dev/hptmv/atapi.h
| 1.3      dev/hptmv/command.h
| 1.9+1.10 dev/hptmv/entry.c
| 1.4      dev/hptmv/global.h
| 1.5      dev/hptmv/gui_lib.c
| 1.3      dev/hptmv/hptintf.h
| 1.6      dev/hptmv/hptproc.c
| 1.5      dev/hptmv/i386-elf.raid.o.uu
| 1.5      dev/hptmv/ioctl.c
| 1.3      dev/hptmv/mv.c
| 1.4      dev/hptmv/mvOs.h
| 1.3      dev/hptmv/mvSata.h
| 1.4      dev/hptmv/mvStorageDev.h
| 1.5      dev/hptmv/osbsd.h
| 1.3      dev/hptmv/raid5n.h
| 1.3      dev/hptmv/readme.txt
| 1.3      dev/hptmv/vdevice.h
| 1.4      modules/hptmv/Makefile

Approved by:	re (scottl)
2005-10-06 18:47:58 +00:00
jhb
603cac3a99 MFC: Add atomic_fetchadd(9) operation for types int and 32.
Other small updates to atomic(9) include:
- Note that arm and ppc don't provide 64-bit atomic ops.
- Update sample code.

Approved by:	re (scottl)
2005-10-06 18:12:06 +00:00
ups
22426a09ff MFC revision 1.9:
Fix the "fpudna: fpcurthread == curthread XXX times" problem.

Approved by: re (scottl@)
2005-10-03 20:08:00 +00:00
cperciva
bf4a52992c MFC revision 1.639: Don't let the upper bits of %dr6/%dr7 get set.
Submitted by:	Nate Eldredge
Approved by:	re@ (scottl)
Security:	Local denial of service
2005-10-02 16:38:12 +00:00
jhb
76e4abfa33 MFC: Stop using the '+' constraint modifier with memory operands in
inline assembly.  We still use it for register operands in various places.

Approved by:	re (kensmith)
2005-09-26 19:54:19 +00:00
kensmith
6db27a0a53 Fix a whitespace screw-up I made when doing the MFC of COMPAT_FREEBSD5.
It's supposed to be "option", "space", "tab"; not "option", "tab", "tab".

Approved by:	re (scottl)
Pointed out by:	rwatson
Pointy hat:	kensmith
2005-09-22 12:36:39 +00:00
scottl
bbfdfd22d0 Now that our showstopper list has shrunk, take another step closer to the
release and turn off kernel debugging.  Also turn off SMP on i386 and amd64
and add an SMP kernel config.

Approved by: re (implicit)
2005-09-18 03:37:59 +00:00
imp
9dab83f7b6 MFC: Merge resource fixes for pci devices on pci0 for ioport.
Approved by: re (scottl)
2005-09-18 02:55:10 +00:00
jkoshy
fbf27c73ec MFC: { db_trace.c:1.69, exception.S:1.127, genassym.c:1.156, trap.c:1.290 }
- Special-case NMI handling on the AMD64.

  On entry or exit from the kernel the 'alltraps' and 'doreti' the code
  used by normal traps disables interrupts to protect the critical sections
  where it is setting up %gs.

  This protection is insufficient in the presence of NMIs since NMIs
  can be taken even when the processor has disabled normal interrupts.
  Thus the NMI handler needs to actually read MSR_GBASE on entry to
  the kernel to determine whether a swap of %gs using 'swapgs' is
  needed.  However, reads of MSRs are expensive and integrating this
  check into the 'alltraps'/'doreti' path would penalize normal
  interrupts.

- Teach DDB about the 'nmi_calltrap' symbol.

Reviewed by:	bde, peter (an older version) and ups
Approved by:	re (scottl)
2005-09-03 11:57:28 +00:00
pjd
ba6b9383b3 MFC: sys/sys/systm.h 1.235
sys/i386/i386/mp_machdep.c	1.253
	sys/amd64/amd64/mp_machdep.c	1.262
	sys/geom/stripe/g_stripe.c	1.27
	sys/geom/stripe/g_stripe.h	1.8

Avoid code duplication and implement bitcount32() function in systm.h only.

Approved by:	re (scottl)
2005-08-30 15:14:40 +00:00
jhb
7aa2745a2d MFC: Add aliases for atomic operations on 64-bit integers.
Approved by:	re (scottl)
2005-08-26 14:53:57 +00:00
jhb
0ef1901fa9 MFC: Convert the atomic pointer operations to operate on uintptr_t rather
than void *.

Approved by:	re (kensmith)
2005-08-05 19:44:00 +00:00