]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoFix for quite a special case when userland emulates a netgraph node, and
glebius [Mon, 11 Mar 2013 13:05:11 +0000 (13:05 +0000)]
Fix for quite a special case when userland emulates a netgraph node, and
userland can reply to a message with NGM_HASREPLY bit set. In this case
we should not wait for a response to a responce.

PR: 176771
Submitted by: Keith Reynolds <keith.reynolds tidalscale.com>

11 years agoRemove LIBALIAS_LOCK_ASSERT(), including a couple with an uninitialzed
glebius [Mon, 11 Mar 2013 12:22:44 +0000 (12:22 +0000)]
Remove LIBALIAS_LOCK_ASSERT(), including a couple with an uninitialzed
argument, in code that isn't compiled in kernel.

PR: kern/176667
Sponsored by: Nginx, Inc.

11 years agoReinitialize eh after pfil(9) processing.
glebius [Mon, 11 Mar 2013 12:06:57 +0000 (12:06 +0000)]
Reinitialize eh after pfil(9) processing.

PR: 176764
Submitted by: adri

11 years agoReduce HPET eventtimer priority on systems with 8 or more cores. Price of
mav [Mon, 11 Mar 2013 12:02:03 +0000 (12:02 +0000)]
Reduce HPET eventtimer priority on systems with 8 or more cores.  Price of
the lock congestion may be too high there (2.5% on 4x4 core AMD Opteron).

11 years agoDon't use an empty struct.
cognet [Mon, 11 Mar 2013 10:56:46 +0000 (10:56 +0000)]
Don't use an empty struct.

11 years agoPorts are no more exported via cvsup, remove cvsup examples and documentation referin...
bapt [Mon, 11 Mar 2013 10:48:26 +0000 (10:48 +0000)]
Ports are no more exported via cvsup, remove cvsup examples and documentation refering to ports

MFC after: 2 days

11 years agoAdd a few new fields to the RX vendor radiotap header:
adrian [Mon, 11 Mar 2013 06:54:58 +0000 (06:54 +0000)]
Add a few new fields to the RX vendor radiotap header:

* a flags field that lets me know what's going on;
* the hardware ratecode, unmolested by conversion to a bitrate;
* the HAL rs_flags field, useful for debugging;
* specifically mark aggregate sub-frames.

This stuff sorely needs tidying up - it's missing some important
stuff (eg numdelims) and it would be nice to put the flags at the
beginning rather than at the end.

Tested:

* AR9380, STA mode, 2x2 HT40, monitoring RSSI and EVM values

11 years agoBump the EVM array size up to fit the AR9380 EVM entries.
adrian [Mon, 11 Mar 2013 06:01:00 +0000 (06:01 +0000)]
Bump the EVM array size up to fit the AR9380 EVM entries.

11 years agoAdd three-stream EVM values.
adrian [Mon, 11 Mar 2013 04:19:10 +0000 (04:19 +0000)]
Add three-stream EVM values.

11 years agoBring back the comment on the sizing of the callout array that got
andre [Sun, 10 Mar 2013 22:55:35 +0000 (22:55 +0000)]
Bring back the comment on the sizing of the callout array that got
lost in r248031.

Requested by: alc, alfred

11 years agoThe kernel pmap is statically allocated, so there is really no need to
alc [Sun, 10 Mar 2013 21:07:44 +0000 (21:07 +0000)]
The kernel pmap is statically allocated, so there is really no need to
explicitly initialize its pm_root field to zero.

Sponsored by: EMC / Isilon Storage Division

11 years agoCorrect a date, add an obsolete directory.
antoine [Sun, 10 Mar 2013 19:14:09 +0000 (19:14 +0000)]
Correct a date, add an obsolete directory.

11 years agoAdd 2 more obsolete files.
antoine [Sun, 10 Mar 2013 18:28:01 +0000 (18:28 +0000)]
Add 2 more obsolete files.

11 years agoAdd more obsolete files.
antoine [Sun, 10 Mar 2013 17:49:59 +0000 (17:49 +0000)]
Add more obsolete files.

11 years agoFinish portalfs removal.
antoine [Sun, 10 Mar 2013 17:33:41 +0000 (17:33 +0000)]
Finish portalfs removal.

11 years agoFix a typo in DPADD.
antoine [Sun, 10 Mar 2013 17:10:16 +0000 (17:10 +0000)]
Fix a typo in DPADD.

11 years agoAdd another register definition bit - whether to populate EVM or PLCP
adrian [Sun, 10 Mar 2013 09:43:01 +0000 (09:43 +0000)]
Add another register definition bit - whether to populate EVM or PLCP
data in the RX status descriptor.

Obtained from: Qualcomm Atheros

11 years agoAdd __aeabi_memcpy to libkern as clang may generate calls to it.
andrew [Sun, 10 Mar 2013 07:55:40 +0000 (07:55 +0000)]
Add __aeabi_memcpy to libkern as clang may generate calls to it.

11 years agoKill this, it's not needed at this point and (hopefully) the parent
adrian [Sun, 10 Mar 2013 04:38:06 +0000 (04:38 +0000)]
Kill this, it's not needed at this point and (hopefully) the parent
has correctly locked the ic/vap.

11 years ago- Clang doesn't understand the -mno-thumb-interwork. Only use it with gcc.
andrew [Sun, 10 Mar 2013 03:52:35 +0000 (03:52 +0000)]
- Clang doesn't understand the -mno-thumb-interwork. Only use it with gcc.
- We need to add "-mllvm -arm-enable-ehabi" to clangs CFLAGS when
  generating the unwind tables to tell it to add the required directives to
  the assembly it generates.

11 years agoFix a typo where db_printf was spelt printf.
andrew [Sun, 10 Mar 2013 02:44:06 +0000 (02:44 +0000)]
Fix a typo where db_printf was spelt printf.

11 years agoUpdate how we read the stack pointer to work on both GCC and clang.
andrew [Sun, 10 Mar 2013 02:40:50 +0000 (02:40 +0000)]
Update how we read the stack pointer to work on both GCC and clang.

11 years agoTell the unwinder we can't unwind swi_entry. This fixes an infinite loop
andrew [Sun, 10 Mar 2013 02:38:35 +0000 (02:38 +0000)]
Tell the unwinder we can't unwind swi_entry. This fixes an infinite loop
when the kernel attempts to unwind through this function.

The .fnstart and .fnend in this function should be moved to macros but we
are currently missing an END macro on ARM.

11 years agoCorrectly align the unwind tables. Without this clang may incorrectly align
andrew [Sun, 10 Mar 2013 00:47:19 +0000 (00:47 +0000)]
Correctly align the unwind tables. Without this clang may incorrectly align
them causing an alignment fault when producing a backtrace.

11 years agoAttach the elf section headers to the loaded kernel as metadata, so
ian [Sun, 10 Mar 2013 00:43:01 +0000 (00:43 +0000)]
Attach the elf section headers to the loaded kernel as metadata, so
they can easily be used by later post-processing.  When searching for
a compiled-in fdt blob, use the section headers to get the size and
location of the .dynsym section to do a symbol search.

This fixes a problem where the search could overshoot the symbol
table and wander into the string table.  Sometimes that was harmless
and sometimes it lead to spurious panic messages about an offset
bigger than the module size.

11 years ago__FreeBSD_ARCH_armv6__ is undefined on clang. We can use __ARM_ARCH in
andrew [Sat, 9 Mar 2013 23:55:23 +0000 (23:55 +0000)]
__FreeBSD_ARCH_armv6__ is undefined on clang. We can use __ARM_ARCH in
it's place. This makes 'uname -p' correctly output 'armv6' on a kernel
built with clang.

11 years agoSince ubldr doesn't necessarily load a kernel at the physical address in the
ian [Sat, 9 Mar 2013 23:05:19 +0000 (23:05 +0000)]
Since ubldr doesn't necessarily load a kernel at the physical address in the
elf headers, mask out the high nibble of that address.  This effectly makes
the entry point the offset from the load address, and it gets adjusted for
the actual load address before jumping to it.

Masking the high nibble makes assumptions about memory layout that are true
for all the arm platforms we support right now, but it makes me uneasy.
This needs to be revisited.

11 years agoUpdate a comment: The object lock is no longer a mutex.
alc [Sat, 9 Mar 2013 21:32:24 +0000 (21:32 +0000)]
Update a comment: The object lock is no longer a mutex.

11 years agoAdd forgotten .El
melifaro [Sat, 9 Mar 2013 20:04:47 +0000 (20:04 +0000)]
Add forgotten .El

MFC with: r248112

11 years agoFixup r248032:
davide [Sat, 9 Mar 2013 20:03:10 +0000 (20:03 +0000)]
Fixup r248032:
Change size requested to malloc(9) now that callwheel buckets are
callout_list and not callout_tailq anymore. This change was already
there but it seems it got lost after code churn in r248032.

Reported by: alc, kib

11 years agoDocument netstat -Q flags meaning.
melifaro [Sat, 9 Mar 2013 20:01:35 +0000 (20:01 +0000)]
Document netstat -Q flags meaning.

MFC after: 1 week

11 years agoCall make_dev_credf() rather than using the couple make_dev()/dev_ref().
davide [Sat, 9 Mar 2013 16:58:19 +0000 (16:58 +0000)]
Call make_dev_credf() rather than using the couple make_dev()/dev_ref().
This closes a race with clone_cleanup().

11 years agoFix another compiler warning issue when invariants are disabled.
adrian [Sat, 9 Mar 2013 15:35:31 +0000 (15:35 +0000)]
Fix another compiler warning issue when invariants are disabled.

11 years agoImprove UMTX_PROFILING:
attilio [Sat, 9 Mar 2013 15:31:19 +0000 (15:31 +0000)]
Improve UMTX_PROFILING:
- Use u_int values for length and max_length values
- Add a way to reset the max_length heuristic in order to have the
  possibility to reuse the mechanism consecutively without rebooting
  the machine
- Add a way to quick display top5 contented buckets in the system for
  the max_length value.
  This should give a quick overview on the quality of the hash table
  distribution.

Sponsored by: EMC / Isilon storage division
Reviewed by: jeff, davide

11 years agoDon't log a message when the watchdog is reloaded. It's not useful to do so
markj [Sat, 9 Mar 2013 15:04:44 +0000 (15:04 +0000)]
Don't log a message when the watchdog is reloaded. It's not useful to do so
and these messages flood the log when bootverbose is enabled.

Approved by: rstone (co-mentor)

11 years agocommit correct tested fix for gr_util.c
db [Sat, 9 Mar 2013 13:30:06 +0000 (13:30 +0000)]
commit correct tested fix for gr_util.c

Approved by: theraven

11 years agosmbfs_lookup() in the DOTDOT case operates on dvp->n_parent without
davide [Sat, 9 Mar 2013 13:25:45 +0000 (13:25 +0000)]
smbfs_lookup() in the DOTDOT case operates on dvp->n_parent without
proper locking. This doesn't prevent in any case reclaim of the vnode.
Avoid this not going over-the-wire in this case and relying on subsequent
smbfs_getattr() call to restore consistency.
While I'm here, change a couple of SMBVDEBUG() in MPASS().
sbmfs_smb_lookup() doesn't and shouldn't know about '.' and '..'

Reported by: pho's stress2 suite

11 years ago- Initialize variable in smbfs_rename() to silent compiler warning
davide [Sat, 9 Mar 2013 13:05:21 +0000 (13:05 +0000)]
- Initialize variable in smbfs_rename() to silent compiler warning
- Fix smbfs_mkdir() return value (in case of error).

Reported by: pho

11 years agoGarbage collect NWFS and NCP bits which are now completely disconnected
attilio [Sat, 9 Mar 2013 12:45:36 +0000 (12:45 +0000)]
Garbage collect NWFS and NCP bits which are now completely disconnected
from the tree since few months.

This patch is not targeted for MFC.

11 years agoCorrect the lock class for the vm object lock.
kib [Sat, 9 Mar 2013 10:16:08 +0000 (10:16 +0000)]
Correct the lock class for the vm object lock.

Reported and tested by: joel

11 years agoRework overflow checks of r247898 to not let too "intelligent" compiler to
mav [Sat, 9 Mar 2013 09:07:13 +0000 (09:07 +0000)]
Rework overflow checks of r247898 to not let too "intelligent" compiler to
optimize it out.

Submitted by: bde

11 years agoDisable the hw TID != buffer TID check.
adrian [Sat, 9 Mar 2013 08:50:17 +0000 (08:50 +0000)]
Disable the hw TID != buffer TID check.

I can 100% reliably trigger this on TID 1 traffic by using iperf -S 32
<client fields> to create traffic that maps to TID 1.

The reference driver doesn't do this check.

11 years agoPrint out the queue flags during a TX DMA shutdown.
adrian [Sat, 9 Mar 2013 06:11:58 +0000 (06:11 +0000)]
Print out the queue flags during a TX DMA shutdown.

11 years agoFix non-invariant compilation.
adrian [Sat, 9 Mar 2013 05:20:33 +0000 (05:20 +0000)]
Fix non-invariant compilation.

11 years agoSwitch the vm_object mutex to be a rwlock. This will enable in the
attilio [Sat, 9 Mar 2013 02:32:23 +0000 (02:32 +0000)]
Switch the vm_object mutex to be a rwlock.  This will enable in the
future further optimizations where the vm_object lock will be held
in read mode most of the time the page cache resident pool of pages
are accessed for reading purposes.

The change is mostly mechanical but few notes are reported:
* The KPI changes as follow:
  - VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK()
  - VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK()
  - VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK()
  - VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED()
    (in order to avoid visibility of implementation details)
  - The read-mode operations are added:
    VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(),
    VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED()
* The vm/vm_pager.h namespace pollution avoidance (forcing requiring
  sys/mutex.h in consumers directly to cater its inlining functions
  using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h
  consumers now must include also sys/rwlock.h.
* zfs requires a quite convoluted fix to include FreeBSD rwlocks into
  the compat layer because the name clash between FreeBSD and solaris
  versions must be avoided.
  At this purpose zfs redefines the vm_object locking functions
  directly, isolating the FreeBSD components in specific compat stubs.

The KPI results heavilly broken by this commit.  Thirdy part ports must
be updated accordingly (I can think off-hand of VirtualBox, for example).

Sponsored by: EMC / Isilon storage division
Reviewed by: jeff
Reviewed by: pjd (ZFS specific review)
Discussed with: alc
Tested by: pho

11 years agoMerge from vmc-playground:
attilio [Sat, 9 Mar 2013 02:05:29 +0000 (02:05 +0000)]
Merge from vmc-playground:
Introduce a new KPI that verifies if the page cache is empty for a
specified vm_object.  This KPI does not make assumptions about the
locking in order to be used also for building assertions at init and
destroy time.
It is mostly used to hide implementation details of the page cache.

Sponsored by: EMC / Isilon storage division
Reviewed by: jeff
Reviewed by: alc (vm_radix based version)
Tested by: flo, pho, jhb, davide

11 years agoAdd missing FBSDID() tag for new file.
attilio [Sat, 9 Mar 2013 01:54:26 +0000 (01:54 +0000)]
Add missing FBSDID() tag for new file.

Sponsored by: EMC / Isilon storage division

11 years agoMFC
attilio [Sat, 9 Mar 2013 01:39:42 +0000 (01:39 +0000)]
MFC

11 years agoPlaceholder for the upcoming AR9300 HAL code.
adrian [Sat, 9 Mar 2013 01:05:36 +0000 (01:05 +0000)]
Placeholder for the upcoming AR9300 HAL code.

11 years agoFix long-standing issue with interface routes being unprotected:
melifaro [Fri, 8 Mar 2013 20:33:50 +0000 (20:33 +0000)]
Fix long-standing issue with interface routes being unprotected:
Use RTM_PINNED flag to mark route as immutable.
Forbid deleting immutable routes without special rtrequest1_fib() flag.
Adding interface address with prefix already in route table is handled
by atomically deleting old prefix and adding interface one.

Discussed with: andre, eri
MFC after: 3 weeks

11 years agoBring over my initial work from the net80211 TX locking branch.
adrian [Fri, 8 Mar 2013 20:23:55 +0000 (20:23 +0000)]
Bring over my initial work from the net80211 TX locking branch.

This patchset implements a new TX lock, covering both the per-VAP (and
thus per-node) TX locking and the serialisation through to the underlying
physical device.

This implements the hard requirement that frames to the underlying physical
device are scheduled to the underlying device in the same order that they
are processed at the VAP layer.  This includes adding extra encapsulation
state (such as sequence numbers and CCMP IV numbers.)  Any order mismatch
here will result in dropped packets at the receiver.

There are multiple transmit contexts from the upper protocol layers as well
as the "raw" interface via the management and BPF transmit paths.
All of these need to be correctly serialised or bad behaviour will result
under load.

The specifics:

* add a new TX IC lock - it will eventually just be used for serialisation
  to the underlying physical device but for now it's used for both the
  VAP encapsulation/serialisation and the physical device dispatch.

  This lock is specifically non-recursive.

* Methodize the parent transmit, vap transmit and ic_raw_xmit function
  pointers; use lock assertions in the parent/vap transmit routines.

* Add a lock assertion in ieee80211_encap() - the TX lock must be held
  here to guarantee sensible behaviour.

* Refactor out the packet sending code from ieee80211_start() - now
  ieee80211_start() is just a loop over the ifnet queue and it dispatches
  each VAP packet send through ieee80211_start_pkt().

  Yes, I will likely rename ieee80211_start_pkt() to something that
  better reflects its status as a VAP packet transmit path.  More on
  that later.

* Add locking around the management and BAR TX sending - to ensure that
  encapsulation and TX are done hand-in-hand.

* Add locking in the mesh code - again, to ensure that encapsulation
  and mesh transmit are done hand-in-hand.

* Add locking around the power save queue and ageq handling, when
  dispatching to the parent interface.

* Add locking around the WDS handoff.

* Add a note in the mesh dispatch code that the TX path needs to be
  re-thought-out - right now it's doing a direct parent device transmit
  rather than going via the vap layer.  It may "work", but it's likely
  incorrect (as it bypasses any possible per-node power save and
  aggregation handling.)

Why not a per-VAP or per-node lock?

Because in order to ensure per-VAP ordering, we'd have to hold the
VAP lock across parent->if_transmit().  There are a few problems
with this:

* There's some state being setup during each driver transmit - specifically,
  the encryption encap / CCMP IV setup.  That should eventually be dragged
  back into the encapsulation phase but for now it lives in the driver TX path.
  This should be locked.

* Two drivers (ath, iwn) re-use the node->ni_txseqs array in order to
  allocate sequence numbers when doing transmit aggregation.  This should
  also be locked.

* Drivers may have multiple frames queued already - so when one calls
  if_transmit(), it may end up dispatching multiple frames for different
  VAPs/nodes, each needing a different lock when handling that particular
  end destination.

So to be "correct" locking-wise, we'd end up needing to grab a VAP or
node lock inside the driver TX path when setting up crypto / AMPDU sequence
numbers, and we may already _have_ a TX lock held - mostly for the same
destination vap/node, but sometimes it'll be for others.  That could lead
to LORs and thus deadlocks.

So for now, I'm sticking with an IC TX lock.  It has the advantage of
papering over the above and it also has the added advantage that I can
assert that it's being held when doing a parent device transmit.
I'll look at splitting the locks out a bit more later on.

General outstanding net80211 TX path issues / TODO:

* Look into separating out the VAP serialisation and the IC handoff.
  It's going to be tricky as parent->if_transmit() doesn't give me the
  opportunity to split queuing from driver dispatch.  See above.

* Work with monthadar to fix up the mesh transmit path so it doesn't go via
  the parent interface when retransmitting frames.

* Push the encryption handling back into the driver, if it's at all
  architectually sane to do so.  I know it's possible - it's what mac80211
  in Linux does.

* Make ieee80211_raw_xmit() queue a frame into VAP or parent queue rather
  than doing a short-cut direct into the driver.  There are QoS issues
  here - you do want your management frames to be encapsulated and pushed
  onto the stack sooner than the (large, bursty) amount of data frames
  that are queued.  But there has to be a saner way to do this.

* Fragments are still broken - drivers need to be upgraded to an if_transmit()
  implementation and then fragmentation handling needs to be properly fixed.

Tested:

* STA - AR5416, AR9280, Intel 5300 abgn wifi
* Hostap - AR5416, AR9160, AR9280
* Mesh - some testing by monthadar@, more to come.

11 years agoAdd legacy support to geom raid to create a /dev/arX device for support
sbruno [Fri, 8 Mar 2013 20:07:32 +0000 (20:07 +0000)]
Add legacy support to geom raid to create a /dev/arX device for support
of upgrading older machines using ataraid(4) to newer releases.

This optional parameter is controlled via kern.geom.raid.legacy_aliases
and will create a /dev/ar0 device that will point at /dev/raid/r0 for
example.

Tested on Dell SC 1425 DDF-1 format software raid controllers installing from
stable/7 and upgrading to stable/9 without having to adjust /etc/fstab

Reviewed by: mav
Obtained from: Yahoo!
MFC after: 2 Weeks

11 years agoImport Linux commit a1b7736dac5f2d5876e68c47a0fce3f423840070
dumbbell [Fri, 8 Mar 2013 18:15:07 +0000 (18:15 +0000)]
Import Linux commit a1b7736dac5f2d5876e68c47a0fce3f423840070
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Wed Feb 1 11:38:22 2012 +0100

    drm drm_fb_helper: destroy modes

    drm_setup_crtcs allocated modes using drm_mode_duplicate. Free
    them in drm_fb_helper_crtc_free.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Discussed with: Konstantin Belousov (kib@)

11 years agodrm: Fix a call to free(9) with an incorrect malloc type
dumbbell [Fri, 8 Mar 2013 18:11:02 +0000 (18:11 +0000)]
drm: Fix a call to free(9) with an incorrect malloc type

While here, the call to free(9) is moved to drm_global.c, near the
initial malloc(9).

Reviewed by: Konstantin Belousov (kib@)

11 years agoEliminate excessive $FreeBSD$ headers.
delphij [Fri, 8 Mar 2013 18:08:12 +0000 (18:08 +0000)]
Eliminate excessive $FreeBSD$ headers.

Noticed by: jmallett

11 years agog_label_ntfs_taste: Abort taste is recsize == 0
dumbbell [Fri, 8 Mar 2013 18:07:43 +0000 (18:07 +0000)]
g_label_ntfs_taste: Abort taste is recsize == 0

This will avoid a 0-byte read (in g_read_data()) leading to a panic, if
previously read data are erroneous.

Suggested by: John-Mark Gurney <jmg@funkthat.com>

11 years agoMerge r247814 from x86 modulo whitespace bug:
marius [Fri, 8 Mar 2013 13:11:45 +0000 (13:11 +0000)]
Merge r247814 from x86 modulo whitespace bug:

Turn on the CTL disable tunable by default.

This will allow GENERIC configurations to boot on small memory boxes, but
not require end users who want to use CTL to recompile their kernel.  They
can simply set kern.cam.ctl.disable=0 in loader.conf.

11 years agoFix bootstrapping pkgng by not appending "/latest/" to PACKAGESITE.
bapt [Fri, 8 Mar 2013 10:43:03 +0000 (10:43 +0000)]
Fix bootstrapping pkgng by not appending "/latest/" to PACKAGESITE.

Reporter by : Alexander Yerenkow (via irc)

11 years agoMove the callout subsystem initialization to its own SYSINIT()
andre [Fri, 8 Mar 2013 10:37:17 +0000 (10:37 +0000)]
Move the callout subsystem initialization to its own SYSINIT()
from being indirectly called via cpu_startup()+vm_ksubmap_init().
The boot order position remains the same at SI_SUB_CPU.

Allocation of the callout array is changed to stardard kernel malloc
from a slightly obscure direct kernel_map allocation.

kern_timeout_callwheel_alloc() is renamed to callout_callwheel_init()
to better describe its purpose.
kern_timeout_callwheel_init() is removed simplifying the per-cpu
initialization.

Reviewed by: davide

11 years agoMove the auto-sizing of the callout array from init_param2() to
andre [Fri, 8 Mar 2013 10:14:58 +0000 (10:14 +0000)]
Move the auto-sizing of the callout array from init_param2() to
kern_timeout_callwheel_alloc() where it is actually used.

This is a mechanical move and no tuning parameters are changed.

The pre-allocated callout array is only used for legacy timeout(9)
calls and is only allocated and active on cpu0.  Eventually all
remaining users of timeout(9) should switch to the callout_* API.

Reviewed by: davide

11 years agoThis file is specific to arm11x6 processors, so tell the
kientzle [Fri, 8 Mar 2013 03:29:05 +0000 (03:29 +0000)]
This file is specific to arm11x6 processors, so tell the
assembler it's okay to use arm11x6 instructions.

11 years agoMFC
attilio [Fri, 8 Mar 2013 00:03:07 +0000 (00:03 +0000)]
MFC

11 years agoAdd arm bits to truss.
cognet [Thu, 7 Mar 2013 23:44:35 +0000 (23:44 +0000)]
Add arm bits to truss.

11 years agoFix GCC build:
obrien [Thu, 7 Mar 2013 22:54:28 +0000 (22:54 +0000)]
Fix GCC build:
/usr/src/sys/modules/nvme/../../dev/nvme/nvme.c:211: warning: format '%qx' expects type 'long unsigned int', but argument 9 has type 'long long unsigned int' [-Wformat]

11 years agoFix error in r247960: actually assign the basename to match.iim_file.
dim [Thu, 7 Mar 2013 22:43:50 +0000 (22:43 +0000)]
Fix error in r247960: actually assign the basename to match.iim_file.

Pointed out by: avg
Pointy hat to: dim
MFC after: 1 week
X-MFC-With: r247960

11 years agoSupport the FAT16 partition type in gpart(8)
gavin [Thu, 7 Mar 2013 22:32:41 +0000 (22:32 +0000)]
Support the FAT16 partition type in gpart(8)

PR: kern/174714
Submitted by: 4721 at hushmail dot com
MFC after: 1 week

11 years agoMake ctfconvert work correctly on clang-compiled object files. Clang
dim [Thu, 7 Mar 2013 22:16:35 +0000 (22:16 +0000)]
Make ctfconvert work correctly on clang-compiled object files.  Clang
puts the full original source filename in the STT_FILE entry of the ELF
symbol table, while gcc saves only the basename.

Since the DWARF DW_AT_name attribute contains the full source filename,
both for clang and gcc, ctfconvert takes just the basename of it, for
matching with the STT_FILE entry.  So when attempting to match with such
an entry, use its basename, if necessary.

Reported by: avg
MFC after: 1 week

11 years agoMake c99(1) invoke /usr/bin/cc with argv[0] set to "/usr/bin/cc" instead
dim [Thu, 7 Mar 2013 21:37:23 +0000 (21:37 +0000)]
Make c99(1) invoke /usr/bin/cc with argv[0] set to "/usr/bin/cc" instead
of just "cc", since there is no reason to cause additional path searches
in this case.

MFC after: 3 days

11 years agoMake c89(1) invoke /usr/bin/cc with argv[0] also set to /usr/bin/cc,
dim [Thu, 7 Mar 2013 21:34:16 +0000 (21:34 +0000)]
Make c89(1) invoke /usr/bin/cc with argv[0] also set to /usr/bin/cc,
similar to what c99(1) does, to prevent "c89: illegal option -- 1"
messages, when clang is /usr/bin/cc.

Reported by: tijl
MFC after: 3 days

11 years agoNow that stable/7 is EOL, stop building INDEX-7.
cperciva [Thu, 7 Mar 2013 20:48:36 +0000 (20:48 +0000)]
Now that stable/7 is EOL, stop building INDEX-7.

MFC after: 1 week

11 years agoCleanup gr_add() so it does not leak mem
db [Thu, 7 Mar 2013 19:00:00 +0000 (19:00 +0000)]
Cleanup gr_add() so it does not leak mem
This is part of ongoing work on sbin/pw

M    libutil.h
M    gr_util.c

Approved by: theraven

11 years agoFix panic when Secondary_Element_Count == 1 and Secondary_Element_Seq
mav [Thu, 7 Mar 2013 18:55:37 +0000 (18:55 +0000)]
Fix panic when Secondary_Element_Count == 1 and Secondary_Element_Seq
is not set (255).

Reported by: sbruno
MFC after: 1 week

11 years agoFix off-by-one error in nanoseconds validation.
mav [Thu, 7 Mar 2013 16:50:07 +0000 (16:50 +0000)]
Fix off-by-one error in nanoseconds validation.

Submitted by: bde

11 years agoPartially revert r247892 and r247904 since our strnvis() does not
des [Thu, 7 Mar 2013 14:38:43 +0000 (14:38 +0000)]
Partially revert r247892 and r247904 since our strnvis() does not
behave the way OpenSSH expects.

11 years agoThe ZyXEL ZyAIR G-202 is also supported by zyd(4)
gavin [Thu, 7 Mar 2013 13:26:54 +0000 (13:26 +0000)]
The ZyXEL ZyAIR G-202 is also supported by zyd(4)

MFC after: 1 week

11 years agoCorrect two spelling mistakes in a comment.
gavin [Thu, 7 Mar 2013 13:24:49 +0000 (13:24 +0000)]
Correct two spelling mistakes in a comment.

11 years agoSuggest using the https: protocol not the svn: protocol to retrieve the
gavin [Thu, 7 Mar 2013 13:24:16 +0000 (13:24 +0000)]
Suggest using the https: protocol not the svn: protocol to retrieve the
various repositories.

11 years agoAdd __clzsi2 and ctzsi2. They are required on ARMv4 and ARMv5 to implement
andrew [Thu, 7 Mar 2013 09:18:52 +0000 (09:18 +0000)]
Add __clzsi2 and ctzsi2. They are required on ARMv4 and ARMv5 to implement
a number of builtin functions.

11 years agoAdd quirks to enable headphones redirection on number of Lenovo
glebius [Thu, 7 Mar 2013 08:00:04 +0000 (08:00 +0000)]
Add quirks to enable headphones redirection on number of Lenovo
laptops, namely X1, X1 Carbon, T420, T520.

PR: misc/176656
Submitted by: Hiren Panchasar <hiren.panchasara gmail.com>
Tested by: glebius, X1 Carbon
Tested by: osa, X1
Tested by: Hiren Panchasar, T420
Tested by: sbruno, T520
Reviewed by: mav
Sponsored by: Nginx, Inc.

11 years agoPlug a memory leak.
glebius [Thu, 7 Mar 2013 07:54:50 +0000 (07:54 +0000)]
Plug a memory leak.

Reviewed by: mav
Sponsored by: Nginx, Inc.

11 years agoThe hashmask returned by hashinit() is a valid index in the returned hash array.
lstewart [Thu, 7 Mar 2013 04:42:20 +0000 (04:42 +0000)]
The hashmask returned by hashinit() is a valid index in the returned hash array.
Fix a siftr(4) potential memory leak and INVARIANTS triggered kernel panic in
hashdestroy() by ensuring the last array index in the flow counter hash table is
flushed of entries.

MFC after: 3 days

11 years agoCall sched_prio() to immediately change the priority of the thread in
ian [Thu, 7 Mar 2013 02:53:29 +0000 (02:53 +0000)]
Call sched_prio() to immediately change the priority of the thread in
response to an rtprio_thread() call, when the priority is different
than the old priority, and either the old or the new priority class is
not RTP_PRIO_NORMAL (timeshare).

The reasoning for the second half of the test is that if it's a change in
timeshare priority, then the scheduler is going to adjust that priority
in a way that completely wipes out the requested change anyway, so
what's the point?  (If that's not true, then allowing a thread to change
its own timeshare priority would subvert the scheduler's adjustments and
let a cpu-bound thread monopolize the cpu; if allowed at all, that
should require priveleges.)

On the other hand, if either the old or new priority class is not
timeshare, then the scheduler doesn't make automatic adjustments, so we
should honor the request and make the priority change right away.  The
reason the old class gets caught up in this is the very reason for this
change:  when thread A changes the priority of its child thread B from
idle back to timeshare, thread B never actually gets moved to a
timeshare-range run queue unless there are some idle cycles available
to allow it to first get scheduled again as an idle thread.

Reviewed by: jhb@

11 years agoRemove strnvis(), strvis(), strvisx().
des [Wed, 6 Mar 2013 23:22:40 +0000 (23:22 +0000)]
Remove strnvis(), strvis(), strvisx().

11 years agoReduce minimal time intervals of setitimer(2) from 1/HZ to 1/(16*HZ) by
mav [Wed, 6 Mar 2013 22:40:47 +0000 (22:40 +0000)]
Reduce minimal time intervals of setitimer(2) from 1/HZ to 1/(16*HZ) by
using callout_reset_sbt() instead of callout_reset().  We can't remove
lower limit completely in this case because of significant processing
overhead, caused by unability to use direct callout execution due to using
process mutex in callout handler for sending SEGALRM signal.  With support
of periodic events that would allow unprivileged user to abuse the system.

Reviewed by: davide

11 years agoCreate a symlink from strchrnul.3 to strchr.3.
zeising [Wed, 6 Mar 2013 19:59:42 +0000 (19:59 +0000)]
Create a symlink from strchrnul.3 to strchr.3.
This was forgotten in the initial commit of strchrnul()

Approved by: theraven

11 years agoFix time math overflows and improve zero intervals handling in poll(),
mav [Wed, 6 Mar 2013 19:37:38 +0000 (19:37 +0000)]
Fix time math overflows and improve zero intervals handling in poll(),
select(), nanosleep() and kevent() functions after calloutng changes.

Reported by: bde

11 years agoForced commit to note that this file had not been regenerated since 5.8
des [Wed, 6 Mar 2013 13:48:49 +0000 (13:48 +0000)]
Forced commit to note that this file had not been regenerated since 5.8
due to issues with the configure script incorrectly detecting utmp and
lastlog despite the fact that FreeBSD 10 does not have them any more.

11 years agoExplicitly disable lastlog, utmp and wtmp.
des [Wed, 6 Mar 2013 13:46:20 +0000 (13:46 +0000)]
Explicitly disable lastlog, utmp and wtmp.

11 years agoFix 'make depend'
uqs [Wed, 6 Mar 2013 11:44:19 +0000 (11:44 +0000)]
Fix 'make depend'

11 years agoUpdate driver to version 4.6.95.0.
delphij [Wed, 6 Mar 2013 09:53:38 +0000 (09:53 +0000)]
Update driver to version 4.6.95.0.

Submitted by: "Duvvuru,Venkat Kumar" <VenkatKumar.Duvvuru Emulex.Com>
MFC after: 3 days

11 years agoSimplify virtio ring num-available calculation.
grehan [Wed, 6 Mar 2013 07:28:20 +0000 (07:28 +0000)]
Simplify virtio ring num-available calculation.

Submitted by: Chris Torek, torek at torek dot net

11 years agoRemove the virtio dependency entry for the VirtIO device drivers. This
bryanv [Wed, 6 Mar 2013 07:17:53 +0000 (07:17 +0000)]
Remove the virtio dependency entry for the VirtIO device drivers. This
will prevent the kernel from linking if the device driver are included
without the virtio module. Remove pci and scbus for the same reason.

Also explain the relationship and necessity of the virtio and virtio_pci
modules. Currently in FreeBSD, we only support VirtIO PCI, but it could
be replaced with a different interface (like MMIO) and the device
(network, block, etc) will still function.

Requested by: luigi
Approved by: grehan (mentor)
MFC after: 3 days

11 years agoReorder code to avoid the stat buffer being used uninitialized.
grehan [Wed, 6 Mar 2013 06:24:09 +0000 (06:24 +0000)]
Reorder code to avoid the stat buffer being used uninitialized.

Obtained from: NetApp

11 years agoFix stack alignment in the kernel to be on an 8 byte boundary as required
andrew [Wed, 6 Mar 2013 06:19:56 +0000 (06:19 +0000)]
Fix stack alignment in the kernel to be on an 8 byte boundary as required
by AAPCS.

11 years agoFix SIGSEGV when set_short_delay() is called when ifi->ifi_ra_timer is NULL.
hrs [Wed, 6 Mar 2013 04:58:48 +0000 (04:58 +0000)]
Fix SIGSEGV when set_short_delay() is called when ifi->ifi_ra_timer is NULL.
This can happen in a short period when a prefix is changed by a rtmsg and a
new interface arrives.

11 years agoUse build_iovec() to make it less cryptic. This also fixes warnings.
jkim [Wed, 6 Mar 2013 00:36:33 +0000 (00:36 +0000)]
Use build_iovec() to make it less cryptic.  This also fixes warnings.

11 years agoGC unused mount_* directories. mount_reiserfs was disconnected from build
jkim [Tue, 5 Mar 2013 23:53:37 +0000 (23:53 +0000)]
GC unused mount_* directories.  mount_reiserfs was disconnected from build
with r158666.  mount_ext2fs and mount_std were disconnected with r164527.

11 years agoUpdate the manual page to reflect reality. With r138509 and r152355,
jkim [Tue, 5 Mar 2013 23:05:43 +0000 (23:05 +0000)]
Update the manual page to reflect reality.  With r138509 and r152355,
"nostrictjoliet" option for mount_cd9660(8) was completely replaced with
"brokenjoliet" somehow.

MFC after: 3 days

11 years agoGC unused variables. Prefer NULL over 0 for pointers.
jkim [Tue, 5 Mar 2013 22:41:35 +0000 (22:41 +0000)]
GC unused variables.  Prefer NULL over 0 for pointers.

11 years ago- Reset DMA channel if error occured
gonzo [Tue, 5 Mar 2013 20:00:11 +0000 (20:00 +0000)]
- Reset DMA channel if error occured
- Initialize info field in bcm_dma_reset

Submitted by: Daisuke Aoyama <aoyama@peach.ne.jp>