From patchwork Tue Sep 5 11:32:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "StDenis, Tom" X-Patchwork-Id: 9938503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 14B4D603F9 for ; Tue, 5 Sep 2017 11:48:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 071E72894B for ; Tue, 5 Sep 2017 11:48:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAB4328952; Tue, 5 Sep 2017 11:48:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 80EBC28955 for ; Tue, 5 Sep 2017 11:48:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A45996E05C; Tue, 5 Sep 2017 11:48:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0076.outbound.protection.outlook.com [104.47.42.76]) by gabe.freedesktop.org (Postfix) with ESMTPS id E61F56E1E8 for ; Tue, 5 Sep 2017 11:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=3yqYMvHbosQsb1cQKCtcVBf5b4cUzfxodb65W6ZMxBE=; b=EfmiaGc1CgelY8lY4st+gmUTQimB15DCsx6Qg6/PyFmjdUY5ZvTlpLhwZOmnX5G3CzgkNeEwmmYFYTYjdbbVArLXi4/lKkVSSLI+SAlf2Csw8QJf3zJNwuyAQAMp+l1a6VxhvfC61peTwfRXaR5ibqBYYRPlN1Ci1De/oqBHmis= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Tom.StDenis@amd.com; Received: from fx8.amd.com (165.204.55.251) by DM5PR1201MB0076.namprd12.prod.outlook.com (10.174.106.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Tue, 5 Sep 2017 11:32:09 +0000 From: Tom St Denis To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/ttm: Fix configuration error around populate_and_map() functions Date: Tue, 5 Sep 2017 07:32:05 -0400 Message-Id: <20170905113205.8733-1-tom.stdenis@amd.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: CY4PR1101CA0024.namprd11.prod.outlook.com (10.172.74.162) To DM5PR1201MB0076.namprd12.prod.outlook.com (10.174.106.18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a33ce15a-60f6-4397-c15d-08d4f451bf3e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR1201MB0076; X-Microsoft-Ex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qTQwcgYeLaVEuWRZ2xMUAnceYJL4ifUTbbeqPs/eOKwSoj3ELmHy8aJrrs2Wb2ss1UAtgDFBLRz8Z926mIdYovRjMLcVfeuvfEHBD/tCstCWzzUebreZ6mtsRc9yprZHSRrrAy17s0QQLpY2DbkyoIUpRdwv93QpWdJs++aJlrGTs0pCdMk7wuEX8iwo6x56ymbUuvmCAzaR2lNiV87z2Basp11RqBtJxfIQfHscmAbq31FNuySRqY1bR2XMkOXYI/mKE/wPyk8MkSff/xLrMvZltIDfEWon04M7C1fWOHpzZ5egRTIkhT2IXGwzqPRak/NXpmPRP3KAD4TNzjFeN2KwGf03q5vADXqrM1SUO3T372+W+JeMqguDcxgSuDlXcJUqaWub5DxXPA; 4:zI6LDCl2ot9BaHfSfnmpwm/c7XHDucOx/ey7FsMh7lzayX5vx2+JvJxirxIDFZPXmCdIkhx6jvglmr712lYgzt6EkY489SNrZq5xYr2Pv3tSrAPORC0++7xixip7LJEtxBexu8nr09zWVu3AGLRa0ABc8s/eI338HibpQIJ4axETNRF+3GTWvdUG3Ep5qcrsiwBosvs029V87MG8M4xAQE5Xy7Lng23U2rlmh9m9WvTOAuGQn1fMrBz1jwAI8loKki+m9EUdn4gy5WgM4JXn6RCEwok4azntiNT7j8g76ek= X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR1201MB0076; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR1201MB0076; X-Forefront-PRVS: 0421BF7135 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(189002)(199003)(2906002)(33646002)(36756003)(5660300001)(86362001)(2351001)(106356001)(305945005)(105586002)(2361001)(42186005)(53416004)(81166006)(81156014)(8676002)(48376002)(101416001)(5003940100001)(68736007)(50226002)(8936002)(7736002)(6486002)(47776003)(66066001)(6916009)(6666003)(50986999)(50466002)(189998001)(450100002)(1076002)(25786009)(72206003)(6116002)(53936002)(3846002)(97736004)(110136004)(4326008)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0076; H:fx8.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR1201MB0076; 23:bFJ3liaZY+7lTVFoR/adUk9vP7BLFJ0bpXQxCx3?= =?us-ascii?Q?MGnPqvzl8oXYhuHu1zGtp75niNooreGyRKMNeu3BAL/FJgoizRcTHI5vVSuT?= =?us-ascii?Q?4tPy4eZ//uqOoeHhumhPc7x89Ko9Mie9B0kFkuFaSZ99KSLF9UfwQOEhQGrB?= =?us-ascii?Q?c22pPtKfRwyiFOAHti5qAswzFcq1GvnL9nO4BN9sZZrXq7NfqZj8Nxx9ScAp?= =?us-ascii?Q?znHUv8y5tPqiTkZC5D/SU9xCM8cQvMwbETW6QpkqEMKucYOi1SB5m4G7nlSU?= =?us-ascii?Q?rH1hIx8URThEGjFhzf0oFrMO+VquVjP4ESfK96Y9lcUqZj/Wn5soMjBhy13W?= =?us-ascii?Q?I2M3peIikAsfWQaHS9w1cTHKB53k77tiY7wrbNwtydOZxAurcVnDUgdLfDC3?= =?us-ascii?Q?or+sbG8niG26sfxyoMC0vn658+yETWuBWJidX2U5KJmniW5CMTiAVi3X3D3s?= =?us-ascii?Q?xhdc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/+dEJw/XkcBOdcqzMUC5zfFa+Kg7C+zqXVfmq7vcYnh4AQ5TyWiW6dlFJHJ8Jzc6XiNCHyPsJlA==; 5:WJ2hrmfRKSb4NZNERO4ybn02BuTKApZw/uNAK6GVbAO2uD5Qe0Psdu7ZiOktK3OafrwZW+Hwu/kso6Z6F+33WGN88oJujmrinNWyAwjGH95hUWDayvQEtMUMgz3/CqYRQsJmjaeUblQoUT8ce1MgtA==; 24:qQuzAuyOI58ku7GCYYAHTqkJieI4MRXxSgO1xHlL0ro29Pct93WPVMVESCGgBxfvEn1YAeu9oBLdA0wT1yKHlfAv/1v55DtdywhGc/Pwrg0=; 7:F5Ail2bOBbDq/BJEfiE7JWftK2aTKvBx0cZ+VRHLY+fJPJdK04nL0wL8iNTAMOFO3nRMZbV3uvkqGy35uOeKVCHXGxvFIFXqW1ztr/rDtHZXak7Oiky7bojSOtIPFaK668qyQWr24GG4VEqM9tEhZIxCiEJESnY3Lm9qoDkRIUi6mQohW40tWiz9gxqoP+6KTqvvmXUvaLZOJsgy0pmD0hpPlibBSOTElFp3eXqnQmQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0076; 20:p87Ix6EzmEWR2H5MX1S2LXHVIsZRF8yW9L+agJvNipsbmtDHeqjAiQTJHtyGbIGFwAECOgnPIcZ/EMfewYE8UhwRvaLQU52lBAcRWGpKjw2taDaMtj3IVXciyGJHTGD4tJx8mJbkRgMcKFqG9lLMf0n2GPL3d4jZLekaoFMIE66mEFIky9ruAd0h8nskhU+bQqmPdsGLw9gfBSneuCEpFqNMYJ/VTryb7FrHHyJcKhGaTkHmyFvRm6/Xw5cFtC4P X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2017 11:32:09.9328 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0076 Cc: Tom St Denis , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fixed kbuild errors when IOMMU/SWIOTLB are disabled. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 6a660d196d87..052e1f102113 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -920,6 +920,7 @@ void ttm_pool_unpopulate(struct ttm_tt *ttm) } EXPORT_SYMBOL(ttm_pool_unpopulate); +#if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU) int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt) { unsigned i; @@ -960,6 +961,7 @@ void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt) ttm_pool_unpopulate(&tt->ttm); } EXPORT_SYMBOL(ttm_unmap_and_unpopulate_pages); +#endif int ttm_page_alloc_debugfs(struct seq_file *m, void *data) {