From patchwork Wed Aug 1 05:49:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Huang Rui X-Patchwork-Id: 10551715 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 8FF2813BF for ; Wed, 1 Aug 2018 05:49:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 803612AE05 for ; Wed, 1 Aug 2018 05:49:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73D792AE4D; Wed, 1 Aug 2018 05:49:54 +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 37F752AE05 for ; Wed, 1 Aug 2018 05:49:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C7C456E1AB; Wed, 1 Aug 2018 05:49:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0046.outbound.protection.outlook.com [104.47.38.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F32D6E029; Wed, 1 Aug 2018 05:49:46 +0000 (UTC) Received: from MWHPR12CA0046.namprd12.prod.outlook.com (2603:10b6:301:2::32) by DM5PR12MB2392.namprd12.prod.outlook.com (2603:10b6:4:b4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.21; Wed, 1 Aug 2018 05:49:45 +0000 Received: from CO1NAM03FT038.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::201) by MWHPR12CA0046.outlook.office365.com (2603:10b6:301:2::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1017.14 via Frontend Transport; Wed, 1 Aug 2018 05:49:45 +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 CO1NAM03FT038.mail.protection.outlook.com (10.152.81.212) 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:44 +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:42 -0500 From: Huang Rui To: , Subject: [PATCH 1/3] drm/ttm: fix missed conversion of set_pages_array_uc Date: Wed, 1 Aug 2018 13:49:31 +0800 Message-ID: <1533102573-15365-1-git-send-email-ray.huang@amd.com> X-Mailer: git-send-email 2.7.4 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)(979002)(136003)(346002)(376002)(396003)(39860400002)(2980300002)(428003)(189003)(199004)(110136005)(316002)(305945005)(2616005)(48376002)(81156014)(8676002)(126002)(8936002)(50466002)(68736007)(104016004)(36756003)(486006)(81166006)(356003)(476003)(16586007)(2906002)(7696005)(51416003)(5660300001)(86362001)(186003)(336012)(426003)(4326008)(450100002)(77096007)(47776003)(72206003)(26005)(106466001)(97736004)(53936002)(6666003)(14444005)(50226002)(53416004)(105586002)(478600001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB2392; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT038; 1:o+0dZhd8zK2/UALI+aUU/Y5Ol0sQYqKB8Jo3ybKcYHjBcaRZUHRa+5FTCXMHYVaEE4Vn6OEixmNdQO3gXWIWUVMml+LRE3ocIDkaX/ebFO3Y1i+rrQntjtMsBsPqbSWp X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ba7e447b-7be5-4b36-7e0d-08d5f7729561 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060); SRVR:DM5PR12MB2392; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB2392; 3:B/ztS6RmZcWV58srImjt0diz1qx2i1GhxR7rKVKxFkVUgO1x5OczEcDhhMtzq7cNvyWVJTiVcs+SnMmm9Tk+u10DRSee4SufViWLJL/ms8DlLmVsU8xX96Z6aPFCin+nyZBZfFxkTwZtFWq9KfjNXZ4idf9nFGhg6tgm2+E24KhZnt1Jl4toieLGUs0JKXKfIKTZHH4t9q55WjJoIc3Gji1urlMJCyKHZCJ5Ti3BbcYMY9/RSviFESCpSQQiB4t4BRY17efKbBagh7YPA9vFAtxuAiJZ2CG+NVqIh8THAL/hHLUU3NtVasov8tdZN13cYVu3y5Iaoryd2g6emPr6mGT8GhS7DRZCStdjoAd+FRU=; 25:Z94p7fmp67EUigMuAl8KavNXQdJlUIeu8E9Uk3XyGHypuOv1xDEl+10J52/MGSkpYTEQb0h+0zSKJyQak0Y2fP9R1OSmwsFuNipHMKX4Ydpe5aDj7M60puK9rzU1vZ9XsAy7/lWaus5YCEMqQ5wzU4Wlrpk32WwMWJiNvc0/43i5OLRLRDavmIsizV2LJNnAUm3GXnyEwEBkczezGWDQsUebSWRL0FKZiuL7fY2kWKEZE6W7/TTqxnWTqvUhAHysI0t1irQBx6X9GjkHraTesOzK20dhhTZ34ZS4dxu42gJAEgDO9gk088JjrNiVnf741q7GqtKMa05OCNS8PhV2ow== X-MS-TrafficTypeDiagnostic: DM5PR12MB2392: X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB2392; 31:o/4JSXixsHFNibD/jGsZTimQQ6HKU3VQlutuMTa6qaas378ierQ+w2qBfEXW/hZqmRQtxg5wgnPv2jGEdm3DxBWYm+hdkkUxwuXSvDtA/KEqJAIztbSFP8nMHOM7NPyT+j0yy/N0MCBLx9yyXx60QyRsiCNjjUeE0jJxJha+ykjWdPuuVZ6GLwX9X//IubAt35WBbLFb6d1bn7d3sD0BkhzcePhgL+hTYbBlwZbImCA=; 20:t3d7n+zzxvAPC94mEwlXcm9gJDiKc9MD4b+IpBqVzwULUjsMzNbumvnqzcLlJNdrNoBNs0dEYgEW85xv71t8ypqg142PfUbojryNkOUId7sq9NTC7gsVHarPf78BhTPxcgXA5Ly28a6+ghbjzsEeqhphMD9z81qoAug4zFP1zq2C5Swok1vKS5jL4iRPP6OcPZBdl0wk4Mm80Ks4VHfAB4dmkICg2V6b/7a+GE7qJWh6QFFBVH2JrZi9aNs0xFWaxG9D63p8wu4ZMZyy8/qK8L68sNsBINgyaj0g1kJxEJhGCan2xZZNEPlLt77uTf9GPRhvA8KYBeCwv1P6qsowS5JBYN/6x12yaauzM5XZ/D86180g9lrKgC8ezcp4HkwI125dxVtQjwX0tGh89VIzeQ7VqY8YsxUvouAKjsmzmaIO/zxZSDmjUuoT4UAKqi91HtPX4PEfvu/QxV1j4TNvrkcuaIFfuAnQsg3JG/m8btWulAhzHN1rDOEMgH40NRoI X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93003095)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DM5PR12MB2392; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB2392; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB2392; 4:3ZmkPbhK1ul/tPLxkyIz5QRJNDoMU0brHnlcT5RrXg5Kbj6DKHFd2YSj0J1vUIUh9xdtSRVSBEgiu7yayejiLbpjattGBNb6MBZa9RJbratKnLQ8kBaVS4nkt7GHvjEqOTBDZr9amiBboPDvxJWbok6JuNdkqfYE20I0Vo+HpN4cEIbsY5GZ2ZOblgVk8P8VdmaqdDvY/lZ6A7kP7sVfOKMs/hOiKjey5ScfDfPz0O08P5tT/L+qjQa+H5mhkyt4CP2zjbFv5mJB497wRGJI9ND2h1U7x78OQ2F3Wwpkkqikh0FbSLymu/mGZDHOK4UI0cY9WiOedvTVLvR1tSClDYL+iGphjz9HuZvHenpWcTw= X-Forefront-PRVS: 0751474A44 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR12MB2392; 23:pyzm4F+C3c6D9Cbqr05gBl+Yp7eaXgEd1bpqdotD1?= puGw0ejkRY1nF8ro9EpB5B8LwklMMfB3UCiagZbMrqUMr05iDusfpZLuSy3vFg7MHqfVkyJIisKvwE8pN2NaHeYisngFSgj57X4tDr18pSV4uMER67dehHo37AQDe+JhFscBw4oUkRAjB+NMwVULve+ql6IpLLMWK5yCO+82VxreV/WOVZZZw8LyaQJd9u5BZzWn18a9Y2ZKa7qOROfdB664z0SDBIKagmEyyvKx2VQGFQEszXA03cQ/W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+4vAb84u/QV/2gJaeo1UVGTpQ8zhn0wnSWw8HXWfRhd5clAfXnAfVBCMy/ZOmG7b9cuJRQvq0kEFea3dO4mlLMOlel6w5NgQW4MMxCfBGbZgW5bygn3pyYEu1faZE94RplzyPjz6H SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB2392; 20:Y1y0ubQJwwaOf+MTdPiw17dwFj4vHtlmpAlMZj/xxZD2g+GOzQ1M//pRFs2iZC0TshjICgc32W78J9R0B0nWoR1oPyfBPAemAJZtVgD0WEYFptr8w28d5djoBvGAY55dhZpp2B3mrdYfpBV+RgTxnsfmyMjpIxPYnNsRlFC9PaFinQHPIfWBcR10PNtOcU0vieWdi1f8sXeFwyoCVBV2zVsrhQT5WyA1z2n9mmODxsgrWgnPI+0u/QursVn1KnYu X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2018 05:49:44.4194 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ba7e447b-7be5-4b36-7e0d-08d5f7729561 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: DM5PR12MB2392 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 This patch fixed the error when do not configure CONFIG_X86, otherwise, below error will be encountered. All errors (new ones prefixed by >>): drivers/gpu/drm/ttm/ttm_page_alloc_dma.c: In function 'ttm_set_pages_caching': >> drivers/gpu/drm/ttm/ttm_page_alloc_dma.c:272:7: error: implicit declaration of function 'set_pages_array_uc'; did you mean +'ttm_set_pages_array_uc'? [-Werror=implicit-function-declaration] r = set_pages_array_uc(pages, cpages); ^~~~~~~~~~~~~~~~~~ ttm_set_pages_array_uc cc1: some warnings being treated as errors Reported-by: kbuild test robot Signed-off-by: Huang Rui Reviewed-by: Christian König for the series. --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index 8304917..507be7a 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c @@ -269,7 +269,7 @@ static int ttm_set_pages_caching(struct dma_pool *pool, int r = 0; /* Set page caching */ if (pool->type & IS_UC) { - r = set_pages_array_uc(pages, cpages); + r = ttm_set_pages_array_uc(pages, cpages); if (r) pr_err("%s: Failed to set %d pages to uc!\n", pool->dev_name, cpages); From patchwork Wed Aug 1 05:49:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Rui X-Patchwork-Id: 10551717 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 4886B15E9 for ; Wed, 1 Aug 2018 05:49:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39E652AE05 for ; Wed, 1 Aug 2018 05:49:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DB122AE4D; Wed, 1 Aug 2018 05:49:55 +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 D9E0C2AE05 for ; Wed, 1 Aug 2018 05:49:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44E536E3F7; Wed, 1 Aug 2018 05:49:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0045.outbound.protection.outlook.com [104.47.34.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9142E6E3F7; Wed, 1 Aug 2018 05:49:52 +0000 (UTC) Received: from MWHPR1201CA0001.namprd12.prod.outlook.com (2603:10b6:301:4a::11) by DM5PR1201MB0235.namprd12.prod.outlook.com (2603:10b6:4:56::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Wed, 1 Aug 2018 05:49:51 +0000 Received: from CO1NAM03FT005.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::206) by MWHPR1201CA0001.outlook.office365.com (2603:10b6:301:4a::11) 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:50 +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 CO1NAM03FT005.mail.protection.outlook.com (10.152.80.156) 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:50 +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:48 -0500 From: Huang Rui To: , Subject: [PATCH 2/3] drm/ttm: Add ttm_set_pages_wc and ttm_set_pages_uc helper Date: Wed, 1 Aug 2018 13:49:32 +0800 Message-ID: <1533102573-15365-2-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)(136003)(376002)(39860400002)(346002)(396003)(2980300002)(428003)(199004)(189003)(26005)(486006)(446003)(48376002)(426003)(77096007)(51416003)(186003)(336012)(50466002)(5660300001)(2616005)(126002)(476003)(2906002)(7696005)(11346002)(104016004)(97736004)(76176011)(316002)(72206003)(305945005)(86362001)(50226002)(356003)(81166006)(47776003)(81156014)(478600001)(6666003)(8676002)(16586007)(4326008)(450100002)(106466001)(110136005)(8936002)(36756003)(53416004)(105586002)(53936002)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0235; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT005; 1:amkUeXQ35iZUxugXo3Kx/4KnXTA3Y1iSvhJYa9/K7gPuFUOymOYthW1N9Gsx7wwzuqDzA7JPsLEKf+jMMZLI/UQgMxe6SLCppF+NLG2Y2CQ11ekNAGY5eoI/sJqBVmGk X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59357368-276e-43bc-92c4-08d5f77298f2 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060); SRVR:DM5PR1201MB0235; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0235; 3:DQJlvrniFlJtKA/05IPoJ3i8b92DofKZxcgikBOBlPpHWRK7bm4rsI+cunC58QkPXBTYdgZReqrwqyhfstpoixbBTlYIqs63u892VCDPDmyBm2DsuX2eHGxh9t7VQOXb/4F3P3RMfIDdpFQasIxi3i8IdxOFH7UO38RpL+ew4ZQmhUC5r3wCbHsCBu83RCeMHhpy8W7kufDuRaCyUpWBY5Ag8VHhs9SwF32VVe6k2dS4v9KAjLK+r5vexbTgbGRbgmRjGK7q0mCt6y1Dm3TdouJ7CT8BimdAR74by8BNoKL9FRIxqY3UsyFsWndEd7nem2GnJOl/TE4VyuBLXkaiBB7PJq+8TmHItrtWWln62ds=; 25:dZSAuhrffA6k+H4P/Z/UacUN4z15UOp9qDeVIheNIWPhnAe+MWuNFfDKmCwwsQEUf3Q3R/B3xzA9JFidzSfMORBbEtv3kxJXP+biMpkv01BvRu5AOVuJGqYZvXzxrDpaTjPjETjRTQoeR5pzXz8oG98mebwsBbXpctbrm+HcK/XQcBsEn4GWejjn3omHfvxtkofvle373TQiAAZmMWzVpXXXd8fF7Ov7dL/SIxEXwkHcCufR+LO+1x0JOO9YgigMUPRHMt16j99vxC5ktZ/iuVcs+e1AMcXiwwBaMITnkFumwpkao13axZpxRIhsFfN3Kkm6wEDnv8rAQZB19gsy7g== X-MS-TrafficTypeDiagnostic: DM5PR1201MB0235: X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0235; 31:2sOAUv4vlFMVtzJV0mZJhO9PXeNPeS95A4vWH5KNsRXGTgQlkQk+LG+iwSP1hgTEbSpGcSMh4R0cuH3Vl0mPUgLq+sUC2wzZNw18Qa8Jkt2/PlDRQjx8/iyYDx1YQqegrv20OClC9DSA3jPja4OPWcVtFsx3NRWnlHH1L6CKjtQKb/UcC7QHzuVHVhcwlqCDAT7gVW+w8bQnLY3vAsBgBLFPWoDcRRU3/cwztoxBrYA=; 20:q6PI/d+EzEpVdtqm5QTV9w0TB5HiIhkL+jp9j4zbg7Wgnap0g8n/L/Bl9C56BtfNP1weq1GRp9yH44EL9JkpH6kjaG5+Vg6iA3b5NNbOMRI5dYQ7ybe4nOw+WFdTT4hsLJ8ImXp3C2MKB4urt2wXDzOOutcOpHs8v39vBfRkQh8cdd0nHaQ8xBI73VXQsLEFmvv2na1KA8J65LvDEZqwa081DiwG1+xT7rqEG8vgec0NrToTIq+Rax+38ya5ZygTy4QLx1ZbapPDZmmqXrSlSrRJpXDrdNy1kvoBzaKrG1sQJTl5Pp63EcfWJfPk6vBW6lfyqw3gT6AsNu6P/J0v3/Xw6Yng06edmJEgPtkIR3SG73xTL74aPd7W9ZuQps+egs5Bd/Q4vD3XAmRSDFvmDh1iciIl96cVb7aEE4fA+AEeJiNeuPkookgswLtPGzFhMUPDnRbnL26ICaIl8vZeGHVi3Fo4N3rYtUar+NhtrYeMErDZu2V/ytf3KUMMgvcy 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)(8121501046)(5005006)(10201501046)(3231311)(944501410)(52105095)(3002001)(93006095)(93003095)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DM5PR1201MB0235; BCL:0; PCL:0; RULEID:; SRVR:DM5PR1201MB0235; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0235; 4:R3CEmlAg5SMDqsSdSCgET/yVoE++sqvGLMObhk727LAkhhEcSmDOoTV6UO4VZummbeiiDbz5yWjqeQ6/eDZxN6f64todDPPnx1NRGhTnOBZcbNPtwlC22X79yFcmUnFGlgW1VQFDrEi0C+b/cY48IjRC8F+85PWmq/V8BLo9+KOB3+IuexVgyQCLUK1YRikW7AxenK4evBUVGvfIr/fRkhtSSKAssXXvhFdF9njaqZqtSyDyBr7NzWOcXrG872r1HHRUz3SYPwY9F16IXzS293Gu0oK+iTp68xsOiXDQ2xzce1TSKXl0gY1DL4xFv0uL X-Forefront-PRVS: 0751474A44 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR1201MB0235; 23:XKQv9a8nCtV5uN0Gx6DH6aVT1/hrXk28zIrD0ix?= kec4RZc2p6NpFa+jpr89rMVxqesdr8w04rUA89tEPQ3i0bgUATXI+EIOh5at8WPLoGlFUfqE5tfhV/UWjEPJ5+mrgJoWx4oE568pJWVEprFbWk34G4mS4ulxygQhHx0juRUIMhL6LjodF4JC0PvOmbw82EQmIYVSQNqpzZFIP3yo5ulH0h9DSERoSmiTGfhlTSAj76SNLYnP7vRPCEucmFNL10CYTAsc6wro/9bvTrrffqqHIwZeBuXe9EAKy7NrpcVI5cMRKthZ3tpZA7eMqCE/hzk8v0zYhKRyKc5QwlUkVWSHG2TguaPllreUogcFeFED3ZCd+d+/jcGJ4euW359HjP2AE22/zFuBrqa22Yz+Vl/BKR3pDLckT8dFKmpgp118UZCj+B4p6PluuxVIAjurW5fiSyPID86c3rrzmprnwm5K44SSjFKudATvGrGSzok4Z/Sj+8S5crkE/rlYRjMYZMFwN08Uy2KHAXuA7jTjcjtdyQMVHG0z7c8WDbnowjKdfQSaVIoJmIaG3SLPwY+SdwG5HI2a0ESUD05VxUmfEkWP5IB3K37ThThJrh6prf0gSr7ln7IwwNXfTdj34E+1IWwHhogaL61NIXC3py997b3bgiu/idtV/H4k4LaiKLq4gFzY2rXxyTafT0mG7JmIxNLDJwb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change-CrossTenant-OriginalArrivalTime: 01 Aug 2018 05:49:50.4191 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 59357368-276e-43bc-92c4-08d5f77298f2 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: DM5PR1201MB0235 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 These two helpers will be used on set page caching. Signed-off-by: Huang Rui --- include/drm/ttm/ttm_set_memory.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/drm/ttm/ttm_set_memory.h b/include/drm/ttm/ttm_set_memory.h index a70723c..7c492b4 100644 --- a/include/drm/ttm/ttm_set_memory.h +++ b/include/drm/ttm/ttm_set_memory.h @@ -57,6 +57,18 @@ static inline int ttm_set_pages_wb(struct page *page, int numpages) return set_pages_wb(page, numpages); } +static inline int ttm_set_pages_wc(struct page *page, int numpages) +{ + unsigned long addr = (unsigned long)page_address(page); + + return set_memory_wc(addr, numpages); +} + +static inline int ttm_set_pages_uc(struct page *page, int numpages) +{ + return set_pages_uc(page, numpages); +} + #else /* for CONFIG_X86 */ #if IS_ENABLED(CONFIG_AGP) @@ -123,6 +135,16 @@ static inline int ttm_set_pages_wb(struct page *page, int numpages) #endif /* for CONFIG_AGP */ +static inline int ttm_set_pages_wc(struct page *page, int numpages) +{ + return 0; +} + +static inline int ttm_set_pages_uc(struct page *page, int numpages) +{ + return 0; +} + #endif /* for CONFIG_X86 */ #endif 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+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kVGYleyhs4/24F8b/CI8gqtVqVZVbcCeWtNg/NiRPKASBbj3iOwKZ2p8p 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/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RQnvXBRvAeiIoJSTK4xuTzCDLOcYdx/bf5jRgnaTA5/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