From patchwork Wed Aug 9 10:50:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13347704 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA5E4EB64DD for ; Wed, 9 Aug 2023 10:51:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.580859.909308 (Exim 4.92) (envelope-from ) id 1qTgmJ-0002uV-GJ; Wed, 09 Aug 2023 10:50:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 580859.909308; Wed, 09 Aug 2023 10:50:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qTgmJ-0002uO-DT; Wed, 09 Aug 2023 10:50:59 +0000 Received: by outflank-mailman (input) for mailman id 580859; Wed, 09 Aug 2023 10:50:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qTgmI-0002uI-0R for xen-devel@lists.xenproject.org; Wed, 09 Aug 2023 10:50:58 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20624.outbound.protection.outlook.com [2a01:111:f400:7e1b::624]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9dc98129-36a2-11ee-8613-37d641c3527e; Wed, 09 Aug 2023 12:50:55 +0200 (CEST) Received: from DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by DU2PR04MB9067.eurprd04.prod.outlook.com (2603:10a6:10:2f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Wed, 9 Aug 2023 10:50:53 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::e5cf:5743:ab60:b14e]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::e5cf:5743:ab60:b14e%5]) with mapi id 15.20.6652.025; Wed, 9 Aug 2023 10:50:52 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9dc98129-36a2-11ee-8613-37d641c3527e ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RFe4HA4Y49KLAaP1LuMJtKAY6YGczGurCwJOeG6H0xwN5CeIqNuOIhdboQF3px3elN+vZ9eMqwNnZ3lHG6GwA7ziG22i77EYeYU2tUfHLFigCSnzAVno5LkpP2/X5VFQ/D59k1zTxYCFjjrZQO+fFuKLtTFYuq2be4+7+A0bRGZH3x3U28Ad+AR5wCX+T3ziNjFiQH+bHMaO25HBBrj+Jo5G6nsxln5ZulnOJF4OnSRDA8N/SNRnSjpkzZRc/WodtGUzLjQ3QgL1hzi3a9dqKDBmAnn5/jJa/6IMoHEi+1FgmLcqtZWsazY3fS0p9sF7PBFqSBGy9SmBQNiWUrYktg== 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=C1GQHusw4elOucUIan9J4ndko7DdBkW3IAgTLctyzHs=; b=nD/Zp7rHCIbGfpbqcbsSBRB27l3c4gzq1WVMupY1pg+Wck/WSr/yjZ0aft502S+uiSJDAtb4AQxhnmZqCXsuwlsPB7gukQxU7cet/RkPGgpKZbgzEUNWV8dlet0j0KVcNEKbBeLmmYLNj7AqILV1hfXyb1waGqcV349OkXJ3FKDV1zj/7hiPqehM9GcPp5GQIAMPOtLE8W5PnifcjQfvzfWNaWOArilR9RceKzNuZ9FGTD88vyxVxwVsRT02BJDtMMPO5pbUgDHil2B/uK4X8eHiP7Ri7+XOFTwkAhA+IO2SDtq34vK4X8p8ZXJFf5cpyxbhOzMes02c4XC5gkRMoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C1GQHusw4elOucUIan9J4ndko7DdBkW3IAgTLctyzHs=; b=HxfG28qdVGP1y3/JAj/I/03DarTyYxsELd6RB31neVHar7Jsl4hgqBclfMqD73xHRj4Wc8Y5NBHo1x/ENMooeeLhLc8J0vl4uaFOxHtcFj7ekoZs5yVN0PA8ac3YXUSmhJj6I0ynO0fGQVFESmEWQoKmz2LqB1YxDbxiaXeiUQsoCY+QwmLMUgD+ztYl/hcBUn/IghoznksKxOBBLiJroku485xT6TQmH8somaaK0SmjNQnAh0l5NPgyzYy9SmJcfudMmkddkxaxp463+mrpi59UBuGN178+Tqolz9yPcOUhXyMYMhPNa/IkOZWU9QVbV/3tj51k/DzHj7IMMe7bSQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: Date: Wed, 9 Aug 2023 12:50:49 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Content-Language: en-US To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Bertrand Marquis , Volodymyr Babchuk , Shawn Anastasio From: Jan Beulich Subject: [PATCH] move PAGE_ALIGN() to common header X-ClientProxiedBy: FR0P281CA0240.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b2::15) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|DU2PR04MB9067:EE_ X-MS-Office365-Filtering-Correlation-Id: a574a85f-8e13-4896-0415-08db98c68039 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5PF2GSZSno/3iS/dS9BqQq4VQgnD8hjqhLqJMCsvteMs2lILGaqlcUfg7kacI0QHxZIBOZOCfpSAMcHyUuen254FwCO7sffJYLqCzebTOR4mS2xsoxORRdFtHZho1W+nkyGhE2themhM0mpRkAhDlY28QBhfgEZOr4d/gtnfBgdSoyQlAzdkM/bU1LFE1By9Z8VhvuoDnw5sOBD8kGslc/LcGg8THy970hHfJxP18tpl9mns46gLMMMZcKgBPmhfZXnE1HBUqcyaddP2eyhAdbwSDBvtX88ipU6OU4OBXmVybhWviGRD+/KhN+Ibh/rB+FeEur5qaofGZrMWy2Y0IJzYTNzL+gdsfuRE4E2xgo/zXRIPhyIFjV1SlUnnxtJ8EwLlTUDl6dZ2iapb+4Zq601Iq3xs0zirEsiT8zuwHSM4wTS/f+erwssVkJLV+z+j1Kicm9Ls2m9eXwkjRDv0Gtz6UU5+CYfuHhHoBIkKBo6wukNsKkTp//8r1W8oD1B9kHEAH+GFgKs2V0U6Lb/rGT0+2ZsoMv4uiUtFIg+Ps9h/Jq++MLUVph/6K1EjnZ0OgLx1+Saa2FsXJ3UytbXmqJsHMnPeDAbRjfWbdgBjzJRwT4B47W05PUYk+ByDJWPpLFEqGlm3V9o3Ts4uw9Tacw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8790.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(366004)(39860400002)(346002)(136003)(376002)(1800799006)(451199021)(186006)(7416002)(8936002)(8676002)(5660300002)(4326008)(316002)(41300700001)(86362001)(83380400001)(31696002)(6916009)(2906002)(6486002)(6512007)(6666004)(2616005)(6506007)(26005)(36756003)(66556008)(66946007)(66476007)(478600001)(31686004)(54906003)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HkCUjzGPK6u8eQnwz3+O/6rKSjcQ?= =?utf-8?q?K92Qw/TZE9M6osottCSIDovk6XMG5Fvfk4ExJYDR7hHBCBEh/7mhvV9hTLYn95H+q?= =?utf-8?q?xJOr+eNwS+iLwL62g68dxMgOlmMDVs30oed1M6ybtmrxporlGobCPsbgb6KFVU9JA?= =?utf-8?q?aWzpKUFhffKtedCHBr9I+NEa4TwRqCovnnwJqSUS9IAfMuJZVjwXpC69UyJbXhBGx?= =?utf-8?q?YY2/Wiwqsk+aTcat3IiTT4eNF0/RzsF4yX1sliPCc9grMhksBWGzkKxO7eo2NGJwq?= =?utf-8?q?qe7+lGhgkLkkClnf1UKg8ge33LHnkTVMi/upuNx2Qsy/z/gOQk2KfdqDDO9xGbjBi?= =?utf-8?q?zPZLRzRS0R7Q1a/oQnsQRaV1yDqMV4xsMqVjvA6fvX8GVWyVa/5LNuBRbxuX25Yuo?= =?utf-8?q?CL+rX472SgXSKKQAhDMJ/PMmGmgV9xuf7zaai4U3irRA/RLhX/vn39URyHe6oUbpT?= =?utf-8?q?9hmZaPYRrpG+D8XAQIk/VYSpQrWBRpPugnwkZ58SGakWdLdGwq8KbRZ+Avjx6IL7s?= =?utf-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MGLuhWjW2gEXi7tU2J6gD2zaAtZtdXA3GHIHefxN8NePR?= =?utf-8?q?qTHpzWXJMJj1bC0eW7GeaCPTlGMhVqZRTJuJikyutaEAPp8zBLTC4iFq7RPfjNrLf?= =?utf-8?q?fx98Ki32Ta1u?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a574a85f-8e13-4896-0415-08db98c68039 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2023 10:50:52.7499 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OT+YVVvXuHxPNbkjIBXM8R8SkDOsXqnHpeFAX2hfk1j9Go6KkbJkGEKfuVjeH4p3FJCWcQQdgCqW1mIVYQlH8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9067 Much like we have PAGE_OFFSET() there already, there's also no reason for each arch to define identical PAGE_ALIGN(). Signed-off-by: Jan Beulich Reviewed-by: Julien Grall --- a/xen/arch/arm/include/asm/page.h +++ b/xen/arch/arm/include/asm/page.h @@ -303,8 +303,6 @@ static inline int gva_to_ipa(vaddr_t va, #endif /* __ASSEMBLY__ */ -#define PAGE_ALIGN(x) (((x) + PAGE_SIZE - 1) & PAGE_MASK) - #endif /* __ARM_PAGE_H__ */ /* --- a/xen/arch/x86/include/asm/page.h +++ b/xen/arch/x86/include/asm/page.h @@ -404,8 +404,6 @@ static inline void invalidate_icache(voi #endif /* !__ASSEMBLY__ */ -#define PAGE_ALIGN(x) (((x) + PAGE_SIZE - 1) & PAGE_MASK) - #endif /* __X86_PAGE_H__ */ /* --- a/xen/include/xen/page-size.h +++ b/xen/include/xen/page-size.h @@ -10,7 +10,8 @@ */ #define PAGE_SIZE (_AC(1,L) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) -#define PAGE_OFFSET(ptr) ((unsigned long)(ptr) & ~PAGE_MASK) +#define PAGE_OFFSET(ptr) ((unsigned long)(ptr) & ~PAGE_MASK) +#define PAGE_ALIGN(x) (((x) + PAGE_SIZE - 1) & PAGE_MASK) #define PADDR_MASK ((_AC(1,ULL) << PADDR_BITS) - 1) #define VADDR_MASK (~_AC(0,UL) >> (BITS_PER_LONG - VADDR_BITS))