Commit Graph

82233 Commits

Author SHA1 Message Date
mav
0ea74c96a2 Fix several un-/signedness bugs of r210290 and r210293. Add one more check. 2010-07-20 15:48:29 +00:00
ivoras
d9b793e64d Fix expression style.
Prodded by: jhb
2010-07-20 13:59:51 +00:00
tijl
fbb4c617bd Store fsbase and gsbase in the right fields of the mcontext. They were
switched.

PR:		i386/148344
Approved by:	kib (mentor)
MFC after:	1 week
2010-07-20 12:36:36 +00:00
mav
2a5fe2d038 Refactor Marvell ARM SoC timer driver to the new timer infrastructure. 2010-07-20 11:46:45 +00:00
rpaulo
43363aa42e Fix typo in comment. 2010-07-20 11:20:45 +00:00
mav
1021ed9c1f Extend timer driver API to report also minimal and maximal supported period
lengths. Make MI wrapper code to validate periods in request. Make kernel
clock management code to honor these hardware limitations while choosing hz,
stathz and profhz values.
2010-07-20 10:58:56 +00:00
jmallett
4948f4b8d5 Import the Cavium Simple Executive from the Cavium Octeon SDK. The Simple
Executive is a library that can be used by standalone applications and kernels
to abstract access to Octeon SoC and board-specific hardware and facilities.
The FreeBSD port to Octeon will be updated to use this where possible.
2010-07-20 07:19:43 +00:00
mm
41e1927dcc To improve latency, lower default vfs.zfs.vdev.max_pending from 35 to 10
OpenSolaris onnv changeset (partial):	10801:e0bf032e8673

Approved by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6891731)
MFC after:	1 week
2010-07-20 05:22:14 +00:00
thompsa
fac99fc079 - Support for Globetrotter iCON 452.
- Fixed the interface probe routine to only attach to USB interfaces the driver
  actually supports.  This allows other drivers to attach to things like
  MicroSD slots etc.
- Fixed network interface enumeration to be globally sequential instead of
  relying on the USB interface numbers.  This make sure the first network
  interface always is at uhso0 and the second at usho1 and so on.
- Added a radio kill switch; exposed through sysctl.
- Updated the manual page to be verbose about the number of serial ports and
  include iCON 452 in the set of tested hardware.

Submitted by:	Fredrik Lindberg
2010-07-20 03:10:22 +00:00
davidxu
cdb7adc908 Fix function name in error messages. 2010-07-20 02:23:12 +00:00
yongari
f62d502b81 Specify BCE_RX_BUF_ALIGN alignment for RX buffers. All bce(4)
controllers require RX buffers aligned on BCE_RX_BUF_ALIGN bytes.

Reviewed by:	davidch
2010-07-19 23:48:03 +00:00
yongari
635930644d Specify BUS_DMA_ZERO flag to bus_dmamem_alloc(9) and remove bzero()
calls. Also add BUS_DMA_COHERENT flag to bus_dmamem_alloc(9) to
take advantage of efficient synchronization for architectures that
support that feature.

Reviewed by:	davidch
2010-07-19 23:41:45 +00:00
yongari
583fcb4c19 Use bus_get_dma_tag() to get parent tag. Also use
BUS_SPACE_MAXSIZE_32BIT to specify sum of all segment lengths.
Previously it used MAXBSIZE which was wrong.

Reviewed by:	davidch
2010-07-19 23:35:43 +00:00
rmacklem
187ed00199 For the experimental NFSv4 server's dumplocks operation, add the
MPSAFE flag to cn_flags so that it doesn't panic. The panics weren't
seen since nfsdumpstate(8) is broken for the "-l" case, so this
was never done. I'll do a separate commit to fix nfsdumpstate(8).

Submitted by:	zack.kirsch at isilon.com
MFC after:	2 weeks
2010-07-19 23:33:42 +00:00
yongari
8c83d23ff0 Add KASSERT to check number of returned DMA segments.
Reviewed by:	davidch
2010-07-19 23:25:19 +00:00
adrian
4dc0d673ed Fix naming to be consistent. 2010-07-19 21:50:43 +00:00
adrian
ed5801ffc7 Extend the mx25l erase function to support different erase commands. 2010-07-19 21:46:40 +00:00
yongari
e0c0ca8313 Do not report current link state if interface is not UP.
Reviewed by:	davidch
2010-07-19 21:41:54 +00:00
adrian
18aed410d7 Extend the mx25l flash device support to include a set of per-device
flags.

Some of these parts will support 4K/32K block erases rather than
a sector erase. This includes (at least) the MX25L128.
2010-07-19 21:38:15 +00:00
yongari
0e81d4d085 Correctly check the result of media selection. Previously it always
returned success.

Reviewed by:	davidch
2010-07-19 21:38:07 +00:00
yongari
7ded005b16 Don't change current media in bce_stop(). There is no need to do
this here.

Reviewed by:	davidch
2010-07-19 21:32:47 +00:00
yongari
ca25b4a12a Have bce_init_ctx() return error code and make caller check the
return code. If context was not setup correctly give up
initialization. While I'm here move variable declarations to the
beginning of the function.

Reviewed by:	davidch
2010-07-19 21:25:05 +00:00
yongari
098866995f When we didn't find a matching flash device, do not touch flash
config data. While I'm here, use return code of bce_init_nvram()
to set error instead of directly setting ENODEV.

Reviewed by:	davidch
2010-07-19 21:13:07 +00:00
jkim
aad8c00558 Improve style slightly. 2010-07-19 20:31:04 +00:00
raj
38ed317cdb Now that we are fully FDT-driven on MRVL platforms, remove PHYSMEM_SIZE option. 2010-07-19 19:19:33 +00:00
jkim
08397bfd61 Fix two long-standing line wrapping bugs in VGA renderer for pixel mode.
Font size may be smaller than 16 and logical scan line may be larger than
the displayed scan line.

MFC after:	3 days
2010-07-19 18:56:18 +00:00
raj
287c5fdf95 Eliminate FDT_IMMR_VA define.
This removes platform dependencies from <machine>/fdt.h for the benfit of
portability.
2010-07-19 18:47:18 +00:00
raj
1dddc6de1e Move MRVL FDT fixups and PIC decode routine to a platform specific area.
This allows for better encapsulation (and eliminates generic fdt_arm.c, at
least for now).
2010-07-19 18:41:50 +00:00
yongari
2103ee2537 Implement WOL. WOL is supported on RTL8139B or newer controllers.
PR:	kern/148013
2010-07-19 18:01:06 +00:00
adrian
2ad116091d Include 4k/32k erase commands.
These were sourced from the MX25L128 datasheet and match up
with what is used in Linux mtd/devices/m25p80.c .

Add a FreeBSD keyword whilst I'm here.
2010-07-19 15:05:35 +00:00
rmacklem
2408918606 Add a call to nfscl_mustflush() in nfs_close() of the experimental
NFSv4 client, so that attributes are not acquired from the server
when a delegation for the file is held. This can reduce the number
of Getattr Ops significantly.

MFC after:	2 weeks
2010-07-18 22:35:46 +00:00
trasz
3e54021797 Revert r210225 - turns out I was wrong; the "/*-" is not license-only
thing; it's also used to indicate that the comment should not be automatically
rewrapped.

Explained by:	cperciva@
2010-07-18 20:57:53 +00:00
trasz
935237a66a The "/*-" comment marker is supposed to denote copyrights. Remove non-copyright
occurences from sys/sys/ and sys/kern/.
2010-07-18 20:23:10 +00:00
trasz
dd1ffe6ba1 Remove outdated comment and move part of it into more applicable place. 2010-07-18 19:29:12 +00:00
trasz
23a42882e5 Style fix - keep the line length below 80 characters.
Submitted by:	bde@
2010-07-18 11:13:36 +00:00
ivoras
56cd1257b0 In keeping with the Age-of-the-fruitbat theme, scale up hirunningspace on
machines which can clearly afford the memory.

This is a somewhat conservative version of the patch - more fine tuning may be
necessary.

Idea from: Thread on hackers@
Discussed with: alc
2010-07-18 10:15:33 +00:00
trasz
9a4f2044db Style fix. 2010-07-18 08:54:31 +00:00
trasz
e9c18825b9 Fix build.
Submitted by:	Andreas Tobler <andreast-list at fgznet.ch>
2010-07-18 07:55:22 +00:00
lstewart
5ceb2800a8 - Move common code from the hook functions that fills in a packet node struct to
a separate inline function. This further reduces duplicate code that didn't
  have a good reason to stay as it was.

- Reorder the malloc of a pkt_node struct in the hook functions such that it
  only occurs if we managed to find a usable tcpcb associated with the packet.

- Make the inp_locally_locked variable's type consistent with the prototype of
  siftr_siftdata().

Sponsored by:	FreeBSD Foundation
2010-07-18 05:09:10 +00:00
rmacklem
7520b52ca5 Change the nfscl_mustflush() function in the experimental NFSv4
client to return a boolean_t in order to make it more compatible
with style(9).

MFC after:	2 weeks
2010-07-18 00:24:01 +00:00
trasz
e2cd3ad716 Remove proc locking, it's not needed after r210132. 2010-07-17 15:52:11 +00:00
trasz
1d5b5bc65c Remove updating process count by unionfs. It serves no purpose, unionfs just
needs root credentials for a moment.
2010-07-17 15:45:20 +00:00
nwhitehorn
f613d35061 Add OpenSolaris atomics for powerpc64 and connect ZFS to the build on
this platform.

Reviewed by:	pjd
2010-07-17 13:34:01 +00:00
nwhitehorn
5d6878ba3a Increase stack size for ZFS sync thread. This is required to make ZFS
function on 64-bit PowerPC.

Reviewed by:	pjd
Obtained from:	OpenSolaris changeset 14653:7cf402a7f374
2010-07-17 13:31:27 +00:00
lstewart
9f0f9c58e8 Unbreak DPCPU_SUM() by dereferencing the pointer returned by DPCPU_ID_PTR().
MFC after:	3 days
2010-07-17 03:39:50 +00:00
mav
4e6cef612e Add hints for i8254 timer on i386 and amd64. Some people report about
systems with PnP/ACPI not reporting i8254 timer. In some cases it can be
fatal, as i8254 can be the only available time counter hardware. From other
side we are now heavily depend on i8254 timer and till the last time it's
init/usage was completely hardcoded. So this change just restores previous
behavior in more regular fashion.
2010-07-16 23:21:46 +00:00
rmacklem
f06f20d898 Patch the experimental NFSv4 server so that it acquires a reference
count on nfsv4rootfs_lock when dumping state, since these functions
are not called by nfsd threads. Without this reference count, it
is possible for an nfsd thread to acquire an exclusive lock on
nfsv4rootfs_lock while the dump is in progress and then change the
lists, potentially causing a crash.

Reported by:	zack.kirsch at isilon.com
MFC after:	2 weeks
2010-07-16 23:17:05 +00:00
mav
6a650899c5 Allocate proper ammount of memory for interrupt names on sparc64 and
sun4v, same as done on other architectures. This removes garbage from
`vmstat -ia` output.

Reviewed by:	marius@
2010-07-16 22:09:29 +00:00
jhb
7f218ea7f4 Revert the previous commit. The race is not applicable to the lockmgr
implementation in 8.0 and later as its flags field does not hold dynamic
state such as waiters flags, but is only modified in lockinit() aside
from VN_LOCK_*().

Discussed with:	attilio
2010-07-16 19:52:03 +00:00
jhb
ea417bf09a When the MNTK_EXTENDED_SHARED mount option was added, some filesystems were
changed to defer the setting of VN_LOCK_ASHARE() (which clears LK_NOSHARE
in the vnode lock's flags) until after they had determined if the vnode was
a FIFO.  This occurs after the vnode has been inserted a VFS hash or some
similar table, so it is possible for another thread to find this vnode via
vget() on an i-node number and block on the vnode lock.  If the lockmgr
interlock (vnode interlock for vnode locks) is not held when clearing the
LK_NOSHARE flag, then the lk_flags field can be clobbered.  As a result
the thread blocked on the vnode lock may never get woken up.  Fix this by
holding the vnode interlock while modifying the lock flags in this case.

MFC after:	3 days
2010-07-16 19:20:20 +00:00