From: David Gow <davidgow@google.com>
To: Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Brendan Higgins <brendanhiggins@google.com>,
Randy Dunlap <rdunlap@infradead.org>
Cc: David Gow <davidgow@google.com>,
linux-um@lists.infradead.org, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com,
linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org,
x86@kernel.org, felix.kuehling@amd.com,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] drm/amdgpu: Make smu7_hwmgr build on UML
Date: Fri, 18 Feb 2022 15:57:25 +0800 [thread overview]
Message-ID: <20220218075727.2737623-3-davidgow@google.com> (raw)
In-Reply-To: <20220218075727.2737623-1-davidgow@google.com>
The User-Mode-Linux architecture (with the x86_64 subarch) defines
CONFIG_X86_64, but doesn't expose the cpuinfo_x86 struct (instead
there's a cpuinfo_um struct).
In order to allow UML to build with allyesconfig, only check cpuinfo_x86
on non-UML architectures.
Fixes: b3dc549986 ("mdgpu: Disable PCIE_DPM on Intel RKL Platform")
Signed-off-by: David Gow <davidgow@google.com>
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
index a1e11037831a..a162552f7845 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
@@ -1738,7 +1738,7 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
static bool intel_core_rkl_chk(void)
{
-#if IS_ENABLED(CONFIG_X86_64)
+#if IS_ENABLED(CONFIG_X86_64) && !defined(CONFIG_UML)
struct cpuinfo_x86 *c = &cpu_data(0);
return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
--
2.35.1.265.g69c8d7142f-goog
next prev parent reply other threads:[~2022-02-18 7:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 7:57 [PATCH 0/4] kunit,um: Fix kunit.py build --alltests David Gow
2022-02-18 7:57 ` [PATCH 1/4] drm/amdgpu: Fix compilation under UML David Gow
2022-02-18 16:39 ` Felix Kuehling
2022-02-18 16:40 ` Alex Deucher
2022-02-19 8:00 ` David Gow
2022-02-18 7:57 ` David Gow [this message]
2022-02-18 7:57 ` [PATCH 3/4] IB/qib: Compile under User-Mode Linux David Gow
2022-02-18 7:57 ` [PATCH 4/4] kunit: tool: Disable broken options for --alltests David Gow
2022-02-18 12:26 ` Johannes Berg
2022-02-19 8:00 ` David Gow
2022-02-19 15:43 ` Johannes Berg
2022-02-18 15:01 ` Jason Gunthorpe
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=20220218075727.2737623-3-davidgow@google.com \
--to=davidgow@google.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=brendanhiggins@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=felix.kuehling@amd.com \
--cc=jdike@addtoit.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=rdunlap@infradead.org \
--cc=richard@nod.at \
--cc=skhan@linuxfoundation.org \
--cc=x86@kernel.org \
/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