Commit Graph

43735 Commits

Author SHA1 Message Date
Ruslan Ermilov
cdea8b85bb Fixed two memory leaks.
Reviewed by:	harti
2003-11-17 19:13:44 +00:00
Ruslan Ermilov
d47c9466dd Check the correct set of interface flags and fix a memory leak.
Reviewed by:	harti
2003-11-17 19:13:01 +00:00
Sam Leffler
f6dbcc4910 o fix WEP use in hostap mode; need to reset the pointer to the
802.11 packet header after stripping the WEP header on input
2003-11-17 19:12:52 +00:00
Sam Leffler
e585d188b0 on a beacon miss try to reassociate before starting a scan
Submitted by:	Henry Qian
2003-11-17 19:02:18 +00:00
Robert Watson
0b92da272c Add a MAC check for VOP_LOOKUP() in the Linux getwcd() implementation.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-17 18:57:20 +00:00
Alan Cox
0543fa5398 - Change the i386's sf_buf implementation so that it never allocates
more than one sf_buf for one vm_page.  To accomplish this, we add
   a global hash table mapping vm_pages to sf_bufs and a reference
   count to each sf_buf.  (This is similar to the patches for RELENG_4
   at http://www.cs.princeton.edu/~yruan/debox/.)

   For the uninitiated, an sf_buf is nothing more than a kernel virtual
   address that is used for temporary virtual-to-physical mappings by
   sendfile(2) and zero-copy sockets.  As such, there is no reason for
   one vm_page to have several sf_bufs mapping it.  In fact, using more
   than one sf_buf for a single vm_page increases the likelihood that
   sendfile(2) blocks, hurting throughput.
   (See http://www.cs.princeton.edu/~yruan/debox/.)
2003-11-17 18:22:24 +00:00
Peter Wemm
ef3c5c9015 Add SMP changes as should have been committed as rev 1.28 2003-11-17 09:19:12 +00:00
Peter Wemm
07cda73444 Restore file accidently killed in the crossfire from the smp commit. 2003-11-17 09:11:04 +00:00
Peter Wemm
0d2a298904 Initial landing of SMP support for FreeBSD/amd64.
- This is heavily derived from John Baldwin's apic/pci cleanup on i386.
- I have completely rewritten or drastically cleaned up some other parts.
  (in particular, bootstrap)
- This is still a WIP.  It seems that there are some highly bogus bioses
  on nVidia nForce3-150 boards.  I can't stress how broken these boards
  are.  I have a workaround in mind, but right now the Asus SK8N is broken.
  The Gigabyte K8NPro (nVidia based) is also mind-numbingly hosed.
- Most of my testing has been with SCHED_ULE.  SCHED_4BSD works.
- the apic and acpi components are 'standard'.
- If you have an nVidia nForce3-150 board, you are stuck with 'device
  atpic' in addition, because they somehow managed to forget to connect the
  8254 timer to the apic, even though its in the same silicon!  ARGH!
  This directly violates the ACPI spec.
2003-11-17 08:58:16 +00:00
Jeff Roberson
fa9c971710 - Mark ksq_assigned as volatile so that when this code is used without
sched_lock we can be sure that we'll pick up the new value.
2003-11-17 08:27:11 +00:00
Jeff Roberson
093c05e39d - Remove long dead code. rslices hasn't been used in some time and neither
has sched_pickcpu().
2003-11-17 08:24:14 +00:00
Hajimu UMEMOTO
e5f467a2e7 correct to look right interface. 2003-11-17 07:53:32 +00:00
Peter Wemm
0469a9ecfd Oh, how embarresing. I broke my own platform. :-) 2003-11-17 07:50:59 +00:00
Bruce Evans
c0952034c3 Tweaked the siointr1() so that it works better at 921600 bps, especially
with multiple ports on a shared interrupt demultiplexed by the puc_intr()
handler.

siointr1() first read as much input as possible and then checked all
possibly-relevant status registers, partly for robustness and partly
for historical reasons.  This is very bad if it is called for every
port sharing an interrupt like puc_intr() does.  It can spend too long
reading all the input for some ports when the interrupt is for a more
urgent event on another, or just too long checking all the status
registers when there are lots of ports.  The inter-character time is
too long for reading all the input even when the interrupt is for a
transmitter interrupt on the same port, and at 921600 bps the inter-char
time is 10.85 usec and was often exceeded with just 2 ports, leaving
the transmitters idle for about 6% of the time.

The tweak is to break out of the read loop after reading 1 char if
output can be done.  This avoids most of the idle transmitter time for
2 active ports at 921600 bps bidirectional on the test system.  It
also reduces overhead by about 20%.  More complete fixes use the
programmable tx low watermark on 16950's and reduce overhead by another
65%.
2003-11-17 07:21:19 +00:00
Peter Wemm
0bfbe7b935 Widen the enable/disable helper function's argument in line with the
ithread_create() changes etc.  This should be mostly a NOP.
2003-11-17 06:10:15 +00:00
Peter Wemm
90e3387e54 Expand the argument to the ithread enable/disable helper hooks from an
int to something big enough to hold a pointer.  amd64 needs this.
2003-11-17 06:08:10 +00:00
Warner Losh
62d768efe6 Ignore errors on ln. This is a quick fix for the make depend twice in
a row being broken.  A better filx will come as soon as I have time to
analyse things more deeply.
2003-11-17 05:21:18 +00:00
Bruce Evans
6a0d1abc5d Fixed pedantic warnings for statement-expressions using __extension__
and by not using a statement-expression for the non-expression
__PCPU_SET().
2003-11-17 04:40:58 +00:00
Warner Losh
c33df8b251 Copy ukbdmap.h rules from .i386.
# maybe this should be in files.

# This may fix sparc64 tinderbox.  I'll kinow in a few hours.
2003-11-17 04:38:14 +00:00
Bruce Evans
81bbee5996 Fixed a pedantic syntax error (a stray semicolon at the end of
PCPU_MD_FIELDS).
2003-11-17 03:40:41 +00:00
Brian Feldman
633461295a Fix a few cases where MT_TAG-type "fake mbufs" are created on the stack, but
do not have mh_nextpkt initialized.  Somtimes what's there is "1", and the
ip_input() code pukes trying to m_free() it, rendering divert sockets and
such broken.
This really underscores the need to get rid of MT_TAG.

Reviewed by:	rwatson
2003-11-17 03:17:49 +00:00
Bruce Evans
6d800f89c4 Fixed pedantic syntax errors. Many macros didn't permit a semicolon after
their invocation in the !KLD_MODULE case, but a semicolon is provided after
all invocations and is required in the KLD_MODULE case.
2003-11-17 02:55:25 +00:00
Bruce Evans
ed9800b4de Avoid a warning for compiling with `gcc -Wbad-function cast'. (This
is the warning that points to the bug in `(char *)malloc(...)' where
malloc() is implicitly declared as returning int.  We do similar things
here, but they work because u_int is the same as uintptr_t on i386's.)
2003-11-17 02:11:13 +00:00
Robert Watson
6afba1a91f Don't implement mpo_destroy() for Biba, LOMAC, and MLS, as they
aren't allowed to be unloaded.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-17 01:04:07 +00:00
Robert Watson
8accd36ef0 Update a comment about needing to fix NFS server credential use
by 5.0-RELEASE: make it now read 5.3-RELEASE to be realistic.  Still
needs fixing...
2003-11-17 00:56:53 +00:00
Alan Cox
0ec3db3072 - Remove unnecessary synchronization from sf_buf_init(). (There is only
one active CPU when sf_buf_init() is performed.)
2003-11-16 23:40:06 +00:00
Robert Watson
b0323ea3aa Implement sockets support for __mac_get_fd() and __mac_set_fd()
system calls, and prefer these calls over getsockopt()/setsockopt()
for ABI reasons.  When addressing UNIX domain sockets, these calls
retrieve and modify the socket label, not the label of the
rendezvous vnode.

- Create mac_copy_socket_label() entry point based on
  mac_copy_pipe_label() entry point, intended to copy the socket
  label into temporary storage that doesn't require a socket lock
  to be held (currently Giant).

- Implement mac_copy_socket_label() for various policies.

- Expose socket label allocation, free, internalize, externalize
  entry points as non-static from mac_net.c.

- Use mac_socket_label_set() in __mac_set_fd().

MAC-aware applications may now use mac_get_fd(), mac_set_fd(), and
mac_get_peer() to retrieve and set various socket labels without
directly invoking the getsockopt() interface.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 23:31:45 +00:00
Bruce Evans
b9c29fa9ae Don't waste so much space for the latency debugging buffer. Its size
will now need editing except for spot checks.

Changed this buffer from a circular one to a linear one.  This is more
useful for some cases and the sysctl that prints it doesn't support
circular buffers.

Fixed (output) formatting bugs in this sysctl.  An off by 1 error caused
a garbage byte to be returned after annotation of large deltas, and
a race with the writer sometimes caused premature string termination.
2003-11-16 23:05:52 +00:00
Warner Losh
10b4620bf0 Gross kludge:
o when compiling lint, undefine certain things and redefine them so that the
  driver doesn't #error out.  Since lint kernels aren't supposed to be
  bootable, I'm no troubled by this breakage.

This fixes the tinderbox

Suggested by: rwatson
Approved by: bms
2003-11-16 22:33:42 +00:00
Kris Kennaway
d5688560bf Fix build on alpha
Pointy hat to:	alfred
2003-11-16 21:53:05 +00:00
Robert Watson
920325ee1d Implement mac_get_peer(3) using getsockopt() with SOL_SOCKET and
SO_PEERLABEL.  This provides an interface to query the label of a
socket peer without embedding implementation details of mac_t in
the application.  Previously, sizeof(*mac_t) had to be specified
by an application when performing getsockopt().

Document mac_get_peer(3), and expand documentation of the other
mac_get(3) functions.  Note that it's possible to get EINVAL back
from mac_get_fd(3) when pointing it at an inappropriate object.

NOTE: mac_get_fd() and mac_set_fd() support for sockets will
follow shortly, so the documentation is slightly ahead of the
code.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 20:18:24 +00:00
Robert Watson
c9ea2dcf62 Abstract the label checking and setting logic from
mac_setsockopt_label() into mac_socket_label_set(); make it non-static
so that it can be invoked from kern_mac.c for mac_set_fd().

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 20:01:50 +00:00
Robert Watson
0196273b2d Implement mpo_copy_{mbuf,pipe,vnode}_label() entry points for
mac_stub and mac_test.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 18:28:58 +00:00
Robert Watson
9e71dd0feb Reduce gratuitous redundancy and length in function names:
mac_setsockopt_label_set() -> mac_setsockopt_label()
  mac_getsockopt_label_get() -> mac_getsockopt_label()
  mac_getsockopt_peerlabel_get() -> mac_getsockopt_peerlabel()

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 18:25:20 +00:00
Poul-Henning Kamp
5c391f4d6b When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.
While we end up the same place, we end up with two different CS register
values after the jump and 0xf000 is compatible with the hardware reset
value.

This makes a difference if the BIOS does a near jump before a far jump.

Detective work and patch by:	 Adrian Steinmann <ast@marabu.ch>
2003-11-16 18:24:23 +00:00
Maxim Sobolev
d09c47acd9 Pull latest changes from OpenBSD:
- improve sysinfo(2) syscall;
- add dummy fadvise64(2) syscall;
- add dummy *xattr(2) family of syscalls;
- add protos for the syscalls 222-225, 238-249 and 253-267;
- add exit_group(2) syscall, which is currently just wired to exit(2).

Obtained from:  OpenBSD
MFC after:      2 weeks
2003-11-16 15:07:10 +00:00
Bruce Evans
095ab45bde Restored the call to schedsofttty() (now spelled swi_sched(...)) again.
Its restoration in rev.1.102 was mistranslated to the equivalent of
setsofttty() in rev.1.105.  This increased overheads by causing a
context switch to the SWI handler after almost every interrupt.  The
increase was approx. 50% on a Celeron 366 (from 23 usec to 34 usec
per interrupt).
2003-11-16 13:31:45 +00:00
Shunsuke Akiyama
24ad0a6e4e Fix comment typo.
Noticed by:	simon
2003-11-16 13:13:16 +00:00
Andre Oppermann
be7e82e44a Make two casts correct for all types of 64bit platforms.
Explained by:	bde
2003-11-16 12:50:33 +00:00
Shunsuke Akiyama
565f53bbaa Make interrupt pipe interval time configurable.
- Add kernel options: {UPLCOM,UVSCOM}_INTR_INTERVAL
- Add sysctl variables: 'hw.usb.{uplcom,uvscom}.interval'

MFC after:	1 week
2003-11-16 12:26:10 +00:00
Shunsuke Akiyama
6702d85006 Apply some fixups in the driver_t's.
MFC after:	1 week
2003-11-16 12:13:39 +00:00
Shunsuke Akiyama
a6c22ecd4d Regen. 2003-11-16 12:07:01 +00:00
Shunsuke Akiyama
74745f66de Add vendor IDs, and device IDs supported by uplcom(4).
- SOURCENEXT Corp. KeikaiDenwa 8 [1]
- SOUECENEXT Corp. KeikaiDenwa 8 with charger [2]
- HAL Corp. Crossam2+USB [3]

Submitted by:	[1] Ryo ONODERA <ryo3327@netscape.net>
		[2] Masaki Mizutani <m-saki@rr.iij4u.or.jp>
		[3] FUJISHIMA Satsuki <sf@FreeBSD.org>
MFC after:	1 week
2003-11-16 12:05:11 +00:00
Shunsuke Akiyama
2fbe4b5149 Add missing ioctl functions.
MFC after:	1 week
2003-11-16 11:58:21 +00:00
Brian Feldman
75504450a1 As mentioned by warner, previous revision (opt_ddb.h) was just a fluke --
I'm having bad luck with different parts of the sys tree being checked
out at slightly different times.  Back it out, noting it doesn't cause
harm in any case.  Tinderbox also makes these things more fun.
2003-11-16 08:10:59 +00:00
Brian Feldman
5e36d52bef It appears opt_global.h may cause opt_ddb.h to be needed. Adding it
with the full path on the command line like with -include opt_global.h
currently unbreaks tinderbox.
2003-11-16 07:50:14 +00:00
Wes Peters
ec52df8eb9 Write the UFS2 superblock with a 'BAD' magic number at the beginning
of newfs, to signify the newfs operation has not yet completed.  Re-
write the superblock with the correct magic number once all of the
cylinder groups have been created to show the operation has finished.

Sponsored by:	St. Bernard Software
2003-11-16 07:08:27 +00:00
Alan Cox
e45db9b837 - Modify alpha's sf_buf implementation to use the direct virtual-to-
physical mapping.
 - Move the sf_buf API to its own header file; make struct sf_buf's
   definition machine dependent.  In this commit, we remove an
   unnecessary field from struct sf_buf on the alpha, amd64, and ia64.
   Ultimately, we may eliminate struct sf_buf on those architecures
   except as an opaque pointer that references a vm page.
2003-11-16 06:11:26 +00:00
Gordon Tetlow
78a53859a0 Bump version to indicate dynamically linked /bin and /sbin is the default. 2003-11-16 05:13:02 +00:00
Robert Watson
12cbb9dc56 When implementing getsockopt() for SO_LABEL and SO_PEERLABEL, make
sure to sooptcopyin() the (struct mac) so that the MAC Framework
knows which label types are being requested.  This fixes process
queries of socket labels.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-16 03:53:36 +00:00
Robert Watson
5d9d409ca9 Whitespace fix. 2003-11-16 03:17:30 +00:00
Warner Losh
6b1bb55958 Fix the building of null module. In the DIAGNOSTICS case, we include
opt_ddb.h.  These changes expand green's work of including
opt_global.h to prefer opt files in the kernel directory.  Further
refinement might be needed, but I think this is good.

Note: While this is a step on the path to moving the meta information
about modules into the config files, it doesn't actually do that.  It
just pulls in the opt files in a way that allows one to build
'generic' modules outside the tree.
2003-11-16 01:41:38 +00:00
Don Lewis
95c6cd2f4b Use "fip->fi_readers == 0 && fip->fi_writers == 0" as the condition for
disposing fifo resources in fifo_cleanup() instead using of
"vp->v_usecount == 1".  There may be other references to the vnode, for
instance by nullfs, at the time fifo_open() or fifo_close() is called,
which could cause a resource leak.

Don't bother grabbing the vnode interlock in fifo_cleanup() since it no
longer accesses v_usecount.
2003-11-16 01:11:11 +00:00
Bruce Evans
416ab90e6b Localized the cy driver's locking. 2003-11-16 00:55:54 +00:00
Warner Losh
e0ce91e18b Quick hack to make the nfsclient.ko loadable again. This brings in
the nfsv4 files.  It is intended to be a short-term bridge while
alfred deals with the problem in a better way (eg, don't hesitate to
back this out when the real fix comes along).  I've not heard back
from alfred in a few hours and other people are hitting this problem.

Approved by: markm, rwatson, grog, murray
2003-11-16 00:00:06 +00:00
Warner Losh
59d48b5f74 Remove the WITNESS debug code from _STOPEVENT. It has pointed out a
problem, but the spamage of consoles is really bad.  Until we can get
this to be less chatty, disable it so people can boot.  The badness of
the spamage is worse than the badness that it reports :-(.  Once the
underlying problems have been fixed, it can be reenabled.

Approved by: kken, markm, rwatson, grog, murray
2003-11-15 23:57:19 +00:00
Jeff Roberson
511a04e4f9 - Only allow pinning and unpinning of curthread. 2003-11-15 23:54:49 +00:00
Nate Lawson
6b74f9b7f5 Implement Cx CPU idle states and updated throttling support.
* Use the cpu_idle_hook() to do idling for C1-C3.
* Use both _CST and the FADT to detect Cx states.
* Use both _PTC and P_CNT for controlling throttling.
* Add a notify handler to detect changes in _CST and _PSS
* Call the _INI function for each processor if present.  This will be
  done by ACPI-CA in the future.
* Fix a bug on SMP systems where CPUs will attach multiple times if the
  bus is rescan.
* Document new sysctls for controlling idling.
2003-11-15 19:26:06 +00:00
Nate Lawson
b5049ddbf0 Add acpi_package.c with routines for validating packages and pulling
various data types from them.  This is loosely based on the acpi_cmbat
macros (by Mike Smith) and will eventually replace them.
2003-11-15 19:20:46 +00:00
Nate Lawson
dc75086936 Add acpi_bus_alloc_gas() for allocating a memory or IO resource from its
Generic Address Structure.
2003-11-15 19:18:29 +00:00
Nate Lawson
b72e9cf526 Add the pc_acpi_id PCPU member. The new acpi_cpu driver uses this to
dereference the softc.
2003-11-15 18:58:29 +00:00
Poul-Henning Kamp
b3ecca4d0a This is a crude bandaid for 5.2 to protect against providers which disappear
while being tasted.  I can moderately easy trigger this with atapi-cd, but
I do not fully understand the circumstances.
2003-11-15 18:44:43 +00:00
Poul-Henning Kamp
d87526cf43 Rename the debugging mutex "callout_no_sleep" to "dont_sleep_in_callout". 2003-11-15 18:33:54 +00:00
Andre Oppermann
df903fee84 Correct a cast to make it compile on 64bit platforms (noticed by tinderbox)
and remove two unneccessary variable initializations.
Make the introduction comment more clear with regard which parts of
the packet are touched.

Requested by:	luigi
2003-11-15 17:03:37 +00:00
Yoshihiro Takahashi
b860ed6360 opt_apic.h is not needed. 2003-11-15 12:37:15 +00:00
Yoshihiro Takahashi
bd25c916d5 MFi386: revisions from 1.1102 to 1.1105. 2003-11-15 12:33:39 +00:00
Yoshihiro Takahashi
1ac37683a8 MFi386: revision 1.201. 2003-11-15 12:31:02 +00:00
Yoshihiro Takahashi
a5a39deba2 MFi386: revision 1.13. 2003-11-15 12:25:47 +00:00
Tim J. Robbins
4d93f53e74 Initialize sequence numbers to 0 in seminit() instead of using whatever
garbage happens to be in memory. This did not seem to cause any problems
except making semaphore ID's unpredictable (and ugly in ipcs(1) output).
2003-11-15 11:56:53 +00:00
Bruce Evans
4d450ff944 Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the old
value as reserved for internal use in boot blocks, because RB_PAUSE
broke binary compatibility by usurping the RB_DUAL flag.  Probably no
one except me has boot blocks for which this matters, since most boot
blocks based on biosboot including pc98's boot2 can't boot elf kernels,
and /boot/loader doesn't properly pass flags set by the previous stage.

reboot.h:
Also mark the historical RB_PROBEKBD flag (0x80000) as reserved for
internal use in boot blocks.

boot2.c:
Added comments to inhibit usurping of other flags.

Approved by:	guido, imp
MFC after: 	1 week
2003-11-15 10:04:06 +00:00
Tim J. Robbins
167a9effa5 In vnode_pager_input_smlfs(), call VOP_STRATEGY instead of VOP_SPECSTRATEGY
on non-VCHR vnodes. This fixes a panic when reading data from files on a
filesystem with a small (less than a page) block size.

PR:		59271
Reviewed by:	alc
2003-11-15 09:54:11 +00:00
Poul-Henning Kamp
00cbe31bd8 Send B_PHYS out to pasture, it no longer serves any function. 2003-11-15 09:28:09 +00:00
Alan Cox
28c9416429 - Remove the remaining now unnecessary checks for the buf's b_object being
NULL.  See revision 1.421 for more detail.
 - Remove GIANT_REQUIRED from vfs_unbusy_pages().  Discussed with: jeff
2003-11-15 08:45:36 +00:00
Jeff Roberson
155b9987a3 - Introduce kseq_runq_{add,rem}() which are used to insert and remove
kses from the run queues.  Also, on SMP, we track the transferable
   count here.  Threads are transferable only as long as they are on the
   run queue.
 - Previously, we adjusted our load balancing based on the transferable count
   minus the number of actual cpus.  This was done to account for the threads
   which were likely to be running.  All of this logic is simpler now that
   transferable accounts for only those threads which can actually be taken.
   Updated various places in sched_add() and kseq_balance() to account for
   this.
 - Rename kseq_{add,rem} to kseq_load_{add,rem} to reflect what they're
   really doing.  The load is accounted for seperately from the runq because
   the load is accounted for even as the thread is running.
 - Fix a bug in sched_class() where we weren't properly using the PRI_BASE()
   version of the kg_pri_class.
 - Add a large comment that describes the impact of a seemingly simple
   conditional in sched_add().
 - Also in sched_add() check the transferable count and KSE_CAN_MIGRATE()
   prior to checking kseq_idle.  This reduces the frequency of access for
   kseq_idle which is a shared resource.
2003-11-15 07:32:07 +00:00
Hajimu UMEMOTO
fc8f306fc1 - m_cat() may free the mbuf on 2nd arg, so m_pkthdr manipulation has
to happen before the call to m_cat().
- correct signedness mixups.
- remove variable that is only assigned too but not referenced.

Obtained from:	KAME
2003-11-15 06:18:09 +00:00
Hajimu UMEMOTO
c36bc21aa3 oops, correct wrong change in previous commit. 2003-11-15 06:16:36 +00:00
Hajimu UMEMOTO
dd0495c9c3 increase AH_MAXSUMSIZE for hmac-sha2-512
Obtained from:	KAME
2003-11-15 06:02:09 +00:00
Hajimu UMEMOTO
bfcc4df579 preparation for 64bit sequence number.
Obtained from:	KAME
2003-11-15 05:41:41 +00:00
Hajimu UMEMOTO
c28ac7f842 fixed a bug comparing sav->key_auth and SADB_AALG_NONE.
Obtained from:	KAME
2003-11-15 05:37:13 +00:00
Alfred Perlstein
42233ecdc1 Move the declaration for "struct nfs4_fctx" out from under #ifdef KERNEL
for fstat(1).
2003-11-15 05:03:15 +00:00
Bruce Evans
45de6f5b25 Fixed some bugs in macros:
- missing parenthesization of some macro args
- point of do-while(0) hack defeated by putting a semicolon after while(0)

Fixed some style bugs in macros:
- not splitting the line when the macro value cannot be lined up in much
  the same macros that didn't parenthesize their args
- braces around a 1-line statement
- do-while(0) hack not indented in the usual way in the same macros that
  defeated its point.
2003-11-15 03:47:50 +00:00
Alfred Perlstein
ce98b952c4 Use %zu to printf a size_t instead of an int cast.
Requested by: jmallett, wollman
2003-11-15 01:58:47 +00:00
Andre Oppermann
c76ff7084f Make ipstealth global as we need it in ip_fastforward too. 2003-11-15 01:45:56 +00:00
Alfred Perlstein
e549a574c6 Fix compliation on sparc64.
Change arg from uint32_t to size_t to match prototypes.
2003-11-15 01:25:26 +00:00
Alfred Perlstein
d4346413c3 Fix compilation warnings on sparc.
Cast sizeof to int for printing with %d.
2003-11-15 01:24:46 +00:00
Alfred Perlstein
c3521a9fdc nfs4 client module.
Not hooked up to the build yet.
2003-11-15 01:02:00 +00:00
Alfred Perlstein
5ed904e503 unbreak LINT. 2003-11-15 00:26:42 +00:00
Robert Watson
1862cd57cf mac_relabel_cred() accepts two cred labels, not a cred label and a
vnode label; update assertion.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-15 00:26:02 +00:00
Bruce Evans
6fd222a011 Fixed some English errors in comments. 2003-11-14 23:58:01 +00:00
Bruce Evans
9644b98770 Moved $FreeBSD$ to the beginning of the file.
Improved wording in a nearby comment.
2003-11-14 23:09:38 +00:00
Peter Wemm
1f6c75db0b Preemptively burn a bridges. The isa timer code is likely to be
replaced by the HPET timer at some point, so dont even make a release
with the aquire/release_timer0 functions.
2003-11-14 22:34:43 +00:00
Peter Wemm
5333eee414 Minor source sync with amd64. Use int as the type for the width
field of %.*s rather than size_t.
2003-11-14 22:29:21 +00:00
Peter Wemm
ad641f0fd5 Minor source sync with amd64. For %.*s printf formats, pass in an
int rather than a size_t.  cast the ioapicaddress variable via
uintptr_t before going to void *.
2003-11-14 22:26:29 +00:00
Peter Wemm
7b66b81ee4 Convert a couple of pointers to integers for source compatability with
amd64.
2003-11-14 22:23:30 +00:00
Peter Wemm
40e3826a9f Whitespace nit (sorry, couldn't help it) 2003-11-14 22:21:30 +00:00
Andre Oppermann
02c1c7070e Remove the global one-level rtcache variable and associated
complex locking and rework ip_rtaddr() to do its own rtlookup.
Adopt all its callers to this and make ip_output() callable
with NULL rt pointer.

Reviewed by:	sam (mentor)
2003-11-14 21:48:57 +00:00
Tom Rhodes
9365176c26 Fix a typo in a comment: sysctl(1) should be sysctl(8). 2003-11-14 21:37:35 +00:00
John Baldwin
3d9644ef0b Improve support for extended IRQ resources:
- For acpi_pci_link_entry_dump(), add a few helper functions to display
  the trigger mode, polarity, and sharemode of an individual IRQ resource.
  These functions are then called for both regular and extended IRQ
  resources.
- In acpi_pci_link_set_irq(), use the same type of IRQ resource
  (regular vs. extended) for the new current resource as the type of
  the resources from _PRS.
- When routing an interrupt don't ignore extended IRQ resources.  Also,
  use the same type of IRQ resource (regular vs. extended) for the new
  current resource when as the type of the resource from _PRS.

Tested by:	peter
2003-11-14 21:36:09 +00:00
Bruce Evans
57f253a4c6 Reduced prequisites by only using MALLOC_DECLARE() if it is defined.
This fixes a dependency of mac_label.c on namespace pollution in
<vm/uma.h>.

Similarly for SYSCTL_DECL() although I had no problems with it.  This
probably makes some includes of <sys/sysctl.h> bogus.
2003-11-14 21:18:04 +00:00
John Baldwin
64bb257f0b Always install IDT entries for ATPIC interrupt sources. The APIC no
longer uses these interrupt vectors for its ISA interrupt pins, so these
entries will not be overwritten.  If we get a spurious interrupt from the
ATPIC when using the APIC, it will be treated as a stray interrupt instead
of causing a panic.
2003-11-14 21:02:49 +00:00