From: Randy Dunlap <rdunlap@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: "Randy Dunlap" <rdunlap@infradead.org>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Christian König" <christian.koenig@amd.com>,
"Huang Rui" <ray.huang@amd.com>,
dri-devel@lists.freedesktop.org, "Jeff Dike" <jdike@addtoit.com>,
"Richard Weinberger" <richard@nod.at>,
"Anton Ivanov" <anton.ivanov@cambridgegreys.com>,
linux-um@lists.infradead.org, "David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>
Subject: [PATCH] drm/ttm: provide default page protection for UML
Date: Wed, 1 Sep 2021 19:01:29 -0700 [thread overview]
Message-ID: <20210902020129.25952-1-rdunlap@infradead.org> (raw)
boot_cpu_data [struct cpuinfo_um (on UML)] does not have a struct
member named 'x86', so provide a default page protection mode
for CONFIG_UML.
Mends this build error:
../drivers/gpu/drm/ttm/ttm_module.c: In function ‘ttm_prot_from_caching’:
../drivers/gpu/drm/ttm/ttm_module.c:59:24: error: ‘struct cpuinfo_um’ has no member named ‘x86’
else if (boot_cpu_data.x86 > 3)
^
Fixes: 3bf3710e3718 ("drm/ttm: Add a generic TTM memcpy move for page-based iomem")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: dri-devel@lists.freedesktop.org
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: linux-um@lists.infradead.org
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
drivers/gpu/drm/ttm/ttm_module.c | 4 ++++
1 file changed, 4 insertions(+)
--- linux-next-20210901.orig/drivers/gpu/drm/ttm/ttm_module.c
+++ linux-next-20210901/drivers/gpu/drm/ttm/ttm_module.c
@@ -53,6 +53,9 @@ pgprot_t ttm_prot_from_caching(enum ttm_
if (caching == ttm_cached)
return tmp;
+#ifdef CONFIG_UML
+ tmp = pgprot_noncached(tmp);
+#else
#if defined(__i386__) || defined(__x86_64__)
if (caching == ttm_write_combined)
tmp = pgprot_writecombine(tmp);
@@ -69,6 +72,7 @@ pgprot_t ttm_prot_from_caching(enum ttm_
#if defined(__sparc__)
tmp = pgprot_noncached(tmp);
#endif
+#endif
return tmp;
}
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
next reply other threads:[~2021-09-02 2:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 2:01 Randy Dunlap [this message]
2021-09-02 5:48 ` [PATCH] drm/ttm: provide default page protection for UML Anton Ivanov
2021-09-02 5:52 ` Randy Dunlap
2021-09-02 6:19 ` Anton Ivanov
2021-09-02 7:43 ` Johannes Berg
2021-09-02 8:10 ` Anton Ivanov
2021-09-02 8:11 ` Johannes Berg
2021-09-02 8:56 ` Christian König
2021-09-02 14:45 ` Daniel Vetter
2021-09-04 3:50 ` David Gow
2021-09-08 17:11 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210902020129.25952-1-rdunlap@infradead.org \
--to=rdunlap@infradead.org \
--cc=airlied@linux.ie \
--cc=anton.ivanov@cambridgegreys.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=ray.huang@amd.com \
--cc=richard@nod.at \
--cc=thomas.hellstrom@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox