All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: Try to init amdkfd only if 64 bit kernel
@ 2014-12-22 11:11 ` Oded Gabbay
  0 siblings, 0 replies; 42+ messages in thread
From: Oded Gabbay @ 2014-12-22 11:11 UTC (permalink / raw)
  To: lkp

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

amdkfd driver can be compiled only in 64-bit kernel. Therefore, there is no
point in trying to initialize amdkfd in 32-bit kernel.

In addition, in case of specific configuration of 32-bit kernel, no modules and
random kernel base, the symbol_request function doesn't work as expected - It
doesn't return NULL if the symbol doesn't exists. That makes the kernel panic.
Therefore, the as amdkfd doesn't compile in 32-bit kernel, the best way is just
to return false immediately.

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
---
 drivers/gpu/drm/radeon/radeon_kfd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c
index 242fd8b..cb77e5c 100644
--- a/drivers/gpu/drm/radeon/radeon_kfd.c
+++ b/drivers/gpu/drm/radeon/radeon_kfd.c
@@ -101,6 +101,7 @@ static const struct kgd2kfd_calls *kgd2kfd;
 
 bool radeon_kfd_init(void)
 {
+#ifdef CONFIG_X86_64
 	bool (*kgd2kfd_init_p)(unsigned, const struct kfd2kgd_calls*,
 				const struct kgd2kfd_calls**);
 
@@ -117,6 +118,9 @@ bool radeon_kfd_init(void)
 	}
 
 	return true;
+#else
+	return false;
+#endif
 }
 
 void radeon_kfd_fini(void)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2015-01-23  4:10 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-22 11:11 [PATCH] drm/radeon: Try to init amdkfd only if 64 bit kernel Oded Gabbay
2014-12-22 11:11 ` Oded Gabbay
2014-12-22 11:11 ` Oded Gabbay
2014-12-22 16:58 ` Alex Deucher
2014-12-22 16:58   ` Alex Deucher
2014-12-22 16:58   ` Alex Deucher
2014-12-22 18:49   ` Andi Kleen
2014-12-22 18:49     ` [LKP] " Andi Kleen
2014-12-22 19:00     ` Andi Kleen
2014-12-22 19:00       ` [LKP] " Andi Kleen
2014-12-22 19:18       ` Oded Gabbay
2014-12-22 19:18         ` [LKP] " Oded Gabbay
2014-12-22 19:18         ` Oded Gabbay
2014-12-23 23:01         ` Rusty Russell
2014-12-23 23:01           ` [LKP] " Rusty Russell
2014-12-24  9:16           ` Oded Gabbay
2014-12-24  9:22           ` Oded Gabbay
2014-12-24  9:22             ` [LKP] " Oded Gabbay
2015-01-05  4:28             ` Rusty Russell
2015-01-05  4:28               ` [LKP] " Rusty Russell
2015-01-06 20:14               ` Kees Cook
2015-01-06 20:14                 ` [LKP] " Kees Cook
2015-01-06 22:58                 ` Rusty Russell
2015-01-06 22:58                   ` [LKP] " Rusty Russell
2015-01-11 11:57                   ` Oded Gabbay
2015-01-11 11:57                     ` [LKP] " Oded Gabbay
2015-01-11 11:57                     ` Oded Gabbay
2015-01-13 17:15                   ` Kees Cook
2015-01-13 17:15                     ` [LKP] " Kees Cook
2015-01-16  0:27               ` Kees Cook
2015-01-16  0:27                 ` [LKP] " Kees Cook
2015-01-16 11:27                 ` Oded Gabbay
2015-01-16 11:27                   ` [LKP] " Oded Gabbay
2015-01-16 11:27                   ` Oded Gabbay
2015-01-23  4:10                 ` Rusty Russell
2015-01-23  4:10                   ` [LKP] " Rusty Russell
2014-12-25 12:31         ` Christian König
2014-12-25 12:31           ` [LKP] " Christian König
2014-12-25 12:31           ` Christian König
2014-12-28  9:05           ` Oded Gabbay
2014-12-28  9:05             ` [LKP] " Oded Gabbay
2014-12-28  9:05             ` Oded Gabbay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.