From patchwork Mon Apr 3 05:22:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13197670 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E43FBC761AF for ; Mon, 3 Apr 2023 05:23:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E4AD56B0075; Mon, 3 Apr 2023 01:22:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DB73A900002; Mon, 3 Apr 2023 01:22:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE0686B007B; Mon, 3 Apr 2023 01:22:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9EC856B0075 for ; Mon, 3 Apr 2023 01:22:58 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 77F241A03A9 for ; Mon, 3 Apr 2023 05:22:58 +0000 (UTC) X-FDA: 80638935636.17.241B2F1 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf17.hostedemail.com (Postfix) with ESMTP id 3A49540013 for ; Mon, 3 Apr 2023 05:22:55 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b="Umr8tG/b"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gb4IdZuB; spf=pass (imf17.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680499375; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ohlWGuVeTFKX/ILJRWBRlxXLpQTPT1nzsZWWTdMkjxA=; b=sZVcXGhYBaute4++xzrdhRuRrPaEk1ImhYOMPgjEi1rGAhbIEZVRQZktImvWcGSCqDE0hq 3WtG4g8/0fxptty7fHXQL8yLxBqxnyBgDb4X2JQUnwc0DjGO0728XbLX5LK1EIKg4FSQu6 D6Ghqszz9m9rH+rpiuNllCgkBNu3/5s= ARC-Authentication-Results: i=2; imf17.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b="Umr8tG/b"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gb4IdZuB; spf=pass (imf17.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1680499375; a=rsa-sha256; cv=pass; b=LeHESKuHGGzDWajV79aAAsFB9Fft5eTZ4BLRf0ZRqRv/is225snAOl0+WsEqUfZnR5iXab R4jSPZBbB1Oz+GyyhzVzwTzcJOkFeQwWvXjxB4WYyYjgnWW3c1n1dPgW8Q/URvbrtBDZ37 MgU+VZ9u9zwrotJlQQQP9XDUpVeEEf8= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 332MU6pK007758; Mon, 3 Apr 2023 05:22:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=ohlWGuVeTFKX/ILJRWBRlxXLpQTPT1nzsZWWTdMkjxA=; b=Umr8tG/bSTqokt31/SwS8H6nVRyzLETUEd1pJhSfI38+SSBs9QM/3Kc43v9g1rLi1HWA CqJzKOSRWu7GYItYVXUu/o3vk5gcQ4/CChpYx2c1imXvcio0zt1QktC+wtdNcDRuaOAs oQaoeRmiro54Q8g/pKp2D0FzJlb4He0KZVcQppF9yJBJ/NosTL6gg4vg7ZgvMTJ6tCXF Hw+OgIiYdqoMs19OzftY2jdFYSxId9VzxdQufIPDPSdTyN5OXPY4I1WHFItiKkDanh7b eNP2QFmnc4lE0fh12qxcxnF93537u+cb2T2NEkFVQ0hjfvyKI7IAmTDgPA29v7YLqWeo wQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ppb1dj5tg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Apr 2023 05:22:36 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3332iZTo038319; Mon, 3 Apr 2023 05:22:35 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2168.outbound.protection.outlook.com [104.47.73.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3pptjptnh1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Apr 2023 05:22:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BTkekeb43YDGaytj8ibdOp8kbxQRmitOIpWZBjfAWkYAMpHeWKdgvyPNkf/GrJUDLUswOpW2FHWzE2Q7/RerKKsxPIqrkg+5TPC7CnkHhftMgdnCbAOcnO3RwFi3ydw5CIfap/7+1ItAVcC6bAph0XVZprTCBV0bxdfFDS9B4C7woqrB74DPbq8ISmkC+KQDiyEjMot9Ctjs4CobgYEQ2u5hsa+1H/z7CcbH5ruc7LvDU8aQRxSqc29hFxySL4o6AbolR/79vgALB9KSL/i2aMuCmfljQQUH03xKi6mqncnCJDd7cHoxh3Ktt9aS7oEOA6E1lbjFsUwFUnC0ALOBOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ohlWGuVeTFKX/ILJRWBRlxXLpQTPT1nzsZWWTdMkjxA=; b=T3+lwwtbDWIuxosZQr7mbu1drV8m+YEFobi7qFxslRFa2qOUf44H4+Vl/iTljJ0JXfVyMW5lpRDgYwLPiOjZjZAdf8ee8d2McwO+CMuTN7kg9wa2yxChqSCmgHXzvDQ3N9b7mLhPlcSct9n3zMjkHK16BWLeVZvv/4wA1jOtuAopSAln9XzGYiTJ7XLdWWNNKg4hlmI2PymAAjuuxrWkzsK3pKx5CSPofIE5w80MRZdFgV5c5bxesJIMYHhgD4/rnjR5yBInsBGMsVRNxykffG401+2Aabh1PIw1t07M2h86eT7W3mh2mKqdSdvaB0CFRayL+hRB08yL8VAxCissVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ohlWGuVeTFKX/ILJRWBRlxXLpQTPT1nzsZWWTdMkjxA=; b=gb4IdZuB+7iEcqZpYLUj+q87gpc6O7iai0Da2r+tnrXyv7oVSoGzvjnVgQ5jKwNRxG/xVXEjazyXNqvXb11o91NvB3btsaVuLTDlU+abbadzphxZ31hERaxAaftrLrjB9wR0h6TJldYpg1+49Jqm5KuPAiNlVqoxiVTsixWkI9Y= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by PH7PR10MB7106.namprd10.prod.outlook.com (2603:10b6:510:268::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Mon, 3 Apr 2023 05:22:32 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::986d:1a90:f60a:53b6]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::986d:1a90:f60a:53b6%8]) with mapi id 15.20.6254.029; Mon, 3 Apr 2023 05:22:32 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, willy@infradead.org, mgorman@suse.de, peterz@infradead.org, rostedt@goodmis.org, tglx@linutronix.de, vincent.guittot@linaro.org, jon.grimm@amd.com, bharata@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, ankur.a.arora@oracle.com Subject: [PATCH 3/9] huge_page: allow arch override for clear/copy_huge_page() Date: Sun, 2 Apr 2023 22:22:27 -0700 Message-Id: <20230403052233.1880567-4-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230403052233.1880567-1-ankur.a.arora@oracle.com> References: <20230403052233.1880567-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0130.namprd03.prod.outlook.com (2603:10b6:303:8c::15) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|PH7PR10MB7106:EE_ X-MS-Office365-Filtering-Correlation-Id: 01f37a97-c6f7-4797-e175-08db34036cda X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g17nSWXUMfqWTm+Nexe+KttTvJn7LzjMkTOkxboC103/imibfWqRP+dRUAfy0MFiZ3jNho34I+Z5O8FmN3+0FXwMboZQuNpND9xd/2U0kbhed3oxKtcIp4ZFh52MnagA7VWrrRwHKIl/xpiEIZ12vK3J1DX0GnWPqWh6zgr2LMTQo9zWyWIAzJVhb12yWJytl4fhcgux6yreEErmcf8uvCi2b3niF+QVn7zLT4mduWYNbLPZzMThBR67aD2H1vR5GeQwB+RF9UbskebL7t1qCW9TWxSsMXqur96G7BDNzHVjpgLxJ7ql9od+TJP8M2VgHc3smjnMVdYu+3pZwb0bcnj5mYGillS9r3N6WudP+FX9Y2EapwbF1u1mTt8ntNF3wYUb+bjE3xD0wQC0jDYXYXkUO+zPcMMEHt5m6XQVhkika+qZR5KO0BxaPTmVMDL8wcHY+WPI19zyBmt4UNcxJV7J7jvCyoPwRw7m4a84JbiDFduLtwoamA3Yrmr0z9SNK3ZPKMSkmkvrWUQUks3/XvGAIqUwWZNVWPW4z4FKd5JguCbsoG/Z9py0JoQqvsuQ02F/29r558OAGgvOQzACYdo9GVkOh8bPQfIJmmjscAc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(366004)(136003)(346002)(376002)(396003)(451199021)(2906002)(86362001)(5660300002)(7416002)(8936002)(66476007)(66556008)(66946007)(8676002)(41300700001)(36756003)(4326008)(316002)(478600001)(103116003)(6486002)(186003)(26005)(1076003)(6506007)(6512007)(2616005)(83380400001)(6666004)(107886003)(38100700002)(14583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wlsYQxBY0Nisi8aeBxFdIVyAH4j2k7GBLV9PHGjuPzZYKNSHkfVq6//mQkp9vW5PW+R1Z6w/9s93iHnlLWjJAB3bQRbws17+WSQJND4Gfp3PvWRztXQWPMq8+qUW6tyAcNjZHf1OZnH1Cy3oMSRyLxI4kYk4wfCTroMT8ze/XtV9EWfq/qp/IjqEA/tPRrx+x5Vym+NwWEKG3UIvy5arWju7R8QKENBb2HAVdasmSZjAfAY5vp/E0iBBZb9KoCBuMfz743vKekPiT/mBe1h7zn/nVzXjty0x5wdo+QieQVpPTKFXKf2ha6jcwMMIpBZ5ML8pkoU+L5vXyhRMR4Izw8oNR2hqBNuuIo+4EGalOeK4SvGqIn0xFnmsj5MKXOgJBy9nQd4HR6ZIgKYrYGvsIuE6I/WE4t2ilh3JMBE2L/KoeJJtJ7hHaTIvLP1olsCQR14dSkpo47CoB3PbNyU8oTL0o7h0+gsGe0GageCqBcrxaUpQn867jMFxwdAhoUtXSzX6Tr/i4+SFJ/jvd9ibHI5AT6MKUp9K4q215mC7kKEbjB7M+jWXfQLsRLdcL/WTj037CA3mhYBi1FqRS0+gnEhOla/JL2FtudCOIxfPHEdcZp72HWiweEY3XKlO44LqSmHue/FRTjK7ZRznmCg2fBxFNx5xmALmkQI/wMwO1DCYPP+BGX7BCgMegE/qKeYRPpg/dNEcLJPcfGAonbamqehrkRW59fqafecZPLGh2F8bFotgqi1Cfp1lgojvzpTkq2XhWl+b3XRoDr+sfvsmBg4d/CtABr4lweIjsTgchSxPuz0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UgqYsYXoLmKzPZU9DavapHU71P2FczNhLxN9veKWYAPYETmYBvhEn6YzHGnLW/U2OKUYGQaNq7oYzNYCaf42SzCTBTXitW8eo3suuTdjqtVLHYiRLIM15JOUYQERKF/K/6WLHLCtoWp6dhkpXUlCiRkKigpPdSCt63i9G0BmLBQnjJ6yVXVK6BdUIZPcmg+b38aWQ6xl/u9M8jBil622+w27l9cvmszEB7hye34l0rXilTbe7ke/JvzglVPvTBiyVIna2F7zpmovGS56KCsJwF6ZZvnbh2qc9VnC0YNAWeoEBlz7Md9McaMTZJOHf8V9HFNqmuQfhDaiU3xXwEkcymafwQbHx+coINTBWxHUZbgDmzlNsPDVQI+yp7Cg9m2Ua6NRH6GtLsorr149K81AakdEKK6c1m2oG774e2Buasg+58kl/6+sYU2MghvWMs2cDVTd6vvT3Vwqvex70e5V9NTF5XiYV7DwmAtF8EF2/3HymWef9Fyqt3BF9gfxxz8OouZwxx6fvtUdUGR8FWf7nHjZvYmDGSRMe7alpM4448LGcgbL8MVIIy0Mx7P4CQngz8vGWVPYupevmV+4A24uV2xcZLdcKLOF8Fhfhbui/E09JJUZfcVdzVhdtFaaATrL2qwJ/bVqwvbWh21ZvQJKkmmgg9844iwM/gnrM2qYFzIUrZkuRKsWQmfpNVbcD9Vftl2mdoAjvNHJpfo3uPHC/IHtNhPsJP9kRRwiKjbLbm1c9gonpEplWRSwpgx34yf/0kzR9FrfcOsrhYVIvB1AjJTOqu+QOus6gPXqXa27eY/Hpu0fdo/fPTtPGGyNPf9yGRW+SZdxB4Rv60p16jWjHr0BJ0L2V3UVNjN2r9Ia0YNO4ynT0L/749d9GhbtxDZ4JrR0ScPUYwPgShHE2rPK3cNLJNYhl5ig4z8gZUrzvRE08ea8tq3z9csweudX6rPwbaIN7f8Z9n8Ex8mIgccvnOPIG88= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01f37a97-c6f7-4797-e175-08db34036cda X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2023 05:22:32.1264 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rNJXMkL48RPF+xFdQXcLCh0so6eMyDa5HL9gezr45m7jf5XtCTvjoS1tnyCjf4dVMTs88RSIBfpiVA+VbXMR13gPNT6KLzT7YbKEoc9Y76Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7106 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-03_02,2023-03-31_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304030039 X-Proofpoint-GUID: ewEv5zCY3Gyz7aBBO5lxVpjQuKxkAKo8 X-Proofpoint-ORIG-GUID: ewEv5zCY3Gyz7aBBO5lxVpjQuKxkAKo8 X-Rspamd-Queue-Id: 3A49540013 X-Stat-Signature: 78q3n6fxb4hpktzpbz6yrpe3zk11fft8 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1680499375-205161 X-HE-Meta: U2FsdGVkX1/WHMdpjtpBD1FkIsXZRT8T86uMfxFHaNcllM/BHeLD5a+i3OxrFXkOMGrmEDrGaiuo9HbeCfHzOP4QMmnhMcxJ2aLVzOFnWA/+3Gr0I1RFodLJMTvN3IRKa2qzuWo2KGpKKMQW/9rhqsjN9Dpp7162v22Cg3iSIj+BsVg4+xL4Es4/MMSQxi4IK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BRVj5nbKDlviMdew9KsAVv7st6Ne8yejiBktFUb7OWI+oeI3pykFZtPSBIrC/qRwynfFxWbDLK0xq0GVzi84tYLHtZx47nvYpY8oiJoMBfnNLcRgN0cYtU2qSmY+0FwMJkhWAgXWGQ3Jqe2XUcVkq2BWpMAetTEWdXZnPOlmMCK8BZAkBrL7F5oby55y0ajxF8Rvymj+K/lMdVXau1/qtf8/tpIY5ybu9+dirYDZELAAx X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: clear/copy_huge_page() are constrained to operate on a page-at-a-time because they also handle the CONFIG_HIGHMEM case. Mark both __weak to allow for arch specific optimizations. Suggested-by: Linus Torvalds Signed-off-by: Ankur Arora --- mm/memory.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 6da97e6c7d21..9a6bce384616 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5645,8 +5645,12 @@ static void clear_gigantic_page(struct page *page, } } -void clear_huge_page(struct page *page, - unsigned long addr_hint, unsigned int pages_per_huge_page) +/* + * clear_huge_page(): does page-at-a-time clearing to handle the + * CONFIG_HIGHMEM case. + */ +__weak void clear_huge_page(struct page *page, + unsigned long addr_hint, unsigned int pages_per_huge_page) { unsigned long addr = addr_hint & ~(((unsigned long)pages_per_huge_page << PAGE_SHIFT) - 1); @@ -5712,9 +5716,13 @@ static void copy_user_gigantic_page(struct page *dst, struct page *src, } } -void copy_user_huge_page(struct page *dst, struct page *src, - unsigned long addr_hint, struct vm_area_struct *vma, - unsigned int pages_per_huge_page) +/* + * copy_user_huge_page(): does page-at-a-time copying to handle + * the CONFIG_HIGHMEM case. + */ +__weak void copy_user_huge_page(struct page *dst, struct page *src, + unsigned long addr_hint, struct vm_area_struct *vma, + unsigned int pages_per_huge_page) { unsigned long addr = addr_hint & ~(((unsigned long)pages_per_huge_page << PAGE_SHIFT) - 1);