Commit Graph

41296 Commits

Author SHA1 Message Date
Alan Cox
0c1a133f56 Gulp ... call kmem_malloc() without Giant. 2003-07-26 03:55:32 +00:00
Peter Wemm
abe9725e8c Fix some recently introduced warnings. 'Declaration does not declare
anything' etc.
2003-07-26 03:47:56 +00:00
Peter Wemm
31a4d2f45a Turn -Werror back on again. I've tested with/without
invariants/witness/etc on i386, sparc64, amd64 and alpha for GENERIC.
Lint probably still needs fixing, as do a couple of other drivers
that have broken recently and not been noticed.
2003-07-26 03:46:39 +00:00
Peter Wemm
a92a214401 Change the inline limit switch to something that exists in gcc-3.2.
Unfortunately, it has different units.
2003-07-26 02:27:50 +00:00
Tim J. Robbins
c8db6734e0 Revise and improve ntfs_subr.c 1.30: read only a single cluster at a time
in ntfs_writentvattr_plain and ntfs_readntvattr_plain, and purge the boot
block from the buffer cache if isn't exactly one cluster long. These two
changes work around the same buffer cache bug that ntfs_subr.c 1.30 tried
to, but in a different way. This may decrease throughput by reading smaller
amounts of data from the disk at a time, but may increase it by avoiding
bogus writes of clean buffers.
Problem (re)reported by Karel J. Bosschaart on -current.
2003-07-26 02:21:49 +00:00
Marcel Moolenaar
938b878e45 Revert previous commit. We don't use setjmp()/longjmp() for context
switching anymore, so there's no need to save and restore GP. This
change breaks threaded applications linked against libc_r. Pull the
tier 2 card again: relink. This will link against libthr instead.
2003-07-25 22:36:48 +00:00
Alan Cox
18e8d4e79c revision 1.51 of vm/uma_core.c modified uma_large_malloc() to acquire
Giant when needed.
2003-07-25 22:26:43 +00:00
David E. O'Brien
56ae44c5df Use __FBSDID().
Brought to you by:	a boring talk at Ottawa Linux Symposium
2003-07-25 21:19:19 +00:00
David E. O'Brien
12ea2cfe2e Use __FBSDID().
Brought to you by:	a boring talk at OLS
2003-07-25 21:10:19 +00:00
Maxime Henrion
b9ff8db1be Add support for the M_ZERO flag to contigmalloc().
Reviewed by:	jeff
2003-07-25 21:02:25 +00:00
Bill Paul
0304f1c01e Remove alpha vtophys() hack from if_bgereg.h and clean up unneeded
#includes formerly required to pull in vtophys support, since we
don't need them anymore.
2003-07-25 20:33:43 +00:00
Bill Paul
f41ac2be93 Convert bge(4) to use busdma. I have not tested this on anything
besides x86 yet since I don't have access to a non-x86 FreeBSD
box at the moment. Volunteers welcome.
2003-07-25 19:42:44 +00:00
Alan Cox
059358675e MFi386 revision 1.416
Add vm object locking to pmap_prefault().

Note: powerpc and sparc64 do not implement this function.
2003-07-25 18:58:39 +00:00
Garance A Drosehn
a564e4a923 Discussions on src-committers with alfred and bde pointed out that
the "do-nothing" versions of __RCSID(), __RCSID_SOURCE(), __SCCSID(),
and __COPYRIGHT() were not strictly correct.  They should not expand
into [nothing], because the ';' which follows them would then cause
a syntax error (in a strict C compiler, if not gcc...).

So, change the do-nothing versions of those macros to use the
'struct __hack' tactic, as was already used with __FBSDID().

Approved by:	discussions with bde
MFC after:	1 week
2003-07-25 18:40:36 +00:00
Nate Lawson
44904c4020 Add an informational debugging printf of the maximum time spent in
EcEventWait().  If you get AE_HARDWARE_NO_RESPONSE errors, please enable
this info by setting hw.acpi.verbose=1 in loader.conf.
2003-07-25 16:49:46 +00:00
Bruce Evans
4066649d5a Backed out the micro-optimization in 1.4. It was to help gcc-2.6.3
on i486's (and probably i386's), but it has had very little effect
since gcc-2.7 or gcc-2.95.  With gcc-3.3, it gave a small
pessimization for at least i386's, athlon-xp's and pentium4's, a
small optimization (I think) for pentium1's, and made no difference
for i386's.  (movzbl is best for all the later processors, and the
micro-optimization was to stop it being used on i486's.)
2003-07-25 15:54:23 +00:00
Hartmut Brandt
a327640a9e Print the offending SPANS message only if printing is enabled. 2003-07-25 12:32:08 +00:00
Maxim Konovalov
853af3f3f0 o Do not overwrite saved interrupt priority level by alloc_hash(),
use a separate variable.
o Restore interrupt priority level before return (no-op in HEAD).

Spotted by:	Don Bowman <don@sandvine.com>
MFC after:	5 days
2003-07-25 09:59:16 +00:00
Hartmut Brandt
ebcdc0a12e Add support for VBR and CBR PVCs for IP over ATM.
Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 weeks
2003-07-25 08:35:26 +00:00
Marcel Moolenaar
c1e97bb458 Remove __aligned(16) from the definition of struct _ia64_fpreg. It's
a non-standard construct. Instead, redefine struct _ia64_fpreg as a
union and put a long double in it. On ia64 and for LP64, this is
defined by the ABI to have 16-byte alignment. For ILP32 a long double
has 4-byte alignment, but we don't support ILP32.

Note that the in-memory image of a long double does not match the in-
memory image of spilled FP registers. This means that one cannot use
the fpr_flt field to interpet the bits. For this reason we continue
to use an aggregate type.
2003-07-25 08:02:24 +00:00
Marcel Moolenaar
cd7e5d6eb4 Remove INVARIANT* and WITNESS. This makes the simulator much more
pleasant to use.
2003-07-25 07:52:20 +00:00
Hartmut Brandt
69ba39416a Set the interface type of the network interfaces to IFT_IPOVERATM(114).
This is specified by RFC2320.
2003-07-25 07:16:28 +00:00
Hartmut Brandt
9b18b1f47d Hand the packet to bpf not only in the LLC/SNAP case, but for all
connections. While this confuses tcpdump, it enables other applications
to see and analyze non-IP traffic (signalling, for example).

Pointed out by:	Vincent Jardin <vjardin@wanadoo.fr>
2003-07-25 06:43:41 +00:00
Hartmut Brandt
6c373d607e Make the debugging variable that controls printing of UNI messages
accessible as a sysctl and move the debugging stuff out of DIAGNOSTICS.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 weeks
2003-07-25 06:39:46 +00:00
Marcel Moolenaar
076f523998 Move ia64_pa_access() from machdep.c to mem.c and declare it static.
It's only used in mem.c and cannot accidentally be used elsewhere
this way.
2003-07-25 05:37:13 +00:00
David Xu
74bbb26b51 Align upcall stack top to odd times of 8. GCC accounts return address
in callee function for stack alignment.
2003-07-25 00:21:37 +00:00
Marcel Moolenaar
c5262d75ed Disable the single-step trap on a debug related trap, including of
course the single-step trap itself.
2003-07-25 00:11:14 +00:00
Mike Makonnen
a6ca48085c The POSIX spec also requires that kern_sigtimedwait return
EINVAL if tv_nsec of the timeout is less than zero.
2003-07-24 17:07:17 +00:00
Hartmut Brandt
80366b6d6a Make the debugging variable that controls dumping of IP over ATM packets
accessible as a sysctl.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 weeks
2003-07-24 15:25:17 +00:00
Hartmut Brandt
5d53a37cb4 Create a sysctl that allows to enable/disable printing of SPANS messages.
While here delete to sys/types.h includes when sys/param.h is also included.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 weeks
2003-07-24 14:37:01 +00:00
Hartmut Brandt
892e9c9b57 Free the UNI vcc to the same zone from where it was allocated from.
This resulted in a panic when detaching the uni31 signalling manager.
2003-07-24 12:24:41 +00:00
Hartmut Brandt
fb4304eca0 Now that we have if_detach() don't try to get rid of all the interface
stuff (routes, ...) by hand - simply use if_detach().

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 week
2003-07-24 11:17:36 +00:00
Hartmut Brandt
ca4125f7b3 Create a subtree 'harp' of the net sysctl tree. This uses a fixed
OID as the other protocol family sub-trees do, that is equal to the
protocol family identifier. Make the ATM layer debugging flags
available under this tree.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 weeks
2003-07-24 10:33:01 +00:00
Hartmut Brandt
56acf6178a Constify the arguments to several pdu_print functions. 2003-07-24 09:13:03 +00:00
David Xu
c3f8e34d6b Implement cpu_set_upcall and cpu_set_upcall_kse.
Reviewed by: peter
2003-07-24 08:52:44 +00:00
David Xu
81ebc68226 Set fault address to si_addr.
Reviewed by: peter
2003-07-24 08:51:22 +00:00
Hartmut Brandt
5be9a825e2 Add BPF support to HARP network interfaces. This allows one to see
the traffic on LLC multiplexed connections (like CLIP).

PR:		kern/51831
Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 weeks
2003-07-24 08:15:20 +00:00
Marcel Moolenaar
e180afe760 Implement casuptr(). 2003-07-24 07:49:45 +00:00
Marcel Moolenaar
8af2fbd6fb In get_mcontext() and set_mcontext() save and restore the current
thread pointer.
2003-07-24 07:48:11 +00:00
Marcel Moolenaar
c8baa23e56 Implement alpha_pal_wrunique() and alpha_pal_rdunique(). Both are
used to set and get the thread pointer. Note that a context switch
will automaticly save and restore the thread pointer.
2003-07-24 07:41:08 +00:00
Marcel Moolenaar
286cc49014 Use a spare for the thread pointer (mc_thrptr). The thread pointer
is only read and written by set_mcontext() and get_mcontext() for
use by threading libraries.
2003-07-24 07:34:31 +00:00
Peter Wemm
7d6207b7dd size_t != int. Make this compile on 64 bit platforms (eg: amd64).
Also, "u_short value; if (value > 0xffff)" can never be true.
2003-07-24 01:59:18 +00:00
Peter Wemm
9e9e575b6a Make the breakpoint instruction trap gate available to users.
ptrace() needs this.

Submitted by:	Mark Kettenis <kettenis@chello.nl>
2003-07-23 23:20:20 +00:00
Peter Wemm
8b48b40d5e Set the %gs base to pcb_gsbase, not pcb_fsbase. Oops.
Discovered by:	davidxu
2003-07-23 23:17:15 +00:00
Peter Wemm
07f9d83887 Turn -Werror back off again. Leaving out the invariants options causes
more trouble than I expected.
2003-07-23 22:02:30 +00:00
Peter Wemm
80611144e4 Initialize 'blocked' to NULL. I think this was a real problem, but I
am not sure about that.  The lack of -Werror and the inline noise hid
this for a while.
2003-07-23 20:29:13 +00:00
Poul-Henning Kamp
8b30546120 Stop GCC from whining when people use a 16 bit port number for inb() and outb() 2003-07-23 20:28:23 +00:00
Peter Wemm
05952f3565 Turn -Werror back on. 2003-07-23 20:10:09 +00:00
Peter Wemm
5ea5a01983 ARGH. I *knew* I'd eventually accidently commit this. Change 5.1-XP back
to 5.1-CURRENT.
2003-07-23 20:07:49 +00:00
Peter Wemm
2a51529f7e Provide a knob for raising the inline instruction estimate threshold and
set an initial value.  This is aimed at getting us closer to being able to
turn -Werror back on and we can adjust the settings later on.  Yes, we
could turn off -Wno-inline instead, but that would hide the effect of
gcc's bogo-estimator ignoring inline (either rightly or wrongly).
2003-07-23 20:03:42 +00:00
Alan Cox
3462150083 Annotate pmap_changebit() as __always_inline. This function was
written as a template that when inlined is specialized for the caller
through constant value propagation and dead code elimination.  Thus,
the specialized code that is generated for pmap_clear_reference() et
al. avoids several conditional branches inside of a loop.
2003-07-23 19:49:32 +00:00
John Baldwin
e47d4f0fc2 Use macros from apic.h to when writing to the ICR to send IPIs to startup
APs rather than magic numbers.

Tested by:	scottl
2003-07-23 19:04:28 +00:00
John Baldwin
55fb372edd Add a new macro APIC_ICRLO_RESV_MASK that contains all of the reserved
fields in the low 32 bits of the local APIC ICR register.  Use this macro
in place of APIC_RESV2_MASK when masking off existing bits from the ICR
when writing to it to send an IPI.

Tested by:	scottl
2003-07-23 18:59:38 +00:00
Poul-Henning Kamp
46eb2dfce9 Undo single-intance inlining which is way above the comfort limit for GCC. 2003-07-23 18:03:22 +00:00
Poul-Henning Kamp
b67a8a2c5e Undo agressive inlining which GCC previously wisely ignored.
The this eliminates 67% of the text segment (relative to respected
inline requests).
2003-07-23 17:58:41 +00:00
Hartmut Brandt
3a1646de2a Handle the new MEDIA definitions. 2003-07-23 15:04:31 +00:00
Hartmut Brandt
06055f52f3 Convert a lot of uma_zalloc() calls to be NOWAIT instead of WAITOK. All
these may be called from contexts where we cannot sleep (callout handlers
for example).
2003-07-23 14:28:57 +00:00
Hartmut Brandt
e717cfbc40 Get rid of the zone for network interfaces. We have converted this to
use malloc(9).
2003-07-23 14:25:53 +00:00
Yoshihiro Takahashi
064cecd480 MFi386: revision 1.1090. 2003-07-23 12:09:14 +00:00
Peter Wemm
461d4da338 Remove _ARCH_INDIRECT, it was the glue to enable having both hardware
and software versions of the floating point code in libm.  The runtime
selection was done by reading the hw.floatingpoint sysctl via
__get_hw_float().
2003-07-23 04:28:51 +00:00
Marcel Moolenaar
793e17ba11 We sloppily created an array for the high FP registers (f32-f127),
but this just created a weird inconsistency when porting gdb(1).
Instead, we name each high FP register seperately, like we do for
all the other registers.
2003-07-23 03:08:34 +00:00
Peter Wemm
a33f5caff3 Attempt to preempt any new gcc-ism references to
__attribute__((__always_inline__)) by adding an __always_inline macro
(used like __dead2 etc).  __inline_damnit has also been suggested but we
have a precedent of keeping the names similar so they are easier to find.
2003-07-22 23:50:32 +00:00
Warner Losh
bf633cafdf There is strong reason to believe that gcc 4 will also support
__attribute__((__nonnull__(x)), assume it so.
2003-07-22 23:14:32 +00:00
Poul-Henning Kamp
a5edd34afe Remove all but one of the inlines here, this reduces the code size by
2032 bytes and has no measurable impact on performance.
2003-07-22 20:54:26 +00:00
Sam Leffler
1f76a5e218 add IPSEC_FILTERGIF suport for FAST_IPSEC
PR:		kern/51922
Submitted by:	Eric Masson <e-masson@kisoft-services.com>
MFC after:	1 week
2003-07-22 18:58:34 +00:00
Maxime Henrion
28935f2753 De-inline some functions. It doesn't gain us anything and bloats
code size by 3616 bytes.  Furthemore, it was previously ignored by GCC.

While I'm at it, fix some bogus comments.
2003-07-22 15:50:54 +00:00
Hartmut Brandt
05ab0ba3b5 Allocate network interfaces from malloc() instead of using a zone.
Usually one needs only a couple of them so using a zone is waste
of memory (esp. on multi-cpu systems).
2003-07-22 15:11:08 +00:00
Hartmut Brandt
b92ba02261 Remove the zone limits for all the zones used in the ATM code.
These were a left over from when the private memory pools were
converted to use uma zones. The limit of UMA zones, however,
works differently. When a zone is limited to only one or two pages
than, on multi-cpu systems, processes can get stuck on the zonelimit,
because all remaining free items are in caches of other CPUs.

Also add rudimentary error handling in some places (panic) when a zone
cannot be created.
2003-07-22 12:46:30 +00:00
Bernd Walter
77bf7b3bc0 EISA_SLOTS is mandantory to get opt_eisa.h
Put it into MI files.
2003-07-22 11:42:45 +00:00
Bernd Walter
c4aebdb06c relocate eisa into MI files.
Suggested by:	jhb
2003-07-22 11:41:15 +00:00
Poul-Henning Kamp
68f2d20b70 Revert stuff which accidentally ended up in the previous commit. 2003-07-22 10:36:36 +00:00
Poul-Henning Kamp
55d1d7034f Don't attempt to inline large functions mb_alloc() and mb_free(),
it more than doubles the text size of this file.

GCC has wisely ignored us on this previously
2003-07-22 10:24:41 +00:00
Poul-Henning Kamp
60512ca0d2 Move inlined function ie_ack() up to before first use. 2003-07-22 09:35:45 +00:00
Poul-Henning Kamp
b4ae478044 Don't inline very large functions.
Gcc has silently not been doing this for a long time.
2003-07-22 09:27:58 +00:00
Poul-Henning Kamp
2da1191964 Don't inline ridiculously very large functions.
Compared to the contents of these functions, an extra function call
is nano-peanuts.
2003-07-22 09:22:00 +00:00
Poul-Henning Kamp
a018375a89 Don't complain about inlines for genassym 2003-07-22 09:02:21 +00:00
Hartmut Brandt
2d758d909a When padding an mbuf chain to have a length that is a multiple
of 48 bytes for AAL0, we also need to update the packet header.

Spotted by: Anil Madhavapeddy <anil@recoil.org>
2003-07-22 08:20:09 +00:00
Peter Wemm
a35b33869d Initiate de-orbit burn for fpu-less operation. 386+387 is still
theoretically supportable, but you'd really be happier with FreeBSD 2.1.8
on it.
2003-07-22 08:11:17 +00:00
Peter Wemm
899c48a1cb Fix a 64 bit bug lost in the inline warning noise. sizeof is not always
an int.  Do not printf() it as though it were.
2003-07-22 06:58:04 +00:00
Peter Wemm
da5fd14534 swp_pager_hash() was called before it was instantiated inline. This made
gcc (quite rightly) unhappy.  Move it earlier.
2003-07-22 06:55:48 +00:00
Peter Wemm
5b9f8ddbbd Go back to 64 bit precision for fadd/fsub/fsqrt etc. This is because on
AMD64, gcc (and the ABI) expects the x87 unit to be running in 80/64
mode (not 64/53) so that it can use it for 'long double' operations.  It
takes the expected precision differences into account when generating
code.
2003-07-22 06:50:34 +00:00
Peter Wemm
76537e43f5 Extend the machine/ieeefp.h that was inherited from i386 to support
the SSE mxcsr register as well.  Since gcc will intermix SSE2 and x87
FP code, the fpsetround() etc mode had better be the same.

There are hooks to enable these inlines to be instantiated inside libc
for non-gcc or C++ callers. (g++ doesn't like the inlines that tried
to extract an integer and convert it to an enum).
2003-07-22 06:44:54 +00:00
Hartmut Brandt
3a6052bb2a Add several vendor, API and media definitions. This has been
forgotten in the previous commit to harp and should unbreak world.
2003-07-22 06:31:13 +00:00
Poul-Henning Kamp
4f0f6d8092 Remove __nonnull() on the second argument of strto[u]l() which I used
to test that the warning actually was emitted.

Spotted by:	scottl
2003-07-22 06:01:11 +00:00
Olivier Houchard
2722485b08 Erm, my previous commit was wrong and sis_tick() was only called each time
sis_ioctl() was called, so one had to use ifconfig each time the cable got
plugged in to be able to use the connection.
Do it a better way now, add a "in_tick" field in the softc structure,
call timeout() in sis_tick() and don't call it in sis_init() if in_tick is
non-zero.
Reported by:    Landmark Networks
Pointy hat to:  cognet
2003-07-22 01:35:09 +00:00
Mike Silbersack
1af801930b Fix apparent typo in previous commit. 2003-07-22 00:17:11 +00:00
Sam Leffler
6e1ca44727 o Add monitor mode support. This tested fine with prism cards but may require
newer lucent/hermes firmware than indicated (investigating).  I'm committing
  this now since it shouldn't hurt anything.
o Vaguely related, add bogus frame length check from netbsd.

Obtained from:	netbsd
2003-07-21 23:20:40 +00:00
Sam Leffler
721efab91e add safe driver until we can verify it as machine-independent 2003-07-21 21:51:24 +00:00
Sam Leffler
fc66b6e994 safenet driver config glue
Sponsored by:   Global Technology Associates, Inc.
2003-07-21 21:50:41 +00:00
Sam Leffler
35ba56eca3 hook safe driver to the build 2003-07-21 21:48:45 +00:00
Sam Leffler
b55b9b34ba SafeNet crypto driver
Sponsored by:	Global Technology Associates, Inc.
MFC after:	1 day
2003-07-21 21:47:47 +00:00
Sam Leffler
b7e3f244f8 SafeNet crypto driver (supports only RNG and symmetric ops; no PK support yet)
Sponsored by:	Global Technology Associates, Inc.
MFC after:	1 day
2003-07-21 21:46:07 +00:00
Peter Wemm
5d2fc474c5 Commit Ian Dowse's workaround for acpi resume resetting after the
LAZY_SWITCH changes.  He pointed out the acpi code sets up an identity
mapping in the current vmspace and that got messed up by the %cr3 being
out of sync with the current page directory.  As a workaround, restore
%cr3 across the sleep/resume.  A more complete fix would be to undo the
lazy state and clear the pm_active bit from the borrowed pmap, but this
works and people are currently hurting.  I'll clean this up.
This is mostly Ian's patch, plus a PAE tweak from me.
2003-07-21 20:59:27 +00:00
Bernd Walter
b7c901eba2 Enable eisa support on alpha.
We need eisa bridge support on some models, which now depends on having
eisa in the kernel.
2003-07-21 19:15:25 +00:00
Poul-Henning Kamp
622905a855 Add a new macro __nonnull(x) to use the new GCC33 attribute which checks
that an argument is not a NULL pointer.

Apply various obvious places.

I belive __printf*() implies __nonnull() so it is not needed on functions
already tagged that way.
2003-07-21 18:35:51 +00:00
Hartmut Brandt
58aa55efa5 This is a pseudo physical interface for the HARP ATM stack. When loaded
it attaches to all existing NATM network interfaces in the system
and creates a HARP physical interface for each of them. This allows
us to use the same set of ATM drivers for all ATM stuff. It is
possible to use the same interface for HARP, NATM and netgraph at the
same time.
2003-07-21 13:56:22 +00:00
Yoshihiro Takahashi
720cdc05bb Use the clear function provided by the video adapter driver.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2003-07-21 13:04:54 +00:00
Yoshihiro Takahashi
6b6ee1e771 Supported the gdc_clear function.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2003-07-21 13:00:09 +00:00
Sam Leffler
2bbe529d9c add monitor mode 2003-07-21 02:49:42 +00:00
John-Mark Gurney
9e17948f72 override the tag. usb_block_allocmem allocates a new tag, which when we
go looking for free fragments won't match.  Since we never free this, we
can "throw away" the tag.  This is very dirty, and needs to be reimplemented
properly, but fixes performance problems with uhci.

Also assert that when we overlay a structure on some space, that the
space is large enough for the structure.
2003-07-21 02:41:01 +00:00
David Xu
432b45de08 Always deliver synchronous signal to UTS for SA threads. 2003-07-21 00:26:52 +00:00
Sam Leffler
45bbf62fb5 track changes to 802.11 code:
o override new_state method per new model
o use ieee80211_state_name instead of private copy
2003-07-20 21:38:20 +00:00
Sam Leffler
a11c9a5cc2 o change ieee80211_new_state handling to use a proper method that drivers
override in their sub-class; this eliminates the hack of interpreting the
  EINPROGRESS return value to mean "don't do any of the normal work"
o correct active scanning so the first channel is only scanned once and so
  per-channel passive mode is properly honored
o expose 802.11 FSM state names so every driver doesn't keep a private copy
o eliminate node parameter to ieee80211_begin_scan; it was not being used
2003-07-20 21:36:08 +00:00
Nate Lawson
c72508e283 Do not call acpi_MatchHid() for all probe cases since it accesses the
namespace.  To compensate for it only being used in the !ECDT case, use
a more robust approach to indicate a device was probed via ECDT by setting
the private ivar to be &acpi_ec_devclass.  Without the acpi_MatchHid() call
now, it might have been possible for a non-EC device to have had its magic
match our previous flag.

Pointed out by:		takawata
2003-07-20 21:12:21 +00:00
Nate Lawson
3a371f32b3 Close a race condition by passing status retrieved via a non-SCI call
to EcGpeQueryHandler on to any waiting threads through the softc.  Similar
behavior was in the original version.

Also:
* Merge EcQuery into EcGpeQueryHandler to simplify locking
* Hold EcLock from the initial read of the CSR down to the wakeup or
  until after the query command has been processed.
* ec_gpebit only needs to be a UINT8
2003-07-20 21:11:32 +00:00
Nate Lawson
e1a90ae12f Clarify the ACPI shutdown messages. 2003-07-20 00:52:57 +00:00
Nate Lawson
f8335e3a97 Add ECDT (ACPI 2.0) support. This allows the EC to be enabled before the
namespace has been evaluated.  Machines with ACPI 2.0 expect this behavior
and have AML which calls EC functions early in the boot process.  If the
ECDT is not available, fall back to original probe behavior.

Other minor changes:
* Add GPE bit and GLK usage to the device announcement
* Always use the global lock in the ECDT case, but potentially downgrade to
  not using it if _GLK is 0 once the namespace is available.  This is
  announced with "Changing GLK from 1 to 0"
* Remove the acpi_object_list definitions which were earlier deprecated

Ideas from:	takawata
2003-07-20 00:48:38 +00:00
Hajimu UMEMOTO
89eaef50bb Disabling multicast on vlan interface caused kernel panic.
PR:		kern/40723
Submitted by:	Hideki ONO <ono@kame.net>
MFC after:	1 week
2003-07-19 16:47:16 +00:00
Mike Makonnen
6022ec6737 Turn a KASSERT back into an EINVAL return value. So, next time someone
comes across it, it will turn into a core dump in userland instead of
a kernel panic. I had also inverted the sense of the test, so

Double pointy hat to:	mtm
2003-07-19 11:32:48 +00:00
Mike Silbersack
f8bf8e397b Three fixes:
- Make m_prepend use m_gethdr instead of m_get where
  appropriate

- Make m_copym use m_gethdr instead of m_get where
  appropriate

- Add a call to m_fixhdr in m_defrag; m_defrag can't
  deal with corrupted pkthdr.len counts.

MFC after:	3 days
2003-07-19 06:03:48 +00:00
Warner Losh
4c16d09eda Add support for FA-511; Submitted by: Kenneth P. Stox; Pr 42858 2003-07-19 06:01:15 +00:00
Warner Losh
f90eb14ba9 Add Addtron AWA-100 wireless PCI card
Submitted by: Robin Reagan
Pr: 37526
2003-07-19 05:53:57 +00:00
Warner Losh
9b92f5db40 Add Linksys WCF12: from Scott Lambert 2003-07-19 05:51:44 +00:00
Warner Losh
1bcb21f7d3 Sync to 1.60 2003-07-19 05:51:10 +00:00
Mike Silbersack
7dc7f0311e Minor fix to the MBUF_STRESS_TEST code so that it keeps
pkthdr.len consistant at all times.  (Some debugging
code I'm working on is tripped otherwise.)

MFC after:	3 days
2003-07-19 05:50:32 +00:00
Warner Losh
e220f38474 Add Linksys compact flash wireless card
Submitted by: Scott Lambert
PR: 53881
2003-07-19 05:49:17 +00:00
Warner Losh
58a67e33be Add support for BUFFALO LPC3-CLX 10/100Base-T PC-Card
PR: 47786
Submitted by: IHA, genta -san
2003-07-19 05:36:09 +00:00
Warner Losh
0cfad826da sync to 1.59 2003-07-19 05:33:54 +00:00
Warner Losh
547b34290b Add Buffalo LPC3_CLX.
PR: 47786
Submitted by: IHA, genta -san
2003-07-19 05:32:07 +00:00
Jeffrey Hsu
1ebe998675 Add mutex for routing entries.
Reviewed by:	bmilekic, silby
2003-07-19 00:21:13 +00:00
Bill Paul
191926e10e Fix a busdma bogon:
Some of the calls to bus_dmamap_sync() were syncing the DMA descriptor
ring maps using the mbuf tag, when they should have been using the
descriptor ring tag instead.
2003-07-18 22:11:47 +00:00
Poul-Henning Kamp
85fdafb98d Fix a printf format warning I introduced.
Use the macro max number of swap devices rather than cache the constant
in a variable.
Avoid a (now) pointless variable.
2003-07-18 22:11:17 +00:00
Mike Makonnen
5c6edbec80 Remove a lock held across casuptr() that snuck in last commit. 2003-07-18 21:26:45 +00:00
Mike Makonnen
7df7f5c5ab Move the decision on whether to unset the contested
bit or not from lock to unlock time.

Suggested by:	jhb
2003-07-18 17:58:37 +00:00
Hartmut Brandt
084fb28576 Fix a number of occurences of calling uma_zalloc() with neither
M_WAITOK nor M_NOWAIT.
2003-07-18 16:36:41 +00:00
Thomas Quinot
95f4c5d29d Reference PR for IntelligentStick quirk entry.
PR:		kern/53005
2003-07-18 16:26:36 +00:00
Robert Watson
83503a9227 Add a comment above rip_ctloutput() documenting that the privilege
check for raw IP system management operations is often (although
not always) implicit due to the namespacing of raw IP sockets.  I.e.,
you have to have privilege to get a raw IP socket, so much of the
management code sitting on raw IP sockets assumes that any requests
on the socket should be granted privilege.

Obtained from:	TrustedBSD Project
Product of:	France
2003-07-18 16:10:36 +00:00
Hartmut Brandt
8522511b2a When INVARIANTS is defined make sure that uma_zalloc_arg (and hence
uma_zalloc) is called with exactly one of either M_WAITOK or M_NOWAIT and
that it is called with neither M_TRYWAIT or M_DONTWAIT. Print a warning
if anything is wrong. Default to M_WAITOK of no flag is given. This is the
same test as in malloc(9).
2003-07-18 16:04:36 +00:00
Hidetoshi Shimokawa
9547314f7c Clean up include files. 2003-07-18 14:31:16 +00:00
Tim J. Robbins
248222fb15 Remove extern declaration of ps_showallprocs. The definition is already gone.
PR:		54604
Submitted by:	Pawel Jakub Dawidek
2003-07-18 13:51:15 +00:00
Poul-Henning Kamp
d3dd89ab11 If a proposed swap device exceeds the 8G artificial limit which out
radix-tree code imposes, truncate the device instead of rejecting it.
2003-07-18 11:01:23 +00:00
Poul-Henning Kamp
ec38b344cb Move the implementation of the vmspace_swap_count() (used only in
the "toss the largest process" emergency handling) from vm_map.c to
swap_pager.c.

The quantity calculated depends strongly on the internals of the
swap_pager and by moving it, we no longer need to expose the
internal metrics of the swap_pager to the world.
2003-07-18 10:47:58 +00:00
Poul-Henning Kamp
567104a148 Add a new function swap_pager_status() which reports the total size of the
paging space and how much of it is in use (in pages).

Use this interface from the Linuxolator instead of groping around in the
internals of the swap_pager.
2003-07-18 10:26:09 +00:00
Poul-Henning Kamp
e9c0cc157b Merge swap_pager.c and vm_swap.c into swap_pager.c, the separation
is not natural and needlessly exposes a lot of dirty laundry.

Move private interfaces between the two from swap_pager.h to swap_pager.c
and staticize as much as possible.

No functional change.
2003-07-18 10:02:44 +00:00
Hartmut Brandt
e805a9b9f9 Correct the device identifiers for the ProATM cards. 2003-07-18 08:40:45 +00:00
Hidetoshi Shimokawa
086a638ef6 Add some debug messages. 2003-07-18 05:28:30 +00:00
Robert Drehmel
fcaec66af7 Make the 80x60, 132x25, 132x43, 132x50, and 132x60 VESA text modes
work when using a graphics chipset which identifies itself as
`VIA CLE266', used in some VIA EPIA boards.  Two values need to be
patched in the VESA mode information structure: the widths of the modes
mentioned above are encoded in a format which was unknown to the VESA
module (and to my copy of the VBE spec.) whereas the window memory
segment values seem to be just incorrect.

I tested this on a VIA EPIA-M9000 and -M10000.
2003-07-18 00:06:10 +00:00
Robert Drehmel
4e19fe1081 To avoid a kernel panic provoked by a NULL pointer dereference,
do not clear the `sb_sel' member of the sockbuf structure
while invalidating the receive sockbuf in sorflush(), called
from soshutdown().

The panic was reproduceable from user land by attaching a knote
with EVFILT_READ filters to a socket, disabling further reads
from it using shutdown(2), and then closing it.  knote_remove()
was called to remove all knotes from the socket file descriptor
by detaching each using its associated filterops' detach call-
back function, sordetach() in this case, which tried to remove
itself from the invalidated sockbuf's klist (sb_sel.si_note).

PR:	kern/54331
2003-07-17 23:49:10 +00:00
Jake Burkholder
30c2333b1d Avoid exposing declarations for kernel variables to userland.
PR:	54528
2003-07-17 23:42:08 +00:00
David Xu
3074d1b454 Fix sigwait to conform to POSIX.
When a signal is being delivered to process, first find a sigwait
thread to deliver, POSIX's argument is speed of delivering signal
to sigwait thread is faster than other ways. A signal in its wait
set will cause sigwait to return the signal number, a signal not
in its wait set but in not blocked by the thread also causes sigwait
to return, but sigwait returns EINTR, sigwait is oneshot operation,
only one signal can be delivered to its wait set, when a signal is
delivered to the sigwait thread, the thread's sigwait state is canceled.
2003-07-17 22:52:55 +00:00
David Xu
dd7da9aa28 o Refine kse_thr_interrupt to allow it to handle different commands.
o Remove TDF_NOSIGPOST.
o Add a member td_waitset to proc structure, it will be used for sigwait.

Tested by: deischen
2003-07-17 22:45:33 +00:00
Robert Drehmel
e76bad968c Correct six return statements which returned zero instead of
an appropriate error number after a failure condition.

In particular, three of the changed statements return ESRCH for a
failed pfind(), and in also three places a non-zero return
from p_cansee() will be passed back,

Also noticed by:	rwatson
2003-07-17 22:44:41 +00:00
Poul-Henning Kamp
116b3c2af9 Make sure that SWP_NPAGES always has the same value in all source
files, so that SWAP_META_PAGES does not vary either.

swap_pager.c ended up with a value of 16, everybody else 8.  Go with
the 16 for now.

This should only have any effect in the "kill processes because we
are out of swap" scenario, where it will make some sort of estimate
of something more precise.
2003-07-17 21:58:43 +00:00
Mark Murray
5146af6d82 Style(9) cleanup. There was no consistent style in this driver, and
The next round of commits will be to fix up locking in it. This lot
is to at least give a consistent base to work off.

OK'ed by:	imp, mdodd
2003-07-17 19:37:56 +00:00
John Baldwin
9e66b98a4a Fix a bogon in the previous commit. When suppressing multiple isab
devices, we have to allow for the case when the isab0 device is ourselves.

Tested by:	markm
2003-07-17 19:13:41 +00:00
John Polstra
c7cc6a4d9f Correct comments to indicate that the EM_RADV and EM_TADV parameters
are not applicable to the 82544.
2003-07-17 19:02:34 +00:00
Scott Long
476755ab25 Now that the dust has settled, make dflt_lock() always panic. 2003-07-17 16:07:46 +00:00
Thomas Quinot
c679659e75 Add quirk entry for IntelligentStick disc-on-key USB devices.
Reported by Samuel Tardieu <sam@rfc1149.net>.

Reviewed by:	roberto
MFC after:	1 week
2003-07-17 15:33:08 +00:00
Hartmut Brandt
4f72640780 The card resets the S/Uni chip when it is resetted. Therefor
we need to reinitialize the PHY after the call to reset when
stopping the interface.
2003-07-17 13:43:16 +00:00
Jeffrey Hsu
a12569ec4f Drop Giant around syncache timer processing. 2003-07-17 11:19:25 +00:00