Commit Graph

130571 Commits

Author SHA1 Message Date
John Baldwin
4c5bec1161 Change the x86 interrupt code to use FreeBSD CPU IDs (i.e. PCPU_GET(cpuid))
rather than local APIC IDs to keep track of CPUs which can handle
interrupts.
2007-03-06 17:16:47 +00:00
Max Khon
27d0a1a493 Support character device as input file.
PR:             103500
2007-03-06 17:04:15 +00:00
Ruslan Ermilov
d73d2e1de2 Invoke tar(1) with the -p option when installing a package
from an URL (i.e., do it the same way as when installing
from a file).  This fixes the lossage of the setuid bits.
It wasn't a problem before because GNU tar(1) implied the
-p option for root, but BSD tar(1) doesn't do that.

Discussed with:	tobez and some advanced users :)
2007-03-06 14:54:45 +00:00
Christian Brueffer
55b8273c83 The firmware images must be loaded as modules at the moment. 2007-03-06 13:17:05 +00:00
Yaroslav Tykhiy
15240ba819 As suggested more than once in the lists, drop -M from flags to mfs
for /tmp and /var.  This makes the memory discs swap-backed instead
of malloc-backed.  A swap-backed memory disc should not be worse
than a malloc-backed one in any scenario because it will start
touching swap only when needed.  OTOH, a malloc-backed disc can
starve limited kernel resources and evenually crash the system.

Reflect the change in the rc.conf(5) manpage.  Also stop telling
lies there about softupdates: it does not waste disc space, it
just can delay its freeing.

Suggested by:	many
PR:		kern/87255
MFC after:	1 week
2007-03-06 13:13:53 +00:00
Paolo Pisati
988d1fde21 Wrap at 80 bus_setup_intr() in upa_setup_intr(). 2007-03-06 12:19:37 +00:00
Olivier Houchard
aed12d5ff8 Backout rev 1.17, msleep() can't be used with a spinlock.
Pointy hat to:	cognet
2007-03-06 12:08:38 +00:00
Paolo Pisati
ec383c971f Remove a useless cast from void * to struct ppb_device *. 2007-03-06 11:44:11 +00:00
Paolo Pisati
72565ac3e8 o Wrap ppc_setup_intr() at 80.
o Fix a bit the indentation.
2007-03-06 11:36:33 +00:00
Paolo Pisati
15eab674d8 Wrap ixppcib_setup_intr() at 80. 2007-03-06 10:58:22 +00:00
Paolo Pisati
9ca5d390d4 Wrap a BUS_SETUP_INTR() line at 80. 2007-03-06 10:56:54 +00:00
Paolo Pisati
856e1ae84c o substitute INTR_FAST with FILTER in a panic message.
o wrap a BUS_SETUP_INTR() line at 80.
2007-03-06 10:55:57 +00:00
Kevin Lo
d069140339 Use sizeof() for calculating the buffer size instead of hard-coded values. 2007-03-06 09:32:41 +00:00
Kirk McKusick
a9093e846d Move macros describing extended attributes in UFS from
<sys/extattr.h> to <ufs/ufs/extattr.h>. Move description
of extended attributes in UFS from man9/extattr.9 to
man5/fs.5.

Note that restore will not compile until <sys/extattr.h>
and <ufs/ufs/extattr.h> have been updated.

Suggested by:	Robert Watson
2007-03-06 08:13:21 +00:00
Robert Watson
b77ad8fc3b In translate_path_major_minor(), do not calculate otherwise unused 'fp'
variable, avoiding an extra locking of the file descriptor array.
2007-03-06 07:39:12 +00:00
Ariff Abdullah
f0c4d27278 Enable tone / 3D controls for YAMAHA YMF743, 753 and 752 (partially).
PR:		kern/109599
Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
2007-03-06 02:36:54 +00:00
Kevin Lo
4cd84059be Reverse this change. malloc() with M_WAITOK never fails.
Noted by: cognet, brian and thompsa
2007-03-06 01:15:28 +00:00
Scott Long
dc3a205bc4 Better fix for the errors under high load. Returning CAM_SCSI_BUSY is almost
never correct as CAM has no real understanding of it, and will just immediately
retry the command.  This leads to undesirable cycling of the camisr as well as
a high possibility for the command to exhaust its retries before the driver
can get around to servicing it.

The better fix, as demonstrated here, is to freeze the simq and mark the
command as needing to be tried.  Then when driver can service the command,
the simq gets unfrozen.  This is correct, and documented here to help reduce
the mystery.  However, it also points out a shortcoming in CAM error handling
that makes writing drivers harder.

Submitted by: Erich Chen
2007-03-06 01:12:15 +00:00
John Baldwin
6cd68eaa7e Trim trailing whitespace. 2007-03-05 22:27:55 +00:00
Sam Leffler
1fba0fdc15 Change mtx's to use the formulated name as type so witness does not
complain on nested tx q lock acquisitions when processing the cab q.

MFC after:	2 weeks
2007-03-05 21:56:33 +00:00
Sam Leffler
cd196bb2d5 Kick tx after processing rx'd frames; this fixes latency issues
for processing frames from the power save queue when operating
in ap mode.  This is especially noticeable for realtime data going
to devices like voip phones.

Submitted by:	"J.R. Oldroyd" <jr@opal.com>
MFC after:	2 weeks
2007-03-05 21:53:49 +00:00
Alan Cox
8da3fc95a7 Acquiring smp_ipi_mtx on every call to pmap_invalidate_*() is wasteful.
For example, during a buildworld more than half of the calls do not
generate an IPI because the only TLB entry invalidated is on the calling
processor.  This revision pushes down the acquisition and release of
smp_ipi_mtx into smp_tlb_shootdown() and smp_targeted_tlb_shootdown() and
instead uses sched_pin() and sched_unpin() in pmap_invalidate_*() so that
thread migration doesn't lead to a missed TLB invalidation.

Reviewed by: jhb
MFC after: 3 weeks
2007-03-05 21:40:10 +00:00
Nate Lawson
4d44d81742 Check the _TMP value for sanity also. On some systems (HP NX laptops), the
EC occasionally times out and provides bogus values (3000C).  This change
prevents those systems from prematurely shutting down while we work on the
underlying problem.  Also, bump the sanity value to 0...200C from 0...150C.
2007-03-05 21:39:53 +00:00
Thomas Quinot
1471588a2f Fix typo in comment. 2007-03-05 21:21:03 +00:00
John Baldwin
aa7a005ee0 Use vm_paddr_t rather than uintptr_t when passing the physical address of
APICs to lapic_init() and ioapic_create().
2007-03-05 20:35:17 +00:00
John Baldwin
5e41bd2cd2 Only reject file descriptors higher than FD_SETSIZE if we are not using
poll(2) or kqueue(2).  Previously we rejected fd's higher than FD_SETSIZE
for kevent(2), and larger than sysconf(_SC_OPEN_MAX) for poll(2).  However,
the check for poll(2) wasn't really needed.  open(2) and socket(2) won't
return an fd you can't pass to either poll(2) or kevent(2).  This fixes
a but where gethostbyname() would fail if you had more than 1023 files
open in a process.

MFC after:	1 week
Reviewed by:	ume
Found by:	ps
2007-03-05 19:39:51 +00:00
Sam Leffler
89f0549d37 correct inital bounds check on returning scan results; this does not
paper over catching an error as the case was already handled, albeit
in a somewhat surprising way (the caller received zero'd data)

Submitted by:	sephe
MFC after:	2 weeks
2007-03-05 19:12:25 +00:00
Brian Somers
d5d9eb5095 Oops, fix a typo in the last commit :-/ 2007-03-05 19:00:49 +00:00
Alan Cox
d8810d894d Use PCPU_LAZY_INC() to update page fault statistics. 2007-03-05 18:55:14 +00:00
Sam Leffler
f48ad55ef5 correct conversions between TU and ms/ticks; these are not used
by any code in the tree[1] and are close enough for common values
that this change is a noop

[1] ath uses one macro to calculate a value that is not used
Submitted by:	sephe
MFC after:	1 week
2007-03-05 18:52:35 +00:00
Brian Somers
ee12856f1d In the NOTYET code path when a process forks, the remaining
child thread goes back to system scope rather than process
scope.  This allows an ensuing exec() to actually work.

This change was made a year ago here, but I "forgot" to
commit it :(

Approved by:	deischen
MFC after:	3 weeks
2007-03-05 17:47:27 +00:00
John Baldwin
db181dc741 Add a simple device driver to "eat" any I/O APICs that show up as PCI
devices.

MFC after:	1 week
2007-03-05 16:22:49 +00:00
John Baldwin
d8a4c26cde - Use constants for VPD capability register offsets.
- Add missing ()'s around return values.
2007-03-05 16:21:59 +00:00
John Baldwin
976c400776 - Flesh out list of UART simple comms programming interfaces.
- Add list of PIC base peripheral programming interfaces.
- Add VPD capability register offsets.

MFC after:	3 days
2007-03-05 16:18:31 +00:00
Ruslan Ermilov
ff91121ada Apply my patch properly. 2007-03-05 15:44:00 +00:00
Thomas Quinot
3bbd554a99 Add "fg" option as antonym to "bg"; add "hard" option as antonym to "soft".
This is for better compatibility with other environments (Linux, Solaris,
HP-UX, AIX and Tru64 support these options).

PR:		bin/109924
MFC after:	1 week
2007-03-05 14:47:54 +00:00
Bruce M Simpson
693099c53f Fix markup.
Submitted by:	ru
MFC after:	2 days
2007-03-05 13:52:01 +00:00
Robert Watson
b5368498b5 Replay minor system call comment cleanup applied to kern_acl.c in a race
with repo-copy of kern_acl.c to vfs_acl.c.
2007-03-05 13:26:07 +00:00
Robert Watson
e6f5470468 Recognize repo-copy of kern_acl.c to vfs_acl.c, remove kern_acl.c,
remove kern_acl.c from the build, connect vfs_acl.c to the build.

Thanks to:	joe
2007-03-05 13:24:01 +00:00
Robert Watson
873fbcd776 Further system call comment cleanup:
- Remove also "MP SAFE" after prior "MPSAFE" pass. (suggested by bde)
- Remove extra blank lines in some cases.
- Add extra blank lines in some cases.
- Remove no-op comments consisting solely of the function name, the word
  "syscall", or the system call name.
- Add punctuation.
- Re-wrap some comments.
2007-03-05 13:10:58 +00:00
Bruce M Simpson
491deb49c4 .Xr nit.
Submitted by:	brueffer
2007-03-05 12:54:03 +00:00
Pawel Jakub Dawidek
97a669a3b2 Warn when user use sectorsize bigger than the page size, which will lead
to problems when the geli device is used with file system or as a swap.

Hopefully will prevent problems like kern/98742 in the future.

MFC after:	1 week
2007-03-05 12:41:44 +00:00
Bruce M Simpson
4802040ebf Update shutdown() manual page to reflect actual behaviour of code.
Add IMPLEMENTATION NOTES section explaining in detail the effect this
system call has in common use cases involving PF_INET and PF_INET6 sockets.

PR:		kern/84761
MFC after:	2 days
2007-03-05 12:39:53 +00:00
Pawel Jakub Dawidek
5b110804b1 Fix incorrect comment. Geli will protect against data modification, of
course! It won't protect against reply attacks - try harder to explain
them correctly.

MFC after:	1 week
2007-03-05 12:39:49 +00:00
Christian Brueffer
4c55d3dc27 The firmware files are included in the base system now, reflect this here..
While here, remove Xrefs to all other wlan drivers except the Intel ones,
these often get confused.  Also remove pointers to the old ipw and iwi webpages,
they don't include any useful information that's not in the manpages yet.

Reviewed by:	flz, ru
2007-03-05 11:52:17 +00:00
Xin LI
2f1b6e8bb5 Test cases for back references.
Obtained from:	OpenBSD
2007-03-05 09:44:41 +00:00
Xin LI
082063a051 Only stop evaluation of a back reference if the match length is
zero and the recursion level is too deep.

Obtained from:	OpenBSD
2007-03-05 09:43:55 +00:00
Bruce Evans
d78180f8f5 Partial fix for a bug in rev.1.231. If suspend/resume clobbers the
RTC state, then it may clobber the RTC index register, so the index
register must be restored before using it to restore control registers
in rtc_restore().

The following problems remain:
- rtc_restore() is only called if pmtimer is configured.  Buggy
  suspend/resumes are more likely to clobber the index register than
  a control register, so pmtimer is more needed than it used to be.
- pmtimer doesn't exist for amd64.
- Restoring of the RTC state may race with rtcintr().  If an RTC
  interrupt is handled before the state is restored, then rtcin(RTC_INTR)
  in rtcintr() may read from the wrong register, so rtcintr() may spin
  forever.  This may be mitigated by the most common state clobbering
  being to turn off RTC interrupts.
2007-03-05 09:10:17 +00:00
Ariff Abdullah
9622f4d439 Quick bandaid for possible broken multiple playback channels implementation.
Reported/Tested by:	Oliver Iberien <odilist@sonic.net>
2007-03-05 07:45:38 +00:00
Kevin Lo
2f0275579d Check for malloc return value 2007-03-05 06:33:08 +00:00