Commit Graph

119556 Commits

Author SHA1 Message Date
Peter Wemm
68a443c292 MFamd64: indent with tabs instead of spaces. 2005-11-04 22:53:44 +00:00
Jung-uk Kim
45e7d2e745 This commit was generated by cvs2svn to compensate for changes in r152069,
which included commits to RCS files with non-trunk default branches.
2005-11-04 21:29:41 +00:00
Jung-uk Kim
e9bfb92a8e - Fix more resource parsing problems. The previous commit was imcomplete.
- Fix a typo in rsmisc.c and a style change for consistency.

This patch will also appear in future ACPI-CA release.

Submitted by:	Robert Moore <robert dot moore at intel dot com>
Tested by:	ru
2005-11-04 21:29:41 +00:00
Ruslan Ermilov
160ebe8754 Catch up with the recent <sys/signal.h> change and make this compile. 2005-11-04 20:32:26 +00:00
Nate Lawson
ce60eb2a14 Account for the minimum resource size when parsing the end tag resource
descriptor.  This should fix the "memory modified after free" panics.  This
patch will appear in a future acpi-ca distribution.

Submitted by:	Robert Moore <robert.moore / intel.com>
Tested by:	Peter Holm
2005-11-04 20:15:09 +00:00
Nate Lawson
d4d37d2fc9 This commit was generated by cvs2svn to compensate for changes in r152058,
which included commits to RCS files with non-trunk default branches.
2005-11-04 20:15:09 +00:00
Alan Cox
e9cb1037da 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.

Discussed with: tegge (item #1)
Tested by: marcel (ia64)
2005-11-04 18:03:24 +00:00
Andre Oppermann
a5f7708723 Fix a logic error introduced with mandatory mbuf cluster refcounting and
freeing of mbufs+clusters back to the packet zone.
2005-11-04 17:20:53 +00:00
Ruslan Ermilov
393109a1a2 Use if_setlladdr() to reprogram the link-level addresses; it causes
a synchronous reprogramming of hardware MAC filters if the physical
interface are up and running.  Previously, MAC filters would be
reconfigured only when the fec interface was brought up.
2005-11-04 16:29:51 +00:00
Ruslan Ermilov
6ea00fe048 Bring some level of stability to this driver:
- Disallow bundle reconfiguration when virtual
  interface is running; otherwise, removing a
  port from a running configuration will cause
  a panic in the start() method on the next packet
  on an assumption that a bundle has an even
  number of ports (2 or 4).

- Disallow bringing of virtual interface to a
  running state when a bundle size is 0; otherwise,
  adding and then removing the port will similarly
  cause a panic.

- Add missing initialization of fec_ifstat when
  adding a new port and fix media status reporting
  when virtual interface isn't yet up (check for
  fec_status of 1 rather than != 0).
2005-11-04 15:42:01 +00:00
Ruslan Ermilov
ca5d5ced13 - Fix another fallout from the if_alloc() conversion:
previously, ifp->if_type was set to IFT_ETHER by
  ether_ifattach(), now it's done by if_alloc() so
  an assignment of if_type to IFT_PROPVIRTUAL after
  if_alloc() but before ether_ifattach() broke it.
  This makes arp(8) and friends happy about the fec
  interfaces, and will allow us to use if_setlladdr()
  on the fec interface.

- Set/reset IFF_DRV_RUNNING/IFF_DRV_OACTIVE in init()
  and stop() methods rather than in ioctl(), like the
  rest of the drivers do.  This fixes a bug when an
  "ifconfig fec0 ipv4_address" would not have made
  the interface running, didn't launch the ticker
  function to track media status of bundled ports,
  etc.
2005-11-04 13:50:38 +00:00
David Xu
8f0371f19d Fix name compatible problem with POSIX standard. the sigval_ptr and
sigval_int really should be sival_ptr and sival_int.
Also sigev_notify_function accepts a union sigval value but not a
pointer.
2005-11-04 09:41:00 +00:00
Warner Losh
6383e2266c since nocpu isn't used in the kernel config base, we don't need to
bump the version.  Peter Wemm, John Baldwin and I hammered this out
after the last time I needlessly incremented the version.
2005-11-04 04:16:44 +00:00
Warner Losh
05b5ca733b We don't bump the config version for additions to config that aren't
used in the base system.  This has been much discussed in the past
(typically people giving me a hard time for it).  Since all that was
added to config was nocpu, and since we don't use it, we don't need to
bump the version.
2005-11-04 04:14:49 +00:00
Ruslan Ermilov
d3e15dbaa0 Use the eq() macro for comparing strings (style), and remove a "break"
statement to null the effect of several identical "cpu" directives.
2005-11-03 21:27:02 +00:00
Ruslan Ermilov
a15aafd590 By a popular demand, add "nomakeoptions" as an alias to "nomakeoption". 2005-11-03 21:09:59 +00:00
John Baldwin
091e8307d0 Add stoppcbs[] arrays on Alpha and sparc64 and have each CPU save its
current context in the IPI_STOP handler so that we can get accurate stack
traces of threads on other CPUs on these two archs like we do now on i386
and amd64.

Tested on:	alpha, sparc64
2005-11-03 21:08:20 +00:00
John Baldwin
55de4dcab6 Fix 'show allpcpu' ddb command on non-x86. CPU IDs are in the range 0 ..
mp_maxid, not 0 .. mp_maxid - 1.  The result was that the highest numbered
CPU was skipped on Alpha and sparc64.

MFC after:	1 week
2005-11-03 21:06:29 +00:00
Jung-uk Kim
2a74e7368d Fix build breakage on tinderbox. 2005-11-03 20:27:38 +00:00
Paul Saab
9c31df40bb Fix for a crash (from nfs_lookup() in an error case).
Submitted by:	Mohan Srinivasan
2005-11-03 19:24:54 +00:00
Ruslan Ermilov
acd58322c7 Implement the "nocpu" directive.
Requested by:	rwatson
2005-11-03 14:01:22 +00:00
Pawel Jakub Dawidek
2a143d5bf5 Detect memory leaks when memory type is being destroyed.
This is very helpful for detecting kernel modules memory leaks on unload.

Discussed and reviewed by:	rwatson
2005-11-03 13:48:59 +00:00
Ralf S. Engelschall
9d14a9a235 There is no need to explicitly add "status" to $extra_commands in
the /etc/rc.d/pf script as it is implicitly added by /etc/rc.subr's
run_rc_command() because of the existing $pf_program.

Submitted by:	Christoph Schug <chris@schug.net>
MFC after:	1 week
2005-11-03 13:17:49 +00:00
Ralf S. Engelschall
9f9e9e1b8d Update list of controllers ciss(4) driver
actually supports according to implementation.

Submitted by: Christoph Schug <chris@schug.net>
MFC after: 1 week
2005-11-03 13:02:35 +00:00
Ruslan Ermilov
6660f1d7c1 Serialize access to the info/dir file; needed for parallel installs.
Reported by:	scottl

I'm not very fond of using the non-standard lockf(1) here, but I
have no better idea at the moment.  NetBSD uses ln(1) to create a
lock file, but this approach can result in a deadlock if make is
interrupted, leaving an orphaned lock file.
2005-11-03 08:56:39 +00:00
Ariff Abdullah
8be20fbe2a Appropriate NULL pointer checking to avoid mysterious panic during
device cloning.

Approved by:	netchild (mentor)
2005-11-03 08:19:04 +00:00
Maxim Konovalov
fe35a11a2b o NetBSD 2.0.3 and NetBSD 2.1 added.
Obtained from:	NetBSD
MFC after:	3 days
2005-11-03 08:06:06 +00:00
Maxim Konovalov
b9bc21b20b Merge from RELENG_6: FreeBSD 6.0. Not sure the release date is correct
because no release announce yet.
2005-11-03 07:59:58 +00:00
Alan Cox
fcf67b0496 Remove the remaining spl*() calls. Add some assertions. Eliminate some
excessive white space.
2005-11-03 07:51:02 +00:00
Ruslan Ermilov
c60c00bce1 Restore part of the code dropped in rev. 1.25 that makes sure ether_demux()
will receive an mbuf chain with Ethernet header in the data portion of the
first mbuf.
2005-11-03 07:46:04 +00:00
Paul Saab
41ce2892bb In nfs_flush(), clear the NMODIFIED bit only if there are no dirty
buffers *and* there are no buffers queued up for writing.  The bug
was that NMODIFIED was being cleared even while there were buffers
scheduled to be written out, which leads to all sorts of interesting
bugs - one where the file could shrink (because of a post-op getattr
load, say) causing data in buffer(s) queued for write to be tossed,
resulting in data corruption.

Submitted by:	Mohan Srinivasan
2005-11-03 07:42:15 +00:00
Ruslan Ermilov
6e7a7ba194 Consistently use OPT_* macros to test/set boot options. 2005-11-03 07:35:36 +00:00
Paul Saab
120c58288c Fix for a race between the thread transmitting the request and the
thread processing the reply.

Submitted by:	Mohan Srinivasan
2005-11-03 07:31:06 +00:00
Ruslan Ermilov
7901356c23 The default fill byte is 0xf6, not 0xf5. 2005-11-03 07:28:46 +00:00
Ruslan Ermilov
f9b5f9c1cf Be cross-arch friendly. 2005-11-03 07:27:50 +00:00
Ruslan Ermilov
41d2125edb Fix .Dd argument. 2005-11-03 07:26:54 +00:00
David Xu
4c0fb2cfff Support sending realtime signal information via signal queue, realtime
signal memory is pre-allocated, so kernel can always notify user code.
2005-11-03 05:25:26 +00:00
David Xu
6d7b314b14 Cleanup some signal interfaces. Now the tdsignal function accepts
both proc pointer and thread pointer, if thread pointer is NULL,
tdsignal automatically finds a thread, otherwise it sends signal
to given thread.
Add utility function psignal_event to send a realtime sigevent
to a process according to the delivery requirement specified in
struct sigevent.
2005-11-03 04:49:16 +00:00
Xin LI
165edba6a7 Suggest the user to use 'diff -urN' instead of 'diff -crN'.
Submitted by:	Jimmie James  <jimmiejaz@gmail.com>
PR:		docs/88427
2005-11-03 03:49:57 +00:00
David Xu
d1f16b4d2e Oops, don't change tdsignal call. 2005-11-03 01:38:49 +00:00
David Xu
44355392b4 Add thread_find() function to search a thread by lwpid. 2005-11-03 01:34:08 +00:00
Andrew Thompson
9af9b983e1 List IFT_BRIDGE as a valid type so that arp entries can be properly deleted.
Submitted by:	Michal Mertl <mime^traveller.cz>
2005-11-03 00:56:43 +00:00
Ken Smith
4dd01ea40a It had been noticed disc2 was overflowing earlier but committing the
fix slipped through a crack.  Remove the apache and php packages under
the assumption someone installing a Web server has network access and
doesn't *need* the packages on disc2.

This will be insta-MFCed...
2005-11-03 00:23:13 +00:00
Jesus R. Camou
d2f90294d4 Add local' and return' to the list of built-ins.
Submitted by:	garys
Approved by:	trhodes (mentor)
2005-11-03 00:15:19 +00:00
Wilko Bulte
e99f15ce9c Small changes in the AlphaStation 200 and PC14 area. PC164 SRM does
not work with 53C896 SCSI chips.

Submitted by: Owen Mann <owen@mann.org>
2005-11-02 22:18:47 +00:00
Paul Saab
1471f287e1 Calling setrlimit from 32bit apps could potentially increase certain
limits beyond what should be capiable in a 32bit process, so we
must fixup the limits.

Reviewed by:	jhb
2005-11-02 21:18:07 +00:00
John Baldwin
c7362ff7fb Change the x86 code to allocate IDT vectors on-demand when an interrupt
source is first enabled similar to how intr_event's now allocate ithreads
on-demand.  Previously, we would map IDT vectors 1:1 to IRQs.  Since we
only have 191 available IDT vectors for I/O interrupts, this limited us
to only supporting IRQs 0-190 corresponding to the first 190 I/O APIC
intpins.  On many machines, however, each PCI-X bus has its own APIC even
though it only has 1 or 2 devices, thus, we were reserving between 24 and
32 IRQs just for 1 or 2 devices and thus 24 or 32 IDT vectors.  With this
change, a machine with 100 IRQs but only 5 in use will only use up 5 IDT
vectors.  Also, this change provides an API (apic_alloc_vector() and
apic_free_vector()) that will allow a future MSI interrupt source driver to
request IDT vectors for use by MSI interrupts on x86 machines.

Tested on:	amd64, i386
2005-11-02 20:11:47 +00:00
Bill Paul
a91395a9d0 Tests with my dual Opteron system have shown that it's possible
for code to start out on one CPU when thunking into Windows
mode in ctxsw_utow(), and then be pre-empted and migrated to another
CPU before thunking back to UNIX mode in ctxsw_wtou(). This is
bad, because then we can end up looking at the wrong 'thread environment
block' when trying to come back to UNIX mode. To avoid this, we now
pin ourselves to the current CPU when thunking into Windows code.

Few other cleanups, since I'm here:

- Get rid of the ndis_isr(), ndis_enable_interrupt() and
  ndis_disable_interrupt() wrappers from kern_ndis.c and just invoke
  the miniport's methods directly in the interrupt handling routines
  in subr_ndis.c. We may as well lose the function call overhead,
  since we don't need to export these things outside of ndis.ko
  now anyway.

- Remove call to ndis_enable_interrupt() from ndis_init() in if_ndis.c.
  We don't need to do it there anyway (the miniport init routine handles
  it, if needed).

- Fix the logic in NdisWriteErrorLogEntry() a little.

- Change some NDIS_STATUS_xxx codes in subr_ntoskrnl.c into STATUS_xxx
  codes.

- Handle kthread_create() failure correctly in PsCreateSystemThread().
2005-11-02 18:01:04 +00:00
Andre Oppermann
56a4e45ab3 Mandatory mbuf cluster reference counting and groundwork for UMA
based jumbo 9k and jumbo 16k cluster support.

All mbuf's with external storage attached are mandatory reference
counted.  For clusters and jumbo clusters UMA provides the refcnt
storage directly.  It does not have to be separatly allocated.  Any
other type of external storage gets its own refcnt allocated from
an UMA mbuf refcnt zone instead of normal kernel malloc.

The refcount API MEXT_ADD_REF() and MEXT_REM_REF() is no longer
publically accessible.  The proper m_* functions have to be used.

mb_ctor_clust() and mb_dtor_clust() both handle normal 2K as well
as 9k and 16k clusters.

Clusters and jumbo clusters may be obtained without attaching it
immideatly to an mbuf.  This is for high performance cluster
allocation in network drivers where mbufs are attached after the
cluster has been filled.

Tested by:	rwatson
Sponsored by:	TCP/IP Optimizations Fundraise 2005
2005-11-02 16:20:36 +00:00
Gleb Smirnoff
1928437497 Fix several races between socket closure and node/hook
destruction:
  - Backout 1.62, since it doesn't fix all possible
    problems.
  - Upon node creation, put an additional reference on node.
  - Add a mutex and refcounter to struct ngsock. Netgraph node,
    control socket and data socket all count as references.
  - Introduce ng_socket_free_priv() which removes one reference
    from ngsock, and frees it when all references has gone.
  - No direct pointers between pcbs and node, all pointing
    is done via struct ngsock and protected with mutex.
2005-11-02 15:34:42 +00:00