Commit Graph

69535 Commits

Author SHA1 Message Date
Marius Strobl
e363ea0fab 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.
2008-11-19 22:12:32 +00:00
Marius Strobl
eddfa7b147 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
2008-11-19 22:09:03 +00:00
Ed Schouten
656b038372 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.
2008-11-19 21:12:26 +00:00
Ed Schouten
7d82f624de 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.
2008-11-19 21:07:33 +00:00
Jung-uk Kim
ab9df4d74d Make sure legacy replacement route is turned off when enbling HPET.
Reviewed by:	jhb
2008-11-19 20:31:38 +00:00
John Baldwin
25c398ee9b Fix typo. 2008-11-19 20:06:59 +00:00
Julian Elischer
bc97ba5100 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
2008-11-19 19:19:30 +00:00
Rafal Jaworowski
11cdd0c0c2 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
2008-11-19 17:34:28 +00:00
Rafal Jaworowski
a715909b3e Improve error handling in pcib_mbus_identify(). 2008-11-19 17:07:01 +00:00
Doug Rabson
0d16312b46 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
2008-11-19 16:59:19 +00:00
Doug Rabson
51f0d2e192 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.
2008-11-19 16:39:01 +00:00
Doug Rabson
14dddafbb3 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.
2008-11-19 16:04:07 +00:00
Rafal Jaworowski
e33d259975 Improve style(9) and other cosmetics in Marvell SOCs code. 2008-11-19 11:57:16 +00:00
Rafal Jaworowski
b4ef1cb7e8 Fix off-by-one error in mbus_attach(). 2008-11-19 11:49:35 +00:00
Rafal Jaworowski
09f90fe045 Enable PCI in Marvell kernel configs. 2008-11-19 11:47:23 +00:00
Rafal Jaworowski
6975124c23 PCI/PCI-Express support for Marvell systems.
Obtained from:	Marvell, Semihalf
2008-11-19 11:30:44 +00:00
Marko Zec
44e33a0758 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
2008-11-19 09:39:34 +00:00
Alfred Perlstein
6f0e1ffd07 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"
2008-11-19 08:56:35 +00:00
Xin LI
202f306c24 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
2008-11-19 03:24:35 +00:00
John Baldwin
66a6ea1de2 - 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.
2008-11-18 23:19:43 +00:00
John Baldwin
77ddca67d5 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.
2008-11-18 23:18:37 +00:00
John Baldwin
1ea456e7a6 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.
2008-11-18 23:15:17 +00:00
John Baldwin
05b1d36516 Remove unused i_flags field and IN_ACCESS flag from cd9660 in-memory
i-nodes.  cd9660 doesn't support access times.
2008-11-18 23:13:40 +00:00
John Baldwin
0d484d249f 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
2008-11-18 21:01:54 +00:00
Stanislav Sedov
ec5556611c - Fix two minor errors in at91 code.
PR:		arm/128959
Submitted by:	Bjorn Konig <bkoenig@alpha-tierchen.de>
Approved by:	kib (mentor)
2008-11-18 12:42:59 +00:00
Marcel Moolenaar
1a696559de 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
2008-11-18 05:55:58 +00:00
John Baldwin
02f0ff6d92 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
2008-11-18 05:41:34 +00:00
Andrey A. Chernov
caab1f000c Fix building without ZFS (can't find library) 2008-11-18 03:55:55 +00:00
Xin LI
e1088cdca3 Obey signedness flag in %z case.
MFC after:	2 months
2008-11-17 23:57:40 +00:00
John Baldwin
d0e14c5099 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
2008-11-17 23:30:19 +00:00
Pawel Jakub Dawidek
1ba4a712dd 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
2008-11-17 20:49:29 +00:00
Maksim Yevmenkin
8fc061164d Undo revision 185013 until better solution is found.
Pointed out by:	bde
2008-11-17 20:33:13 +00:00
Philip Paeps
2bc989be4f Fix a potential NULL-pointer dereference in padlock(4).
Spotted by:	Coverity (via pjd)
MFC after:	1 week
2008-11-17 19:00:36 +00:00
Philip Paeps
6cfbfdb6f9 Fix two possible (but unlikely) NULL-pointer dereferences in glxsb(4).
Spotted by:	Coverity
MFC after:	1 week
2008-11-17 07:09:40 +00:00
Warner Losh
a7de0b74a7 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!
2008-11-17 01:32:29 +00:00
Pyun YongHyeon
30dda99b96 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 >
2008-11-17 00:50:59 +00:00
Maksim Yevmenkin
ae670dad61 More locking for syscons(4). This should prevent races with sckbdevent().
PR:		kern/127446
Submitted by:	Eygene Ryabinkin rea-fbsd at codelabs dot ru
2008-11-16 22:39:04 +00:00
Konstantin Belousov
6129343d5d 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
2008-11-16 21:57:54 +00:00
Konstantin Belousov
c5f77bf986 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
2008-11-16 21:56:29 +00:00
Marius Strobl
11202ac9db - 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.
2008-11-16 19:53:49 +00:00
Marius Strobl
d92cebca6a 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.
2008-11-16 19:30:17 +00:00
Marius Strobl
31a0d89119 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.
2008-11-16 19:28:55 +00:00
Marcel Moolenaar
77a5f1bddf Define LDBL_EPSILON, LDBL_MAX and LDBL_MIN as long double constants.
Submitted by:	Andreas Tobler <andreast-list@fgznet.ch>
Reviewed by:	das@
2008-11-16 19:20:29 +00:00
John Baldwin
284c87f60e Various whitespace and style fixes. 2008-11-16 17:42:02 +00:00
Konstantin Belousov
62162dfc94 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
2008-11-16 15:45:41 +00:00
Joseph Koshy
7dada26401 Print PMC widths in the initialization announcement. 2008-11-16 04:21:59 +00:00
Joseph Koshy
bc4f0ade98 Correct an oversight: call the MD finalize hook at module unload
time.
2008-11-15 11:11:32 +00:00
Joseph Koshy
edfea6b4ad Fix assertions.
Reported by:	keramida
2008-11-15 11:07:54 +00:00
Joseph Koshy
8cd64ec8ad Correct an indexing error (a change missed out in #184802). 2008-11-15 10:56:36 +00:00
Alexander Motin
316f941e96 Correct association 0 handling.
as=0 means unused pin, so disable it explicitly, this is mostly cosmetics.
2008-11-15 09:39:00 +00:00