Commit Graph

183451 Commits

Author SHA1 Message Date
Jilles Tjoelker
71828da5ff 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 "--".
2013-08-25 11:42:53 +00:00
Jean-Sébastien Pédron
e27c6c9fa2 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.
2013-08-25 11:34:37 +00:00
Andrew Turner
85e8977a2c Add the frame information to cpu_switch to allow us to unwind out of it,
for example when dumping threads in the kernel debugger.
2013-08-25 11:23:38 +00:00
Andrew Turner
da154710c4 Add the unwind information to irq_entry so we can pass through it when
unwinding the stack.
2013-08-25 11:21:03 +00:00
Andre Oppermann
285c5301aa Bump FreeBSD_version after the struct mbuf changes in r254780,
r254799, r254804, r254807, and r254842.

Sponsored by:	The FreeBSD Foundation
2013-08-25 11:01:18 +00:00
Jilles Tjoelker
3cfb11c41a 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.
2013-08-25 10:57:48 +00:00
Andre Oppermann
bb25e5ab00 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
2013-08-25 10:57:09 +00:00
Jean-Sébastien Pédron
adeff39cd4 drm: Import list_for_each_entry_safe_from() macro 2013-08-25 10:28:02 +00:00
Jean-Sébastien Pédron
9f2e0f5d19 drm: Use DRM_IF_MAJOR & DRM_IF_MINOR from drm_core.h 2013-08-25 10:13:23 +00:00
Jean-Sébastien Pédron
735f427563 drm: In drm_gem_name_create(), verify argument before acquiring lock
Submitted by:	J.R. Oldroyd <jr@opal.com>
2013-08-25 10:04:10 +00:00
Jean-Sébastien Pédron
10548903da 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.
2013-08-25 10:01:59 +00:00
Jean-Sébastien Pédron
1eeccc8f4c drm: Support gem_open_object() and gem_close_object() callbacks
... in struct drm_driver_info.
2013-08-25 09:58:31 +00:00
Jean-Sébastien Pédron
b5185a8933 drm: Fix typo in KASSERT message: s/Dandling/Dangling/ 2013-08-25 09:53:00 +00:00
Andre Oppermann
9850f95989 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
2013-08-25 09:49:00 +00:00
Jean-Sébastien Pédron
8479311ef0 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>
2013-08-25 09:46:03 +00:00
Andre Oppermann
24c6ede6f0 Change m->pkthdr.header to m->pkthdr.PH_loc.ptr after r254804
to transiently store pointers to packet headers.

Sponsored by:	The FreeBSD Foundation
2013-08-25 09:45:26 +00:00
Andre Oppermann
edb159e1ea Remove unnecessary setup of the m->pkthdr.header pointer.
Sponsored by:	The FreeBSD Foundation
2013-08-25 09:41:37 +00:00
Andre Oppermann
df3a21692b Adjust socow_iodone() after r254799.
Sponsored by:	The FreeBSD Foundation
2013-08-25 09:40:15 +00:00
Jeremie Le Hen
195cf868e2 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.
2013-08-25 08:56:09 +00:00
Hans Petter Selasky
8f39f442c9 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>
2013-08-25 08:42:50 +00:00
Jeremie Le Hen
81e9f2d5d8 Move daily_status_security_noamd next to 200.chkmounts's variables. 2013-08-25 07:46:18 +00:00
Joel Dahl
ec76d29f81 Remove EOL whitespace. 2013-08-25 06:59:30 +00:00
Joel Dahl
082dbcbf5e mdoc fixes. 2013-08-25 06:58:51 +00:00
Adrian Chadd
c55e621eed 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)
2013-08-25 02:07:28 +00:00
Alfred Perlstein
250053bc41 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.
2013-08-25 01:55:14 +00:00
Jean-Sébastien Pédron
92cf4f8de0 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.
2013-08-25 00:34:44 +00:00
Jean-Sébastien Pédron
5eaeb54990 drm: Fix cleanup if device initialization fails
This plugs some memory leaks.
2013-08-25 00:22:34 +00:00
Jean-Sébastien Pédron
22f61fe5d4 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.
2013-08-25 00:13:53 +00:00
Jean-Sébastien Pédron
f7eda40d0e 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@
2013-08-24 23:54:06 +00:00
Jean-Sébastien Pédron
285be846af 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.
2013-08-24 23:47:31 +00:00
Jean-Sébastien Pédron
74eb6a63ca drm: Import drm_dp_helper.c from Linux 3.8-rc3
While here, update drm_dp_helper.h to better match Linux one.
2013-08-24 23:38:57 +00:00
Andre Oppermann
6e3e14fe44 Fix BUGS section after botched modify in r254772.
Reported by:	bjk
2013-08-24 21:30:35 +00:00
Andre Oppermann
ce28636bcf 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
2013-08-24 21:25:53 +00:00
Mark Johnston
29f4e216f2 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
2013-08-24 21:13:38 +00:00
Andre Oppermann
ce6169e715 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
2013-08-24 21:09:57 +00:00
Mark Johnston
0770f164d3 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
2013-08-24 21:08:55 +00:00
Mark Johnston
3a277424e6 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.
2013-08-24 21:07:04 +00:00
Joerg Wunsch
1f97b64cbb 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
2013-08-24 21:04:54 +00:00
Mark Johnston
161330357c Remove some code that has been commented out since it was added in 2000. 2013-08-24 21:00:39 +00:00
Andre Oppermann
bf2e93f1fe Compact m_hdr by packing the type and flags fields into one uint32_t.
The mbuf type is an enumerator with only a handful of types in use and
thus reduced from int to 8bits allowing for 255 types to be specified.
Only 5 types have been in use for a long time.

The flags field gets the remaining 24 bits with 12 bits for global
persistent flags and 12 bits for protocol/layer specific overlays.
Some of the global flags/functionality can be moved to the csum_flags
or ext_flags bits in the future.

MT_VENDOR[1-4] and MT_EXP[1-4] types for vendor-internal and
experimental local mapping are added.

The size of m_hdr shrinks from 24/40 to 20/32bytes (32/64bit architectures).

Sponsored by:	The FreeBSD Foundation
2013-08-24 20:26:41 +00:00
Jilles Tjoelker
7e6e930d1e sh: Reject ++ and -- in arithmetic.
POSIX does not require ++ and -- in arithmetic. It is probably more useful
to reject them than to treat ++x and --x as x silently.

Note that the behaviour of increment and decrement can be obtained via
(x+=1), ((x+=1)-1), (x-=1) and ((x-=1)+1).

PR:		bin/176444
2013-08-24 20:06:00 +00:00
Andre Oppermann
7c14da7202 Add mtodo(m, o) macro taking an additional offset into the mbuf data section.
Sponsored by:	The FreeBSD Foundation
2013-08-24 19:58:36 +00:00
Andre Oppermann
1b4381afbb Restructure the mbuf pkthdr to make it fit for upcoming capabilities and
features.  The changes in particular are:

o Remove rarely used "header" pointer and replace it with a 64bit protocol/
  layer specific union PH_loc for local use.  Protocols can flexibly overlay
  their own 8 to 64 bit fields to store information while the packet is
  worked on.

o Mechanically convert IP reassembly, IGMP/MLD and ATM to use pkthdr.PH_loc
  instead of pkthdr.header.

o Extend csum_flags to 64bits to allow for additional future offload
  information to be carried (e.g. iSCSI, IPsec offload, and others).

o Move the RSS hash type enumerator from abusing m_flags to its own 8bit
  rsstype field.  Adjust accessor macros.

o Add cosqos field to store Class of Service / Quality of Service information
  with the packet.  It is not yet supported in any drivers but allows us to
  get on par with Cisco/Juniper in routing applications (plus MPLS QoS) with
  a modernized ALTQ.

o Add four 8 bit fields l[2-5]hlen to store the relative header offsets
  from the start of the packet.  This is important for various offload
  capabilities and to relieve the drivers from having to parse the packet
  and protocol headers to find out location of checksums and other
  information.  Header parsing in drivers is a lot of copy-paste and
  unhandled corner cases which we want to avoid.

o Add another flexible 64bit union to map various additional persistent
  packet information, like ether_vtag, tso_segsz and csum fields.
  Depending on the csum_flags settings some fields may have different usage
  making it very flexible and adaptable to future capabilities.

o Restructure the CSUM flags to better signify their outbound (down the
  stack) and inbound (up the stack) use.  The CSUM flags used to be a bit
  chaotic and rather poorly documented leading to incorrect use in many
  places.  Bring clarity into their use through better naming.
  Compatibility mappings are provided to preserve the API.  The drivers
  can be corrected one by one and MFC'd without issue.

o The size of pkthdr stays the same at 48/56bytes (32/64bit architectures).

Sponsored by:	The FreeBSD Foundation
2013-08-24 19:51:18 +00:00
Andre Oppermann
edd26b66ce Change local variable tso_segsz to tsosegsz to avoid mbuf.h macro conflicts.
Sponsored by:	The FreeBSD Foundation
2013-08-24 19:38:36 +00:00
Kenneth D. Merry
aaea33e51f Fix a printf format warning on 32-bit mips and powerpc.
Reported by:	bde, gjb
Pointy hat to:	ken
2013-08-24 19:02:36 +00:00
Andre Oppermann
3b460852c4 Remove unnecessary setup of the m->pkthdr.header pointer.
Sponsored by:	The FreeBSD Foundation
2013-08-24 17:14:14 +00:00
Andre Oppermann
9a73687609 Add an mbuf pointer parameter to (*ext_free) to give the external
free function access to the mbuf the external memory was attached
to.

Mechanically adjust all users to include the mbuf parameter.

This fixes a long standing annoyance for external free functions.
Before one had to sacrifice one of the argument pointers for this.

Sponsored by:	The FreeBSD Foundation
2013-08-24 16:57:44 +00:00
Jean-Sébastien Pédron
06b77ec36d drm: Fix leak of connector->edid_blob_ptr 2013-08-24 16:55:53 +00:00
Jean-Sébastien Pédron
0bf283a517 drm: Const'ify the 1st "drm_display_mode" passed to "mode_fixup" callbacks
This will be needed by the Radeon KMS driver.
2013-08-24 16:50:47 +00:00
Jean-Sébastien Pédron
d08e4108f6 drm/i915: Import Linux commit 71244653a8fb0f46bc12ae421f1d5f72af6a75da
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Jun 4 18:39:20 2012 +0200

    drm/i915: adjusted_mode->clock in the dp mode_fixup

    ... instead of changing mode->clock, which we should leave as-is.

    After the previous patch we only touch that if it's a panel, and then
    adjusted mode->clock equals adjusted_mode->clock. Outside of
    intel_dp.c we only use ajusted_mode->clock in the mode_set functions.

    Within intel_dp.c we only use it to calculate the dp dithering
    and link bw parameters, so that's the only thing we need to fix
    up.

    As a temporary ugliness (until the cleanup in the next patch) we
    pass the adjusted_mode into dp_dither for both parameters (because
    that one still looks at mode->clock).

    Note that we do overwrite adjusted_mode->clock with the selected dp
    link clock, but that only happens after we've calculated everything we
    need based on the dotclock of the adjusted output configuration.

    Outside of intel_dp.c only intel_display.c uses adjusted_mode->clock,
    and that stays the same after this patch (still equals the selected dp
    link clock). intel_display.c also needs the actual dotclock (as
    target_clock), but that has been fixed up in the previous patch.

    v2: Adjust the debug message to also use adjusted_mode->clock.

    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-24 16:41:14 +00:00