From patchwork Thu Jul 26 11:52:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Huang Rui X-Patchwork-Id: 10545653 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 B38AB14E0 for ; Thu, 26 Jul 2018 11:52:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1DFD2B0BC for ; Thu, 26 Jul 2018 11:52:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95E262B0C1; Thu, 26 Jul 2018 11:52:26 +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=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 09FC72B0BC for ; Thu, 26 Jul 2018 11:52:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B315C6E714; Thu, 26 Jul 2018 11:52:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on062f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::62f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 825D46E712; Thu, 26 Jul 2018 11:52:22 +0000 (UTC) Received: from BN4PR12CA0020.namprd12.prod.outlook.com (2603:10b6:403:2::30) by DM5PR1201MB0236.namprd12.prod.outlook.com (2603:10b6:4:57::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Thu, 26 Jul 2018 11:52:20 +0000 Received: from DM3NAM03FT034.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::208) by BN4PR12CA0020.outlook.office365.com (2603:10b6:403:2::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.995.16 via Frontend Transport; Thu, 26 Jul 2018 11:52:20 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by DM3NAM03FT034.mail.protection.outlook.com (10.152.82.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.995.12 via Frontend Transport; Thu, 26 Jul 2018 11:52:19 +0000 Received: from hr-intel.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Thu, 26 Jul 2018 06:52:17 -0500 From: Huang Rui To: , Subject: [PATCH v2 0/4] drm/ttm: move non-x86 definitions to the common header Date: Thu, 26 Jul 2018 19:52:09 +0800 Message-ID: <1532605933-26209-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)(376002)(346002)(136003)(39860400002)(396003)(2980300002)(428003)(199004)(189003)(5820100001)(126002)(68736007)(486006)(476003)(47776003)(2616005)(104016004)(478600001)(5660300001)(6666003)(110136005)(316002)(72206003)(54906003)(4326008)(86362001)(23676004)(50466002)(105586002)(53936002)(36756003)(97736004)(53416004)(106466001)(81166006)(336012)(186003)(426003)(356003)(305945005)(77096007)(50226002)(8676002)(7696005)(26005)(8936002)(2870700001)(81156014)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0236; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT034; 1:rbd5us7vopi1wiUEXA2IlwvZ/3s/ikkJmrQZPN4GBG0FXi7eZyoHIBAFYbwnAaj485asnZ4STC2zxNhVHLKZvLXJ1wUzgz2Cm/qSxeVEC2GMR7rgymEoYGnwuRlcu+uY X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6147fae0-7bee-48ec-8a89-08d5f2ee3e14 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600073)(711020)(2017052603328)(7153060); SRVR:DM5PR1201MB0236; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0236; 3:/ctDUaRfR0bT8q/GQnp0v1NKPHHRHdSrxscIM+nodNW4dD1VtffLptYsfNLQOYcAk76kvX9CQM2xpNSc1YoSTLhlQV2Aeueyc7ZW+RU06T7zH83aUDSSOedN6hIq/8aoi0t/j/8BcTGGh+wJZynQn0FKDFeZl34oqFUgjdxbA6j6ChHSbBqHkmTQw1ID39ISFdvPfYztyKCUjl348NRA9ANtfDGA++x8lyNTL5gQ+a786d+TByFineiAEc3Da6h1SkH9MF0kbEpgf5oS1pzQTOHWg/B9/YwXUqdHBHRNxJxF6lR2Xp2xlgas5r9lIoRMgzVbq+p2j71br0gyE6RMz7lgYLP0fyauE+54gKYJ4rc=; 25:yFHaGkc/GAW3tzxS10uP9ko6YDBUuWXV7PmZxg12P+e1E65KY1g+l3AJHPgEerUu8cfHQqngKc//HsK1v97WoFi5295We+zj3XTTNFgLUxRD5Vk5nIZQi3vMr8n8o+Omv3ia9TAJ1LuYm6sBVuEaR2xxSAbTspaKfD4cqOnWqFlnoXV8canwQZUaz55Cf7t+4cMERFymh0yO59ZK2PzL2kjHED0bri8s443gULjOW1n47K3ZV8lb6H1sgc/00HAvKqd8jyjZ0VdE2+7JfFzJ+gL+bZooJTs0VNEps7UunqhtOg6ZRk+jqA2fteolVv78/OMwL93rfTXmiPd6xt9KvA== X-MS-TrafficTypeDiagnostic: DM5PR1201MB0236: X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0236; 31:QcF+QGHljW6lUZwI5gmvJ45UR6EHERPzkk9VCxxAixv0oDQb15hEsN71MCwafuIGBkCaQI5QGsnA6qXkn6NdeSyc3svi/F8+MhTZzm/crUpX27cgYyEr60/5GqsZFyTb/x0eRarORj0s1p3PH6ToVZDsLRq267zpRj4giXUBkG+473h74VsKjjXUxlwWv/2J9PdpWHZGxcjr2C8qlitE9G9FGFwJvF+vOjakCkhsnEQ=; 20:zeo2GbI1x1IZHbf6SVneDNWdiSsWEo2t58qUefaUf6MmMOIl56t/PKE/fcCC9LHrtIOLaGsPNi2ziZejOZ1SYhbdE8TDzu/kqOaRG0th/O/qdoIlu2fm1gFGhAnAKPi5V/cFOKAUO3C1LmMEbKh/3sDsy+Eo7Qkr+kqTIhOSYW8vfKCebJRUTAF2q/aJ3m964WESD5SKgM3oqiZ74hE0gKHR8Oj0r8aMRKSyQZN8WTtyHGN56+7BTIGqP8Q9ahjGtJgMdIDzCvF7OoM7itWNa7yRWMOAC9SmyFHBHuWJIXvHVoHYd0RmyyeHFRYA+mEmiFZ/oKxojkKv6tmVMtwK8dAaYUUXEWjN5/dkA8Z5eYFXVFb7Bm/sm3vs/NlU47fYL4EvDuKO4KDjGzfJYxDHrSGa25RPKJCtQUD29O6ozwc83mXJJTspzksQYch9JjZcT9k4+iyVlcwRsCdd4V11tL5+WMvCN+MmiZgv917jS0OUVoGkyed+PWNqzckb8VqT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(93006095)(93003095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DM5PR1201MB0236; BCL:0; PCL:0; RULEID:; SRVR:DM5PR1201MB0236; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0236; 4:SeumEHhaEsufOc6/NC+qvZcdMx7LA8gPwCnrpbgNjjwSUtDaHPPMTHWsFK4A2OMxgsKjDQrkyjW7Og15RcYvZfOFh1VJCbUriPpME+mxipNZggOgRa2S4cJ9z5bfU/YIYPoqEWRe53oQ8AbbBbXXFarKSlLR84+Xkxyy9pCWIpvaeT6G+FIsJ+wbYJ+hFah2S7ehvkT0y5XIiI3VvJTeqaNhmgBnq7MmwSrR0m7DeqCtcbcK1xsUSpC/YhuAdP0347Bl5vgztZ4rCrLlOht+Gw== X-Forefront-PRVS: 07459438AA X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BDM5PR1201MB0236=3B23=3ACyQoy?= =?utf-8?q?bH0CcQ0GUelSqDfavO9SzbPJ7ngF9kDEniZ83G3rWElvxpG7awdJhlzK+I5pvW4/p?= =?utf-8?q?afXEwJIM7baRBLJ3MnkOMeUTVQZfHw5p9PeBmNAzK2LaLrPg91aDtD7FeVQiI2oic?= =?utf-8?q?IFUiUDWkSD9D0Jm69ez0bYODLfvcbanrXvJPW8WrFWZL5/6YTPcUqVXOMmR9CDsKC?= =?utf-8?q?d8O6jKrc2R8LNDndODpP48vC10ixA0zqybHsqZRi8rK1W8Z1cguh4U9ePi1Y/oWZA?= =?utf-8?q?oH8ImtHnBwX6F1+9RN13E5wCB9X6L0cRSsB0BTbiB0XOB6INOwUT1sArT3a0rZIcG?= =?ut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tc8QkTuBb4IYO3Ihq0qcq0ixxQE8bW0/y87f0BB2YAFPSRrtCgGYMQaPWZCFRi9nfrjcOSKNUV4WZR+GvVKyjGOB6jaSwJGb3JNeIPWs02waeLc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0236; 20:fvSZ5NiFykeHfcsEB5Ixamukp/ggeWFQzsIYjkXpo4YtjSzKsPo3RKoIgBfLPpB8Bg+mh1vAWhiumuJUICG6KlgoyFW6LdUI+XF/scHm41CK93aP/hI7yVbhs8UMSwsL9ba5pqHJpHbNM4PEAFJ+zIdGZaOZqR8qwetRfIzuGv9tzlKRmDmseog0R/SNTwpYnQrzqkEy3wGPneKQ0kh5rxhW308uxz+6B3Cgce5U8MxjzR+vCkbUL/0RNCBlaEr6 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 11:52:19.8746 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6147fae0-7bee-48ec-8a89-08d5f2ee3e14 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=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0236 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: Bas Nieuwenhuizen , Huang Rui , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, As suggested by Christian, we should move non-x86 definitions into one common header, and it will make the codes readable. They are based on the improvement fix of Bas (already rebase Bas's patch to drm-next). Changes from V1 -> V2: - add ttm_ prefix at this header. - use set_pages_wb instead of set_memory_wb. Thanks, Ray Bas Nieuwenhuizen (1): drm/ttm: Merge hugepage attr changes in ttm_dma_page_put. (v2) Huang Rui (3): drm/ttm: add ttm_set_memory header (v2) drm/ttm: clean up non-x86 definitions on ttm_page_alloc_dma drm/ttm: clean up non-x86 definitions on ttm_page_alloc drivers/gpu/drm/ttm/ttm_page_alloc.c | 62 ++------------- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 57 ++------------ include/drm/ttm/ttm_set_memory.h | 128 +++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 107 deletions(-) create mode 100644 include/drm/ttm/ttm_set_memory.h Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Christian König as well.