]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 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

10 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

10 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.

10 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.

10 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

10 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..

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

10 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...

10 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

10 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)

10 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...

10 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().

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

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

10 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

10 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

10 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

10 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

10 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

10 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.

10 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.

10 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.

10 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.

10 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.

10 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.

10 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

10 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.

10 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

10 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

10 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.

10 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

10 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

10 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

10 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);

10 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@

10 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

10 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@

10 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()

10 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@

10 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@

10 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@

10 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@

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

10 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@

10 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@

10 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@

10 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@

10 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@

10 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@

10 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@

10 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>
10 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>
10 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@

10 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.

10 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

10 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

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

10 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

10 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

10 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

10 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

10 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 "--".

10 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.

10 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.

10 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.

10 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

10 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.

10 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

10 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

10 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

10 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>

10 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.

10 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.

10 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/

10 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

10 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>
10 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

10 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

10 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

10 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.

10 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>

10 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.

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

10 years agomdoc fixes.
joel [Sun, 25 Aug 2013 06:58:51 +0000 (06:58 +0000)]
mdoc fixes.

10 years agoUpdate the MEM_UOP_RETIRED PMC operation for sandy bridge and sandy
adrian [Sun, 25 Aug 2013 02:07:28 +0000 (02:07 +0000)]
Update the MEM_UOP_RETIRED PMC operation for sandy bridge and sandy
bridge Xeon.

Summary: These are PEBS events but they're also available as normal
counter/sample events.  The source table (Table 19-2) lists the
base versions (LOAD, STLB_MISS, SPLIT, ALL) but it says they must
be qualified with other values.  This particular commit fleshes
out those umask values.

Source:

* Linux; SDM June 2013, Volume 3B, Table 19-2 and 18-21.

Tested:

* Sandy Bridge (non-Xeon)

10 years agoRemove the #ifdef OFED from the 20 byte mac in struct llentry.
alfred [Sun, 25 Aug 2013 01:55:14 +0000 (01:55 +0000)]
Remove the #ifdef OFED from the 20 byte mac in struct llentry.

With this change it is now possible to build the entire infiniband
stack as modules and load it dynamically including IP over IB.

10 years agodrm: In drm_mmap_single, try ttm_bo_mmap_single() before drm_gem_mmap_single()
dumbbell [Sun, 25 Aug 2013 00:34:44 +0000 (00:34 +0000)]
drm: In drm_mmap_single, try ttm_bo_mmap_single() before drm_gem_mmap_single()

In drivers such as the Radeon driver, the DRIVER_GEM features flag is
set but TTM is used to mmap buffer object.

10 years agodrm: Fix cleanup if device initialization fails
dumbbell [Sun, 25 Aug 2013 00:22:34 +0000 (00:22 +0000)]
drm: Fix cleanup if device initialization fails

This plugs some memory leaks.

10 years agodrm: Use driver-provided "use_msi" callback to determine if MSI is blacklisted
dumbbell [Sun, 25 Aug 2013 00:13:53 +0000 (00:13 +0000)]
drm: Use driver-provided "use_msi" callback to determine if MSI is blacklisted

For now, keep the static array for i915. But eventually, it should be
moved to a callback in the driver itself.

10 years agodrm: Don't delete already deleted iicbus child from drm_iic_dp_aux
dumbbell [Sat, 24 Aug 2013 23:54:06 +0000 (23:54 +0000)]
drm: Don't delete already deleted iicbus child from drm_iic_dp_aux

The iic_dp_aux_detach callback is therefore useless: it's replaced by
bus_generic_detach. This fixes a "General protection fault" panic during
second (incorrect) deletion of the child.

Tested by: kwm@
Reviewed by: ray@

10 years agodrm: Move definition of EREMOTEIO to drmP.h
dumbbell [Sat, 24 Aug 2013 23:47:31 +0000 (23:47 +0000)]
drm: Move definition of EREMOTEIO to drmP.h

It will be used by both i915 and radeon drivers.

Add ERESTARTSYS definition at the same time.

10 years agodrm: Import drm_dp_helper.c from Linux 3.8-rc3
dumbbell [Sat, 24 Aug 2013 23:38:57 +0000 (23:38 +0000)]
drm: Import drm_dp_helper.c from Linux 3.8-rc3

While here, update drm_dp_helper.h to better match Linux one.

10 years agoFix BUGS section after botched modify in r254772.
andre [Sat, 24 Aug 2013 21:30:35 +0000 (21:30 +0000)]
Fix BUGS section after botched modify in r254772.

Reported by: bjk

10 years agoAfter r254779 "error" must always be present in mb_ctor_pack(),
andre [Sat, 24 Aug 2013 21:25:53 +0000 (21:25 +0000)]
After r254779 "error" must always be present in mb_ctor_pack(),
not only when MAC is defined.

Reported by: gjb / tinderbox
Sponsored by: The FreeBSD Foundation

10 years agoRename the kld_unload event handler to kld_unload_try, and add a new
markj [Sat, 24 Aug 2013 21:13:38 +0000 (21:13 +0000)]
Rename the kld_unload event handler to kld_unload_try, and add a new
kld_unload event handler which gets invoked after a linker file has been
successfully unloaded. The kld_unload and kld_load event handlers are now
invoked with the shared linker lock held, while kld_unload_try is invoked
with the lock exclusively held.

Convert hwpmc(4) to use these event handlers instead of having
kern_kldload() and kern_kldunload() invoke hwpmc(4) hooks whenever files are
loaded or unloaded. This has no functional effect, but simplifes the linker
code somewhat.

Reviewed by: jhb

10 years agoRemove unused m_free_fast(). The difference to m_free() is only
andre [Sat, 24 Aug 2013 21:09:57 +0000 (21:09 +0000)]
Remove unused m_free_fast().  The difference to m_free() is only
2 predictable branches nowadays.  However as a pre-condition the
caller had to ensure that the mbuf pkthdr did not have any mtags
attached to it, costing some potential branches again.

Sponsored by: The FreeBSD Foundation

10 years agoSet things up so that linker_file_lookup_set() is always called with the
markj [Sat, 24 Aug 2013 21:08:55 +0000 (21:08 +0000)]
Set things up so that linker_file_lookup_set() is always called with the
linker lock held. This makes it possible to call it from a kld event handler
with the shared lock held.

Reviewed by: jhb

10 years agoRemove the kld lock macros and just use the sx(9) API. Add locking in
markj [Sat, 24 Aug 2013 21:07:04 +0000 (21:07 +0000)]
Remove the kld lock macros and just use the sx(9) API. Add locking in
linker_init_kernel_modules() and linker_preload() in order to remove most
of the checks for !cold before asserting that the kld lock is held. These
routines are invoked by SYSINIT(9), so there's no harm in them taking the
kld lock.

10 years agoDo not use "Enable Implied Seek" on enhanced floppy controllers. This
joerg [Sat, 24 Aug 2013 21:04:54 +0000 (21:04 +0000)]
Do not use "Enable Implied Seek" on enhanced floppy controllers.  This
breaks the "2step" feature of the driver, e.g. in order to read 360
KiB media on a 1200 KiB drive.

As the only potential advantage of implied (vs. explicit) seeks is to
minimize the software effort, yet our driver always contained the
logic needed for explicit seeks, simply dropping implied seeks is the
best solution without introducing risks for new bugs.  There is no
performance penalty, reading a 1440 KiB medium takes exactly the same
time with both, implied or explicit seeks.

MFC after: 1 week

10 years agoRemove some code that has been commented out since it was added in 2000.
markj [Sat, 24 Aug 2013 21:00:39 +0000 (21:00 +0000)]
Remove some code that has been commented out since it was added in 2000.