summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFlora Cui <flora.cui@amd.com>2020-05-31 17:44:52 +0800
committerSlava Grigorev <slava.grigorev@amd.com>2020-06-09 11:33:27 -0400
commite07c4960e087e15190405f964684fad53614d7fa (patch)
treee5afdee9be7bc21cf33e1e5dfc15a642d57485d7 /include
parentd0e490e428296c06c2bf54427e3a1e8349afe863 (diff)
drm/amdkcl: update test for arch_io_reserve_memtype_wc
arch_io_reserve_memtype_wc is introduced in v4.9-rc2-1-g8ef4227615e1. rhel < 7.8 adds an inline define to drm_backport.h Change-Id: I79dd14fbab6245d9ae6565add00037f1ff6d1dc7 Signed-off-by: Flora Cui <flora.cui@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Diffstat (limited to 'include')
-rw-r--r--include/kcl/backport/kcl_io_backport.h (renamed from include/kcl/kcl_io.h)14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/kcl/kcl_io.h b/include/kcl/backport/kcl_io_backport.h
index c6d8fc97f159..8dd2c3b29371 100644
--- a/include/kcl/kcl_io.h
+++ b/include/kcl/backport/kcl_io_backport.h
@@ -1,17 +1,20 @@
/* SPDX-License-Identifier: MIT */
#ifndef AMDKCL_IO_H
#define AMDKCL_IO_H
-#include <linux/version.h>
+
#include <linux/types.h>
+#include <linux/io.h>
#if !defined(HAVE_ARCH_IO_RESERVE_FREE_MEMTYPE_WC)
-#ifdef CONFIG_X86_PAT
-extern int arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t size);
-extern void arch_io_free_memtype_wc(resource_size_t start, resource_size_t size);
-#define arch_io_reserve_memtype_wc arch_io_reserve_memtype_wc
+#ifdef CONFIG_X86
+extern int _kcl_arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t size);
+extern void _kcl_arch_io_free_memtype_wc(resource_size_t start, resource_size_t size);
+#define arch_io_reserve_memtype_wc _kcl_arch_io_reserve_memtype_wc
+#define arch_io_free_memtype_wc _kcl_arch_io_free_memtype_wc
#endif
+#ifndef arch_io_reserve_memtype_wc
/*
* On x86 PAT systems we have memory tracking that keeps track of
* the allowed mappings on memory ranges. This tracking works for
@@ -21,7 +24,6 @@ extern void arch_io_free_memtype_wc(resource_size_t start, resource_size_t size)
* drivers which remap physical device pages into userspace,
* and wants to make sure they are mapped WC and not UC.
*/
-#ifndef arch_io_reserve_memtype_wc
static inline int arch_io_reserve_memtype_wc(resource_size_t base,
resource_size_t size)
{