]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoFix IPI support
Kip Macy [Thu, 23 Oct 2008 07:20:43 +0000 (07:20 +0000)]
Fix IPI support

15 years agoAdd mips/conf/DEFAULTS and populate it with:
Marcel Moolenaar [Thu, 23 Oct 2008 02:16:38 +0000 (02:16 +0000)]
Add mips/conf/DEFAULTS and populate it with:
        machine arm
        device  mem
device  uart_ns8250
        options GEOM_BSD
        options GEOM_MBR

Remove the first three from all kernel configuration files
(sometimes commented-out) and change geom_bsd and geom_mbr
from standard to optional.

15 years agoAdd arm/conf/DEFAULTS and populate it with:
Marcel Moolenaar [Thu, 23 Oct 2008 01:51:55 +0000 (01:51 +0000)]
Add arm/conf/DEFAULTS and populate it with:
        machine arm
        device  mem
        options GEOM_BSD
        options GEOM_MBR

Remove the first two from all kernel configuration files and
change geom_bsd and geom_mbr from standard to optional.

15 years agoCorrect PHY description and OUI of VSC8211. Previously VSC8211 was
Pyun YongHyeon [Thu, 23 Oct 2008 01:27:15 +0000 (01:27 +0000)]
Correct PHY description and OUI of VSC8211. Previously VSC8211 was
not recognized by ciphy(4) due to the incorrect OUI.

Reported by: nork
Tested by: nork

15 years agoSlightly adjust code logic: we allocate a "size"ed length of memory, not
Xin LI [Thu, 23 Oct 2008 00:31:15 +0000 (00:31 +0000)]
Slightly adjust code logic: we allocate a "size"ed length of memory, not
size+1.  Use strlcpy() to avoid using - 1 as length for strncpy().

15 years agoUse strlcpy() before strlen() instead of strncpy().
Xin LI [Thu, 23 Oct 2008 00:28:21 +0000 (00:28 +0000)]
Use strlcpy() before strlen() instead of strncpy().

15 years agoSince we are going to strlen() on the string, it is supposed to be
Xin LI [Thu, 23 Oct 2008 00:27:35 +0000 (00:27 +0000)]
Since we are going to strlen() on the string, it is supposed to be
NUL-terminated, so use strlcpy() instead of strncpy() here.

15 years agoReplace malloc() + memset() with calloc. This corrects a misuse of
Xin LI [Thu, 23 Oct 2008 00:15:00 +0000 (00:15 +0000)]
Replace malloc() + memset() with calloc.  This corrects a misuse of
memset() as a side effect.

15 years agoFix a typo. q is already a pointer.
Konstantin Belousov [Wed, 22 Oct 2008 21:56:57 +0000 (21:56 +0000)]
Fix a typo. q is already a pointer.

Reported by: ache
Pointy hat to: kib

15 years agoRegen for freebsd32_getdirentries().
John Baldwin [Wed, 22 Oct 2008 21:56:44 +0000 (21:56 +0000)]
Regen for freebsd32_getdirentries().

15 years agoSplit the copyout of *base at the end of getdirentries() out leaving the
John Baldwin [Wed, 22 Oct 2008 21:55:48 +0000 (21:55 +0000)]
Split the copyout of *base at the end of getdirentries() out leaving the
rest in kern_getdirentries().  Use kern_getdirentries() to implement
freebsd32_getdirentries().  This fixes a bug where calls to getdirentries()
in 32-bit binaries would trash the 4 bytes after the 'long base' in
userland.

Submitted by: ups
MFC after: 1 week

15 years agoThe driver supports the Sony W810i phone (interface class driver).
Nick Hibma [Wed, 22 Oct 2008 21:46:59 +0000 (21:46 +0000)]
The driver supports the Sony W810i phone (interface class driver).

Note: This entry is added as this is there was no mention of any phones
in the list. This entry might have people try the driver against their
device.

The Sony Ericsson phone provides an OBEX stack on further CDC
interfaces. Umodem wrongfully assumes that it is the driver for this
interface. This is due to a bogus implementation in the umodem driver
when searching for the data interface. This should be read from the CDC
descriptors. Also, more of this should happen in the probe instead of
attach.

MFC after: 4 weeks

15 years agoReally fix i386 test this time.
Jung-uk Kim [Wed, 22 Oct 2008 21:03:30 +0000 (21:03 +0000)]
Really fix i386 test this time.
A whole stack of pointyhat to me, please.

15 years agoTurns out its not a good idea to assume the packages that might be
Ken Smith [Wed, 22 Oct 2008 20:32:19 +0000 (20:32 +0000)]
Turns out its not a good idea to assume the packages that might be
selected from the "dists" are all on the current volume.  Looks like
xorg won't fit on disc1 for 6.4-REL.  Iterate through media volumes
for packages that wind up being selected from the dists section in
addition to the ones that get selected from the packages menu.

MFC after: 2 days

15 years agoRemove a comment that belonged to a deleted if statement.
Nick Hibma [Wed, 22 Oct 2008 20:18:47 +0000 (20:18 +0000)]
Remove a comment that belonged to a deleted if statement.

15 years agoRemove doubtful structure definition with variable array members.
Konstantin Belousov [Wed, 22 Oct 2008 19:55:12 +0000 (19:55 +0000)]
Remove doubtful structure definition with variable array members.
I believe this is not a valid C99 construct.  Use directly calculated
offsets into the supplied buffer, using specified members length,
to fill appropriate structure.

Either use sysctl, or copy the value of the UNAME_x environment
variable, instead of unconditionally doing sysctl, and then
overriding a returned value with user-specified one.

Noted and tested by: rdivacky

15 years agoFix build with PPC_PROBE_CHIPSET enabled.
John Baldwin [Wed, 22 Oct 2008 19:39:16 +0000 (19:39 +0000)]
Fix build with PPC_PROBE_CHIPSET enabled.

15 years agoTrivially avoid a null pointer dereference when drivers
Marcel Moolenaar [Wed, 22 Oct 2008 18:20:45 +0000 (18:20 +0000)]
Trivially avoid a null pointer dereference when drivers
don't set the rman description. While drivers should set
it, a kernel panic is not the right behaviour when faced
without one.

15 years agoClarify the PREEMPTION description a little.
David E. O'Brien [Wed, 22 Oct 2008 17:50:45 +0000 (17:50 +0000)]
Clarify the PREEMPTION description a little.

15 years agoSimplify AMD64_CPU_MODEL() and AMD64_CPU_FAMILY() macros as the base family
Jung-uk Kim [Wed, 22 Oct 2008 17:36:52 +0000 (17:36 +0000)]
Simplify AMD64_CPU_MODEL() and AMD64_CPU_FAMILY() macros as the base family
should be at least 0xf00 for all supported platforms.

15 years agoAdd AMD Family 0Fh, Model 6Bh, Stepping 2 to the list of invariant TSCs
Jung-uk Kim [Wed, 22 Oct 2008 17:30:37 +0000 (17:30 +0000)]
Add AMD Family 0Fh, Model 6Bh, Stepping 2 to the list of invariant TSCs
and fix i386 test.

15 years agoUpdate mmap() comment: no more block devices, so no more block device
Robert Watson [Wed, 22 Oct 2008 16:50:12 +0000 (16:50 +0000)]
Update mmap() comment: no more block devices, so no more block device
cache coherency questions.

MFC after: 3 days

15 years agoFix build breakage.
John Baldwin [Wed, 22 Oct 2008 15:00:22 +0000 (15:00 +0000)]
Fix build breakage.

Pointy hat: jhb

15 years agoFix compiler error with missing/unneded ')'
Andrey A. Chernov [Wed, 22 Oct 2008 14:45:30 +0000 (14:45 +0000)]
Fix compiler error with missing/unneded ')'

15 years agoRemove the debug flag.
Nick Hibma [Wed, 22 Oct 2008 10:12:21 +0000 (10:12 +0000)]
Remove the debug flag.

This makes the u3gstub lines and the Windows-driver CD-ROM devices
disappear.

15 years agoUse full month name.
Alexander Motin [Wed, 22 Oct 2008 09:11:35 +0000 (09:11 +0000)]
Use full month name.

15 years agoAdd sdhci driver man page. Link it up to mmc subsystem.
Alexander Motin [Wed, 22 Oct 2008 09:04:05 +0000 (09:04 +0000)]
Add sdhci driver man page. Link it up to mmc subsystem.

15 years agoUpdate man page.
Alexander Motin [Wed, 22 Oct 2008 08:43:35 +0000 (08:43 +0000)]
Update man page.

15 years agoAllow dumps to partitions with a tag of 0. The legacy
Marcel Moolenaar [Wed, 22 Oct 2008 02:08:54 +0000 (02:08 +0000)]
Allow dumps to partitions with a tag of 0. The legacy
sunlabel implementation in FreeBSD does not use VTOC
information and as such as no partition types.

15 years agoSet kern.timecounter.invariant_tsc to 1 for AMD CPU family 10h and higher
Jung-uk Kim [Wed, 22 Oct 2008 00:01:53 +0000 (00:01 +0000)]
Set kern.timecounter.invariant_tsc to 1 for AMD CPU family 10h and higher
even if BIOS does not advertise it.

15 years agoMove an echo that accidentally got put under the .if defined(MAKE_DVD).
Ken Smith [Tue, 21 Oct 2008 23:36:28 +0000 (23:36 +0000)]
Move an echo that accidentally got put under the .if defined(MAKE_DVD).

Pointy hat: kensmith

15 years agoOops, add missing @.
Ken Smith [Tue, 21 Oct 2008 22:50:01 +0000 (22:50 +0000)]
Oops, add missing @.

15 years agoAdd a device ID for the Ovation MC950D (Novatel Wireless HSUPA modem).
Nick Hibma [Tue, 21 Oct 2008 22:14:22 +0000 (22:14 +0000)]
Add a device ID for the Ovation MC950D (Novatel Wireless HSUPA modem).

15 years agoAdd HDA multimedia subclass.
Alexander Motin [Tue, 21 Oct 2008 21:55:38 +0000 (21:55 +0000)]
Add HDA multimedia subclass.

15 years agoAdd HDA multimedia subclass.
Alexander Motin [Tue, 21 Oct 2008 21:53:55 +0000 (21:53 +0000)]
Add HDA multimedia subclass.

15 years agoAdd "SD host controller" subclass name.
Alexander Motin [Tue, 21 Oct 2008 20:57:21 +0000 (20:57 +0000)]
Add "SD host controller" subclass name.

15 years agoAdd "SD host controller" subclass name.
Alexander Motin [Tue, 21 Oct 2008 20:55:41 +0000 (20:55 +0000)]
Add "SD host controller" subclass name.

15 years agoImport sdhci (PCI SD Host Controller) driver.
Alexander Motin [Tue, 21 Oct 2008 20:33:40 +0000 (20:33 +0000)]
Import sdhci (PCI SD Host Controller) driver.
Driver supports PCI devices with class 8 and subclass 5 according to
SD Host Controller Specification.

Update NOTES, enable module and static build.
Enable related mmc and mmcsd modules build.

Discussed on:   mobile@, current@

15 years agoDo not overflow crashdumpmap.
Konstantin Belousov [Tue, 21 Oct 2008 18:52:38 +0000 (18:52 +0000)]
Do not overflow crashdumpmap.

Reported and tested by: pho
Reviewed by: jhb
MFC after: 1 week

15 years agoRestore the default maximum segment size for the bus dma tag to 64k as it
John Baldwin [Tue, 21 Oct 2008 18:51:55 +0000 (18:51 +0000)]
Restore the default maximum segment size for the bus dma tag to 64k as it
is in 6.x and 7.x.  The typo caused 64k transactions to be unnecessarily
split up into two PRD entries.

15 years agoSeveral cleanups to remove the need for explicit unit numbers and a few
John Baldwin [Tue, 21 Oct 2008 18:30:10 +0000 (18:30 +0000)]
Several cleanups to remove the need for explicit unit numbers and a few
other fixes:
- Add pointers back to device_t objects in softc structures instead
  of storing the unit and using devclass_get_device().
- Add 'lpbb', 'pcf', 'pps', and 'vpo' child devices to every 'ppbus' device
  instead of just the first one.
- Store softc pointers in si_drv1 of character devices instead of
  pulling the unit number from the minor number and using
  devclass_get_softc() and devclass_get_device().
- Store the LP_BYPASS flag in si_drv2 instead of encoding it in the minor
  number.
- Destroy character devices for lpt(4) when detaching the device.
- Use bus_print_child_footer() instead of duplicating it in
  ppbus_print_child() and fix ppbus_print_child()'s return value.
- Remove unused AVM ivar from ppbus.
- Don't store the 'mode' ivar in the ppbus ivars since we always fetch it
  from the parent anyway.
- Try to detach all the child devices before deleting them in
  ppbus_detach().
- Use pause() instead of a tsleep() on a dummy address when polling the
  ppbus.
- Use if_printf() and device_printf() instead of explicit names with unit
  numbers.

Silence on: current@

15 years agoRemove __CC_INT_IS_32BIT define which was used to fix mpt driver
Roman Divacky [Tue, 21 Oct 2008 16:46:50 +0000 (16:46 +0000)]
Remove __CC_INT_IS_32BIT define which was used to fix mpt driver
but is not used anymore. This define is not referenced by anything
in the FreeBSD srcs nor google shows any usage. Kernel and world
builds fine without it.

Approved by: kib (mentor)

15 years agoFix spelling mistake in the last rev.
Andrew Thompson [Tue, 21 Oct 2008 14:44:25 +0000 (14:44 +0000)]
Fix spelling mistake in the last rev.

15 years agoIf we have getc_inject hooked then the outq buffer is inaccessible to the
Andrew Thompson [Tue, 21 Oct 2008 14:18:45 +0000 (14:18 +0000)]
If we have getc_inject hooked then the outq buffer is inaccessible to the
driver so skip the drain rather than waiting indefinitely.

Reviewed by: ed

15 years agoMove va_end() up
Dag-Erling Smørgrav [Tue, 21 Oct 2008 12:10:30 +0000 (12:10 +0000)]
Move va_end() up

15 years agoAt some point, construct_utmp() was changed to use realhostname() to fill
Dag-Erling Smørgrav [Tue, 21 Oct 2008 11:58:26 +0000 (11:58 +0000)]
At some point, construct_utmp() was changed to use realhostname() to fill
in the struct utmp due to concerns about the length of the hostname buffer.
However, this breaks the UseDNS option.  There is a simpler and better
solution: initialize utmp_len to the correct value (UT_HOSTSIZE instead of
MAXHOSTNAMELEN) and let get_remote_name_or_ip() worry about the size of the
buffer.

PR: bin/97499
Submitted by: Bruce Cran <bruce@cran.org.uk>
MFC after: 1 week

15 years agoChange vn_start_write() to clear *mpp on all failures when non-NULL vp
Konstantin Belousov [Tue, 21 Oct 2008 09:55:49 +0000 (09:55 +0000)]
Change vn_start_write() to clear *mpp on all failures when non-NULL vp
is supplied, since vm_pageout_scan() expects it to be cleared on error.

Submitted by: tegge
PR: 123768
MFC after: 1 week

15 years agoHook in ipi handlers
Kip Macy [Tue, 21 Oct 2008 08:03:12 +0000 (08:03 +0000)]
Hook in ipi handlers

15 years agoremove gratuitous XEN define
Kip Macy [Tue, 21 Oct 2008 08:02:18 +0000 (08:02 +0000)]
remove gratuitous XEN define

15 years agodon't globally define ipi_bitmap_handler on xen
Kip Macy [Tue, 21 Oct 2008 08:01:19 +0000 (08:01 +0000)]
don't globally define ipi_bitmap_handler on xen

15 years agoImplement infrastructure for gluing i386 ipi functions in to xen's infrastructure
Kip Macy [Tue, 21 Oct 2008 06:39:40 +0000 (06:39 +0000)]
Implement infrastructure for gluing i386 ipi functions in to xen's infrastructure

15 years agoAdd routine for initializing AP clock
Kip Macy [Tue, 21 Oct 2008 06:38:40 +0000 (06:38 +0000)]
Add routine for initializing AP clock

15 years agoHeader cleanups and addition of IPI declarations for xen
Kip Macy [Tue, 21 Oct 2008 06:38:05 +0000 (06:38 +0000)]
Header cleanups and addition of IPI declarations for xen

15 years agoIf we don't know the file size, leave the file size unset.
Tim Kientzle [Tue, 21 Oct 2008 05:08:35 +0000 (05:08 +0000)]
If we don't know the file size, leave the file size unset.
If it's not a regular file, don't return any data, even if the size is unknown.

Update the Zip test with a hand-tweaked Zip archive that has a
directory (with length-at-end set), a regular file without
length-at-end set, and a regular file with length-at-end set and a bad
CRC.  Update the test code to verify that the file size is unset
for the regular file with length-at-end.

MFC after: 7 days

15 years agoFix 'kern.timeconter.invariant_tsc' tunable and back out a redundant hack.
Jung-uk Kim [Tue, 21 Oct 2008 04:31:07 +0000 (04:31 +0000)]
Fix 'kern.timeconter.invariant_tsc' tunable and back out a redundant hack.
Somehow incomplete version was committed. :-(

15 years agoRemove unused age_txdq
Kevin Lo [Tue, 21 Oct 2008 03:18:02 +0000 (03:18 +0000)]
Remove unused age_txdq

15 years agoNo need to sync descriptors twice in age_rxintr()
Kevin Lo [Tue, 21 Oct 2008 03:16:50 +0000 (03:16 +0000)]
No need to sync descriptors twice in age_rxintr()

15 years agoDo not use PowerNow! if FID or VID is missing.
Jung-uk Kim [Tue, 21 Oct 2008 00:52:20 +0000 (00:52 +0000)]
Do not use PowerNow! if FID or VID is missing.

15 years agoUse power management information for AMD CPUs from identcpu.c.
Jung-uk Kim [Tue, 21 Oct 2008 00:44:05 +0000 (00:44 +0000)]
Use power management information for AMD CPUs from identcpu.c.

15 years agoTurn off CPU frequency change notifiers when the TSC is P-state invariant
Jung-uk Kim [Tue, 21 Oct 2008 00:38:00 +0000 (00:38 +0000)]
Turn off CPU frequency change notifiers when the TSC is P-state invariant
or it is forced by setting 'kern.timecounter.invariant_tsc' tunable
to non-zero.

15 years agoDetect Advanced Power Management Information for AMD CPUs.
Jung-uk Kim [Tue, 21 Oct 2008 00:17:55 +0000 (00:17 +0000)]
Detect Advanced Power Management Information for AMD CPUs.

15 years agoReflect changes into vinvalbuf(9) prototype.
Attilio Rao [Mon, 20 Oct 2008 20:00:34 +0000 (20:00 +0000)]
Reflect changes into vinvalbuf(9) prototype.

15 years agoBump __FreeBSD_version in order to reflect prototipes changes for these
Attilio Rao [Mon, 20 Oct 2008 19:56:59 +0000 (19:56 +0000)]
Bump __FreeBSD_version in order to reflect prototipes changes for these
following functions:
- bufobj_invalbuf()
- bufsync()
- vinvalbuf()
- g_vfs_close

and virtual function BO_SYNC().

15 years agoIn the actual code for witness_warn:
Attilio Rao [Mon, 20 Oct 2008 19:22:16 +0000 (19:22 +0000)]
In the actual code for witness_warn:
- If there aren't spinlocks held, but there are problems with old
  sleeplocks, they are not reported.
- If the spinlock found is not the only one, problems are not reported.

Fix these 2 problems.

Reported by: tegge

15 years agoUpdate a comment which to my reading had been misplaced in rev. 1.12
Bjoern A. Zeeb [Mon, 20 Oct 2008 18:56:00 +0000 (18:56 +0000)]
Update a comment which to my reading had been misplaced in rev. 1.12
already (but probably had been way above as the code was there twice)
and describe what was last changed in rev. 1.199 there (which now is
in sync with in6_src.c r184096).

Pointed at by: mlaier
MFC after: 2 mmonths

15 years agoBring over the change switching from using sequential to random
Bjoern A. Zeeb [Mon, 20 Oct 2008 18:43:59 +0000 (18:43 +0000)]
Bring over the change switching from using sequential to random
ephemeral port allocation as implemented in netinet/in_pcb.c rev. 1.143
(initially from OpenBSD) and follow-up commits during the last four and
a half years including rev. 1.157, 1.162 and 1.199.
This now is relying on the same infrastructure as has been implemented
in in_pcb.c since rev. 1.199.

Reviewed by: silby, rpaulo, mlaier
MFC after: 2 months

15 years agoMake HDA PCM device boot and sndstat messages more alike to PCI device ones.
Alexander Motin [Mon, 20 Oct 2008 18:37:10 +0000 (18:37 +0000)]
Make HDA PCM device boot and sndstat messages more alike to PCI device ones.
Move codec # out of the device name as it is a device address and not part of
device type name.

15 years agoDiff reduction against Varnish, including one important fix: use a shared
Dag-Erling Smørgrav [Mon, 20 Oct 2008 18:11:30 +0000 (18:11 +0000)]
Diff reduction against Varnish, including one important fix: use a shared
lock if the file is opened with O_RDONLY.

15 years agoReimplement flopen(3) using fcntl(2) locks instead of flock(2) locks.
Dag-Erling Smørgrav [Mon, 20 Oct 2008 18:02:16 +0000 (18:02 +0000)]
Reimplement flopen(3) using fcntl(2) locks instead of flock(2) locks.

15 years agopidfile(3) uses flopen(3) - don't make any assumptions about how the
Dag-Erling Smørgrav [Mon, 20 Oct 2008 18:00:11 +0000 (18:00 +0000)]
pidfile(3) uses flopen(3) - don't make any assumptions about how the
latter is implemented.

15 years agoThere is no point in releasing a lock on a file which we've unlinked and
Dag-Erling Smørgrav [Mon, 20 Oct 2008 17:41:08 +0000 (17:41 +0000)]
There is no point in releasing a lock on a file which we've unlinked and
are about to close, so don't.  As a bonus, pidfile_remove(3) will now
work with an fcntl(2)-based flopen(3).

15 years ago#ifdef out the lock-against-self test. I'm not sure it makes sense, and
Dag-Erling Smørgrav [Mon, 20 Oct 2008 17:26:30 +0000 (17:26 +0000)]
#ifdef out the lock-against-self test.  I'm not sure it makes sense, and
it relies on non-portable flock(2) semantics.  Not only is flock(2) not
portable, but on some OSes that do have it, it is implemented in terms
of fcntl(2) locks, which are per-process rather than per-descriptor.

15 years agoTune boot messages a bit.
Alexander Motin [Mon, 20 Oct 2008 17:24:25 +0000 (17:24 +0000)]
Tune boot messages a bit.
Use <> brackets only at device name line.

15 years agoSince in_lt() and in_lts() are not static, assume that they are intended to
Dag-Erling Smørgrav [Mon, 20 Oct 2008 17:17:58 +0000 (17:17 +0000)]
Since in_lt() and in_lts() are not static, assume that they are intended to
be part of the public API.  Accordingly, add prototypes and document them.

15 years agoAdditional style and whitespace fixes.
Dag-Erling Smørgrav [Mon, 20 Oct 2008 17:09:50 +0000 (17:09 +0000)]
Additional style and whitespace fixes.

15 years agoStyle and whitespace
Dag-Erling Smørgrav [Mon, 20 Oct 2008 17:07:50 +0000 (17:07 +0000)]
Style and whitespace

15 years agoUnbreak
Dag-Erling Smørgrav [Mon, 20 Oct 2008 17:04:57 +0000 (17:04 +0000)]
Unbreak

15 years agoSince setclasscpumask() is not static, assume that it is intended to be
Dag-Erling Smørgrav [Mon, 20 Oct 2008 17:03:05 +0000 (17:03 +0000)]
Since setclasscpumask() is not static, assume that it is intended to be
part of the public API.  Accordingly, add a prototype and document it.

15 years agoStyle and whitespace.
Dag-Erling Smørgrav [Mon, 20 Oct 2008 16:54:53 +0000 (16:54 +0000)]
Style and whitespace.

15 years agoParenthesize return values.
Dag-Erling Smørgrav [Mon, 20 Oct 2008 16:51:43 +0000 (16:51 +0000)]
Parenthesize return values.

15 years agoinclude and whitespace cleanup.
Dag-Erling Smørgrav [Mon, 20 Oct 2008 16:48:18 +0000 (16:48 +0000)]
include and whitespace cleanup.

15 years agoAssert that v_holdcnt is non-zero before entering lockmgr in vn_lock
Konstantin Belousov [Mon, 20 Oct 2008 10:11:33 +0000 (10:11 +0000)]
Assert that v_holdcnt is non-zero before entering lockmgr in vn_lock
and ffs_lock. This cannot catch situations where holdcnt is incremented
not by curthread, but I think it is useful.

Reviewed by: tegge, attilio
Tested by: pho
MFC after: 2 weeks

15 years agoIn vfs_busy(), lockmgr() cannot legitimately sleep, because code checked
Konstantin Belousov [Mon, 20 Oct 2008 10:07:28 +0000 (10:07 +0000)]
In vfs_busy(), lockmgr() cannot legitimately sleep, because code checked
MNTK_UNMOUNT before, and mnt_mtx is used as interlock. vfs_busy() always
tries to obtain a shared lock on mnt_lock, the other user is unmount who
tries to drain it, setting MNTK_UNMOUNT before.

Reviewed by: tegge, attilio
Tested by: pho
MFC after: 2 weeks

15 years agoActually fix pty detection for autologout setting.
Ruslan Ermilov [Mon, 20 Oct 2008 08:44:14 +0000 (08:44 +0000)]
Actually fix pty detection for autologout setting.
(The fix has been submitted upstream.)

15 years agoImport interrupt management defines from latest xenlinux
Kip Macy [Mon, 20 Oct 2008 05:42:38 +0000 (05:42 +0000)]
Import interrupt management defines from latest xenlinux

15 years agoAdd support for multiple attributes. This is required for the
Marcel Moolenaar [Mon, 20 Oct 2008 05:12:50 +0000 (05:12 +0000)]
Add support for multiple attributes. This is required for the
PC98 scheme.

15 years agoThe active and bootable flags are not part of the type.
Marcel Moolenaar [Mon, 20 Oct 2008 04:50:47 +0000 (04:50 +0000)]
The active and bootable flags are not part of the type.
Export the active and bootable flags as attributes in
the configuration XML and allow them to be manipulated
with the set/unset commands.

Since libdisk treats the flags as part of the partition
type, preserve behavior by keeping them included in the
configuration text.

15 years agoIn realtimer_delete(), clear timer's value and interval to tell
David Xu [Mon, 20 Oct 2008 02:37:53 +0000 (02:37 +0000)]
In realtimer_delete(), clear timer's value and interval to tell
realtimer_expire() to not rearm the timer, otherwise there is a chance
that a callout will be left there and be tiggered in future unexpectly.

Bug reported by: tegge@

15 years agofix static key wep; r183248 caused drivers to be called for keys to be
Sam Leffler [Sun, 19 Oct 2008 21:34:49 +0000 (21:34 +0000)]
fix static key wep; r183248 caused drivers to be called for keys to be
assigned to slots in the global key table but ath_key_alloc was not
updated to handle that

15 years agoAtomically increment the number of awoken APs as all APs will
Marcel Moolenaar [Sun, 19 Oct 2008 20:14:48 +0000 (20:14 +0000)]
Atomically increment the number of awoken APs as all APs will
be unleashed here.

Pointed out by: christian.kandeler@hob.de

15 years agoRemove trailing comma in SEE ALSO section.
Simon L. B. Nielsen [Sun, 19 Oct 2008 17:19:42 +0000 (17:19 +0000)]
Remove trailing comma in SEE ALSO section.

15 years agoKtr(9) stores format string and arguments in the event circular buffer,
Konstantin Belousov [Sun, 19 Oct 2008 11:13:49 +0000 (11:13 +0000)]
Ktr(9) stores format string and arguments in the event circular buffer,
not the string formatted at the time of CTRX() call. Stack_ktr(9) uses
an on-stack buffer for the symbol name, that is supplied as an argument
to ktr. As result, stack_ktr() traces show garbage or cause page faults.

Fix stack_ktr() by using pointer to module symbol table that is supposed
to have a longer lifetime.

Tested by: pho
MFC after: 1 week

15 years ago - License change to a less restrictive one;
Xin LI [Sun, 19 Oct 2008 10:11:35 +0000 (10:11 +0000)]
 - License change to a less restrictive one;
 - ANSIfy;
 - Convert do {} while loop -> while {} for clarity;
 - Sync RCS ID with OpenBSD;

Obtained from: OpenBSD

15 years agoCorrectly fill siginfo for the signals delivered by linux tkill/tgkill.
Konstantin Belousov [Sun, 19 Oct 2008 10:02:26 +0000 (10:02 +0000)]
Correctly fill siginfo for the signals delivered by linux tkill/tgkill.
It is required for async cancellation to work.

Fix PROC_LOCK leak in linux_tgkill when signal delivery attempt is made
to not linux process.

Do not call em_find(p, ...) with p unlocked.

Move common code for linux_tkill() and linux_tgkill() into
linux_do_tkill().

Change linux siginfo_t definition to match actual linux one. Extend
uid fields to 4 bytes from 2. The extension does not change structure
layout and is binary compatible with previous definition, because i386
is little endian, and each uid field has 2 byte padding after it.

Reported by: Nicolas Joly <njoly pasteur fr>
Submitted by: dchangin
MFC after: 1 month

15 years agoTiny wording nits.
Giorgos Keramidas [Sun, 19 Oct 2008 09:45:29 +0000 (09:45 +0000)]
Tiny wording nits.

MFC after: 1 week

15 years agoFurther simplify the code.
Xin LI [Sun, 19 Oct 2008 09:10:44 +0000 (09:10 +0000)]
Further simplify the code.

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

15 years agoadd -n option to suppress clearing the build tree and add -DNO_CLEAN
Sam Leffler [Sun, 19 Oct 2008 06:58:31 +0000 (06:58 +0000)]
add -n option to suppress clearing the build tree and add -DNO_CLEAN
to buildworld and/or buildkernel

15 years ago- Forward port flush of page table updates on context switch or userret
Kip Macy [Sun, 19 Oct 2008 01:35:27 +0000 (01:35 +0000)]
- Forward port flush of page table updates on context switch or userret
- Forward port vfork XEN hack

15 years agoGC gratuitous XEN defines
Kip Macy [Sun, 19 Oct 2008 01:33:58 +0000 (01:33 +0000)]
GC gratuitous XEN defines

15 years ago- move gdt, ldt allocation to before KPT allocation
Kip Macy [Sun, 19 Oct 2008 01:27:40 +0000 (01:27 +0000)]
- move gdt, ldt allocation to before KPT allocation
- fix bugs where we would:
    - try to map the hypervisors address space
    - accidentally kick out an existing kernel mapping for some domain creation memory allocation sizes
    - accidentally skip a 2MB kernel mapping for some domain creation memory allocation sizes
- don't rely on trapping in to xen to read rcr2, reference through vcpu
- whitespace cleanups