Commit Graph

2101 Commits

Author SHA1 Message Date
christos
970c63d326 revert the upsteam portion of previous; we don't want to patch upstream
fallthrough/breaks.
2019-02-19 00:30:16 +00:00
christos
e3f676fd0b add failthrough and break as appropriate. 2019-02-18 23:23:41 +00:00
christos
042c6977f7 remove multiplication as condition complaint 2019-02-18 23:19:36 +00:00
rin
fcb6b46ef6 Fix assertion failures triggered by usbdi.c,v 1.182, when devices
are detached.

This is because xfers of USBD_NOT_STARTED can be removed from queue
in an invisible way to host controller drivers.

Discussed on tech-kern.
2019-02-17 04:17:52 +00:00
rmind
b46d30012f nvpair_remove_nvlist_array: revert part of the rev 1.4 change (it was applied
by mistake because the libnv upsteam code on Github has deviated from FreeBSD,
i.e. it has a different nvlist_set_array_next() logic).
2019-02-15 22:49:24 +00:00
rmind
769d827846 libnv: Free the data array for NV_TYPE_DESCRIPTOR_ARRAY case.
Obtained from FreeBSD rev 343987 by oshogbo@.
2019-02-12 12:52:49 +00:00
rmind
b953ce67b4 libnv: fix multiple memory leaks.
- nvpair_create_stringv: free the temporary string; this fix affects
  nvlist_add_stringf() and nvlist_add_stringv().

- nvpair_remove_nvlist_array (NV_TYPE_NVLIST_ARRAY case): free the chain
  of nvpairs (as resetting it prevents nvlist_destroy() from freeing it).
  Note: freeing the chain in nvlist_destroy() is not sufficient, because
  it would still leak through nvlist_take_nvlist_array().  This affects
  all nvlist_*_nvlist_array() users.

Found by clang/gcc ASAN.  These fixes have been contributed to the
upstream (FreeBSD) repository.
2019-02-12 12:49:23 +00:00
mrg
3f41337184 add missing break for CP_COHER_BASE case.
convert fallthru comments.
2019-02-08 04:11:53 +00:00
mrg
dc91d75898 apply -Wno-error=implicit-fallthrough to ar5212_xmit.c and ar5416_xmit.c. 2019-02-04 08:36:43 +00:00
mrg
9f98590938 add -Wno-error=int-in-bool-context or -Wno-error=implicit-fallthrough
for various drm files that would be best ignored or upstream fixed.
(could fix savagedrm, no one upstream is that any more.)
2019-02-04 08:18:07 +00:00
mrg
2acce3af62 add fallthru comments. 2019-02-04 07:59:01 +00:00
mrg
db5c7280e0 combine a pair of #ifdef's and make upstream diff slightly less ugly. NFCI. 2019-02-02 21:46:27 +00:00
cherry
a215bf0172 Import Xen public headers version 4.11.1
Release tag: RELEASE-4-11-1

git log of the freeze is as follows:

commit 96cbd0893f783997caaf117e897d5fa8f2dc7b5f
Author: Jan Beulich <jbeulich@suse.com>
Date:   Thu Nov 29 15:04:11 2018 +0100

    update Xen version to 4.11.1
2019-02-02 08:03:47 +00:00
mrg
a12b67d861 revert rev 1.3 + 1.4 (2015): blank console / CLUT attempts.
we disabled the driver for almost all r100/r200 chipsets so
this code has been obsolete for ages and doesn't need to
remain a diff against upstream.
2019-01-30 01:11:08 +00:00
kre
0abcbaa9c6 Fix merge botch 2019-01-27 05:07:46 +00:00
kre
1390e17ac2 Fix merge botch 2019-01-27 05:05:37 +00:00
kre
51a442d603 Fix merge botch 2019-01-27 05:03:57 +00:00
kre
bed03361b6 Fix merge botch. 2019-01-27 05:00:48 +00:00
oster
e299c2f07a Fix merge issue. (leftover line) 2019-01-27 04:17:39 +00:00
pgoyette
d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
jmcneill
20220d2989 skip clflush on aarch64, too 2019-01-23 19:02:49 +00:00
jmcneill
2084d65025 Merge conflicts. 2019-01-22 15:13:22 +00:00
skrll
764b8016cd Revert the KASSERT 2019-01-22 15:02:33 +00:00
jmcneill
976227fdc9 Import dts from Linux 4.20.3 2019-01-22 14:57:01 +00:00
skrll
c83dd31736 Add a KASSERT 2019-01-22 06:42:33 +00:00
alnsn
fa2feddd77 Add #ifndef _KERNEL guard around userspace #includes 2019-01-21 00:07:10 +00:00
alnsn
98705263f1 Update sljit revision. 2019-01-20 23:23:01 +00:00
alnsn
e35f55c6f0 Resolve conflicts. 2019-01-20 23:14:16 +00:00
alnsn
06eb4e7bdb Update sljit to version 0.93 (svn revision r333).
Changes since the last import:

r333 More x86 fixes and a new stack test.
r332 Improve stack allocation on x86.
r331 Make sljit_free_unused_memory_exec public, PPC flush takes priority.
r330 Reverse the stack utility to top-down.
r329 Add sljit_set_current_flags function.
r328 Add two more virtual registers to x86/32, ARM-32 refactor.
r327 Remove value caching on ARM-32.
r326 Remove value caching on ARM-Thumb2.
r325 Move with update rework.
r324 Arm32 store fixes.
r323 Update macros and remove copyright years.
r322 Reworking flags, removing keep flags.
r321 Quick fix for regexjit.
r320 Improve protected executable allocator. Patch insipred by Christian Persch.
r319 Fully support dynamic code modifications again.
r318 Support protected allocator on all architectures except TILEGX.
r317 Rework protected allocator, only x86 linux is supported now.
r316 Add protected executable allocator.
r315 Remove SLJIT_MEMMOVE.
r314 Fix unaligned accesses on x86. Patch by Marc Mutz.
2019-01-20 22:44:25 +00:00
dholland
0691ca8da8 i915drmkms requires firmload. PR 53892 2019-01-19 16:58:29 +00:00
mrg
b61fdf9100 revert this commit:
>date: 2018-08-27 07:19:47 -0700;  author: riastradh;  state: Exp;  lines: +2 -0;  commitid: 9o7sY7hwNGx6zLPA;
>For now, unconditionally set nouveau verbosity to debug.

nouveau works mostly again now, and the debug output is very verbose.
2019-01-08 05:57:34 +00:00
kamil
38dfd33d61 merge new version 2019-01-08 05:44:58 +00:00
kamil
a7c257b03e Import compiler-rt r350590. LLVM sanitizers on top of unmodified files from compiler-rt-259194. 2019-01-08 05:40:27 +00:00
tnn
ae040fe7bf fence_referenced_p(): mark as __diagused 2019-01-05 22:24:24 +00:00
christos
e81f24883d new file 2019-01-05 20:40:05 +00:00
christos
7efa3256bf - merge conflicts
- change default debug level to normal; the evaluation trace is too noisy
2019-01-05 20:39:48 +00:00
christos
4c4e8184d0 13 December 2018. Summary of changes for version 20181213:
1) ACPICA Kernel-resident Subsystem:

Fixed some buffer length issues with the GenericSerialBus, related to two
of the bidirectional protocols: AttribRawProcessBytes and AttribRawBytes,
which are rarely seen in the field. For these, the LEN field of the ASL
buffer is now ignored. Hans de Goede

Implemented a new object evaluation trace mechanism for control methods
and data objects. This includes nested control methods. It is
particularly useful for examining the ACPI execution during system
initialization since the output is relatively terse. The flag below
enables the output of the trace via the ACPI_DEBUG_PRINT_RAW interface:
   #define ACPI_LV_EVALUATION          0x00080000

Examples:
   Enter evaluation       :  _SB.PCI0._INI (Method)
   Exit evaluation        :  _SB.PCI0._INI
   Enter evaluation       :  _OSI (Method)
   Exit evaluation        :  _OSI
   Enter evaluation       :  _SB.PCI0.TEST (Method)
   Nested method call     :     _SB.PCI0.NST1
   Exit nested method     :     _SB.PCI0.NST1
   Exit evaluation        :  _SB.PCI0.TEST

Added two recently-defined _OSI strings. See
https://docs.microsoft.com/en-us/windows-hardware/drivers/acpi/winacpi-
osi.
   "Windows 2018"
   "Windows 2018.2"

Update for buffer-to-string conversions via the ToHexString ASL operator.
A "0x" is now prepended to each of the hex values in the output string.
This provides compatibility with other ACPI implementations. The ACPI
specification is somewhat vague on this issue.
   Example output string after conversion:
"0x01,0x02,0x03,0x04,0x05,0x06"

Return a run-time error for TermArg expressions within individual package
elements. Although this is technically supported by the ASL grammar,
other ACPI implementations do not support this either. Also, this fixes a
fault if this type of construct is ever encountered (it never has been).


2) iASL Compiler/Disassembler and Tools:

iASL: Implemented a new compile option (-ww) that will promote individual
warnings and remarks to errors. This is intended to enhance the firmware
build process.

AcpiExec: Implemented a new command-line option (-eo) to support the new
object evaluation trace mechanism described above.

Disassembler: Added support to disassemble OEMx tables as AML/ASL tables
instead of a "unknown table" message.

AcpiHelp: Improved support for the "special" predefined names such as
_Lxx, _Exx, _EJx, _T_x, etc. For these, any legal hex value can now be
used for "xx" and "x".

----------------------------------------
31 October 2018. Summary of changes for version 20181031:


An Operation Region regression was fixed by properly adding address
ranges to a global list during initialization. This allows OS to
accurately check for overlapping regions between native devices (such as
PCI) and Operation regions as well as checking for region conflicts
between two Operation Regions.

Added support for the 2-byte extended opcodes in the code/feature that
attempts to continue parsing during the table load phase. Skip parsing
Device declarations (and other extended opcodes) when an error occurs
during parsing. Previously, only single-byte opcodes were supported.

Cleanup: Simplified the module-level code support by eliminating a
useless global variable (AcpiGbl_GroupModuleLeveCode).


2) iASL Compiler/Disassembler and Tools:

iASL/Preprocessor: Fixed a regression where an incorrect use of ACPI_FREE
could cause a fault in the preprocessor. This was an inadvertent side-
effect from moving more allocations/frees to the local cache/memory
mechanism.

iASL: Enhanced error detection by validating that all NameSeg elements
within a NamePatch actually exist. The previous behavior was spotty at
best, and such errors could be improperly ignored at compiler time (never
at runtime, however. There are two new error messages, as shown in the
examples below:

dsdt.asl     33:     CreateByteField (TTTT.BXXX, 1, CBF1)
Error    6161 -                              ^ One or more objects within
the Pathname do not exist (TTTT.BXXX)

dsdt.asl     34:     CreateByteField (BUF1, UUUU.INT1, BBBB.CBF1)
Error    6160 -        One or more prefix Scopes do not exist ^
(BBBB.CBF1)

iASL: Disassembler/table-compiler: Added support for the static data
table TPM2 revision 3 (an older version of TPM2). The support has been
added for the compiler and the disassembler.

Fixed compilation of DOS format data table file on Unix/Linux systems.
iASL now properly detects line continuations (\) for DOS format data
table definition language files on when executing on Unix/Linux.

----------------------------------------
03 October 2018. Summary of changes for version 20181003:


2) iASL Compiler/Disassembler and Tools:

Fixed a regression introduced in version 20180927 that could cause the
compiler to fault, especially with NamePaths containing one or more
carats (^). Such as: ^^_SB_PCI0

Added a new remark for the Sleep() operator when the sleep time operand
is larger than one second. This is a very long time for the ASL/BIOS code
and may not be what was intended by the ASL writer.

----------------------------------------
27 September 2018. Summary of changes for version 20180927:


1) ACPICA kernel-resident subsystem:

Updated the GPE support to clear the status of all ACPI events when
entering any/all sleep states in order to avoid premature wakeups. In
theory, this may cause some wakeup events to be missed, but the
likelihood of this is small. This change restores the original behavior
of the ACPICA code in order to fix a regression seen from the previous
"Stop unconditionally clearing ACPI IRQs during suspend/resume" change.
This regression could cause some systems to incorrectly wake immediately.

Updated the execution of the _REG methods during initialization and
namespace loading to bring the behavior into closer conformance to the
ACPI specification and other ACPI implementations:

From the ACPI specification 6.2A, section 6.5.4 "_REG (Region):
    "Control methods must assume all operation regions are inaccessible
until the _REG(RegionSpace, 1) method is executed"

    "The exceptions to this rule are:
1.  OSPM must guarantee that the following operation regions are always
accessible:
    SystemIO operation regions.
    SystemMemory operation regions when accessing memory returned by the
System Address Map reporting interfaces."

Since the state of both the SystemIO and SystemMemory address spaces are
defined by the specification to never change, this ACPICA change ensures
that now _REG is never called on them. This solves some problems seen in
the field and provides compatibility with other ACPI implementations. An
update to the upcoming new version of the ACPI specification will help
clarify this behavior.

Updated the implementation of support for the Generic Serial Bus. For the
"bidirectional" protocols, the internal implementation now automatically
creates a return data buffer of the maximum size (255). This handles the
worst-case for data that is returned from the serial bus handler, and
fixes some problems seen in the field. This new buffer is directly
returned to the ASL. As such, there is no true "bidirectional" buffer,
which matches the ACPI specification. This is the reason for the "double
store" seen in the example ASL code in the specification, shown below:

Word Process Call (AttribProcessCall):
    OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100)
    Field(TOP1, BufferAcc, NoLock, Preserve)
    {
        FLD1, 8, // Virtual register at command value 1.
    }

    Name(BUFF, Buffer(20){}) // Create GenericSerialBus data buffer
                             // as BUFF
    CreateWordField(BUFF, 0x02, DATA) // DATA = Data (Word)

    Store(0x5416, DATA)               // Save 0x5416 into the data buffer
    Store(Store(BUFF, FLD1), BUFF)    // Invoke a write/read Process Call
transaction
                           // This is the "double store". The write to
                           // FLD1 returns a new buffer, which is stored
                           // back into BUFF with the second Store.


2) iASL Compiler/Disassembler and Tools:

iASL: Implemented detection of extraneous/redundant uses of the Offset()
operator within a Field Unit list. A remark is now issued for these. For
example, the first two of the Offset() operators below are extraneous.
Because both the compiler and the interpreter track the offsets
automatically, these Offsets simply refer to the current offset and are
unnecessary. Note, when optimization is enabled, the iASL compiler will
in fact remove the redundant Offset operators and will not emit any AML
code for them.

    OperationRegion (OPR1, SystemMemory, 0x100, 0x100)
    Field (OPR1)
    {
        Offset (0),     // Never needed
        FLD1, 32,
        Offset (4),     // Redundant, offset is already 4 (bytes)
        FLD2, 8,
        Offset (64),    // OK use of Offset.
        FLD3, 16,
    }
dsdt.asl     14:         Offset (0),
Remark   2158 -                 ^ Unnecessary/redundant use of Offset
operator

dsdt.asl     16:         Offset (4),
Remark   2158 -                 ^ Unnecessary/redundant use of Offset
operator
2019-01-05 20:37:15 +00:00
tnn
fc13bb21b6 dma_buf_fd(): fd_putfile() does not belong here
PR kern/53834 ok riastradh@
2019-01-04 23:03:02 +00:00
tnn
cfaac4b4a7 interval_tree_iter_next: check the node we return, not the prev one.
Also assert that the interval is intersecting the requested boundary.
2019-01-04 20:22:32 +00:00
maya
9d096b74cc Fix clang build by using hhx to print u8 and x to print unsigned. 2019-01-01 08:07:47 +00:00
kamil
ef493721e1 compiler_rt: Update prepare-import.sh according to future updates
Allow: asan, msan, lsan, tsan, ubsan, xray, interception, includes,
       ubsan_minimal, fuzzer, sanitizer_common, stats, safestack.
2018-12-29 16:27:12 +00:00
christos
133b6d9e41 adjust for binutils 2.31.1 2018-12-29 04:05:47 +00:00
mrg
184c163169 don't attach to new turing based nouveau cards. 2018-12-24 08:40:33 +00:00
mrg
a3748e76bf this works well enough to start and have basic accel only on GTX 750,
so enable those cards.  maybe can enable some pascal cards too.

thanks to fly for fixing nouveau drm2 so it was worth trying :-)
2018-12-24 08:26:04 +00:00
maya
0acb37c0a5 Expose nvif ioctl interface.
nvif is a variable length (nested..) ioctl, so it doesn't match the
usual drm_ioctl interface. linux uses a shim to override the ioctl
function for nouveau to allow this, do the same.

fixes 3D acceleration with nouveau.

from riastradh.
2018-12-21 07:51:17 +00:00
maya
b11c599c79 Disable MSI/MSI-X for nouveau.
Fixes functionality for me (GTX 770) and apparently anyone with
MSI/MSI-X capable hardware.
2018-12-19 09:20:56 +00:00
msaitoh
9b94098d19 Use DVF_ATTACH_INPROGRESS. 2018-12-01 01:56:30 +00:00
jmcneill
d1b4960443 Avoid kpause while cold 2018-11-28 19:15:32 +00:00
maya
d320d609f9 include machine/limits.h for INT_MAX 2018-11-19 10:48:59 +00:00
skrll
ff8fc18ae4 Remove unused struct member (usbd_xfer now has a struct usb_task) 2018-11-18 11:48:56 +00:00