]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoHandle pmap_enter() on already promoted mappings for ARMv6/v7
zbb [Sat, 15 Feb 2014 13:27:45 +0000 (13:27 +0000)]
Handle pmap_enter() on already promoted mappings for ARMv6/v7

Attempt to demote the superpage if trying to pmap_enter() on
one. Panic only when the particular superpage should
no longer exist for that pmap and address.

10 years agoRemove spurious assertion from pmap_extract_locked() on ARM
zbb [Sat, 15 Feb 2014 13:24:58 +0000 (13:24 +0000)]
Remove spurious assertion from pmap_extract_locked() on ARM

The condition under assertion is no longer valid since
superpages support is operating on section mappings.

10 years agoAvoid redundant superpage promotion attempts on ARM
zbb [Sat, 15 Feb 2014 13:22:37 +0000 (13:22 +0000)]
Avoid redundant superpage promotion attempts on ARM

Because pmap_enter_locked() is called from few different functions
some redundancy in superpage promotion attempts can be observed.
Hence, avoid promotion in pmap_enter_object() (if the object can
be mapped by superpage it will be handled by pmap_enter_object()
itself) and also do not waste time in pmap_enter_quick().
From now on the promotion will be performed only in pmap_enter().

10 years agoFix superpage promotion on ARM with respect to RO/RW and wired attributes
zbb [Sat, 15 Feb 2014 13:20:17 +0000 (13:20 +0000)]
Fix superpage promotion on ARM with respect to RO/RW and wired attributes

It was possible to create RW superpage mapping even if
the base pages were RO due to wrong setting of the prot
flag passed to pmap_map_section().
Promotion attempt should be canceled in case of attributes
mismatch between any two base pages. Since we still use
pv_flags to maintain permission to write (PVF_WRITE) and
wired status (PVF_WIRED) for a page, it is also necessary
to take those variables into account.

10 years agoEnsure proper TLB invalidation on superpage promotion and demotion on ARM
zbb [Sat, 15 Feb 2014 13:17:51 +0000 (13:17 +0000)]
Ensure proper TLB invalidation on superpage promotion and demotion on ARM

Base pages within newly created superpage need to be invalidated so that
new mapping is "visible" immediately after creation.

10 years agoAlways clear L1 PTE descriptor when removing superpage on ARM
zbb [Sat, 15 Feb 2014 13:13:00 +0000 (13:13 +0000)]
Always clear L1 PTE descriptor when removing superpage on ARM

Invalidate L1 PTE regardles of existance of the corresponding
l2_bucket. This is relevant when superpage is entered via
pmap_enter_object() and will fix crash on entering page
in place of not properly removed superpage.

10 years agoIn sys/dev/xen/console/console.c, #if 0 an unused static function.
dim [Sat, 15 Feb 2014 12:37:26 +0000 (12:37 +0000)]
In sys/dev/xen/console/console.c, #if 0 an unused static function.

MFC after: 3 days

10 years agoUnder sys/netpfil/ipfw, surround two IPv6-specific static functions with
dim [Sat, 15 Feb 2014 12:25:01 +0000 (12:25 +0000)]
Under sys/netpfil/ipfw, surround two IPv6-specific static functions with
#ifdef INET6, since they are unused when INET6 is disabled.

MFC after: 3 days

10 years agoIn sys/fs/nandfs/nandfs_vfsops.c, #if 0 an unused static function.
dim [Sat, 15 Feb 2014 11:42:56 +0000 (11:42 +0000)]
In sys/fs/nandfs/nandfs_vfsops.c, #if 0 an unused static function.

MFC after: 3 days

10 years agoSwitch the hardcoded default hash function from MD5 / DES to SHA512.
des [Sat, 15 Feb 2014 10:53:44 +0000 (10:53 +0000)]
Switch the hardcoded default hash function from MD5 / DES to SHA512.

10 years agocomplete svn 261909 - new netmap version.
luigi [Sat, 15 Feb 2014 08:23:31 +0000 (08:23 +0000)]
complete svn 261909 - new netmap version.
since i updated the manpage i might as well commit it.

MFC after: 3 days

10 years agoMake sure that the flowtable flowid is only set to m_flowid if there
adrian [Sat, 15 Feb 2014 07:57:01 +0000 (07:57 +0000)]
Make sure that the flowtable flowid is only set to m_flowid if there
isn't one already supplied.

The previous flowtable code also did this.

Reviewed by: glebius
Sponsored by: Netflix, Inc.

10 years agodocument _JAIL as a possible option to set a cpuset for a jail..
jmg [Sat, 15 Feb 2014 07:01:45 +0000 (07:01 +0000)]
document _JAIL as a possible option to set a cpuset for a jail..

MFC after: 3 days

10 years agoThis new version of netmap brings you the following:
luigi [Sat, 15 Feb 2014 04:53:04 +0000 (04:53 +0000)]
This new version of netmap brings you the following:

- netmap pipes, providing bidirectional blocking I/O while moving
  100+ Mpps between processes using shared memory channels
  (no mistake: over one hundred million. But mind you, i said
  *moving* not *processing*);

- kqueue support (BHyVe needs it);

- improved user library. Just the interface name lets you select a NIC,
  host port, VALE switch port, netmap pipe, and individual queues.
  The upcoming netmap-enabled libpcap will use this feature.

- optional extra buffers associated to netmap ports, for applications
  that need to buffer data yet don't want to make copies.

- segmentation offloading for the VALE switch, useful between VMs.

and a number of bug fixes and performance improvements.

My colleagues Giuseppe Lettieri and Vincenzo Maffione did a substantial
amount of work on these features so we owe them a big thanks.

There are some external repositories that can be of interest:

    https://code.google.com/p/netmap
        our public repository for netmap/VALE code, including
        linux versions and other stuff that does not belong here,
        such as python bindings.

    https://code.google.com/p/netmap-libpcap
        a clone of the libpcap repository with netmap support.
With this any libpcap client has access to most netmap
feature with no recompilation. E.g. tcpdump can filter
packets at 10-15 Mpps.

    https://code.google.com/p/netmap-ipfw
        a userspace version of ipfw+dummynet which uses netmap
        to send/receive packets. Speed is up in the 7-10 Mpps
        range per core for simple rulesets.

Both netmap-libpcap and netmap-ipfw will be merged upstream at some
point, but while this happens it is useful to have access to them.

And yes, this code will be merged soon. It is infinitely better
than the version currently in 10 and 9.

MFC after: 3 days

10 years agoFix a typo, C_ALSOLUTE -> C_ABSOLUTE.
ian [Sat, 15 Feb 2014 02:30:34 +0000 (02:30 +0000)]
Fix a typo, C_ALSOLUTE -> C_ABSOLUTE.

10 years agoIn cxgbe, conditionalize the t4_pgprot_wc() function, since it is only
dim [Fri, 14 Feb 2014 23:38:42 +0000 (23:38 +0000)]
In cxgbe, conditionalize the t4_pgprot_wc() function, since it is only
used when DOT5 is defined.

Reviewed by: np
MFC after: 3 days

10 years agoInclude the CPU id in the per-CPU timer swi thread descriptions.
adrian [Fri, 14 Feb 2014 23:19:51 +0000 (23:19 +0000)]
Include the CPU id in the per-CPU timer swi thread descriptions.

Original patch by: jhb

10 years agoUpdate bhyve(8) man page to describe the usage of the "-s" option to assign
neel [Fri, 14 Feb 2014 21:46:04 +0000 (21:46 +0000)]
Update bhyve(8) man page to describe the usage of the "-s" option to assign
bus numbers to emulated devices. Also add the restriction that the LPC bridge
emulation can only be configured on bus 0.

Reviewed by: grehan@

10 years agoAllow PCI devices to be configured on all valid bus numbers from 0 to 255.
neel [Fri, 14 Feb 2014 21:34:08 +0000 (21:34 +0000)]
Allow PCI devices to be configured on all valid bus numbers from 0 to 255.

This is done by representing each bus as root PCI device in ACPI. The device
implements the _BBN method to return the PCI bus number to the guest OS.

Each PCI bus keeps track of the resources that is decodes for devices
configured on the bus: i/o, mmio (32-bit) and mmio (64-bit). These windows
are advertised to the guest via the _CRS object of the root device.

Bus 0 is treated specially since it consumes the I/O ports to access the
PCI config space [0xcf8-0xcff]. It also decodes the legacy I/O ports that
are consumed by devices on the LPC bus. For this reason the LPC bridge can
be configured only on bus 0.

The bus number can be specified using the following command line option
to bhyve(8): "-s <bus>:<slot>:<func>,<emul>[,<config>]"

Discussed with: grehan@
Reviewed by: jhb@

10 years agoDisable warning about unused static const variables for sys/pci/ncr.c.
dim [Fri, 14 Feb 2014 21:20:16 +0000 (21:20 +0000)]
Disable warning about unused static const variables for sys/pci/ncr.c.

MFC after: 3 days

10 years agoIn r260111, in sys/conf/files, I disabled warning about unused functions
dim [Fri, 14 Feb 2014 21:06:12 +0000 (21:06 +0000)]
In r260111, in sys/conf/files, I disabled warning about unused functions
for the wrong mcg.c, the one in ofed/drivers/infiniband/hw/mlx4.
Disable the warning for ofed/drivers/net/mlx4/mcg.c instead.

MFC after: 3 days

10 years agoPreserve one character space for a trailing '\0'.
pluknet [Fri, 14 Feb 2014 20:54:03 +0000 (20:54 +0000)]
Preserve one character space for a trailing '\0'.

Found by: Ivan Klymenko via cppcheck
Discussed with: ae
MFC after: 1 week

10 years agoIn chat_UpdateSet(), initialize the input buffer to prevent stale data
brueffer [Fri, 14 Feb 2014 20:34:24 +0000 (20:34 +0000)]
In chat_UpdateSet(), initialize the input buffer to prevent stale data
from previous timed out commands.

PR: 186530
Submitted by: Alexander Zagrebin <alexz at visp.ru>
Reviewed by: brian
MFC after: 1 week

10 years agoSimilar to r260026, disable warning about unused functions for
dim [Fri, 14 Feb 2014 20:11:06 +0000 (20:11 +0000)]
Similar to r260026, disable warning about unused functions for
ieee80211_adhoc.c, ieee80211_hostap.c and ieee80211_sta.c.

MFC after: 3 days

10 years agoFix build on 32bit arches broken by me in r261882.
glebius [Fri, 14 Feb 2014 19:43:00 +0000 (19:43 +0000)]
Fix build on 32bit arches broken by me in r261882.

10 years agoMFV: Import atf-0.20.
jmmv [Fri, 14 Feb 2014 19:33:16 +0000 (19:33 +0000)]
MFV: Import atf-0.20.

10 years agoAfter r251709, avoid a clang 3.4 warning about an unused static const
dim [Fri, 14 Feb 2014 17:47:18 +0000 (17:47 +0000)]
After r251709, avoid a clang 3.4 warning about an unused static const
variable (uma_max_ipers), when asserts are disabled.

Reviewed by: glebius
MFC after: 3 days

10 years agoRemove mention of minimum password length and upper/lower case checking,
wblock [Fri, 14 Feb 2014 15:46:06 +0000 (15:46 +0000)]
Remove mention of minimum password length and upper/lower case checking,
patch supplied by Allan Jude <freebsd@allanjude.com>.  Add xref to
pam_passwdqc(8), where that testing is now done.

PR: docs/184482
Submitted by: Ryan Gerstenkorn <ryan_gerstenkorn@fastmail.fm>
Reviewed by: jilles, eadler
MFC after: 3 days

10 years agomove devd rules for zfs events into a separate file and fix stale event types
avg [Fri, 14 Feb 2014 15:31:48 +0000 (15:31 +0000)]
move devd rules for zfs events into a separate file and fix stale event types

Also, extend with some new events.
Additionally, tag syslog messages with 'ZFS' instead of using explicit "ZFS: "
prefix in the messages themselves.

Tested by: Daniel O'Connor <doconnor@gsoft.com.au>
MFC after: 8 days
Sponsored by: HybridCluster

10 years agozfs.8: fix garbled options in a sample zfs send -R command line
avg [Fri, 14 Feb 2014 15:21:21 +0000 (15:21 +0000)]
zfs.8: fix garbled options in a sample zfs send -R command line

MFC after: 5 days

10 years agozpool.8: fix typo in option description of labelclear command
avg [Fri, 14 Feb 2014 15:20:49 +0000 (15:20 +0000)]
zpool.8: fix typo in option description of labelclear command

MFC after: 5 days

10 years agoprovide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64
avg [Fri, 14 Feb 2014 15:18:37 +0000 (15:18 +0000)]
provide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64

Reviewed by: jhb
MFC after: 10 days
X-MFC note: consider thirdparty modules depending on these symbols
Sponsored by: HybridCluster

10 years agoupdate taskqueue(9) manual page
avg [Fri, 14 Feb 2014 15:03:55 +0000 (15:03 +0000)]
update taskqueue(9) manual page

Many thanks to bjk, gjb and pluknet for improvements and suggestions.

MFC after: 5 days
Sponsored by: HybridCluster

10 years agoImport atf-0.20:
jmmv [Fri, 14 Feb 2014 14:44:03 +0000 (14:44 +0000)]
Import atf-0.20:

Experimental version released on February 7th, 2014.

This is the first release without the code for the deprecated tools.  If
you require such code, please fetch a copy of the 0.19 release and extract
the 'tools' directory for your own consumption.

* Removed the deprecated tools.  This includes atf-config, atf-report,
  atf-run and atf-version.

10 years agoImport atf-0.19:
jmmv [Fri, 14 Feb 2014 14:41:25 +0000 (14:41 +0000)]
Import atf-0.19:

Experimental version released on February 7th, 2014.

This is the last release to bundle the code for the deprecated tools.
The next release will drop their code and will stop worrying about
backwards compatibility between the ATF libraries and what the old tools
may or may not support.

If you still require the old tools for some reason, grab a copy of the
'tools' directory now.  The code in this directory is standalone and
does not depend on any internal details of atf-c++ any longer.

* Various fixes and improvements to support running as part of the FreeBSD
  test suite.

* Project hosting moved from Google Code (as a subproject of Kyua) to
  GitHub (as a first-class project).  The main reason for the change is
  the suppression of binary downloads in Google Code on Jan 15th, 2014.
  See https://github.com/jmmv/atf/

* Removed builtin help from atf-sh(1) and atf-check(1) for simplicity
  reasons.  In other words, their -h option is gone.

* Moved the code of the deprecated tools into a 'tools' directory and
  completely decoupled their code from the internals of atf-c++.  The
  reason for this is to painlessly allow a third-party to maintain a
  copy of these tools after we delete them because upcoming changes to
  atf-c++ would break the stale tools.

10 years agoIn sgetpwnam(), save and free pw_class like all other char members
brueffer [Fri, 14 Feb 2014 12:01:52 +0000 (12:01 +0000)]
In sgetpwnam(), save and free pw_class like all other char members
of struct passwd.  This fixes spurious "login_getclass: unknown class"
errors.

PR: 186439
Submitted by: UEMURA Tetsuya <t_uemura at macome.co.jp>
MFC after: 1 week

10 years agoCorrect the order of arguments to mtx_init().
brueffer [Fri, 14 Feb 2014 11:18:15 +0000 (11:18 +0000)]
Correct the order of arguments to mtx_init().

PR: 186701
Submitted by: Takanori Sawada <tak.swd at gmail.com>
MFC after: 2 weeks

10 years agoWhenever flowtable lookup fails, we do route lookup and then try to
glebius [Fri, 14 Feb 2014 10:56:26 +0000 (10:56 +0000)]
Whenever flowtable lookup fails, we do route lookup and then try to
insert flow entry. During the route lookup the critical section is
exited. It may happen, that after route lookup we will be executed
on an other CPU that already has such flowentry. Before this change
we simply freed the flowentry and returned to ip_output() with
failure.

Actually there is nothing wrong with using previously allocated
flow entry, updating it properly. Thus, make flowentry_insert()
return the new either old fle, and make use of it.

Count reuses as "collisions" and real inserts as "inserts".

Reviewed by: adrian
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoOnce pf became not covered by a single mutex, many counters in it became
glebius [Fri, 14 Feb 2014 10:05:21 +0000 (10:05 +0000)]
Once pf became not covered by a single mutex, many counters in it became
race prone. Some just gather statistics, but some are later used in
different calculations.

A real problem was the race provoked underflow of the states_cur counter
on a rule. Once it goes below zero, it wraps to UINT32_MAX. Later this
value is used in pf_state_expires() and any state created by this rule
is immediately expired.

Thus, make fields states_cur, states_tot and src_nodes of struct
pf_rule be counter(9)s.

Thanks to Dennis for providing me shell access to problematic box and
his help with reproducing, debugging and investigating the problem.

Thanks to: Dennis Yusupoff <dyr smartspb.net>
Also reported by: dumbbell, pgj, Rambler
Sponsored by: Nginx, Inc.

10 years agoBump __FreeBSD_version after the libc++ 3.4 ABI compatibility fix in
dim [Fri, 14 Feb 2014 08:42:39 +0000 (08:42 +0000)]
Bump __FreeBSD_version after the libc++ 3.4 ABI compatibility fix in
r261801.

Requested by: portmgr

10 years agoReword.
adrian [Fri, 14 Feb 2014 07:43:39 +0000 (07:43 +0000)]
Reword.

Suggestion: glebius

10 years agoFix minor logical error in the XHCI driver. Set correct SETUP packet
hselasky [Fri, 14 Feb 2014 07:17:36 +0000 (07:17 +0000)]
Fix minor logical error in the XHCI driver. Set correct SETUP packet
direction value.

MFC after: 2 days
Reported by: Horse Ma <HMa@wyse.com>

10 years agoEnable use of the PCIe connected wifi on the DB120 (AR9344) board.
adrian [Fri, 14 Feb 2014 05:25:15 +0000 (05:25 +0000)]
Enable use of the PCIe connected wifi on the DB120 (AR9344) board.

The on-board NIC is an 3x3 AR9380 with 5GHz only.

* enable pci code in AR9344_BASE
* enable ath_pci and the firmware loading bits in DB120
* add in the relevant hints in DB120.hints to inform the probe/attach
  code where the PCIe fixup data is for the onboard chip.

This is only relevant for a default development board.  I also have a
DB120 with the on-board PCIe wifi NIC disabled and it's exposed as
a real PCIe slot (to put normal PCIe NICs in); the fixup code will need
to be disabled to make this work correctly.

Tested:

* DB120

10 years agoDisable this check for now; it fails on the AR9344 PCI fixup code.
adrian [Fri, 14 Feb 2014 05:22:28 +0000 (05:22 +0000)]
Disable this check for now; it fails on the AR9344 PCI fixup code.

I'll make it conditional later.

Tested:

* DB120

10 years agoAdd the ath0 EEPROM hints required to detect the on-chip wifi.
adrian [Fri, 14 Feb 2014 04:03:17 +0000 (04:03 +0000)]
Add the ath0 EEPROM hints required to detect the on-chip wifi.

This allows the on-chip wifi to work; however it's not yet fully
tested.

ath0: Vendor=0x168c, Device=0x0031
ath0: Vendor=0x168c, Device=0x0031
ath0: <Atheros AR934x> at mem 0x18100000-0x1811ffff irq 0 on nexus0
...
ath0: [HT] enabling HT modes
ath0: [HT] enabling short-GI in 20MHz mode
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 stream STBC transmit enabled
ath0: [HT] 2 RX streams; 2 TX streams

Tested:

* DB120 development board

10 years agoFix-up r254141: in the process of making a failing vm_page_rename()
attilio [Fri, 14 Feb 2014 03:34:12 +0000 (03:34 +0000)]
Fix-up r254141: in the process of making a failing vm_page_rename()
a call of pager_swap_freespace() was moved around, now leading to freeing
the incorrect page because of the pindex changes after vm_page_rename().

Get back to use the correct pindex when destroying the swap space.

Sponsored by: EMC / Isilon storage division
Reported by: avg
Tested by: pho
MFC after: 7 days

10 years agoAdd urtwn_start_locked() to avoid unlocking during TX.
rpaulo [Fri, 14 Feb 2014 01:47:12 +0000 (01:47 +0000)]
Add urtwn_start_locked() to avoid unlocking during TX.

10 years agocheck for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
davidcs [Fri, 14 Feb 2014 01:02:06 +0000 (01:02 +0000)]
check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
qla_hw_send is moot.

10 years agoDon't insert a flowtable entry if the lle isn't yet valid.
adrian [Fri, 14 Feb 2014 00:05:09 +0000 (00:05 +0000)]
Don't insert a flowtable entry if the lle isn't yet valid.

Some of the collisions that are occuring are due to flowtable lookups
that succeed but have an invalid lle - typically because the L2 adjacency
lookup hasn't completed.  This would lead to a follow-up insert which
would then fail (ie, collision) and the code would fall through to doing
a slow-path L2/L3 lookup in the netinet/netinet6 code.

This patch simply aborts storing a new flowtable entry if the lle isn't
yet valid.

Whilst I'm here, add a new pcpu counter for the item so the number of
failures can be tracked separately from generic "collisions."

Reviewed by: glebius
MFC after: 10 days
Sponsored by: Netflix, Inc.

10 years agoFix a bug in be_uuid_dec(); it called le16dec() instead of be16dec(),
brueffer [Thu, 13 Feb 2014 22:24:36 +0000 (22:24 +0000)]
Fix a bug in be_uuid_dec(); it called le16dec() instead of be16dec(),
probably due to copy+pasting le_uuid_dec().

PR: 146588
Submitted by: Erwin Rol <erwin at erwinrol.com>
Reviewed by: marcel
MFC after: 1 week

10 years agoAllow the kernel to be loaded at any 1MiB address. This requirement is
andrew [Thu, 13 Feb 2014 21:30:54 +0000 (21:30 +0000)]
Allow the kernel to be loaded at any 1MiB address. This requirement is
because we use the 1MiB section maps as they only need a single pagetable.

To allow this we only use pc relative loads to ensure we only load from
physical addresses until we are running from a known virtual address.

As a side effect any data from before or 64MiB after the kernel needs to
be mapped in to be used. This should not be an issue for kernels loaded
with ubldr as it places this data just after the kernel. It will be a
problem when loading directly from anything using the Linux ABI that
places the ATAG data outside this range, for example U-Boot.

10 years agoRemove a couple obsolete function declarations.
ian [Thu, 13 Feb 2014 19:14:23 +0000 (19:14 +0000)]
Remove a couple obsolete function declarations.

10 years agoFurther simplify nd6_output_lle.
melifaro [Thu, 13 Feb 2014 19:09:04 +0000 (19:09 +0000)]
Further simplify nd6_output_lle.
Currently we have 3 usage patterns:
1) nd6_output (most traffic flow, no lle supplied, lle RLOCK sufficient)
2) corner cases for output (no lle, STALE lle, so on). lle WLOCK needed.
3) nd* iunternal machinery (WLOCK'ed lle provided, perform packet queing).

We separate case 1 and implement it inside its only customer - nd6_output.
This leads to some code duplication (especialy SEND stuff, which should be
hooked to output in a different way), but simplifies locking and control
flow logic fir nd6_output_lle.

Reviewed by: ae
MFC after: 3 weeks
Sponsored by: Yandex LLC

10 years agoMake the gpioled(4) work out of the box on BBB.
loos [Thu, 13 Feb 2014 18:51:37 +0000 (18:51 +0000)]
Make the gpioled(4) work out of the box on BBB.

Add gpioled(4) to BEAGLEBONE kernel and add the description of the four
on-board leds of beaglebone-black to its DTS file.

Approved by: adrian (mentor, implicit)

10 years agoAllow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this
loos [Thu, 13 Feb 2014 18:42:23 +0000 (18:42 +0000)]
Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio.  With this
change the gpio children can be described as directly connected to the GPIO
controller without the need of describing the OFW GPIO bus itself on the
DTS file.

With this commit the OFW GPIO bus is fully functional on BBB and RPi.

GPIO controllers which want to use the OFW GPIO bus will need similar
changes.

Approved by: adrian (mentor, implicit)

10 years agoAllow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.
loos [Thu, 13 Feb 2014 18:22:49 +0000 (18:22 +0000)]
Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.

This change makes ofw_iicbus attach to iicbb(4) controllers in addition to
the already supported i2c host bridges (iichb).

On iicbb(4) allow the direct access of the OFW parent node by its children,
so they can be directly attached to iicbb(4) node on the DTS without the
need of describing the i2c bus.

Approved by: adrian (mentor, implicit)

10 years agoAdd OFW support to the in tree gpio compatible devices: gpioiic(4) and
loos [Thu, 13 Feb 2014 17:58:52 +0000 (17:58 +0000)]
Add OFW support to the in tree gpio compatible devices: gpioiic(4) and
gpioled(4).

Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for
the I2C tests).  It was also verified for regressions on RSPRO (MIPS/ar71xx)
used as reference for a non OFW-based system.

Update the gpioled(4) and gpioiic(4) man pages with some details and
examples about the FDT/OFW support.

Some compatibility details pointed out by imp@ will follow in subsequent
commits.

Approved by: adrian (mentor, implicit)

10 years agoAdd an OFW GPIO compatible bus. This allows the use of the DTS files to
loos [Thu, 13 Feb 2014 17:08:29 +0000 (17:08 +0000)]
Add an OFW GPIO compatible bus.  This allows the use of the DTS files to
describe GPIO bindings in the system.

Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between
the OFW and the non OFW versions of GPIO bus.

Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus.

Approved by: adrian (mentor, implicit)

10 years agoHonor the disabled status by only grabbing resources and returning
imp [Thu, 13 Feb 2014 16:50:08 +0000 (16:50 +0000)]
Honor the disabled status by only grabbing resources and returning
when running under FDT.

10 years agoAdd a deprecation notice to nve.4 and Xref nfe.4.
brueffer [Thu, 13 Feb 2014 16:13:31 +0000 (16:13 +0000)]
Add a deprecation notice to nve.4 and Xref nfe.4.

MFC after: 3 days

10 years agoFix board ID too...
imp [Thu, 13 Feb 2014 15:47:41 +0000 (15:47 +0000)]
Fix board ID too...

10 years agoFix board name.
imp [Thu, 13 Feb 2014 15:46:08 +0000 (15:46 +0000)]
Fix board name.

10 years agoDrop packets to multicast address whose scop field contains the
ae [Thu, 13 Feb 2014 14:10:44 +0000 (14:10 +0000)]
Drop packets to multicast address whose scop field contains the
reserved value 0.

MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoBump .Dd forgotten in r261832.
zeising [Thu, 13 Feb 2014 13:11:34 +0000 (13:11 +0000)]
Bump .Dd forgotten in r261832.

MFC after: 2 weeks

10 years agoAdd commas (,) to the list in the SEE ALSO section, to match most other
zeising [Thu, 13 Feb 2014 12:53:57 +0000 (12:53 +0000)]
Add commas (,) to the list in the SEE ALSO section, to match most other
manuals.

MFC after: 2 weeks

10 years agoAdd cross references between rc.conf(5) and jail.conf(5).
zeising [Thu, 13 Feb 2014 12:52:26 +0000 (12:52 +0000)]
Add cross references between rc.conf(5) and jail.conf(5).

MFC after: 2 weeks

10 years ago- Remove not needed definitions from driver.
hselasky [Thu, 13 Feb 2014 09:09:14 +0000 (09:09 +0000)]
- Remove not needed definitions from driver.
- Get USB input report length from HID descriptor.
- Use 1 finger TAP for devices which has no integrated button.
- Move data buffer to softc instead of allocating it.

MFC after: 1 week

10 years agoAdd function for configuring PLL4 (Audio) clock frequency output.
br [Thu, 13 Feb 2014 06:38:01 +0000 (06:38 +0000)]
Add function for configuring PLL4 (Audio) clock frequency output.

10 years agoRemove unused FL_NOAUTO.
glebius [Thu, 13 Feb 2014 05:19:09 +0000 (05:19 +0000)]
Remove unused FL_NOAUTO.

10 years agolibutil/pw_util.3: Fix two prototypes.
eadler [Thu, 13 Feb 2014 05:13:22 +0000 (05:13 +0000)]
libutil/pw_util.3: Fix two prototypes.

Reported by: marino
Obtained from: DragonFlyBSD (e82b5d3dfa969bfcda5ffadceccc682b6bdcd077)
MFC After: 3 days

10 years agoo Axe non-pcpu flowtable implementation. It wasn't enabled or used,
glebius [Thu, 13 Feb 2014 04:59:18 +0000 (04:59 +0000)]
o Axe non-pcpu flowtable implementation. It wasn't enabled or used,
  and probably is a leftover from first prototyping by Kip. The
  non-pcpu implementation used mutexes, so it doubtfully worked
  better than simple routing lookup.
o Use UMA_ZONE_PCPU zone for pointers instead of [MAXCPU] arrays,
  use zpcpu_get() to access data in there.
o Substitute own single list implementation with SLIST(). This
  has two functional side effects:
  - new flows go into head of a list, before they went to tail.
  - a bug when incorrect flow was deleted in flow cleaner is
    fixed.
o Due to cache line alignment, there is no reason to keep
  different zones for IPv4 and IPv6 flows. Both consume one
  cache line, real size of allocation is equal.
o Rely on that f_hash, f_rt, f_lle are stable during fle
  lifetime, remove useless volatile quilifiers.
o More INET/INET6 splitting.

Reviewed by: adrian
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoValidate the header of a new dtb before using it. Remove the comment
ian [Thu, 13 Feb 2014 04:13:50 +0000 (04:13 +0000)]
Validate the header of a new dtb before using it.  Remove the comment
that says that should be done.

10 years agoEnable both sdcard slots, but not the sdio-based wifi that we don't yet
ian [Thu, 13 Feb 2014 04:10:27 +0000 (04:10 +0000)]
Enable both sdcard slots, but not the sdio-based wifi that we don't yet
have a driver for.

10 years agoAdd handling of standard "non-removable" property, and also some workaround
ian [Thu, 13 Feb 2014 03:45:33 +0000 (03:45 +0000)]
Add handling of standard "non-removable" property, and also some workaround
code so that if card detect is wired to a gpio pin, for now we just treat
it the same as non-removable (because there isn't a gpio driver yet).

10 years agoAdd standard non-removable and cd-gpios properties to the usdhc devices.
ian [Thu, 13 Feb 2014 03:41:00 +0000 (03:41 +0000)]
Add standard non-removable and cd-gpios properties to the usdhc devices.
That generates references to gpio devices, so uncomment them even though
there isn't a gpio driver to do anything with them yet.

10 years agoWrite translation code for the SDHCI_PRESENT_STATE register. Freescale
ian [Thu, 13 Feb 2014 02:38:16 +0000 (02:38 +0000)]
Write translation code for the SDHCI_PRESENT_STATE register.  Freescale
moved some bits around in their version of the register, adjust things
so that the sdhci code sees the standard layout.

10 years agoFix the definition of the SDHCI_STATE_DAT and SDHCI_STATE_CMD fields, and
ian [Wed, 12 Feb 2014 22:25:08 +0000 (22:25 +0000)]
Fix the definition of the SDHCI_STATE_DAT and SDHCI_STATE_CMD fields, and
add SDHCI_RETUNE_REQUEST.  None of these are actually used in the code yet.

10 years agoFix function name in KASSERT().
glebius [Wed, 12 Feb 2014 20:11:20 +0000 (20:11 +0000)]
Fix function name in KASSERT().

Submitted by: hiren

10 years agoUse the same logic as the x86 platforms to avoid trying perform fault fixup
ian [Wed, 12 Feb 2014 20:09:27 +0000 (20:09 +0000)]
Use the same logic as the x86 platforms to avoid trying perform fault fixup
while in a critical section or while holding a non-sleepable lock.

Reviewed by: cognet

10 years agoUse the right symbols for determining arm architecture. Include the
ian [Wed, 12 Feb 2014 19:59:30 +0000 (19:59 +0000)]
Use the right symbols for determining arm architecture.  Include the
necessary header file which has the new FAULT_WNR symbol defined in it.

10 years agoAdd kvm_getncpus() to obtain mp_ncpus.
glebius [Wed, 12 Feb 2014 19:22:48 +0000 (19:22 +0000)]
Add kvm_getncpus() to obtain mp_ncpus.

Sponsored by: Nginx, Inc.

10 years agoProvide additional information in some panic strings.
np [Wed, 12 Feb 2014 19:07:59 +0000 (19:07 +0000)]
Provide additional information in some panic strings.

MFC after: 1 week

10 years agoOn armv6 and later, use the WriteNotRead bit of the fault status register
ian [Wed, 12 Feb 2014 18:55:26 +0000 (18:55 +0000)]
On armv6 and later, use the WriteNotRead bit of the fault status register
to decide what protections are required by the faulting access.  The old
code disassembled the faulting instruction, and there are a lot of new
instructions that aren't handled.  The old code is still used for armv4/5
which doesn't have the WNR bit)

10 years agoAdd a note to UPDATING about the ABI compatibility fix done in r261801.
dim [Wed, 12 Feb 2014 18:16:56 +0000 (18:16 +0000)]
Add a note to UPDATING about the ABI compatibility fix done in r261801.

10 years agoAn ABI incompatibility crept into the libc++ 3.4 import in r261283. It
dim [Wed, 12 Feb 2014 18:14:49 +0000 (18:14 +0000)]
An ABI incompatibility crept into the libc++ 3.4 import in r261283.  It
was caused by upstream libc++ commit r194536, which aimed to make the
headers more standards-compliant, by making std::pair's copy constructor
trivial.  Unfortunately, this could cause certain C++ applications using
shared libraries built against the previous version of libc++ to crash.

Fix the ABI incompatibility by making std::pair's copy constructor
non-trivial again.

Please note: Any C++ applications or shared libraries built with libc++
between r261283 and this revision should be recompiled.

Reported by: stefanf
MFC after: 3 weeks
X-MFC-With: r261283

10 years agoRemove obsolete vnode(9) man page references.
wblock [Wed, 12 Feb 2014 16:39:56 +0000 (16:39 +0000)]
Remove obsolete vnode(9) man page references.

PR: docs/186537
Submitted by: Miklos Magyari <miklos@magyari.hu>
MFC after: 3 days

10 years agoAdd bounds check for pteindex / pdeindex
emaste [Wed, 12 Feb 2014 15:57:38 +0000 (15:57 +0000)]
Add bounds check for pteindex / pdeindex

10 years agoFix world build WITHOUT_PF.
glebius [Wed, 12 Feb 2014 09:59:48 +0000 (09:59 +0000)]
Fix world build WITHOUT_PF.

Sponsored by: Nginx, Inc.

10 years agoWhile it isn't too late and kvm_read_zpcpu() function isn't yet used
glebius [Wed, 12 Feb 2014 09:41:17 +0000 (09:41 +0000)]
While it isn't too late and kvm_read_zpcpu() function isn't yet used
outside libkvm(3), change its order of arguments, so that it is the
same as in kvm_read().

Sponsored by: Nginx, Inc.

10 years agoIssue doorbell twice before finally freeing the DMA descriptors. This
hselasky [Wed, 12 Feb 2014 08:04:38 +0000 (08:04 +0000)]
Issue doorbell twice before finally freeing the DMA descriptors. This
should fix DMA descriptor caching issues seen with the EHCI controller
found in Google Chromebook C720 during removal and insertion of USB
devices.

MFC after: 1 week
Reported by: Matthew Dillon at DragonFlyBSD

10 years agoBetter nomatch messages: include compat string. Also, flag devices as
imp [Wed, 12 Feb 2014 04:56:34 +0000 (04:56 +0000)]
Better nomatch messages: include compat string.  Also, flag devices as
disabled in the successful probe message, but leave what that means to
the actual driver (no semantic changes).

10 years agoAdd support for managing PCI bus numbers. As with BARs and PCI-PCI bridge
jhb [Wed, 12 Feb 2014 04:30:37 +0000 (04:30 +0000)]
Add support for managing PCI bus numbers.  As with BARs and PCI-PCI bridge
I/O windows, the default is to preserve the firmware-assigned resources.
PCI bus numbers are only managed if NEW_PCIB is enabled and the architecture
defines a PCI_RES_BUS resource type.
- Add a helper API to create top-level PCI bus resource managers for each
  PCI domain/segment.  Host-PCI bridge drivers use this API to allocate
  bus numbers from their associated domain.
- Change the PCI bus and CardBus drivers to allocate a bus resource for
  their bus number from the parent PCI bridge device.
- Change the PCI-PCI and PCI-CardBus bridge drivers to allocate the
  full range of bus numbers from secbus to subbus from their parent bridge.
  The drivers also always program their primary bus register.  The bridge
  drivers also support growing their bus range by extending the bus resource
  and updating subbus to match the larger range.
- Add support for managing PCI bus resources to the Host-PCI bridge drivers
  used for amd64 and i386 (acpi_pcib, mptable_pcib, legacy_pcib, and qpi_pcib).
- Define a PCI_RES_BUS resource type for amd64 and i386.

Reviewed by: imp
MFC after: 1 month

10 years agoConvert two while(1); statements into proper panics. Soon, kernels
imp [Wed, 12 Feb 2014 03:19:35 +0000 (03:19 +0000)]
Convert two while(1); statements into proper panics. Soon, kernels
with early printf support will print this info... For kernels without,
the observed behavior will be the same as it is now...

10 years agoadd support for building a cross-gdb for ARM... This isn't hooked up
jmg [Wed, 12 Feb 2014 02:08:42 +0000 (02:08 +0000)]
add support for building a cross-gdb for ARM...  This isn't hooked up
to xdev yet as I don't know how to make it work properly...  It also
isn't heavily tested...

Reviewed by: silence on -arm

10 years agorecognize the FreeBSD ARCH tag that is put on binaries like on armeb
jmg [Wed, 12 Feb 2014 02:03:37 +0000 (02:03 +0000)]
recognize the FreeBSD ARCH tag that is put on binaries like on armeb
EABI binaries...

MFC after: 1 week

10 years agoRework the EARLY_PRINTF mechanism. Instead of defining a special eprintf()
ian [Wed, 12 Feb 2014 00:53:38 +0000 (00:53 +0000)]
Rework the EARLY_PRINTF mechanism.  Instead of defining a special eprintf()
routine, now a platform can provide a pointer to an early_putc() routine
which is used instead of cn_putc().  Control can be handed off from early
printf support to standard console support by NULLing out the pointer
during standard console init.

This leverages all the existing error reporting that uses printf calls,
such as panic() which can now be usefully employed even in early
platform init code (useful at least to those who maintain that code and
build kernels with EARLY_PRINTF defined).

Reviewed by: imp, eadler

10 years agoProvide an indication a "PIO Setup Device to Host FIS" occurred while executing
tychon [Wed, 12 Feb 2014 00:32:14 +0000 (00:32 +0000)]
Provide an indication a "PIO Setup Device to Host FIS" occurred while executing
the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands.

Also, provide an indication a "D2H Register FIS" occurred during a SET FEATURES
command.

Approved by: grehan (co-mentor)

10 years agoSwap PA and VA so they are in the right registers...
imp [Tue, 11 Feb 2014 22:09:03 +0000 (22:09 +0000)]
Swap PA and VA so they are in the right registers...

10 years agoCorrect assertion to assert that the existing device VM object uses the
jhb [Tue, 11 Feb 2014 22:05:21 +0000 (22:05 +0000)]
Correct assertion to assert that the existing device VM object uses the
same type rather than asserting in the case where we just created a new
VM object.

Reviewed by: kib

10 years agoDon't waste a page of KVA for the boot-time memory test on x86. For amd64,
jhb [Tue, 11 Feb 2014 22:02:40 +0000 (22:02 +0000)]
Don't waste a page of KVA for the boot-time memory test on x86.  For amd64,
reuse the first page of the crashdumpmap as CMAP1/CADDR1.  For i386,
remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test.

Reviewed by: alc, peter
MFC after: 2 weeks