]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoFix a sentence in a paragraph that describes time and interval based
glebius [Wed, 21 Mar 2012 07:02:17 +0000 (07:02 +0000)]
Fix a sentence in a paragraph that describes time and interval based
trimming. This sentence vaguely can be interpreted as if it was speaking
about time and size interaction, while it wasn't about it.

12 years agoDon't run through time checks when entry is definitely oversized. This
glebius [Wed, 21 Mar 2012 06:51:45 +0000 (06:51 +0000)]
Don't run through time checks when entry is definitely oversized. This
leads to newsyslog rotating on (size OR time) if both are specified.

PR: 100018, 160432

12 years agoEliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no
alc [Wed, 21 Mar 2012 04:00:58 +0000 (04:00 +0000)]
Eliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no
longer serve any purpose.  Prior to r157446, they served a purpose
because there was a fixed amount of kernel virtual address space
reserved for pv entries at boot time.  However, since that change pv
entries are accessed through the direct map, and so there is no limit
imposed by a fixed amount of kernel virtual address space.

Fix a couple of nearby style issues.

Reviewed by: jhb, kib
MFC after: 1 week

12 years agoRe-commit this - store the alq payload in network order.
adrian [Wed, 21 Mar 2012 03:19:50 +0000 (03:19 +0000)]
Re-commit this - store the alq payload in network order.

12 years agoMerge ACPICA 20120320.
jkim [Tue, 20 Mar 2012 21:37:52 +0000 (21:37 +0000)]
Merge ACPICA 20120320.

12 years agoFix another witness panic. We cannot enter critical section at all because
jkim [Tue, 20 Mar 2012 20:37:23 +0000 (20:37 +0000)]
Fix another witness panic.  We cannot enter critical section at all because
AcpiEnterSleepState() executes (optional) _GTS method since ACPICA 20120215
(r231844).  To evaluate the method, we need malloc(9), which may sleep.

Reported by: bschmidt
MFC after: 3 days

12 years agoImport ACPICA 20120320.
jkim [Tue, 20 Mar 2012 18:17:33 +0000 (18:17 +0000)]
Import ACPICA 20120320.

12 years agoAdd sys/ofed to the 'make cscope' target.
jhb [Tue, 20 Mar 2012 18:05:15 +0000 (18:05 +0000)]
Add sys/ofed to the 'make cscope' target.

MFC after: 1 week

12 years agoImport new version of libcxxrt. Now works correctly with libobjc2 to implement
theraven [Tue, 20 Mar 2012 17:58:15 +0000 (17:58 +0000)]
Import new version of libcxxrt.  Now works correctly with libobjc2 to implement
the unified exception model for Objective-C++.

Approved by: dim (mentor)

12 years agoUpdate the list of struct ifnet fields.
pluknet [Tue, 20 Mar 2012 16:56:35 +0000 (16:56 +0000)]
Update the list of struct ifnet fields.
- Document if_vnet, if_home_vnet, if_carp, if_vlantrunk, if_multiaddrs,
  if_amcount, if_addr, if_llsoftc stub, if_broadcastaddr, if_bridge,
  if_label, if_afdata, if_afdata_initialized, if_afdata_lock, if_linktask,
  if_addr_mtx (now if_addr_lock), if_clones, if_groups, if_pf_kif, if_lagg,
  if_alloctype
- G/c now defunct and/or commented out in the manual page if_ipending,
  if_poll_slowq, if_done, if_poll_recv, if_poll_xmit, if_poll_slowinput,
  if_poll_intren
- Update if_snd type changed with ALTQ integration.

MFC after: 1 week

12 years agoFix several problems with our ELF filters implementation.
kib [Tue, 20 Mar 2012 13:20:49 +0000 (13:20 +0000)]
Fix several problems with our ELF filters implementation.

Do not relocate twice an object which happens to be needed by loaded
binary (or dso) and some filtee opened due to symbol resolution when
relocating need objects.  Record the state of the relocation
processing in Obj_Entry and short-circuit relocate_objects() if
current object already processed.

Do not call constructors for filtees loaded during the early
relocation processing before image is initialized enough to run
user-provided code.  Filtees are loaded using dlopen_object(), which
normally performs relocation and initialization.  If filtee is
lazy-loaded during the relocation of dso needed by the main object,
dlopen_object() runs too earlier, when most runtime services are not
yet ready.

Postpone the constructors call to the time when main binary and
depended libraries constructors are run, passing the new flag
RTLD_LO_EARLY to dlopen_object().  Symbol lookups callers inform
symlook_* functions about early stage of initialization with
SYMLOOK_EARLY.  Pass flags through all functions participating in
object relocation.

Use the opportunity and fix flags argument to find_symdef() in
arch-specific reloc.c to use proper name SYMLOOK_IN_PLT instead of
true, which happen to have the same numeric value.

Reported and tested by: theraven
Reviewed by: kan
MFC after: 2 weeks

12 years agoImprove device tree blob (DTB) handling in loader(8).
raj [Tue, 20 Mar 2012 13:08:57 +0000 (13:08 +0000)]
Improve device tree blob (DTB) handling in loader(8).

Enable using the statically embedded blob from the kernel, if present. The KLD
loaded DTB takes precedence, but they are both recognized and handled in the
same way.

Submitted by: Lukasz Wojcik
Obtained from: Semihalf
MFC after: 1 week

12 years agoo Xr siftr.4 in order to expose it to a wider audience.
maxim [Tue, 20 Mar 2012 12:24:36 +0000 (12:24 +0000)]
o Xr siftr.4 in order to expose it to a wider audience.

Reviewed by: lstewart

12 years agoDelay sequence number allocation for A-MPDU until just before the frame
adrian [Tue, 20 Mar 2012 04:50:25 +0000 (04:50 +0000)]
Delay sequence number allocation for A-MPDU until just before the frame
is queued to the hardware.

Because multiple concurrent paths can execute ath_start(), multiple
concurrent paths can push frames into the software/hardware TX queue
and since preemption/interrupting can occur, there's the possibility
that a gap in time will occur between allocating the sequence number
and queuing it to the hardware.

Because of this, it's possible that a thread will have allocated a
sequence number and then be preempted by another thread doing the same.
If the second thread sneaks the frame into the BAW, the (earlier) sequence
number of the first frame will be now outside the BAW and will result
in the frame being constantly re-added to the tail of the queue.
There it will live until the sequence numbers cycle around again.

This also creates a hole in the RX BAW tracking which can also cause
issues.

This patch delays the sequence number allocation to occur only just before
the frame is going to be added to the BAW.  I've been wanting to do this
anyway as part of a general code tidyup but I've not gotten around to it.
This fixes the PR.

However, it still makes it quite difficult to try and ensure in-order
queuing and dequeuing of frames. Since multiple copies of ath_start()
can be run at the same time (eg one TXing process thread, one TX completion
task/one RX task) the driver may end up having frames dequeued and pushed
into the hardware slightly/occasionally out of order.

And, to make matters more annoying, net80211 may have the same behaviour -
in the non-aggregation case, the TX code allocates sequence numbers
before it's thrown to the driver.  I'll open another PR to investigate
this and potentially introduce some kind of final-pass TX serialisation
before frames are thrown to the hardware.  It's also very likely worthwhile
adding some debugging code into ath(4) and net80211 to catch when/if this
does occur.

PR: kern/166190

12 years agoCopy amd64 sysarch.h to x86 and merge with i386 sysarch.h. Replace
tijl [Mon, 19 Mar 2012 21:57:31 +0000 (21:57 +0000)]
Copy amd64 sysarch.h to x86 and merge with i386 sysarch.h. Replace
amd64/i386/pc98 sysarch.h with stubs.

12 years agoFix a witness panic introduced in r231797.
jkim [Mon, 19 Mar 2012 21:47:50 +0000 (21:47 +0000)]
Fix a witness panic introduced in r231797.

Reported by: bschmidt
Reviewed by: jhb
Pointy hat to: jkim
MFC after: 3 days

12 years agoCopy i386 specialreg.h to x86 and merge with amd64 specialreg.h. Replace
tijl [Mon, 19 Mar 2012 21:34:11 +0000 (21:34 +0000)]
Copy i386 specialreg.h to x86 and merge with amd64 specialreg.h. Replace
amd64/i386/pc98 specialreg.h with stubs.

12 years agoCopy i386 psl.h to x86 and replace amd64/i386/pc98 psl.h with stubs.
tijl [Mon, 19 Mar 2012 21:29:57 +0000 (21:29 +0000)]
Copy i386 psl.h to x86 and replace amd64/i386/pc98 psl.h with stubs.

12 years agoMove userland bits (and some common kernel bits) from amd64 and i386
tijl [Mon, 19 Mar 2012 21:24:50 +0000 (21:24 +0000)]
Move userland bits (and some common kernel bits) from amd64 and i386
segments.h to a new x86 segments.h.

Add __packed attribute to some structs (just to be sure).
Also make it clear that i386 GDT and LDT entries are used in ia64 code.

12 years agoRetire the IF_ADDR_LOCK() and IF_ADDR_UNLOCK() compat macros from HEAD.
jhb [Mon, 19 Mar 2012 21:09:12 +0000 (21:09 +0000)]
Retire the IF_ADDR_LOCK() and IF_ADDR_UNLOCK() compat macros from HEAD.
The new [RW]LOCK macros are merged back to 8.x so should be suitable for
new code in HEAD even if it is to be MFC'd.

12 years agoFix build of OFED bits with debugging options enabled.
jhb [Mon, 19 Mar 2012 19:53:53 +0000 (19:53 +0000)]
Fix build of OFED bits with debugging options enabled.

12 years agoo Sort Xrs.
maxim [Mon, 19 Mar 2012 19:27:43 +0000 (19:27 +0000)]
o Sort Xrs.

12 years agoo Trim EoL whitespaces.
maxim [Mon, 19 Mar 2012 19:25:22 +0000 (19:25 +0000)]
o Trim EoL whitespaces.

12 years agoFix the following warning from clang trunk:
dim [Mon, 19 Mar 2012 19:17:55 +0000 (19:17 +0000)]
Fix the following warning from clang trunk:

usr.sbin/dconschat/dconschat.c:163:65: error: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
        snprintf(buf, PAGE_SIZE, "\r\n[dconschat reset target(addr=0x%zx)...]\r\n", dc->reset);
                                                                     ~~^            ~~~~~~~~~
                                                                     %llx

Silence this by casting dc->reset to intmax_t, and using the appropriate
length modifier.  While here, wrap the line to a 80 character margin.

MFC after: 3 days

12 years agoBah, just revert my earlier change entirely. (Missed alc's request to do
jhb [Mon, 19 Mar 2012 19:06:40 +0000 (19:06 +0000)]
Bah, just revert my earlier change entirely.  (Missed alc's request to do
this earlier.)

Requested by: alc

12 years agoAdd explicit braces to avoid dangling else in stl_tree.h. This silences
dim [Mon, 19 Mar 2012 19:01:34 +0000 (19:01 +0000)]
Add explicit braces to avoid dangling else in stl_tree.h.  This silences
the following warning produced by clang trunk:

  In file included from /usr/src/sbin/devd/devd.cc:91:
  In file included from /usr/obj/usr/src/tmp/usr/include/c++/4.2/map:64:
  /usr/obj/usr/src/tmp/usr/include/c++/4.2/bits/stl_tree.h:987:2: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
  else
  ^

MFC after: 3 days

12 years agoFix madvise(MADV_WILLNEED) to properly handle individual mappings larger
jhb [Mon, 19 Mar 2012 18:47:34 +0000 (18:47 +0000)]
Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger
than 4GB.  Specifically, the inlined version of 'ptoa' of the the 'int'
count of pages overflowed on 64-bit platforms.  While here, change
vm_object_madvise() to accept two vm_pindex_t parameters (start and end)
rather than a (start, count) tuple to match other VM APIs as suggested
by alc@.

12 years agoAlter the previous commit to use vm_size_t instead of vm_pindex_t.
jhb [Mon, 19 Mar 2012 18:43:44 +0000 (18:43 +0000)]
Alter the previous commit to use vm_size_t instead of vm_pindex_t.
vm_pindex_t is not a count of pages per se, it is more like vm_ooffset_t,
but a page index instead of a byte offset.

12 years agoProvide a fix for certain PowerMacs where the U3 i2c lacks the interrupt
andreast [Mon, 19 Mar 2012 18:03:20 +0000 (18:03 +0000)]
Provide a fix for certain PowerMacs where the U3 i2c lacks the interrupt
info.

Tested by: Robert Hish
MFC after: 1 week

12 years agoDo not reuse the previous address when restoring linear frame buffer.
jkim [Mon, 19 Mar 2012 17:14:12 +0000 (17:14 +0000)]
Do not reuse the previous address when restoring linear frame buffer.

12 years agoAn intel RAID can have any arbitrary name.
jpaetzel [Mon, 19 Mar 2012 16:13:14 +0000 (16:13 +0000)]
An intel RAID can have any arbitrary name.

12 years agoRe-apply r233122 erronously reverted in r233168.
kib [Mon, 19 Mar 2012 15:50:14 +0000 (15:50 +0000)]
Re-apply r233122 erronously reverted in r233168.

Submitted by:  jhb
Pointy hat to:  kib
MFC after: 2 weeks

12 years agoRemove this - it's not needed as it's defined in ieee80211_freebsd.h.
adrian [Mon, 19 Mar 2012 13:54:15 +0000 (13:54 +0000)]
Remove this - it's not needed as it's defined in ieee80211_freebsd.h.

12 years agoAdd CTLFLAG_TUN to sysctls.
ae [Mon, 19 Mar 2012 13:21:10 +0000 (13:21 +0000)]
Add CTLFLAG_TUN to sysctls.

MFC after: 1 month

12 years agoDocument GEOM_PART_LDM scheme and partition types.
ae [Mon, 19 Mar 2012 13:17:47 +0000 (13:17 +0000)]
Document GEOM_PART_LDM scheme and partition types.

MFC after: 1 month

12 years agoConnect geom_part_ldm to the kernel build.
ae [Mon, 19 Mar 2012 13:16:46 +0000 (13:16 +0000)]
Connect geom_part_ldm to the kernel build.

MFC after: 1 month

12 years agoConnect geom_part_ldm module to the build.
ae [Mon, 19 Mar 2012 13:15:48 +0000 (13:15 +0000)]
Connect geom_part_ldm module to the build.

MFC after: 1 month

12 years agoAdd new GEOM_PART_LDM module that implements the Logical Disk Manager
ae [Mon, 19 Mar 2012 13:14:44 +0000 (13:14 +0000)]
Add new GEOM_PART_LDM module that implements the Logical Disk Manager
scheme. The LDM is a logical volume manager for MS Windows NT and it
is also known as dynamic volumes. It supports about 2000 partitions
and also provides the capability for software RAID implementations.

This version implements only partitioning scheme capability and based
on the linux-ntfs project documentation and several publications across
the Web. NOTE: JBOD, RAID0 and RAID5 volumes aren't supported.

An access to the LDM metadata is read-only. When LDM is on the disk
partitioned with MBR we can also destroy metadata. For the GPT
partitioned disks destroy action is not supported.

Reviewed by: ivoras (previous version)
MFC after: 1 month

12 years agoMake kern.geom.part node not static. Also add CTLFLAG_TUN to the
ae [Mon, 19 Mar 2012 12:57:52 +0000 (12:57 +0000)]
Make kern.geom.part node not static. Also add CTLFLAG_TUN to the
check_integrity sysctl.

MFC after: 1 month

12 years agoAdd symbol versioning to libcxxrt.
theraven [Mon, 19 Mar 2012 11:53:33 +0000 (11:53 +0000)]
Add symbol versioning to libcxxrt.

Approved by: dim (mentor)

12 years agoMake __get_locale() static inline, not just inline, so when compiling libc in
theraven [Mon, 19 Mar 2012 11:47:37 +0000 (11:47 +0000)]
Make __get_locale() static inline, not just inline, so when compiling libc in
debug mode (without optimisations) it doesn't generate a linker failure.

Approved by: dim (mentor)

12 years agoIf we ever allow for managed fictitious pages, the pages shall be
kib [Mon, 19 Mar 2012 09:34:22 +0000 (09:34 +0000)]
If we ever allow for managed fictitious pages, the pages shall be
excluded from superpage promotions.  At least one of the reason is
that pv_table is sized for non-fictitious pages only.

Consistently check for the page to be non-fictitious before accesing
superpage pv list.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 2 weeks

12 years agoRotate auth.log and messages at the beginning of a year. Otherwise,
glebius [Mon, 19 Mar 2012 09:30:40 +0000 (09:30 +0000)]
Rotate auth.log and messages at the beginning of a year. Otherwise,
daily security checks 800.loginfail and 900.tcpwrap may produce
false positive alerts.

12 years agoRemove trailing whitespace.
bjk [Mon, 19 Mar 2012 05:08:09 +0000 (05:08 +0000)]
Remove trailing whitespace.

Approved by: hrs (mentor)

12 years agoExpound a bit more about the system maximum number of FIBs,
bjk [Mon, 19 Mar 2012 04:46:11 +0000 (04:46 +0000)]
Expound a bit more about the system maximum number of FIBs,
how it may be set, and current limitations on the value.

Approved by: hrs (mentor)
PR: docs/157453
MFC after: 1 week

12 years agofix ABI detection logic: for 64-bit elf objects set default ABI to n64.
gonzo [Mon, 19 Mar 2012 03:27:08 +0000 (03:27 +0000)]
fix ABI detection logic: for 64-bit elf objects set default ABI to n64.

12 years agoDo not change current media when driver is already running. If
yongari [Mon, 19 Mar 2012 02:10:40 +0000 (02:10 +0000)]
Do not change current media when driver is already running.  If
driver is running driver would have already completed flow control
configuration.  This change removes unnecessary media changes in
controller reconfiguration cases such that it does not trigger link
reestablishment for configuration change requests like promiscuous
mode change.

Reported by: Many
Tested by: Mike Tancsa <mike <> sentex dot net>
MFC after: 1 week

12 years agodraft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007
eadler [Mon, 19 Mar 2012 00:47:01 +0000 (00:47 +0000)]
draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007

PR: docs/163771
Submitted by: phk
Reviewed by: If someone else reviewed your modification.
Approved by: cperciva
MFC after: 1 week

12 years agorm[0].rm_so must be zero (an explicit check is made for zero in the
eadler [Mon, 19 Mar 2012 00:45:01 +0000 (00:45 +0000)]
rm[0].rm_so must be zero (an explicit check is made for zero in the
outer if condition)

Reviewed by: se
Approved by: cperciva

12 years agoX11BASE is not used any more and has been killed by the x11 team.
eadler [Mon, 19 Mar 2012 00:41:40 +0000 (00:41 +0000)]
X11BASE is not used any more and has been killed by the x11 team.

Reviewed by: ???
Approved by: ???
MFC after: 3 days

12 years ago- Clean up timestamps in msgbuf code. The timestamps should now be
eadler [Mon, 19 Mar 2012 00:36:32 +0000 (00:36 +0000)]
- Clean up timestamps in msgbuf code.  The timestamps should now be
    inserted after the priority token thus cleaning up the output.
- Remove the needless double internal do_add_char function.
- Resolve a possible deadlock if interrupts are
    disabled and getnanotime is called

Reviewed by: bde  kmacy, avg, sbruno (various versions)
Approved by: cperciva
MFC after: 2 weeks

12 years agoUse clockid parameter instead of hard-coded CLOCK_REALTIME.
davidxu [Mon, 19 Mar 2012 00:07:10 +0000 (00:07 +0000)]
Use clockid parameter instead of hard-coded CLOCK_REALTIME.

Reported by: pjd

12 years ago.. revert out a local change that I hadn't yet completely finished fleshing
adrian [Sun, 18 Mar 2012 21:54:59 +0000 (21:54 +0000)]
.. revert out a local change that I hadn't yet completely finished fleshing
out and testing.

sorry!

12 years agofts(3): Mention that FTS_NOCHDIR imposes {PATH_MAX} limits on the returned
jilles [Sun, 18 Mar 2012 21:46:27 +0000 (21:46 +0000)]
fts(3): Mention that FTS_NOCHDIR imposes {PATH_MAX} limits on the returned
pathnames.

With the current API (no *at functions), FTS_NOCHDIR requires that the
fts_accpath start with the original path passed to fts_open(); therefore,
the depth that can be reached is limited by the {PATH_MAX} constraint on
this pathname.

MFC after: 1 week

12 years agoRedirect camcontrol stderr to /dev/null.
jpaetzel [Sun, 18 Mar 2012 21:19:21 +0000 (21:19 +0000)]
Redirect camcontrol stderr to /dev/null.

12 years agofts(3): Document cases where FTS_NOCHDIR is set implicitly.
jilles [Sun, 18 Mar 2012 20:34:01 +0000 (20:34 +0000)]
fts(3): Document cases where FTS_NOCHDIR is set implicitly.

PR: docs/166091
Submitted by: Matthew Story
MFC after: 1 week

12 years agoAdd a missing endian conversion.
adrian [Sun, 18 Mar 2012 19:35:30 +0000 (19:35 +0000)]
Add a missing endian conversion.

12 years agomemset() wants the size of the structure to clear, not the size
harti [Sun, 18 Mar 2012 19:28:52 +0000 (19:28 +0000)]
memset() wants the size of the structure to clear, not the size
of the pointer to it.

Submitted by: Pawel Worach

12 years agoRemove some unnecessary includes.
tijl [Sun, 18 Mar 2012 19:15:11 +0000 (19:15 +0000)]
Remove some unnecessary includes.

12 years agoCast wallclock.tv_sec to uint64_t to avoid overflow in the calculation.
jh [Sun, 18 Mar 2012 19:13:32 +0000 (19:13 +0000)]
Cast wallclock.tv_sec to uint64_t to avoid overflow in the calculation.

PR: kern/161552
Reviewed by: trasz
Tested by: Nikos Vassiliadis
MFC after: 1 week

12 years agoEliminate ia32_reg.h by moving its contents to x86 and ia64 reg.h.
tijl [Sun, 18 Mar 2012 19:12:11 +0000 (19:12 +0000)]
Eliminate ia32_reg.h by moving its contents to x86 and ia64 reg.h.

Reviewed by: kib

12 years agoCopy i386 reg.h to x86 and merge with amd64 reg.h. Replace i386/amd64/pc98
tijl [Sun, 18 Mar 2012 19:06:38 +0000 (19:06 +0000)]
Copy i386 reg.h to x86 and merge with amd64 reg.h. Replace i386/amd64/pc98
reg.h with stubs.

The tREGISTER macros are only made visible on i386. These macros are
deprecated and should not be available on amd64.

The i386 and amd64 versions of struct reg have been renamed to struct
__reg32 and struct __reg64. During compilation either __reg32 or __reg64
is defined as reg depending on the machine architecture. On amd64 the i386
struct is also available as struct reg32 which is used in COMPAT_FREEBSD32
code.

Most of compat/ia32/ia32_reg.h is now IA64 only.

Reviewed by: kib (previous version)

12 years agoUse exact width integer types in amd64/i386 reg.h to prepare for a merge.
tijl [Sun, 18 Mar 2012 18:44:42 +0000 (18:44 +0000)]
Use exact width integer types in amd64/i386 reg.h to prepare for a merge.
The only real change is replacing long with int on i386.

12 years agoStyle fix to pmap_protect().
alc [Sun, 18 Mar 2012 17:41:54 +0000 (17:41 +0000)]
Style fix to pmap_protect().

Submitted by: bde

12 years agoRepair function when used with large scales
kevlo [Sun, 18 Mar 2012 15:34:39 +0000 (15:34 +0000)]
Repair function when used with large scales

Submitted by: AIDA Shinra <shinra at j10n dot org>

12 years agoRemove acquisition of VM page queues lock from pmap_protect(). Any actual
nwhitehorn [Sun, 18 Mar 2012 13:22:42 +0000 (13:22 +0000)]
Remove acquisition of VM page queues lock from pmap_protect(). Any actual
manipulation of the pvo_vlink and pvo_olink entries is already protected
by the table lock, so most remaining instances of the acquisition of the
page queues lock can likely be replaced with the table lock, or removed
if the table lock is already held.

Reviewed by: alc

12 years agoHide kernel option ROUTETABLES evaluations in the implementation
bz [Sun, 18 Mar 2012 11:23:40 +0000 (11:23 +0000)]
Hide kernel option ROUTETABLES evaluations in the implementation
rather than the header file.  With this also move RT_MAXFIBS and
RT_NUMFIBS into the implemantion to avoid further usage in other
code. rt_numfibs is all that should be needed.

This allows users to change the number of FIBs from 1..RT_MAXFIBS(16)
dynamically using the tunable without the need to change the kernel
config for the maximum anymore.  This means that thet multi-FIB
feature is now fully available with GENERIC kernels.
The kernel option ROUTETABLES can still be used to set the default
numbers of FIBs in absence of the tunable.

Ok.ed by: julian, hrs, melifaro
MFC after: 2 weeks

12 years agoRegenerate usb.conf to use new -n option when doing kldload.
hselasky [Sun, 18 Mar 2012 09:52:54 +0000 (09:52 +0000)]
Regenerate usb.conf to use new -n option when doing kldload.

MFC after: 1 week

12 years agoUse new -n option when executing kldload, to
hselasky [Sun, 18 Mar 2012 09:47:27 +0000 (09:47 +0000)]
Use new -n option when executing kldload, to
not warn about already loaded module(s).

MFC after: 1 week

12 years agoAdd option to ignore error codes if the module specified is already loaded.
hselasky [Sun, 18 Mar 2012 09:45:43 +0000 (09:45 +0000)]
Add option to ignore error codes if the module specified is already loaded.

MFC after: 1 week

12 years agoUnbreak trhe build by including proper header
gonzo [Sun, 18 Mar 2012 08:08:06 +0000 (08:08 +0000)]
Unbreak trhe build by including proper header

12 years agoFix TLS for statically linked binaries
gonzo [Sun, 18 Mar 2012 03:42:54 +0000 (03:42 +0000)]
Fix TLS for statically linked binaries

Approved by: cognet

12 years agoDeclare some variables static in order to reduce the object size and
marius [Sun, 18 Mar 2012 02:19:30 +0000 (02:19 +0000)]
Declare some variables static in order to reduce the object size and
redo r232822 in a less hackish way. The latter now no longer breaks
compiling the x86 boot2 with clang.

MFC after: 1 week

12 years ago- Fix logic for detection if further processing of PMC should be performed.
gonzo [Sun, 18 Mar 2012 01:43:41 +0000 (01:43 +0000)]
- Fix logic for detection if further processing of PMC should be performed.
    pmc_intr returns one if one of the counters actually triggered the IRQ
- style(9) fixed

12 years agoSome software think a mutex can be destroyed after it owned it, for
davidxu [Sun, 18 Mar 2012 00:22:29 +0000 (00:22 +0000)]
Some software think a mutex can be destroyed after it owned it, for
example, it uses a serialization point like following:
pthread_mutex_lock(&mutex);
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&muetx);
They think a previous lock holder should have already left the mutex and
is no longer referencing it, so they destroy it. To be maximum compatible
with such code, we use IA64 version to unlock the mutex in kernel, remove
the two steps unlocking code.

12 years agoDo not claim that msync(2) is obsoleted [1].
kib [Sat, 17 Mar 2012 23:55:18 +0000 (23:55 +0000)]
Do not claim that msync(2) is obsoleted [1].
Document EIO from msync(2).

Inspired by PR:  docs/165929 [1]
Reviewed by:  jilles
MFC after:  2 weeks

12 years agoAdd sysctl vfs.nfs.nfs_keep_dirty_on_error to switch the nfs client
kib [Sat, 17 Mar 2012 23:03:20 +0000 (23:03 +0000)]
Add sysctl vfs.nfs.nfs_keep_dirty_on_error to switch the nfs client
behaviour on error from write RPC back to behaviour of old nfs client.
When set to not zero, the pages for which write failed are kept dirty.

PR: kern/165927
Reviewed by: alc
MFC after: 2 weeks

12 years agoIn vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag
kib [Sat, 17 Mar 2012 23:00:32 +0000 (23:00 +0000)]
In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag
if the filesystem performed short write and we are skipping the page
due to this.

Propogate write error from the pager back to the callers of
vm_pageout_flush().  Report the failure to write a page from the
requested range as the FALSE return value from vm_object_page_clean(),
and propagate it back to msync(2) to return EIO to usermode.

While there, convert the clearobjflags variable in the
vm_object_page_clean() and arguments of the helper functions to
boolean.

PR: kern/165927
Reviewed by: alc
MFC after: 2 weeks

12 years agoMake sure libgcc_s is finished building in _startup_libs before
peter [Sat, 17 Mar 2012 22:12:09 +0000 (22:12 +0000)]
Make sure libgcc_s is finished building in _startup_libs before
building libcxxrt with high -j levels.  The workaround in
libc++/Makefile isn't necessary once that race is solved.

Reviewed by: theravin

12 years agoWith the changes over the past year to how accesses to the page's dirty
alc [Sat, 17 Mar 2012 22:04:58 +0000 (22:04 +0000)]
With the changes over the past year to how accesses to the page's dirty
field are synchronized, there is no need for pmap_protect() to acquire
the page queues lock unless it is going to access the pv lists.

Reviewed by: kib

12 years agoHide a few declarations from userland (including `struct inpcbgroup'). This
rmh [Sat, 17 Mar 2012 21:51:39 +0000 (21:51 +0000)]
Hide a few declarations from userland (including `struct inpcbgroup'). This
removes the dependency on <machine/param.h> which was introduced with SVN
rev 222748 (due to CACHE_LINE_SIZE).

Reviewed by: bde
MFC after: 10 days

12 years agoThe UMS module is now loaded by rules in /etc/devd/usb.conf which
hselasky [Sat, 17 Mar 2012 16:40:15 +0000 (16:40 +0000)]
The UMS module is now loaded by rules in /etc/devd/usb.conf which
are executed by devd. Remove duplicate kldload.

Reported by: joel @
MFC after: 1 week

12 years agostyle(9) changes.
adrian [Sat, 17 Mar 2012 07:29:11 +0000 (07:29 +0000)]
style(9) changes.

12 years agoBegin fleshing out MII clock rate configuration changes.
adrian [Sat, 17 Mar 2012 07:25:23 +0000 (07:25 +0000)]
Begin fleshing out MII clock rate configuration changes.

These are needed for some particular port configurations where the default
speed isn't suitable for all link speed types. (Ie, changing 10/100/1000MBit
PLL rate requires a similar MII clock rate, rather than a fixed MII rate.)

This is:

* only currently implemented for the ar71xx;
* isn't used anywhere (yet), as the final interface for this hasn't yet
  been determined.

12 years agoSave and restore linear frame buffer between suspend and resume.
jkim [Sat, 17 Mar 2012 00:00:33 +0000 (00:00 +0000)]
Save and restore linear frame buffer between suspend and resume.

MFC after: 1 week

12 years agoRemove unnecessary static variable initializations and duplicate codes.
jkim [Fri, 16 Mar 2012 23:54:23 +0000 (23:54 +0000)]
Remove unnecessary static variable initializations and duplicate codes.
Consistently use bcopy(9) over memcpy(9).

12 years agoFix a couple of debugging outputs.
adrian [Fri, 16 Mar 2012 23:24:27 +0000 (23:24 +0000)]
Fix a couple of debugging outputs.

* printf -> device_printf
* print the buffer pointer and sequence number for any buffer that wasn't
  correctly tidied up before it was freed.  This is to aid in some
  current SMP TX debugging stalls.

PR: kern/166190

12 years agoChange the style of share/mk/bsd.sys.mk to that of the other bsd.*.mk
dim [Fri, 16 Mar 2012 23:19:45 +0000 (23:19 +0000)]
Change the style of share/mk/bsd.sys.mk to that of the other bsd.*.mk
files, and style.Makefile(5), where applicable.  While here, update the
link to the gcc warning documentation.

No functional change.

MFC after: 1 week

12 years agoAdd a dependency on ALQ if IEEE80211_ALQ and/or AH_DEBUG_ALQ is included.
adrian [Fri, 16 Mar 2012 23:12:40 +0000 (23:12 +0000)]
Add a dependency on ALQ if IEEE80211_ALQ and/or AH_DEBUG_ALQ is included.

12 years agoPull in a dependency on ALQ if it's compiled with IEEE80211_ALQ.
adrian [Fri, 16 Mar 2012 23:08:13 +0000 (23:08 +0000)]
Pull in a dependency on ALQ if it's compiled with IEEE80211_ALQ.

12 years agoRemove gratuitous DEBUG_FLAGS="-g" setting (this is already the default
rmh [Fri, 16 Mar 2012 21:46:02 +0000 (21:46 +0000)]
Remove gratuitous DEBUG_FLAGS="-g" setting (this is already the default
option with GENERIC kernels).

Reviewed by: ken

12 years agoUnhide /dev/zfs in devfsrules_jail.
mm [Fri, 16 Mar 2012 21:30:26 +0000 (21:30 +0000)]
Unhide /dev/zfs in devfsrules_jail.

The /dev/zfs device is required for managing jailed ZFS datasets.

Discussed with: pjd, jamie
MFC after: 1 week

12 years agoAdd rudimentary profiling of the hash table used in the in the umtx code to
davide [Fri, 16 Mar 2012 20:32:11 +0000 (20:32 +0000)]
Add rudimentary profiling of the hash table used in the in the umtx code to
hold active lock queues.

Reviewed by: attilio
Approved by: davidxu, gnn (mentor)
MFC after: 3 weeks

12 years agoMove userland bits of i386 npx.h and amd64 fpu.h to x86 fpu.h.
tijl [Fri, 16 Mar 2012 20:24:30 +0000 (20:24 +0000)]
Move userland bits of i386 npx.h and amd64 fpu.h to x86 fpu.h.
Remove FPU types from compat/ia32/ia32_reg.h that are no longer needed.
Create machine/npx.h on amd64 to allow compiling i386 code that uses
this header.

The original npx.h and fpu.h define struct envxmm differently. Both
definitions have been included in the new x86 header as struct __envxmm32
and struct __envxmm64. During compilation either __envxmm32 or __envxmm64
is defined as envxmm depending on machine architecture. On amd64 the i386
struct is also available as struct envxmm32.

Reviewed by: kib

12 years agoUse exact width integer types instead of long in struct env87 in
tijl [Fri, 16 Mar 2012 19:42:39 +0000 (19:42 +0000)]
Use exact width integer types instead of long in struct env87 in
preparation to merge with amd64.

Reviewed by: kib

12 years agoDo not unnecessarily clear display memory when switching modes.
jkim [Fri, 16 Mar 2012 19:22:29 +0000 (19:22 +0000)]
Do not unnecessarily clear display memory when switching modes.

MFC after: 3 days

12 years agoRemove write-only variable.
kib [Fri, 16 Mar 2012 19:09:34 +0000 (19:09 +0000)]
Remove write-only variable.

MFC after: 3 days

12 years agoFix build with INET6 disabled.
jhb [Fri, 16 Mar 2012 17:56:53 +0000 (17:56 +0000)]
Fix build with INET6 disabled.

12 years agoCreate new file header format to simplify the endian and cross platform issues.
hselasky [Fri, 16 Mar 2012 17:30:22 +0000 (17:30 +0000)]
Create new file header format to simplify the endian and cross platform issues.
This patch does not break binary compatibility with previous versions.

MFC after: 1 week

12 years agoxargs: Before exiting, wait for all invocations of the utility.
jilles [Fri, 16 Mar 2012 16:41:28 +0000 (16:41 +0000)]
xargs: Before exiting, wait for all invocations of the utility.

This only has an effect with -P, otherwise errors are only detected when the
utility is not running.

Submitted by: Matthew Story