]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoCorrect a harmless typo introduced when copying code from mmu_oea64.
nwhitehorn [Sat, 5 Jun 2010 18:24:41 +0000 (18:24 +0000)]
Correct a harmless typo introduced when copying code from mmu_oea64.

Submitted by: alc
MFC after: 8.1-RELEASE

14 years agoDon't set PG_WRITEABLE in pmap_enter() unless the page is managed.
alc [Sat, 5 Jun 2010 18:20:09 +0000 (18:20 +0000)]
Don't set PG_WRITEABLE in pmap_enter() unless the page is managed.

Correct a typo in a nearby comment on sparc64.

14 years agoAdd a driver for the CPU temperature sensors attached over I2C on the
nwhitehorn [Sat, 5 Jun 2010 17:51:37 +0000 (17:51 +0000)]
Add a driver for the CPU temperature sensors attached over I2C on the
PowerMac 11,2.

14 years agoAdd support for the I2C busses hanging off Apple system management chips.
nwhitehorn [Sat, 5 Jun 2010 17:50:20 +0000 (17:50 +0000)]
Add support for the I2C busses hanging off Apple system management chips.

14 years agoUtilize the Keywest I2C combined mode for messages with repeated starts.
nwhitehorn [Sat, 5 Jun 2010 17:49:40 +0000 (17:49 +0000)]
Utilize the Keywest I2C combined mode for messages with repeated starts.

14 years agoAdd two new flags (IIC_M_NOSTOP and IIC_M_NOSTART) to struct iic_msg to
nwhitehorn [Sat, 5 Jun 2010 17:48:26 +0000 (17:48 +0000)]
Add two new flags (IIC_M_NOSTOP and IIC_M_NOSTART) to struct iic_msg to
allow consumers of iicbus_transfer() to send messages with repeated starts.

Reviewed by: imp

14 years agoCorrect the comment. We now use level low instead of edge high for this
nwhitehorn [Sat, 5 Jun 2010 16:27:15 +0000 (16:27 +0000)]
Correct the comment. We now use level low instead of edge high for this
interrupt.

14 years agoPartially revert r208162 while waiting for review on a more comprehensive
nwhitehorn [Sat, 5 Jun 2010 16:25:25 +0000 (16:25 +0000)]
Partially revert r208162 while waiting for review on a more comprehensive
fix. On Apple OpenPICs, the low/high bit of the interrupt sense is only
respected for interrupt 0. We currently erroneously program all OpenPIC
interrupts level high instead of level low by default, which only matters
for some G5 systems where the SATA controllers use IRQ 0.

This change is a quick fix that will be reverted once the effect of
changing the default interrupt sense on embedded systems is known.

MFC after: 3 days

14 years agoMake sure that interrupt sense settings set after interrupts are enabled
nwhitehorn [Sat, 5 Jun 2010 16:21:55 +0000 (16:21 +0000)]
Make sure that interrupt sense settings set after interrupts are enabled
are respected. This fixes loading the Apple onboard audio driver
(snd_ai2s) as a module after boot, which would previously cause a panic.

PR: powerpc/146888
MFC after: 5 days

14 years agoUse the fpu_kern_enter() interface to properly separate usermode FPU
kib [Sat, 5 Jun 2010 16:00:53 +0000 (16:00 +0000)]
Use the fpu_kern_enter() interface to properly separate usermode FPU
context from in-kernel execution of padlock instructions and to handle
spurious FPUDNA exceptions that sometime are raised when doing padlock
calculations.

Globally mark crypto(9) kthread as using FPU.

Reviewed by: pjd
Hardware provided by: Sentex Communications
Tested by:   pho
PR:    amd64/135014
MFC after:    1 month

14 years agoIntroduce the x86 kernel interfaces to allow kernel code to use
kib [Sat, 5 Jun 2010 15:59:59 +0000 (15:59 +0000)]
Introduce the x86 kernel interfaces to allow kernel code to use
FPU/SSE hardware. Caller should provide a save area that is chained
into the stack of the areas; pcb save_area for usermode FPU state is
on top. The pcb now contains a pointer to the current FPU saved area,
used during FPUDNA handling and context switches.  There is also a
facility to allow the kernel thread to use pcb save_area.

Change the dreaded warnings "npxdna in kernel mode!" into the panics
when FPU usage is not registered.

KPI discussed with: fabient
Tested by:    pho, fabient
Hardware provided by: Sentex Communications
MFC after:    1 month

14 years agoAdd comment that this value is unused.
edwin [Sat, 5 Jun 2010 12:53:44 +0000 (12:53 +0000)]
Add comment that this value is unused.
It is obvious that it isn't used, but both clang and Coverity talk about it.

Found with:   Coverity Prevent(tm)
CID:          8066

14 years agoWhen there is a problem with writing, also bail out.
edwin [Sat, 5 Jun 2010 12:49:39 +0000 (12:49 +0000)]
When there is a problem with writing, also bail out.

Found with the clang checker.

14 years agoMake clang happier by removing unused assignments.
edwin [Sat, 5 Jun 2010 12:31:08 +0000 (12:31 +0000)]
Make clang happier by removing unused assignments.

14 years agoFix warnings about uninitialized variables.
edwin [Sat, 5 Jun 2010 11:41:46 +0000 (11:41 +0000)]
Fix warnings about uninitialized variables.
It was mostly harmless since strftime() only used %a and %b anyway.

Found with:   Coverity Prevent(tm)
CID:          7769

14 years agoFix: when unable to parse the sequence string, erase everything.
edwin [Sat, 5 Jun 2010 11:32:31 +0000 (11:32 +0000)]
Fix: when unable to parse the sequence string, erase everything.

Found with:   Coverity Prevent(tm)
CID:          7888

14 years agoFix memory-leak at the processing of multiple calendars.
edwin [Sat, 5 Jun 2010 11:12:35 +0000 (11:12 +0000)]
Fix memory-leak at the processing of multiple calendars.

Found with:   Coverity Prevent(tm)
CID:          7085

14 years agoProperly check the return value of chdir, even if it is a "this
edwin [Sat, 5 Jun 2010 11:06:56 +0000 (11:06 +0000)]
Properly check the return value of chdir, even if it is a "this
should not happen" case.

Found with:   Coverity Prevent(tm)
CID:          4932

14 years agoRemove some dead and incorrect code.
mav [Sat, 5 Jun 2010 10:16:23 +0000 (10:16 +0000)]
Remove some dead and incorrect code.

Found with:   Coverity Prevent(tm)
CID:          4562

14 years agoAdd allocation error hadling.
mav [Sat, 5 Jun 2010 09:31:13 +0000 (09:31 +0000)]
Add allocation error hadling.

Found with:   Coverity Prevent(tm)
CID:          3897

14 years agoFix possible use after free.
mav [Sat, 5 Jun 2010 08:58:03 +0000 (08:58 +0000)]
Fix possible use after free.

Found with:   Coverity Prevent(tm)
CID:          4634

14 years agoDon't try to copy a socket after "xxx is a socket (not copied)." message.
trasz [Sat, 5 Jun 2010 08:50:39 +0000 (08:50 +0000)]
Don't try to copy a socket after "xxx is a socket (not copied)." message.
Previously, it would either try to copy it anyway and fail (without -R),
or create fifo instead of the socket (with -R).

Found with: Coverity Prevent
CID: 5623
MFC after: 2 weeks

14 years agoFix use after free on error.
mav [Sat, 5 Jun 2010 08:44:40 +0000 (08:44 +0000)]
Fix use after free on error.

Found with:   Coverity Prevent(tm)
CID:          4722

14 years agoFix double free on error.
mav [Sat, 5 Jun 2010 08:36:37 +0000 (08:36 +0000)]
Fix double free on error.

Found with:   Coverity Prevent(tm)
CID:          4573

14 years agoPlug memory leak to silent Coverity. Error is still not really handled.
mav [Sat, 5 Jun 2010 08:21:18 +0000 (08:21 +0000)]
Plug memory leak to silent Coverity. Error is still not really handled.

Found with:   Coverity Prevent(tm)
CID:          4137

14 years agoPlug memory leak to silent Coverity. Error is still not really handled.
mav [Sat, 5 Jun 2010 08:16:21 +0000 (08:16 +0000)]
Plug memory leak to silent Coverity. Error is still not really handled.

Found with:   Coverity Prevent(tm)
CID:          4196

14 years agoFix attach errors handling.
mav [Sat, 5 Jun 2010 08:14:19 +0000 (08:14 +0000)]
Fix attach errors handling.

Found with:   Coverity Prevent(tm)
CID:          3477

14 years agoPlug resource leak.
trasz [Sat, 5 Jun 2010 08:11:11 +0000 (08:11 +0000)]
Plug resource leak.

Found with: Coverity Prevent
CID: 7040

14 years agoPlug memory leak to silent Coverity. Error is still not really handled.
mav [Sat, 5 Jun 2010 08:07:54 +0000 (08:07 +0000)]
Plug memory leak to silent Coverity. Error is still not really handled.

Found with:   Coverity Prevent(tm)
CID:          4130

14 years agoFix attach errors handling.
mav [Sat, 5 Jun 2010 08:02:19 +0000 (08:02 +0000)]
Fix attach errors handling.

Found with:   Coverity Prevent(tm)
CID:          3424

14 years agoMake sure not to pass NULL to g_orphan_provider().
trasz [Sat, 5 Jun 2010 08:00:52 +0000 (08:00 +0000)]
Make sure not to pass NULL to g_orphan_provider().

Found with: Coverity Prevent
CID: 3411

14 years agoDon't use pointer to 64 bit value (id_t) to point to 32 bit value (uid_t).
trasz [Sat, 5 Jun 2010 07:40:32 +0000 (07:40 +0000)]
Don't use pointer to 64 bit value (id_t) to point to 32 bit value (uid_t).

Found with: Coverity Prevent
CID: 7466, 7467
MFC after: 2 weeks

14 years agoDon't set PG_WRITEABLE in pmap_enter() unless the page is managed.
alc [Sat, 5 Jun 2010 06:56:06 +0000 (06:56 +0000)]
Don't set PG_WRITEABLE in pmap_enter() unless the page is managed.

14 years agoMake the internal target > SPC2 (so REPORT LUNS can be tested).
mjacob [Sat, 5 Jun 2010 00:56:15 +0000 (00:56 +0000)]
Make the internal target > SPC2 (so REPORT LUNS can be tested).
Give the NIL inquiry data real values other than just plain 0x7f
in the first byte.

MFC after: 2 weeks

14 years agoI was getting panics in sleepq_add for the second sleep in isp_kthread.
mjacob [Sat, 5 Jun 2010 00:55:21 +0000 (00:55 +0000)]
I was getting panics in sleepq_add for the second sleep in isp_kthread.
I don't know why- but it occurred to me in looking at the second sleep
is that all I want is a pause- not an actual sleep. So do that instead.

MFC after: 2 weeks

14 years ago- Add myself to committers-src.dot
mdf [Fri, 4 Jun 2010 17:54:30 +0000 (17:54 +0000)]
- Add myself to committers-src.dot
- Add myself to calendar.freebsd

Approved by: zml (mentor)

14 years agoDon't blindly set IFF_DRV_OACTIVE when sge_encap() fails. If there
yongari [Fri, 4 Jun 2010 17:11:33 +0000 (17:11 +0000)]
Don't blindly set IFF_DRV_OACTIVE when sge_encap() fails. If there
is no queued frame, IFF_DRV_OACTIVE would never be cleared.

Submitted by: Nikolay Denev < ndenev <> gmail at com >
MFC after: 4 days

14 years agoDeclare ip6 as (struct in6_addr *) instead of (struct in_addr *). This is
cperciva [Fri, 4 Jun 2010 14:38:24 +0000 (14:38 +0000)]
Declare ip6 as (struct in6_addr *) instead of (struct in_addr *).  This is
a harmless bug since we never actually use ip6 as anything other than an
opaque pointer.

Found with: Coverty Prevent(tm)
CID: 4319
MFC after: 1 month

14 years agoo The typo was intended as it stated in the comment. Revert last.
maxim [Fri, 4 Jun 2010 14:22:49 +0000 (14:22 +0000)]
o The typo was intended as it stated in the comment.  Revert last.

Spotted by: dfr

14 years agoscsi_cd: pass correct pointer to free()
avg [Fri, 4 Jun 2010 13:55:55 +0000 (13:55 +0000)]
scsi_cd: pass correct pointer to free()

Found with: Coverity Prevent(tm)
CID: 2986
MFC after: 4 days

14 years agoo Makefile BSDfication.
maxim [Fri, 4 Jun 2010 08:19:43 +0000 (08:19 +0000)]
o Makefile BSDfication.

PR: misc/147461 (with my changes)
Submitted by: Erik Cederstrand

14 years agoo Fix typo: .uudef -> .undef.
maxim [Fri, 4 Jun 2010 08:14:30 +0000 (08:14 +0000)]
o Fix typo: .uudef -> .undef.

PR: misc/147462
Submitted by: Erik Cederstrand

14 years agoFix PCH chipset IDs. They are 0x3bxx, not 0x3axx.
mav [Fri, 4 Jun 2010 07:35:59 +0000 (07:35 +0000)]
Fix PCH chipset IDs. They are 0x3bxx, not 0x3axx.

Pointy hat to: me

14 years agoExplain that setting an absolute day value can fail and that the month should
brian [Fri, 4 Jun 2010 06:56:58 +0000 (06:56 +0000)]
Explain that setting an absolute day value can fail and that the month should
usually be set first when using -v.

Adjust an example that sets the day to 30 before setting the month to 3 in
accordance with this approach as the example would always fail in February!

PR: 147354
MFC after: 2 weeks

14 years agoMake vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig()
jchandra [Fri, 4 Jun 2010 06:35:36 +0000 (06:35 +0000)]
Make vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig()
fails to allocate MIPS page table pages.  The current usage of VM_WAIT in
case of vm_phys_alloc_contig() failure is not correct, because:

"There is no guarantee that any of the available free (or cached) pages
after the VM_WAIT will fall within the range of suitable physical
addresses.  Every time this function sleeps and a single page is freed
(or cached) by someone else, this function will be reawakened.  With
a little bad luck, you could spin indefinitely."

We also add low and high parameters to vm_contig_grow_cache() and
vm_contig_launder() so that we restrict vm_contig_launder() to the range
of pages we are interested in.

Reported by: alc

Reviewed by: alc
Approved by: rrs (mentor)

14 years ago- Add myself to committers-src.dot
ae [Thu, 3 Jun 2010 21:12:51 +0000 (21:12 +0000)]
- Add myself to committers-src.dot
- Add myself to calendar.freebsd

Approved by: kib (mentor)

14 years agoMake chown(1) emit more useful error message when user/group name is invalid.
trasz [Thu, 3 Jun 2010 20:46:23 +0000 (20:46 +0000)]
Make chown(1) emit more useful error message when user/group name is invalid.

14 years agoDo not leak vm page lock in vm_contig_launder(), vm_pageout_page_lock()
kib [Thu, 3 Jun 2010 18:34:34 +0000 (18:34 +0000)]
Do not leak vm page lock in vm_contig_launder(), vm_pageout_page_lock()
always returns with the page locked.

Submitted by: alc
Pointy hat to: kib

14 years agoUse -Wl,-N instead of the undocumented -N option for GCC.
ed [Thu, 3 Jun 2010 17:42:32 +0000 (17:42 +0000)]
Use -Wl,-N instead of the undocumented -N option for GCC.

GCC forwards the -N flag directly to ld. This flag is not documented and
not supported by (for example) Clang. Just use -Wl,-N.

Submitted by: Pawel Worach

14 years agoAssert that the thread lock is held in sched_pctcpu() instead of
jhb [Thu, 3 Jun 2010 16:02:11 +0000 (16:02 +0000)]
Assert that the thread lock is held in sched_pctcpu() instead of
recursively acquiring it.  All of the current callers already hold the
lock.

MFC after: 1 month

14 years agoDon't forget to free the string in error case.
trasz [Thu, 3 Jun 2010 14:51:29 +0000 (14:51 +0000)]
Don't forget to free the string in error case.

Found with: Coverity Prevent
CID: 6585

14 years ago_posix1e_acl_sort() never returns anything other than 0; change its
trasz [Thu, 3 Jun 2010 14:29:17 +0000 (14:29 +0000)]
_posix1e_acl_sort() never returns anything other than 0; change its
return type to void and update callers.  This simplifies code and
fixes one place where the returned value was not actually checked.

Found with: Coverity Prevent
CID: 4791

14 years agoFix usage of uninitialized variable.
trasz [Thu, 3 Jun 2010 14:27:18 +0000 (14:27 +0000)]
Fix usage of uninitialized variable.

Found with: Coverity Prevent
CID: 7517
MFC after: 2 weeks

14 years agoThe 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 14:16:58 +0000 (14:16 +0000)]
The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 6192

14 years agoThe 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 14:15:08 +0000 (14:15 +0000)]
The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 6193

14 years agoThe 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 13:45:27 +0000 (13:45 +0000)]
The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 3688

14 years agoThe 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 13:43:58 +0000 (13:43 +0000)]
The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 3684

14 years agoThe acl_cnt field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 13:41:55 +0000 (13:41 +0000)]
The acl_cnt field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 3683

14 years ago- Mention that VTOC8 labels are found in Fujitsu SPARC64 machines as well.
marius [Thu, 3 Jun 2010 13:04:56 +0000 (13:04 +0000)]
- Mention that VTOC8 labels are found in Fujitsu SPARC64 machines as well.
- Add information regarding VTOC8 bootrstrap code and how it's handled with
  r208777 in place.
- Document the mapping of partition types to VTOC8 tags.
- Add examples for VTOC8 to the respective section.
- Eliminated hard sentence breaks.

Reviewed by: marcel (slightly buggy version)
MFC after: 3 days

14 years ago- In gpart_bootfile_read() fix an off-by-one error preventing the bootstrap
marius [Thu, 3 Jun 2010 13:01:55 +0000 (13:01 +0000)]
- In gpart_bootfile_read() fix an off-by-one error preventing the bootstrap
  file to be of maximum size.
- Add special handling required for SMI/VTOC8 disklabel partcode, i.e. avoid
  overwriting the label when writing the bootstrap code to the partition
  starting at 0 and install it to all partitions when the -i option is omitted
  just like geom_sunlabel(4) and sunlabel(8) do by default.
- Add missing prototypes.
- Add const where applicable.

Reviewed by: marcel
MFC after: 3 days

14 years agoAvoid possible NULL-dereferences.
marius [Thu, 3 Jun 2010 12:09:02 +0000 (12:09 +0000)]
Avoid possible NULL-dereferences.

Found with: Coverity Prevent(tm)
CID: 3428
MFC after: 3 days

14 years agoFix freeing space after deleting large files with holes.
mm [Thu, 3 Jun 2010 11:08:46 +0000 (11:08 +0000)]
Fix freeing space after deleting large files with holes.

OpenSolaris onnv revision: 9950:78fc41aa9bc5

Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6792701)
MFC after: 3 days

14 years agoExtend the scope of the lock on the quota file vnode in quotaon() to
kib [Thu, 3 Jun 2010 10:24:53 +0000 (10:24 +0000)]
Extend the scope of the lock on the quota file vnode in quotaon() to
cover the initial read by dqopen(). Assert that vnode is locked in
dqopen(). Remove VFS_LOCK_GIANT() from dqopen(), since quotaon() keeps
Giant locked if needed around the call.

14 years agoSometimes vnodes share the lock despite being different vnodes on
kib [Thu, 3 Jun 2010 10:20:08 +0000 (10:20 +0000)]
Sometimes vnodes share the lock despite being different vnodes on
different mount points, e.g. the nullfs vnode and the covered vnode
from the lower filesystem. In this case, existing assertion in
vop_rename_pre() may be triggered.

Check for vnode locks equiality instead of the vnodes itself to
not trip over the situation.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
Tested by: pho
MFC after: 2 weeks

14 years agoAdd assertion and comment in vm_page_flag_set() describing the expectations
kib [Thu, 3 Jun 2010 10:11:45 +0000 (10:11 +0000)]
Add assertion and comment in vm_page_flag_set() describing the expectations
when the PG_WRITEABLE flag is set.

Reviewed by: alc

14 years ago[0] Improve wording.
attilio [Thu, 3 Jun 2010 09:54:53 +0000 (09:54 +0000)]
[0] Improve wording.
[1] Following style for manpages, just do carriage return after a
    sentence.

Sponsored by: Sandvine Incorporated
[0] Submitted by: emaste
[1] Submitted by: rwatson

14 years agoopensolaris_kmem.c is already part of opensolaris.ko which zfs.ko depends on.
pjd [Thu, 3 Jun 2010 09:29:54 +0000 (09:29 +0000)]
opensolaris_kmem.c is already part of opensolaris.ko which zfs.ko depends on.

Reported by: avg
MFC after: 3 days

14 years agoIn the unlikely event that pmap_ts_referenced() demoted five superpage
alc [Thu, 3 Jun 2010 03:55:22 +0000 (03:55 +0000)]
In the unlikely event that pmap_ts_referenced() demoted five superpage
mappings to the same underlying physical page, the calling thread would be
left forever pinned to the same processor.

MFC after: 3 days

14 years agoMaintain the pretense that we support 32KB pages for the sake of the ia64
alc [Thu, 3 Jun 2010 02:24:53 +0000 (02:24 +0000)]
Maintain the pretense that we support 32KB pages for the sake of the ia64
LINT build.

14 years agoPlug possible memory leak.
kan [Thu, 3 Jun 2010 00:25:43 +0000 (00:25 +0000)]
Plug possible memory leak.

Found by:  Coverity
MFC after: 2 weeks

14 years agoFixes for panic experienced in test at Intel, when
jfv [Thu, 3 Jun 2010 00:00:45 +0000 (00:00 +0000)]
Fixes for panic experienced in test at Intel, when
doing bidirectional stress traffic on 82598.

Also a couple bug fixes from Michael Tuexen, thank you!!

Add a workaround into the header so that 8 REL can use
the driver (adds local copy of ALTQ fix).

MFC: in a few days

14 years agoVarious minor and not so minor fixes suggested by Coverity.
mjacob [Wed, 2 Jun 2010 23:31:27 +0000 (23:31 +0000)]
Various minor and not so minor fixes suggested by Coverity.
In at least one case, it's amazing that target mode worked at all.

Found by: Coverity.
MFC after: 2 weeks

14 years agoDocument import of xz.
mm [Wed, 2 Jun 2010 21:28:07 +0000 (21:28 +0000)]
Document import of xz.

Approved by: delphij (mentor)

14 years agoFix build for O32 systems without a TARGET_CPUTYPE defined. We must default to
jmallett [Wed, 2 Jun 2010 21:15:00 +0000 (21:15 +0000)]
Fix build for O32 systems without a TARGET_CPUTYPE defined.  We must default to
MIPS-III because FreeBSD relies on a number of MIPS-III features; the ABI
default would be MIPS-I which we don't intend to support.  Our old default
before I switched to using the ABI default was MIPS32.

14 years agosh: Pass TERM changes to libedit.
jilles [Wed, 2 Jun 2010 19:16:58 +0000 (19:16 +0000)]
sh: Pass TERM changes to libedit.

I have changed the patch slightly to ignore TERM changes in subshells.

PR: bin/146916
Submitted by: Guy Yur
Obtained from: NetBSD

14 years agoAdd required header for isalnum(3) to quench compiler warnings
uqs [Wed, 2 Jun 2010 18:31:04 +0000 (18:31 +0000)]
Add required header for isalnum(3) to quench compiler warnings

Forgotten in: r174678
Submitted by: Alexander Best alexbestms at wwu.de
Approved by: das

14 years agoProtect periph drivers list and rearrange things to minimize the chance of
mjacob [Wed, 2 Jun 2010 18:06:32 +0000 (18:06 +0000)]
Protect periph drivers list and rearrange things to minimize the chance of
stepping oneself during probing.

Don't blindly decrement a periph probe count.

Reviewed by: scsi@
Obtained from: Alexander Motin, Atillio Rao, Others
MFC after: 1 month

14 years agoProvide memchr() in the libkern.
raj [Wed, 2 Jun 2010 17:27:23 +0000 (17:27 +0000)]
Provide memchr() in the libkern.

This is required by libfdt and will be compiled in conditionally only for
FDT-enabled platforms.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoProvide kernel level headers for the libfdt code.
raj [Wed, 2 Jun 2010 17:24:41 +0000 (17:24 +0000)]
Provide kernel level headers for the libfdt code.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoFlattened Device Tree helper scripts.
raj [Wed, 2 Jun 2010 17:22:38 +0000 (17:22 +0000)]
Flattened Device Tree helper scripts.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoFDT (simplebus) compatible attachment for uart(4).
raj [Wed, 2 Jun 2010 17:20:00 +0000 (17:20 +0000)]
FDT (simplebus) compatible attachment for uart(4).

This will be a single uart(4) attachment code shared by all FDT-enabled
platforms.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoImport the common Flattened Device Tree infrastructure.
raj [Wed, 2 Jun 2010 17:17:45 +0000 (17:17 +0000)]
Import the common Flattened Device Tree infrastructure.

o fdtbus(4) - the main abstract bus driver for all FDT-compliant systems. This
  is a direct replacement for the many incompatible bus drivers grouping
  integrated peripherals on embedded platforms (like obio(4), ocpbus(4) etc.)

o simplebus(4) - bus driver representing ePAPR style 'simple-bus' node, which
  is an umbrella device for most of the integrated peripherals on a typical
  system-on-chip device.

o Other components (common routines library, PCI node processing helper
  functions)

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoDon't leak memory on destruction.
marius [Wed, 2 Jun 2010 17:17:11 +0000 (17:17 +0000)]
Don't leak memory on destruction.

Reviewed by: marcel
MFC after: 3 days

14 years agoMinimize the use of the page queues lock for synchronizing access to the
alc [Wed, 2 Jun 2010 15:46:37 +0000 (15:46 +0000)]
Minimize the use of the page queues lock for synchronizing access to the
page's dirty field.  With the exception of one case, access to this field
is now synchronized by the object lock.

14 years agoVirtualize the IPv4 multicast routing code.
zec [Wed, 2 Jun 2010 15:44:43 +0000 (15:44 +0000)]
Virtualize the IPv4 multicast routing code.

Submitted by: iprebeg
Reviewed by: bms, bz, Pavlin Radoslavov
MFC after: 30 days

14 years agoProvide a macro for registering a virtualized sysctl handler for
zec [Wed, 2 Jun 2010 15:29:21 +0000 (15:29 +0000)]
Provide a macro for registering a virtualized sysctl handler for
VNET opaque data.

MFC after: 30 days

14 years agoMFamd64: Add a new macro PCPU_XEN_FIELDS to hold XEN-specific per-CPU
jhb [Wed, 2 Jun 2010 15:09:36 +0000 (15:09 +0000)]
MFamd64: Add a new macro PCPU_XEN_FIELDS to hold XEN-specific per-CPU
fields that is always included in PCPU_MD_FIELDS.  The macro is empty for
non-XEN kernels.  This avoids duplicating non-XEN per-CPU fields in two
places.  While here, remove several unused fields from the XEN-specific
structure.

Reviewed by: kmacy, gibbs
MFC after: 1 month

14 years agoAdd/improve mips64r2, Octeon, n32 and n64 support in the toolchain.
jmallett [Wed, 2 Jun 2010 11:06:03 +0000 (11:06 +0000)]
Add/improve mips64r2, Octeon, n32 and n64 support in the toolchain.

o) Add TARGET_ABI to the MIPS toolchain build process.  This sets the default
   ABI to one of o32, n32 or n64.  If it is not set, o32 is assumed as that is
   the current default.
o) Set the default GCC cpu type to any specified TARGET_CPUTYPE.  This is
   necessary to have a working "cc" if e.g. mips64 is specified, as binutils
   will refuse to link objects using different ISAs in some cases.
o) Add support for n32 and n64 ABIs to binutils and GCC.
o) Add additional required libgcc2 stubs for n32 and n64.
o) Add support for the "mips64r2" architecture to GCC.  Add the "octeon"
o) When static linking, wrap default libraries in --start-group and
   --end-group.  This is required for static linking to work on n64 with the
   interdependencies between libraries there.  This is what other OSes that
   support n64 seem to do, as well.
o) Fix our GCC spec to define __mips64 for 64-bit targets, not __mips64__, the
   former being what libgcc, etc., check and the latter seemingly being a
   misspelling of a hand merge from a Linux spec.
o) When no TARGET_CPUTYPE is specified at build time, make GCC take the default
   ISA from the ABI.  Our old defaults were too liberal and assumed that 64-bit
   ABIs should default to the MIPS64 ISA and that 32-bit ABIs should default to
   the MIPS32 ISA, when we are supporting or will support some systems based on
   earlier 32-bit and 64-bit ISAs, most notably MIPS-III.
o) Merge a new opcode file (and support code) from a later version of binutils
   and add flags and code necessary to support Octeon-specific instructions.
   This should also make merging opcodes for other modern architectures easier.

Reviewed by: imp

14 years agomdoc: spell macros correctly, there's no need for the backslash escape
uqs [Wed, 2 Jun 2010 10:20:38 +0000 (10:20 +0000)]
mdoc: spell macros correctly, there's no need for the backslash escape

14 years agomdoc: use literal text, not a column table to present the
uqs [Wed, 2 Jun 2010 10:20:31 +0000 (10:20 +0000)]
mdoc: use literal text, not a column table to present the
configuration file snippet.

14 years agomdoc cleanup
uqs [Wed, 2 Jun 2010 10:20:23 +0000 (10:20 +0000)]
mdoc cleanup

Garbage collect unused sections, macros and arguments. Fix prologue and
remove empty lines.

Found by: mdocml

14 years agoAdd a facility to dynamically adjust or unconfigure p1003_1b mib.
kib [Wed, 2 Jun 2010 09:59:05 +0000 (09:59 +0000)]
Add a facility to dynamically adjust or unconfigure p1003_1b mib.
Use it to allow to tune sem_nsem_max at runtime, only when sem.ko
module is present in kernel.

Requested and tested by: amdmi3
Reviewed by: jhb
MFC after: 3 days

14 years agoZero struct before reading from it
uqs [Wed, 2 Jun 2010 09:34:41 +0000 (09:34 +0000)]
Zero struct before reading from it

PR:    140384
Found by:  clang static analyzer
MFC after: 3 weeks

14 years agoRecommend disabling LAPIC timer instead whole APIC for fixing C3 state.
mav [Wed, 2 Jun 2010 08:43:18 +0000 (08:43 +0000)]
Recommend disabling LAPIC timer instead whole APIC for fixing C3 state.

PR: docs/147180
Submitted by: Tobias Rehbein

14 years agoFix stuttering sequences and reverse ranges
brian [Wed, 2 Jun 2010 07:47:29 +0000 (07:47 +0000)]
Fix stuttering sequences and reverse ranges

PR: 123635
Submitted by: Ulrich Spörlein, uqs at spoerlein dot net

14 years agoMore commas
des [Tue, 1 Jun 2010 22:46:57 +0000 (22:46 +0000)]
More commas

14 years agoRemove unnecessary pointer type castings, shift operations and dead code.
jkim [Tue, 1 Jun 2010 21:15:05 +0000 (21:15 +0000)]
Remove unnecessary pointer type castings, shift operations and dead code.

14 years agoIn the case that mmu_booke_enter_locked() is changing the attributes of a
alc [Tue, 1 Jun 2010 19:56:02 +0000 (19:56 +0000)]
In the case that mmu_booke_enter_locked() is changing the attributes of a
mapping but not changing the physical page being mapped, the wrong flags
were being inspected in order to determine whether or not to flush the
instruction cache.  The effect of looking at the wrong flags was that the
instruction cache was never being flushed.

Reviewed by: marcel

14 years agoDon't try to call cdevsw d_close() method when devfs_close() is called
jh [Tue, 1 Jun 2010 18:57:21 +0000 (18:57 +0000)]
Don't try to call cdevsw d_close() method when devfs_close() is called
because of insmntque1() failure.

Found with: stress2
Suggested and reviewed by: kib

14 years agoAdjust the manpage after r207329.
attilio [Tue, 1 Jun 2010 18:27:48 +0000 (18:27 +0000)]
Adjust the manpage after r207329.

Sponsored by: Sandvine Incorporated
Reviewed by: cpercival, emaste, marcel
X-MFC: r207329