Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/i915drm i915: Call i915_global_buddy_i...
details: https://anonhg.NetBSD.org/src/rev/c9ea10b978ef
branches: trunk
changeset: 1028515:c9ea10b978ef
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:13:30 2021 +0000
description:
i915: Call i915_global_buddy_init from i915 module init.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_buddy.c | 8 ++++++--
sys/external/bsd/drm2/i915drm/i915_module.c | 10 ++++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diffs (67 lines):
diff -r 13fe38ebb064 -r c9ea10b978ef sys/external/bsd/drm2/dist/drm/i915/i915_buddy.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_buddy.c Sun Dec 19 11:13:22 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_buddy.c Sun Dec 19 11:13:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_buddy.c,v 1.3 2021/12/19 11:13:22 riastradh Exp $ */
+/* $NetBSD: i915_buddy.c,v 1.4 2021/12/19 11:13:30 riastradh Exp $ */
// SPDX-License-Identifier: MIT
/*
@@ -6,7 +6,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_buddy.c,v 1.3 2021/12/19 11:13:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_buddy.c,v 1.4 2021/12/19 11:13:30 riastradh Exp $");
#include <linux/err.h>
#include <linux/kmemleak.h>
@@ -38,6 +38,10 @@
.exit = i915_global_buddy_exit,
} };
+#ifdef __NetBSD__
+#define __init /* called from i915_module.c */
+#endif
+
int __init i915_global_buddy_init(void)
{
global.slab_blocks = KMEM_CACHE(i915_buddy_block, SLAB_HWCACHE_ALIGN);
diff -r 13fe38ebb064 -r c9ea10b978ef sys/external/bsd/drm2/i915drm/i915_module.c
--- a/sys/external/bsd/drm2/i915drm/i915_module.c Sun Dec 19 11:13:22 2021 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_module.c Sun Dec 19 11:13:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_module.c,v 1.10 2021/12/19 10:32:59 riastradh Exp $ */
+/* $NetBSD: i915_module.c,v 1.11 2021/12/19 11:13:30 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_module.c,v 1.10 2021/12/19 10:32:59 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_module.c,v 1.11 2021/12/19 11:13:30 riastradh Exp $");
#include <sys/types.h>
#include <sys/module.h>
@@ -52,6 +52,8 @@
struct drm_sysctl_def i915_def = DRM_SYSCTL_INIT();
+int i915_global_buddy_init(void); /* XXX */
+
static int
i915drmkms_init(void)
{
@@ -61,6 +63,10 @@
if (error)
return error;
+ error = -i915_global_buddy_init();
+ if (error)
+ return error;
+
drm_sysctl_init(&i915_def);
spin_lock_init(&mchdev_lock);
Home |
Main Index |
Thread Index |
Old Index