From patchwork Mon Jul 8 13:51:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168647 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp7195339ilk; Mon, 8 Jul 2019 06:51:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGoYh8ZKRgwA7ti4nBtVNxVuDWFbJEOXaOZzdA6YS1KvUvh+eFWknITvlJWLhqSxwIWMO9 X-Received: by 2002:a63:6089:: with SMTP id u131mr24592782pgb.314.1562593905644; Mon, 08 Jul 2019 06:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562593905; cv=none; d=google.com; s=arc-20160816; b=BKzBi0SJ+gv4n6iETPlMGi5wfN+zqYw+4y5hTVLg6J20VAt6rrvupV2Cpfm7BPFh/U bJcoGpHJBzQLDPm8NxBwmAOdbakt+RPFPgiP5noQPlvaa7cYw4qQAP3sDFKmKi0a92/p cGOvNe8oT4Wi7x+t5lWLWM+35TTkmRrDuI3CPVTggbV77SDWapFyfMHdnnN9Gb7tizb0 28vNUwstFcssWbDwlm6V6IuY9MKSgRDhEUV+TKjiJXMbyn86E4bLj5YM2OyGYrsY4mES AQHF4mt/dcQXJi1peLYrFc9nn25ZYxhoCCnyz7pFvhSrK/SnpKBetmYlaCKZbCSm9ItE 6P6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=Gzpqai0ZtEWbaENVBY9pa/Anj+R9sZi+MGAItV3kV1Q=; b=Gb4ZQhxraIM88lfgzNrno5UNShlw11MqyvgwG/+rR0szmFmtYzO7idSeocuWbrjQIO feVTPTUhqxMJNX5TZVfwR1vKVyW1tnx83i6BiTKpZ5R2MXNUILAW+DJj9zxUzHb5Kz7U 8pPwgLnLBH801ckVGINum7HV4ppUb+TlVaLTHcxveRnPczfBWhVapMrelrsV7wgHL1bz Yk6LdZWkZD0+SE/euB2OdhoJezlYlsTUQbghZPyMWwUIDCm+G+M9e4QJqtbJnNUixXJe W583HYaBkMoZvV1XP/id3WMC2H/zXZoNwsgaL0pKxMr6TCf64aW0oRTXxTpCw5pTaNnW RnVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id j63si19497732pgd.493.2019.07.08.06.51.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jul 2019 06:51:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA46889C94; Mon, 8 Jul 2019 13:51:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id EC72B89C94; Mon, 8 Jul 2019 13:51:43 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MVaQW-1huLvS0AkO-00RbTc; Mon, 08 Jul 2019 15:51:38 +0200 From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6n?= =?utf-8?q?ig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH] drm/amdgpu: fix building without CONFIG_HMM_MIRROR Date: Mon, 8 Jul 2019 15:51:24 +0200 Message-Id: <20190708135135.610355-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:Try8nevSfQ6LJLOsIb7LCr5neA+PjlmdVukydwRVE7Gsov5fADa rW7QTzw6r1z5vpwJBY1rwNpqk5oevj8duGKPxzodhe7pnj94XxCMw8VtkWCHXQ8AeQo4cw+ jGQLE+Qin3wqheYAl5VpnCH6JOMHyE21JSOrSco7yP/tUhiWrOgJz5dcHHWu1dYyV5Kxvmv iCd3NniMc510079Mss/Vw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:LWYpwebFz1I=:G1x40m2rbJewCi8eDhXMRA TCM8b4h0pb+bOFNOYud9CwhQSArN3pKViWO3/FomWzVjqvf66+dEfBq5SAyKrFdJ4FALT1Nz9 NHuKQFQTz8+XPMZjAkXpILgIPXkfWLk2MF3XEHnTfJQTGDbFfqNG+kKB6Ix4ZMORaBPXE2hQZ iPEDQp9r8aD6qvzFTXky2wIdUOP4hHHb65rJIO9+79etNmX7ItGOhHI/wB0MxyHsnCC6ng0dZ N+A5Cx/wuikkXyaDuzHrpMnG6gy9bnmjtsi+S8ubc0Z7CGl6YKizQpo5a8bax+YJooCoo9pWV ye+5nIom0Ckx/y3tsGSI973jBPtMkMg7Zzjg7kjlX0jmXiXV7QAXNn7lGY0XyIfZm8ssUaspa 0WEX45aYFYqpod6YXeGBZop3+n2xIV6zNtVPofhp7ut5KD/eXUBi37Xy9Wvi7sQmSsolABjhG pq54VzAAlmrg8Q3I+Cd/l/y+2nd65CWBvmN8na3oxfd1by/BjjQISuWqZiVjNwknDIMu0Ulfm W8yrdIMOp3ub8pOwIpjrP25tm6MjO9rShUeLYul2v3nTcxI47ihp5YoQNDIandjoKk43Mf2Zn nNlxJThDHIoe6La8U3ay+g8KZS5HKHqervgh/UFvLY7LsSFVtafLjA1RrBmfMymu3wKvePT2k L92VYYRTamBbfwNSb9W0S2h2khRtGQpFnqVlkHuJbWuV310w0+KCX6cBTzbdpLlpnIkHqr+2i LtO/MZt6THXQPsYCU1K+9VxOizsIZPPo1jLTtg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Philip Yang , Arnd Bergmann , Felix Kuehling , =?utf-8?q?Michel_D=C3=A4nzer?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct hmm_mirror' is not defined without the Kconfig option set, so we cannot include it within another struct: In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:72: drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mn.h:69:20: error: field has incomplete type 'struct hmm_mirror' struct hmm_mirror mirror; ^ drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mn.h:69:9: note: forward declaration of 'struct hmm_mirror' struct hmm_mirror mirror; Add the #ifdef around it that is also used for all functions operating on it. Fixes: 7590f6d211ec ("drm/amdgpu: Prepare for hmm_range_register API change") Signed-off-by: Arnd Bergmann --- 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 281fd9fef662..b8ed68943625 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; +#ifdef CONFIG_HMM_MIRROR /* HMM mirror */ struct hmm_mirror mirror; +#endif }; #if defined(CONFIG_HMM_MIRROR)