]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoFix copy-and-paste-o's from kinfo_getfile.3 in kinfo_getvmmap.3.
Robert Watson [Wed, 24 Jun 2009 12:52:59 +0000 (12:52 +0000)]
Fix copy-and-paste-o's from kinfo_getfile.3 in kinfo_getvmmap.3.

MFC after: 3 days

15 years agoAdd stack_print_short() and stack_print_short_ddb() interfaces to
Robert Watson [Wed, 24 Jun 2009 12:06:15 +0000 (12:06 +0000)]
Add stack_print_short() and stack_print_short_ddb() interfaces to
stack(9), which generate a more compact rendition of a stack trace
via the kernel's printf.

MFC after: 1 week

15 years agoUse proper form of gnu designated initalizers. This lets
Roman Divacky [Wed, 24 Jun 2009 12:01:10 +0000 (12:01 +0000)]
Use proper form of gnu designated initalizers. This lets
clang compile this files.

Approved by: ed (mentor)
Silence from: harti (maintainer?)

15 years agoPrintf fewer warnings when adding a route to an atalk address fails;
Robert Watson [Wed, 24 Jun 2009 10:46:03 +0000 (10:46 +0000)]
Printf fewer warnings when adding a route to an atalk address fails;
userspace will print the error.

MFC after: 3 days

15 years agoIn if_setlladdr(), use IF_ADDR_LOCK() and ifaddr references to improve
Robert Watson [Wed, 24 Jun 2009 10:36:48 +0000 (10:36 +0000)]
In if_setlladdr(), use IF_ADDR_LOCK() and ifaddr references to improve
the safety of link layer address manipulation.

MFC after: 6 weeks

15 years agoIn ARP input, more consistently acquire and release ifaddr references.
Robert Watson [Wed, 24 Jun 2009 10:33:35 +0000 (10:33 +0000)]
In ARP input, more consistently acquire and release ifaddr references.

MFC after: 6 weeks

15 years agoBreak at_ifawithnet() into two variants:
Robert Watson [Wed, 24 Jun 2009 10:32:44 +0000 (10:32 +0000)]
Break at_ifawithnet() into two variants:

- at_ifawithnet(), which acquires an locks it needs and returns an
  at_ifaddr reference.
- at_ifawithnet_locked(), which relies on the caller locking
  at_ifaddr_list, and returns a pointer rather than a reference.

Update various consumers to prefer one or the other, including ether
and fddi output, to properly release at_ifaddr references.

Rework at_control() to manage locking and references in a manner
identical to in_control().

MFC after: 6 weeks

15 years agoReduce debugging output for netatalk routing events.
Robert Watson [Wed, 24 Jun 2009 10:28:30 +0000 (10:28 +0000)]
Reduce debugging output for netatalk routing events.

MFC after: 3 days

15 years agoInitialize the uip to silence gcc warning that seems to sneak in in some
Konstantin Belousov [Wed, 24 Jun 2009 09:26:33 +0000 (09:26 +0000)]
Initialize the uip to silence gcc warning that seems to sneak in in some
build environments.

Reported by: alc, bf1783 at googlemail com

15 years agoLock if_addrhead when iterating, and where necessary acquire and release
Robert Watson [Wed, 24 Jun 2009 08:53:23 +0000 (08:53 +0000)]
Lock if_addrhead when iterating, and where necessary acquire and release
ifadr references in if_sppp.

MFC after: 6 weeks

15 years agoMake stf_getsrcifa6() return a reference to an in6_ifaddr rather than
Robert Watson [Wed, 24 Jun 2009 08:52:09 +0000 (08:52 +0000)]
Make stf_getsrcifa6() return a reference to an in6_ifaddr rather than
a pointer, and dispose of the references when no longer needed.

MFC after: 6 weeks

15 years agoDo not stop the loop when an empty or deleted directory entry is found.
John Hay [Wed, 24 Jun 2009 06:42:13 +0000 (06:42 +0000)]
Do not stop the loop when an empty or deleted directory entry is found.
Rather just skip over it.

15 years agoAdd detection of UFS filesystems.
Colin Percival [Wed, 24 Jun 2009 04:56:13 +0000 (04:56 +0000)]
Add detection of UFS filesystems.

PR: bin/135565
Submitted by: Daniel O'Connor
Reviewed by: randi
MFC after: 1 month

15 years agoThe bits set in a page's dirty mask are a subset of the bits set in its
Alan Cox [Wed, 24 Jun 2009 04:45:03 +0000 (04:45 +0000)]
The bits set in a page's dirty mask are a subset of the bits set in its
valid mask.  Consequently, there is no need to perform a bit-wise and of
the page's dirty and valid masks in order to determine which parts of a
page are dirty and valid.

Eliminate an unnecessary #include.

15 years agoSlight comment fix.
Ariff Abdullah [Wed, 24 Jun 2009 02:01:16 +0000 (02:01 +0000)]
Slight comment fix.

15 years agoUpdate SCCS IDs for Berkeley DB 1.86 merge.
Xin LI [Wed, 24 Jun 2009 01:15:10 +0000 (01:15 +0000)]
Update SCCS IDs for Berkeley DB 1.86 merge.

15 years agostyle: operators should appear at the line end if we have to wrap.
Xin LI [Wed, 24 Jun 2009 01:14:17 +0000 (01:14 +0000)]
style: operators should appear at the line end if we have to wrap.

15 years agoAdd a note about the implication of secure level setting against kldload,
Xin LI [Tue, 23 Jun 2009 23:56:56 +0000 (23:56 +0000)]
Add a note about the implication of secure level setting against kldload,
and cross reference security(7).

15 years agoMerge fmtcheck() prototype change.
Xin LI [Tue, 23 Jun 2009 23:53:35 +0000 (23:53 +0000)]
Merge fmtcheck() prototype change.

Obtained from: NetBSD

15 years agoUse const instead of __const, and merge the license change from NetBSD.
Xin LI [Tue, 23 Jun 2009 23:52:12 +0000 (23:52 +0000)]
Use const instead of __const, and merge the license change from NetBSD.

Obtained from: NetBSD

15 years ago - Use size_t instead of int when appropriate;
Xin LI [Tue, 23 Jun 2009 23:49:52 +0000 (23:49 +0000)]
 - Use size_t instead of int when appropriate;
 - Use C99 sparse initialization.

With these changes ifconfig(8) is WARNS=2 clean.

15 years ago%.s expects an int as the length specifier, so cast properly.
Xin LI [Tue, 23 Jun 2009 23:37:25 +0000 (23:37 +0000)]
%.s expects an int as the length specifier, so cast properly.

15 years agoUse strlcpy() instead of manually setting the last byte of the array to \0.
Xin LI [Tue, 23 Jun 2009 23:34:46 +0000 (23:34 +0000)]
Use strlcpy() instead of manually setting the last byte of the array to \0.

15 years agoUse strlcpy() instead of explicitly set \0 on the tail of the array.
Xin LI [Tue, 23 Jun 2009 23:32:24 +0000 (23:32 +0000)]
Use strlcpy() instead of explicitly set \0 on the tail of the array.

15 years agoStaticify internal routines.
Xin LI [Tue, 23 Jun 2009 23:30:56 +0000 (23:30 +0000)]
Staticify internal routines.

15 years agoMerge NetBSD revision 1.14: humanize_number.c is now 2-clause BSD licensed.
Xin LI [Tue, 23 Jun 2009 23:27:35 +0000 (23:27 +0000)]
Merge NetBSD revision 1.14: humanize_number.c is now 2-clause BSD licensed.
(humanize_number.3 intentionally hold back until I make sure why we didn't
merged dehumanize_number(3)).

Obtained from: NetBSD

15 years agoK&R -> ANSI
Xin LI [Tue, 23 Jun 2009 23:20:09 +0000 (23:20 +0000)]
K&R -> ANSI

15 years agoUse C99 initialization when necessary; apply static to internal rountines.
Xin LI [Tue, 23 Jun 2009 23:18:19 +0000 (23:18 +0000)]
Use C99 initialization when necessary; apply static to internal rountines.
This makes nfsstat WARNS=3 clean.

15 years agoK&R -> ANSI
Xin LI [Tue, 23 Jun 2009 23:17:04 +0000 (23:17 +0000)]
K&R -> ANSI

15 years agoMake algorithm a bit more bulletproof.
Alexander Motin [Tue, 23 Jun 2009 23:16:37 +0000 (23:16 +0000)]
Make algorithm a bit more bulletproof.

15 years agoUse getprogname() instead of referencing __progname.
Xin LI [Tue, 23 Jun 2009 23:16:00 +0000 (23:16 +0000)]
Use getprogname() instead of referencing __progname.

15 years agoQuote -x tracing output so it is unambiguous.
Jilles Tjoelker [Tue, 23 Jun 2009 22:53:34 +0000 (22:53 +0000)]
Quote -x tracing output so it is unambiguous.

It is usually but not always suitable for re-input to the shell.

Approved by: ed (mentor) (implicit)

15 years agoImplement a facility for dynamic per-cpu variables.
Jeff Roberson [Tue, 23 Jun 2009 22:42:39 +0000 (22:42 +0000)]
Implement a facility for dynamic per-cpu variables.
 - Modules and kernel code alike may use DPCPU_DEFINE(),
   DPCPU_GET(), DPCPU_SET(), etc. akin to the statically defined
   PCPU_*.  Requires only one extra instruction more than PCPU_* and is
   virtually the same as __thread for builtin and much faster for shared
   objects.  DPCPU variables can be initialized when defined.
 - Modules are supported by relocating the module's per-cpu linker set
   over space reserved in the kernel.  Modules may fail to load if there
   is insufficient space available.
 - Track space available for modules with a one-off extent allocator.
   Free may block for memory to allocate space for an extent.

Reviewed by:    jhb, rwatson, kan, sam, grehan, marius, marcel, stas

15 years agoRemove duplicate if-statement on gmt_is_set in gmtsub().
Edwin Groothuis [Tue, 23 Jun 2009 22:28:44 +0000 (22:28 +0000)]
Remove duplicate if-statement on gmt_is_set in gmtsub().

MFC after: 1 week

15 years ago- Added code to read bootcode firwmare version.
David Christensen [Tue, 23 Jun 2009 22:19:27 +0000 (22:19 +0000)]
- Added code to read bootcode firwmare version.
- Created dedicated shared memory access routines.

MFC after: One week

15 years ago - Use cpuset_t and the CPU_ macros in place of cpumask_t so that ULE
Jeff Roberson [Tue, 23 Jun 2009 22:12:37 +0000 (22:12 +0000)]
 - Use cpuset_t and the CPU_ macros in place of cpumask_t so that ULE
   supports arbitrary numbers of cpus rather than being limited by
   cpumask_t to the number of bits in a long.

15 years agoMake callers to in6_selectsrc() and in6_pcbladdr() pass in memory
Bjoern A. Zeeb [Tue, 23 Jun 2009 22:08:55 +0000 (22:08 +0000)]
Make callers to in6_selectsrc() and in6_pcbladdr() pass in memory
to save the selected source address rather than returning an
unreferenced copy to a pointer that might long be gone by the
time we use the pointer for anything meaningful.

Asked for by: rwatson
Reviewed by: rwatson

15 years agoFix variable name.
Alexander Motin [Tue, 23 Jun 2009 22:08:25 +0000 (22:08 +0000)]
Fix variable name.

15 years agoAdd tests for r194774.
Jilles Tjoelker [Tue, 23 Jun 2009 22:03:56 +0000 (22:03 +0000)]
Add tests for r194774.

Approved by: ed (mentor) (implicit)

15 years agoDo not fork for a subshell if it is the last thing this shell is doing
Jilles Tjoelker [Tue, 23 Jun 2009 21:50:06 +0000 (21:50 +0000)]
Do not fork for a subshell if it is the last thing this shell is doing
(EV_EXIT). The fork is still done as normal if any traps are active.

In many cases, the fork can be avoided even without this change by using {}
instead of (), but in practice many scripts use (), likely because the
syntax is simpler.

Example:
  sh -c '(/bin/sleep 10)& sleep 1;ps -p $! -o comm='
Now prints "sleep" instead of "sh". $! is more useful this way.
Most shells (dash, bash, pdksh, ksh93, zsh) seem to print "sleep" for this.

Example:
  sh -c '( ( ( (ps jT))))'
Now shows no waiting shell processes instead of four.
Most shells (dash, bash, pdksh, ksh93, zsh) seem to show zero or one.

PR: bin/74404
Approved by: ed (mentor) (implicit)

15 years agoWhen mountd.c parses the nfsv4 root line(s) in /etc/exports, it
Rick Macklem [Tue, 23 Jun 2009 21:48:04 +0000 (21:48 +0000)]
When mountd.c parses the nfsv4 root line(s) in /etc/exports, it
allocates data structures that are never linked into the tree or free'd.
As such, mountd would leak memory every time it parsed an nfsv4 root line.
This patch frees up those structures to plug the leak.

Approved by: kib (mentor)

15 years agoRework r193814:
Alexander Motin [Tue, 23 Jun 2009 21:45:33 +0000 (21:45 +0000)]
Rework r193814:
While general idea of patch was good, it was not working properly due the way
it was implemented. When we are using same timer interrupt for several of
hard/prof/stat purposes we should not send several IPIs same time to other
CPUs. Sending several IPIs same time leads to terrible accounting/profiling
results due to strong synchronization effect, when the second interrupt
handler accounts processing of the first one.
Interlink timer events in a such way, that no more then one IPI is sent for
any original timer interrupt.

15 years agoImprove my last commit: use a separate condvar to serialize.
Ed Schouten [Tue, 23 Jun 2009 21:43:02 +0000 (21:43 +0000)]
Improve my last commit: use a separate condvar to serialize.

The advantage of using a separate condvar is that we can just use
cv_signal(9) instead of cv_broadcast(9). It makes no sense to wake up
multiple threads. It also makes the TTY code easier to understand.
t_dcdwait sounds totally unrelated.

15 years agoAdd one more reference to SEE ALSO. Sort while here.
Joel Dahl [Tue, 23 Jun 2009 21:37:12 +0000 (21:37 +0000)]
Add one more reference to SEE ALSO. Sort while here.

Submitted by: ariff

15 years agoUse dcdwait to block threads to serialize writes.
Ed Schouten [Tue, 23 Jun 2009 21:33:26 +0000 (21:33 +0000)]
Use dcdwait to block threads to serialize writes.

I suspect the usage of bgwait causes a lot of spurious wakeups when
threads are blocked in the background, because they will be woken up
each time a write() call is performed.

Also wakeup dcdwait when the TTY is abandoned.

15 years agoBring in a few mdoc/language fixes.
Joel Dahl [Tue, 23 Jun 2009 21:24:21 +0000 (21:24 +0000)]
Bring in a few mdoc/language fixes.

Submitted by: ru

15 years agoUsermode portion of the support for swap allocation accounting:
Konstantin Belousov [Tue, 23 Jun 2009 20:57:27 +0000 (20:57 +0000)]
Usermode portion of the support for swap allocation accounting:
- update for getrlimit(2) manpage;
- support for setting RLIMIT_SWAP in login class;
- addition to the limits(1) and sh and csh limit-setting builtins;
- tuning(7) documentation on the sysctls controlling overcommit.

In collaboration with: pho
Reviewed by: alc
Approved by: re (kensmith)

15 years agoImplement global and per-uid accounting of the anonymous memory. Add
Konstantin Belousov [Tue, 23 Jun 2009 20:45:22 +0000 (20:45 +0000)]
Implement global and per-uid accounting of the anonymous memory. Add
rlimit RLIMIT_SWAP that limits the amount of swap that may be reserved
for the uid.

The accounting information (charge) is associated with either map entry,
or vm object backing the entry, assuming the object is the first one
in the shadow chain and entry does not require COW. Charge is moved
from entry to object on allocation of the object, e.g. during the mmap,
assuming the object is allocated, or on the first page fault on the
entry. It moves back to the entry on forks due to COW setup.

The per-entry granularity of accounting makes the charge process fair
for processes that change uid during lifetime, and decrements charge
for proper uid when region is unmapped.

The interface of vm_pager_allocate(9) is extended by adding struct ucred *,
that is used to charge appropriate uid when allocation if performed by
kernel, e.g. md(4).

Several syscalls, among them is fork(2), may now return ENOMEM when
global or per-uid limits are enforced.

In collaboration with: pho
Reviewed by: alc
Approved by: re (kensmith)

15 years agosh: Improve handling of setjmp/longjmp volatile:
Jilles Tjoelker [Tue, 23 Jun 2009 20:45:12 +0000 (20:45 +0000)]
sh: Improve handling of setjmp/longjmp volatile:
- remove ineffective and unnecessary (void) &var; [1]
- remove some unnecessary volatile keywords
- add a necessary volatile keyword
- save the old handler before doing something that could use the saved
  value

Submitted by: Christoph Mallon [1]
Approved by: ed (mentor)

15 years ago- Update regarding the support for SBus GEM added in r194763.
Marius Strobl [Tue, 23 Jun 2009 20:38:35 +0000 (20:38 +0000)]
- Update regarding the support for SBus GEM added in r194763.
- Improve the description a bit and add a reference to vlan(4).

15 years ago- Initialize the ifnet structure, especially if_dname, before probing
Marius Strobl [Tue, 23 Jun 2009 20:36:59 +0000 (20:36 +0000)]
- Initialize the ifnet structure, especially if_dname, before probing
  the PHYs as some PHY drivers use it (but probably shouldn't). How
  gem(4) has worked with brgphy(4) on powerpc without this so far is
  unclear to me.
- Introduce a dying flag which is set during detach and checked in
  gem_ioctl() in order to prevent active BPF listeners to clear
  promiscuous mode which may lead to the tick callout being restarted
  which will trigger a panic once it's actually gone.
- In gem_stop() reset rather than just disable the transmitter and
  receiver in order to ensure we're not unloading DMA maps still in
  use by the hardware. [1]
- The blanking time is specified in PCI clocks so we should use twice
  the value when operating at 66MHz.
- Spell some 2 as ETHER_ALIGN and a 19 as GEM_STATUS_TX_COMPLETION_SHFT
  to make the actual intentions clear.
- As we don't unload the peak attempts counter ignore its overflow
  interrupts.
- Remove a stale setting of a variable to GEM_TD_INTERRUPT_ME which
  isn't used afterwards.
- For optimum performance increment the TX kick register in multiples
  of 4 if possible as suggested by the documentation.
- Partially revert r164931; drivers should only clear the watchdog
  timer if all outstanding TX descriptors are done.
- Fix some debugging strings.
- Add a missing BUS_DMASYNC_POSTWRITE in gem_rint().
- As the error paths in the interrupt handler are generally unlikely
  predict them as false.
- Add support for the SBus version of the GEM controller. [2]
- Add some lock assertions.
- Improve some comments.
- Fix some more or less cosmetic issues in the code of the PCI front-end.
- Change some softc members to be unsigned where more appropriate and
  remove unused ones.

Approved by: re (kib)
Obtained from: NetBSD (partially) [2], OpenBSD [1]
MFC after: 2 weeks

15 years agoAdd a limit for child jails via the "children.cur" and "children.max"
Jamie Gritton [Tue, 23 Jun 2009 20:35:51 +0000 (20:35 +0000)]
Add a limit for child jails via the "children.cur" and "children.max"
parameters.  This replaces the simple "allow.jails" permission.

Approved by: bz (mentor)

15 years ago- Fix bug where device would loose promisc setting when reset.
Andrew Gallatin [Tue, 23 Jun 2009 20:22:34 +0000 (20:22 +0000)]
- Fix bug where device would loose promisc setting when reset.
- Allow all rss hash modes to be chosen

15 years agoModify most routines returning 'struct ifaddr *' to return references
Robert Watson [Tue, 23 Jun 2009 20:19:09 +0000 (20:19 +0000)]
Modify most routines returning 'struct ifaddr *' to return references
rather than pointers, requiring callers to properly dispose of those
references.  The following routines now return references:

  ifaddr_byindex
  ifa_ifwithaddr
  ifa_ifwithbroadaddr
  ifa_ifwithdstaddr
  ifa_ifwithnet
  ifaof_ifpforaddr
  ifa_ifwithroute
  ifa_ifwithroute_fib
  rt_getifa
  rt_getifa_fib
  IFP_TO_IA
  ip_rtaddr
  in6_ifawithifp
  in6ifa_ifpforlinklocal
  in6ifa_ifpwithaddr
  in6_ifadd
  carp_iamatch6
  ip6_getdstifaddr

Remove unused macro which didn't have required referencing:

  IFP_TO_IA6

This closes many small races in which changes to interface
or address lists while an ifaddr was in use could lead to use of freed
memory (etc).  In a few cases, add missing if_addr_list locking
required to safely acquire references.

Because of a lack of deep copying support, we accept a race in which
an in6_ifaddr pointed to by mbuf tags and extracted with
ip6_getdstifaddr() doesn't hold a reference while in transmit.  Once
we have mbuf tag deep copy support, this can be fixed.

Reviewed by: bz
Obtained from: Apple, Inc. (portions)
MFC after: 6 weeks (portions)

15 years agoAdd some sysctl info so that we can see what is going on with vblanks.
Robert Noland [Tue, 23 Jun 2009 20:19:02 +0000 (20:19 +0000)]
Add some sysctl info so that we can see what is going on with vblanks.

MFC after: 3 days

15 years agoNow that we have UARTs running with fast interrupt handlers the ata
Sam Leffler [Tue, 23 Jun 2009 19:29:23 +0000 (19:29 +0000)]
Now that we have UARTs running with fast interrupt handlers the ata
driver's i/o ops must be locked to avoid chaos.  Extend the cambria
bus tag to support ata and add a spin lock.  The ata driver is
hacked to use that instead of it's builtin hack for ixp425.  Once
the ata driver is fixed to not be confused about byte order we can
generalize the cambria bus tag code and make it generally useful.

While here take advantage of our being ixp435-specific to remove
delays when switching between byte+word accesses and to eliminate
the 2us delay for the uarts (the spin lock overhead looks to do
this for us).

15 years agouse consistent style
Sam Leffler [Tue, 23 Jun 2009 19:05:02 +0000 (19:05 +0000)]
use consistent style

15 years agoRevert most of 193311 so as to track mxge transmit stats
Andrew Gallatin [Tue, 23 Jun 2009 19:04:25 +0000 (19:04 +0000)]
Revert most of 193311 so as to track mxge transmit stats
on a per-ring basis and avoid racy (and costly) updates
to the ifp stats via drbr by defining NO_SLOW_STATS

Discussed with: kmacy

15 years agoInclude sys/lock.h before sys/rwlock.h. If anything used to bring it for us
Olivier Houchard [Tue, 23 Jun 2009 18:36:42 +0000 (18:36 +0000)]
Include sys/lock.h before sys/rwlock.h. If anything used to bring it for us
before, it does not anymore.

15 years agoOnly release irq resources if we were actually using them.
Robert Noland [Tue, 23 Jun 2009 18:24:09 +0000 (18:24 +0000)]
Only release irq resources if we were actually using them.

MFC after: 3 days

15 years agoUsing signals for vblank events is prone to issues. There have never
Robert Noland [Tue, 23 Jun 2009 18:09:35 +0000 (18:09 +0000)]
Using signals for vblank events is prone to issues.  There have never
been any consumers and likely will never be.  Furthermore, we have
never enabled the code for it, so just get rid of it.

MFC after: 3 days

15 years agoUpdate mxge firmware from 1.4.39 to 1.4.43. Changes include:
Andrew Gallatin [Tue, 23 Jun 2009 18:00:43 +0000 (18:00 +0000)]
Update mxge firmware from 1.4.39 to 1.4.43.  Changes include:

- Support for 10G-PCIE*-8B*-C (dual-port CX4)  NICs
- For dual-port NICs, f/w failover is now a few microsecs
    instead of a few millisecs.
-  On failover, f/w sends RARP broadcast to make the change
   immediately known to the network
- Fixed a bug observed on IBM X3 architecture where
   some spurious ecrc errors would be reported when OS enabled
   ecrc support.

Sponsored by: Myricom Inc.

15 years agoGiven that vblanks generally occur 60 times a second, waiting 3 seconds
Robert Noland [Tue, 23 Jun 2009 17:52:41 +0000 (17:52 +0000)]
Given that vblanks generally occur 60 times a second, waiting 3 seconds
seems rather excessive.

MFC after: 3 days

15 years agovblank[crtc].last represents the hardware counter while request.sequence
Robert Noland [Tue, 23 Jun 2009 17:50:35 +0000 (17:50 +0000)]
vblank[crtc].last represents the hardware counter while request.sequence
represents the software counter.  Don't currupt things here.

MFC after: 3 days

15 years agoImplement minimal set of changes suggested by bz to make
Andrew Gallatin [Tue, 23 Jun 2009 17:42:06 +0000 (17:42 +0000)]
Implement minimal set of changes suggested by bz to make
mxge no longer depend on INET.

15 years agoHold the lock while we save/restore register for suspend/resume.
Robert Noland [Tue, 23 Jun 2009 17:38:28 +0000 (17:38 +0000)]
Hold the lock while we save/restore register for suspend/resume.

MFC after: 3 days

15 years agoAfter cleaning up rt_tables from vnet.h and cleaning up opt_route.h
Bjoern A. Zeeb [Tue, 23 Jun 2009 17:03:45 +0000 (17:03 +0000)]
After cleaning up rt_tables from vnet.h and cleaning up opt_route.h
a lot of files no longer need route.h either. Garbage collect them.
While here remove now unneeded vnet.h #includes as well.

15 years agoFix build with ACPI_DEBUG.
Rui Paulo [Tue, 23 Jun 2009 15:08:03 +0000 (15:08 +0000)]
Fix build with ACPI_DEBUG.

MFC after: 2 weeks

15 years agoFix double path issue and other nits.
Rui Paulo [Tue, 23 Jun 2009 14:57:06 +0000 (14:57 +0000)]
Fix double path issue and other nits.

MFC after: 2 weeks

15 years agoIn r194702 I meant to remove vnet.h which is no longer needed, not route.h.
Bjoern A. Zeeb [Tue, 23 Jun 2009 14:54:42 +0000 (14:54 +0000)]
In r194702 I meant to remove vnet.h which is no longer needed, not route.h.

15 years agoWhitespace fix.
Jamie Gritton [Tue, 23 Jun 2009 14:40:08 +0000 (14:40 +0000)]
Whitespace fix.

Approved by: bz (mentor)

15 years agoRemove obsolete comment describing how the command line is
Jamie Gritton [Tue, 23 Jun 2009 14:39:51 +0000 (14:39 +0000)]
Remove obsolete comment describing how the command line is
no longer parsed.

Approved by: bz (mentor)

15 years agoRemove unnecessary/redundant includes.
Jamie Gritton [Tue, 23 Jun 2009 14:39:21 +0000 (14:39 +0000)]
Remove unnecessary/redundant includes.

Approved by: bz (mentor)

15 years agoCode cleanup by moving some repetitive code into an ndis_get_bssid_list
Coleman Kane [Tue, 23 Jun 2009 14:37:07 +0000 (14:37 +0000)]
Code cleanup by moving some repetitive code into an ndis_get_bssid_list
helper function. Also, add ieee80211_announce() call for bootverbose case.

Submitted by: Paul B. Mahol <onemda@gmail.com>

15 years agoFix a typo in the same comment, one line below.
Ed Schouten [Tue, 23 Jun 2009 14:12:49 +0000 (14:12 +0000)]
Fix a typo in the same comment, one line below.

Submitted by: bf1783 googlemail com

15 years agoRemove unneeded stdlib directories.
Ed Schouten [Tue, 23 Jun 2009 14:11:41 +0000 (14:11 +0000)]
Remove unneeded stdlib directories.

It's not necessary to add stdlib directories for each architecture, even
if the architecture doesn't implement any files of its own.

Submitted by: Christoph Mallon

15 years agoSimplify. We can just use .sinclude here.
Ed Schouten [Tue, 23 Jun 2009 14:10:46 +0000 (14:10 +0000)]
Simplify. We can just use .sinclude here.

Submitted by: Christoph Mallon

15 years agoin6_rtqdrain() has been unused. Cleanup.
Bjoern A. Zeeb [Tue, 23 Jun 2009 13:22:19 +0000 (13:22 +0000)]
in6_rtqdrain() has been unused.  Cleanup.
As this was the only consumer of net/route.h left remove that as well.

15 years ago* Driver for ACPI WMI (Windows Management Instrumentation)
Rui Paulo [Tue, 23 Jun 2009 13:17:25 +0000 (13:17 +0000)]
* Driver for ACPI WMI (Windows Management Instrumentation)
* Driver for ACPI HP extra functionations, which required
  ACPI WMI driver.

Submitted by: Michael <freebsdusb at bindone.de>
Approved by: re
MFC after: 2 weeks

15 years agoRemove duplicate #include <net/route.h> from the middle of the file.
Bjoern A. Zeeb [Tue, 23 Jun 2009 13:16:16 +0000 (13:16 +0000)]
Remove duplicate #include <net/route.h> from the middle of the file.

15 years agoMark ng_ether node hooks as HI_STACK. It is usually the last point when
Alexander Motin [Tue, 23 Jun 2009 12:30:21 +0000 (12:30 +0000)]
Mark ng_ether node hooks as HI_STACK. It is usually the last point when
netgraph may unroll the call stack, and I have found that in some cases 2K
guarantied there for i386 may be not enough for NIC driver and BPF.

15 years agovn_open_cred() needs a non NULL ucred pointer
Peter Holm [Tue, 23 Jun 2009 11:29:54 +0000 (11:29 +0000)]
vn_open_cred() needs a non NULL ucred pointer

Reviewed by: kib

15 years agoFix typo in comment.
Ed Schouten [Tue, 23 Jun 2009 09:50:50 +0000 (09:50 +0000)]
Fix typo in comment.

Submitted by: Christoph Mallon

15 years agoRemove hand-written labs/abs implementations. GCC is smart enough.
Ed Schouten [Tue, 23 Jun 2009 09:04:59 +0000 (09:04 +0000)]
Remove hand-written labs/abs implementations. GCC is smart enough.

It turns out GCC generates code that's a couple of bytes big bigger, but
performs no branching whatsoever.

Submitted by: Christoph Mallon

15 years agoFix what seems to be an obvious typo preventing the body of the
Roman Divacky [Tue, 23 Jun 2009 09:02:24 +0000 (09:02 +0000)]
Fix what seems to be an obvious typo preventing the body of the
if statement to ever be executed.

Approved by: ed (mentor)

15 years agoo Fix usage() prototype [1] and correct its call.
Maxim Konovalov [Tue, 23 Jun 2009 08:51:11 +0000 (08:51 +0000)]
o Fix usage() prototype [1] and correct its call.

Submitted by: ed [1]

15 years ago - Add a new cpuset macro, CPU_FILL(), for setting the set to all 1s.
Jeff Roberson [Tue, 23 Jun 2009 06:57:46 +0000 (06:57 +0000)]
 - Add a new cpuset macro, CPU_FILL(), for setting the set to all 1s.

15 years agotime_t does not always fit into long, for instance on arm. So rather cast
John Hay [Tue, 23 Jun 2009 06:46:14 +0000 (06:46 +0000)]
time_t does not always fit into long, for instance on arm. So rather cast
it intmax_t and use %j in printf.

15 years agoConnect ng_pipe to the default build.
Marko Zec [Tue, 23 Jun 2009 06:11:04 +0000 (06:11 +0000)]
Connect ng_pipe to the default build.

Approved by: julian (mentor)

15 years agoFix a typeo in the frame len function to unbreak the build, make it shorter
Andrew Thompson [Tue, 23 Jun 2009 06:00:31 +0000 (06:00 +0000)]
Fix a typeo in the frame len function to unbreak the build, make it shorter
while I am here.

15 years agoo style(9) usage() definition: it doesn't need an argument.
Maxim Konovalov [Tue, 23 Jun 2009 05:55:56 +0000 (05:55 +0000)]
o style(9) usage() definition: it doesn't need an argument.

15 years agoo Remove unneeded argument in fprintf(3) call in usage().
Maxim Konovalov [Tue, 23 Jun 2009 05:51:48 +0000 (05:51 +0000)]
o Remove unneeded argument in fprintf(3) call in usage().

Submitted by: Pawel Worach

15 years agoAdd cpufreq support on the PowerPC G5, along with a skeleton SMU driver
Nathan Whitehorn [Tue, 23 Jun 2009 04:28:32 +0000 (04:28 +0000)]
Add cpufreq support on the PowerPC G5, along with a skeleton SMU driver
in order to slew CPU voltage during frequency changes. The OpenBSD SMU
driver was an extremely helpful reference for this.

15 years agoFix copy/paste typo in last revision. PMC0 control should be shifted 8
Nathan Whitehorn [Tue, 23 Jun 2009 04:02:36 +0000 (04:02 +0000)]
Fix copy/paste typo in last revision. PMC0 control should be shifted 8
bits, not 6, on the PPC 970.

15 years ago- Make struct usb_xfer opaque so that drivers can not access the internals
Andrew Thompson [Tue, 23 Jun 2009 02:19:59 +0000 (02:19 +0000)]
- Make struct usb_xfer opaque so that drivers can not access the internals
- Reduce the number of headers needed for a usb driver, the common case is just   usb.h and usbdi.h

15 years agoAdd files missed in r194674.
Andrew Thompson [Tue, 23 Jun 2009 01:04:58 +0000 (01:04 +0000)]
Add files missed in r194674.

Add libusb 1.0 support which is compatible with the latest revision on
Sourceforge. Libusb 1.0 is a portable usb api released December 2008 and
supersedes the original libusb released 10 years ago, it supports isochronous
endpoints and asynchronous I/O.  Many applications have already started using
the interfaces.

This has been developed as part of Google Summer of Code this year by Sylvestre
Gallon and has been cribbed early due to it being desirable in FreeBSD 8.0

Submitted by: Sylvestre Gallon
Sponsored by: Google Summer of Code 2009
Reviewed by:  Hans Petter Selasky

15 years agoDescribe the new algorithm for handling __FreeBSD_version, specifically
Ken Smith [Tue, 23 Jun 2009 01:03:09 +0000 (01:03 +0000)]
Describe the new algorithm for handling __FreeBSD_version, specifically
the 'R' value now being allowed to take on more values than 0 or 1 and
permitting more than 100 version bumps in pre-release branches.

15 years agoAdd libusb 1.0 support which is compatible with the latest revision on
Andrew Thompson [Tue, 23 Jun 2009 01:00:26 +0000 (01:00 +0000)]
Add libusb 1.0 support which is compatible with the latest revision on
Sourceforge. Libusb 1.0 is a portable usb api released December 2008 and
supersedes the original libusb released 10 years ago, it supports isochronous
endpoints and asynchronous I/O.  Many applications have already started using
the interfaces.

This has been developed as part of Google Summer of Code this year by Sylvestre
Gallon and has been cribbed early due to it being desirable in FreeBSD 8.0

Submitted by: Sylvestre Gallon
Sponsored by: Google Summer of Code 2009
Reviewed by: Hans Petter Selasky

15 years agokill left over cruft
Sam Leffler [Mon, 22 Jun 2009 23:22:38 +0000 (23:22 +0000)]
kill left over cruft

15 years agoAdd soreceive_stream(), an optimized version of soreceive() for
Andre Oppermann [Mon, 22 Jun 2009 23:08:05 +0000 (23:08 +0000)]
Add soreceive_stream(), an optimized version of soreceive() for
stream (TCP) sockets.

It is functionally identical to generic soreceive() but has a
number stream specific optimizations:
o does only one sockbuf unlock/lock per receive independent of
  the length of data to be moved into the uio compared to
  soreceive() which unlocks/locks per *mbuf*.
o uses m_mbuftouio() instead of its own copy(out) variant.
o much more compact code flow as a large number of special
  cases is removed.
o much improved reability.

It offers significantly reduced CPU usage and lock contention
when receiving fast TCP streams.  Additional gains are obtained
when the receiving application is using SO_RCVLOWAT to batch up
some data before a read (and wakeup) is done.

This function was written by "reverse engineering" and is not
just a stripped down variant of soreceive().

It is not yet enabled by default on TCP sockets.  Instead it is
commented out in the protocol initialization in tcp_usrreq.c
until more widespread testing has been done.

Testers, especially with 10GigE gear, are welcome.

MFP4: r164817 //depot/user/andre/soreceive_stream/