]> xenbits.xensource.com Git - people/julieng/freebsd.git/log
people/julieng/freebsd.git
9 years agoxen/intr: unmask the event channel when we have added a new handler
Julien Grall [Tue, 24 Jun 2014 16:43:57 +0000 (17:43 +0100)]
xen/intr: unmask the event channel when we have added a new handler

9 years agoxen/intr: Rework the event channels handler to make it generic
Julien Grall [Tue, 14 Jan 2014 01:41:04 +0000 (01:41 +0000)]
xen/intr: Rework the event channels handler to make it generic

The current code to handle the event channels was x86-specific. I think
we can use safely generic function to handle interrupt.

This code was not yet tested/compiled on x86.

TODO:
- There is some #if 0 in the code. Mainly for suspend/resume

9 years agoxen/intr: Introduce xen_pic_assign_cpu
Julien Grall [Sat, 19 Apr 2014 21:32:01 +0000 (22:32 +0100)]
xen/intr: Introduce xen_pic_assign_cpu

9 years agox86/xen: Introduce atomic_readandclear_xen_ulong
Julien Grall [Sun, 20 Apr 2014 13:56:35 +0000 (14:56 +0100)]
x86/xen: Introduce atomic_readandclear_xen_ulong

9 years agoxen/debug: Use cpu_to_vcpu_id macro
Julien Grall [Sat, 1 Aug 2015 16:45:06 +0000 (17:45 +0100)]
xen/debug: Use cpu_to_vcpu_id macro

9 years agox86/xen: Add cpu_to_vcpu_id macro
Julien Grall [Sat, 19 Apr 2014 15:57:40 +0000 (16:57 +0100)]
x86/xen: Add cpu_to_vcpu_id macro

9 years agoxen: move xen_intr.c to common code
Julien Grall [Tue, 14 Jan 2014 01:41:04 +0000 (01:41 +0000)]
xen: move xen_intr.c to common code

9 years agoxen/netfront: Introduce xen_pv_nics_disabled
Julien Grall [Fri, 16 Oct 2015 18:26:35 +0000 (19:26 +0100)]
xen/netfront: Introduce xen_pv_nics_disabled

ARM guest is considered as HVM in Freebsd but they only support PV nics
(no emulation available).

9 years agoxen: Introduce xen_pv_disk_disabled
Julien Grall [Fri, 16 Oct 2015 18:18:21 +0000 (19:18 +0100)]
xen: Introduce xen_pv_disk_disabled

ARM guest is considered as HVM in Freebsd but they only support PV disk
(no emulation available).

9 years agoxen: Introduce xen_support_evtchn_bind
Julien Grall [Sat, 10 Oct 2015 19:40:06 +0000 (20:40 +0100)]
xen: Introduce xen_support_evtchn_bind

xen_vector_callback_enabled is x86 specific and supporting evtchn rebind
on others architectures may be different.

Introduce a new helper to check if we can rebind the event channel.

Note that xen_intr_assign_cpu was only checking if
xen_vector_callback_enabled. Although it looks like to me that rebind
should be supported for PVH.

9 years agoxen/xenpv: Only add the isa when available
Julien Grall [Tue, 14 Jan 2014 01:41:11 +0000 (01:41 +0000)]
xen/xenpv: Only add the isa when available

isa device doesn't exist on ARM.

9 years agoxen: move x86/xen/xenpv.c in dev/xen/xenpv.c
Julien Grall [Tue, 14 Jan 2014 01:41:10 +0000 (01:41 +0000)]
xen: move x86/xen/xenpv.c in dev/xen/xenpv.c

9 years agoxen: Introduce xen_pmap
Julien Grall [Tue, 14 Jan 2014 14:44:08 +0000 (14:44 +0000)]
xen: Introduce xen_pmap

The function to map xen memory is not the same on every architecture.

On ARM, the mappings require to be cacheable and pmap_mapdev doesn't do that.

Replace every call of pmap_mapdev in xen code by xen_pmap

9 years agoxen/gnttab: Export resume_frames
Julien Grall [Tue, 14 Jan 2014 14:34:55 +0000 (14:34 +0000)]
xen/gnttab: Export resume_frames

Allow the platform the set resume_frames to a specific address. It will be
used on ARM because the region is give by the device tree.

9 years agoxen/timer: Make xen timer optional
Julien Grall [Tue, 14 Jan 2014 01:41:14 +0000 (01:41 +0000)]
xen/timer: Make xen timer optional

The timer is not used on ARM.

9 years agoxen/netfront: Add 2 bytes padding in the rx mbuf
Julien Grall [Mon, 5 Oct 2015 17:35:54 +0000 (18:35 +0100)]
xen/netfront: Add 2 bytes padding in the rx mbuf

The ethernet header size is not word aligned. Therefore the IP packet and so
on won't be align. On some architecture (such as ARM) unaligned access may
be slower and/or not supported. Therefore we might reveice an alignement
fault. To avoid this case, we need to pull-up the data of ETHER_ALIGN bytes.

I'm not sure how this patch will impact x86, we need to do some benchmarking
without and with it.

Furthermore, I don't know if m_copyup is the rigth function to use here. Can
any expert to the network stack can tell me if there is a better solution?

9 years agoxen/blkfront: WRITE_BARRIER and FLUSH_DISKCACHE require barrier
Julien Grall [Mon, 5 Oct 2015 17:35:43 +0000 (18:35 +0100)]
xen/blkfront: WRITE_BARRIER and FLUSH_DISKCACHE require barrier

For WRITE_BARRIER and FLUSH_DISKCACHE operation, we don't request any cache
operation. This will result to a panic in _bus_dmamap_sync on ARM because the
operation (op = 0) is not supported.

x86 platform doesn't seem to care about this and Xen is always requiring
memory shared with the backend to be cacheable. I'm wondering if we could drop
the call to bus_dmasync_map because the cache maintainance slows down the
process for no appareant reason?

For now, WRITE_BARRIER and FLUSH_DISKCACHE are an extension of the WRITE
command so require BUS_DMASYNC_PREWRITE for the cache maintenance operation.

9 years agoxen: arm: Use __typeof__ rather than typeof
Julien Grall [Sun, 4 Oct 2015 19:33:04 +0000 (20:33 +0100)]
xen: arm: Use __typeof__ rather than typeof

Typeof is not portable:

/usr/src/freebsd/sys/xen/hypervisor.h:93:2: error: implicit declaration
of function 'typeof' is invalid in C99
[-Werror,-Wimplicit-function-declaration]

9 years agoxen/control: xctlr_probe shoud return BUS_PROBE_NOWILDCARD
Julien Grall [Tue, 14 Jan 2014 01:41:14 +0000 (01:41 +0000)]
xen/control: xctlr_probe shoud return BUS_PROBE_NOWILDCARD

Returning 0 in probe callback means: the driver can use this device. If by any
chance xencontrol is the first driver, every new device (which driver unset)
will use xencontrol.

9 years agoxen/xenstore: xs_probe should return BUS_PROBE_NOWILDCARD
Julien Grall [Tue, 14 Jan 2014 01:41:08 +0000 (01:41 +0000)]
xen/xenstore: xs_probe should return BUS_PROBE_NOWILDCARD

Returning 0 in probe callback means: the driver can use this device. If by any
chance xenstore is the first driver, every new device (which driver unset) will
use xenstore.

9 years agoxen/intr: Don't need to export xen_intr_pcpu
Julien Grall [Sat, 19 Apr 2014 21:34:43 +0000 (22:34 +0100)]
xen/intr: Don't need to export xen_intr_pcpu

xen_intr_pcpu is only used within sys/xen/xen_intr.c

9 years agoxen/netfront: Use the correct type for rx_pfn_array
Julien Grall [Tue, 14 Jan 2014 01:41:01 +0000 (01:41 +0000)]
xen/netfront: Use the correct type for rx_pfn_array

9 years agoxen/netback: Fix printf format for xen_pfn_t
Julien Grall [Tue, 14 Jan 2014 01:41:00 +0000 (01:41 +0000)]
xen/netback: Fix printf format for xen_pfn_t

9 years agoxen/balloon: Use correct type for frame_list
Julien Grall [Tue, 14 Jan 2014 01:41:00 +0000 (01:41 +0000)]
xen/balloon: Use correct type for frame_list

9 years agoxen/balloon: Clean up around pfn
Julien Grall [Tue, 6 Oct 2015 17:01:01 +0000 (18:01 +0100)]
xen/balloon: Clean up around pfn

9 years agoxen/blkback: Fix string format when XBB_DEBUG is enabled
Julien Grall [Sat, 7 Jun 2014 21:50:31 +0000 (22:50 +0100)]
xen/blkback: Fix string format when XBB_DEBUG is enabled

host_addr is typed uint64_t, therefore we should use PRIx64 to print correctly
the value on every architecture.

9 years agoxen: Define xen_intr_handle_upcall in common headers
Julien Grall [Tue, 14 Jan 2014 01:41:18 +0000 (01:41 +0000)]
xen: Define xen_intr_handle_upcall in common headers

The function xen_intr_handle_upcall is used on every architecture supported
by Xen. It's pointless to define on every platform...

9 years agoxen/grant-table: Drop unused cmpxchg function
Julien Grall [Fri, 16 Oct 2015 14:54:48 +0000 (15:54 +0100)]
xen/grant-table: Drop unused cmpxchg function

9 years agoxen: Replace all usage of cpu_relax by cpu_spinwait
Julien Grall [Thu, 15 Oct 2015 17:24:19 +0000 (18:24 +0100)]
xen: Replace all usage of cpu_relax by cpu_spinwait

The 2 macros are exactly the same (rep;nop = pause) so there is no need
to implement our own.

9 years agoxen: replace barrier by __compiler_membar
Julien Grall [Thu, 15 Oct 2015 17:10:15 +0000 (18:10 +0100)]
xen: replace barrier by __compiler_membar

9 years agoxen-os: Drop unused force_evtchn_callback
Julien Grall [Thu, 15 Oct 2015 17:09:45 +0000 (18:09 +0100)]
xen-os: Drop unused force_evtchn_callback

9 years agoxen/grant-table: Don't include opt_pmap.h
Julien Grall [Wed, 14 Oct 2015 16:23:06 +0000 (17:23 +0100)]
xen/grant-table: Don't include opt_pmap.h

opt_pmap.h doesn't exist on ARM64 and it doesn't contain anything required
to build the grant-table code.

9 years agoxen-os: Introduce generic xen_set_bit and xen_test_bit
Julien Grall [Thu, 15 Oct 2015 16:58:31 +0000 (17:58 +0100)]
xen-os: Introduce generic xen_set_bit and xen_test_bit

It's based on ofed/include/linux/bitops.h. Only used helpers have been
implemented.

Also drop the previous arch-specific implementation.

9 years agox86/xen: Cleanup in xen-os.h
Julien Grall [Thu, 15 Oct 2015 11:27:02 +0000 (12:27 +0100)]
x86/xen: Cleanup in xen-os.h

9 years agox86/xen: Drop clear_bit
Julien Grall [Thu, 15 Oct 2015 11:24:01 +0000 (12:24 +0100)]
x86/xen: Drop clear_bit

9 years agox86/xen-os: Remove unused function test_and_clear_bit
Julien Grall [Wed, 14 Oct 2015 15:43:31 +0000 (16:43 +0100)]
x86/xen-os: Remove unused function test_and_clear_bit

9 years agoxen/evtchn: Use BITSET_DEFINE to avoid the usage of custom *_bit
Julien Grall [Wed, 14 Oct 2015 15:14:55 +0000 (16:14 +0100)]
xen/evtchn: Use BITSET_DEFINE to avoid the usage of custom *_bit

9 years agoxen: Drop xen_start_info
Julien Grall [Sun, 11 Oct 2015 14:16:50 +0000 (15:16 +0100)]
xen: Drop xen_start_info

Not used in the code except for xenpci front. All the other drivers are
using HYPERVISOR_start_info

9 years agoxen: No need to forward declare HYPERVISOR_crash
Julien Grall [Sat, 10 Oct 2015 22:40:46 +0000 (23:40 +0100)]
xen: No need to forward declare HYPERVISOR_crash

9 years agoxen: Drop CONFIG_X86_PAE
Julien Grall [Sun, 4 Oct 2015 18:03:21 +0000 (19:03 +0100)]
xen: Drop CONFIG_X86_PAE

It's defined but actually never used within the kernel

9 years agoxen: Drop is_running_on_xen
Julien Grall [Sun, 4 Oct 2015 17:54:02 +0000 (18:54 +0100)]
xen: Drop is_running_on_xen

The macro is not used at all within FreeBSD

9 years agoxen: drop is_initial_xendomain
Julien Grall [Sun, 4 Oct 2015 17:42:56 +0000 (18:42 +0100)]
xen: drop is_initial_xendomain

9 years agoxen: Drop MULTI_update_va_mapping
Julien Grall [Sun, 4 Oct 2015 17:40:59 +0000 (18:40 +0100)]
xen: Drop MULTI_update_va_mapping

This helper is not used at all

9 years agox86/xen: Consolidate xen-os.h in a single place
Julien Grall [Sat, 10 Oct 2015 21:27:43 +0000 (22:27 +0100)]
x86/xen: Consolidate xen-os.h in a single place

---
Changes in v2:
- Add missing copyright
- Remove stray line

9 years agoi386: drop unused atomic_t, atomic_inc and rdtscll
Julien Grall [Sat, 10 Oct 2015 21:10:38 +0000 (22:10 +0100)]
i386: drop unused atomic_t, atomic_inc and rdtscll

9 years agoi386/xen: Drop unused functions/variables/types
Julien Grall [Sat, 10 Oct 2015 21:04:41 +0000 (22:04 +0100)]
i386/xen: Drop unused functions/variables/types

- xen_xchg
- __xchg_dummy
_ __xg
- __xchg

9 years agoxen-netfront: no need to set if_output master
royger [Mon, 19 Oct 2015 14:37:17 +0000 (14:37 +0000)]
xen-netfront: no need to set if_output

This is redundant because ether_ifattach will set that field.

Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D3918
Sponsored by: Citrix Systems R&D

9 years agoxen-netfront: remove a bunch of FreeBSD version check
royger [Mon, 19 Oct 2015 14:34:45 +0000 (14:34 +0000)]
xen-netfront: remove a bunch of FreeBSD version check

We're way beyond FreeBSD 7 at this point.

Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D3892
Sponsored by: Citrix Systems R&D

9 years agoxen-netfront: remove XN_LOCK_{INIT,DESTROY}
royger [Mon, 19 Oct 2015 14:26:40 +0000 (14:26 +0000)]
xen-netfront: remove XN_LOCK_{INIT,DESTROY}

Multiqueue feature will make the number of queues dynamic, so XN_LOCK_INIT
won't be that useful. Remove the macro and call mtx_init directly.

XN_LOCK_DESTROY is just dead code.

Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D3890
Sponsored by: Citrix Systems R&D

9 years agoxen-netfront: clean up netfront stats structure
royger [Mon, 19 Oct 2015 14:22:57 +0000 (14:22 +0000)]
xen-netfront: clean up netfront stats structure

Rename it with netfront_ prefix and purge a bunch of unused fields.

Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D3889
Sponsored by: Citrix Systems R&D

9 years agoxen-netfront: purge page flipping support
royger [Mon, 19 Oct 2015 14:20:06 +0000 (14:20 +0000)]
xen-netfront: purge page flipping support

Currently neither Linux nor FreeBSD netback supports page flipping. NetBSD
still supports that. It is not sure how many people actually use page
flipping, but page flipping is supposed to be slower than copying nowadays.
It will also shatter frontend / backend address space.

Overall this feature is more of a burden than a benefit.

Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D3888
Sponsored by: Citrix Systems R&D

9 years agoxen-netfront: delete all trailing white spaces
royger [Mon, 19 Oct 2015 14:12:15 +0000 (14:12 +0000)]
xen-netfront: delete all trailing white spaces

Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D3886
Sponsored by: Citrix Systems R&D

9 years agoUse 4 levels of page tables when enabling the MMU. This will allow us to
andrew [Mon, 19 Oct 2015 13:20:23 +0000 (13:20 +0000)]
Use 4 levels of page tables when enabling the MMU. This will allow us to
boot on an SoC that places physical memory at an address past where three
levels of page tables can access in an identity mapping.

Submitted by:   Wojciech Macek <wma@semihalf.com>,
                Patrick Wildt <patrick@bitrig.org>
Differential Revision: https://reviews.freebsd.org/D3885 (partial)
Differential Revision: https://reviews.freebsd.org/D3744

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 12:44:41 +0000 (12:44 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Redefine DIV_ROUND_UP as a function macro taking two arguments
  instead of none.
- Implement more Linux kernel functions related to various forms
  of DELAY() and basic mathematical operations.

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 12:33:09 +0000 (12:33 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Implement more Linux kernel functions.

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 12:26:38 +0000 (12:26 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Define the kref structure identical to the one found in Linux.
- Update clients referring inside the kref structure.
- Implement kref_sub() for FreeBSD.

Reviewed by: np @
Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 12:08:06 +0000 (12:08 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Map more Linux compiler related defines to FreeBSD ones.

Sponsored by: Mellanox Technologies

9 years agoMap two more Linux error return codes to FreeBSD ones.
hselasky [Mon, 19 Oct 2015 12:04:20 +0000 (12:04 +0000)]
Map two more Linux error return codes to FreeBSD ones.

Sponsored by: Mellanox Technologies

9 years agoImplement IS_ERR_OR_NULL() function.
hselasky [Mon, 19 Oct 2015 12:00:52 +0000 (12:00 +0000)]
Implement IS_ERR_OR_NULL() function.

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 11:57:33 +0000 (11:57 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Add more list related functions and macros.
- Update the hlist_for_each_entry() macro to take one less argument.

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 11:46:48 +0000 (11:46 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Reimplement ktime header file to distinguish more from Linux.
- Add new time header file to handle time related Linux functions.

Sponsored by: Mellanox Technologies

9 years agoFix compile warning.
hselasky [Mon, 19 Oct 2015 11:29:50 +0000 (11:29 +0000)]
Fix compile warning.

Sponsored by: Mellanox Technologies

9 years agoUse __func__ instead of __FUNCTION__.
tuexen [Mon, 19 Oct 2015 11:17:54 +0000 (11:17 +0000)]
Use __func__ instead of __FUNCTION__.

This allows to compile the userland stack without errors using gcc5.
Thanks to saghul for makeing me aware and providing the patch.

MFC after: 1 week

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 11:16:38 +0000 (11:16 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Reimplement math64 header file to distinguish more from Linux.

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 11:11:15 +0000 (11:11 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Whitespace fixes.

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 11:09:51 +0000 (11:09 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Avoid using PAGE_MASK, because Linux defines it differently.
  Use (PAGE_SIZE - 1) instead.
- Add support for for_each_sg_page() and sg_page_iter_dma_address().

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 10:57:56 +0000 (10:57 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Implement schedule_timeout().

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 10:56:32 +0000 (10:56 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Implement pagefault_disable() and pagefault_enable().

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 10:54:24 +0000 (10:54 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Added support for multiple new Linux functions.
- Properly implement DEFINE_WAIT() and init_waitqueue_head() macros.
- Removed FreeBSD specific __wait_queue_head structure definition.

Sponsored by: Mellanox Technologies

9 years agoMerge LinuxKPI changes from DragonflyBSD:
hselasky [Mon, 19 Oct 2015 10:49:15 +0000 (10:49 +0000)]
Merge LinuxKPI changes from DragonflyBSD:
- Some minor whitespace fixes.
- Added support for two new Linux functions.

Sponsored by: Mellanox Technologies

9 years agoMFV r289561: 6328 Fix cstyle errors in zfs codebase
mav [Mon, 19 Oct 2015 08:25:37 +0000 (08:25 +0000)]
MFV r289561: 6328 Fix cstyle errors in zfs codebase

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>

illumos/illumos-gate@9a686fbc186e8e2a64e9a5094d44c7d6fa0ea167

9 years agoAdd quirk for USB 3.0 PCI device.
hselasky [Mon, 19 Oct 2015 07:21:57 +0000 (07:21 +0000)]
Add quirk for USB 3.0 PCI device.

Submitted by: philipp.maechler@mamo.li
PR: 203650
MFC after: 1 week

9 years agootus(4) - use the local node alloc function so there's space for statistics.
adrian [Mon, 19 Oct 2015 01:21:29 +0000 (01:21 +0000)]
otus(4) - use the local node alloc function so there's space for statistics.

* Use the correct malloc type for node allocation - M_80211_NODE - so
  the default node free method in net80211 will work correctly.
* Fix otus_node_alloc() to suit FreeBSD's net80211.
* .. and actually call otus_node_alloc() so there's space for the
  per-node tx statistics.  Otherwise, well, it will be scribbling over
  random memory.

Tested:

* AR9170, STA mode

9 years agootus(4) - add initial monitor mode; use lowest rate for EAPOL
adrian [Mon, 19 Oct 2015 01:14:26 +0000 (01:14 +0000)]
otus(4) - add initial monitor mode; use lowest rate for EAPOL

The monitor mode stuff is from the openbsd driver, but it doesn't
100% work.  It doesn't seem to get all frames for all BSSes.
However, it's enough to at start debugging things.  That 0xffffffff
write is /I think/ the RX filter, but I am still not 100% sure about
it all.

Then, whilst here, use the lowest rate for EAPOL frames.  This is just
generally a good thing to do.

9 years agoEnable gpiobacklight in BEAGLEBONE config to support LCD capes by
gonzo [Sun, 18 Oct 2015 23:58:05 +0000 (23:58 +0000)]
Enable gpiobacklight in BEAGLEBONE config to support LCD capes by
4DSYSTEMS out of box

9 years agoAdd ThunderX VNIC to arm64/GENERIC kernel
zbb [Sun, 18 Oct 2015 22:13:21 +0000 (22:13 +0000)]
Add ThunderX VNIC to arm64/GENERIC kernel

Add vnic to enabled networking cards and enable SR-IOV by the way.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation

9 years agoIntroduce driver for Cavium's ThunderX MDIO
zbb [Sun, 18 Oct 2015 22:10:08 +0000 (22:10 +0000)]
Introduce driver for Cavium's ThunderX MDIO

This commit adds support for MDIO present in the ThunderX SoC.
From the FDT point of view it is compatible with "octeon-3860-mdio"
however only C22 mode is used.
The code also implements lmac_if interface functions.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation

9 years agoIntroduce initial support for Cavium's ThunderX networking interface
zbb [Sun, 18 Oct 2015 22:02:58 +0000 (22:02 +0000)]
Introduce initial support for Cavium's ThunderX networking interface

- The driver consists of three main componens: PF, VF, BGX
- Requires appropriate entries in DTS and MDIO driver
- Supports only FDT configuration
- Multiple Tx queues and single Rx queue supported
- No RSS, HW checksum and TSO support
- No more than 8 queues per-IF (only one Queue Set per IF)
- HW statistics enabled
- Works in all available MAC modes (1,10,20,40G)
- Style converted to BSD according to style(9)
- The code brings lmac_if interface used by the BGX driver to
  update its logical MACs state.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation

9 years agoRaw import of ThunderX VNIC networking driver components
zbb [Sun, 18 Oct 2015 21:39:15 +0000 (21:39 +0000)]
Raw import of ThunderX VNIC networking driver components

This import brings following components of the Linux driver:
- Thunder BGX (programmable MAC)
- Physical Function driver
- Virtual Function driver
- Headers

Revision:            1.0
Obtained from:       Cavium
License information: Cavium provided these files under BSD license

9 years agoUpdate hostapd/wpa_supplicant to version 2.5.
rpaulo [Sun, 18 Oct 2015 21:38:25 +0000 (21:38 +0000)]
Update hostapd/wpa_supplicant to version 2.5.

Tested by several people on current@/wireless@.

Relnotes: yes

9 years agoOnly decode fdt data which belongs to the GIC controller.
ian [Sun, 18 Oct 2015 20:37:10 +0000 (20:37 +0000)]
Only decode fdt data which belongs to the GIC controller.

The interrupts-extended property is a list of controller-specific
interrupt tuples for more than one controller.  The decode routine of
every PIC gets called in the pre-INTRNG code (nexus doesn't know which
device instance belongs to which fdt node), so the GIC code has to
check each FDT node it is asked to decode to ensure it is the owner.

Because in the pre-INTRNG world there can only be one instance of a GIC,
it's safe to cache the results of a positive lookup in a static variable
to avoid the expensive lookups on subsequent calls.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>
Differential Revision: https://reviews.freebsd.org/D2345

9 years agoInclude "opt_platform.h" early so that the FDT option is visible as needed.
ian [Sun, 18 Oct 2015 20:32:37 +0000 (20:32 +0000)]
Include "opt_platform.h" early so that the FDT option is visible as needed.

9 years agoif_ntb: MFV e26a5843: Move MW/DB management to if_ntb
cem [Sun, 18 Oct 2015 20:20:57 +0000 (20:20 +0000)]
if_ntb: MFV e26a5843: Move MW/DB management to if_ntb

This is the last e26a5843 patch.  The general thrust of the rewrite was
to move more responsibility for Memory Window and Doorbell interrupt
management from the ntb_hw driver to if_ntb.

A number of APIs have been added, removed, or replaced.  The old
DB callback mechanism has been excised.  Instead, callers (if_ntb) are
responsible for configuring MWs and handling their interrupts more
directly.

This adds a tunable, hw.ntb.max_mw_size, allowing users to limit the
size of memory windows used by if_ntb (identical to the Linux modparam
of the same name).

Despite attempts to keep mechanical name changes to separate commits,
some have snuck in here.  At least the driver should be much more
similar to the latest Linux one now -- making porting fixes easier.

Authored by: Allen Hubbe
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoif_ntb: Rename things to match Linux driver
cem [Sun, 18 Oct 2015 20:20:48 +0000 (20:20 +0000)]
if_ntb: Rename things to match Linux driver

No functional change.  Part of the huge rewrite (e26a5843).

Obtained from: Linux (e26a5843) (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoif_ntb: Replace handmade bitset macros with sys/bitset.h
cem [Sun, 18 Oct 2015 20:20:38 +0000 (20:20 +0000)]
if_ntb: Replace handmade bitset macros with sys/bitset.h

No functional change.

Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Flesh out the rest of the xeon_setup_b2b_mw changes
cem [Sun, 18 Oct 2015 20:20:29 +0000 (20:20 +0000)]
NTB: Flesh out the rest of the xeon_setup_b2b_mw changes

Move all Xeon secondary register setup to the setup_b2b_mw routine.  We
use subroutines to make it a bit less wordy than the Linux version.

Adds a new tunable, 'hw.ntb.b2b_mw_share'.  By default, it is off
(zero).  If both sides enable it (any non-zero value), the NTB driver
attempts to use only half of a memory window for remote register MMIO
access.

This is still part of the large Linux rewrite (e26a5843).

Authored by: Allen Hubbe
Obtained from: Linux (e26a5843) (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: "Split ntb_hw_intel and ntb_transport drivers"
cem [Sun, 18 Oct 2015 20:20:20 +0000 (20:20 +0000)]
NTB: "Split ntb_hw_intel and ntb_transport drivers"

This Linux commit was more or less a rewrite.  Unfortunately, the commit
log does not give a lot of context for the rewrite.  I have tried to
faithfully follow the changes made upstream, including matching function
names where possible, while churning the FreeBSD driver as little as
possible.

This is the bulk of the rewrite.  There are two groups of changes to
follow in separate commits: fleshing out the rest of the changes to
xeon_setup_b2b_mw(), and some changes to if_ntb.

Yes, this is a big patch (3 files changed, 416 insertions(+), 237
deletions(-)), but the Linux patch was 13 files changed, 2,589
additions(+) and 2,195 deletions(-).

Original Linux commit log:
Change ntb_hw_intel to use the new NTB hardware abstraction layer.

Split ntb_transport into its own driver.  Change it to use the new NTB
hardware abstraction layer.

Authored by: Allen Hubbe
Obtained from: Linux (e26a5843) (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Simplify ntb_map_pci_bars
cem [Sun, 18 Oct 2015 20:20:11 +0000 (20:20 +0000)]
NTB: Simplify ntb_map_pci_bars

Skip using a function pointer for shared error logging.

Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Simplify interrupt handling by merging SoC/Xeon
cem [Sun, 18 Oct 2015 20:20:02 +0000 (20:20 +0000)]
NTB: Simplify interrupt handling by merging SoC/Xeon

Some interrupt-related function names changed to match Linux.

No functional change.  Still part of the huge e26a5843 rewrite in Linux.

Obtained from: Linux (e26a5843) (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Rename some variables/functions to match Linux
cem [Sun, 18 Oct 2015 20:19:53 +0000 (20:19 +0000)]
NTB: Rename some variables/functions to match Linux

No functional change.

Still part of the huge e26a5843 rewrite.  I'm trying to make it less of
a complete rewrite in the FreeBSD version of the driver.  Still, it
helps if our names match Linux.

Obtained from: Linux (e26a5843) (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Rename some constants to match Linux
cem [Sun, 18 Oct 2015 20:19:44 +0000 (20:19 +0000)]
NTB: Rename some constants to match Linux

No functional change.

Obtained from: Linux (part of e26a5843) (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoEnable ARM_INTRNG on IMX6 platforms, and make the imx_gpio driver an
ian [Sun, 18 Oct 2015 19:54:11 +0000 (19:54 +0000)]
Enable ARM_INTRNG on IMX6 platforms, and make the imx_gpio driver an
interrupt controller.

The latter is required for INTRNG, because of the hardware erratum
workaround installed by the linux folks into the imx6 FDT data, which remaps
an ethernet interrupt to the gpio device.  In the non-INTRNG world we
intercept the call to map the interrupt and map it back to the ethernet
hardware (because we don't need linux's workaround), but in the INTRNG world
we lose the hookpoint where that remapping was happening, but we gain the
ability to work the way linux does by having the gpio driver dispatch the
interrupt.

9 years agoMFV r289535: 5767 fix several problems with zfs test suite
mav [Sun, 18 Oct 2015 19:05:56 +0000 (19:05 +0000)]
MFV r289535: 5767 fix several problems with zfs test suite

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: John Wren Kennedy <john.kennedy@delphix.com>

illumos/illumos-gate@52244c0958bdf281ca42932b449f644b4decfdc2

In fact, only unrelated part of that commit is applicable:
8. zpool list -v doesn't print spares
It also doesn't correctly identify log devices.

9 years agoRemove geom_uncompress from TP-MR3020 config. Its now using root on USB
sbruno [Sun, 18 Oct 2015 18:41:30 +0000 (18:41 +0000)]
Remove geom_uncompress from TP-MR3020 config.  Its now using root on USB
and there's no need for it now.

9 years agoAdd VM_KMEM_SIZE_SCALE=1 as these systems are going to have super small
sbruno [Sun, 18 Oct 2015 18:40:11 +0000 (18:40 +0000)]
Add VM_KMEM_SIZE_SCALE=1 as these systems are going to have super small
amount of RAM, e.g. 16M or 32M

Reviewed by: adrian

9 years agoEnable ARM_INTRNG on the pandaboard platform.
ian [Sun, 18 Oct 2015 18:39:16 +0000 (18:39 +0000)]
Enable ARM_INTRNG on the pandaboard platform.

Differential Revision: https://reviews.freebsd.org/D2048

9 years agoMFV r289530: 5847 libzfs_diff should check zfs_prop_get() return
mav [Sun, 18 Oct 2015 18:32:22 +0000 (18:32 +0000)]
MFV r289530: 5847 libzfs_diff should check zfs_prop_get() return

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Alexander Eremin <a.eremin@nexenta.com>

illumos/illumos-gate@8430278980a48338e04c7dd52b495b7f1551367a

9 years agoImport ARM_INTRNG, the "next generation" interrupt architecture for arm
ian [Sun, 18 Oct 2015 18:26:19 +0000 (18:26 +0000)]
Import ARM_INTRNG, the "next generation" interrupt architecture for arm
and armv6 architecures.  The primary enhancement over the old design is
support for hierarchical interrupt controllers (such as a gpio driver
which can receive interrupts from a root PIC and act as a PIC itself for
clients interested in handling a change of gpio pin state as an
interrupt).  The new code also provides an infrastructure for mapping
interrupts described in metadata in the form of a "controller reference
plus interrupt number" tuple into the simple "0-n" flat numeric space
understood by rman and the bus resource mechanisms.

Use of the new code is enabled by setting the ARM_INTRNG option, and by
making a few simple changes to the platform's support code.  In addition
each existing PIC driver needs changes to be ready for INTRNG; this commit
contains the changes for the arm/gic driver, which most armv6 SoCs use, but
it does not enable the new code yet on any platform.

This project has been many years in the making, starting as a GSoC project
by Jakub Klama (jceel@) in 2012.  That didn't get committed right away and
the source base evolved out from under it to some degree.  In 2014 I rebased
the diffs to then -current and did some enhancements in the area of mapping
interrupt numbers and storing associated fdt data, then the project went
cold again for a while.  Eventually Svata Kraus took that work in progress
and did another big round of work on it, removing most of the remaining
rough edges.  Finally I took that and made one more pass through it, mostly
disabling the "INTR_SOLO" feature for now, pending further design
discussions on how to most efficiently dispatch a pending interrupt through
more than one layer of PIC.  The current code with the INTR_SOLO feature
disabled uses approximate 100 extra cpu cycles for each cascaded PIC the
interrupt has to be passed to, so what's left to do is about efficiency, not
correct operation.

Differential Revision: https://reviews.freebsd.org/D2047

9 years agoReduce diff from upstream.
mav [Sun, 18 Oct 2015 18:25:00 +0000 (18:25 +0000)]
Reduce diff from upstream.

Should be no functional change.

9 years agoMFV r289526:
mav [Sun, 18 Oct 2015 18:08:33 +0000 (18:08 +0000)]
MFV r289526:
5561 support root pools on EFI/GPT partitioned disks
5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks)

Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Hans Rosenfeld <hans.rosenfeld@nexenta.com>

illumos/illumos-gate@1a902ef8628b0dffd6df5442354ab59bb8530962

This is NOP changes for FreeBSD.