Commit Graph

150044 Commits

Author SHA1 Message Date
Hajimu UMEMOTO
c2a8874e1a MFC r199242: Use ncursesw to output the date field of vmstat
display with multi-byte string, correctly.
2009-11-22 17:16:37 +00:00
Hajimu UMEMOTO
1b05fd6074 MFC r199092: Add gai_strerror() catalog for ja_JP.UTF-8
and ja_JP.eucJP.
2009-11-22 17:08:52 +00:00
Hajimu UMEMOTO
b119cf74a1 MFC r199083: Add NLS catalogs support to gai_strerror(3).
Controlled by NLS define.
2009-11-22 17:05:46 +00:00
Attilio Rao
fa5f8aabc7 MFC r199024:
Use a safety belt for cases where corrupted narg can be passed to the
ktrsyscall().
2009-11-22 16:13:16 +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
John Baldwin
d2c47a848e Purge extraneous mergeinfo. 2009-11-20 15:27:52 +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
Christian Brueffer
e15ad56b54 MFC: r199349
Fix typo.
2009-11-20 07:19:09 +00:00
Christian Brueffer
a154a457ff MFC: r199255, r199257
Improved the manpage description.  The committed wording
was provided by jhb.

Remove a note about vfork(4) going to be eliminated, it's here to stay.
2009-11-20 06:55:35 +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
Edwin Groothuis
26032bfa90 MFC of r199336
MFV of tzdata2009s, r199334

- Fix (harmless) typo in the definitions of Antarctica/David
- Fiji will go into DST from 29 November 2009 to 25 April 2010.
2009-11-19 20:40:11 +00:00
Rui Paulo
bbe1ae3552 MFC 199232:
Add a missing check for Apple HFS partitions.
2009-11-19 15:28:08 +00:00
Yoshihiro Takahashi
50324497fb MFC: revision 199219
Fix cpu model for PODP5V83.  It is P24T, not P54T.
  Also remove redundant 'Overdrive' word.
2009-11-19 12:07:00 +00:00
Michael Tuexen
21bd3c552d MFC 199477
Fix a bug where the system panics when a SHUTDOWN is received with an
illegal TSN.
This bug was reported by Irene Ruengeler.

Approved by: re, rrs (mentor)
2009-11-18 15:35:03 +00:00
Hajimu UMEMOTO
a1a32e5e31 MFC r199188: ANSIfy. 2009-11-18 14:40:00 +00:00
Alexander Motin
c4511bef96 MFC r196964:
Do not check proper request alignment here in geom_dev in production.
It will be checked any way later by g_io_check() in g_io_schedule_down().
It is only needed here to not trigger panic from additional check, when
INVARIANTS enabled. So cover it with #ifdef INVARIANTS. It saves two
64bit divisions per request.
2009-11-17 21:45:28 +00:00
Alexander Motin
9c4a609c2d MFC r196904:
Remove msleep() timeout from g_io_schedule_up/down(). It works fine
without it, saving few percents of CPU on high request rates without
need to rearm callout twice per request.
2009-11-17 21:43:42 +00:00
Alexander Motin
8c184a2d26 MFC r196837:
Remove artificial MAX_IO_SIZE constant, equal to DFLTPHYS * 2. Use MAXPHYS
instead. It is NULL change for GENERIC kernel, but allows 'fast' mode to
work on systems with increased MAXPHYS.
2009-11-17 21:42:11 +00:00
Alexander Motin
7c1a88d4f8 MFC r199333:
Do not require payload data to be aligned. It is not mentioned in datasheet
and works fine in practice.
2009-11-17 21:28:59 +00:00
Alexander Motin
c263e77659 MFC r199278:
Check SNCQ HBA capability bit when reporting NCQ support to CAM.
2009-11-17 21:27:21 +00:00
Alexander Motin
dbf0a1cd3e MFC r199263:
Do not enable tagged queueing if controller reports 0 tags support.
2009-11-17 21:26:05 +00:00
Alexander Motin
99695a07ce MFC r199178:
- Move tagged queueing control from ADA to ATA XPT. It allows to control
  device command queue length correctly. First step to support < 32 tags.
- Limit queue for non-tagged devices by 2 slots for ahci(4) and siis(4).
- Implement quirk matching for ATA devices.
- Move xpt_schedule_dev_sendq() from header to source file.
- Move delayed queue shrinking to the more expected place - element freeing.
- Remove some SCSIsms in ATA.
2009-11-17 21:23:05 +00:00
Alexander Motin
4799e6b756 MFC r199176:
Add set of chip IDs, known to support AHCI.
2009-11-17 21:21:27 +00:00
Alexander Motin
f629df5749 MFC r199132:
Organize device IDs and add some more of them.
2009-11-17 21:20:19 +00:00
Alexander Motin
0b0242c67c MFC r199079, r199101:
Add support for ATA Power Management.
2009-11-17 21:17:22 +00:00
Alexander Motin
6bb752977c MFC r198947:
Implement device stats accounting for ATA commands.
2009-11-17 21:14:58 +00:00
Alexander Motin
f6e8afbf7a MFC r198904, r198905:
PMP commands use short format. PMP write doesn't return result.
2009-11-17 21:14:02 +00:00
Alexander Motin
2c588f5344 MFC r198899:
- Remove CAM_PERIPH_POLLED flag. It is broken by design. Polling can't be
periph flag. May be SIM, may be CCB, but now it works fine just without it.
- Remove check unused for at least five years. If we will ever have non-BIO
devices in CAM, this check is smallest of what we will need.
- If several controllers complete requests same time, call swi_sched()
only once.
2009-11-17 21:09:47 +00:00
Alexander Motin
a60c326522 MFC r198897:
- Add support for sector size > 512 bytes and physical sector of several
logical sectors, introduced by ATA-7 specification.
- Remove some obsoleted code.
2009-11-17 21:08:12 +00:00
Alexander Motin
ecc2f2f455 MFC r198896:
Do not unarm callout on request completion and change slot selection
algorithm as done in ahci(4). This saves some CPU time on high request
rates.
2009-11-17 21:00:02 +00:00
Alexander Motin
d54c3c6363 MFC r198852:
- Rework timeout handling, to make it more graceful for devices sharing
controller port (with PMP). Wait for other commands completion/timeout
before initiating recovery.
- Handle timeouts and fatal errors with port hard-reset. The rest of
recovery will be done by XPT on receiving async event. More gracefull
per-device soft-reset recovery can be implemented later.
2009-11-17 20:59:00 +00:00
Alexander Motin
bf60b82344 MFC r198851:
- Handle timeouts and fatal errors with port hard-reset. The rest of
recovery will be done by XPT on receiving async event. More gracefull
per-device soft-reset recovery can be implemented later.
- Add workaround for ATI SB600/SB700 PMP probe related bug, to speedup boot.
2009-11-17 20:57:35 +00:00
Alexander Motin
33e000ff00 MFC r198849:
Improve reporting ATA Status error details.
2009-11-17 20:56:24 +00:00
Alexander Motin
5907c56d56 MFC r198832:
Provide the same sanity check on the sector size in dagetcapacity as when the
disk is first probed. dagetcapacity is called whenever the disk is opened from
geom via d_open(), a zero sector size will cause geom to panic later on.
2009-11-17 20:54:52 +00:00
Alexander Motin
0e3aa3c51e MFC r198748, r198782:
Fix reference counting bug, when device unreferenced before
invalidated. To do it, do not handle validity flag as another
reference, but explicitly modify reference count each time flag is
modified.
The async callback could free the device. If it is a broadcast async,
it doesn't hold device reference, so take our own reference.
2009-11-17 20:49:26 +00:00
Alexander Motin
0cfcf828a9 MFC r198709:
Sync connection speed reporting with kernel.
Report speed in identify command, same as done by inquiry.
2009-11-17 20:45:49 +00:00
Alexander Motin
8eea8c79fc MFC r198708:
- Reduce code duplication in ATA XPT and PMP driver.
- Move PIO size setting from ada driver to ATA XPT. It is XPT business
to negotiate transfer details. ada driver is now stateless.
- Report PIO size to SIM. It is required for correct PATA SIM operation.
- Tune PMP scan timings. It workarounds some problems with SiI.
- If reset hapens during PMP initialization - restart it.
- Introduce early-initialized periph drivers, which are used during initial
scan process. Use it for xpt, probe, aprobe and pmp. It gives pmp chance
to finish scan before mountroot and numerate devices in right order.
2009-11-17 20:43:04 +00:00
Alexander Motin
a3a475dfb6 MFC r198705:
Ensure target/lun passed from user-level supported on this bus.
Scanning unsupported IDs causes different issues from duplicate
devices to system crash.
2009-11-17 20:41:15 +00:00
Alexander Motin
e587ad07dc MFC r198426:
Reimplement device reset sequence in more controller-specific way.
2009-11-17 20:35:29 +00:00
Alexander Motin
844c81cb6d MFC r198394:
Make "Retrying Command" to be printed before actual retrying.
It should make debug/error log a bit more readable.
2009-11-17 20:20:56 +00:00
Alexander Motin
47a0c6b476 MFC r198390:
Revert interrupt reason check order back.
ATAPI errors may set IF bit together with TFE.
2009-11-17 20:19:20 +00:00