Commit Graph

735 Commits

Author SHA1 Message Date
lneto
4ab4902eb2 lua: updated from 5.1 to 5.3 work3
* lua(1):
  - changed lua_Integer to intmax_t
  - updated distrib/sets/lists and etc/mtree
  - updated bsd.lua.mk
  - fixed bozohttpd (lua-bozo.c)
  - compatibilized bindings: gpio, sqlite
* lua(4):
  - removed floating-point and libc dependencies using '#ifndef _KERNEL'
  - fixed division by zero and exponentiation
  - libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct()
  - acpica: removed isprint() from acnetbsd.h
  - libc: moved strcspn.c, strpbrk.c and strspn.c to common
  - removed stub headers
  - compatibilized bindings: luapmf, luasystm
* reorganized luaconf.h
* updated doc/CHANGES and doc/RESPONSIBLE
2014-07-19 18:38:33 +00:00
riastradh
2ef9395ae2 Fix formatting and locking errors.
Format time_t by casting to intmax_t and using PRIdMAX, since we have
no PRIxyz for time_t.

We already hold the irq lock on entry to i915_record_ring_state, so
don't take it again.
2014-07-18 19:48:34 +00:00
alnsn
a168439b5a Disable FPU in kernel space. 2014-07-18 19:38:02 +00:00
riastradh
adbb470385 Don't cast ptrdiff_t to unsigned long before formatting it with %td.
Noted by Robert Swindells and Patrick Welche.
2014-07-18 19:34:59 +00:00
riastradh
34216073bb Don't forget to pmap_update after pmap_kremove! 2014-07-18 03:11:55 +00:00
riastradh
2f97720d54 We need just a VA, not wired physical pages too. 2014-07-18 00:00:51 +00:00
riastradh
964a628c0e Don't double-free obj->pages, with two different allocators to boot! 2014-07-17 21:14:24 +00:00
riastradh
db544f2dc6 Destroy the DMA subregion tag on error in drm_pci_detach.
Now that drm_pci_attach calls the driver load function, rather than
deferring it to the caller, the DMA subregion tag can be created
here.
2014-07-17 21:13:49 +00:00
riastradh
df1a87486b Elide up to one excess driver-named component from firmware pathnames. 2014-07-17 20:56:14 +00:00
riastradh
5820ca24c6 In radeon_device_init, use ddev->dev, not &pdev->dev, for rdev->dev.
ddev->dev is the actual device_t, and we need it for firmware load.
&pdev->dev is a dummy structure that serves no purpose except some
kludge in our Linux PCI compatibility crap.  In Linux the two should
be the same, so no need to #ifdef __NetBSD__ this.
2014-07-17 20:41:22 +00:00
riastradh
852bd97d54 Tweak failure case for Linux firmware API.
request_firmware is guaranteed to yield null on failure;
release_firmware on null is guaranteed to be a no-op.
2014-07-17 20:37:01 +00:00
riastradh
08846c0307 intel_dp_aux_wait_done can run while cold. 2014-07-17 17:52:39 +00:00
riastradh
8880b5313f Do a post-write DMA sync pos-write, not a pre-write one. 2014-07-17 17:29:39 +00:00
riastradh
6f1e96281f Don't forget to advance the array index as we walk the queue... 2014-07-17 17:19:42 +00:00
riastradh
4fb1005df1 Lock the right lock around the gmbus condvar. 2014-07-17 17:17:24 +00:00
riastradh
ced0e0f361 Put in dummy gem uvm ops for radeon (uses ttm for real mmap). 2014-07-17 15:09:00 +00:00
riastradh
3c8e94233f Correct return values of Linux test-and-set operations (PR 48999).
Linux's Documentation/atomic_ops.txt says in no uncertain terms these
must return 0 or 1, not zero or nonzero.  I don't think this has
caused an issue for drm (yet), but better to have it right.
2014-07-17 14:30:33 +00:00
riastradh
27f0ac970f Add non-atomic Linux test-and-set operations. 2014-07-17 14:28:28 +00:00
riastradh
174002a657 Remove defunct declarations of alloc_page/free_page. 2014-07-17 14:07:44 +00:00
riastradh
f0ac8cd0d3 Push -Wno-missing-prototypes into specific radeon source files.
Don't apply it willy-nilly to the whole kernel!
2014-07-17 14:05:12 +00:00
riastradh
26083f6ccc Remove needless linux_gfp.c.
Trying to make do with Linux's page allocation interface is pretty
much always wrong: either we let uvm allocate pages in uvm objects
for us, or we use bus_dma.
2014-07-17 13:52:22 +00:00
riastradh
180ed50cef Initialize the drm_global stuff. 2014-07-17 13:47:19 +00:00
riastradh
0a36a05ab2 Actually hook up the radeon_ttm uvm pager ops! 2014-07-17 03:34:13 +00:00
riastradh
cd1be69630 Import the part of Nouveau that got eaten by CVS default ignore patterns.
No, this is *not* a core file.  This is a directory with most of the
source code!
2014-07-17 01:50:57 +00:00
jmcneill
f0744b1ae9 From 517d5c1c9c
> Fix for ALSA driver crash
> Avoids an issue when closing and opening vchiq where a message can arrive before service handle has been written
2014-07-16 23:59:58 +00:00
riastradh
b358313ab0 Get suspend/resume sorta working for i915drm. 2014-07-16 23:25:18 +00:00
riastradh
b8f558054f Remove needless pci_map_rom error messages. 2014-07-16 23:24:23 +00:00
riastradh
14004d2c4d Explain why i915_gem_release_mmap is broken. 2014-07-16 21:48:53 +00:00
riastradh
e6dd66eb71 Restore error message tweak that got lost in the merge. 2014-07-16 21:28:50 +00:00
riastradh
ae3742a4e9 I thought I removed this troublemaker already. 2014-07-16 21:11:47 +00:00
riastradh
b81c64e1b2 First whack at radeon driver.
No hardware to test yet, but it builds.
2014-07-16 20:59:57 +00:00
riastradh
77b5597a2b Make it build and boot on my test machines.
Screen blanks on boot on the Ivy Bridge system with

   DRM error in cpt_serr_int_handler: PCH transcoder A FIFO underrun

But after that everything is OK.  Appears to be an upstream problem.
To investigate...

I think there's a cache flushing issue somewhere -- there are little
display artefacts on my T60.
2014-07-16 20:56:24 +00:00
riastradh
e51b4cca97 Delete troublesome drm_trace.h and drm_trace_points.c. 2014-07-16 20:08:37 +00:00
riastradh
3c6dde82cc fix merge conflicts 2014-07-16 20:03:56 +00:00
riastradh
9d20d9267f Import drm from Linux 3.15 (commitid 1860e379875dfe7271c649058aeddffe5afd9d0d).
drivers/gpu/drm      -> sys/external/bsd/drm2/dist/drm
   include/drm          -> sys/external/bsd/drm2/dist/include/drm
   include/uapi/drm     -> sys/external/bsd/drm2/dist/uapi/drm

GPL sources excluded.
2014-07-16 19:35:23 +00:00
christos
2c90fe4f6d print the error from bus_space_map. 2014-07-13 15:15:06 +00:00
mlelstv
a80912bfb7 The vga driver now detaches wscons. 2014-07-13 01:17:15 +00:00
darrenr
5446176ae4 PR kern/47665
For ICMP packets, use the "oicmpid" and "nicmpid" fields explicitly rather
than overloading those with "port" in them and expecting them to work.
2014-07-12 14:54:32 +00:00
riastradh
999aeed3e8 Hook up drm suspend/resume. 2014-07-07 20:21:31 +00:00
riastradh
1c769c71e0 Call teardown_timer in i915_driver_unload. 2014-07-06 15:47:36 +00:00
riastradh
93a48a0153 Call teardown_timer in drm_vblank_cleanup. 2014-07-06 15:44:55 +00:00
riastradh
9a90188bf9 Modify Linux timer API to add teardown_timer.
del_timer_sync does not actually destroy the timer so it can't be
reused again -- but Linux has no routine to do that.  So we'll have
to add that in where appropriate.
2014-07-06 15:43:55 +00:00
riastradh
29a70da5ff Add some notes on using these shims to port Linux kernel code. 2014-07-03 20:48:19 +00:00
skrll
a65e94de03 Trailing whitespace. 2014-07-03 07:18:42 +00:00
riastradh
e905ac69e4 Implement i915drmkms wsdisplay blank/backlight/brightness controls. 2014-07-01 20:03:21 +00:00
riastradh
2ef3036b03 Honour write-combining flag in drm_ioremap. 2014-07-01 16:29:57 +00:00
darrenr
17a9965ed4 #537 NAT rules with sticky have incorrect hostmap IP address 2014-06-28 08:02:09 +00:00
darrenr
b816f84312 #534 destination list hashing not endian neutral 2014-06-28 07:59:26 +00:00
skrll
4622c29b51 Use DWC2_XFER2DPIPE 2014-06-28 07:01:51 +00:00
riastradh
44f3d26119 Work around bug on one-pipe 845 devices until we update drm again. 2014-06-27 19:55:20 +00:00
skrll
9590415a5a Use the right macro in dwc2_root_intr_start 2014-06-27 07:28:26 +00:00
alnsn
61fe521674 Add $NetBSD$. 2014-06-17 19:33:20 +00:00
alnsn
176098a445 Don't redefine SLJIT_HALT_PROCESS(). 2014-06-17 17:30:48 +00:00
alnsn
c3ff03ecd4 New sljit version is r257. 2014-06-17 16:49:11 +00:00
alnsn
60a3e989c5 Resolve conflicts. 2014-06-17 16:48:24 +00:00
alnsn
e5292e6b87 Import sljit 0.91 (svn r257).
The changes since the last import are:

r257: Add missing ADJUST_LOCAL_OFFSET for ARM64.
r256: Move incorrectly placed array definitions.
r255: More work on testing environment.
r254: Refactor test default output.
r253: Pass entry adress in r12 on PPC-LE.
r252: Optimize calls on MIPS-64.
r251: Several minor fixes.
r250: Add missing SLJIT_IS_FPU_AVAILABLE checks and reorder U and S flags.
r249: Optimize jumps on ARM-64.
r248: Optimize jumps on PowerPC.
r247: MIPS64 support is mostly finished.
r246: MIPS arithmetic.
r245: Start working on MIPS64.
r244: Uniform names for TILE-Gx.
r243: Uniform the names of ARM compilers.
r242: Change ll to l on x86 and rename some instructions on ARM-64.
r241: Improved memory access in PPC and reordering the parameter type flags.
r240: Prepare for more registers on ARM-Thumb2 and renaming TMP_REGISTER to TMP_REG1 on x86.
r239: Prepare for more registers on ARMv5.
r238: Prepare for more registers on TILE-Gx.
r237: Prepare for more registers on MIPS and SPARC.
r236: Prepare for more registers on PPC.
r235: Prepare for more registers on x86.
r234: Most tests are pass on ARM-64 now.
r233: Around 25 test cases are now pass on ARM-64.
r232: More progress on ARM-64 and Thumb2 refactoring.
r231: Some progress an ARM-64 and ARM-T2 refactoring.
r230: Thumb2 code refactoring.
r229: Start working on ARM-64.
r228: Little endian PowerPC systems are supported now by the JIT compiler.
r227: TileGX architecture is now supported. Patch made by Jiong Wang.
r226: Cache flush for android. Patch by  Giuseppe D'Angelo.
r225: Add support for forcibly freeing unused executable memory. Inspired by Carsten Klein.
r224: Few typo fixes.
r223: Reorder madvise and posix_madvise.
r222: The missing sljit_get_float_register_index function is added.
r221: Remove an invalid shift on ARM.
r220: JIT compiler now supports 32 bit Macs thanks to Lawrence Velazquez.
r219: Better code size statistics.
r218: Improvements for x86 and LIR dump.
r217: ICC and SunPro C fixes
r216: A new file for tracking internal changes are added.
r215: Less GNU dependnet Makefile and Intel style assemby for x86-64 systems.
r214: Switch from stdcall to cdecl in x86-32.
r213: Upstreaming minor fixes. Thanks for Daniel Richard G.
r212: Documentation update and a fix for a locking issue.
r211: Renaming temporaries to scratches to match the new name of the register. Does not affect compatibility.
r210: Improving assertions.
r209: Port sljit to SunPro C compiler. Patch by Daniel Richard G.
r208: SLJIT_TEMPORARY_REGx registers are renamed to SLJIT_SCRATCH_REGx.
r207: Removing unused checks.
r206: Optimizations for arm.
r205: Some optimizations on powerpc, mips and sparc.
r204: Rename sljit_emit_cond_value to sljit_emit_op_flags.
r203: Small x86 optimization.
r202: Finish cond_value with AND and INT_OP.
r201: More x86 fixes and improvements.
r200: Rename buf and code to inst.
r199: Replacing constants with instruction names in x86. Greatly improves maintainability.
r198: Only xmm0-xmm5 is volatile on Win64, so xmm6 must be saved.
r197: PowerPC shift right always modifies the carry flag. We may need to restore it.
r196: Rename SLJIT_F* functions to SLJIT_*D
r195: SLJIT_INT_OP works in the same way as SLJIT_SINGLE_OP: the input register arguments must be generated by the output of another instruction with SLJIT_INT_OP flag
r194: Renaming sljit_w to sljit_sw, sljit_i to sljit_si, sljit_h to sljit_sh, and sljit_b to sljit_sb.
r193: ARM single precision support.
r192: Single precision support added for ppc, mips and sparc.
r191: Add single precision support. Only works on x86 now.
r190: Relace C types with sljit types. No functionality change.
r189: Change 0 to NULL for mmap.
r188: Support environments where MAP_ANON is not available.
r187: Adding type descriptors for pointers and doubles (preparing for x32 ABIs and single precision support).
2014-06-17 15:37:40 +00:00
christos
16bf2a1c98 Darren Reed: #550 filter rule list corrupted with inserted rules 2014-06-16 12:38:32 +00:00
riastradh
16bef292a1 Destroy, don't leak, events when done with them. 2014-06-13 00:47:08 +00:00
riastradh
93c1cf0ddc Mark another place in i915drmkms where paddr constraints are set. 2014-06-12 19:11:51 +00:00
riastradh
84255b79fd Constrain addresses of pages backing i915 GEM objects.
Use the new uao_set_pgfl and x86_select_freelist for the purpose.
2014-06-12 19:10:33 +00:00
riastradh
7df9e83c86 Check bounds in agp_i810_borrow.
Out of paranoia, do a bus_space_subregion in case the old drm code
tries sizes that the agp_i810 code doesn't agree with.
2014-06-12 15:05:29 +00:00
rmind
60d350cf6d - Implement pktqueue interface for lockless IP input queue.
- Replace ipintrq and ip6intrq with the pktqueue mechanism.
- Eliminate kernel-lock from ipintr() and ip6intr().
- Some preparation work to push softnet_lock out of ipintr().

Discussed on tech-net.
2014-06-05 23:48:16 +00:00
riastradh
9f975af5fa Mark variables __diagused. 2014-06-04 13:52:52 +00:00
riastradh
a8f2a2efec Rework gen6 aperture/gtt size detection. Mark variables __diagused. 2014-06-03 19:49:37 +00:00
riastradh
c910302de2 Mark variables __diagused. 2014-06-03 19:40:37 +00:00
riastradh
db479d6e55 Ensure we call uvmfault_unlockall on every exit from i915_gem_fault. 2014-06-03 15:06:36 +00:00
riastradh
a21c03fe5f Fix atomic_dec_and_test in <linux/atomic.h>: test 0, not -1. 2014-06-03 14:59:30 +00:00
rmind
fa1e674c1d Include cdefs.h earlier for NetBSD. 2014-05-30 02:16:17 +00:00
riastradh
78c2b3ab22 Work around broken GTT size detection in agp_i810 code.
This will do until I work out the twisty maze of registers, all
different, to reliably determine the size of the GTT (and hence the
GPU's virtual address space) separately from the size of the AGP
aperture.
2014-05-29 22:05:24 +00:00
riastradh
5cce18873b Explain the fields of struct intel_gtt for future reference. 2014-05-28 16:13:02 +00:00
riastradh
db1909e63d Fix bogus GTT total size calculation. Omit gtt_bsh for `agp' gtt. 2014-05-28 15:44:02 +00:00
riastradh
16cc43868d Fix GTT PTE flag bits. 2014-05-23 23:02:47 +00:00
riastradh
0db82c270c Implement intel_gtt_chipset_flush correctly. 2014-05-23 22:59:23 +00:00
riastradh
8f9e898dc6 Unifdef the dmi hacks here too, now that we have dmi_check_system. 2014-05-21 15:40:52 +00:00
riastradh
a3a8fde1c3 Unifdef the dmi hacks here, now that we have dmi_check_system. 2014-05-21 14:03:42 +00:00
riastradh
8929297ea6 Miscellaneous little fixes for harmless issues:
- Fix sense of subtraction in i915_gem_restore_gtt_mappings (not
  currently used, so this was harmless).

- Program gtt->gtt_scratch_map->dm_segs[0].ds_addr rather than
  gtt->gtt_scratch_seg.ds_addr into the GTT for consistency with the
  bus_dma API.  These are currently the same, but if we ever start
  using x86 iommu perhaps that may change.

- Kassert that the scratch PTE decodes into the scratch address.
2014-05-20 15:50:11 +00:00
riastradh
0c6fc07d39 Oops -- drop the GEM object reference on error too. 2014-05-20 15:15:04 +00:00
riastradh
24c81ef173 Don't map the GEM uvm_aobj copy-on-write -- what was I thinking?
Do transfer the GEM object reference to the uvm_aobj reference --
these are not the same thing.  (There's another uvm object whose
references are the same thing as the GEM object references, but
that's not the uao.)

With these changes, it looks like the GPU is no longer trying to draw
graphics all over kernel data structures.  Wish I had that month of
debugging back!
2014-05-20 15:12:41 +00:00
joerg
30308f423a Import compiler-rt r209132. Revert use of TI mode on 32bit PPC. 2014-05-19 16:11:28 +00:00
riastradh
7e88065a92 Remove (bad) debugging message that crept into i915_gem_gtt_init. 2014-05-19 14:57:37 +00:00
riastradh
14d191068e Fix page/byte sense of AGP GTT parameter calculations. 2014-05-19 14:55:46 +00:00
riastradh
31ed01fae9 Use correct value for gtt->gtt_bsh in agp case (unused, so harmless). 2014-05-19 14:44:36 +00:00
riastradh
5acb9c2dd2 Use the scratch page, not zero, to clear ggtt entries for gen<6. 2014-05-19 14:39:33 +00:00
joerg
d49dd56f86 Clean up a few more directories. 2014-05-16 00:08:17 +00:00
joerg
61f2f2562d Import compiler-rt r208593. Fix a build bug in __clear_cache by not
explicitly forcing the ABI. Add first part of IEEE 754 quad support.
2014-05-16 00:04:17 +00:00
riastradh
dba14edfb9 Fix sense of test in last commit, noted by Robert Swindells. 2014-05-14 16:25:19 +00:00
riastradh
6b598eeda2 Tweak i915 gen6_gtt_init calculations for clarity. 2014-05-14 15:58:24 +00:00
riastradh
d325027b1d Reject 32-bit paddrs on 965.
XXX Doing the check here is wrong; it serves only to report an
earlier problem, which is that there's on way to express constraints
on paddrs to uvm_obj_wirepages.  bus_dmamem_alloc can do this, but it
gives us pages out of thin air, not pages backing a uvm object.  I
was hoping this wouldn't manifest as a real problem, but evidently it
does.
2014-05-14 13:59:19 +00:00
riastradh
873dbefa1a Fix >40-bit paddr error branch in i915_gem_object_get_pages_gtt. 2014-05-14 13:53:41 +00:00
riastradh
d2e4193eff Fix error branch in drm_limit_dma_space. 2014-05-14 04:38:49 +00:00
bouyer
3910868948 Make sure *(if_output)() is called with KERNEL_LOCK held.
Add some KASSERT for this.
See http://mail-index.netbsd.org/tech-net/2014/04/09/msg004511.html
for details.
2014-05-13 19:36:16 +00:00
christos
6f8fc9d1fc make this compile. 2014-05-09 23:26:36 +00:00
skrll
f90eccea8d Use a spinlock for completions. Makes vchiq pass LOCKDEBUG where other
spinlocks where held when trying to use the completion API.
2014-05-05 15:59:11 +00:00
riastradh
4c9193e998 Cast from uint32_t to bus_addr_t earlier, since it may exceed 32 bits. 2014-05-02 14:36:10 +00:00
riastradh
c5a81b561e Tweak some DRM GEM page indexing crap.
- Fix order of subtraction in drm_mmap_paddr_locked.
- Address GEM objects' pages from 0, not from the mmap cookie.
- Check page alignment earlier in mmap code paths.
- Sprinkle kasserts throughout.

Still doesn't fix the garbage that is sometimes being scribbled all
over kernel memory!
2014-05-01 15:19:16 +00:00
riastradh
19062f226a Clear only the requested range in gen6_ggtt_clear_range.
Sprinkle kasserts throughout i915_gem_gtt.c.
2014-05-01 14:37:36 +00:00
joerg
e7ed6f13f6 First argument of vchiq_log_info is the log level, not a boolean. 2014-05-01 03:07:50 +00:00
riastradh
a5c71a7d77 Convert pending_flip_lock to spin lock -- interrupt handlers take it. 2014-04-26 20:26:26 +00:00
riastradh
ba02a7d79e Replace cpu_relax() by DELAY(1) or DELAY(1000) to wait us/ms. 2014-04-26 14:55:43 +00:00
riastradh
1e41db3906 Implement Linux dmi_check_system API.
Use it to get a Thinkpad quirk for i915 graphics.

Patch from nonoka@, PR 48708.
2014-04-25 23:54:59 +00:00
riastradh
8e210af663 Fix hot-plug with small patch from upstream before a full update. 2014-04-25 19:07:55 +00:00
riastradh
22b20e4adc Take the console only from vga or generic genfb.
Adapted from a patch by nonaka@ in PR 48705.

While here, attach i915 genfb earlier as in PR 48706.
2014-04-25 19:02:51 +00:00
riastradh
726fabb799 Adapt Linux i915 wait_for to use DELAY so it works while cold.
Adapted from a patch by nonaka@ in PR 48706.
2014-04-25 18:38:54 +00:00
skrll
4f4a9d7f28 Trailing whitespace 2014-04-25 15:49:17 +00:00
riastradh
ff9a7f6db9 Avoiding arithmetic on void * need not be NetBSD-specific. 2014-04-23 21:34:17 +00:00
skrll
e396d66cd0 Deal in 4KB pages for vchiq regardless of ARM page size. 2014-04-19 07:28:18 +00:00
skrll
b34c39e100 Wrap a long line. 2014-04-19 07:17:21 +00:00
skrll
71007d3e1f Comment KNF 2014-04-19 07:10:31 +00:00
skrll
e726eb3c65 Fix count vs ret confusion. ret is only set on error when count == 0 -
make sure this is the case.
2014-04-17 13:48:02 +00:00
skrll
1099eb26d0 Remove buggy linux completion API emulation and use the common version. 2014-04-12 13:28:41 +00:00
jakllsch
71ea5458bc Use <sys/stdarg.h> on NetBSD. 2014-04-08 17:55:18 +00:00
riastradh
40e9c21d2e Move <linux/errno.h> from drm2 to common. 2014-04-07 11:55:29 +00:00
riastradh
15700de443 Restore is_console=1 for i915, even if I keep it off for debugging. 2014-04-06 16:42:00 +00:00
riastradh
f9250e9199 Add missing declaration from last commit. 2014-04-06 16:38:34 +00:00
riastradh
dd35120f56 Tweak i915 framebuffer attachment in preparation for detach/reconfig.
Can't do this yet because genfb can't detach or reconfigure...
2014-04-04 16:02:34 +00:00
riastradh
185e03d365 Figure drm_debug into the drm_init module kludgerosity. 2014-04-04 15:16:59 +00:00
riastradh
f1d71ee3b8 Don't ifdef out unmapping of the GTT on NetBSD. 2014-04-04 15:16:29 +00:00
skrll
b8d7a8da62 Fix non-DWC2_DEBUG build. 2014-04-04 05:40:57 +00:00
riastradh
9968b51f4d Miscellaneous fixes for drm2 on i386. 2014-04-03 19:18:29 +00:00
riastradh
ed98e3febb Remove ifdef for const fix. 2014-04-03 15:16:42 +00:00
riastradh
c5f5d1712d Need <sys/reboot.h> for AB_DEBUG. 2014-04-03 15:16:18 +00:00
riastradh
bbf5a9ab22 Nix accidental whitespace to reduce diff from Linux. 2014-04-03 14:55:53 +00:00
riastradh
dfe09fda34 Make i915drmkms grab the console by default. 2014-04-03 14:45:44 +00:00
riastradh
6b41ce6b2b Enable drm debug output iff boothowto has AB_DEBUG set. 2014-04-03 14:15:05 +00:00
skrll
f913003c3d Merge conflicts. 2014-04-03 06:34:58 +00:00
skrll
d9d3aa9368 New dwc2 location - it moved out of staging. 2014-04-03 06:07:22 +00:00
riastradh
c4254364d1 Fix up removal of _DRM_SHM mappings and the hardware lock. 2014-04-03 05:48:02 +00:00
jakllsch
ade3ce5326 Add NetBSD-specific adjustments to gnu-efi. 2014-04-01 16:22:45 +00:00
jakllsch
b2c829d73a Import gnu-efi-3.0u 2014-04-01 16:16:05 +00:00
jakllsch
9564062d7e Add gnu-efi2netbsd script to help import the BSD-licensed parts of gnu-efi. 2014-04-01 16:10:56 +00:00
riastradh
82782468f9 Fix volatile qualifiers in drm2 <linux/atomic.h>. 2014-04-01 15:28:52 +00:00
riastradh
53da951f61 Explicitly kassert the precondition c_done != 0 in _completion_claim. 2014-04-01 15:19:37 +00:00
christos
8ff570d103 Remove SCCS prefix from RCS string! 2014-04-01 15:19:29 +00:00
riastradh
72c8acb6af Move <linux/completion.h> from drm2 to external/bsd/common. 2014-04-01 15:12:38 +00:00
riastradh
fb4363c7d3 kernel.h and list.h have already been moved to external/bsd/common.
With apologies to future revision control systems for not making it
clear this is effectively a rename.
2014-04-01 15:10:23 +00:00
riastradh
579dbc3bf5 Make drmkms find header files from sys/external/bsd/common. 2014-04-01 15:08:58 +00:00
riastradh
f2bbabef07 Merge changes from drm2 <linux/kernel.h> to common <linux/kernel.h>. 2014-04-01 14:57:58 +00:00
riastradh
b983224973 Add some more Linux completion operations.
Adapted from a patch by nick@.
2014-04-01 14:55:20 +00:00
riastradh
1a17e0f4f7 Move the drmkms i2c dependencies to where they belong. 2014-03-31 13:38:44 +00:00
christos
6d15f6a395 fix pci_intr_string 2014-03-29 19:54:46 +00:00
riastradh
0fb1b53a4b Don't leak KVA by forgetting to call uvm_km_free...oops!
From rmind@.
2014-03-28 23:22:27 +00:00
riastradh
d727e05d80 Remove needless splvm/splx calls.
From rmind@, who explained that the pmap(9) man page is wrong.
2014-03-28 23:19:41 +00:00
skrll
3e1dc7f3b2 Merge upstream fixes. 2014-03-27 23:03:06 +00:00
christos
492cf40e08 add missing dependencies (Takahiro HAYASHI) 2014-03-27 21:21:47 +00:00
skrll
0577e0f028 More #if 0'ed removal 2014-03-27 10:42:47 +00:00
skrll
85a926e15d Remove #if 0'ed code. 2014-03-27 10:11:04 +00:00
skrll
d0eeb335da Simplify the semaphore code a little 2014-03-27 07:59:17 +00:00
skrll
f714ddc6b3 KNF 2014-03-27 07:56:56 +00:00
skrll
fe334a7493 bzero -> memset 2014-03-27 07:54:43 +00:00
skrll
ba5d403f7e KNF 2014-03-26 16:44:41 +00:00
skrll
a31d4c323b Correct some bus_dma operations. 2014-03-26 16:07:15 +00:00
christos
aa2f824875 kill sprintf 2014-03-25 15:33:22 +00:00
tron
68376e5ecb Make this compile. 2014-03-23 14:44:55 +00:00
tron
aaccd35162 Make this compile. 2014-03-23 14:24:34 +00:00
christos
52afc2f519 kill sprintf 2014-03-22 21:42:44 +00:00
skrll
e4c22c37e6 Fix non-USB_DEBUG (and non-DWC2_DEBUG) build 2014-03-21 09:19:10 +00:00
riastradh
4574ca2240 Make uninitialized_var kludge expand to `x = 0'.
Forgot to commit this the other day.
2014-03-21 02:25:05 +00:00
christos
c1ae06abab kill sprintf 2014-03-20 20:42:08 +00:00
riastradh
c2708b9607 Don't unmap Rsdp until we've finished using it.
XXX Let me know how this is supposed to be upstreamed if you know and
have time...
2014-03-20 13:40:02 +00:00
riastradh
14a36d5338 Fix uninitialized variable wait in intel_ddi_prepare_link_retrain.
Move a line around, too, to avoid merge conflicts with upstream.

Noted by maxv@.
2014-03-19 18:04:32 +00:00
joerg
f7f78b3373 Import compiler-rt r204194. Fixes shift use in divide routines and const
correctness in gcc_personality_v0.c.
2014-03-18 22:28:42 +00:00
riastradh
8fd63a1055 Fix unused variable warnings in drm2. 2014-03-18 21:36:52 +00:00
riastradh
6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
dholland
a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
joerg
7ee9faea22 Checking the return value of an allocator works better, when looking at
the stored pointer.
2014-02-27 01:40:07 +00:00
joerg
636b9f2c58 abs on unsigned values is a nop. 2014-02-27 01:31:09 +00:00
joerg
fca01ac8d1 A member of a non-null struct pointer can't be null. 2014-02-27 01:30:18 +00:00
joerg
43287b2955 Retire sources from old build location. 2014-02-26 22:40:07 +00:00
joerg
a48c968746 Update compiler-rt glue for the new source layout. 2014-02-26 22:37:55 +00:00
joerg
156cd5872b Import compiler-rt r202303. Extend 128bit support to all LP64 platforms. 2014-02-26 22:31:29 +00:00
christos
e7cf1ceb60 prefer __func__ instead of __FUNCTION__ 2014-02-18 20:54:34 +00:00
christos
e7f41d7afa - include <sys/cdefs.h> for compiler definitions
- add a lint comment
2014-02-18 20:53:44 +00:00
joerg
728bc80078 Fix builtin shadowing in PowerPC specific code. Implement clzdi/clzsi
for ARM.
2014-01-29 14:21:41 +00:00
joerg
f1ec592d28 Import compiler-rt r200007. Use .size on all assembler functions.
Reimplement ARM division based on Matt Thomas's common version.
2014-01-24 14:52:00 +00:00
apb
8f26fe44ec Update ACPI_DATE to "18 Dec 2013", because acpica version 20131218
was imported on 27 Dec 2013.
2014-01-18 09:48:24 +00:00
apb
acf505fc16 Use ACPI_DATE instead of __DATE__ in a version string that
ends up in the iasl executable.  ACPI_DATE is defined in
sys/external/bsd/acpica/dist/include/acapps.h.
2014-01-18 09:25:24 +00:00
joerg
c620e3c245 More sanitizers we are still not interested in. 2014-01-15 21:07:19 +00:00
joerg
b4b49684a3 Import compiler-rt r199273. Support libkern/libsa alternative headers.
Mark assembler functions as such to prevent ld snafu.
2014-01-15 21:06:10 +00:00
christos
27778cf9f8 PR/48494: Ryo Onodera: After ACPICA 20131218 update, uhub topology is
misanderstood on macbook air. Ryo by bisection found that the following
commit causes the problem: https://github.com/acpica/acpica/commit/\
637accd073a205eb4acac935f34d0eaee0c301a8. This is tracked in:
https://bugs.acpica.org/show_bug.cgi?id=1016
2014-01-05 15:45:43 +00:00
skrll
08a9dbe8f5 Small bit of tidyup and remove a XXX now that it's possible. 2014-01-03 14:41:57 +00:00
skrll
cf1ea1842e Call callout_reset on the xfer timeoute_handle before calling
dwc2_hcd_urb_enqueue
2014-01-03 12:20:26 +00:00
skrll
5755263612 Change a KASSERT to a KASSERTMSG and add a DPRINTFN. 2014-01-03 12:07:37 +00:00
skrll
197d83126f Protect access of urb->hcpriv by adapting the following change from the
Raspberry PI dwc_otg driver.

38753ce72d

dwc_otg: prevent OOPSes during device disconnects

The dwc_otg_urb_enqueue function is thread-unsafe. In particular the
access of urb->hcpriv, usb_hcd_link_urb_to_ep, dwc_otg_urb->qtd and
friends does not occur within a critical section and so if a device
was unplugged during activity there was a high chance that the
usbcore hub_thread would try to disable the endpoint with partially-
formed entries in the URB queue. This would result in BUG() or null
pointer dereferences.

Fix so that access of urb->hcpriv, enqueuing to the hardware and
adding to usbcore endpoint URB lists is contained within a single
critical section.
2014-01-02 15:54:10 +00:00
skrll
ab8b74b3ab KASSERT that the transfer callout is not pending.
Removes a XXX
2013-12-31 09:10:43 +00:00
christos
ad495e7046 Now that our yacc supports providing yytname[] and does the name protection
automatically (as it should, unlike bison), elide the name protection hacks.
2013-12-30 22:32:45 +00:00
christos
178126fa8a Simplify previous, don't even set the variables if they are not going to
be used.
2013-12-29 23:26:00 +00:00
christos
5aa89cd133 ifdef unused variables 2013-12-29 23:07:34 +00:00
christos
8c78eb9844 fix debugging build. 2013-12-27 20:55:40 +00:00
christos
fcb25a8463 add missing debugger files. 2013-12-27 20:55:03 +00:00
christos
773b72577c amend for new files 2013-12-27 18:51:08 +00:00
christos
a2c051a9b0 resolve conflicts 2013-12-27 18:50:56 +00:00
christos
ff4a156d7c import new acpica 2013-12-27 18:45:57 +00:00
alnsn
ceb0a8f1ae Turn on executable allocator an use module_map with UVM_KMF_EXEC flag.
This should fix execution of code generated by librumpkern_sljit.
Also enable global lock.
2013-12-17 22:39:23 +00:00
skrll
a07e26d1c4 Comment out unsed variable. Left for reference. 2013-12-14 10:00:42 +00:00
skrll
c329d2d44d Remove unused variables. 2013-12-14 09:58:03 +00:00
wiz
d860f590d4 Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
joerg
ac87a88380 remote_event_destroy is unused, mark it so. 2013-12-01 02:57:43 +00:00
skrll
9a784854f0 Drop the intr_lock when calling usb_schedsoftintr so that we don't lock
against ourself in dwc2_softintr in the polling case.
2013-11-28 06:56:36 +00:00
christos
f25c095d58 CID 976267: NULL deref check 2013-11-27 22:18:06 +00:00
alnsn
7ca7224ef5 Use __syncicache() in sljit on powerpc. 2013-11-25 23:53:44 +00:00
skrll
661a0168b5 Resolve conflicts. 2013-11-24 12:25:19 +00:00
skrll
33e89ce9f4 Zeroise the whole urb including the iso_descs array 2013-11-19 10:07:11 +00:00
skrll
ab5615267b Correct the interval assignment for isoc and intr transfers. 2013-11-19 07:50:01 +00:00
skrll
7ed47d18d5 Use PRIxBUSADDR in DPRINTF. Problem pointed out by kiyohara. 2013-11-19 07:45:42 +00:00
alnsn
f192c5171a Report an error if SLJIT_CACHE_FLUSH isn't defined by machine/sljitarch.h. 2013-11-18 07:13:13 +00:00
skrll
810860c8c1 Simplify variable assignment and avoid gcc warnings. 2013-11-14 12:41:46 +00:00
skrll
67d31eff3d Remove unused variable. 2013-11-14 12:40:51 +00:00
skrll
f52524456d Make CONFIG_USB_DWC2_DEBUG_PERIODIC compile. 2013-11-12 15:13:14 +00:00
skrll
735b653763 Don't always define DWC2_DEBUG 2013-11-01 15:03:39 +00:00
mrg
7ba5ff78a9 move variable definition/set inside the same #ifdef of the usage. 2013-11-01 06:42:23 +00:00
skrll
738c9dbd7c Be strictly correct about chan->xfer_dma assignment and avoid calling
DMAADDR on fully transfered data phase of a control transfer.

Without this change the KASSERT(offset < dma->block->size) in usb_dmaaddr
would fire.

Found by anon when testing athn(4).
2013-10-22 16:37:08 +00:00
skrll
62e93a5632 Remove unused usbd_xfer_handle from dwc2_pipe. (missed commit) 2013-10-22 12:57:40 +00:00
skrll
cd79003d3d Remove unused usbd_xfer_handle from dwc2_pipe. 2013-10-22 09:42:20 +00:00
skrll
ff3d395db7 Minor cleanup. 2013-10-22 09:30:04 +00:00
skrll
3216ed5b41 Remove daft KASSERTs 2013-10-22 09:23:34 +00:00
christos
a2f33b7a58 ifdef kernel used only variable 2013-10-20 17:14:05 +00:00
christos
767345987a remove unused variables 2013-10-17 21:15:18 +00:00
christos
b94bb9347c define a new macro that does not declare variables used in output. 2013-10-17 21:15:00 +00:00
christos
86aec73c13 annotate some unused variables the authors want to keep 2013-10-17 21:14:05 +00:00
christos
e61d329a40 __USE a debugging variable 2013-10-17 21:12:56 +00:00
skrll
76f6e570b2 Make this compile for more option combinations. 2013-10-15 07:38:37 +00:00
skrll
69486ccf02 Translate ENODEV to USBD_INVAL 2013-10-15 07:37:54 +00:00
skrll
77e4628c8c Print the client_id (lwp address) as hex and avoid stack overflow. Use
snprintf while here.

Fixes PR/48287
2013-10-13 07:46:26 +00:00
skrll
77db6ccfaa Better instructions 2013-10-05 07:00:41 +00:00
skrll
244c883ef8 Merge conflicts. 2013-10-05 06:51:43 +00:00
skrll
bfe4e9e245 At least attempt to handle USBD_DEFAULT_INTERVAL. 2013-10-02 22:53:23 +00:00
skrll
33ebc33e66 A small code simplification 2013-10-02 22:48:51 +00:00
skrll
5774832cb2 Pass any error from dwc2_device_start upwards. 2013-10-02 22:45:10 +00:00
skrll
99508dcf0a Some core configurations cannot support LS traffic on a FS root port.
Fix adapted from the github.com/raspberrypi driver.
2013-10-02 11:36:27 +00:00
skrll
c9daadd9cd First pass at isoc transfer support - seems to work. More testing
required.
2013-09-27 22:03:01 +00:00
skrll
759305b881 Tidyup dwc2_host_is_b_hnp_enabled 2013-09-27 21:56:05 +00:00
skrll
e5ed6def73 Missed a sc->sc_intr_lock to hsotg->lock change from earlier commit. 2013-09-27 21:50:45 +00:00
skrll
1023b2854b Improve a couple of DPRINTFs 2013-09-27 21:42:42 +00:00
skrll
852b18f9e8 Use the hsotg->lock spin lock solely 2013-09-27 21:39:34 +00:00
skrll
cb22e5243a Resolve conflicts 2013-09-25 06:19:22 +00:00
skrll
51dac8c00c Import dwc2 2013-09-25 2013-09-25 05:41:15 +00:00
skrll
cfa7ca70ad Improve a couple of DPRINTFs 2013-09-21 13:17:00 +00:00
skrll
52b375a163 Clean up semaphore initialisation. 2013-09-20 09:05:53 +00:00
skrll
aa4ef11d7e Track waiters/clients via lwp pointer and not pid. 2013-09-19 15:13:43 +00:00
skrll
57f93fe2e4 Use the common list.h 2013-09-19 14:43:39 +00:00
skrll
ab66887646 Call {lmutex,_sema)_destroy appropriately 2013-09-19 13:51:44 +00:00
rmind
cb633e2d0c Add bpf_filter_ext() to use with BPF COP, restore bpf_filter() as it was
originally to preserve compatibility.  Similarly, add bpf_validate_ext()
which takes bpf_ctx_t.
2013-09-18 23:34:55 +00:00
martin
7c59522dbb Remove unused variable 2013-09-15 09:38:28 +00:00
joerg
0c1143e0a4 Mark mach64_set_dma_eol as unused. 2013-09-14 12:39:28 +00:00
joerg
6f627b4ea2 Use __KERNEL_RCSID. 2013-09-14 12:39:09 +00:00
martin
ee129994cf Fix return value of ipf_sync_nat 2013-09-14 12:18:06 +00:00
martin
9e58a5046a Remove unused variables 2013-09-14 12:06:19 +00:00
martin
1e30f2d6cd Remove a few unused variables, ifdef others like their use 2013-09-14 12:03:10 +00:00
martin
9a3cf38a1f Remove unused variables 2013-09-14 11:51:47 +00:00
martin
d07fab0561 Remove unused variable 2013-09-14 11:41:45 +00:00