From patchwork Wed Aug 1 05:49:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Rui X-Patchwork-Id: 10551719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF1D713BF for ; Wed, 1 Aug 2018 05:50:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCF782AE05 for ; Wed, 1 Aug 2018 05:50:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF8622AE4D; Wed, 1 Aug 2018 05:50:02 +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=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 B9CC92AE05 for ; Wed, 1 Aug 2018 05:50:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 454076E400; Wed, 1 Aug 2018 05:50:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM05-BY2-obe.outbound.protection.outlook.com (mail-eopbgr710073.outbound.protection.outlook.com [40.107.71.73]) by gabe.freedesktop.org (Postfix) with ESMTPS id 304F56E400; Wed, 1 Aug 2018 05:49:59 +0000 (UTC) Received: from MWHPR12CA0045.namprd12.prod.outlook.com (2603:10b6:301:2::31) by SN1PR12MB2399.namprd12.prod.outlook.com (2603:10b6:802:26::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Wed, 1 Aug 2018 05:49:57 +0000 Received: from CO1NAM03FT048.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::202) by MWHPR12CA0045.outlook.office365.com (2603:10b6:301:2::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.995.17 via Frontend Transport; Wed, 1 Aug 2018 05:49:57 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT048.mail.protection.outlook.com (10.152.81.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.1038.3 via Frontend Transport; Wed, 1 Aug 2018 05:49:56 +0000 Received: from hr-intel.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.389.1; Wed, 1 Aug 2018 00:49:53 -0500 From: Huang Rui To: , Subject: [PATCH 3/3] drm/ttm: clean up non-x86 definitions on ttm_tt Date: Wed, 1 Aug 2018 13:49:33 +0800 Message-ID: <1533102573-15365-3-git-send-email-ray.huang@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533102573-15365-1-git-send-email-ray.huang@amd.com> References: <1533102573-15365-1-git-send-email-ray.huang@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(136003)(396003)(2980300002)(428003)(199004)(189003)(11346002)(486006)(53416004)(68736007)(106466001)(126002)(50226002)(8936002)(16586007)(50466002)(2616005)(476003)(105586002)(336012)(426003)(450100002)(478600001)(97736004)(5660300001)(72206003)(86362001)(4326008)(53936002)(104016004)(77096007)(26005)(186003)(446003)(6666003)(7696005)(76176011)(47776003)(81156014)(51416003)(8676002)(81166006)(48376002)(305945005)(2906002)(36756003)(110136005)(316002)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB2399; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT048; 1:+Zz5gEGWmtr/DmiGl8wA319r+uNPawPsa2U75dMSVeEa6i+sRU/S25zlFcRSI2GCct0TNuxkYd/mgr9IW2SfVXr/ZEwP/JKN6h0ij6F9sXL7EGnGCovogkjRvv/omfr2 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 20a85cf8-8aa8-44bc-04a3-08d5f7729cab X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060); SRVR:SN1PR12MB2399; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2399; 3:BPThKAvdX0RLMPayJr7X+CJIBs+4d+gvBeYgr87x5+IW054Nxw8rSNZE1KQIPs2fVId+q2dBEI5MkB+eUqr8ZMEkQW4Dljg2R3dHwQ/9NZXZWngT9ezTtSzssGivI92rEUN4N/uDgAVibepzOtjgs+GyXSmLZLHrtkDHfqHgweic7xeTY/C6PTSEwlf7gxFSvargmBDYgjEH/rzY4T7+N4fSjAosyWGyW0M1iyDqwM4EvaHgJbNXNowLOvBuwTWH0Z5zPiI/THIrZha1AOgmtPmS56Be6NN/gIzrX01q4UcI0C0s+2U79SbqQfos3ax82dLBAp2C4/FPQnZW6vMbQPtvozQN07vctrQFY9pJ1dY=; 25:DveGVnw+lWcO5pOFyF5iZ8+hTmcMs8U2dgdS/s5c0Cirfq2nxmUqyhtOe5H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iRPKASBbj3iOwKZ2p8p X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93003095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:SN1PR12MB2399; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB2399; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2399; 4:EJOjH1quhnOZXqw/+Ox2MBPD5NIaLTFOt1S0IM76srpUtAQPM+OSK8DuiVAzA2et3cP41kaA/3pfUz3ais1rgaWHqZ/aOUsNHb5MYs9ZNXb4ffiaE3x3C6t76o+aGmHyNuXKgvOLhDEDcibLYEgF6OISrUeSMQ8A4u3yUsgfAjwxBv1T94TzhOxIOylwfbOGDyHktzNs8EF2GNhqvQ59yO7FuA9eaSFkN9UIiSEEoQ2oUE1cKaJXcCCmZKOYEbKlpraZqwRzrK84bm95Gzya4UQU5MATGVtnwvdEDbvh4g1+DZVArKU48oKa0u05Tj3i X-Forefront-PRVS: 0751474A44 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB2399; 23:FIc0FGgb80nNbUxY7JwEvgiYrashzPvOKanW72wmf?= My2wwXPY+NyM9HoLGHbJ+945IgK50NVjK1J2LSJq5ZRvgGskpp68OfF9mglVMc4mBkH3BK6Q40c3z3HawvoUYx9BoZTZPRXIj7ky08zQyjkaCTQxO62jeAHyK7T+247BzhiE/F1kIVPLZ2hIuw2nB8TPJ+vq5Ja1L+jFcGqTw41jBnd/Py0W5rCdnFy2G8h6MPrJ1B8dLPKtiX5x6/tlHBtbTpggWY87iuzHEbyXFfBmjVdfBna/evo4niz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gnaTA5/3Nu56dgRCAx6g4D2bGoZBMetpgXmQ+4SCyVT9x SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2399; 20:0mDtlBX4Ba0Xb/doa609pBhdgcd7nIDuzLL8/iZu/Jq+AFniVKnPOPjYRdVshtbWzsX6SuTm7C1XDCXr6h/eTQm2Zr/nE8GtgpBWC+hWayM2sgdTIWQKlgvxdCGBtsxXlTW/NzUVF8WWXqykfsJqUcWqlc5CqnCo2AnYXGrf8/o8Myi4rM4uZq9xk5MrPQV7Ozqw5ZzsarIMQfgTDfUgV9v+mkMqWVf4UtIE/rjIuudXpGqJqFUokdfiDRcrnqQo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2018 05:49:56.6610 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 20a85cf8-8aa8-44bc-04a3-08d5f7729cab X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2399 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: Huang Rui Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP All non-x86 definitions are moved to ttm_set_memory header, so remove it from ttm_tt.c. Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_tt.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index a1e5439..e3a0691 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -38,9 +38,7 @@ #include #include #include -#ifdef CONFIG_X86 -#include -#endif +#include /** * Allocates a ttm structure for the given BO. @@ -115,10 +113,9 @@ static int ttm_sg_tt_alloc_page_directory(struct ttm_dma_tt *ttm) return 0; } -#ifdef CONFIG_X86 -static inline int ttm_tt_set_page_caching(struct page *p, - enum ttm_caching_state c_old, - enum ttm_caching_state c_new) +static int ttm_tt_set_page_caching(struct page *p, + enum ttm_caching_state c_old, + enum ttm_caching_state c_new) { int ret = 0; @@ -129,26 +126,18 @@ static inline int ttm_tt_set_page_caching(struct page *p, /* p isn't in the default caching state, set it to * writeback first to free its current memtype. */ - ret = set_pages_wb(p, 1); + ret = ttm_set_pages_wb(p, 1); if (ret) return ret; } if (c_new == tt_wc) - ret = set_memory_wc((unsigned long) page_address(p), 1); + ret = ttm_set_pages_wc(p, 1); else if (c_new == tt_uncached) - ret = set_pages_uc(p, 1); + ret = ttm_set_pages_uc(p, 1); return ret; } -#else /* CONFIG_X86 */ -static inline int ttm_tt_set_page_caching(struct page *p, - enum ttm_caching_state c_old, - enum ttm_caching_state c_new) -{ - return 0; -} -#endif /* CONFIG_X86 */ /* * Change caching policy for the linear kernel map