Commit Graph

9150 Commits

Author SHA1 Message Date
Peter Wemm
bb9cca1c2f Halt the cpus in the idle loop for SMP as well for several reasons:
1) Its critical for HTT.  There's less foot-shooting opportunity.
2) I've seen significant improvements in interactive response to commands
over ssh sessions.  I assume this is less lock contention.
3) As incentive to finish the idle cpu IPI wakeup stuff.
4) The machine on my desk was blowing hot air in my general direction
because somebody forgot to turn the hlt on, and it saves 50 watts per
cpu..

The machdep.cpu_idle_hlt sysctl is still available, but now the default
is the same as on UP kernels.
2003-03-26 19:40:29 +00:00
John Baldwin
35eb8c5aa2 Add a cleanup function to destroy the osname_lock and call it on module
unload.

Submitted by:	gallatin
Reported by:	Martin Karlsson <mk-freebsd@bredband.net>
2003-03-26 18:29:44 +00:00
John Baldwin
84b7dcad85 Add an options entry for HTT in SMP and GENERIC similar to the SMP and
APIC_IO options.

Requested by:	John Cagle <john.cagle@hp.com>
2003-03-25 23:31:14 +00:00
John Baldwin
c0109e50ec Put a newline in between APIC_IO and HTT to try and show that HTT is not
mandatory.
2003-03-25 23:29:44 +00:00
Matthew N. Dodd
91d631e536 Print the return value from mmap() in the DEBUG case. 2003-03-25 20:02:55 +00:00
Matthew N. Dodd
94c35e0af2 Merge PC98 support. 2003-03-25 05:19:18 +00:00
Jake Burkholder
227f9a1c58 - Add vm_paddr_t, a physical address type. This is required for systems
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)
2003-03-25 00:07:06 +00:00
Matthew N. Dodd
257427efe3 Retire sys/pc98/pc98/spkr.c 2003-03-24 21:01:54 +00:00
Matthew N. Dodd
1352a54255 Use __packed; 2003-03-24 20:44:39 +00:00
Matthew N. Dodd
a954a4fba0 Correct a mis-merge.
Noticed by:	 johan
2003-03-24 19:54:14 +00:00
Matthew N. Dodd
96aa42527e - Consolidate smapi driver.
- Attach to nexus.
- Use null{open,close}() instead of rolling our own.
2003-03-24 19:40:54 +00:00
Matthew N. Dodd
863463c1cb Add the 'vpd' and 'smbios' drivers. The 'smbios' driver is just a
stub right now.
2003-03-24 19:32:57 +00:00
Matthew N. Dodd
b7b5ae3edb Use repo-copied files in sys/i386/bios. 2003-03-24 19:14:46 +00:00
Bruce Evans
f261b1f35f Disable interrupts while in kdb_trap() to handle cases where the caller
doesn't do it.  This fixes all known causes of "Context switches not
allowed in the debugger" in mi_switch().  The main cause was trap_fatal()
calling kdb_trap() with interrupts enabled.  Switching to ithreads for
interrupt handling then made fatal traps more fatal and harder to debug.
The problem was limited in -current because most interrupt handlers are
blocked by Giant, but it occurred almost deterministically for me because
my clock interrupt handlers are non-fast and not blocked by Giant.
2003-03-24 10:17:14 +00:00
Ruslan Ermilov
ab0f83bd03 Remove bitrot associated with `maxusers'.
Submitted by:	bde
2003-03-22 14:18:23 +00:00
John Baldwin
43cf129c99 Sync up linux and svr compat elf fixup functions for exec(). These
functions are now all basically identical except that alpha linux uses
Elf64 arguments and svr4 and i386 linux use Elf32.  The fixups include
changing the first argument to be a register_t ** to match the prototype
for fixup functions, asserting that the process in the image_params struct
is always curproc and removing unnecessary locking to read credentials as a
result, and a few style fixes.
2003-03-21 19:49:34 +00:00
Matthew N. Dodd
868d8b6286 - Use if_broadcastaddr from struct ifnet rather than relying on
extern 'etherbroadcastaddr'.
- Make 'etherbroadcastaddr' static.

Reviewed by:	 imp
2003-03-21 17:53:16 +00:00
David Malone
0036341d93 Extend CPU_ATHLON_SSE_HACK to cover a few more revisions of Athlon CPUs.
Submitted by: Jon Kuster <kwsn@earthlink.net>
MFC after:    2 weeks
2003-03-20 20:50:22 +00:00
Maxime Henrion
fd1b2ab0c9 Use atomic operations to increment and decrement the refcount
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.
2003-03-20 19:45:26 +00:00
Poul-Henning Kamp
b4b138c27f Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
2003-03-18 08:45:25 +00:00
John Baldwin
a480c73063 Expand the APIC ID mask field of the ICR register to 8 bits intead of just
4 bits.  This reportedly fixes booting on the SW7500CW2.  Much thanks to
the submitter for tracking this down!

Submitted by:	Brian Buchanan <brian@ncircle.com>
Reviewed by:	peter
MFC after:	3 days
2003-03-17 19:14:13 +00:00
Maxime Henrion
cab2362883 - Lock down the bounce pages structures. We use the same locking scheme
as with the alpha backend because both implementations of bounce pages
  are identical.
- Remove useless splhigh()/splx() calls.
2003-03-17 18:34:34 +00:00
Jake Burkholder
5501d40bb9 Made the prototypes for pmap_kenter and pmap_kremove MD. These functions
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.
2003-03-16 04:16:03 +00:00
Maxime Henrion
c0796d1cb4 Grab Giant around calls to contigmalloc() and contigfree() so
that drivers converted to be MP safe don't have to deal with it.
2003-03-13 17:18:48 +00:00
Jake Burkholder
4d3f408cee - Added support for multiple page directory pages to pmap_pinit and
pmap_release.
- Merged pmap_release and pmap_release_free_page.  When pmap_release is
  called only the page directory page(s) can be left in the pmap pte object,
  since all page table pages will have been freed by pmap_remove_pages and
  pmap_remove.  In addition, there can only be one reference to the pmap and
  the page directory is wired, so the page(s) can never be busy.  So all there
  is to do is clear the magic mappings from the page directory and free the
  page(s).

Sponsored by:	DARPA, Network Associates Laboratories
2003-03-12 07:38:37 +00:00
Jake Burkholder
2089c5c95e Use bus_space_handle_t to represent host port and virtual addresses;
bus_addr_t may not be appropriate.

Sponsored by:	DARPA, Network Associates Laboratories
2003-03-11 19:43:38 +00:00
Poul-Henning Kamp
d42ee4e410 Note that MAJOR_AUTO is now the default if d_maj is not initialized. This
is more robust and prevents the hijacking of /dev/console for the typical
mistake.

Remove unneeded MAJOR_AUTO uses, it is only needed explicitly now if the
driver source has cross-branch compatibility to old releases.
2003-03-09 11:03:45 +00:00
Eric Anholt
43e2d1e384 Update the DRM to latest from DRI CVS. This is approximately the version
included in XFree86 4.3, but includes some fixes.  Notable changes include
Radeon 8500-9100 support, PCI Radeon/Rage 128 support, transform & lighting
support for Radeons, and vblank syncing support for r128, radeon, and mga.
The gamma driver was removed due to lack of any users.
2003-03-09 02:08:30 +00:00
David Xu
1108975fe0 Initialize eflags in fake frame to default value rather than random one.
The random value sometimes causes macro CLKF_USERMODE to return true
because PSL_VM bit is set and really shoudn't be, this causes statclock()
to execute in wrong path, and further breaks KSE code and kernel crashes
when executing threaded program.
2003-03-08 03:58:50 +00:00
Robert Watson
9283578946 Instrument sysarch() MD privileged I/O access interfaces with a MAC
check, mac_check_sysarch_ioperm(), permitting MAC security policy
modules to control access to these interfaces.  Currently, they
protect access to IOPL on i386, and setting HAE on Alpha.
Additional checks might be required on other platforms to prevent
bypass of kernel security protections by unauthorized processes.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-03-06 04:47:47 +00:00
Peter Wemm
3c6b084e96 Finish driving a stake through the heart of netns and the associated
ifdefs scattered around the place - its dead Jim!

The SMB stuff had stolen AF_NS, make it official.
2003-03-05 19:24:24 +00:00
David Schultz
9c62b3ee7c Make TTYHOG tunable.
Reviewed by:	mike (mentor)
2003-03-05 08:16:29 +00:00
John Baldwin
263067951a Replace calls to WITNESS_SLEEP() and witness_list() with equivalent calls
to WITNESS_WARN().
2003-03-04 21:03:05 +00:00
John Baldwin
d7a715dc64 Wrap the hyperthreading support code with the HTT kernel option.
Hyperthreading support is now off unless the HTT option is added.

MFC-after:	3 days
2003-03-04 20:24:53 +00:00
Poul-Henning Kamp
182a9f7455 Make nokqfilter() return the correct return value.
Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers.
2003-03-03 16:24:47 +00:00
Poul-Henning Kamp
7ac40f5f59 Gigacommit to improve device-driver source compatibility between
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)
2003-03-03 12:15:54 +00:00
Dag-Erling Smørgrav
1d062e2be8 Clean up whitespace and remove register keyword. 2003-03-03 09:17:12 +00:00
Dag-Erling Smørgrav
4b7ef73d71 More caddr_t removal, in conjunction with copy{in,out}(9) this time.
Also clean up some egregious casts and incorrect use of sizeof.
2003-03-03 09:14:26 +00:00
Dag-Erling Smørgrav
521f364b80 More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9). 2003-03-02 16:54:40 +00:00
Poul-Henning Kamp
32f034faca Add support for the Elan CPU hardware watchdog used in "active" mode. 2003-02-27 21:13:08 +00:00
John Baldwin
295435632d Expand some #ifdef's to fix I386_CPU compile.
Reported by:	Andy Farkas <andyf@speednet.com.au>
2003-02-27 20:38:48 +00:00
Alan Cox
8480cd45a5 Remove some long unused declarations. (For example, the PV flags have not
been used since revision 1.8, roughly nine years ago.)
2003-02-27 20:13:20 +00:00
Poul-Henning Kamp
f85c6d3502 Use MAJOR_AUTO. 2003-02-27 15:05:28 +00:00
Poul-Henning Kamp
4c61f9036b NODEVFS cleanup:
Don't call devsw_{add,delete}().
These two drivers are actually broken, and have been for quite some time.
2003-02-27 07:36:03 +00:00
Julian Elischer
ac2e415327 Change the process flags P_KSES to be P_THREADED.
This is just a cosmetic change but I've been meaning to do it for about a year.
2003-02-27 02:05:19 +00:00
Ruslan Ermilov
824018495d Implemented "nooption" and "nomakeoption" config(8) tokens.
Fixed memory leak in the "nodevice" option implementation.

Use these instead of sed(1) in MD NOTES.

Use a single makefile (sys/conf/makeLINT.mk) to generate
LINT for all architectures.  (Previous versions missed
the LINT dependency on Makefile, and i386 version also
missed the dependency on ${NOTES}.)

Fixed bugs in the previous NOTES conversion using the
"nodevice" token and sed(1):

- i386 LINT lost "device pst".

- pc98 LINT lost SC_*, MAXCONS and KBD_DISABLE_KEYMAP_LOAD
  options, and got needless DPT_* options.

- Added nooptions PPC_DEBUG, PPC_PROBE_CHIPSET, KBD_INSTALL_CDEV
  to sparc64 LINT so that it has a chance to config(8).

This basically returns us to where we were before.
2003-02-26 23:36:59 +00:00
Poul-Henning Kamp
f400e58886 msg 2003-02-26 21:01:26 +00:00
Poul-Henning Kamp
109a8a2e47 NODEVFS cleanup: Create devices with make_dev() instead of cdevsw_add() 2003-02-26 20:54:46 +00:00
David Xu
f5044aeb45 Better to not know anything about KSE. 2003-02-26 05:47:25 +00:00
Maxime Henrion
f6c912dd0c Correctly set BUS_SPACE_MAXSIZE in all the busdma backends.
It was bogusly set to 64 * 1024 or 128 * 1024 because it was
bogusly reused in the BUS_DMAMAP_NSEGS definition.
2003-02-26 02:16:06 +00:00