]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoAdd KTR(9) tracing for futex emulation.
dchagin [Thu, 7 May 2009 16:14:31 +0000 (16:14 +0000)]
Add KTR(9) tracing for futex emulation.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoAdd my birthday
skreuzer [Thu, 7 May 2009 15:32:13 +0000 (15:32 +0000)]
Add my birthday

Approved by: wxs (mentor)

15 years agoAdding myself as a ports committer
skreuzer [Thu, 7 May 2009 14:39:01 +0000 (14:39 +0000)]
Adding myself as a ports committer

Approved by: wxs (mentor)

15 years agos/ath0/wlan0/ since we no longer use the real device directly.
emaste [Thu, 7 May 2009 14:34:49 +0000 (14:34 +0000)]
s/ath0/wlan0/ since we no longer use the real device directly.

15 years agoLinux exports HZ value to user space via AT_CLKTCK auxiliary vector entry,
dchagin [Thu, 7 May 2009 14:24:50 +0000 (14:24 +0000)]
Linux exports HZ value to user space via AT_CLKTCK auxiliary vector entry,
which is available for Glibc as sysconf(_SC_CLK_TCK). If AT_CLKTCK entry is
not exported, Glibc uses 100.

linux_times() shall use the value that is exported to user space.

Pointyhat to: dchagin

PR: kern/134251
Approved by: kib (mentor)
MFC after: 2 weeks

15 years agoAdd tcsetsid(3).
ed [Thu, 7 May 2009 13:49:48 +0000 (13:49 +0000)]
Add tcsetsid(3).

The entire world seems to use the non-standard TIOCSCTTY ioctl to make a
TTY a controlling terminal of a session. Even though tcsetsid(3) is also
non-standard, I think it's a lot better to use in our own source code,
mainly because it's similar to tcsetpgrp(), tcgetpgrp() and tcgetsid().

I stole the idea from QNX. They do it the other way around; their
TIOCSCTTY is just a wrapper around tcsetsid(). tcsetsid() then calls
into an IPC framework.

15 years agoChange linux struct tms definition to match actual linux one.
dchagin [Thu, 7 May 2009 12:55:58 +0000 (12:55 +0000)]
Change linux struct tms definition to match actual linux one.

Approved by: kib (mentor)
MFC after: 2 weeks

15 years agoAdd preliminary KTR(9) support to the linux emulation layer.
dchagin [Thu, 7 May 2009 10:01:05 +0000 (10:01 +0000)]
Add preliminary KTR(9) support to the linux emulation layer.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoTo avoid excessive code duplication move MI definitions to the MI
dchagin [Thu, 7 May 2009 09:39:20 +0000 (09:39 +0000)]
To avoid excessive code duplication move MI definitions to the MI
header file. As it is defined in Linux.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoReturn EAFNOSUPPORT instead of EINVAL in case when the incorrect or
dchagin [Thu, 7 May 2009 09:34:02 +0000 (09:34 +0000)]
Return EAFNOSUPPORT instead of EINVAL in case when the incorrect or
unsupported domain argument is specified.

Approved by: kib (mentor)

15 years agoEliminate an incorrect comment.
alc [Thu, 7 May 2009 05:44:13 +0000 (05:44 +0000)]
Eliminate an incorrect comment.

15 years agoDefine the kernel pmap in the same way on arm as on every other
alc [Thu, 7 May 2009 05:42:13 +0000 (05:42 +0000)]
Define the kernel pmap in the same way on arm as on every other
architecture.

Eliminate an unused definition.

Tested by: cognet

15 years agoRework r191742.
dchagin [Thu, 7 May 2009 03:23:22 +0000 (03:23 +0000)]
Rework r191742.
Use the protocol family constants for the domain argument validation.

Return EAFNOSUPPORT in case when the incorrect domain argument
is specified.

Return EPROTONOSUPPORT instead of passing values that are not 0
to the BSD layer.

Suggested by:   rwatson

Approved by: kib (mentor)
MFC after: 1 month

15 years agoAdd the Sierra AC885U and increase the max ports to 8.
thompsa [Thu, 7 May 2009 02:17:09 +0000 (02:17 +0000)]
Add the Sierra AC885U and increase the max ports to 8.

15 years ago- Fix the u3g port detection where it would not calculate the correct number of
thompsa [Thu, 7 May 2009 02:15:58 +0000 (02:15 +0000)]
- Fix the u3g port detection where it would not calculate the correct number of
  ports when multiple interfaces are present.
- Claim all interfaces regardless of how many are attached

15 years agoUse vendor and product macro expansion to make the device table smaller and
thompsa [Thu, 7 May 2009 02:13:56 +0000 (02:13 +0000)]
Use vendor and product macro expansion to make the device table smaller and
more readable.

15 years agooptimize ath_tx_findrix: there's no need to walk the rates table as
sam [Thu, 7 May 2009 00:35:32 +0000 (00:35 +0000)]
optimize ath_tx_findrix: there's no need to walk the rates table as
sc_rixmap is an inverse map

NB: could eliminate the check for an invalid rate by filling in 0 for
    invalid entries but the rate control modules use it to identify
    bogus rates so leave it for now

15 years agoo cleanup checks for which vap combinations are permitted and what to
sam [Wed, 6 May 2009 23:49:55 +0000 (23:49 +0000)]
o cleanup checks for which vap combinations are permitted and what to
  use for ic_opmode
o fixes the case where creating ahdemo+wds vaps caused ic_opmode to be
  set to hostap

15 years agoadd support for the Beacon Not Ready (BNR) interrupt
sam [Wed, 6 May 2009 23:09:26 +0000 (23:09 +0000)]
add support for the Beacon Not Ready (BNR) interrupt
(available on 5211 and later)

15 years agoUse the good hints for the NSLU, it should fix the network adapter.
cognet [Wed, 6 May 2009 20:24:17 +0000 (20:24 +0000)]
Use the good hints for the NSLU, it should fix the network adapter.

PR: arm/134092
Submitted by: gavin

15 years agofix grammar...
jmg [Wed, 6 May 2009 20:07:28 +0000 (20:07 +0000)]
fix grammar...

Reviewed by: cperciva

15 years ago- Split up the BIO queue into a queue for new and one for completed requests.
lulf [Wed, 6 May 2009 19:34:32 +0000 (19:34 +0000)]
- Split up the BIO queue into a queue for new and one for completed requests.
  This is necessary for two reasons:
  1) In order to avoid collisions with the use of a BIOs flags set by a consumer
     or a provider
  2) Because GV_BIO_DONE was used to mark a BIO as done, not enough flags was
     available, so the consumer flags of a BIO had to be misused in order to
     support enough flags. The new queue makes it possible to recycle the
     GV_BIO_DONE flag into GV_BIO_GROW.
  As a consequence, gvinum will now work with any other GEOM class under it or
  on top of it.

- Use bio_pflags for storing internal flags on downgoing BIOs, as the requests
  appear to come from a consumer of a gvinum volume. Use bio_cflags only for
  cloned BIOs.
- Move gv_post_bio to be used internally for maintenance requests.
- Remove some cases where flags where set without need.

PR: kern/133604

15 years ago- Fix a case where a RAID5 volume would think that it is supposed to grow a new
lulf [Wed, 6 May 2009 19:18:19 +0000 (19:18 +0000)]
- Fix a case where a RAID5 volume would think that it is supposed to grow a new
  subdisk after a parity rebuild.

15 years ago- Check if any plexes are doing internal maintenance before removing them.
lulf [Wed, 6 May 2009 19:06:28 +0000 (19:06 +0000)]
- Check if any plexes are doing internal maintenance before removing them.

15 years ago- Add forgotten KASSERT.
lulf [Wed, 6 May 2009 18:37:32 +0000 (18:37 +0000)]
- Add forgotten KASSERT.

15 years ago- Fix a bug where the bio_data field of the wrong BIO is freed if an error
lulf [Wed, 6 May 2009 18:27:28 +0000 (18:27 +0000)]
- Fix a bug where the bio_data field of the wrong BIO is freed if an error
  occurs when doing a RAID5 request.

15 years ago- GV_BIO_RETRY is not used, and it is actually impossible with more than 8
lulf [Wed, 6 May 2009 18:24:56 +0000 (18:24 +0000)]
- GV_BIO_RETRY is not used, and it is actually impossible with more than 8
  values for bio_cflags/bio_pflags.

15 years ago- Split the queue mutex into one for the event queue and one for the BIO queue,
lulf [Wed, 6 May 2009 18:21:48 +0000 (18:21 +0000)]
- Split the queue mutex into one for the event queue and one for the BIO queue,
  as they do not really relate and to prepare for an additional queue to be
  covered by the BIO queue mutex.
- Implement wrappers for fetching the next element from the event queue as well
  as for putting a new element into the BIO queue.

15 years agoDisable adaptive mutexes and rwlocks for XENHVM.
dfr [Wed, 6 May 2009 17:52:38 +0000 (17:52 +0000)]
Disable adaptive mutexes and rwlocks for XENHVM.

15 years agoFix XENHVM build.
dfr [Wed, 6 May 2009 17:48:39 +0000 (17:48 +0000)]
Fix XENHVM build.

15 years agoRemove unnecessary CURVNET_SET() calls where curvnet context is
zec [Wed, 6 May 2009 13:30:46 +0000 (13:30 +0000)]
Remove unnecessary CURVNET_SET() calls where curvnet context is
(i.e. seems to be) already set.

This should reduce console noise due to curvnet recursion reports.

This change has no impact on nooptions VIMAGE builds.
Approved by: julian (mentor)

15 years agoUnbreak options VIMAGE kernel builds.
zec [Wed, 6 May 2009 08:49:39 +0000 (08:49 +0000)]
Unbreak options VIMAGE kernel builds.

Approved by: julian (mentor)

15 years agoReduce diffs against i386.
nyan [Wed, 6 May 2009 04:40:18 +0000 (04:40 +0000)]
Reduce diffs against i386.
Use the hardclockintr function.

15 years agorevert r191633; this breaks at91 & xscale (likely all arm)
sam [Wed, 6 May 2009 01:50:04 +0000 (01:50 +0000)]
revert r191633; this breaks at91 & xscale (likely all arm)

15 years agoo FreeBSD 7.2 added.
maxim [Tue, 5 May 2009 20:54:26 +0000 (20:54 +0000)]
o FreeBSD 7.2 added.

15 years agoAdd my birthday to the calendar.
rene [Tue, 5 May 2009 16:45:25 +0000 (16:45 +0000)]
Add my birthday to the calendar.

Approved by: remko

15 years agoGPT style partitioning for loader(8) with U-Boot support library (tested on
raj [Tue, 5 May 2009 16:29:08 +0000 (16:29 +0000)]
GPT style partitioning for loader(8) with U-Boot support library (tested on
ARM).

Submitted by: Piotr Ziecik kosmo ! semihalf dot com

15 years agoSilence unsolicited spam printed out when KTR_MLD happens to be
kan [Tue, 5 May 2009 16:27:45 +0000 (16:27 +0000)]
Silence unsolicited spam printed out when KTR_MLD happens to be
in KTR_COMPILE mask. Compiling KTR trace points in does not necessarily
mean enabling them, use proper check against ktr_mask instead.

15 years agoUnbreak LINT build, caused by a change in struct ng_node layout introduced
zec [Tue, 5 May 2009 16:26:06 +0000 (16:26 +0000)]
Unbreak LINT build, caused by a change in struct ng_node layout introduced
with r191816, which become uncovered only with NETGRAPH_DEBUG defined.

NOT approved by mentor (julian) due to emergency.

15 years agoMake sure the frame list base address is re-programmed after stopping the USB
thompsa [Tue, 5 May 2009 15:41:30 +0000 (15:41 +0000)]
Make sure the frame list base address is re-programmed after stopping the USB
schedule, in case the hardware clears the frame list base address.

Submitted by: Hans Petter Selasky
Reported by: Chao Shin

15 years agoRemove USB shutdown methods from device drivers as its the host controllers
thompsa [Tue, 5 May 2009 15:39:29 +0000 (15:39 +0000)]
Remove USB shutdown methods from device drivers as its the host controllers
responsibility to detach the bus.

PR: usb/133896
Submitted by: Hans Petter Selasky

15 years agoRevert part of r191494 which used the udev state to mark suspending, this needs
thompsa [Tue, 5 May 2009 15:36:23 +0000 (15:36 +0000)]
Revert part of r191494 which used the udev state to mark suspending, this needs
to be set via two variables (peer_suspended and self_suspended) and can not be
merged into one.

Submitted by: Hans Petter Selasky
Pointy hat: me

15 years agoAdd myself as a mentee of dwmalone for the committers graph. Also add my
snb [Tue, 5 May 2009 15:03:19 +0000 (15:03 +0000)]
Add myself as a mentee of dwmalone for the committers graph. Also add my
birthday to the calendar.

Approved by: dwmalone (mentor)

15 years agoMake gmultipath(8) easier to find.
trasz [Tue, 5 May 2009 13:48:53 +0000 (13:48 +0000)]
Make gmultipath(8) easier to find.

15 years ago- Add support for PXA270 cpu.
stas [Tue, 5 May 2009 12:57:16 +0000 (12:57 +0000)]
- Add support for PXA270 cpu.

Submitted by: Jacques Fourie <jacques.fourie@gmail.com>

15 years agoChange the curvnet variable from a global const struct vnet *,
zec [Tue, 5 May 2009 10:56:12 +0000 (10:56 +0000)]
Change the curvnet variable from a global const struct vnet *,
previously always pointing to the default vnet context, to a
dynamically changing thread-local one.  The currvnet context
should be set on entry to networking code via CURVNET_SET() macros,
and reverted to previous state via CURVNET_RESTORE().  Recursions
on curvnet are permitted, though strongly discuouraged.

This change should have no functional impact on nooptions VIMAGE
kernel builds, where CURVNET_* macros expand to whitespace.

The curthread->td_vnet (aka curvnet) variable's purpose is to be an
indicator of the vnet context in which the current network-related
operation takes place, in case we cannot deduce the current vnet
context from any other source, such as by looking at mbuf's
m->m_pkthdr.rcvif->if_vnet, sockets's so->so_vnet etc.  Moreover, so
far curvnet has turned out to be an invaluable consistency checking
aid: it helps to catch cases when sockets, ifnets or any other
vnet-aware structures may have leaked from one vnet to another.

The exact placement of the CURVNET_SET() / CURVNET_RESTORE() macros
was a result of an empirical iterative process, whith an aim to
reduce recursions on CURVNET_SET() to a minimum, while still reducing
the scope of CURVNET_SET() to networking only operations - the
alternative would be calling CURVNET_SET() on each system call entry.
In general, curvnet has to be set in three typicall cases: when
processing socket-related requests from userspace or from within the
kernel; when processing inbound traffic flowing from device drivers
to upper layers of the networking stack, and when executing
timer-driven networking functions.

This change also introduces a DDB subcommand to show the list of all
vnet instances.

Approved by: julian (mentor)

15 years agoAdd a constant PR_MAXMETHOD to better define the jail/OSD interface.
jamie [Tue, 5 May 2009 05:49:08 +0000 (05:49 +0000)]
Add a constant PR_MAXMETHOD to better define the jail/OSD interface.

Reviewed by: dchagin, kib
Approved by: bz (mentor)

15 years agoDo not try to initialize LAPIC timer if we are not going to use it.
mav [Tue, 5 May 2009 01:13:20 +0000 (01:13 +0000)]
Do not try to initialize LAPIC timer if we are not going to use it.
It solves assertion, when kernel built with INVARIANTS configured
to use i8254 timer.

15 years agoAlways compute the root of the kernel source tree and explicitly pass it
jhb [Mon, 4 May 2009 20:25:56 +0000 (20:25 +0000)]
Always compute the root of the kernel source tree and explicitly pass it
to module builds.  This avoids having to have the module builds walk up
the tree to find the kernel sources.  It also allows a kernel + module
build to succeed when a new level of module subdirectories is added without
requiring that the /usr/share/mk/bsd.kmod.mk file on the machine be patched.

MFC after: 1 week

15 years agoMark Linux MIB sysctls MPSAFE.
jamie [Mon, 4 May 2009 19:06:05 +0000 (19:06 +0000)]
Mark Linux MIB sysctls MPSAFE.

Reviewed by: dchagin, kib
Approved by: bz (mentor)

15 years agoOur grantpt(3) and unlockpt(3) don't comply with POSIX.
ed [Mon, 4 May 2009 18:14:45 +0000 (18:14 +0000)]
Our grantpt(3) and unlockpt(3) don't comply with POSIX.

15 years agoUnlock the largest standard CPUID on Intel CPUs for both amd64 and i386 and
jkim [Mon, 4 May 2009 18:05:27 +0000 (18:05 +0000)]
Unlock the largest standard CPUID on Intel CPUs for both amd64 and i386 and
fix SMP topology detection.  On i386, we extend it to cover Core, Core 2,
and Core i7 processors, not just Pentium 4 family, and move it to better
place.  On amd64, all supported Intel CPUs should have this MSR.

15 years ago- Make the gvinum softc invisible to userland, as it is not needed.
lulf [Mon, 4 May 2009 17:30:20 +0000 (17:30 +0000)]
- Make the gvinum softc invisible to userland, as it is not needed.

15 years ago Add the experimental nfs subtree to the kernel, that includes
rmacklem [Mon, 4 May 2009 15:23:58 +0000 (15:23 +0000)]
Add the experimental nfs subtree to the kernel, that includes
support for NFSv4 as well as NFSv2 and 3.
It lives in 3 subdirs under sys/fs:
nfs - functions that are common to the client and server
nfsclient - a mutation of sys/nfsclient that call generic functions
to do RPCs and handle state. As such, it retains the
buffer cache handling characteristics and vnode semantics that
are found in sys/nfsclient, for the most part.
nfsserver - the server. It includes a DRC designed specifically for
NFSv4, that is used instead of the generic DRC in sys/rpc.
The build glue will be checked in later, so at this point, it
consists of 3 new subdirs that should not affect kernel building.

Approved by: kib (mentor)

15 years agoRemove unneeded check for SESS_LEADER().
ed [Mon, 4 May 2009 11:11:10 +0000 (11:11 +0000)]
Remove unneeded check for SESS_LEADER().

We perform the same check ~10 lines above.

15 years agoOops, sorry. Fix for fix.
mav [Mon, 4 May 2009 08:41:54 +0000 (08:41 +0000)]
Oops, sorry. Fix for fix.

15 years agoThere is no atrtc driver in pc98, so hide atrtcclock_disable variable usage
mav [Mon, 4 May 2009 08:36:47 +0000 (08:36 +0000)]
There is no atrtc driver in pc98, so hide atrtcclock_disable variable usage
in APM driver for this platform. This should fix pc98 build.

15 years agoFix whitespace and sorting in Symbol.map.
ed [Mon, 4 May 2009 08:06:52 +0000 (08:06 +0000)]
Fix whitespace and sorting in Symbol.map.

15 years agoEliminate vnode_pager_input_smlfs()'s pointless call to pmap_clear_modify().
alc [Mon, 4 May 2009 06:30:00 +0000 (06:30 +0000)]
Eliminate vnode_pager_input_smlfs()'s pointless call to pmap_clear_modify().
The page can't possibly have any modified page table entries because it
isn't even mapped.

15 years agoRemove redundant NFSMNT_NFSV3 check in DTrace hooks for NFS RPC.
rwatson [Mon, 4 May 2009 02:19:52 +0000 (02:19 +0000)]
Remove redundant NFSMNT_NFSV3 check in DTrace hooks for NFS RPC.

MFC after: 1 month

15 years agoFix typo in comment.
rwatson [Mon, 4 May 2009 02:06:39 +0000 (02:06 +0000)]
Fix typo in comment.

MFC after: 1 month

15 years agoThis belongs in //svn.freebsd.org/base/vendor/file/dist now.
obrien [Mon, 4 May 2009 00:42:15 +0000 (00:42 +0000)]
This belongs in //svn.freebsd.org/base/vendor/file/dist now.

15 years agoMerge vendor/file/dist@191739, bringing FILE 5.00 to 8-CURRENT.
obrien [Mon, 4 May 2009 00:37:44 +0000 (00:37 +0000)]
Merge vendor/file/dist@191739, bringing FILE 5.00 to 8-CURRENT.

15 years agoRelax the condition for printing the lost state transition message. The new
thompsa [Sun, 3 May 2009 18:29:04 +0000 (18:29 +0000)]
Relax the condition for printing the lost state transition message. The new
state will be set before the EXT_STATEWAIT flag is cleared and its ok to
transition again at that point.

15 years agoRename statclock_disable variable to atrtcclock_disable that it actually is,
mav [Sun, 3 May 2009 17:47:21 +0000 (17:47 +0000)]
Rename statclock_disable variable to atrtcclock_disable that it actually is,
and hide it inside of atrtc driver. Add new tunable hint.atrtc.0.clock
controlling it. Setting it to 0 disables using RTC clock as stat-/
profclock sources.

Teach i386 and amd64 SMP platforms to emulate stat-/profclocks using i8254
hardclock, when LAPIC and RTC clocks are disabled.

This allows to reduce global interrupt rate of idle system down to about
100 interrupts per core, permitting C3 and deeper C-states provide maximum
CPU power efficiency.

15 years agoMake dev.cpu.X.cx_usage sysctl also report current average of sleep time.
mav [Sun, 3 May 2009 06:25:37 +0000 (06:25 +0000)]
Make dev.cpu.X.cx_usage sysctl also report current average of sleep time.

15 years agoRemove unused variable and fix spelling in comment.
mav [Sun, 3 May 2009 04:58:44 +0000 (04:58 +0000)]
Remove unused variable and fix spelling in comment.

15 years agoBring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for
imp [Sun, 3 May 2009 04:01:43 +0000 (04:01 +0000)]
Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for
Broadcom BCM43xx chipsets.  This driver uses the v3 firmware that
needs to be fetched separately.  A port will be committed to create
the bwi firmware module.

The driver matches the following chips: Broadcom BCM4301, BCM4307,
BCM4306, BCM4309, BCM4311, BCM4312, BCM4318, BCM4319

The driver works for 802.11b and 802.11g.

Limitations:
This doesn't support the 802.11a or 802.11n portion of radios.
Some BCM4306 and BCM4309 cards don't work with Channel 1, 2 or 3.
Documenation for this firmware is reverse engineered from
 http://bcm.sipsolutions.net/
V4 of the firmware is needed for 11a or 11n support
 http://bcm-v4.sipsolutions.net/
Firmware needs to be fetched from a third party, port to be committed

# I've tested this with a BCM4319 mini-pci and a BCM4318 CardBus card, and
# not connected it to the build until the firmware port is committed.

Obtained from: DragonFlyBSD, //depot/projects/vap
Reviewed by: sam@, thompsa@

15 years agoMFi386: revision 191745
nyan [Sun, 3 May 2009 02:37:13 +0000 (02:37 +0000)]
MFi386: revision 191745

  Add support for using i8254 and rtc timers as event sources for i386 SMP
  system. Redistribute hard-/stat-/profclock events to other CPUs using IPI.

15 years agoAvoid comparing negative signed to positive unsignad values. It was
mav [Sat, 2 May 2009 22:30:33 +0000 (22:30 +0000)]
Avoid comparing negative signed to positive unsignad values. It was
leading to a bug, when C-state does not decrease on sleep shorter then
declared transition latency. Fixing this deprecates workaround for broken
C-states on some hardware.

By the way, change state selecting logic a bit. Instead of last sleep
time use short-time average of it. Global interrupts rate in system is a
quite random value, to corellate subsequent sleeps so directly.

15 years agofix XEN compilation
kmacy [Sat, 2 May 2009 22:22:00 +0000 (22:22 +0000)]
fix XEN compilation

15 years agodon't say "ac WME_AC_BE"; remove "ac"
sam [Sat, 2 May 2009 20:28:55 +0000 (20:28 +0000)]
don't say "ac WME_AC_BE"; remove "ac"

15 years agopromote ieee80211_seq typedef
sam [Sat, 2 May 2009 20:25:22 +0000 (20:25 +0000)]
promote ieee80211_seq typedef

15 years agoo dump tx/rx seq#'s for qos tid's
sam [Sat, 2 May 2009 20:21:21 +0000 (20:21 +0000)]
o dump tx/rx seq#'s for qos tid's
o improve check for when to dump rx ampdu state

15 years agowhitespace
sam [Sat, 2 May 2009 20:18:18 +0000 (20:18 +0000)]
whitespace

15 years agomake superg/fast-frames state dynamically-allocated (and indirect off
sam [Sat, 2 May 2009 20:16:55 +0000 (20:16 +0000)]
make superg/fast-frames state dynamically-allocated (and indirect off
the com structure instead of embedded); this reduces the overhead when
not configured and reduces visibility of the contents

15 years agoCreate a taskqueue for each wireless interface which provides a serialised
thompsa [Sat, 2 May 2009 15:14:18 +0000 (15:14 +0000)]
Create a taskqueue for each wireless interface which provides a serialised
sleepable context for net80211 driver callbacks. This removes the need for USB
and firmware based drivers to roll their own code to defer the chip programming
for state changes, scan requests, channel changes and mcast/promisc updates.
When a driver callback completes the hardware state is now guaranteed to have
been updated and is in sync with net80211 layer.

This nukes around 1300 lines of code from the wireless device drivers making
them more readable and less race prone.

The net80211 layer has been updated as follows
 - all state/channel changes are serialised on the taskqueue.
 - ieee80211_new_state() always queues and can now be called from any context
 - scanning runs from a single taskq function and executes to completion. driver
   callbacks are synchronous so the channel, phy mode and rx filters are
   guaranteed to be set in hardware before probe request frames are
   transmitted.

Help and contributions from Sam Leffler.

Reviewed by: sam

15 years agoAdd support for using i8254 and rtc timers as event sources for i386 SMP
mav [Sat, 2 May 2009 12:59:47 +0000 (12:59 +0000)]
Add support for using i8254 and rtc timers as event sources for i386 SMP
system. Redistribute hard-/stat-/profclock events to other CPUs using IPI.

15 years agoAdd support for using i8254 and rtc timers as event sources for amd64 SMP
mav [Sat, 2 May 2009 12:20:43 +0000 (12:20 +0000)]
Add support for using i8254 and rtc timers as event sources for amd64 SMP
system. Redistribute hard-/stat-/profclock events to other CPUs using IPIs.

15 years agoFix typos:
hrs [Sat, 2 May 2009 11:59:56 +0000 (11:59 +0000)]
Fix typos:
s,Novatal,Novatel,
s,/sys/dev/u3g.c,/sys/dev/usb/serial/u3g.c,

MFC after:      3 days

15 years agoLinux socketpair() call expects explicit specified protocol for
dchagin [Sat, 2 May 2009 10:51:40 +0000 (10:51 +0000)]
Linux socketpair() call expects explicit specified protocol for
AF_LOCAL domain unlike FreeBSD which expects 0 in this case.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoMove extern variable definitions to the header file.
dchagin [Sat, 2 May 2009 10:06:49 +0000 (10:06 +0000)]
Move extern variable definitions to the header file.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoVirgin import of Christos Zoulas's FILE 5.00.
obrien [Sat, 2 May 2009 08:22:49 +0000 (08:22 +0000)]
Virgin import of Christos Zoulas's FILE 5.00.

15 years agoMake indentation more uniform accross vnet container structs.
zec [Sat, 2 May 2009 08:16:26 +0000 (08:16 +0000)]
Make indentation more uniform accross vnet container structs.

This is a purely cosmetic / NOP change.

Reviewed by: bz
Approved by: julian (mentor)
Verified by: svn diff -x -w producing no output

15 years agoMention -h in usage() and manpage. Rename term_{r,e} to term_{so,se}.
rdivacky [Sat, 2 May 2009 07:02:31 +0000 (07:02 +0000)]
Mention -h in usage() and manpage. Rename term_{r,e} to term_{so,se}.

Suggested by: ru
Approved by: ed (mentor)

15 years agoVirgin import of Christos Zoulas's FILE 5.00.
obrien [Sat, 2 May 2009 06:25:51 +0000 (06:25 +0000)]
Virgin import of Christos Zoulas's FILE 5.00.

15 years agoA variety of changes:
alc [Sat, 2 May 2009 06:12:38 +0000 (06:12 +0000)]
A variety of changes:

Reimplement "kernel_pmap" in the standard way.

Eliminate unused variables.  (These are mostly variables that were
discarded by the machine-independent layer after FreeBSD 4.x.)

Properly handle a vm_page_alloc() failure in pmap_init().

Eliminate dead or legacy (FreeBSD 4.x) code.

Eliminate unnecessary page queues locking.

Eliminate some excess white space.

Correct the synchronization of pmap_page_exists_quick().

Tested by: gonzo

15 years agoUnbreak options VIMAGE + nooptions INVARIANTS kernel builds.
zec [Sat, 2 May 2009 05:02:28 +0000 (05:02 +0000)]
Unbreak options VIMAGE + nooptions INVARIANTS kernel builds.

Submitted by: julian
Approved by: julian (mentor)

15 years agoAdd resume methods to i8254 and atrtc devices.
mav [Fri, 1 May 2009 21:43:04 +0000 (21:43 +0000)]
Add resume methods to i8254 and atrtc devices.

15 years agorevert wip
sam [Fri, 1 May 2009 21:31:39 +0000 (21:31 +0000)]
revert wip

15 years agoRename MAC Framework-internal macros used to invoke policy entry points:
rwatson [Fri, 1 May 2009 21:05:40 +0000 (21:05 +0000)]
Rename MAC Framework-internal macros used to invoke policy entry points:

  MAC_BOOLEAN           -> MAC_POLICY_BOOLEAN
  MAC_BOOLEAN_NOSLEEP   -> MAC_POLICY_BOOLEANN_NOSLEEP
  MAC_CHECK             -> MAC_POLICY_CHECK
  MAC_CHECK_NOSLEEP     -> MAC_POLICY_CHECK_NOSLEEP
  MAC_EXTERNALIZE       -> MAC_POLICY_EXTERNALIZE
  MAC_GRANT             -> MAC_POLICY_GRANT
  MAC_GRANT_NOSLEEP     -> MAC_POLICY_GRANT_NOSLEEP
  MAC_INTERNALIZE       -> MAC_POLICY_INTERNALIZE
  MAC_PERFORM           -> MAC_POLICY_PERFORM_CHECK
  MAC_PERFORM_NOSLEEP   -> MAC_POLICY_PERFORM_NOSLEEP

This frees up those macro names for use in wrapping calls into the MAC
Framework from the remainder of the kernel.

Obtained from: TrustedBSD Project

15 years agoSmall addition to r191720.
mav [Fri, 1 May 2009 20:53:37 +0000 (20:53 +0000)]
Small addition to r191720.

Restore previous behaviour for the case of unknown interrupt. Invocation
of IRQ -1 crashes my system on resume. Returning 0, as it was, is not
perfect also, but at least not so dangerous.

15 years agoReorder the bridge add and delete routines to avoid calling ifpromisc() with
thompsa [Fri, 1 May 2009 19:46:42 +0000 (19:46 +0000)]
Reorder the bridge add and delete routines to avoid calling ifpromisc() with
the bridge lock held.

15 years agoo add uath
sam [Fri, 1 May 2009 17:20:16 +0000 (17:20 +0000)]
o add uath
o sort usb wireless drivers

15 years agoadd more tdma fixed rate defaults
sam [Fri, 1 May 2009 17:18:45 +0000 (17:18 +0000)]
add more tdma fixed rate defaults

15 years agoadd uath; sort usb wireless drivers
sam [Fri, 1 May 2009 17:17:06 +0000 (17:17 +0000)]
add uath; sort usb wireless drivers

15 years agoadd uath
sam [Fri, 1 May 2009 17:16:33 +0000 (17:16 +0000)]
add uath

15 years agoadd ralfw
sam [Fri, 1 May 2009 17:15:29 +0000 (17:15 +0000)]
add ralfw

15 years agoUse value -1 instead of 0 for marking unused APIC vectors. This fixes
mav [Fri, 1 May 2009 17:05:49 +0000 (17:05 +0000)]
Use value -1 instead of 0 for marking unused APIC vectors. This fixes
IRQ0 routing on LAPIC-enabled systems.

Add hint.apic.0.clock tunable. Setting it 0 disables using LAPIC timers
as hard-/stat-/profclock sources falling back to using i8254 and rtc timers.

On modern CPUs LAPIC is a part of CPU core which is shutting down when CPU
enters C3 or deeper power state. It makes no problems for interrupt
processing, as chipset wakes up CPU on interrupt triggering. But entering
C3 state kills LAPIC timer and freezes system time, making C3 and deeper
states practically unusable. Using i8254 timer allows to avoid this
problem.

By using i8254 timer my T7700 C2D CPU with UP kernel successfully enters
C3 state, saving more then a Watt of total idle power (>10%) in addition to
all other power-saving techniques.

This technique is not working for SMP yet, as only one CPU receives
timer interrupts. But I think that problem could be fixed by forwarding
interrupts to other CPUs with IPI.

15 years agoReimplement futexes.
dchagin [Fri, 1 May 2009 15:36:02 +0000 (15:36 +0000)]
Reimplement futexes.
Old implemention used Giant to protect the kernel data structures,
but at the same time called malloc(M_WAITOK), that could cause the
calling thread to sleep and lost Giant protection. User-visible
result was the missed wakeup.

New implementation uses one sx lock per futex. The sx protects
the futex structures and allows to sleep while copyin or copyout
are performed.

Unlike linux, we return EINVAL when FUTEX_CMP_REQUEUE operation
is requested and either caller specified futexes are equial or
second futex already exists. This is acceptable since the situation
can only occur from the application error, and glibc falls back to
old FUTEX_WAKE operation when FUTEX_CMP_REQUEUE returns an error.

Approved by: kib (mentor)
MFC after: 1 month