lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190709091048.35260-1-yuehaibing@huawei.com>
Date:   Tue, 9 Jul 2019 17:10:48 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <alexander.deucher@....com>, <christian.koenig@....com>,
        <David1.Zhou@....com>, <airlied@...ux.ie>, <daniel@...ll.ch>,
        <Philip.Yang@....com>, <Felix.Kuehling@....com>
CC:     <linux-kernel@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
        <amd-gfx@...ts.freedesktop.org>, YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH] drm/amdgpu: Fix build without CONFIG_HMM_MIRROR

If CONFIG_HMM_MIRROR is not set, building may fails:

In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:72:0,
                 from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:40:
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h:69:20: error: field mirror has incomplete type
  struct hmm_mirror mirror;

Fixes: 7590f6d211ec ("drm/amdgpu: Prepare for hmm_range_register API change")
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
index 281fd9f..b14f175 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
@@ -65,8 +65,10 @@ struct amdgpu_mn {
 	struct rw_semaphore	lock;
 	struct rb_root_cached	objects;
 
+#if defined(CONFIG_HMM_MIRROR)
 	/* HMM mirror */
 	struct hmm_mirror	mirror;
+#endif
 };
 
 #if defined(CONFIG_HMM_MIRROR)
-- 
2.7.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ