Commit Graph

74640 Commits

Author SHA1 Message Date
Konstantin Belousov
7e76751181 MFC r198508, r198509:
Reimplement pselect() in kernel, making change of sigmask and sleep atomic.

MFC r198538:
Move pselect(3) man page to section 2.
2009-12-19 11:47:00 +00:00
Konstantin Belousov
43ba78037b MFC r198507:
Use kern_sigprocmask() instead of direct manipulation of td_sigmask to
reschedule newly blocked signals.

MFC r198590:
Trapsignal() calls kern_sigprocmask() when delivering catched signal
with proc lock held.

MFC r198670:
For trapsignal() and postsig(), kern_sigprocmask() is called with
both process lock and curproc->p_sigacts->ps_mtx locked. Prevent lock
recursion on ps_mtx in reschedule_signals().
2009-12-19 11:31:28 +00:00
Konstantin Belousov
3134e1153f MFC r198506:
In kern_sigsuspend(), manipulate thread signal mask using
kern_sigprocmask(). Also, do cursig/postsig loop immediately after
waiting for signal, repeating the wait if wakeup was spurious due to
race with other thread fetching signal from the process queue before us.

MFC r199136:
Use cpu_set_syscall_retval(9) to set syscall result, and return
EJUSTRETURN from kern_sigsuspend() to prevent syscall return code from
modifying wrong frame.
Take care of possibility that pending SIGCONT might be cancelled by
SIGSTOP, causing postsig() not to deliver any catched signal.
2009-12-19 11:13:59 +00:00
Andriy Gapon
4f1d01f565 MFC r200053,200091: ichsmb: drop default attachment to generic smbus hw
Note that r200091 completely overrides r200053 and the merge of the
former is recorded for bookkeeping only.
r200091 won't be merged to 'more stable' branche(s) because of the POLA.
2009-12-19 11:05:42 +00:00
Konstantin Belousov
6ddf1cd240 MFC r197963:
Put process-directed signals to the process queue unconditionally,
selecting the thread to deliver the signal only by the thread returning
to usermode.
Change cursig() and postsig() to look both into the thread and process
signal queues.

MFC r197976:
Fix typo.

MFC r200082:
Remove wrong assertion. Debugee is allowed to lose a signal
2009-12-19 10:54:29 +00:00
Andriy Gapon
416d0d62ae MFC r200602: ichsmb: add another pci id 2009-12-19 10:52:32 +00:00
Andriy Gapon
176c4e5508 MFC r200064: mca: small enhancements related to cpu quirks 2009-12-19 10:44:26 +00:00
Andriy Gapon
c9ac7946d7 MFC r200033: mca: improve status checking, recording and reporting 2009-12-19 10:38:28 +00:00
Konstantin Belousov
39fb869679 MFC r200444:
For ia32 syscall(), call cpu_set_syscall_retval().
2009-12-19 10:28:24 +00:00
Yoshihiro Takahashi
a3ff6f1def MFC: r200254
MFi386: Use real mode instead of v86 mode.
2009-12-19 04:43:25 +00:00
Yoshihiro Takahashi
abe32331b6 MFC: r200253 and r200255
Reduce diffs against i386.
2009-12-19 04:25:19 +00:00
John Baldwin
823e5012b0 MFC 200357:
Don't warn about an RSDP with a corrupt checksum.  The kernel does a better
job about warning about these things later and this message can be
confusing.
2009-12-18 22:23:27 +00:00
John Baldwin
f70478c04d MFC 200310:
Fix a confusing typo in the EDD packet structure used in gptboot and
gptzfsboot.  I got the segment and offset fields reversed in the structure,
but I also succeeded in crossing the assignments so the actual EDD packet
ended up correct.
2009-12-18 21:21:14 +00:00
John Baldwin
5e05dbe9bd MFC 200309:
- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to
  safely allocate a heap region above 1MB.  This enables {gpt,}zfsboot()
  to allocate much larger buffers than before.
- Use a larger buffer (1MB instead of 128K) for temporary ZFS buffers.  This
  allows more reliable reading of compressed files in a raidz/raidz2 pool.
2009-12-18 21:01:56 +00:00
John Baldwin
5f0cb0c9cd MFC 200216,200219:
- Various small whitespace and style fixes.
- Improve the algorithm the loader uses to choose a memory range for its
  heap when using a range above 1MB.
2009-12-18 20:28:04 +00:00
John Baldwin
f6007c0081 MFC 200084:
Properly return an error reply if an NFS remove or link operation fails.
Previously the failing operation would allocate an mbuf and construct an
error reply, but because the function did not return 0, the NFS server
assumed it had failed to generate a reply and would leak the reply mbuf as
well as not sending the reply to the NFS client.
2009-12-18 19:43:44 +00:00
John Baldwin
5fe2bb8a58 MFC 200037:
ndis_scan_results() can sleep if the scan results are not ready when
ndis_scan() is called.  However, ndis_scan() is invoked from softclock()
and cannot sleep.  Move ndis_scan_results() to the ndis driver's scan_end
hook instead.
2009-12-18 18:30:49 +00:00
Konstantin Belousov
1eea4693c3 MFC r199829:
Implement rtld part of the support for -z nodlopen (see ld(1)).

MFC r199877:
Allow to load not-openable dso when tracing. This fixes ldd on such dso or
dso linked to non-openable object.
Remove '\n' at the end of error message.
End comments with dot.
2009-12-17 19:53:16 +00:00
Ivan Voras
2f3d68cd09 MFC r199764: Make ULE process usage (%CPU) accounting usable again
Approved by:	gnn (mentor) (implicitly)
2009-12-16 21:48:27 +00:00
Marius Strobl
23c703cfc8 MFC: r200459
Unbreak the ata_atapi() usage. Since r200171 (MFC'ed in r200432) the
mode setting functions get a ata_device type device passed instead of
a ata_channel one, thus ata_atapi() has to be adjusted accordingly.

Reviewed by:	mav
2009-12-16 18:39:32 +00:00
Alexander Motin
2750344277 MFC r200607:
Large I/Os on Promise controllers reported to cause UDMA ICRC errors and
subsequent timeouts. Restore previous limit for now, at least until
I will have hardware to experiment.

PR:             kern/141438
2009-12-16 17:48:26 +00:00
Marius Strobl
b7fc89b74b MFC: r200272
Add additional checks of the kernel stack addresses in order to
ensure we don't overrun the beginning of the call chain.
2009-12-15 20:00:34 +00:00
Stanislav Sedov
8e11fcdb91 MFC r198318:
- On entrance to the rx_eof sync RX rings maps with POSTWRITE flag
    instead of POSTREAD: the hardware do not touch this memory (CPU
    updates it).  It is already synchronized as PREWRITE after the
    processing is done.
2009-12-15 10:16:57 +00:00
Stanislav Sedov
abc1e8de6c - MFC r197832, r197834, r197837:
- Add support for new BGE chips (5761, 5784 and 57780).  These chips uses new
    BGE_PCI_PRODID_ASICREV register to store the chip identifier and its revision.
  - Add new grouping macro for 7575+ chips (BGE_IS_5755_PLUS).
  - Add IDs for Fujitsu-branded Broadcom adapters.
2009-12-15 10:00:00 +00:00
Luigi Rizzo
b16d0f5d50 MFC: expose only bio_cmd and bio_flags values to userland 2009-12-15 07:32:08 +00:00
Xin LI
205c44d9cd MFC r200287:
Allow using IPv6 in nfsrvd_sentcache() callback.

PR:		kern/141289
Submitted by:	Petr Lampa <lampa fit vutbr cz>
2009-12-15 01:14:33 +00:00
Marcel Moolenaar
e88e64d392 MFC rev 200397:
Fix interrupt handling.

PR:		kern/140947
2009-12-14 17:42:40 +00:00
Robert Watson
d9adc7058d Merge r199798 from head to stable/8:
Fix comment typo.

  Submitted by: Marc Balmer <marc at msys.ch>
2009-12-14 13:23:33 +00:00
Robert Watson
f7000239aa Merge r197841 from head to stable/8:
Add a new errno, ENOTCAPABLE, to be returned when a process requests an
  operation on a file descriptor that is not authorized by the descriptor's
  capability flags.

  Sponsored by:	Google
2009-12-14 13:13:43 +00:00
Robert Watson
1120ce6b69 Merge r198438 from head to stable/8:
Correct spelling typo in ip_input comment.

  Pointed out by:       N.J. Mann <njm at njm.me.uk>,
                John Nielsen <john at jnielsen.net>, julian (!), lstewart
2009-12-14 11:53:02 +00:00
Robert Watson
19c576c8b2 Merge r198417 from head to stable/8:
Remove unneeded blank line from bpf_drvinit().
2009-12-14 11:45:53 +00:00
Robert Watson
ec610c212b Merge r198393 from head to stable/8:
Improve grammar in ip_input comment while attempting to maintain what
  might be its meaning.

(Note, merge of the revision correcting a spelling error in this commit
will follow as well!)
2009-12-14 11:15:47 +00:00
Robert Watson
7078509346 Merge r197720 from head to stable/8:
Don't comment on stream socket handling in sosend_dgram, since that's
  not handled.
2009-12-14 10:48:19 +00:00
Robert Watson
a43ee308b5 Regenerate sysent files after r200491. 2009-12-14 00:20:48 +00:00
Robert Watson
304e9b147b Merge r197636 from head to stable/8:
Reserve system call numbers for Capsicum security framework capabilities,
  capability mode, and process descriptors: cap_new, cap_getrights, cap_enter,
  cap_getmode, pdfork, pdkill, pdgetpid, and pdwait.

  Obtained from:	TrustedBSD Project
  Sponsored by:		Google
2009-12-14 00:19:31 +00:00
Robert Watson
8c7e8169eb Merge r197624 from head to stable/8:
Add audit events for process descriptor system calls, which will appear in
  a future OpenBSM release.

  Sponsored by:		Google
  Obtained from:	TrustedBSD Project
2009-12-14 00:15:56 +00:00
Robert Noland
cb9f09f873 MFC r198694,r198697
Some general cleanup of scatter/gather memory allocation

     - We don't need to check malloc return values with M_WAITOK
     - remove variables that we don't really need
     - cleanup the error paths by just calling drm_sg_cleanup()
     - fix drm_sg_cleanup() to be safe to call at any time
2009-12-13 15:03:54 +00:00
Robert Noland
5cba3b218f MFC 198332
Check pointer for NULL before dereferencing it, not after.

Originally committed by:	brueffer
2009-12-13 14:55:50 +00:00
Marius Strobl
084c5269a8 MFC: r200215
Add <machine/pcb.h> missed in r199135 (MFC'ed in r200443).
2009-12-12 20:24:12 +00:00
Konstantin Belousov
f0087a7a3c MFC r199135:
Extract the code that records syscall results in the frame into MD
function cpu_set_syscall_retval().
2009-12-12 20:06:25 +00:00
Konstantin Belousov
9562e7e533 MFC r200162:
Change VOP_FSYNC for zfs vnode from VOP_PANIC to zfs_freebsd_fsync().
2009-12-12 14:44:04 +00:00
Antoine Brodin
59cdac432f MFC r199193 to stable/8:
- Remove trailing ";" after if statement
  - Remove #if 0 section that was never needed/used
  Reviewed by:	raj@
2009-12-12 12:36:41 +00:00
Antoine Brodin
a329f4db8a MFC r199187 to stable/8:
Remove trailing ";" in struct ieee80211_beacon_offsets declaration
  Found by:	phk's FlexeLint in September
  Reviewed by:	rpaulo@
2009-12-12 12:34:20 +00:00
Antoine Brodin
1488409373 MFC r199186 to stable/8:
Fix off by one in ieee80211_send_action_register
  Found by:	phk's FlexeLint in September
  Reviewed by:	rpaulo@
2009-12-12 12:31:11 +00:00
Alexander Motin
71e7360ed9 MFC r200171, r200182, r200275, r200295, r200359:
Introduce ATA_CAM kernel option, turning ata(4) controller drivers into
cam(4) interface modules. When enabled, this option deprecates all ata(4)
peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers
(ada, cd, ...) and interfaces to be natively used instead.

As side effect of this, ata(4) mode setting code was completely rewritten
to make controller API more strict and permit above change. While doing
this, SATA revision was separated from PATA mode. It allows DMA-incapable
SATA devices to operate and makes hw.ata.(ata|atapi)_dma tunable work again.

Also allow ata(4) controller drivers (except some specific or broken ones)
to handle larger data transfers. Previous constraint of 64K was artificial
and is not really required by PCI ATA BM specification or hardware.

Submitted by:   nwitehorn (powerpc part)
2009-12-12 10:37:31 +00:00
Marcel Moolenaar
5b574e433f MFC rev 199893, 199941, 200200 and 200207:
o   Eliminate MAXCPU.
o   Revamp the PCPU structure.
2009-12-12 05:14:40 +00:00
Marcel Moolenaar
f695ba479e MFC rev 200045:
Include <sys/sysctl.h>, to get the declarations of ostype and
osrelease. Remove the duplicate declarations from this file.
2009-12-12 04:34:22 +00:00
Nathan Whitehorn
a8fb2bf194 MFC r199888:
Add support for interpreting taps on ADB touchpads as a button click.

Submitted by:	Andreas Tobler <andreast-list at fgznet dot ch>
2009-12-12 02:34:00 +00:00
Nathan Whitehorn
b75ed345f8 MFC r200083:
The first argument of dcbz interprets r0 as a literal zero, not the second.
This worked before by accident.
2009-12-12 02:31:16 +00:00
Alexander Motin
cee2de6c2a MFC r200180:
If we panicked with SIM lock held, do not try to flush caches.
Extra lock recursing will not make debugging easier.
2009-12-11 12:53:09 +00:00
Alexander Motin
248e8fd706 MFC r200353:
Limit maximum I/O size, depending on command set supported by device.
It is required to suppot non-LBA48 devices with MAXPHYS above 128K.
Same is done in ada(4).
2009-12-11 12:44:44 +00:00
Fabien Thomas
68d2ef77eb MFC 196739:
Add counters for the i7 architecture which were accidentally left
out of the original commit of i7 support.  These are all the counters
on pages A-32 and A-33 of the _Intel(R) 64 and IA32 Architectures
Software Developer's Manual Vol 3B_, June 2009.  Almost all
of these counters relate to operations on the L2 cache.
2009-12-11 12:36:02 +00:00
Konstantin Belousov
3f6a1b3c17 Regen 2009-12-11 11:07:48 +00:00
Konstantin Belousov
117384a792 MFC r200111:
Add several syscall compat32 entries for acl manipulation.
2009-12-11 11:07:05 +00:00
Marcel Moolenaar
3919e32212 MFC rev 200240:
In exception_save, write-back ar.rnat after switching the backing-store.

PR:		ia64/120315
2009-12-11 01:26:26 +00:00
Alexander Motin
151681ac53 MFC r199846:
Add two Cirrus Logic codec IDs.
Add GPIO setting quirk for Apple MacBookPro5,5.

Submitted by:   ed
2009-12-11 01:06:30 +00:00
Pawel Jakub Dawidek
f142f57c04 MFC r200124,r200126,
r200124:

Avoid using additional variable for storing an error if we are not going
to do anything with it.

r200126:

Fix deadlock when ZVOLs are present and we are replacing dead component or
calling scrub when pool is in a degraded state. It will try to taste ZVOLs,
which will lead to deadlock, as ZVOL will try to acquire the same locks as
replace/scrub is holding already.

We can't simply skip provider based on their GEOM class, because ZVOL can have
providers build on top of it and we need to skip those as well.

We do it by asking for ZFS::iszvol attribute. Any ZVOL-based provider will give
us positive answer and we have to skip those providers.

This way we remove possibility to create ZFS pools on top of ZVOLs, but it is
not very useful anyway.

I believe deadlock is still possible in some very complex situations like when
we have MD provider on top of UFS file on top of ZVOL. When we try to replace
dead component in the pool mentioned ZVOL is based on, there might be a
deadlock when ZFS will try to taste MD provider. There is no easy way to detect
that, but it isn't very common.

r200125,r200158:

Fix order of looking for providers.

Before r200125 the order of looking for providers was wrong. It was:
1. Find provider by name.
2. Find provider by guid.
3. Find provider by name and guid.

Where it should have been:
1. Find provider by name and guid.
2. Find provider by guid.
3. Find provider by name.
2009-12-10 18:38:40 +00:00
Marcel Moolenaar
d87439e7b6 MFC rev 200230:
Add support for the NetMos NM9865 family of Serial/Parallel ports.
2009-12-10 05:45:40 +00:00
Andrew Thompson
c9e072d090 MFC r199677
add support for MIDI devices without audio control stream.

Submitted by:	Hans Petter Selasky
2009-12-09 23:12:52 +00:00
Andrew Thompson
e4f658cee0 MFC r199576
remove volume alignment (was previously not correctly implemented)
2009-12-09 23:12:14 +00:00
Andrew Thompson
9d294893a4 MFC r199060
Improve support for High-speed USB audio devices.
 - fix issues regarding the mixer, where the interface number was not set in
   time.
 - fix wrong use of resolution parameter.

Submitted by:	Hans Petter Selasky
2009-12-09 23:11:27 +00:00
Andrew Thompson
40e55da3d1 MFC r196487
Remove redundant Giant reference. Giant will be dropped
 automatically when the mutex argument is NULL.
2009-12-09 23:10:32 +00:00
Andrew Thompson
c1b5138fc1 MFC r199816
Remove overuse of exclamation marks in kernel printfs, there mere fact a
 message has been printed is enough to get someones attention. Also remove the
 line number for DPRINTF/DPRINTFN, it already prints the funtion name and a
 unique message.
2009-12-09 22:42:40 +00:00
Andrew Thompson
fd29c5e00e MFC r199814
Disable interrupts after doing early takeover of the usb controller in case usb
 isnt actually compiled in (or kldloaded) as the controller could cause spurious
 interrupts.
2009-12-09 22:41:50 +00:00
Andrew Thompson
044745556c MFC r199718
Actually disable interrupts in ehci_detach().
2009-12-09 22:41:11 +00:00
Andrew Thompson
0ae254cb36 MFC r199676
Correct register access for USB device side operation on the musb controller.

Submitted by:	Hans Petter Selasky
2009-12-09 22:40:27 +00:00
Andrew Thompson
c7838bf992 MFC r199675
Provide tunables for some of the usb sysctls that affect boot behaviour.

Submitted by:	Andriy Gapon
2009-12-09 22:39:09 +00:00
Andrew Thompson
4cd01f7750 MFC r199673
Initialise variable before use.

Submitted by:	Hans Petter Selasky
2009-12-09 22:38:02 +00:00
Andrew Thompson
b7167d5d0d MFC r199672
Improve High Speed slot allocation mechanism by moving the computation to the
 endpoint rather than per xfer and provide functions around get/free of resources.

Submitted by:	Hans Petter Selasky
2009-12-09 22:37:06 +00:00
Andrew Thompson
62460f64ff MFC r199062
Correct Olympus quirk.

Submitted by:	Pavel Gubin
2009-12-09 22:36:16 +00:00
Andrew Thompson
2785d01590 MFC r199061
Add missing mtx_destroy().

Submitted by:	Sebastian Huber
2009-12-09 22:35:08 +00:00
Andrew Thompson
1250e0e321 MFC r199059
improve support for high speed isochronous endpoints which does not run 1:1,
 but needs intervalling 1:2, 1:4 or 1:8

Submitted by:	Hans Petter Selasky
2009-12-09 22:34:11 +00:00
Andrew Thompson
653a3d45c4 MFC r199057
ehci_init() will do reset and set the usbrev flag.  Fix problem where
 ehci_reset() was called before ehci_init().

PR:		usb/140242
Submitted by:	Sebastian Huber
2009-12-09 22:33:22 +00:00
Andrew Thompson
2265c34554 MFC r198776
- Add usb_fill_bulk_urb() and usb_bulk_msg() linux compat functions [1]
 - Don't write actual length if the actual length pointer is NULL [2]
 - correct Linux Compatibility error codes for short isochronous IN transfers
   and make status field signed.

Submitted by:	Leunam Elebek [1], Manuel Gebele [2]
2009-12-09 22:32:36 +00:00
Andrew Thompson
975199a5ac MFC r198774
Check unit number and provide string name for consdev.

Submitted by:	HPS
2009-12-09 22:31:45 +00:00
Andrew Thompson
c39d541d9f MFC r197761,r198194,r198862
updates device entries supported with the product name not magic numbers
 and sorts entries.  WUSB54GCV2 is added.

 overhauls urtw(4) for supporting RTL8187B devices properly that there
 was major changes to initialize RF chipset and set H/W registers and
 removed a lot of magic numbers on code.
2009-12-09 22:10:45 +00:00
Nathan Whitehorn
c15901d48b MFC r199949:
Add atp(4) to powerpc GENERIC. Most late-generation Apple PowerPC laptops
have trackpads that do not work at all without this driver.
2009-12-09 21:58:39 +00:00
Nathan Whitehorn
a4ca386425 MFC r199169:
Reduce probe priority of USB input devices to BUS_PROBE_GENERIC from
BUS_PROBE_SPECIFIC. This allows device-specific drivers like atp to
attach reliably.
2009-12-09 21:56:55 +00:00
Andrew Thompson
310ce38f75 MFC r199086,199151,199680,199948,200241
Driver for the Apple Touchpad present on MacBook (non-Pro & Pro).

Submitted by:	Rohit Grover <rgrover1 at gmail.com>
2009-12-09 21:47:42 +00:00
Alexander Motin
26952f96e5 MFC r200121:
Do not ignore device interrupt if bus mastering is still active. It is
normal in case of media read error and some ATAPI cases, when transfer size
is unknown beforehand. PCI ATA BM specification tells that in case of such
underrun driver should just manually stop DMA engine. DMA engine should
same time guarantie that all bus mastering transfers completed at the moment
of driver reads interrupt flag asserted.
This change fixes interrupt storms and command timeouts in many cases.

PR:             kern/103602, sparc64/121539, kern/133122, kern/139654
2009-12-09 17:20:10 +00:00
Alexander Motin
3ca1ec74ed MFC r200117:
On Soft Reset, read device signature from FIS receive area, instead of
PxSIG register. It works better for NVidia chipsets. ahci(4) does the same.

PR:             kern/140472, i386/138668
2009-12-09 17:11:09 +00:00
Alexander Motin
67c3bd2681 MFC r200223:
Explicitly acknowledge MSI completion, as required by SiI3124 datasheet.
It makes MSI working there. Later (and cheaper) PCIe chips (3132/3531)
still randomly crashing system in few seconds of high MSI rates, generating
something inaporopriate, like NMI or "Fatal trap 30".
2009-12-09 13:32:49 +00:00
Alexander Motin
0d8f2099fa MFC r200217:
SiI3124 has no SNotification register. Handle Asynchronous Notifications
there without it as good as possible.
2009-12-09 13:30:11 +00:00
Alexander Motin
240d980d7c MFC r200196:
Add Asynchronous Notification support for controllers without SNTF
capability by snooping SDB FIS receive area. It should be even faster
then regular way, but less reliable.
2009-12-09 13:27:06 +00:00
Alexander Motin
417f972601 MFC r200086:
Change 'load' balancing mode algorithm:
- Instead of measuring last request execution time for each drive and
choosing one with smallest time, use averaged number of requests, running
on each drive. This information is more accurate and timely. It allows to
distribute load between drives in more even and predictable way.
- For each drive track offset of the last submitted request. If new request
offset matches previous one or close for some drive, prefer that drive.
It allows to significantly speedup simultaneous sequential reads.

PR:             kern/113885
2009-12-08 23:23:45 +00:00
Alexander Motin
e99e819fed MFC r196879:
Add support for changing providers priority.
2009-12-08 23:15:48 +00:00
Rick Macklem
6d54ecd38f MFC: r199715
Modify the experimental nfs server so that it falls back to
using VOP_LOOKUP() when VFS_VGET() returns EOPNOTSUPP in the
ReaddirPlus RPC. This patch is based upon one by pjd@ for the
regular nfs server which has not yet been committed. It is needed
when a ZFS volume is exported and ReaddirPlus (which almost
always happens for NFSv4) is performed by a client. The patch
also simplifies vnode lock handling somewhat.

Tested by:	gerrit at pmp.uni-hannover.de
2009-12-08 22:41:37 +00:00
Rick Macklem
52b239b029 MFC: r199616
Patch the experimental NFS server is a manner analagous to
r197525, so that the creation verifier is handled correctly
in va_atime for 64bit architectures. There were two problems.
One was that the code incorrectly assumed that
sizeof (struct timespec) == 8 and the other was that the tv_sec
field needs to be assigned from a signed 32bit integer, so that
sign extension occurs on 64bit architectures. This is required
for correct operation when exporting ZFS volumes.

Tested by:	gerrit at pmp.uni-hannover.de
Reviewed by:	pjd
2009-12-08 22:28:55 +00:00
Fabien Thomas
f8abda828b MFC 198464:
Inform hwpmc(4) of a thread's impending demise prior to invoking sched_throw().
2009-12-08 18:23:52 +00:00
Andriy Gapon
2cd46f059b MFC r199968: x86 cpu features: add MOVBE reporting and flag 2009-12-08 15:27:06 +00:00
Andriy Gapon
3ed91d6a6d MFC r199184: reflect that pg_ps_enabled is a tunable 2009-12-08 15:21:39 +00:00
Andriy Gapon
66d19b8579 MFC r200052: ichsmb: add pci ids for some newer supported hardware 2009-12-08 15:14:55 +00:00
Nathan Whitehorn
496ef31252 MFC r199886:
Add a CPU features framework on PowerPC and simplify CPU setup a little
more. This provides three new sysctls to user space:
hw.cpu_features - A bitmask of available CPU features
hw.floatingpoint - Whether or not there is hardware FP support
hw.altivec - Whether or not Altivec is available

PR:		powerpc/139154
2009-12-08 05:37:08 +00:00
Nathan Whitehorn
3c2ef79634 MFC r198678:
ake procstat -k work on PowerPC by avoiding mistakenly using signed
compares with a low address (0x1000) and a high address
(the KVA kernel stack).
2009-12-08 05:32:44 +00:00
Nathan Whitehorn
e9962146c6 MFC r198445:
Turn on NAP mode on G5 systems, and refactor the HID0 setup code a little.
This makes my G5 Xserve sound slightly less like it is filled with
howling banshees.

MFC r198968:

Unbreak E500 builds. The inline assembly for the 970 CPUs
is invalid when compiling for BookE.

MFC r199533:

Fix cpuid output on E500 core.
2009-12-08 05:27:06 +00:00
Nathan Whitehorn
3958967343 MFC r198444:
Allow Heathrow-based machines to boot a kernel containing option SMP
without panicing.
2009-12-08 05:23:07 +00:00
Fabien Thomas
86cff089e7 MFC 200060:
Use a better check for a valid kernel stack address when capturing
kernel call chains.
2009-12-07 20:49:49 +00:00
Fabien Thomas
29439ac7a1 MFC 198432:
Only claim that the PMC_CLASS_IAF PMCs are supported by a CPU if
there are PMCs on the CPU that belong to the class.
2009-12-07 20:40:48 +00:00
Xin LI
931d13672c MFC revision 197579 and 199617:
Add two new fcntls to enable/disable read-ahead:

 - F_READAHEAD: specify the amount for sequential access.  The amount is
   specified in bytes and is rounded up to nearest block size.
 - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential
   access size.

A third argument of zero disables the read-ahead behavior.

Please note that the read-ahead amount is also constrainted by sysctl
variable, vfs.read_max, which may need to be raised in order to better
utilize this feature.

Thanks Igor Sysoev for proposing the feature and submitting the original
version, and kib@ for his valuable comments.
2009-12-07 19:59:28 +00:00
John Baldwin
42e9dd5cad MFC 199974:
Remove extra parantheses from usb_ethernet.c and usb_serial.c lines.
config(8) doesn't parse parantheses and instead treated them as being
part of the device driver name (e.g. '(u3g' vs 'u3g').  While here, fix the
style of these long lines to match the wrapping used for other long lines
in this file.
2009-12-07 17:18:52 +00:00
Robert Noland
c9ab55149b MFC 199714
Create a seperate ZFS enabled loader.

This adds zfsloader which will be called by zfsboot/gptzfsboot code rather
than the tradional loader.  This eliminates the need to set the
LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader.

Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot)
in order for the boot process to use the new loader.

New installations will no longer be required to build a ZFS enabled
loader for a working ZFS boot system.  Installing zfsboot/gptzfsboot is
sufficient for acknowledging the use of CDDL code and therefore the ZFS
enabled loader.
2009-12-07 16:37:02 +00:00
Michael Tuexen
cf19fced17 MFC 197288,197326,197327,197328,197342,197914,197929,
197955,199365,199370,199371,199373,199866
This MFCs all SCTP/VNET relevant fixes from head.

Approved by: rrs (mentor)
2009-12-07 07:33:51 +00:00
Bjoern A. Zeeb
bba81f6fbd MFC r198467:
Unconditionally call the setsockopt for IPV6_V6ONLY for v6 linux sockets
  no matter whether we are compiled as module or if our default of the
  net.inet6.ip6.v6only sysctl already matches what we would set.

  This avoids unnecessary complications with modules, VIMAGES, INET6 and
  the sysctl value, especially considering that most users will use
  linux compat as a module.

  Discussed with:       kib, rwatson (weeks ago)
  Reviewed by:  rwatson
2009-12-06 09:36:11 +00:00
Navdeep Parhar
1dc03a9fc5 MFC r199237:
sc->rev and is_offload(sc) will always be 0 during probe.  Wait till
attach to get correct values.

(missed this one in r200175)
2009-12-06 01:59:06 +00:00
Navdeep Parhar
3b3920bc3c MFC r199237, r199238, r199239, r199240, r200003
r199237:
sc->rev and is_offload(sc) will always be 0 during probe.  Wait till
attach to get correct values.

r199238:
Make sure *some* edc is setup even for an unknown transceiver (assume
it is optical).

r199239:
The 10GBASE-T card should use an IPG of 1.  Also enable the check
for low power startup on this card.

r199240:
Don't disable the XGMAC's tx on ifconfig down.  It is unnecessary
and can cause false backpressure in the chip.  Fix a us/ms mixup
while here.

r200003:
T3 firmware 7.8.0 for cxgb(4)
2009-12-06 01:45:55 +00:00
Bjoern A. Zeeb
c4de0a57f3 MFC r197729:
Make sure that the primary native brandinfo always gets added
  first and the native ia32 compat as middle (before other things).
  o(ld)brandinfo as well as third party like linux, kfreebsd, etc.
  stays on SI_ORDER_ANY coming last.

  The reason for this is only to make sure that even in case we would
  overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo
  would still be there and the system would be operational.

Reviewed by:	kib
2009-12-05 20:43:15 +00:00
Bjoern A. Zeeb
8cb7f89dbb MFC r197726:
Print a warning in case we cannot add more brandinfo because
  we would overflow the MAX_BRANDS sized array.

Reviewed by:	kib
2009-12-05 20:40:28 +00:00
Bjoern A. Zeeb
a1778929b7 MFC r197518:
lindev(4) [1] is supposed to be a collection of linux-specific pseudo
  devices that we also support, just not by default (thus only LINT or
  module builds by default).

  While currently there is only "/dev/full" [2], we are planning to see more
  in the future.  We may decide to change the module/dependency logic in the
  future should the list grow too long.

  This is not part of linux.ko as also non-linux binaries like kFreeBSD
  userland or ports can make use of this as well.

Suggested by:	rwatson [1] (name)
Submitted by:	ed [2]
Discussed with:	markm, ed, rwatson, kib (weeks ago)
Reviewed by:	rwatson, brueffer (prev. version)
PR:		kern/68961
2009-12-05 20:37:46 +00:00
Bjoern A. Zeeb
b4e227f473 MFC r198050:
Compare pointer to NULL rather than 0.
2009-12-05 19:44:16 +00:00
Bjoern A. Zeeb
4fe9cf96e9 MFC r198076:
Explicitly compare to a return code.

  Discussed with: philip (after we both misread the logic there the 1st time)
2009-12-05 19:42:42 +00:00
Bjoern A. Zeeb
3b558c96ce MFC r199947, 199950:
Enable IPcomp by default.

PR:	kern/123587
2009-12-05 19:25:29 +00:00
Bjoern A. Zeeb
87d7d0abb5 MFC r199946:
Add more statistics variables for IPcomp.

  Try to version the struct in a backward compatible way.
  People asked for the versioning of the stats structs in general before.

Note: old netstat binaries, as only consumer, continue to work as they are
      still using kvm but will not display the new stats. [1]

Discussed with:	rwatson [1]
2009-12-05 19:21:58 +00:00
Bjoern A. Zeeb
e55ea9c811 MFC r199906:
In case the compression result is the same size as the orignal version,
  the compression was useless as well.  Make sure to not update the data
  and return, else we would waste resources when decompressing.

  This also avoids the copyback() changing data other consumers like
  xform_ipcomp.c would have ignored because of no win and sent out without
  noting that compression was used, resulting in invalid packets at the
  receiver.
2009-12-05 19:12:35 +00:00
Bjoern A. Zeeb
99808bdf69 MFC r199905:
Assimilate very similar input and output code paths
  (no real functional change).
2009-12-05 19:11:02 +00:00
Bjoern A. Zeeb
d0b0b1b85a MFC r199904:
Add SDT iter probes forgotten in r199885 (r200138 for stable/8).
2009-12-05 19:09:26 +00:00
Bjoern A. Zeeb
0b845b9322 MFC r199899:
Only add the IPcomp header if crypto reported success and we have a lower
  payload size.  Before we had always added the header, no matter if we
  actually send out compressed data or not.

  With this, after the opencrypto/deflate changes, IPcomp starts to work
  apart from edge cases.  Leave it disabled by default until those are
  fixed as well.

PR:	kern/123587
2009-12-05 19:07:28 +00:00
Bjoern A. Zeeb
bc05a8e020 MFC r199897:
Remove whitespace.
2009-12-05 19:06:03 +00:00
Bjoern A. Zeeb
eee2ee2ac7 MFC r199896:
Directly send data uncompressed if the packet payload size is lower than
  the compression algorithm threshold.
2009-12-05 19:03:20 +00:00
Bjoern A. Zeeb
8d6960d085 MFC r199895:
Change memory managment from a fixed size array to a list.
  This is needed to avoid running into out of buffer situations
  where we cannot alloc a new buffer because we hit the array size
  limit (ZBUF).
  Use a combined allocation for the struct and the actual data buffer
  to not increase the number of malloc calls. [1]

  Defer initialization of zbuf until we actually need it.

  Make sure the output buffer will be large enough in all cases.

  Details discussed with: kib [1]
  Reviewed by:            kib [1]
2009-12-05 19:01:50 +00:00
Bjoern A. Zeeb
7a955dbf6b MFC r199887:
Z_PARTIAL_FLUSH is marked deprecated. Z_SYNC_FLUSH is the suggested
  replacement but only use it for inflate. For deflate use Z_FINISH
  as Z_SYNC_FLUSH adds a trailing marker in some cases that inflate(),
  despite the comment in zlib, does npt seem to cope well with, resulting
  in errors when uncompressing exactly fills the outbut buffer without
  a Z_STREAM_END and a successive call returns an error.
2009-12-05 18:59:58 +00:00
Bjoern A. Zeeb
5aef8fdf11 MFC r199885:
Add SDT probes for opencrypto:deflate:deflate_gobal:*.
  They are not nice but they were helpful.
2009-12-05 18:57:32 +00:00
Bjoern A. Zeeb
c8ce7b587b MFC r199884:
Define an SDT provider for "opencrypto".
2009-12-05 18:55:54 +00:00
Bjoern A. Zeeb
4cc7ec3500 MFC r199883:
Add SDT_PROBE[1-5] in the same way we have SDT_PROBE_DEFINE[1-5] to
  avoid having to add all the unused trailing arguments as zeros.
2009-12-05 18:54:21 +00:00
Bjoern A. Zeeb
cc8eb5c3a4 MFC r199894:
Correct a typo.
2009-12-05 18:17:15 +00:00
Ed Maste
4816ae8d04 MFC r200001:
Fix parenthesis typo -- copy full frame pointer for userland callchain,
  not just one byte.

Submitted by:        Ryan Stone      rysto32 at gmail dot com
2009-12-05 17:07:43 +00:00
Luigi Rizzo
3cdcbc4885 some simple MFC:
r200020:
  change the type of the opcode from enum *:8  to u_int8_t
  so the size and alignment of the ipfw_insn is not compiler dependent.
  No changes in the code generated by gcc.

r200023:
  Add new sockopt names for ipfw and dummynet.

  This commit is just grabbing entries for the new names
  that will be used in the future, so you don't need to
  rebuild anything now.

r200034
  Dispatch sockopt calls to ipfw and dummynet
  using the new option numbers, IP_FW3 and IP_DUMMYNET3.
  Right now the modules return an error if called with those arguments
  so there is no danger of unwanted behaviour.

r200040
  - initialize src_ip in the main loop to prevent a compiler warning
    (gcc 4.x under linux, not sure how real is the complaint).
  - rename a macro argument to prevent name clashes.
  -  add the macro name on a couple of #endif
  - add a blank line for readability.
2009-12-05 12:51:51 +00:00
Alexander Motin
c0afc53a8f MFC r200008:
Add CAM_ATAIO_DMA ATA command flag to mark DMA protocol commands.
It is not needed for SATA controllers, but required for PATA.
2009-12-05 08:44:55 +00:00
Marcel Moolenaar
fa0b65d151 Revert unintentional change in revision 200103. 2009-12-04 18:35:02 +00:00
Marcel Moolenaar
0800f014ec MFC rev 200051:
Make sure bus space accesses use unorder memory loads and stores.
2009-12-04 18:29:59 +00:00
Jaakko Heinonen
a95336167e MFC r199529:
Extend ddb(4) "show mount" command to print active string mount options.
Note that only option names are printed, not values.

Approved by:	trasz (mentor)
2009-12-04 11:23:37 +00:00
Pyun YongHyeon
9b96de9413 MFC r199565:
Move interface reinitialization down after disabling WOL in resume
  path.
2009-12-03 18:48:32 +00:00
Pyun YongHyeon
86032a4158 MFC r199564:
Minimize interface reinitialization by checking IFF_DRV_RUNNING
  flag. This fixes unnecessary interface UP/DOWNs during getting an
  IP address via DHCP.
2009-12-03 18:42:19 +00:00
Alexander Motin
06a7b83b5e MFC r199822:
Drop USB mass storage devices support from ata(4). It is out of the build as
long as I remember, and completely superseded by better maintained umass(4).
It's main idea was to optionally avoid CAM dependency for such devices, but
with move ATA to CAM, it is not actual any more.

No objections:  hselasky@, thompsa@, arch@
2009-12-02 10:47:11 +00:00
Alexander Motin
03b5c37446 MFC r199747, r199799, r199821:
- Extend XPT-SIM transfer settings control API. Now it allows to report to
SATA SIM number of tags supported by each device, implement ATA mode and
SATA revision negotiation for both SATA and PATA SIMs.
- Make ahci(4) and siis(4) to use submitted maximum tag number, when
scheduling requests. It allows to support NCQ on devices with lower tags
count then controller supports.
- Make PMP driver to report attached devices connection speeds.
- Implement ATA mode negotiation between user settings, device and
controller capabilities.
- Improve ATA mode/SATA revision control.
2009-12-02 10:32:34 +00:00
Alexander Motin
7e7ac267c9 MFC r199279, r199280, r199281:
- Fix several device freeze counting bugs.
- Remove code that years ago was closing race between request submission
to SIM and device/SIM freeze. That race become impossible after moving from
spl to mutex locking, while this workaround causes some unexpected effects.
2009-12-02 10:10:37 +00:00
Fabien Thomas
baa1e3c69a MFC 199763:
- fix a LOR between process lock and pmc thread mutex
 - fix a system deadlock on process exit when the sample buffer
 is full (pmclog_loop blocked in fo_write) and pmcstat exit.
2009-12-01 23:06:17 +00:00
Fabien Thomas
7619fb0cbd MFC 198343:
Handle the case where there is only one PMC in the system.
2009-12-01 22:59:37 +00:00
John Baldwin
fa860bed4e MFC 199579:
Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to
fully support booting from large volumes.
2009-12-01 22:38:17 +00:00
Andriy Gapon
e9aa44c800 MFC r199016: acpi: remove 'magic' ivar
Note that the ivar itself is kept in the stable branches, only its use is
dropped.
2009-12-01 06:11:42 +00:00
Pyun YongHyeon
de75e77770 MFC r199413:
It seems generation of link state change of e1000phy(4) is not
  reliable on some Marvell PHYs. If msk(4) know it still does not
  have established link check whether msk(4) missed the link state
  change by looking into polled link state.

  Reported by:	Mel Flynn < mel.flynn+fbsd.current <> mailing.thruhere dot net >,
		Gleb Kurtsou <gleb.kurtsou <> gmail dot com >
  Tested by:	Gleb Kurtsou <gleb.kurtsou <> gmail dot com >
2009-11-29 20:19:24 +00:00
Pyun YongHyeon
75c4ab0ae9 MFC r199012:
Add preliminary Yukon Ultra 2 support(88E8057). The controller
  looks very similar to Yukon EC Ultra.

  Tested by:	kalin m ( kalin <> el dot net )
2009-11-29 19:58:35 +00:00
Pyun YongHyeon
30c8843f6a MFC 198996-198997.
r198996:
  Remove unnecessary header file.

r198997:
  It's normal to see Rx FIFO overruns under high network load and
  showing the message creates other side-effects. Remove the Rx
  FIFO overrun message in interrupt handler. msk(4) should recover
  from the FIFO overruns without any user intervention. Users can
  still check the Rx FIFO overrun counter from MAC MIB statistics
  maintained in driver(dev.msk.0.stats.rx.overflows).
2009-11-29 19:54:32 +00:00
Pyun YongHyeon
2ff1d99219 MFC 198814.
Add a check to know whether driver is still running after
  reacquiring driver lock in Rx handler. re(4) drops a driver lock
  before passing received frame to upper stack and reacquire the
  lock. During the time window ioctl calls could be executed and if
  the ioctl was interface down request, driver will stop the
  controller and free allocated mbufs. After that when driver comes
  back to Rx handler again it does not know what was happend so it
  could access free mbufs which in turn cause panic.

  Reported by:	Norbert Papke < npapk <> acm dot org >
  Tested by:	Norbert Papke < npapk <> acm dot org >
2009-11-29 19:49:21 +00:00
Pyun YongHyeon
cb08d589eb MFC 198813.
Add BCM5761 PHY id.
2009-11-29 19:46:15 +00:00
Pyun YongHyeon
4a288ceae9 MFC 197627.
Fix multicast handling. All Atheros controllers use big-endian form
  in computing multicast hash.

  PR:	kern/139137
2009-11-29 19:29:11 +00:00
Pyun YongHyeon
621838143b MFC 197600.
For AR8132 fast ethernet controller, do not report 1000baseT
  capability to mii(4). Even though AR8132 uses the same model/
  revision number of F1 gigabit PHY, the PHY has no ability to
  establish 1000baseT link. I have no idea why Atheros use the same
  device/model id for this PHY.
  With this change atphy(4) does not report 1000baseT media
  capability and manual 1000baseT configuration is also disabled
  which is more desirable behavior for 10/100Mbps PHY.
2009-11-29 19:25:15 +00:00
Pyun YongHyeon
02b6f045fe MFC 197592.
Add DGE-560SX(Yukon XL) to the supported device list. Many thanks
  to "Eugene Perevyazko <john <> dnepro dot net>" who kindly gave
  remote access to system with DGE-560SX.
2009-11-29 19:18:22 +00:00
Pyun YongHyeon
26ac5ae5da MFC 197591.
Add workaround for Yukon XL which has hardware bug that can't flush
  FIFO.
2009-11-29 19:15:08 +00:00
Pyun YongHyeon
4b4edd6101 MFC 197590.
Add hack to pass controller specific information to phy driver.
  Unlike most other PHYs there is no easy way to know which media
  type the PHY supports on Marvell PHYs. MIIF_HAVEFIBER flags is now
  passed via bus-specific instance variable of a device. While I'm
  here add 88E1112 specific work around to set SIGDET polarity low.
  Many thanks "Eugene Perevyazko <john <> dnepro dot net>" who kindly
  gave remote access to system with DGE-560SX.
2009-11-29 19:11:03 +00:00
Pyun YongHyeon
b76e9c0853 MFC 197589.
Fix MIB statistics clear routine. This should fix alignment errors on sparc64.

  Reported by:	Garrett Damore < gdamore <> opensolaris dot org >
2009-11-29 19:06:33 +00:00
Pyun YongHyeon
5bb9dc0d8f MFC 197588.
Some fiber PHY(88E1112) does not seem to set resolved speed so
  always assume we've got IFM_1000_SX.
2009-11-29 19:03:20 +00:00
Pyun YongHyeon
ee9449a145 MFC 197587.
Don't encode model id twice.

  Reported by:	Kristof Provost <kristof <> sigsegv dot be>
2009-11-29 18:59:43 +00:00
Pyun YongHyeon
e39d827775 MFC r197585.
Remove unnecessary device reinitialization.
2009-11-29 18:51:58 +00:00
Nathan Whitehorn
1abf14215a MFC r199226:
Provide a real fix to the too-many-translations problem when booting
from CD on 64-bit hardware to replace existing band-aids. This occurred
when the preloaded mdroot required too many mappings for the static
buffer.

Since we only use the translations buffer once, allocate a dynamic
buffer on the stack. This early in the boot process, the call chain
is quite short and we can be assured of having sufficient stack space.
2009-11-28 20:02:45 +00:00
Nathan Whitehorn
0b5ac7b6b9 MFC r198212,198378,198427,198428,198723,198724,198725,198731:
SMP support for PowerPC G5 systems.

r198724:
	Fix a race in casuword() exposed by csup. casuword() non-atomically
read the current value of its argument before atomically replacing it,
which could occasionally return the wrong value on an SMP system. This
resulted in user mutex operations hanging when using threaded applications.

r198723,198725,198731:
	Loop on blocked threads when using ULE scheduler, removing an
XXX MP comment.

r198427:
	Add some more paranoia to setting HID registers, and update the AIM
clock routines to work better with SMP.

r198378:
	Add SMP support on U3-based G5 systems. While here, correct the
64-bit tlbie function to set the CPU to 64-bit mode correctly.

r198212:
	Don't assume that physical addresses are identity mapped. This
allows the second processor on G5 systems to start.
2009-11-28 19:37:58 +00:00
Nathan Whitehorn
b17e03bd8a MFC r198400:
Do not map the trap vectors into the kernel's address space. They are
only used in real mode and keeping them mapped only serves to make NULL
a valid address, which results in silent NULL pointer deferences.

Suggested by:   Patrick Kerharo
Obtained from:  projects/ppc64
2009-11-28 18:36:58 +00:00
Nathan Whitehorn
b478ed7a6b MFC r197961,197962:
Fix two typos that caused DSISR and CR not to be preserved across context
switches.
2009-11-28 18:34:35 +00:00
Rafal Jaworowski
000d6fb9d9 MFC r199580:
tsec: Use IFQ_DRV macros for managing interface packet queue.

This lets tsec(4) work with ALTQ.

Submitted by:	Marcin Ligenza
2009-11-27 13:38:59 +00:00
Attilio Rao
08742bd257 MFC r199260:
Add sysctls in ahd(4) in order to keep track of different classes of
errors. So far 3 different classes are present (correctable,
uncorrectable and fatal) but more can be added easilly.

Sponsored by:	Sandvine Incorporated
2009-11-27 02:47:49 +00:00
Attilio Rao
9a6d318802 MFC r199227:
Add the possibility for vfs.root.mountfrom tunable to accept a list of
items rather than a single one.
While there fix also a nit in a comment.

Sponsored by:	Sandvine Incorporated
2009-11-27 02:45:50 +00:00
Ken Smith
fac7a2abd8 8.0-RELEASE is done, shift stable/8 to -STABLE designation. 2009-11-27 00:21:17 +00:00
Rafal Jaworowski
5e54294468 MFC r199534:
Provide an effective (relocated) address when building modules metadata.

This lets modules loaded dynamically in loader(8) work for U-Boot-based
platforms.
2009-11-26 22:35:26 +00:00
Alexander Motin
c68cd0c40d MFC r199043:
Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver
attach chips with generic Marvell (non-HighPoint) PCI identification.
These chips are also supported by ata(4). Some vendors, like Supermicro,
are using same chips without providing HPT RAID BIOS.

PR:		kern/120842, kern/136750
2009-11-26 15:16:03 +00:00
Alexander Motin
4fb5bc4259 MFC r199268, r199269, r199273:
Core2Duo/Core2Quad CPUs are unable to control frequency of single CPU
core, only pair of them. As result, both cores are running on highest
one of requested frequencies, and that is reported by status register.
Such behavior confuses frequency validation logic, as it runs on only
one core, as SMP is not yet launched, making EIST completely unusable.

Disable frequency validation by default, for systems with more then one
CPU, until we can implement it properly. It looks like making more harm
now then benefits. Add 'hw.est.strict' loader tunable to control it.

PR:		amd64/140506
2009-11-26 15:11:19 +00:00
Alexander Motin
0264833689 MFC r199645, r199646:
Fix Intel PATA UDMA timings setting, affecting write performance.
Binary divider value 10 specified in datasheet is not a hex 0x10.
UDMA2 should be 33/2 instead of 66/4, which is documented as reverved,
UDMA4 should be 66/2 instead of 66/4, which is definitely wrong.
Release over-agressive WDMA0 mode timings as close to spec as chip can.
2009-11-26 14:56:58 +00:00
Alexander Motin
052c5232f5 MFC r199749:
Use only lower byte of sectors_intr IDENTIFY word as sector count.
This fixes SET_MULTI error during boot on devices supporting less then
16 sectors per interrupt.
2009-11-26 14:50:01 +00:00
Alexander Motin
70f426fe84 MFC r199717:
Do not attach JMicrons with single PCI function. They are not working as
AHCI for some reason, even when declaring so. Let atajmicron configure
them for us and provide PATA support.
2009-11-26 08:29:02 +00:00
Marius Strobl
f6b36bbd8a MFC: r198502
Sync with the other archs and wrap the prototype of in_cksum_skip(9)
in #ifdef _KERNEL.

Submitted by:	Ulrich Spoerlein
2009-11-25 18:31:34 +00:00
Rui Paulo
6772a8e0d0 MFC r199491:
Add WorldB SKU.
2009-11-25 14:54:58 +00:00
Kip Macy
fa178c7b04 fix UP compilation 2009-11-25 01:55:34 +00:00
Kip Macy
4956a0d10f MFC xen pmap updates and eflags fixes 2009-11-25 01:52:36 +00:00
Kip Macy
7d326ccdfc remove gratuitous comment 2009-11-25 01:51:07 +00:00
Kip Macy
0039b95019 MFC core dump support 2009-11-25 01:50:17 +00:00
Marius Strobl
8158a254e9 MFC: r199442
Unroll copying of the registers in {g,s}et_mcontext() and limit it
to the set actually restored by tl0_ret() instead of using the whole
trapframe. Additionally skip %g7 as that register is used as the
userland TLS pointer.

PR:		140523
2009-11-24 20:04:31 +00:00
Alexander Motin
5f0993cb40 MFC r199535:
Tune CAM ATA kernel options a bit. Move PMP support from da to scbus and
add ada device option, according to man page.
2009-11-24 09:10:43 +00:00
Marcel Moolenaar
564da3e7b4 MFC r199274, r199284:
Fix an obvious panic by not casting from a pointer that is 4-bytes
alignment to a type that needs 8-byte alignment, and thus causing
misaligned memory references.
2009-11-24 03:38:42 +00:00
Marcel Moolenaar
0d5340f697 MFC r198733:
Reimplement the lazy FP context switching...
...This change fixes the high FP inconsistency panics.
2009-11-24 03:32:42 +00:00
Marcel Moolenaar
97d630ed47 MFC r198452:
Add PRINTF_BUFR_SIZE=128, since we have SMP by default.
While here, fix tabulation.
2009-11-24 03:28:35 +00:00
Marcel Moolenaar
80f7b7c39e MFC r198338:
o   Align function on a 32-byte boundary so that the core's front-end
    can deliver 2 bundles per cycle to the back-end.
o   Mark syscall stubs with a special unwind ABI tag so that unwind
    libraries know how to unwind.
2009-11-24 03:17:00 +00:00
Alexander Motin
fbd6bbe74b MFC r199321:
Disable PortMultiplier Async Notifications for time of ports reset.
They are useless at that time, but confuse Marvell AHCI.

Add quirk for SiI57XX Port Multipliers, to hide extra port.
2009-11-23 17:54:57 +00:00
Alexander Motin
506ef9edb8 MFC r199258:
Add more codec IDs.
2009-11-23 09:28:16 +00:00
Alexander Motin
2c5d7e80c6 MFC r197611, r197640:
- Add some bits of HDMI/DisplayPort support from later specification updates.
It may be not enough to make them work, but at least should give some
information about these beasts.
- Add Realtek ALC887 codec ID.
2009-11-23 09:26:30 +00:00
Alexander Motin
c1ebbbc962 MFC r197018:
Add NVidia MCP89 HDA controller IDs.
2009-11-23 09:22:38 +00:00
Alexander Motin
95eaf85a77 MFC r197017:
Add Intel 82801JD (one more ICH10) HDA controller ID.
2009-11-23 09:21:35 +00:00
Alexander Motin
510e0aaa49 MFC r196762:
Improve HDA controller capabilities logging.
2009-11-23 09:20:33 +00:00
Alexander Motin
8f51326c68 MFC r199259, r199262, r199322:
Change the way in which AHCI+PATA combined controllers, such as JMicron
are handled. Instead of trying to attach two different drivers to
single device, wrapping each call, make one of them (atajmicron)
attach do device solely, but create child device for AHCI driver,
passing it all required resources. It is quite easy, as none of
resources are shared, except IRQ.
Add support for AHCI SATA parts of alike SATA+PATA MArvell controllers.
Add IDs of Marvell 88SX6102, 88SX6111. 88SX6141 controllers.

As result, it:
- makes drivers operation more independent and straitforward,
- allows to use new ahci(4) driver with such devices, adding support for
new features, such as PMP and NCQ, same time keeping legacy PATA support,
- will allow to just drop old ataahci driver, when it's time come.
2009-11-23 08:56:17 +00:00
Alexander Motin
0cde70967f MFC r198752:
Allow SATA1 SiI chips to do full-sized DMA. Specification tells that we may
release DMA constrants even more, but it require some additional handling.
2009-11-23 08:46:26 +00:00
Alexander Motin
555a8009dd MFC r198717:
- Remove most of direct relations between ATA(4) peripherial and controller
levels. It makes logic more transparent and is a mandatory step to wrap
ATA(4) controller level into ATA-native CAM SIM.
- Tune AHCI and SATA2 SiI drivers memory allocation a bit to allow bigger
I/O transaction sizes without additional cost.
2009-11-23 08:45:17 +00:00
Attilio Rao
fbf9555aa0 MFC r199008:
Track lockmgr_disown() in the stack.
2009-11-22 16:11:20 +00:00
Attilio Rao
7f7bb30263 MFC r199007:
Fix a memory leak.
2009-11-22 16:09:27 +00:00
Attilio Rao
a5e831ded9 MFC r199208, r199223:
Move inet_aton() (specular to inet_ntoa(), already present in libkern)
into libkern in order to made it usable by other modules than alias_proxy.

Sponsored by:	Sandvine Incorporated
2009-11-22 16:04:49 +00:00
Attilio Rao
ea46ba3475 MFC r199210:
Introduce the new loader compile-time option BOOT_PROMPT_123 which allows
to enter the loader prompt just after entering the sequence "123".

Sponsored by:	Sandvine Incorporated
2009-11-22 15:57:08 +00:00
Attilio Rao
36a59d0306 MFC r199209:
Fix a potential buffer boundaries overflow in devclass_add_device() by
using all available int lenghts digits for storing the information.

Sponsored by:	Sandvine Incorporated
2009-11-22 15:53:39 +00:00
Jun Kuriyama
9497adf974 - MFC r199067,199215,199253
- Add hw.clflush_disable loader tunable to avoid panic (trap 9) at
    map_invalidate_cache_range() even if CPU is not Intel.

  - This tunable can be set to -1 (default), 0 and 1.  -1 is same as
    current behavior, which automatically disable CLFLUSH on Intel CPUs
    without CPUID_SS (should be occured on Xen only).  You can specify 1
    when this panic happened on non-Intel CPUs (such as AMD's).  Because
    disabling CLFLUSH may reduce performance, you can try with setting 0
    on Intel CPUs without SS to use CLFLUSH feature.

  - Amd64 init_secondary() calls initializecpu() while curthread is
    still not properly set up. r199067 added the call to
    TUNABLE_INT_FETCH() to initializecpu() that results in hang because
    AP are started when kernel environment is already dynamic and thus
    needs to acquire mutex, that is too early in AP start sequence to
    work.

    Extract the code that should be executed only once, because it sets
    up global variables, from initializecpu() to initializecpucache(),
    and call the later only from hammer_time() executed on BSP. Now,
    TUNABLE_INT_FETCH() is done only once at BSP at the early boot
    stage.
2009-11-22 14:32:32 +00:00
Robert Noland
262b2ce076 MFC 198420
Correct some issues with zfs boot.

   - Teach it to read gang blocks. (essentially untested)
     If you see "ZFS: gang block detected!", please let
     me know, so we can either remove the printf if it
     works, or fix it if it doesn't.

   - If multiple partitions exist on a disk, probe them all.
     We also need to reset dsk->start to 0 to read the right
     sector here.

   - With GPT, we can have 128 partitions.

   - If the bootfs property has ever been set on a pool
     it seems that it never goes away.  zpool won't allow
     you to add to the pool with the bootfs property set.
     However, if you clear the property back to default
     we end up getting 0 for the object number and read
     a bogus block pointer and fail to boot.

   - Fix some error printfs. The printf in the loader is
     only capable of c,s and u formats.

   - Teach printf how to display %llu
2009-11-21 15:02:35 +00:00
Robert Noland
4cb9493f3f MFC r199017,199228
Fix handling of GPT headers when size is > 92 bytes.

This should address reading GPT headers written by opensolaris.
2009-11-21 14:53:08 +00:00
Stacey Son
1c7de26f34 Bump __FreeBSD_version to reflect the point when EVFILT_USER kevent
filter has been implemented.

Approved by: rwatson (co-mentor)
2009-11-21 12:38:45 +00:00
Bruce M Simpson
025bbb4984 MFC r199522..199528:
Pullup IPv6 mcast SSM KPI fixes from HEAD, including fix for
  filter deallocation from Stef Walter.
2009-11-20 12:30:40 +00:00
Bruce M Simpson
28d8e43cf7 MFC r199518:
Adapt the fix for IGMPv2 in r199287 for the IPv6 stack.
  Only multicast routing is affected by the issue.
2009-11-20 11:58:04 +00:00
Hajimu UMEMOTO
30178759ac MFC r199225:
- We are not guaranteed that we're not dropping a reference that
  we did not add.  Call LLE_REMREF() only when callout_stop()
  actually canceled a pending callout.
- callout_reset() may cancel a pending callout.  When
  callout_reset() canceled a pending callout, call LLE_REMREF()
  to drop a reference for the canceled callout.
2009-11-20 06:54:47 +00:00