]> xenbits.xensource.com Git - people/julieng/freebsd.git/log
people/julieng/freebsd.git
9 years agoarm64: Basic implementation done dev-evtchn
Julien Grall [Mon, 2 Nov 2015 14:40:59 +0000 (14:40 +0000)]
arm64: Basic implementation done

9 years agoImplement xen_arch_intr_setup
Julien Grall [Mon, 2 Nov 2015 12:31:56 +0000 (12:31 +0000)]
Implement xen_arch_intr_setup

9 years agoarm64: Start to implement the new event channel API
Julien Grall [Wed, 21 Oct 2015 17:02:40 +0000 (18:02 +0100)]
arm64: Start to implement the new event channel API

9 years agoFix check
Julien Grall [Wed, 21 Oct 2015 16:31:43 +0000 (17:31 +0100)]
Fix check

9 years agox86: coding style
Julien Grall [Wed, 21 Oct 2015 16:28:15 +0000 (17:28 +0100)]
x86: coding style

9 years agoarm64: add arch-intr.h
Julien Grall [Wed, 21 Oct 2015 14:18:56 +0000 (15:18 +0100)]
arm64: add arch-intr.h

9 years agoxen/intr: Introduce xen_arch_intr.c
Julien Grall [Tue, 20 Oct 2015 16:14:56 +0000 (17:14 +0100)]
xen/intr: Introduce xen_arch_intr.c

9 years agoamd64: Fix build after xen_intr.c has been moved
Julien Grall [Tue, 20 Oct 2015 15:23:45 +0000 (16:23 +0100)]
amd64: Fix build after xen_intr.c has been moved

9 years agoRevert "xen/intr: Rework the event channels handler to make it generic"
Julien Grall [Tue, 20 Oct 2015 15:09:28 +0000 (16:09 +0100)]
Revert "xen/intr: Rework the event channels handler to make it generic"

This reverts commit 364f5ce83809e9b59fcd03d39c98f9ff2a83c3ff.

9 years agoRevert "xen/intr: unmask the event channel when we have added a new handler"
Julien Grall [Tue, 20 Oct 2015 13:56:01 +0000 (14:56 +0100)]
Revert "xen/intr: unmask the event channel when we have added a new handler"

This reverts commit c34b6849e4f8f1fee1156352d4670a5367d665bb.

9 years agoetc/aarch64: ttys: Add the xen console dev-arm64
Julien Grall [Thu, 29 Oct 2015 18:22:35 +0000 (18:22 +0000)]
etc/aarch64: ttys: Add the xen console

9 years agoxen/xen-os: Don't let anyone else defining __XEN_INTERFACE_VERSION__
Julien Grall [Fri, 16 Oct 2015 18:59:45 +0000 (19:59 +0100)]
xen/xen-os: Don't let anyone else defining __XEN_INTERFACE_VERSION__

FreeBSD should always use the same version accross the source. If not
it's a call for problem.

9 years agoWORKAROUND: Allow cscope to work with ARM64
Julien Grall [Sat, 10 Oct 2015 16:16:29 +0000 (17:16 +0100)]
WORKAROUND: Allow cscope to work with ARM64

9 years agoxen: arm: Workaround to get start_info
Julien Grall [Sun, 4 Oct 2015 18:43:16 +0000 (19:43 +0100)]
xen: arm: Workaround to get start_info

9 years agoxen/console: Add support for HVM and ARM console
Julien Grall [Sat, 19 Sep 2015 17:15:40 +0000 (18:15 +0100)]
xen/console: Add support for HVM and ARM console

9 years agoAarch64
Julien Grall [Sat, 29 Aug 2015 21:22:23 +0000 (22:22 +0100)]
Aarch64

9 years agoHACK: xen/xenpv: Attach xenpv to ofwbus
Julien Grall [Fri, 6 Jun 2014 15:47:36 +0000 (16:47 +0100)]
HACK: xen/xenpv: Attach xenpv to ofwbus

ofwbus handle itself the device memory. If privcmd want to allocate memory
it will try in the wrong address space.

TODO: ofwbus should let the next handle resource management

9 years agoxen/xenstored: Handle xenstored daemon in HVM domain
Julien Grall [Mon, 16 Jun 2014 19:31:36 +0000 (20:31 +0100)]
xen/xenstored: Handle xenstored daemon in HVM domain

9 years agoxen/xenpv: Implement {,dev}activate_resource for ARM
Julien Grall [Sun, 8 Jun 2014 15:55:38 +0000 (16:55 +0100)]
xen/xenpv: Implement {,dev}activate_resource for ARM

9 years agoHandle ARM dom0 for xenstore
Julien Grall [Fri, 6 Jun 2014 00:21:48 +0000 (01:21 +0100)]
Handle ARM dom0 for xenstore

9 years agoarm64: Add xen platform
Julien Grall [Tue, 14 Jan 2014 01:40:58 +0000 (01:40 +0000)]
arm64: Add xen platform

This platform code allow FreeBSD to boot as Xen on ARMv8 guest.

I'm not 100% sure of the implementation of synch_* on ARM64. I choose to use
the atomic_* builtin. Is it SMP-safe?

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 agoxen/intr: move xen_intr.c to common code
Julien Grall [Tue, 14 Jan 2014 01:41:04 +0000 (01:41 +0000)]
xen/intr: move xen_intr.c to common code

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/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: 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/xenusb: Always include xen/xen-os.h rather than machine/xen/xen-os.h
Julien Grall [Tue, 20 Oct 2015 14:45:55 +0000 (15:45 +0100)]
xen/xenusb: Always include xen/xen-os.h rather than machine/xen/xen-os.h

Fix compilation since machine/xen/xen-os.h is requiring definition
existing in xen/xen-os.h.

In general machine/xen/xen-os.h should never be included

9 years agoxen/xen-os: Move the include of machine/xen/xen-os.h later
Julien Grall [Tue, 20 Oct 2015 14:18:09 +0000 (15:18 +0100)]
xen/xen-os: Move the include of machine/xen/xen-os.h later

Allows machine/xen/xen-os.h to use helpers defined by xen/xen-os.h

9 years agoxen/control: Introduce xen_has_pv_shutdown_handler
Julien Grall [Fri, 4 Apr 2014 23:52:05 +0000 (00:52 +0100)]
xen/control: Introduce xen_has_pv_shutdown_handler

While x86 only register PV shutdown handler for PV guests. ARM guests
are always using HVM and requires the PV shutdown handler.

9 years agoxen/control: Implement suspend has panic for ARM
Julien Grall [Tue, 14 Jan 2014 01:41:15 +0000 (01:41 +0000)]
xen/control: Implement suspend has panic for ARM

Suspend is not supported on ARM64 for the moment.

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/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_vector_callback_enabled
Julien Grall [Tue, 20 Oct 2015 14:32:35 +0000 (15:32 +0100)]
xen_vector_callback_enabled

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 agoAdd testcases for -t ffs -o version=[12]
ngie [Mon, 2 Nov 2015 11:06:51 +0000 (11:06 +0000)]
Add testcases for -t ffs -o version=[12]

Verify the filesystem type using dumpfs. Add preliminary support
for NetBSD (needs to be validated)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoSync minor whitespace / type changes in ffs_csum_swap and ffs_sb_swap with
ngie [Mon, 2 Nov 2015 10:09:09 +0000 (10:09 +0000)]
Sync minor whitespace / type changes in ffs_csum_swap and ffs_sb_swap with
src/sys/ufs/ffs/ffs_bswap.c@1.39

Obtained from: NetBSD
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoClean up mtree keyword support a slight bit and add a few more default keywords
ngie [Mon, 2 Nov 2015 10:08:00 +0000 (10:08 +0000)]
Clean up mtree keyword support a slight bit and add a few more default keywords

- Parameterize the mtree keywords as $DEFAULT_MTREE_KEYWORDS
- Test with the extra mtree keywords, `mode,gid,uid`.
- Add a note about mtrees with time support not working with makefs right now

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agozfs: allow the lookup of extended attributes of an unlinked file
avg [Mon, 2 Nov 2015 10:07:21 +0000 (10:07 +0000)]
zfs: allow the lookup of extended attributes of an unlinked file

That's required for extattr_get_fd(2) and the like to work properly.

PR: 203201
MFC after: 17 days

9 years agoAdd testcases for -t cd9660 -o isolevel=[1-3]
ngie [Mon, 2 Nov 2015 09:16:51 +0000 (09:16 +0000)]
Add testcases for -t cd9660 -o isolevel=[1-3]

-- -o isolevel=1 currently fails because of path comparison issues,
   so mark it as an expected failure.
-- -o isolevel=3 is not implemented, so expect it to fail as an out
   of bounds value [*].

PR: 203645
MFC after: 1 week
X-MFC with: r290264
Sponsored by: EMC / Isilon Storage Division

9 years agoLimit isoLevel to 1 and 2 to avoid segfaulting when isoLevel is set to 3 by
ngie [Mon, 2 Nov 2015 08:43:15 +0000 (08:43 +0000)]
Limit isoLevel to 1 and 2 to avoid segfaulting when isoLevel is set to 3 by
dereferencing a NULL function pointer

Add some asserts to ensure that isolevel is always either 1 or 2.

PR: 203645
Reported by: Thomas Schmitt <scdbackup@gmx.net>
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix spelling of `isolevel` cd9660 option
ngie [Mon, 2 Nov 2015 07:46:47 +0000 (07:46 +0000)]
Fix spelling of `isolevel` cd9660 option

MFC after: 1 week
X-MFC with: r290260
Sponsored by: EMC / Isilon Storage Division

9 years agoBump .Dd for r290259 and r290260
ngie [Mon, 2 Nov 2015 07:42:42 +0000 (07:42 +0000)]
Bump .Dd for r290259 and r290260

9 years agoDocument undocumented long options for -t cd9660
ngie [Mon, 2 Nov 2015 07:40:18 +0000 (07:40 +0000)]
Document undocumented long options for -t cd9660

Note which options have been implemented and which options haven't
been implemented

Submitted as the following NetBSD PRs: bin/50390 and bin/50392

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoSync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53
ngie [Mon, 2 Nov 2015 07:36:42 +0000 (07:36 +0000)]
Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53

Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and
options have been omitted.

MFC after: 1 week
Obtained from: NetBSD
Sponsored by: EMC / Isilon Storage Division

9 years agomips: rate limit the trap handler output; add pid/tid/program name.
adrian [Mon, 2 Nov 2015 03:36:15 +0000 (03:36 +0000)]
mips: rate limit the trap handler output; add pid/tid/program name.

I discovered that we're logging each trap, which gets pretty spendy;
and there wasn't any further information on the pid/tid/progname involved.

I originally noticed this because I don't attach anything to /dev/log and so
the log() output stays going to the kernel.  That's an oops on my part, but
I'm glad I did it.

This commit adds the following:

* a rate limiter, which could do with some eyeballs/ideas on how to
  make it more predictable on SMP;
* log pid, tid, progname (comm) as part of the output.

I now get output like this:

Unaligned Load Word: pid=621 (pmcstat), tid=100060, pc=0xffffffff803ae898, badvaddr=0x40a10055
Unaligned Load Word: pid=621 (pmcstat), tid=100060, pc=0xffffffff803ae898, badvaddr=0x40a10051
Unaligned Load Word: pid=621 (pmcstat), tid=100060, pc=0xffffffff803ae898, badvaddr=0x40a1004d
Unaligned Load Word: pid=602 (login), tid=100042, pc=0xffffffff803ae898, badvaddr=0x401159
Unaligned Load Word: pid=602 (login), tid=100042, pc=0xffffffff803ae898, badvaddr=0x401155
Unaligned Load Word: pid=602 (login), tid=100042, pc=0xffffffff803ae898, badvaddr=0x401151

.. which makes it much easier to start figuring out what/where to fix.

The pc looks suss (it looks like it's in kernel space); I'll dig into that one next.

Tested:

* AR9331 SoC (Carambola2)

9 years agoDefine `fhard` in pps_event(..) only when PPS_SYNC is defined to mute
ngie [Mon, 2 Nov 2015 03:14:37 +0000 (03:14 +0000)]
Define `fhard` in pps_event(..) only when PPS_SYNC is defined to mute
an -Wunused-but-set-variable warning

Reported by: FreeBSD_HEAD_amd64_gcc4.9 jenkins job
Sponsored by: EMC / Isilon Storage Division

9 years agoDefine `compress` in `__elfN(coredump)` when #ifdef GZIO is true to mute
ngie [Mon, 2 Nov 2015 01:47:26 +0000 (01:47 +0000)]
Define `compress` in `__elfN(coredump)` when #ifdef GZIO is true to mute
an -Wunused-but-set-variable warning

Reported by: FreeBSD_HEAD_amd64_gcc4.9 jenkins job
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd _test suffix to multiple tests in lib/libc to conform to the design noted
ngie [Mon, 2 Nov 2015 01:29:01 +0000 (01:29 +0000)]
Add _test suffix to multiple tests in lib/libc to conform to the design noted
in the FreeBSD Test Suite wiki

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove unused variable (SRCDIR)
ngie [Mon, 2 Nov 2015 01:23:04 +0000 (01:23 +0000)]
Remove unused variable (SRCDIR)

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove unnecessary `if (x)` tests before calling `free(x)`; free(3)
ngie [Mon, 2 Nov 2015 01:22:06 +0000 (01:22 +0000)]
Remove unnecessary `if (x)` tests before calling `free(x)`; free(3)
already employs this check

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoRename etc/periodic/daily/430.status-rwho to periodic/daily/430.status-uptime
ngie [Mon, 2 Nov 2015 01:05:34 +0000 (01:05 +0000)]
Rename etc/periodic/daily/430.status-rwho to periodic/daily/430.status-uptime

The command was checking local/remote system uptime, so rename the script to
match its function and to avoid confusion

The controlling variable in /etc/periodic.conf has been renamed from
daily_status_rwho_enable to daily_status_uptime_enable.

MFC after: 3 days
Reported by: Peter Jeremy <peter@rulingia.com>
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division

9 years agoUse nitems(x) instead of sizeof(x)/sizeof(x[0])
ngie [Mon, 2 Nov 2015 00:42:31 +0000 (00:42 +0000)]
Use nitems(x) instead of sizeof(x)/sizeof(x[0])

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoConditionally install (if_)?(otus|rsu).4, otusfw.4, rsufw.4, and urtwn.4 if
ngie [Mon, 2 Nov 2015 00:39:28 +0000 (00:39 +0000)]
Conditionally install (if_)?(otus|rsu).4, otusfw.4, rsufw.4, and urtwn.4 if
MK_USB != no

Add the manpages to OptionalObsoleteFiles.inc

As a side-effect, this also fixes installworld with MK_USB == no

X-MFC with: r290128
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd mailbox tag/structure for touchscreen buffer address property
gonzo [Sun, 1 Nov 2015 23:50:07 +0000 (23:50 +0000)]
Add mailbox tag/structure for touchscreen buffer address property

9 years agoSynchronize with latest upstream VCHI code:
gonzo [Sun, 1 Nov 2015 22:17:39 +0000 (22:17 +0000)]
Synchronize with latest upstream VCHI code:

- Add LIB_VERSION ioctl
- Add CLOSE_DELIVERED ioctl
- Bump code version

Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5

9 years agosh: Avoid copying argv for simple commands.
jilles [Sun, 1 Nov 2015 22:07:40 +0000 (22:07 +0000)]
sh: Avoid copying argv for simple commands.

Add dummy entries before and after so arglist's array is directly usable as
argv.

9 years agoTreat synchronous VFP exception just like aynchronous: as an FP exception,
gonzo [Sun, 1 Nov 2015 21:59:56 +0000 (21:59 +0000)]
Treat synchronous VFP exception just like aynchronous: as an FP exception,
not as illegal instruction

9 years agoFix lladdr change propagation for on vlans on top of it.
melifaro [Sun, 1 Nov 2015 19:59:04 +0000 (19:59 +0000)]
Fix lladdr change propagation for on vlans on top of it.
Fix lladdr update when setting mac address manually.
Fix lladdr_event for slave ports addition.

MFC after: 4 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D4004

9 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Sun, 1 Nov 2015 19:55:32 +0000 (19:55 +0000)]
drm/i915: Reduce diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after: 2 months

9 years agopfctl: Fix uninitialised veriable
kp [Sun, 1 Nov 2015 17:20:17 +0000 (17:20 +0000)]
pfctl: Fix uninitialised veriable

In pfctl_set_debug() we used 'level' without ever initialising it.
We correctly parsed the option, but them failed to actually assign the parsed
value to 'level' before performing to ioctl() to configure the debug level.

PR: 202996
Submitted by: Andrej Kolontai

9 years agoInstall myself as src committer.
mmel [Sun, 1 Nov 2015 16:54:55 +0000 (16:54 +0000)]
Install myself as src committer.

Approved by: kib (mentor)
> Description of fields to fill in above:                     76 columns --|
> PR:                       If a GNATS PR is affected by the change.
> Submitted by:             If someone else sent in the change.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Empty fields above will be automatically removed.

M    share/misc/committers-src.dot

9 years agoMicrooptimize.
ache [Sun, 1 Nov 2015 08:40:15 +0000 (08:40 +0000)]
Microoptimize.

9 years agoAddition to prev. commit.
ache [Sun, 1 Nov 2015 06:47:05 +0000 (06:47 +0000)]
Addition to prev. commit.
In some edge cases fp->_p can be changed in _sseek(), recalculate.

PR:     204156
MFC after:      1 week

9 years agoDon't seek to the end if write buffer is empty (in append modes).
ache [Sun, 1 Nov 2015 06:15:14 +0000 (06:15 +0000)]
Don't seek to the end if write buffer is empty (in append modes).

PR:             204156
MFC after:      1 week

9 years agoioat: Handle channel-fatal HW errors safely
cem [Sat, 31 Oct 2015 20:38:06 +0000 (20:38 +0000)]
ioat: Handle channel-fatal HW errors safely

Certain invalid operations trigger hardware error conditions.  Error
conditions that only halt one channel can be detected and recovered by
resetting the channel.  Error conditions that halt the whole device are
generally not recoverable.

Add a sysctl to inject channel-fatal HW errors,
'dev.ioat.<N>.force_hw_error=1'.

When a halt due to a channel error is detected, ioat(4) blocks new
operations from being queued on the channel, completes any outstanding
operations with an error status, and resets the channel before allowing
new operations to be queued again.

Update ioat.4 to document error recovery;  document blockfill introduced
in r290021 while we are here;  document ioat_put_dmaengine() added in
r289907;  document DMA_NO_WAIT added in r289982.

Sponsored by: EMC / Isilon Storage Division

9 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Sat, 31 Oct 2015 15:09:31 +0000 (15:09 +0000)]
drm/i915: Reduce diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after: 2 months

9 years agoWe have long double on arm64, and the tests pass so enable them.
andrew [Sat, 31 Oct 2015 10:16:44 +0000 (10:16 +0000)]
We have long double on arm64, and the tests pass so enable them.

Sponsored by: ABT Systems Ltd

9 years agonewsyslog: treat 'c' flag in the config as 'C'
bapt [Sat, 31 Oct 2015 09:45:11 +0000 (09:45 +0000)]
newsyslog: treat 'c' flag in the config as 'C'

When -C was introduced in r114137 the plan was to have -C and -c being used for
"create" due to a typo in FreeBSD <= 4.8 a temporary compatibility hack has been
added to make -c being like -G aka GLOB and a warning was issued for the user to
be aware of the futur change for -c.

12 years later it is more than time to remove that hack and finish the what was
intent in r114137

Submitted by: Alexandre Perrin <alex@kaworu.ch>
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D4000

9 years agoThe error classification from lower layers is a poor indicator of
imp [Sat, 31 Oct 2015 04:53:07 +0000 (04:53 +0000)]
The error classification from lower layers is a poor indicator of
whether an error is recoverable. Always re-dirty the buffer on errors
from write requests. The invalidation we used to do for errors not EIO
doesn't need to be done for a device that's really gone, since that's
done in a different path.

Reviewed by: mckusick@, kib@

9 years agoRather than using the #define for path names, indirect through a char *
imp [Sat, 31 Oct 2015 04:39:55 +0000 (04:39 +0000)]
Rather than using the #define for path names, indirect through a char *
variable that could change for different executable types detected.

9 years agoMove all the paths into a new path.h to centralize them.
imp [Sat, 31 Oct 2015 04:39:28 +0000 (04:39 +0000)]
Move all the paths into a new path.h to centralize them.

9 years agoPrint unsigned memory sizes, to handle >2GB RAM on 32-bit powerpc.
jhibbits [Sat, 31 Oct 2015 02:08:39 +0000 (02:08 +0000)]
Print unsigned memory sizes, to handle >2GB RAM on 32-bit powerpc.

Sponsored by: Alex Perez/Intertial Computing

9 years agoDon't hide stderr when checking ${CC} --version.
bdrewery [Sat, 31 Oct 2015 02:07:30 +0000 (02:07 +0000)]
Don't hide stderr when checking ${CC} --version.

This can have important debugging information such as 'cc: not found' or
'ccache: error: Could not find compiler "cc" in PATH'.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agomips: do mips_sync() on sync operations to uncachable memory.
adrian [Sat, 31 Oct 2015 00:29:26 +0000 (00:29 +0000)]
mips: do mips_sync() on sync operations to uncachable memory.

mips24k/mips74k document that we need an explicit SYNC so to order
things correctly, even with access to uncachable memory.
We were doing calls to SYNC in the cache ops (inv, wbinv) but we
weren't doing it for uncachable memory.

9 years agomips74k: use cache-writeback for memory, not writethrough.
adrian [Sat, 31 Oct 2015 00:04:44 +0000 (00:04 +0000)]
mips74k: use cache-writeback for memory, not writethrough.

When I ported this code from netbsd I was .. slightly mips74k greener.
I used writethrough because (a) it's what netbsd did, and (b) if I used
writethrough then things "didn't work."

Fast-forward a couple years, more MIPS hacking and a whole lot more
understanding of the bus APIs (the last few commits notwithstanding;
it's been a long week, ok?) and I have this working for arge,
argemdio, spi and ath.  Hans has it working for USB.  The ath barrier
code will come in a later commit.

This gets the routing throughput up from 220mbit -> 337mbit.
I'm sure the bridging throughput will be similarly improved.

Tested:

* QCA955x SoC, routing workload.

9 years agoarge_mdio: fix barriers; correctly check MII indicator register.
adrian [Fri, 30 Oct 2015 23:59:52 +0000 (23:59 +0000)]
arge_mdio: fix barriers; correctly check MII indicator register.

* use barriers in a slightly better fashion.  You can blame this
  glass of whiskey on putting barriers in the wrong spot.  Grr adrian.

* steal/rewrite the mdio busy check from ag7100 from openwrt and
  refactor the existing code out.  This is .. more correct.

This seems to fix the boot-to-boot variation that I've been seeing
and it quietens the switch port status flapping.

Tested:

* QCA9558 SoC (AP135.)

Obtained from: Linux OpenWRT

9 years agoarge: fix barrier macro.
adrian [Fri, 30 Oct 2015 23:57:20 +0000 (23:57 +0000)]
arge: fix barrier macro.

9 years agoarge: attempt to close a transmit race by only enabling the descriptor at the end...
adrian [Fri, 30 Oct 2015 23:18:02 +0000 (23:18 +0000)]
arge: attempt to close a transmit race by only enabling the descriptor at the end of setup.

This driver and the linux ag71xx driver both treat the transmit ring
as a circular linked list of descriptors.  There's no "end" pointer
that is ever NULL - instead, it expects the MAC to hit a finished
descriptor (ARGE_DESC_EMPTY) and stop.

Now, since it's a circular buffer, we may end up with the hardware
hitting the beginning of our multi-descriptor frame before we've finished
setting it up. It then DMA's it in, starts sending it, and we finish
writing out the new descriptor.  The hardware may then write its
completion for the next descriptor out; then we do, and when we next
read it it'll show up as "not done" and transmit completion stops.

This unfortunately manifests itself as the transmit queue always
being active and a massive TX interrupt storm.  We need to actively
ACK packets back from the transmit engine and if we don't (eg because
we think the transmit isn't finished but it is) then the unit will
just keep generating interrupts.

I hit this finally with the below testing setup.  This fixed it for me.

Strictly speaking I should put in a sync in between writing out all of
the descriptors and writing out that final descriptor.

Tested:

* QCA9558 SoC (AP135 reference board) w/ arge1 + vlans acting as a
  router, and iperf -d (tcp, bidirectional traffic.)

Obtained from: Linux OpenWRT (ag71xx_main.c.)

9 years agoarge: just use 1U since it's a 32 bit unsigned destination value.
adrian [Fri, 30 Oct 2015 23:09:08 +0000 (23:09 +0000)]
arge: just use 1U since it's a 32 bit unsigned destination value.

9 years agoarge: do an explicit flush between updating the TX ring and starting transmit.
adrian [Fri, 30 Oct 2015 23:07:32 +0000 (23:07 +0000)]
arge: do an explicit flush between updating the TX ring and starting transmit.

The MIPS busdma sync operations currently are a big no-op on coherent memory.
This isn't strictly correct behaviour as we need a SYNC in here to ensure that
the writes have finished and are visible in main memory before the MMIO accesses
occur.  This will have to be addressed in a later commit.

But, before that happens, let's at least do a flush here to make things
more "correct".

This is required for even remotely sensible behaviour on mips74k with
write-through memory enabled.

9 years agoarge_mdio: add explicit read barriers for MDIO_READs.
adrian [Fri, 30 Oct 2015 23:00:47 +0000 (23:00 +0000)]
arge_mdio: add explicit read barriers for MDIO_READs.

The mips74k programmers guide notes that reads can be re-ordered, even
uncached ones, so we need an explicit SYNC between them.

Yes, this is a case of a driver author actively doing a bus barrier
operation.

This ends up being necessary when the mips74k core is run in write-back
mode rather than write-through mode.  That's coming in an upcoming
commit.

Tested:

* mips74k, QCA9558 SoC (AP135 reference board), arge<->arge interface
  routing traffic tests.

9 years agoarge: ensure there's enough space in the TX ring before attempting to
adrian [Fri, 30 Oct 2015 22:55:41 +0000 (22:55 +0000)]
arge: ensure there's enough space in the TX ring before attempting to
send frames.

This matches the other check for space.

"enough" is a misnomer, for "reasons".  The biggest reason is that
the TX ring is actually a circular linked list, with no head/tail pointers.
This is just a bit more headroom between head/tail so we have time to
schedule frames before we hit where the hardware is at.

Ideally this would be tunable and a little larger.

9 years agoarge: do a read-after-write on all arge register writes, not just MDIO writes.
adrian [Fri, 30 Oct 2015 22:53:30 +0000 (22:53 +0000)]
arge: do a read-after-write on all arge register writes, not just MDIO writes.

This flushes out the write to the system before anything continues.

The mips74k guide, chapter 3.3.3 (write gathering) notes that writes
can be buffered in FIFOs - even uncached ones - so we can't guarantee
the device has felt its effects.  Now, since we're all lazy driver
authors and don't pepper read/write barriers everywhere, fake it here.

tested:

* mips74k - QCA9558 SoC (AP135 reference board)

9 years agoRemove unneeded _RECURSING_PROGS check.
bdrewery [Fri, 30 Oct 2015 21:23:14 +0000 (21:23 +0000)]
Remove unneeded _RECURSING_PROGS check.

It is definitely not needed after r288158, and is a private variable as well
that should not be checked here.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoMerge OpenSSL 1.0.2d.
jkim [Fri, 30 Oct 2015 20:51:33 +0000 (20:51 +0000)]
Merge OpenSSL 1.0.2d.

9 years agoMinor (and incomplete) style cleanup.
kib [Fri, 30 Oct 2015 20:47:42 +0000 (20:47 +0000)]
Minor (and incomplete) style cleanup.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoUpdate ls -l tests to use mtime, not birthtime
emaste [Fri, 30 Oct 2015 20:14:32 +0000 (20:14 +0000)]
Update ls -l tests to use mtime, not birthtime

PR: 204155
Reviewed by: ngie, rodrigc
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4040

9 years agoAlso mark compat32 umtx op table as constant.
kib [Fri, 30 Oct 2015 19:32:30 +0000 (19:32 +0000)]
Also mark compat32 umtx op table as constant.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week