aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/drm2
Commit message (Collapse)AuthorAgeFilesLines
* drm2: Stop checking for failures from malloc(M_WAITOK)Zhenlei Huang2024-09-303-79/+1
| | | | | | | | MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 6dbf3aca4f5c4f7287f186360c2391f2adfea8d6) (cherry picked from commit 95532d15a12c9cbf7c5e62e912de90919af7db24)
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-2357-114/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in current: (cherry picked from commit 685dc743dc3b)
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-2310-10/+0
| | | | | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/ Similar commit in current: (cherry picked from commit 71625ec9ad2a)
* sys: Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/ Similar commit in current: (cherry picked from commit 2ff63af9b88c)
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-239-18/+0
| | | | | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/ Similar commit in current: (cherry picked from commit 95ee2897e98f)
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-07-254-4/+4
| | | | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix (cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
* Remove an extra argument to SYSCTL_FOREACHAndrew Turner2023-03-021-1/+1
| | | | | | | | This was missed in e0853c933661. Sponsored by: The FreeBSD Foundation (cherry picked from commit fbc9f1b2d6cf90c02b918671fb7791cf36472cfd)
* Use SYSCTL_FOREACH in drm2Andrew Turner2023-01-231-1/+1
| | | | | | | | This was added recently. Use it to get the correct _FOREACH macro. Sponsored by: The FreeBSD Foundation (cherry picked from commit e0853c9336616e4ca4ff41aab0f8ad91bb75fd42)
* Adjust function definition in drm_fb_helper.c to avoid clang 15 warningDimitry Andric2022-08-211-1/+1
| | | | | | | | | | | | | | | | | With clang 15, the following -Werror warning is produced: sys/dev/drm2/drm_fb_helper.c:86:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] framebuffer_alloc() ^ void This is because framebuffer_alloc() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration. MFC after: 3 days (cherry picked from commit 7a7bbe10216e0fbcf3af7a122d249cb000d517c7)
* vm_object: Modify various drivers to allocate OBJT_SWAP objectsMark Johnston2022-07-271-1/+1
| | | | | | | | | | | | | This is in preparation for removal of OBJT_DEFAULT. In particular, it is now cheap to check whether an OBJT_SWAP object has any swap blocks allocated, so the benefit of having a separate OBJT_DEFAULT type is quite marginal, and the OBJT_DEFAULT->SWAP transition is a source of bugs. Reviewed by: alc, hselasky, kib Sponsored by: The FreeBSD Foundation (cherry picked from commit 6b38974085215bcd787be0d138411ec57cf0096e)
* Create wrapper for Giant taken for newbusWarner Losh2022-06-211-4/+4
| | | | | | | | | | | | | Create a wrapper for newbus to take giant and for busses to take it too. bus_topo_lock() should be called before interacting with newbus routines and unlocked with bus_topo_unlock(). If you need the topology lock for some reason, bus_topo_mtx() will provide that. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D31831 (cherry picked from commit c6df6f5322f7004c71216391e1c0b374d853704a)
* drm2: Fix a typo in a source code commentGordon Bergling2022-04-021-1/+1
| | | | | | - s/mmaping/mapping/ (cherry picked from commit 22ba115b49a2c266aa1967f6b192b7aa8f883b7d)
* Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrightsEd Maste2022-02-084-4/+0
| | | | | | | | | These ones were unambiguous cases where the Foundation was the only listed copyright holder (in the associated license block). Sponsored by: The FreeBSD Foundation (cherry picked from commit 9feff969a01044c3083b552f06f7eb6416bc0524)
* Convert consumers to vm_page_alloc_noobj_contig()Mark Johnston2021-11-032-9/+8
| | | | | | | | | Remove now-unneeded page zeroing. No functional change intended. Reviewed by: alc, hselasky, kib Sponsored by: The FreeBSD Foundation (cherry picked from commit 84c3922243a7b7fd510dcfb100aec59c878c57d0)
* Convert vm_page_alloc() callers to use vm_page_alloc_noobj().Mark Johnston2021-11-031-6/+1
| | | | | | | | | | | | | | | Remove page zeroing code from consumers and stop specifying VM_ALLOC_NOOBJ. In a few places, also convert an allocation loop to simply use VM_ALLOC_WAITOK. Similarly, convert vm_page_alloc_domain() callers. Note that callers are now responsible for assigning the pindex. Reviewed by: alc, hselasky, kib Sponsored by: The FreeBSD Foundation (cherry picked from commit a4667e09e6520dc2c4b0b988051f060fed695a91)
* Fix some common typos in source code commentsGordon Bergling2021-08-191-1/+1
| | | | | | | - s/struture/structure/ - s/structre/structure/ (cherry picked from commit 17db4b52fb41aeabeb945c68c1b5edd4db4eac31)
* Don't permit DRM buffer mappings to be upgraded to executable.John Baldwin2020-10-061-6/+4
| | | | | | | | | | Reviewed by: kib MFC after: 1 month Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26697 Notes: svn path=/head/; revision=366494
* drm2: Fix build after r365264Niclas Zeising2020-09-031-0/+2
| | | | | | | | | | | | | Fix the build after r365264, I forgot to exclude arm in one more place. Reported by: rpokala Approved by: manu (implicit, build fix) MFC after: 3 days X-MFC-With: 365264 Pointy-hat to: zeising Notes: svn path=/head/; revision=365287
* drm2: Further improve deprecation messageNiclas Zeising2020-09-021-2/+8
| | | | | | | | | | | | | | | | | | Further improve the drm2 deprecation message, only displaying information about the port for relevant architectures, and skipping the message completely from arm, which uses some parts of drm2 still. This is mostly intended to be merged to 12, since the base bits of drm2 on FreeBSD 13 are only really used on arm. Reviewed by: manu, mmel Approved by: manu MFC after: 3 days X-MFC-with: r364737 Differential Revision: https://reviews.freebsd.org/D26275 Notes: svn path=/head/; revision=365264
* drm2: Update deprecation messageNiclas Zeising2020-08-241-5/+1
| | | | | | | | | | | | | | Update the deprecation message in the drm2 (aka legacy drm) drivers to point towards the graphics/drm-kmod ports for all architectures, not just amd64. drm-kmod has support for more architectures these days, and the graphics/drm-legacy-kmod port is being deprecated. Approved by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26174 Notes: svn path=/head/; revision=364737
* Convert a few triviail consumers to the new unlocked grab API.Jeff Roberson2020-02-281-5/+4
| | | | | | | | Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D23847 Notes: svn path=/head/; revision=358447
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (5 of many)Pawel Biernacki2020-02-162-13/+8
| | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Reviewed by: imp, kib Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D23633 Notes: svn path=/head/; revision=358004
* Add KERNEL_PANICKED macro for use in place of direct panicstr testsMateusz Guzik2020-01-121-1/+1
| | | | Notes: svn path=/head/; revision=356655
* Make page busy state deterministic on free. Pages must be xbusy whenJeff Roberson2019-12-221-0/+2
| | | | | | | | | | | | | | | | | | | removed from objects including calls to free. Pages must not be xbusy when freed and not on an object. Strengthen assertions to match these expectations. In practice very little code had to change busy handling to meet these rules but we can now make stronger guarantees to busy holders and avoid conditionally dropping busy in free. Refine vm_page_remove() and vm_page_replace() semantics now that we have stronger guarantees about busy state. This removes redundant and potentially problematic code that has proliferated. Discussed with: markj Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D22822 Notes: svn path=/head/; revision=356002
* (4/6) Protect page valid with the busy lock.Jeff Roberson2019-10-152-2/+2
| | | | | | | | | | | | | | Atomics are used for page busy and valid state when the shared busy is held. The details of the locking protocol and valid and dirty synchronization are in the updated vm_page.h comments. Reviewed by: kib, markj Tested by: pho Sponsored by: Netflix, Intel Differential Revision: https://reviews.freebsd.org/D21594 Notes: svn path=/head/; revision=353539
* Replace redundant code with a few new vm_page_grab facilities:Jeff Roberson2019-09-102-17/+8
| | | | | | | | | | | | | | - VM_ALLOC_NOCREAT will grab without creating a page. - vm_page_grab_valid() will grab and page in if necessary. - vm_page_busy_acquire() automates some busy acquire loops. Discussed with: alc, kib, markj Tested by: pho (part of larger branch) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21546 Notes: svn path=/head/; revision=352176
* Use the sleepq lock rather than the page lock to protect against wakeupJeff Roberson2019-09-101-4/+1
| | | | | | | | | | | | | races with page busy state. The object lock is still used as an interlock to ensure that the identity stays valid. Most callers should use vm_page_sleep_if_busy() to handle the locking particulars. Reviewed by: alc, kib, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21255 Notes: svn path=/head/; revision=352174
* Change synchonization rules for vm_page reference counting.Mark Johnston2019-09-093-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several mechanisms by which a vm_page reference is held, preventing the page from being freed back to the page allocator. In particular, holding the page's object lock is sufficient to prevent the page from being freed; holding the busy lock or a wiring is sufficent as well. These references are protected by the page lock, which must therefore be acquired for many per-page operations. This results in false sharing since the page locks are external to the vm_page structures themselves and each lock protects multiple structures. Transition to using an atomically updated per-page reference counter. The object's reference is counted using a flag bit in the counter. A second flag bit is used to atomically block new references via pmap_extract_and_hold() while removing managed mappings of a page. Thus, the reference count of a page is guaranteed not to increase if the page is unbusied, unmapped, and the object's write lock is held. As a consequence of this, the page lock no longer protects a page's identity; operations which move pages between objects are now synchronized solely by the objects' locks. The vm_page_wire() and vm_page_unwire() KPIs are changed. The former requires that either the object lock or the busy lock is held. The latter no longer has a return value and may free the page if it releases the last reference to that page. vm_page_unwire_noq() behaves the same as before; the caller is responsible for checking its return value and freeing or enqueuing the page as appropriate. vm_page_wire_mapped() is introduced for use in pmap_extract_and_hold(). It fails if the page is concurrently being unmapped, typically triggering a fallback to the fault handler. vm_page_wire() no longer requires the page lock and vm_page_unwire() now internally acquires the page lock when releasing the last wiring of a page (since the page lock still protects a page's queue state). In particular, synchronization details are no longer leaked into the caller. The change excises the page lock from several frequently executed code paths. In particular, vm_object_terminate() no longer bounces between page locks as it releases an object's pages, and direct I/O and sendfile(SF_NOCACHE) completions no longer require the page lock. In these latter cases we now get linear scalability in the common scenario where different threads are operating on different files. __FreeBSD_version is bumped. The DRM ports have been updated to accomodate the KPI changes. Reviewed by: jeff (earlier version) Tested by: gallatin (earlier version), pho Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20486 Notes: svn path=/head/; revision=352110
* Avoid relying on header pollution from sys/refcount.h.Mark Johnston2019-07-291-0/+1
| | | | | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=350421
* Add a return value to vm_page_remove().Mark Johnston2019-06-261-1/+1
| | | | | | | | | | | | | | | | | | Use it to indicate whether the page may be safely freed following its removal from the object. Also change vm_page_remove() to assume that the page's object pointer is non-NULL, and have callers perform this check instead. This is a step towards an implementation of an atomic reference counter for each physical page structure. Reviewed by: alc, dougm, kib MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20758 Notes: svn path=/head/; revision=349432
* Replace uses of vm_page_unwire(m, PQ_NONE) with vm_page_unwire_noq(m).Mark Johnston2019-06-071-1/+1
| | | | | | | | | | | | | | | These calls are not the same in general: the former will dequeue the page if it is enqueued, while the latter will just leave it alone. But, all existing uses of the former apply to unmanaged pages, which are never enqueued in the first place. No functional change intended. Reviewed by: kib MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20470 Notes: svn path=/head/; revision=348785
* Include eventhandler.h in more compilation unitsConrad Meyer2019-05-211-0/+1
| | | | | | | | | | | | | | | | This was enumerated with exhaustive search for sys/eventhandler.h includes, cross-referenced against EVENTHANDLER_* usage with the comm(1) utility. Manual checking was performed to avoid redundant includes in some drivers where a common os_bsd.h (for example) included sys/eventhandler.h indirectly, but it is possible some of these are redundant with driver-specific headers in ways I didn't notice. (These CUs did not show up as missing eventhandler.h in tinderbox.) X-MFC-With: r347984 Notes: svn path=/head/; revision=348026
* Remove the i915 and radeon drivers.Warner Losh2019-02-19186-183247/+0
| | | | | | | | | | | | | Per discussions on arch@ and elsewhere, the maintenance of this code has moved to the drm-kmod and drm-legacy-kmod ports. Remove the i915 and radeon drivers from the tree. Approved by: graphics team Reviewed by: manu@, mmel@ Differential Revision: https://reviews.freebsd.org/D19196 Notes: svn path=/head/; revision=344299
* Complete the removal of obsolete ioctl handlers.Mark Johnston2019-01-092-8/+0
| | | | | | | | | | | PR: 234706 Reviewed by: imp MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18778 Notes: svn path=/head/; revision=342888
* Remove UMS support code from radeonkms.Mark Johnston2018-12-179-10807/+33
| | | | | | | | | | | | | | | | The code is unreachable since the entries of radeon_ioctls[] are not associated with any device: we provide only the KMS entry points. Moreover, r600_cp_dispatch_texture() contains an integer overflow bug that can be triggered from userspace.[1] Reported by: Anonymous of the Shellphish Grill Team[1] Reviewed by: dumbbell MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18516 Notes: svn path=/head/; revision=342182
* Add updating entry for DRMWarner Losh2018-10-201-2/+2
| | | | | | | | | | | | | | | | | | | Update messaging for which drm module to install. Add guidance on what hardware is supported (which should be copied into the release notes). Note: the in tree drivers are abandonware. There has been no organized support for them for many years, and the plan is to still remove them for all but arm once the transition to drm-*kmod is complete. Also note that WITHOUT_MODULE_DRM and WITHOUT_MODULE_DRM2 should generally be added to src.conf for anybody using the drm-*kmod ports. That will become default in 13 soon, however. Approved by: FreeBSD Graphics Team Relnotes: Yes MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D17451 Notes: svn path=/head/; revision=339475
* Reapply, with minor tweaks, r338025, from the original commit:Warner Losh2018-09-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused and easy to misuse PNP macro parameter Inspired by r338025, just remove the element size parameter to the MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to have correct pointer (or array) type. Since all invocations of the macro already had this property and the emitted PNP data continues to include the element size, there is no functional change. Mostly done with the coccinelle 'spatch' tool: $ cat modpnpsize0.cocci @normaltables@ identifier b,c; expression a,d,e; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,d, -sizeof(d[0]), e); @singletons@ identifier b,c,d; expression a; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,&d, -sizeof(d), 1); $ rg -l MODULE_PNP_INFO -- sys | \ xargs spatch --in-place --sp-file modpnpsize0.cocci (Note that coccinelle invokes diff(1) via a PATH search and expects diff to tolerate the -B flag, which BSD diff does not. So I had to link gdiff into PATH as diff to use spatch.) Tinderbox'd (-DMAKE_JUST_KERNELS). Approved by: re (glen) Notes: svn path=/head/; revision=338948
* Convert x86 cache invalidation functions to ifuncs.Konstantin Belousov2018-09-192-6/+7
| | | | | | | | | | | | | This simplifies the runtime logic and reduces the number of runtime-constant branches. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D16736 Notes: svn path=/head/; revision=338807
* Add big, nasty abandonware tags to this code.Warner Losh2018-08-282-1/+16
| | | | | | | | | | | | | This code works for some people, but hasn't been updated in a long time. Still allow people to use this code for the moment, but put a big, nasty obsolete message to inform and encourage people to move to the port. Approved by: re@ (gjb) Differential Review: https://reviews.freebsd.org/D16894 Notes: svn path=/head/; revision=338348
* Eliminate the arena parameter to kmem_free(). Implicitly this corrects anAlan Cox2018-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | error in the function hypercall_memfree(), where the wrong arena was being passed to kmem_free(). Introduce a per-page flag, VPO_KMEM_EXEC, to mark physical pages that are mapped in kmem with execute permissions. Use this flag to determine which arena the kmem virtual addresses are returned to. Eliminate UMA_SLAB_KRWX. The introduction of VPO_KMEM_EXEC makes it redundant. Update the nearby comment for UMA_SLAB_KERNEL. Reviewed by: kib, markj Discussed with: jeff Approved by: re (marius) Differential Revision: https://reviews.freebsd.org/D16845 Notes: svn path=/head/; revision=338318
* Revert drm2 removal.Warner Losh2018-08-24269-0/+235179
| | | | | | | | | | | | | | | | | | | | | | | | | | | Revert r338177, r338176, r338175, r338174, r338172 After long consultations with re@, core members and mmacy, revert these changes. Followup changes will be made to mark them as deprecated and prent a message about where to find the up-to-date driver. Followup commits will be made to make this clear in the installer. Followup commits to reduce POLA in ways we're still exploring. It's anticipated that after the freeze, this will be removed in 13-current (with the residual of the drm2 code copied to sys/arm/dev/drm2 for the TEGRA port's use w/o the intel or radeon drivers). Due to the impending freeze, there was no formal core vote for this. I've been talking to different core members all day, as well as Matt Macey and Glen Barber. Nobody is completely happy, all are grudgingly going along with this. Work is in progress to mitigate the negative effects as much as possible. Requested by: re@ (gjb, rgrimes) Notes: svn path=/head/; revision=338285
* Remove legacy drm and drm2 from treeMatt Macy2018-08-22269-235179/+0
| | | | | | | | | | | | | | | | | As discussed on the MLs drm2 conflicts with the ports' version and there is no upstream for most if not all of drm. Both have been merged in to a single port. Users on powerpc, 32-bit hardware, or with GPUs predating Radeon and i915 will need to install the graphics/drm-legacy-kmod. All other users should be able to use one of the LinuxKPI-based ports: graphics/drm-stable-kmod, graphics/drm-next-kmod, graphics/drm-devel-kmod. MFC: never Approved by: core@ Notes: svn path=/head/; revision=338172
* Back out r338035 until Warner is finished churning GSoC PNP patchesConrad Meyer2018-08-192-2/+2
| | | | | | | | | | I was not aware Warner was making or planning to make forward progress in this area and have since been informed of that. It's easy to apply/reapply when churn dies down. Notes: svn path=/head/; revision=338037
* Remove unused and easy to misuse PNP macro parameterConrad Meyer2018-08-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspired by r338025, just remove the element size parameter to the MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to have correct pointer (or array) type. Since all invocations of the macro already had this property and the emitted PNP data continues to include the element size, there is no functional change. Mostly done with the coccinelle 'spatch' tool: $ cat modpnpsize0.cocci @normaltables@ identifier b,c; expression a,d,e; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,d, -sizeof(d[0]), e); @singletons@ identifier b,c,d; expression a; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,&d, -sizeof(d), 1); $ rg -l MODULE_PNP_INFO -- sys | \ xargs spatch --in-place --sp-file modpnpsize0.cocci (Note that coccinelle invokes diff(1) via a PATH search and expects diff to tolerate the -B flag, which BSD diff does not. So I had to link gdiff into PATH as diff to use spatch.) Tinderbox'd (-DMAKE_JUST_KERNELS). Notes: svn path=/head/; revision=338035
* Eliminate the unused arena parameter from kmem_alloc_attr().Alan Cox2018-08-181-2/+2
| | | | | | | | Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D16793 Notes: svn path=/head/; revision=338030
* Make timespecadd(3) and friends publicAlan Somers2018-07-302-4/+3
| | | | | | | | | | | | | | | | | | | | | | The timespecadd(3) family of macros were imported from NetBSD back in r35029. However, they were initially guarded by #ifdef _KERNEL. In the meantime, we have grown at least 28 syscalls that use timespecs in some way, leading many programs both inside and outside of the base system to redefine those macros. It's better just to make the definitions public. Our kernel currently defines two-argument versions of timespecadd and timespecsub. NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define three-argument versions. Solaris also defines a three-argument version, but only in its kernel. This revision changes our definition to match the common three-argument version. Bump _FreeBSD_version due to the breaking KPI change. Discussed with: cem, jilles, ian, bde Differential Revision: https://reviews.freebsd.org/D14725 Notes: svn path=/head/; revision=336914
* Fix build of i915kms with base gccDimitry Andric2018-06-111-1/+9
| | | | | | | | | | | | | | | | | | | | | | | Base gcc fails to compile sys/dev/drm2/i915/intel_display.c for i386, with the following -Werror warnings: cc1: warnings being treated as errors /usr/src/sys/dev/drm2/i915/intel_display.c:8884: warning: initialization from incompatible pointer type This is due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36432, which incorrectly interprets the [] as a flexible array member. Because base gcc does not have a -W flag to suppress this particular warning, it requires a rather ugly cast. To not influence any other compiler, put it in a #if/#endif block. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D15744 Notes: svn path=/head/; revision=334946
* Move most of the contents of opt_compat.h to opt_global.h.Brooks Davis2018-04-064-7/+0
| | | | | | | | | | | | | | | | | | | | | opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures. Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files. Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941 Notes: svn path=/head/; revision=332122
* Correct pseudo misspelling in sys/ commentsEd Maste2018-02-231-1/+1
| | | | | | | contrib code and #define in intel_ata.h unchanged. Notes: svn path=/head/; revision=329873
* vm_wait() rework.Konstantin Belousov2018-02-204-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Make vm_wait() take the vm_object argument which specifies the domain set to wait for the min condition pass. If there is no object associated with the wait, use curthread' policy domainset. The mechanics of the wait in vm_wait() and vm_wait_domain() is supplied by the new helper vm_wait_doms(), which directly takes the bitmask of the domains to wait for passing min condition. Eliminate pagedaemon_wait(). vm_domain_clear() handles the same operations. Eliminate VM_WAIT and VM_WAITPFAULT macros, the direct functions calls are enough. Eliminate several control state variables from vm_domain, unneeded after the vm_wait() conversion. Scetched and reviewed by: jeff Tested by: pho Sponsored by: The FreeBSD Foundation, Mellanox Technologies Differential revision: https://reviews.freebsd.org/D14384 Notes: svn path=/head/; revision=329636