]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoMake the PAM password strength checking module WARNS=2 safe.
will [Tue, 27 Aug 2013 15:50:26 +0000 (15:50 +0000)]
Make the PAM password strength checking module WARNS=2 safe.

lib/libpam/modules/pam_passwdqc/Makefile:
Bump WARNS to 2.

contrib/pam_modules/pam_passwdqc/pam_passwdqc.c:
Bump  _XOPEN_SOURCE and _XOPEN_VERSION from 500 to 600
so that vsnprint() is declared.

Use the two new union types (pam_conv_item_t and
pam_text_item_t) to resolve strict aliasing violations
caused by casts to comply with the pam_get_item() API taking
a "const void **" for all item types.  Warnings are
generated for casts that create "type puns" (pointers of
conflicting sized types that are set to access the same
memory location) since these pointers may be used in ways
that violate C's strict aliasing rules.  Casts to a new
type must be performed through a union in order to be
compliant, and access must be performed through only one
of the union's data types during the lifetime of the union
instance.  Handle strict-aliasing warnings through pointer
assignments, which drastically simplifies this change.

Correct a CLANG "printf-like function with more arguments
than format" error.

Submitted by: gibbs
Sponsored by: Spectra Logic

11 years agoAllow more space for interface names.
gavin [Tue, 27 Aug 2013 15:06:39 +0000 (15:06 +0000)]
Allow more space for interface names.

MFC after: 1 week

11 years agoIt was brought to my attention that SVN r252862 was incomplete. It needed
dteske [Tue, 27 Aug 2013 14:48:01 +0000 (14:48 +0000)]
It was brought to my attention that SVN r252862 was incomplete. It needed
to also make this change, to completely deprecate WITH_BSDCONFIG.

11 years agoUse the new ieee80211_tx_complete() function.
adrian [Tue, 27 Aug 2013 14:39:37 +0000 (14:39 +0000)]
Use the new ieee80211_tx_complete() function.

11 years agoCreate a new function to complete 802.11 mbuf transmission.
adrian [Tue, 27 Aug 2013 14:37:13 +0000 (14:37 +0000)]
Create a new function to complete 802.11 mbuf transmission.

The aim of this function is to eventually be the completion entry point
for all 802.11 encapsulated mbufs.  All the wifi drivers end up doing
what is in this function so it's an easy win to turn it into a net80211
method and abstract out this code.

Ideally the drivers will all eventually be modified to queue up completed
mbufs and call this function with all the driver locks not held.
This will allow for some much more interesting software queue handling
in the future (like net80211 based A-MSDU, fast-frames, A-MPDU aggregation
and retransmission.)

Tested:

* ath(4), iwn(4)

11 years agoFix a crash when reloading the configuration file.
hrs [Tue, 27 Aug 2013 11:50:33 +0000 (11:50 +0000)]
Fix a crash when reloading the configuration file.

Spotted by: des

11 years agoAdd missing newlines to Fibre Channel attributes output.
mav [Tue, 27 Aug 2013 06:50:46 +0000 (06:50 +0000)]
Add missing newlines to Fibre Channel attributes output.

11 years agoUpdate copyright.
dteske [Tue, 27 Aug 2013 06:09:28 +0000 (06:09 +0000)]
Update copyright.

11 years agoFix 'make release' on older hosts: use buildworld legacy utilities.
will [Tue, 27 Aug 2013 04:42:42 +0000 (04:42 +0000)]
Fix 'make release' on older hosts: use buildworld legacy utilities.

Newer FreeBSD installs require an install(1) that supports the new flags.

This adds ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp/legacy/{bin,usr/{bin,sbin}}
to the PATH while generating an mtree database for 'make release'.

Note that the problem only exists here because mm-mtree.sh generates
its own object tree to avoid mucking with the existing one, which
results in a PATH containing legacy utility dirs that are empty.

11 years agoCouple minor if_vmx tweaks
bryanv [Tue, 27 Aug 2013 04:05:18 +0000 (04:05 +0000)]
Couple minor if_vmx tweaks

  - Use queue size fields from the Tx/Rx queues in various places
    instead of (currently the same values) from the softc.
  - Fix potential crash in detach if the attached failed to alloc
    queue memory.
  - Move the VMXNET3_MAX_RX_SEGS define to a better spot.
  - Tweak frame size calculation w.r.t. ETHER_ALIGN. This could be
    tweaked some more, or removed since it probably doesn't matter
    much for x86 (and the x86 class of machines this driver will
    be used on).

11 years agoBuild all ZFS testing & debugging tools with -g.
will [Tue, 27 Aug 2013 04:01:31 +0000 (04:01 +0000)]
Build all ZFS testing & debugging tools with -g.

These programs and everything using libzpool rely on the embedded asserts to
verify the correctness of operations.  Given that, the core dumps would be
useless without debug symbols.

11 years agoFix off-by-1 error in assert.
grehan [Tue, 27 Aug 2013 03:49:47 +0000 (03:49 +0000)]
Fix off-by-1 error in assert.

Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)

11 years agoFixes for compatibility with QEMU:
gonzo [Tue, 27 Aug 2013 01:40:13 +0000 (01:40 +0000)]
Fixes for compatibility with QEMU:

- Route PCI interrupt for NIC
- Make "no mapping" warning more user-friendly: add device name and mention
    that it's IRQ mapping
- Do not overlap ICUs' IO window with PCI devices' IO windows by starting
    IO rman at offset 0x100

11 years agoWhen allocating a pbuf for the cluster write, do not sleep waiting
kib [Tue, 27 Aug 2013 01:31:12 +0000 (01:31 +0000)]
When allocating a pbuf for the cluster write, do not sleep waiting
for the available pbuf when passed vnode is backing md(4). Other i/o
directed to the same md device might already hold pbufs, and then we
could deadlock since only our progress can free a pbuf needed for
wakeup.

Obtained from: projects/vm6
Reminded and tested by: pho
MFC after: 1 week

11 years ago- Initialize freq variable so we will not end up with random value
gonzo [Tue, 27 Aug 2013 01:08:55 +0000 (01:08 +0000)]
- Initialize freq variable so we will not end up with random value
    if there is no YAMON present

11 years agoAdd the ability to display the default FIB number for a process to the
will [Mon, 26 Aug 2013 23:48:21 +0000 (23:48 +0000)]
Add the ability to display the default FIB number for a process to the
ps(1) utility, e.g. "ps -O fib".

bin/ps/keyword.c:
Add the "fib" keyword and default its column name to "FIB".

bin/ps/ps.1:
Add "fib" as a supported keyword.

sys/compat/freebsd32/freebsd32.h:
sys/kern/kern_proc.c:
sys/sys/user.h:
Add the default fib number for a process (p->p_fibnum)
to the user land accessible process data of struct kinfo_proc.

Submitted by: Oliver Fromme <olli@fromme.com>, gibbs

11 years agoBuilding upon SVN r254237, disable automated activation of alternate layouts
dteske [Mon, 26 Aug 2013 23:37:11 +0000 (23:37 +0000)]
Building upon SVN r254237, disable automated activation of alternate layouts
and add support for default underride to $loader_version, acting as a way to
name a release. Release text is not displayed for the aforementioned feature
of alternate display layout (introduced in r254237); however, for all other
layouts (incl. default), the release name is displayed at lower-right.

See version.4th(8) for additional information and/or historical details.
NOTE: Also a minor edit to version.4th(8) while we're here.

11 years agoMerge various CTF fixes from illumos
pfg [Mon, 26 Aug 2013 22:29:42 +0000 (22:29 +0000)]
Merge various CTF fixes from illumos

2942 CTF tools need to handle files which legitimately lack data
2978 ctfconvert still needs to ignore legitimately dataless files on SPARC

Illumos Revisions: 13745:6b3106b4250f
13754:7231b684c18b

Reference:

https://www.illumos.org/issues/2942
https://www.illumos.org/issues/2978

MFC after: 3 weeks

11 years agoReimplement the FDOPT_NOERROR feature that was kicked out in r134081.
joerg [Mon, 26 Aug 2013 21:15:50 +0000 (21:15 +0000)]
Reimplement the FDOPT_NOERROR feature that was kicked out in r134081.

It is needed for fdread(1) in order to be able to recover from CRC
errors in the data field of a floppy sector (by returning the sector
data that failed CRC, rather than inventing dummy data).

When closing the device, clear all transient device options.

MFC after: 1 week

11 years agoMFprojects/camlock r254895:
mav [Mon, 26 Aug 2013 20:39:02 +0000 (20:39 +0000)]
MFprojects/camlock r254895:
Add unmapped BIO support to GEOM ZERO if kern.geom.zero.clear is cleared.

11 years agoUse correct mailbox and PCIe PF number when querying RDMA parameters.
np [Mon, 26 Aug 2013 19:02:52 +0000 (19:02 +0000)]
Use correct mailbox and PCIe PF number when querying RDMA parameters.

11 years agofix up some comments and a white space issue...
jmg [Mon, 26 Aug 2013 18:53:19 +0000 (18:53 +0000)]
fix up some comments and a white space issue...

MFC after: 3 days

11 years agofix up my copyright and remove third clause..
jmg [Mon, 26 Aug 2013 18:51:48 +0000 (18:51 +0000)]
fix up my copyright and remove third clause..

11 years agofix up my copyright..
jmg [Mon, 26 Aug 2013 18:50:40 +0000 (18:50 +0000)]
fix up my copyright..

11 years agonone of the drivers in the tree support CDIOCCAPABILITY or CDIOCPITCH..
jmg [Mon, 26 Aug 2013 18:47:10 +0000 (18:47 +0000)]
none of the drivers in the tree support CDIOCCAPABILITY or CDIOCPITCH..
remove the documentation so people won't get confused and think they
are supported...

11 years agoRemove most of the remaining sysctl name list macros. They were only
jhb [Mon, 26 Aug 2013 18:16:05 +0000 (18:16 +0000)]
Remove most of the remaining sysctl name list macros.  They were only
ever intended for use in sysctl(8) and it has not used them for many
years.

Reviewed by: bde
Tested by: exp-run by bdrewery

11 years agoAdd support for my:
jmg [Mon, 26 Aug 2013 17:38:36 +0000 (17:38 +0000)]
Add support for my:
CPU: AMD A10-5700 APU with Radeon(tm) HD Graphics    (3393.89-MHz K8-class CPU)

11 years agoJoerg was my mentor way back when...
jmg [Mon, 26 Aug 2013 17:36:55 +0000 (17:36 +0000)]
Joerg was my mentor way back when...

11 years agokdump: Decode SOCK_CLOEXEC and SOCK_NONBLOCK in socket() and socketpair().
jilles [Mon, 26 Aug 2013 17:22:51 +0000 (17:22 +0000)]
kdump: Decode SOCK_CLOEXEC and SOCK_NONBLOCK in socket() and socketpair().

11 years agoAdd more obsolete files.
antoine [Mon, 26 Aug 2013 17:21:40 +0000 (17:21 +0000)]
Add more obsolete files.

11 years agoRegenerate src.conf.5
antoine [Mon, 26 Aug 2013 17:18:21 +0000 (17:18 +0000)]
Regenerate src.conf.5

11 years agoDocument WITHOUT_ICONV, WITH_LIBICONV_COMPAT and WITH_USB_GADGET_EXAMPLES
antoine [Mon, 26 Aug 2013 17:15:56 +0000 (17:15 +0000)]
Document WITHOUT_ICONV, WITH_LIBICONV_COMPAT and WITH_USB_GADGET_EXAMPLES

11 years agoIntroduce superpages support for ARMv6/v7.
raj [Mon, 26 Aug 2013 17:12:30 +0000 (17:12 +0000)]
Introduce superpages support for ARMv6/v7.

Promoting base pages to superpages can increase TLB coverage and allow for
efficient use of page table entries.  This development provides FreeBSD/ARM
with superpages management mechanism roughly equivalent to what we have for
i386 and amd64 architectures.

1. Add mechanism for automatic promotion of 4KB page mappings to 1MB section
   mappings (and demotion when not needed, respectively).

2. Managed and non-kernel mappings are now superpages-aware.

3. The functionality can be enabled by setting "vm.pmap.sp_enabled" tunable to
   a non-zero value (either in loader.conf or by modifying "sp_enabled"
   variable in pmap-v6.c file).  By default, automatic promotion is currently
   disabled.

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Reviewed by: alc
Sponsored by: The FreeBSD Foundation, Semihalf

11 years agoHook vm_page_busy.9 to the build
antoine [Mon, 26 Aug 2013 16:38:40 +0000 (16:38 +0000)]
Hook vm_page_busy.9 to the build

11 years agoProvide settings for superpage reservation system on ARM.
raj [Mon, 26 Aug 2013 16:23:54 +0000 (16:23 +0000)]
Provide settings for superpage reservation system on ARM.

This allows for enabling and configuring superpages reservation mechanism in
order to allocate and populate 256 4KB base pages (for the purpose of
promotion to a 1MB superpage).

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Reviewed by: alc
Sponsored by: The FreeBSD Foundation, Semihalf

11 years agoAdd missing TAILQ initializer (omitted in r250634).
raj [Mon, 26 Aug 2013 15:38:27 +0000 (15:38 +0000)]
Add missing TAILQ initializer (omitted in r250634).

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Reviewed by: alc
Sponsored by: The FreeBSD Foundation, Semihalf

11 years agoRemove comment that is no longer relevant since r254182.
glebius [Mon, 26 Aug 2013 14:14:25 +0000 (14:14 +0000)]
Remove comment that is no longer relevant since r254182.

11 years agoFix mbuf debugging printf()'s after the recent mbuf header changes.
andre [Mon, 26 Aug 2013 13:17:37 +0000 (13:17 +0000)]
Fix mbuf debugging printf()'s after the recent mbuf header changes.

11 years agoAdd support to reconfigure a drive as SYSPD (real JBOD in LSI
sbruno [Mon, 26 Aug 2013 12:05:38 +0000 (12:05 +0000)]
Add support to reconfigure a drive as SYSPD (real JBOD in LSI
terminology).

Adds command "mfiutil syspd <drive#>" to change a drive to SYSPD.  Drive
will then be scanned/reported immediately as /dev/mfisyspdX by the host.

"mfiutil good <drive#>" clears SYSPD mode, remove /dev/mfisyspdX and
sets disk into UNCONFIGURED mode.

Tested on Dell H310 SAS/SATA RAID controller.

MFC after: 2 weeks
Sponsored by: Yahoo! Inc.

11 years agoUpdate the root device to be correct for use with crochet.
andrew [Mon, 26 Aug 2013 10:27:15 +0000 (10:27 +0000)]
Update the root device to be correct for use with crochet.

11 years agoRevert r251370 as it contains a deadlock.
andrew [Mon, 26 Aug 2013 10:24:59 +0000 (10:24 +0000)]
Revert r251370 as it contains a deadlock.

11 years agoMigrate the ff_encap1() routine out into the normal output code.
adrian [Mon, 26 Aug 2013 09:52:05 +0000 (09:52 +0000)]
Migrate the ff_encap1() routine out into the normal output code.

This will eventually be used by the A-MSDU encapsulation code that
I'm writing - the sub-frame encapsulation requirement is the same.

11 years agodrm/radeon: Disable build on i386/pc98
dumbbell [Mon, 26 Aug 2013 09:17:21 +0000 (09:17 +0000)]
drm/radeon: Disable build on i386/pc98

11 years agodrm/radeon: Rename the (S)DEBUG macros in atom.c to avoid conflicts
dumbbell [Mon, 26 Aug 2013 06:31:57 +0000 (06:31 +0000)]
drm/radeon: Rename the (S)DEBUG macros in atom.c to avoid conflicts

For instance, DEBUG is already defined in the LINT kernel configuration.
This fixes the build of LINT.

11 years agoThe second last argument of udp:::receive is supposed to contain the
markj [Mon, 26 Aug 2013 00:28:57 +0000 (00:28 +0000)]
The second last argument of udp:::receive is supposed to contain the
connection state, not the IP header.

X-MFC with: r254889

11 years agoImplement the ip, tcp, and udp DTrace providers. The probe definitions use
markj [Sun, 25 Aug 2013 21:54:41 +0000 (21:54 +0000)]
Implement the ip, tcp, and udp DTrace providers. The probe definitions use
dynamic translation so that their arguments match the definitions for
these providers in Solaris and illumos. Thus, existing scripts for these
providers should work unmodified on FreeBSD.

Tested by: gnn, hiren
MFC after: 1 month

11 years agoFix fcntl F_GETFL F_SETFL for files opened execute-only (O_EXEC).
jilles [Sun, 25 Aug 2013 21:52:04 +0000 (21:52 +0000)]
Fix fcntl F_GETFL F_SETFL for files opened execute-only (O_EXEC).

The FFLAGS and OFLAGS now work correctly also for files opened with O_EXEC.
Except possibly fuse, the other users pass values without O_EXEC set. fuse
appears to assume O_EXEC is handled correctly.

Although F_SETFL may not be commonly used for execute-only file descriptors,
F_GETFL may be useful to find the access mode.

11 years agoBump __FreeBSD_version to 1000051 after Radeon KMS driver import
dumbbell [Sun, 25 Aug 2013 20:01:21 +0000 (20:01 +0000)]
Bump __FreeBSD_version to 1000051 after Radeon KMS driver import

11 years agodrm/radeon: Import the Radeon KMS driver
dumbbell [Sun, 25 Aug 2013 19:37:15 +0000 (19:37 +0000)]
drm/radeon: Import the Radeon KMS driver

This driver is based on Linux 3.8 and a previous effort by kan@.

More informations about this project can be found on the FreeBSD wiki:
    https://wiki.freebsd.org/AMD_GPU

The driver is split into:

  sys/dev/drm2:
    The driver sources.

  sys/modules/drm2/radeonkmw:
    The driver main kernel module's Makefile.

  sys/modules/drm2/radeonkmsfw:
    All firmware kernel module Makefiles. There's one directory and one
    Makefile for each firmware.

  sys/contrib/dev/drm2/radeonkmsfw:
    All firmware binary sources.

  tools/tools/drm/radeon
    Tools to update firmwares or regenerate some headers.

Merging the driver to FreeBSD 9.x may be possible but not a priority for
now.

Help from: kib@, kan@
Tested by: avg@, kwm@, ray@,
Alexander Yerenkow <yerenkow@gmail.com>,
Anders Bolt-Evensen <andersbo87@me.com>,
Denis Djubajlo <stdedjub@googlemail.com>,
J.R. Oldroyd <fbsd@opal.com>,
Mikaël Urankar <mikael.urankar@gmail.com>,
Pierre-Emmanuel Pédron <pepcitron@gmail.com>,
Sam Fourman Jr. <sfourman@gmail.com>,
Wade <wade-is-great@live.com>,
(probably other I forgot...)
HW donations: kyzh, Yakaz

11 years agovga_pci: Remove left-over debugging printf()'s
dumbbell [Sun, 25 Aug 2013 18:23:15 +0000 (18:23 +0000)]
vga_pci: Remove left-over debugging printf()'s

11 years agovga_pci: Add API to map the Video BIOS
dumbbell [Sun, 25 Aug 2013 18:09:11 +0000 (18:09 +0000)]
vga_pci: Add API to map the Video BIOS

Here are two new functions to map and unmap the Video BIOS:
    void * vga_pci_map_bios(device_t dev, size_t *size);
    void   vga_pci_unmap_bios(device_t dev, void *bios);

The BIOS is either taken from the shadow copy made by the System BIOS at
boot time if the given device was used for the default display (i386,
amd64 and ia64 only), or from the PCI expansion ROM.

Additionally, one can determine if a given device was the default
display at boot time using the following new function:
    void   vga_pci_unmap_bios(device_t dev, void *bios);

11 years agodrm: Use the new drm_atomic.h, following the merge of projects/atomic64
dumbbell [Sun, 25 Aug 2013 15:38:16 +0000 (15:38 +0000)]
drm: Use the new drm_atomic.h, following the merge of projects/atomic64

Submitted by: jkim@

11 years agodrm/ttm: Remove unused VM_ALLOC_DMA32 define
dumbbell [Sun, 25 Aug 2013 15:33:17 +0000 (15:33 +0000)]
drm/ttm: Remove unused VM_ALLOC_DMA32 define

11 years agodrm/ttm: Fix a reversed condition and add missing locks
dumbbell [Sun, 25 Aug 2013 15:29:23 +0000 (15:29 +0000)]
drm/ttm: Fix a reversed condition and add missing locks

This allows to run OpenGL applications on at least two test machines
with the Radeon driver.

Approved by: kib@

11 years agodrm/ttm: Fix style in ttm_bo_release_mmap()
dumbbell [Sun, 25 Aug 2013 15:26:45 +0000 (15:26 +0000)]
drm/ttm: Fix style in ttm_bo_release_mmap()

11 years agodrm/ttm: Fix unmap of buffer object
dumbbell [Sun, 25 Aug 2013 15:15:55 +0000 (15:15 +0000)]
drm/ttm: Fix unmap of buffer object

Add a new ttm_bo_release_mmap() function to unmap pages in a
vm_object_t. Pages are freed when the buffer object is later released.

This function is called in ttm_bo_unmap_virtual_locked(), replacing
Linux' unmap_mapping_range(). In particular this is called when a buffer
object is about to be moved, so that its mapping is invalidated.

However, we don't use this function in ttm_bo_vm_dtor(), because the
vm_object_t is already marked as OBJ_DEAD and the pages will be
unmapped.

Approved by: kib@

11 years agottm: "to_page->valid = VM_PAGE_BITS_ALL" before vm_page_dirty(to_page)
dumbbell [Sun, 25 Aug 2013 15:12:26 +0000 (15:12 +0000)]
ttm: "to_page->valid = VM_PAGE_BITS_ALL" before vm_page_dirty(to_page)

Approved by; kib@

11 years agodrm/ttm: Improve comment in ttm_bo_vm_ctor() about lack of ref acquisition
dumbbell [Sun, 25 Aug 2013 15:06:48 +0000 (15:06 +0000)]
drm/ttm: Improve comment in ttm_bo_vm_ctor() about lack of ref acquisition

Approved by: kib@

11 years agodrm/ttm: When removing a range of pages from a pool, remove all of them
dumbbell [Sun, 25 Aug 2013 15:05:22 +0000 (15:05 +0000)]
drm/ttm: When removing a range of pages from a pool, remove all of them

Submitted by: Mark Kettenis and Jonathan Gray from OpenBSD
Approved by: kib@

11 years agodrm/ttm: Fix style errors
dumbbell [Sun, 25 Aug 2013 15:01:35 +0000 (15:01 +0000)]
drm/ttm: Fix style errors

11 years agodrm/ttm: Make ttm_bo_wait() call uninterruptible in page fault handler
dumbbell [Sun, 25 Aug 2013 15:00:48 +0000 (15:00 +0000)]
drm/ttm: Make ttm_bo_wait() call uninterruptible in page fault handler

This fixes a crash where a SIGLALRM, heavily used by X.Org, would
interrupt the wait, causing the page fault to fail and the "Xorg"
process to receive a SIGSEGV.

Approved by: kib@

11 years agodrm/ttm: Import Linux commit ff7c60c580d9722f820d85c9c58ca55ecc1ee7c4
dumbbell [Sun, 25 Aug 2013 14:58:44 +0000 (14:58 +0000)]
drm/ttm: Import Linux commit ff7c60c580d9722f820d85c9c58ca55ecc1ee7c4

Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Jan 14 15:08:14 2013 +0100

    drm/ttm: fix fence locking in ttm_buffer_object_transfer, 2nd try

    This fixes up

    commit e8e89622ed361c46bf90ba4828e685a8b603f7e5
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Tue Dec 18 22:25:11 2012 +0100

        drm/ttm: fix fence locking in ttm_buffer_object_transfer

    which leaves behind a might_sleep in atomic context, since the
    fence_lock spinlock is held over a kmalloc(GFP_KERNEL) call. The fix
    is to revert the above commit and only take the lock where we need it,
    around the call to ->sync_obj_ref.

    v2: Fixup things noticed by Maarten Lankhorst:
    - Brown paper bag locking bug.
    - No need for kzalloc if we clear the entire thing on the next line.
    - check for bo->sync_obj (totally unlikely race, but still someone
      else could have snuck in) and clear fbo->sync_obj if it's cleared
      already.

Reported-by: Dave Airlie <airlied@gmail.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Approved by: kib@

11 years agodrm/ttm: Import Linux commit 014b34409fb2015f63663b6cafdf557fdf289628
dumbbell [Sun, 25 Aug 2013 14:56:14 +0000 (14:56 +0000)]
drm/ttm: Import Linux commit 014b34409fb2015f63663b6cafdf557fdf289628

Author: Dave Airlie <airlied@gmail.com>
Date:   Wed Jan 16 15:58:34 2013 +1000

    ttm: on move memory failure don't leave a node dangling

    if we have a move notify callback, when moving fails, we call move notify
    the opposite way around, however this ends up with *mem containing the mm_node
    from the bo, which means we double free it. This is a follow on to the previous
    fix.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Approved by: kib@

11 years agodrm/ttm: Import Linux commit 630541863b29f88c7ab34e647758344e4cd1eafd
dumbbell [Sun, 25 Aug 2013 14:55:08 +0000 (14:55 +0000)]
drm/ttm: Import Linux commit 630541863b29f88c7ab34e647758344e4cd1eafd

Author: Dave Airlie <airlied@gmail.com>
Date:   Wed Jan 16 14:25:44 2013 +1000

    ttm: don't destroy old mm_node on memcpy failure

    When we are using memcpy to move objects around, and we fail to memcpy
    due to lack of memory to populate or failure to finish the copy, we don't
    want to destroy the mm_node that has been copied into old_copy.

    While working on a new kms driver that uses memcpy, if I overallocated bo's
    up to the memory limits, and eviction failed, then machine would oops soon
    after due to having an active bo with an already freed drm_mm embedded in it,
    freeing it a second time didn't end well.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Approved by: kib@

11 years agodrm/ttm: Import Linux commit cc4c0c4de3c775be22072ec3251f2e581b63d9a0
dumbbell [Sun, 25 Aug 2013 14:53:39 +0000 (14:53 +0000)]
drm/ttm: Import Linux commit cc4c0c4de3c775be22072ec3251f2e581b63d9a0

Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Jan 15 14:57:28 2013 +0100

    drm/ttm: unexport ttm_bo_wait_unreserved

    All legitimate users of this function outside ttm_bo.c are gone, now
    it's only an implementation detail.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Approved by: kib@

11 years agodrm/ttm: Import Linux commit f2d476a110bc24fde008698ae9018c99e803e25c
dumbbell [Sun, 25 Aug 2013 14:52:20 +0000 (14:52 +0000)]
drm/ttm: Import Linux commit f2d476a110bc24fde008698ae9018c99e803e25c

Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Jan 15 14:57:10 2013 +0100

    drm/ttm: use ttm_bo_reserve_slowpath_nolru in ttm_eu_reserve_buffers, v2

    This requires re-use of the seqno, which increases fairness slightly.
    Instead of spinning with a new seqno every time we keep the current one,
    but still drop all other reservations we hold. Only when we succeed,
    we try to get back our other reservations again.

    This should increase fairness slightly as well.

    Changes since v1:
     - Increase val_seq before calling ttm_bo_reserve_slowpath_nolru and
       retrying to take all entries to prevent a race.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Approved by: kib@

11 years agodrm/ttm: Import Linux commit 5e45d7dfd74100d622f9cdc70bfd1f9fae1671de
dumbbell [Sun, 25 Aug 2013 14:47:22 +0000 (14:47 +0000)]
drm/ttm: Import Linux commit 5e45d7dfd74100d622f9cdc70bfd1f9fae1671de

Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Jan 15 14:57:05 2013 +0100

    drm/ttm: add ttm_bo_reserve_slowpath

    Instead of dropping everything, waiting for the bo to be unreserved
    and trying over, a better strategy would be to do a blocking wait.

    This can be mapped a lot better to a mutex_lock-like call.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Approved by: kib@

11 years agodrm/ttm: Import Linux commit 7a1863084c9d90ce4b67d645bf9b0f1612e68f62
dumbbell [Sun, 25 Aug 2013 14:41:22 +0000 (14:41 +0000)]
drm/ttm: Import Linux commit 7a1863084c9d90ce4b67d645bf9b0f1612e68f62

Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Jan 15 14:56:48 2013 +0100

    drm/ttm: cleanup ttm_eu_reserve_buffers handling

    With the lru lock no longer required for protecting reservations we
    can just do a ttm_bo_reserve_nolru on -EBUSY, and handle all errors
    in a single path.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
11 years agodrm/ttm: Import Linux commit 63d0a4195560362e2e00a3ad38fc331d34e1da9b
dumbbell [Sun, 25 Aug 2013 14:39:51 +0000 (14:39 +0000)]
drm/ttm: Import Linux commit 63d0a4195560362e2e00a3ad38fc331d34e1da9b

Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Jan 15 14:56:37 2013 +0100

    drm/ttm: remove lru_lock around ttm_bo_reserve

    There should no longer be assumptions that reserve will always succeed
    with the lru lock held, so we can safely break the whole atomic
    reserve/lru thing. As a bonus this fixes most lockdep annotations for
    reservations.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
11 years agodrm: Update drm_atomic.h, now that projects/atomic64 is in HEAD
dumbbell [Sun, 25 Aug 2013 14:33:49 +0000 (14:33 +0000)]
drm: Update drm_atomic.h, now that projects/atomic64 is in HEAD

Submitted by: jkim@

11 years agodrm: Add missing bits to drmP.h, required by the Radeon driver
dumbbell [Sun, 25 Aug 2013 14:27:14 +0000 (14:27 +0000)]
drm: Add missing bits to drmP.h, required by the Radeon driver

Some of the FreeBSD-specific definitions are moved to drm_os_freebsd.h.
But there's still work to do to clean it up and reduce the diff with
Linux' drmP.h.

11 years agoFix CSUM compatibility mapping. SCTP is a layer 4 protocol.
andre [Sun, 25 Aug 2013 13:30:37 +0000 (13:30 +0000)]
Fix CSUM compatibility mapping.  SCTP is a layer 4 protocol.

Submitted by: tuexen

11 years agoUpdate the mis-predicted branch PMC names (for sandy bridge) to not clash.
adrian [Sun, 25 Aug 2013 12:58:34 +0000 (12:58 +0000)]
Update the mis-predicted branch PMC names (for sandy bridge) to not clash.

The SDM (June 2013) tables on these are rather confusing.  Yes, they
assign the same name (BR_MISP_RETIRED.ALL_BRANCHES) to two codes
(C5H/00H and C5H/04H.) The latter however is the PEBS version.

So, to make it easier to see the difference - and yes, we can use
both without having to actually enable the PEBS specific bits! -
just rename the PEBS one to _PS so there's no clashing.

Tested:

* Sandy bridge

11 years agoProvide human readable debug output.
tuexen [Sun, 25 Aug 2013 12:44:03 +0000 (12:44 +0000)]
Provide human readable debug output.

11 years agodrm: Import drm_fixed.h from Linux 3.8
dumbbell [Sun, 25 Aug 2013 12:27:15 +0000 (12:27 +0000)]
drm: Import drm_fixed.h from Linux 3.8

11 years agodrm: Update drm_pciids.h based on Linux 3.8
dumbbell [Sun, 25 Aug 2013 12:20:57 +0000 (12:20 +0000)]
drm: Update drm_pciids.h based on Linux 3.8

This header can be easily updated using the new "gen-drm_pciids" script,
available in tools/tools/drm. The script uses the Linux' drm_pciids.h
header for new IDs, the FreeBSD's one because we add the name of the
device to each IDs, and the PCI IDs database (misc/pciids port) to fill
this name automatically for new IDS.

To call the script:
  tools/tools/drm/gen-drm_pciids \
    /path/to/linux/drm_pciids.h \
    /path/to/freebsd/drm_pciids.h \
    /path/to/pciids/pci.ids

11 years agoDisable lldb target support not (currently) of interest
emaste [Sun, 25 Aug 2013 12:07:34 +0000 (12:07 +0000)]
Disable lldb target support not (currently) of interest

- Remote iOS debugging
- OS X symbol provider, core files
- PECOFF object files
- Linux platform support

Sponsored by: DARPA, AFRL

11 years agoFix a >80 character long line, introduced in my previous commit.
adrian [Sun, 25 Aug 2013 12:02:20 +0000 (12:02 +0000)]
Fix a >80 character long line, introduced in my previous commit.

Noticed by: hiren

11 years agosh: Recognize "--" as end of options in alias builtin.
jilles [Sun, 25 Aug 2013 11:42:53 +0000 (11:42 +0000)]
sh: Recognize "--" as end of options in alias builtin.

Aliases starting with "-" (which are non-POSIX) will need to be preceded by
an alias not starting with "-" or the newly added "--".

11 years agodrm: Import drm_pcie_get_speed_cap_mask() in drm_pci.c
dumbbell [Sun, 25 Aug 2013 11:34:37 +0000 (11:34 +0000)]
drm: Import drm_pcie_get_speed_cap_mask() in drm_pci.c

This comes with several PCI_VENDOR_ID_* defines which should go in a
more central place.

11 years agoAdd the frame information to cpu_switch to allow us to unwind out of it,
andrew [Sun, 25 Aug 2013 11:23:38 +0000 (11:23 +0000)]
Add the frame information to cpu_switch to allow us to unwind out of it,
for example when dumping threads in the kernel debugger.

11 years agoAdd the unwind information to irq_entry so we can pass through it when
andrew [Sun, 25 Aug 2013 11:21:03 +0000 (11:21 +0000)]
Add the unwind information to irq_entry so we can pass through it when
unwinding the stack.

11 years agoBump FreeBSD_version after the struct mbuf changes in r254780,
andre [Sun, 25 Aug 2013 11:01:18 +0000 (11:01 +0000)]
Bump FreeBSD_version after the struct mbuf changes in r254780,
r254799, r254804, r254807, and r254842.

Sponsored by: The FreeBSD Foundation

11 years agosh: Disallow empty simple commands.
jilles [Sun, 25 Aug 2013 10:57:48 +0000 (10:57 +0000)]
sh: Disallow empty simple commands.

As per POSIX, a simple command must have at least one redirection,
assignment word or command word.

These occured in rare cases such as  eval "f()" .

The extension of allowing no commands inside { }, if, while, for, etc.
remains.

11 years agoGive (*ext_free) an int return value allowing for very sophisticated
andre [Sun, 25 Aug 2013 10:57:09 +0000 (10:57 +0000)]
Give (*ext_free) an int return value allowing for very sophisticated
external mbuf buffer management capabilities in the future.

For now only EXT_FREE_OK is defined with current legacy behavior.

Sponsored by: The FreeBSD Foundation

11 years agodrm: Import list_for_each_entry_safe_from() macro
dumbbell [Sun, 25 Aug 2013 10:28:02 +0000 (10:28 +0000)]
drm: Import list_for_each_entry_safe_from() macro

11 years agodrm: Use DRM_IF_MAJOR & DRM_IF_MINOR from drm_core.h
dumbbell [Sun, 25 Aug 2013 10:13:23 +0000 (10:13 +0000)]
drm: Use DRM_IF_MAJOR & DRM_IF_MINOR from drm_core.h

11 years agodrm: In drm_gem_name_create(), verify argument before acquiring lock
dumbbell [Sun, 25 Aug 2013 10:04:10 +0000 (10:04 +0000)]
drm: In drm_gem_name_create(), verify argument before acquiring lock

Submitted by: J.R. Oldroyd <jr@opal.com>

11 years agodrm: Call "gem_close_object" driver callback from drm_gem_object_release_handle()
dumbbell [Sun, 25 Aug 2013 10:01:59 +0000 (10:01 +0000)]
drm: Call "gem_close_object" driver callback from drm_gem_object_release_handle()

This fixes leakage of "bo_va" for Cayman and following card generations.

11 years agodrm: Support gem_open_object() and gem_close_object() callbacks
dumbbell [Sun, 25 Aug 2013 09:58:31 +0000 (09:58 +0000)]
drm: Support gem_open_object() and gem_close_object() callbacks

... in struct drm_driver_info.

11 years agodrm: Fix typo in KASSERT message: s/Dandling/Dangling/
dumbbell [Sun, 25 Aug 2013 09:53:00 +0000 (09:53 +0000)]
drm: Fix typo in KASSERT message: s/Dandling/Dangling/

11 years agoFor now limit printf(9) %x of the 64bit pkthdr.csum_flags field to 32bits.
andre [Sun, 25 Aug 2013 09:49:00 +0000 (09:49 +0000)]
For now limit printf(9) %x of the 64bit pkthdr.csum_flags field to 32bits.
The upper 32bits are not occupied for now.

Sponsored by: The FreeBSD Foundation

11 years agodrm: Import Linux commit cd004b3f4cd4169815c82bf9e424fda06978898a
dumbbell [Sun, 25 Aug 2013 09:46:03 +0000 (09:46 +0000)]
drm: Import Linux commit cd004b3f4cd4169815c82bf9e424fda06978898a

Author: Shirish S <s.shirish@samsung.com>
Date:   Thu Aug 30 07:04:06 2012 +0000

    drm: edid: add support for E-DDC

    The current logic for probing ddc is limited to
    2 blocks (256 bytes), this patch adds support
    for the 4 block (512) data.

    To do this, a single 8-bit segment index is
    passed to the display via the I2C address 30h.
    Data from the selected segment is then immediately
    read via the regular DDC2 address using a repeated
    I2C 'START' signal.

Signed-off-by: Shirish S <s.shirish@samsung.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoChange m->pkthdr.header to m->pkthdr.PH_loc.ptr after r254804
andre [Sun, 25 Aug 2013 09:45:26 +0000 (09:45 +0000)]
Change m->pkthdr.header to m->pkthdr.PH_loc.ptr after r254804
to transiently store pointers to packet headers.

Sponsored by: The FreeBSD Foundation

11 years agoRemove unnecessary setup of the m->pkthdr.header pointer.
andre [Sun, 25 Aug 2013 09:41:37 +0000 (09:41 +0000)]
Remove unnecessary setup of the m->pkthdr.header pointer.

Sponsored by: The FreeBSD Foundation

11 years agoAdjust socow_iodone() after r254799.
andre [Sun, 25 Aug 2013 09:40:15 +0000 (09:40 +0000)]
Adjust socow_iodone() after r254799.

Sponsored by: The FreeBSD Foundation

11 years agoExport a PERIODIC environment variable from periodic(8). This will
jlh [Sun, 25 Aug 2013 08:56:09 +0000 (08:56 +0000)]
Export a PERIODIC environment variable from periodic(8).  This will
allow periodic security scripts to know if they have been called in
a daily or a weekly context.

11 years agoBugfix: The endpoint profile should only be checked in device mode when
hselasky [Sun, 25 Aug 2013 08:42:50 +0000 (08:42 +0000)]
Bugfix: The endpoint profile should only be checked in device mode when
allocating USB transfers and not in host mode.

Reported by: George Mitchell <george+freebsd@m5p.com>

11 years agoMove daily_status_security_noamd next to 200.chkmounts's variables.
jlh [Sun, 25 Aug 2013 07:46:18 +0000 (07:46 +0000)]
Move daily_status_security_noamd next to 200.chkmounts's variables.

11 years agoRemove EOL whitespace.
joel [Sun, 25 Aug 2013 06:59:30 +0000 (06:59 +0000)]
Remove EOL whitespace.