]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years ago- enable multiple transmit queues
kmacy [Sat, 22 Nov 2008 08:05:05 +0000 (08:05 +0000)]
- enable multiple transmit queues
- invert sense of hw.cxgb.singleq tunable to hw.cxgb.multiq
- don't wake up transmitting thread by default
- add per tx queue ifaltq to handle ALTQ
- remove several unused functions in cxgb_multiq.c
- add several sysctls: multiq_tx_enable, coalesce_tx_enable,
  and wakeup_tx_thread
- this obsoletes the hw.cxgb.snd_queue_len as ifq is replaced
  by a buf_ring

15 years agoconvert calls to IFQ_HANDOFF to if_transmit
kmacy [Sat, 22 Nov 2008 07:35:45 +0000 (07:35 +0000)]
convert calls to IFQ_HANDOFF to if_transmit

15 years agoDefine mb(), rmb() and wmb() for real.
marcel [Sat, 22 Nov 2008 06:56:49 +0000 (06:56 +0000)]
Define mb(), rmb() and wmb() for real.

15 years ago- bump __FreeBSD version to reflect added buf_ring, memory barriers,
kmacy [Sat, 22 Nov 2008 05:55:56 +0000 (05:55 +0000)]
- bump __FreeBSD version to reflect added buf_ring, memory barriers,
  and ifnet functions

- add memory barriers to <machine/atomic.h>
- update drivers to only conditionally define their own

- add lockless producer / consumer ring buffer
- remove ring buffer implementation from cxgb and update its callers

- add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to
  allow drivers to efficiently manage multiple hardware queues
  (i.e. not serialize all packets through one ifq)
- expose if_qflush to allow drivers to flush any driver managed queues

This work was supported by Bitgravity Inc. and Chelsio Inc.

15 years agoSeveral small additions to the Chelsio 10G driver.
gnn [Fri, 21 Nov 2008 19:22:25 +0000 (19:22 +0000)]
Several small additions to the Chelsio 10G driver.

1) Fix a bug in dealing with the Alerus 1006 PHY which prevented the
device from ever coming back up once it had been set to down.

2) Add a kernel tunable (hw.cxgb.snd_queue_len) which makes it possible
to give the device more than IFQ_MAXLEN entries in its send queue.  The
default remains 50.

3) Add code to place the card'd identification and serial number into
its description (%desc) so that users can tell which card they have
installed.

15 years ago'Strict EAP conformance' makes more sense here than 'String EAP
imp [Fri, 21 Nov 2008 18:15:39 +0000 (18:15 +0000)]
'Strict EAP conformance' makes more sense here than 'String EAP
conformance.'

15 years agouse the correct variable in a debug message.
luigi [Fri, 21 Nov 2008 09:14:29 +0000 (09:14 +0000)]
use the correct variable in a debug message.

15 years agoAdd definitions for ZFS pool version 13.
dfr [Fri, 21 Nov 2008 09:10:35 +0000 (09:10 +0000)]
Add definitions for ZFS pool version 13.

15 years agoDisconnect gptzfsboot from the build until dfr@ gets his act together.
des [Fri, 21 Nov 2008 08:10:07 +0000 (08:10 +0000)]
Disconnect gptzfsboot from the build until dfr@ gets his act together.

15 years agoCreate a /dev/cardbus%d.cis, to be compatible with older versions of
imp [Fri, 21 Nov 2008 03:03:57 +0000 (03:03 +0000)]
Create a /dev/cardbus%d.cis, to be compatible with older versions of
the software.  This is a trivial amount of code to keep wireless
monitoring software working...  I plan on removing it in 9.0.

15 years ago- According to OpenSolaris, CDMA flushing/syncing for Tomatillos
marius [Thu, 20 Nov 2008 18:44:09 +0000 (18:44 +0000)]
- According to OpenSolaris, CDMA flushing/syncing for Tomatillos
  and XMITS has to be basically done in the same manner as for
  the Sabres, i.e. only for devices behind PCI-PCI-bridges and
  after a PIO read on the far side of the farest PCI-PCI-bridge.
  Given that the Tomatillo documentation mentions no difference
  to the Schizo bridges in this regard and this is also still
  part of the procedure described Schizo documentation this
  seems about right so adjust accordingly (the unconditional
  CDMA flushing/syncing previously done was based on how Linux
  behaves).
- Implement CDMA flushing/syncing for Schizo version >= 5,
  which requires the workaround described in Schizo Errata I-23.
  According to Schizo Errata I-13 it's just unusable with
  version < 5 though. [1]
- Don't register the Schizo streaming buffer for now until it's
  usage is sorted out according to the erratas.
- Register our interrupt filters with the revived INTR_FAST so
  they these interrupts can even interrupt filters of device
  drivers as necessary.
- Remove the comment regarding lack of newbus'ified bus_dma(9)
  as being able to associate a DMA tag with a device would
  allow to implement CDMA flushing/syncing in bus_dmamap_sync(9)
  but that would totally kill performance. Given that for devices
  not behind a PCI-PCI bridge the host-to-PCI bridges also only
  do CDMA flushing/syncing based on interrupts there's no
  additional disadvantage for polling(4) callbacks in the case
  schizo(4) has to do the CDMA flushing/syncing but rather a
  general problem.

Reported by: Michael Moll [1]

15 years agoAs reported in kern/118222, pxeboot in RELENG7 (and presumably
luigi [Thu, 20 Nov 2008 14:57:09 +0000 (14:57 +0000)]
As reported in kern/118222, pxeboot in RELENG7 (and presumably
above) exhibits some misbehaviours on machines with AMD64 CPUs,
which at least in some cases I have tracked down to a heap overflow.

It is unclear whether it depends on the CPU or on the pxe bios
itself which may use more memory on AMD machines.

Noticeably a pxeboot compiled from 6.x sources works fine on all
machines I have tried so far, while a pxeboot compiled from 7.x
sources does not.

This patch is a first step in reducing the amount of memory used
while processing the configuration files read by the loader at boot
(some of them are quite large, 1700+ lines), and it does so by:
+ moving a buffer to static memory instead of allocating in the heap;
+ skipping empty lines;
+ reducing the amount of memory used for line descriptors;

Unfortunately there are several changes between 6.x and above,
affecting the compiler, the loader code itself, and libstand,
and it is not so straightforward to
These changes fix the behaviour on one motherboard with a
single-core AMD cpu, but are still not enough e.g on an Asus
M2N-VM (with a dual-core CPU).

I need to investigate the problem a bit more before figuring
out what should be committed to RELENG_7

PR: kern/118222

15 years agodamn. Always do make depend. Forgot to recompile main because of it,
imp [Thu, 20 Nov 2008 08:32:19 +0000 (08:32 +0000)]
damn.  Always do make depend.  Forgot to recompile main because of it,
so the changes for the struct cis -> struct tuple_list didn't get
made.  They have been now.

15 years agoFix check for link target so we don't print cardbus CIS information twice.
imp [Thu, 20 Nov 2008 08:30:15 +0000 (08:30 +0000)]
Fix check for link target so we don't print cardbus CIS information twice.
Also, eliminate some magic constants and replace them with values from cis.h.

15 years agoRestore now-useless ioctl as a roadmap. The original dumpcis code
imp [Thu, 20 Nov 2008 08:20:53 +0000 (08:20 +0000)]
Restore now-useless ioctl as a roadmap.  The original dumpcis code
assumed it had to toggle between attribute and common memory in the
cards.  The kernel is supposed to cope with that automatically and
give us a tuple list.  However, there's a number of details of how
that happens that's currently, ummm, magical and/or not implemented
for 16-bit PC Cards that have CIS_LONGLINK_C tuples in them (eg, mix
both attribute memory and common memory).  Also, CIS_LOGNLINK_A
entries might not be handled completely correctly either, since there
can be gaps in the attribute vs common stuff.

All this will need to be corrected in the kernel.  Once it is
corrected, dumpcis can be made even simpler in some ways, a little
more complicated in others once an API for presentation of CIS to
userland in these weird cases is settled upon.

15 years agoMore dead code removal.
imp [Thu, 20 Nov 2008 08:14:14 +0000 (08:14 +0000)]
More dead code removal.

15 years agoThe original programs that this code was lifted from (pccardd and
imp [Thu, 20 Nov 2008 08:12:26 +0000 (08:12 +0000)]
The original programs that this code was lifted from (pccardd and
pccardc) parsed data to make decisions about stuff related to card
configuration.

The purely CIS dumping aspect of this program obviates the need for
such parsing.  Save some space and don't parse the data anymore for
configuration purposes.  Just parse it to print an interpreatation of
it.

15 years agodump() really is unused, so retire it.
imp [Thu, 20 Nov 2008 03:34:36 +0000 (03:34 +0000)]
dump() really is unused, so retire it.

15 years agoSimplify: move dumpcis.c and dumpcisfile.c into main.
imp [Thu, 20 Nov 2008 03:30:27 +0000 (03:30 +0000)]
Simplify: move dumpcis.c and dumpcisfile.c into main.

15 years agoUse the interrupt level right below PIL_FAST for executing interrupt
marius [Wed, 19 Nov 2008 22:12:32 +0000 (22:12 +0000)]
Use the interrupt level right below PIL_FAST for executing interrupt
filters instead of PIL_FAST and allow special filters and handlers
for interrupts which need to be able to interrupt even filters, f.e.
bus error interrupts, to be registered with the revived INTR_FAST
at PIL_FAST.

15 years agoGiven that the buffer dcons_crom(4) exposes is used for both input
marius [Wed, 19 Nov 2008 22:09:03 +0000 (22:09 +0000)]
Given that the buffer dcons_crom(4) exposes is used for both input
and output, set BUS_DMA_COHERENT when creating the DMA map used for
loading the buffer. As a side-effect this solves locking issues on
sparc64 when dcons(4) calls bus_dmamap_sync(9) while in an interrupt
filter, which are executed in a critical section, and iommu(4) has
to use a sleep lock when taking advantage of the streaming buffer.

Reported and tested by: kensmith
Approved by: simokawa

15 years agoAlso make dcons(4) use MPSAFE callouts.
ed [Wed, 19 Nov 2008 21:12:26 +0000 (21:12 +0000)]
Also make dcons(4) use MPSAFE callouts.

The callout locks the TTY layer the way it should, so there is no reason
why its callout shouldn't set this flag.

15 years agoMake nmdm(4) use MPSAFE callouts.
ed [Wed, 19 Nov 2008 21:07:33 +0000 (21:07 +0000)]
Make nmdm(4) use MPSAFE callouts.

For some reason the nmdm(4) driver doesn't use CALLOUT_MPSAFE, even
though we live in the MPSAFE TTY era. Add the CALLOUT_MPSAFE flags.
System survives.

15 years agoUse "KSE" instead of "kse".
delphij [Wed, 19 Nov 2008 20:38:10 +0000 (20:38 +0000)]
Use "KSE" instead of "kse".

15 years agoUse igb(4) entry
delphij [Wed, 19 Nov 2008 20:35:37 +0000 (20:35 +0000)]
Use igb(4) entry

15 years agoMake sure legacy replacement route is turned off when enbling HPET.
jkim [Wed, 19 Nov 2008 20:31:38 +0000 (20:31 +0000)]
Make sure legacy replacement route is turned off when enbling HPET.

Reviewed by: jhb

15 years agoFix typo.
jhb [Wed, 19 Nov 2008 20:06:59 +0000 (20:06 +0000)]
Fix typo.

15 years agoFix a scope problem in the multiple routing table code that stopped the
julian [Wed, 19 Nov 2008 19:19:30 +0000 (19:19 +0000)]
Fix a scope problem in the multiple routing table code that stopped the
SO_SETFIB socket option from working correctly.

Obtained from: Ironport
MFC after: 3 days

15 years agoInitial storage functionality for U-Boot support library.
raj [Wed, 19 Nov 2008 17:34:28 +0000 (17:34 +0000)]
Initial storage functionality for U-Boot support library.

- Only non-sliced bsdlabel style partitioning is currently supported (but provisions
  are made towards GPT support, which should follow soon)
- Enable storage support in loader on ARM

Obtained from: Semihalf

15 years agoImprove error handling in pcib_mbus_identify().
raj [Wed, 19 Nov 2008 17:07:01 +0000 (17:07 +0000)]
Improve error handling in pcib_mbus_identify().

15 years agoSome zfsboot fixes from Norikatsu Shigemura:
dfr [Wed, 19 Nov 2008 16:59:19 +0000 (16:59 +0000)]
Some zfsboot fixes from Norikatsu Shigemura:

1. zfsboot2 (boot2) doesn't %d (printf), so change %d to %u.
2. chase new zpool versioning as SPA_VERSION.
   Obtained from: sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h

Submitted by: nork

15 years agoAdd a GPT-aware variant of zfsboot which should be used in a similar manner
dfr [Wed, 19 Nov 2008 16:39:01 +0000 (16:39 +0000)]
Add a GPT-aware variant of zfsboot which should be used in a similar manner
to gptboot, i.e. installed in a freebsd-boot partition using /sbin/gpart or
/sbin/gpt.

Tweak the /boot/loader ZFS support so that it can find ZFS pools that are
contained in GPT partitions.

15 years agoIf we free the GPT partition list in bd_open_gpt() because of an error, don't
dfr [Wed, 19 Nov 2008 16:04:07 +0000 (16:04 +0000)]
If we free the GPT partition list in bd_open_gpt() because of an error, don't
try to free it again in bd_closedisk(). While I'm here, fix a DEBUG print.

15 years agoImprove style(9) and other cosmetics in Marvell SOCs code.
raj [Wed, 19 Nov 2008 11:57:16 +0000 (11:57 +0000)]
Improve style(9) and other cosmetics in Marvell SOCs code.

15 years agoFix off-by-one error in mbus_attach().
raj [Wed, 19 Nov 2008 11:49:35 +0000 (11:49 +0000)]
Fix off-by-one error in mbus_attach().

15 years agoEnable PCI in Marvell kernel configs.
raj [Wed, 19 Nov 2008 11:47:23 +0000 (11:47 +0000)]
Enable PCI in Marvell kernel configs.

15 years agoPCI/PCI-Express support for Marvell systems.
raj [Wed, 19 Nov 2008 11:30:44 +0000 (11:30 +0000)]
PCI/PCI-Express support for Marvell systems.

Obtained from: Marvell, Semihalf

15 years agoChange the initialization methodology for global variables scheduled
zec [Wed, 19 Nov 2008 09:39:34 +0000 (09:39 +0000)]
Change the initialization methodology for global variables scheduled
for virtualization.

Instead of initializing the affected global variables at instatiation,
assign initial values to them in initializer functions.  As a rule,
initialization at instatiation for such variables should never be
introduced again from now on.  Furthermore, enclose all instantiations
of such global variables in #ifdef VIMAGE_GLOBALS blocks.

Essentialy, this change should have zero functional impact.  In the next
phase of merging network stack virtualization infrastructure from
p4/vimage branch, the new initialization methology will allow us to
switch between using global variables and their counterparts residing in
virtualization containers with minimum code churn, and in the long run
allow us to intialize multiple instances of such container structures.

Discussed at: devsummit Strassburg
Reviewed by: bz, julian
Approved by: julian (mentor)
Obtained from: //depot/projects/vimage-commit2/...
X-MFC after: never
Sponsored by: NLnet Foundation, The FreeBSD Foundation

15 years agosrc/sys/dev/usb2/controller/uss820dci_pccard.c
alfred [Wed, 19 Nov 2008 08:56:35 +0000 (08:56 +0000)]
src/sys/dev/usb2/controller/uss820dci_pccard.c
src/sys/dev/usb2/core/usbdevs
src/sys/dev/usb2/include/urio2_ioctl.h
src/sys/dev/usb2/storage/ustorage2_fs.h

These files are not used any more.

src/usr.sbin/Makefile
src/etc/mtree/BSD.include.dist
src/include/Makefile
src/lib/Makefile
src/share/man/man7/hier.7
src/share/mk/bsd.libnames.mk
src/etc/mtree/BSD.include.dist

Make "usbconfig" and "libusb20" a part of the default build.

src/sys/dev/usb/rio500_usb.h
src/sys/dev/usb2/storage/urio2.c

Use common include file.

src/sys/dev/usb2/bluetooth/ng_ubt2.c

Make USB bluetooth depend on "ng_hci" module.

src/sys/dev/usb2/controller/ehci2.c
src/sys/dev/usb2/controller/ehci2.h

Patches for Marvell EHCI.

src/sys/dev/usb2/core/usb2_busdma.c

Bugfix for 64-bit platforms. Need to unload the previously loaded DMA
map and some cleanup regarding some corner cases.

src/sys/dev/usb2/core/usb2_core.h
src/sys/dev/usb2/core/usb2_dev.c
src/sys/dev/usb2/core/usb2_dev.h

Bugfix for libusb filesystem interface.

New feature: Add support for filtering device data at the expense of the
userland process.

Add some more comments.

Some minor code styling.

Remove unused function, usb2_fifo_get_data_next().

Fix an issue about "fifo_index" being used instead of "ep_index".

src/sys/dev/usb2/core/usb2_device.c
src/sys/dev/usb2/core/usb2_generic.c

Bugfix for Linux USB compat layer. Do not free non-generic FIFOs when
doing an alternate setting.

Cleanup USB IOCTL and USB reference handling.
Fix a corner case where USB-FS was left initialised after
setting a new configuration or alternate setting.

src/sys/dev/usb2/core/usb2_hub.c

Improvement: Check all USB HUB ports by default at least one time.

src/sys/dev/usb2/core/usb2_request.c

Bugfix: Make sure destination ASCII string is properly zero terminated
in all cases.

Improvement: Skip invalid characters instead of replacing with a dot.

src/sys/dev/usb2/core/usb2_util.c
src/sys/dev/usb2/image/uscanner2.c

Spelling.

src/sys/dev/usb2/include/Makefile

Share "usbdevs" with the old USB stack.

src/sys/dev/usb2/include/usb2_devid.h
src/sys/dev/usb2/include/usb2_devtable.h

Regenerate files.

Alfred: Please fix the RCS tag at the top.

src/sys/dev/usb2/include/usb2_ioctl.h

Fix compilation of "kdump".

src/sys/dev/usb2/serial/ubsa2.c
src/sys/dev/usb2/serial/ugensa2.c

Remove device ID's which will end up in a new 3G driver.

src/sys/dev/usb2/sound/uaudio2.c

Correct a debug printout.

src/sys/dev/usb2/storage/umass2.c

Sync with old USB stack.

src/lib/libusb20/libusb20.3

Add more documentation.

src/lib/libusb20/libusb20.c

Various bugfixes and improvements.

src/usr.sbin/usbconfig/dump.c
src/usr.sbin/usbconfig/usbconfig.c

New commands for dumping strings and doing custom USB requests from
the command line.

Remove keyword requirements from generated files:
 "head/sys/dev/usb2/include/usb2_devid.h"
 "head/sys/dev/usb2/include/usb2_devtable.h"

15 years agoCorrect a logic error when testing BCE_PHY_SERDES_FLAG.
delphij [Wed, 19 Nov 2008 03:24:35 +0000 (03:24 +0000)]
Correct a logic error when testing BCE_PHY_SERDES_FLAG.

PR: kern/128801
Pointed out by: Adam Morrison
Ok'ed by: davidch
MFC after: 3 days

15 years agoAs a matter of good programming style, stop PMCs before releasing
jkoshy [Wed, 19 Nov 2008 02:22:34 +0000 (02:22 +0000)]
As a matter of good programming style, stop PMCs before releasing
them.

15 years agoGrammar.
delphij [Wed, 19 Nov 2008 00:25:15 +0000 (00:25 +0000)]
Grammar.

Submitted by: "bf" <bf2006a at yahoo com>

15 years agoUse strlcpy() where appropriate.
delphij [Wed, 19 Nov 2008 00:14:15 +0000 (00:14 +0000)]
Use strlcpy() where appropriate.

15 years agoConstify return value of stripath and avoid unnecessary deconst
delphij [Wed, 19 Nov 2008 00:09:01 +0000 (00:09 +0000)]
Constify return value of stripath and avoid unnecessary deconst
casts.

15 years ago- fix typo
danger [Tue, 18 Nov 2008 23:38:47 +0000 (23:38 +0000)]
- fix typo

PR: docs/128973
Submitted by: tabthorpe

15 years ago- Fix a typo in a comment.
jhb [Tue, 18 Nov 2008 23:19:43 +0000 (23:19 +0000)]
- Fix a typo in a comment.
- Whitespace fix.
- Remove #if 0'd BSD 4.x code for flushing busy buffers from a mountpoint
  during an unmount.  FreeBSD uses vflush() for this.

15 years agoWhen looking up the vnode for the device to mount the filesystem on,
jhb [Tue, 18 Nov 2008 23:18:37 +0000 (23:18 +0000)]
When looking up the vnode for the device to mount the filesystem on,
ask NDINIT to return a locked vnode instead of letting it drop the
lock and return a referenced vnode and then relock the vnode a few
lines down.  This matches the behavior of other filesystem mount routines.

15 years agoRemove copy/paste code from UFS to handle sparse blocks. While Rock
jhb [Tue, 18 Nov 2008 23:15:17 +0000 (23:15 +0000)]
Remove copy/paste code from UFS to handle sparse blocks.  While Rock
Ridge does support sparse files, the cd9660 code does not currently
support them.

15 years agoRemove unused i_flags field and IN_ACCESS flag from cd9660 in-memory
jhb [Tue, 18 Nov 2008 23:13:40 +0000 (23:13 +0000)]
Remove unused i_flags field and IN_ACCESS flag from cd9660 in-memory
i-nodes.  cd9660 doesn't support access times.

15 years agoMention that listsnapshots is disabled by default after latest ZFS import.
delphij [Tue, 18 Nov 2008 21:41:09 +0000 (21:41 +0000)]
Mention that listsnapshots is disabled by default after latest ZFS import.

15 years agoANSIfy the wwend function.
rdivacky [Tue, 18 Nov 2008 21:06:49 +0000 (21:06 +0000)]
ANSIfy the wwend function.

Approved by: kib (mentor)

15 years agoAllow device hints to wire the unit numbers of devices.
jhb [Tue, 18 Nov 2008 21:01:54 +0000 (21:01 +0000)]
Allow device hints to wire the unit numbers of devices.
- An "at" hint now reserves a device name.
- A new BUS_HINT_DEVICE_UNIT method is added to the bus interface.  When
  determining the unit number of a device, this method is invoked to
  let the bus driver specify the unit of a device given a specific
  devclass.  This is the only way a device can be given a name reserved
  via an "at" hint.
- Implement BUS_HINT_DEVICE_UNIT() for the acpi(4) and isa(4) bus drivers.
  Both of these busses implement this by comparing the resources for a
  given hint device with the resources enumerated by ACPI/PnPBIOS and
  wire a unit if the hint resources are a subset of the "real" resources.
- Use bus_hinted_children() for adding hinted devices on isa(4) busses
  now instead of doing it by hand.
- Remove the unit kludging from sio(4) as it is no longer necessary.

Prodding from: peter, imp
OK'd by: marcel
MFC after: 1 month

15 years agoGrammar improvements.
delphij [Tue, 18 Nov 2008 20:38:07 +0000 (20:38 +0000)]
Grammar improvements.

Submitted by: kensmith

15 years agoRestore original frequency on exit.
mav [Tue, 18 Nov 2008 15:48:23 +0000 (15:48 +0000)]
Restore original frequency on exit.

PR: bin/113813

15 years agoAdd myself
pho [Tue, 18 Nov 2008 14:05:11 +0000 (14:05 +0000)]
Add myself

Approved by: kib (mentor)

15 years agoSet of powerd enchancements:
mav [Tue, 18 Nov 2008 13:24:38 +0000 (13:24 +0000)]
Set of powerd enchancements:

1. Make it more SMP polite. Previous version uses average CPU load that
often leads to load underestimation. It make powerd with default
configuration unusable on systems with more then 2 CPUs. I propose to use
summary load instead of average one. IMO this is the best we can do without
specially tuned scheduler. Also as soon as measuring total load on SMP
systems is more useful then total idle, I have switched to it.

2. Make powerd's operation independent from number and size of frequency
levels. I have added internal frequency counter which translated into real
frequencies only on a last stage and only as good as gone. Some systems may
have only several power levels, while others - many of them, so adaptation
time with previous approach was completely different.

3. As part of previous I have changed adaptive mode to rise frequency on
demand up to 2 times and fall on 1/8 per time internal.

4. For desktop (AC-powered) systems I have added one more mode - "hiadaptive".
It rises frequency twice faster, drops it 4 times slower, prefers twice
lower CPU load and has additional delay before leaving the highest frequency
after the period of maximum load. This mode was specially made to improve
interactivity of the systems where operation capabilities are more
significant then power consumption, but keeping maximum frequency all the
time is not needed.

5. I have reduced default polling interval from 1/2 to 1/4 of second.
It is not so important for algorithm math now, but gives better system
interactivity.

Discussed on: mobile@

15 years ago- Fix two minor errors in at91 code.
stas [Tue, 18 Nov 2008 12:42:59 +0000 (12:42 +0000)]
- Fix two minor errors in at91 code.

PR: arm/128959
Submitted by: Bjorn Konig <bkoenig@alpha-tierchen.de>
Approved by: kib (mentor)

15 years agoPartition type FS_UNUSED does not mean the partition entry
marcel [Tue, 18 Nov 2008 05:55:58 +0000 (05:55 +0000)]
Partition type FS_UNUSED does not mean the partition entry
is unused. Unused partition entries have a partition size
of zero. Therefore, partitions can have type FS_UNUSED.

MFC after: 3 days

15 years agoWhen checking to see if another CPU is running its idle thread, examine
jhb [Tue, 18 Nov 2008 05:41:34 +0000 (05:41 +0000)]
When checking to see if another CPU is running its idle thread, examine
the thread running on the other CPU instead of the thread being placed on
the run queue.

Reported by: Ravi Murty @ Intel
Reviewed by: jeff

15 years agoUse humanize_number(), rather than a home-grown algorithm for
marcel [Tue, 18 Nov 2008 04:04:01 +0000 (04:04 +0000)]
Use humanize_number(), rather than a home-grown algorithm for
formatting a number in a human-friendly way.

Note that with this commit a megabyte changed from 1000000 to
1048576 and a 80G disk is now printed as being 75G in size.
This is deliberate. It's consistent with the core of geom(8).
However, the original choice for a megabyte being 1000000 was
on purpose and matches what disk vendors put on the box. The
consistency is considered more important.

Submitted by: delphij

15 years agoFix building without ZFS (can't find library)
ache [Tue, 18 Nov 2008 03:55:55 +0000 (03:55 +0000)]
Fix building without ZFS (can't find library)

15 years agoSort includes
marcel [Tue, 18 Nov 2008 03:43:02 +0000 (03:43 +0000)]
Sort includes

Submitted by: delphij

15 years agoremove a pointless prototype and static-fy the corresponding function
matteo [Tue, 18 Nov 2008 01:19:25 +0000 (01:19 +0000)]
remove a pointless prototype and static-fy the corresponding function

MFC after: 3 days

15 years agouse WARNS?= instead of WARNS=
matteo [Tue, 18 Nov 2008 00:59:26 +0000 (00:59 +0000)]
use WARNS?= instead of WARNS=

MFC after: 3 days

15 years agoBe more precise and use sizeof(tn)
matteo [Tue, 18 Nov 2008 00:39:50 +0000 (00:39 +0000)]
Be more precise and use sizeof(tn)
Pointed out by: glewis@

MFC after: 3 days

15 years agoUse WARNS?= instead of WARNS=
matteo [Tue, 18 Nov 2008 00:12:15 +0000 (00:12 +0000)]
Use WARNS?= instead of WARNS=

MFC after: 3 days

15 years agoFix a warning on amd64 caused by using int for request argument instead of
pjd [Tue, 18 Nov 2008 00:03:38 +0000 (00:03 +0000)]
Fix a warning on amd64 caused by using int for request argument instead of
unsigned long:

WARNING pid 12888 (zfs/zpool): ioctl sign-extension ioctl ffffffffcc285aXX

Reported by: kris

15 years agoPad the bootcode we write to the partition to a multiple of the
marcel [Tue, 18 Nov 2008 00:03:30 +0000 (00:03 +0000)]
Pad the bootcode we write to the partition to a multiple of the
sector size.

Submitted by: Alexey Shuvaev <shuvaev@physik.uni-wuerzburg.de>
Prompted by:  delphij
MFC after: 3 days

15 years agoObey signedness flag in %z case.
delphij [Tue, 18 Nov 2008 00:01:16 +0000 (00:01 +0000)]
Obey signedness flag in %z case.

MFC after: 2 months

15 years agoObey signedness flag in %z case.
delphij [Mon, 17 Nov 2008 23:57:40 +0000 (23:57 +0000)]
Obey signedness flag in %z case.

MFC after: 2 months

15 years agoFix the maximum transfer size for mfi(4) disk devices to not exceed the
jhb [Mon, 17 Nov 2008 23:30:19 +0000 (23:30 +0000)]
Fix the maximum transfer size for mfi(4) disk devices to not exceed the
maximum number of scatter/gather elements supported in the bus dma tag.

Reviewed by: scottl
MFC after: 1 week

15 years agomake this warns=5 clean
imp [Mon, 17 Nov 2008 22:46:29 +0000 (22:46 +0000)]
make this warns=5 clean

15 years agoMove dumpcis to its own directory, start to decouple from the
imp [Mon, 17 Nov 2008 22:19:19 +0000 (22:19 +0000)]
Move dumpcis to its own directory, start to decouple from the
pccardc/pccardd history.

15 years agoMinor ANSI tweaks.
imp [Mon, 17 Nov 2008 22:05:53 +0000 (22:05 +0000)]
Minor ANSI tweaks.

15 years agoWhen running on a filesystem that lacks ACL support,
kientzle [Mon, 17 Nov 2008 21:06:17 +0000 (21:06 +0000)]
When running on a filesystem that lacks ACL support,
just SKIP the test, don't report a test failure.

15 years agoUpdate ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
pjd [Mon, 17 Nov 2008 20:49:29 +0000 (20:49 +0000)]
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.

This bring huge amount of changes, I'll enumerate only user-visible changes:

- Delegated Administration

Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.

- L2ARC

Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.

- slog

Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).

- vfs.zfs.super_owner

Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.

- chflags(2)

Not all the flags are supported. This still needs work.

- ZFSBoot

Support to boot off of ZFS pool. Not finished, AFAIK.

Submitted by: dfr

- Snapshot properties

- New failure modes

Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests

- Refquota, refreservation properties

Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.

- Sparse volumes

ZVOLs that don't reserve space in the pool.

- External attributes

Compatible with extattr(2).

- NFSv4-ACLs

Not sure about the status, might not be complete yet.

Submitted by: trasz

- Creation-time properties

- Regression tests for zpool(8) command.

Obtained from: OpenSolaris

15 years agoUndo revision 185013 until better solution is found.
emax [Mon, 17 Nov 2008 20:33:13 +0000 (20:33 +0000)]
Undo revision 185013 until better solution is found.

Pointed out by: bde

15 years agoFix a potential NULL-pointer dereference in padlock(4).
philip [Mon, 17 Nov 2008 19:00:36 +0000 (19:00 +0000)]
Fix a potential NULL-pointer dereference in padlock(4).

Spotted by: Coverity (via pjd)
MFC after: 1 week

15 years agogdb: Remove arm_pc_is_thumb_dummy() and related code.
raj [Mon, 17 Nov 2008 16:37:04 +0000 (16:37 +0000)]
gdb: Remove arm_pc_is_thumb_dummy() and related code.

This is basically an import of the following gdb change:
http://sourceware.org/ml/gdb-cvs/2005-03/msg00143.html (which in effect fixes
problems with gracefully closing down the non-Thumb program being debugged).

15 years agoInitial gdbserver support for ARM.
raj [Mon, 17 Nov 2008 16:32:57 +0000 (16:32 +0000)]
Initial gdbserver support for ARM.

Obtained from: Juniper Networks, Semihalf

15 years agoFix two possible (but unlikely) NULL-pointer dereferences in glxsb(4).
philip [Mon, 17 Nov 2008 07:09:40 +0000 (07:09 +0000)]
Fix two possible (but unlikely) NULL-pointer dereferences in glxsb(4).

Spotted by: Coverity
MFC after: 1 week

15 years agoOverhaul of CIS parsing, next step: keep a cached copy of the CIS,
imp [Mon, 17 Nov 2008 01:32:29 +0000 (01:32 +0000)]
Overhaul of CIS parsing, next step: keep a cached copy of the CIS,
read before we configure the card, so we can implement
/dev/cardbus*.cis.  Also, do this on a per-child basis, so we now have
a different name than before.  I think i'll have to fix that for some
legacy tools to keep working.

I can now do a dumpcis on my running atheros card and have it still work!

15 years agoFix typo. It restuled in activating unwanted Rx filtering as well
yongari [Mon, 17 Nov 2008 00:50:59 +0000 (00:50 +0000)]
Fix typo. It restuled in activating unwanted Rx filtering as well
as resetting Rx threshold configuration.

Submitted by: Joost Mulders < Joost.Mulders <> Sun DOT COM >

15 years agoMore locking for syscons(4). This should prevent races with sckbdevent().
emax [Sun, 16 Nov 2008 22:39:04 +0000 (22:39 +0000)]
More locking for syscons(4). This should prevent races with sckbdevent().

PR: kern/127446
Submitted by: Eygene Ryabinkin rea-fbsd at codelabs dot ru

15 years agoInstead of forcing vn_start_write() to reset mp back to NULL for the
kib [Sun, 16 Nov 2008 21:57:54 +0000 (21:57 +0000)]
Instead of forcing vn_start_write() to reset mp back to NULL for the
failed calls with non-NULL vp, explicitely clear mp after failure.

Tested by: stass
Reviewed by: tegge
PR: 123768
MFC after: 1 week

15 years agoRevert r184118. There is actually a code in the kernel, for instance in
kib [Sun, 16 Nov 2008 21:56:29 +0000 (21:56 +0000)]
Revert r184118. There is actually a code in the kernel, for instance in
kern_unlinkat(), that expects that vn_start_write() actually fills the mp
even when the call failed.

As Tor noted, that pattern relies on the the type stability of the mount
points, as well as that suspended mount points are never freed and
V_XSLEEP is always passed to vn_start_write() when called on a freed
mount point.

Reported by: stass
Reviewed by: tegge
PR: 123768

15 years agoFix argument layout of devfs_get_cdevpriv().
ed [Sun, 16 Nov 2008 21:26:56 +0000 (21:26 +0000)]
Fix argument layout of devfs_get_cdevpriv().

Right now it shows `void' and `**datap' as two different arguments,
while they belong together.

15 years ago- Allow the front-end to specify that iommu(4) should disable
marius [Sun, 16 Nov 2008 19:53:49 +0000 (19:53 +0000)]
- Allow the front-end to specify that iommu(4) should disable
  rerun of the streaming cache for silicon bug workarounds.
- Announce the presence of a streaming cache on attach for
  informational purposes.
- For performance reasons don't do unnecessary flushes of the
  streaming cache when coherent mappings are synced.
- Fix some minor style issues.

15 years agoUse the spitfire VIS block copy/zero functions also with cheetah-
marius [Sun, 16 Nov 2008 19:30:17 +0000 (19:30 +0000)]
Use the spitfire VIS block copy/zero functions also with cheetah-
class CPUs. In theory one could also use versions additionally
taking advantage of the prefetch cache with cheetah-class CPUs,
in my worldstone runs these either didn't provide extra speedup
(USIII+) in comparison to the existing spitfire versions or were
even slightly slower (USIIIi) though, so they aren't committed
for now.
The basic problem leading to the VIS-based copy/zero functions
being initially disabled for cheetah-class CPUs was solved by
letting cheetah_init() clear DCR_IFPOE.

15 years agoMicro-optimize spitfire_block_{copy,zero}():
marius [Sun, 16 Nov 2008 19:28:55 +0000 (19:28 +0000)]
Micro-optimize spitfire_block_{copy,zero}():
- Predict the loop as taken as it's more likely that there's still
  data to copy and memory to zero respectively.
- Don't waste the delay slot.

15 years agoDefine LDBL_EPSILON, LDBL_MAX and LDBL_MIN as long double constants.
marcel [Sun, 16 Nov 2008 19:20:29 +0000 (19:20 +0000)]
Define LDBL_EPSILON, LDBL_MAX and LDBL_MIN as long double constants.

Submitted by: Andreas Tobler <andreast-list@fgznet.ch>
Reviewed by: das@

15 years ago- For maximum flexibility, sparc64 supports BUS_DMA_COHERENT also
marius [Sun, 16 Nov 2008 18:30:16 +0000 (18:30 +0000)]
- For maximum flexibility, sparc64 supports BUS_DMA_COHERENT also
  with bus_dmamap_create() and not only bus_dmamem_alloc() so move
  the description of this flag up accordingly in order to document
  this fact. While at, it refine this description with an application
  example.
- Reword the description of BUS_DMA_NOCACHE as this flag is also
  implemented on sparc64.

MFC after: 1 week

15 years agoVarious whitespace and style fixes.
jhb [Sun, 16 Nov 2008 17:42:02 +0000 (17:42 +0000)]
Various whitespace and style fixes.

15 years agoIn the robust futexes list head, futex_offset shall be signed,
kib [Sun, 16 Nov 2008 15:45:41 +0000 (15:45 +0000)]
In the robust futexes list head, futex_offset shall be signed,
and glibc actually supplies negative offsets. Change l_ulong to l_long.

Submitted by: dchagin

15 years agoAdd a comment to utmp.h about the sizes of UT_HOSTSIZE and UT_LINESIZE.
ed [Sun, 16 Nov 2008 14:43:33 +0000 (14:43 +0000)]
Add a comment to utmp.h about the sizes of UT_HOSTSIZE and UT_LINESIZE.

UT_HOSTSIZE and UT_LINESIZE are too small right now. If we ever bump
UT_HOSTSIZE, we must not forget to increase UT_LINESIZE as well. If we
add a comment, we're pretty sure we increase both values at the same
time.

PR: bin/108743 (maybe others)

15 years agoIgnore absent CPUs when listing the current state of PMC hardware.
jkoshy [Sun, 16 Nov 2008 04:26:38 +0000 (04:26 +0000)]
Ignore absent CPUs when listing the current state of PMC hardware.

15 years agoPrint PMC widths in the initialization announcement.
jkoshy [Sun, 16 Nov 2008 04:21:59 +0000 (04:21 +0000)]
Print PMC widths in the initialization announcement.

15 years agoOn i386, the primary function that SYSCALL() generates is with the
peter [Sat, 15 Nov 2008 22:23:07 +0000 (22:23 +0000)]
On i386, the primary function that SYSCALL() generates is with the
__sys_ prefix.  Make END() match.  This didn't cause a compile error, but
the function size is attached to the .weak symbol, not the real one.

15 years ago- Document the class name prefix for these PMCs.
jkoshy [Sat, 15 Nov 2008 11:34:30 +0000 (11:34 +0000)]
- Document the class name prefix for these PMCs.
- Document the "anythread" qualifier, available on Atom CPUs.
- Add examples.

15 years agoCorrect an oversight: call the MD finalize hook at module unload
jkoshy [Sat, 15 Nov 2008 11:11:32 +0000 (11:11 +0000)]
Correct an oversight: call the MD finalize hook at module unload
time.