Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp267499pxb; Thu, 30 Sep 2021 05:47:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFTjgbzHux5pQf9UJIE05isBcCdi5CPkQ2CvrfdXjEMR/+YeqqcnZVminaPh3ZH7w8KhWO X-Received: by 2002:a63:6e03:: with SMTP id j3mr4780305pgc.465.1633006027751; Thu, 30 Sep 2021 05:47:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1633006027; cv=pass; d=google.com; s=arc-20160816; b=QfU5gzHVHu9MtqTydRTg4oVeBoIX2oJVSpr4aW06yRe72XiD6WVDwKqxWgRQ1E5jUg IpHsXDBSCy9ghqaRXVCJruRXMMDfokeE79cHnboofAFzqfnmBYSVgwwiqgmge5ETB42o 54mRllvSeekwY5XHrLXtcOKbsGzoSXpcZB9DFokaWWvqAA6eogc+fUslOKRSLyg09QW2 /STa9GFJeeZnfgCySvbUE3jM1KbuThr/Ci+uEwZ3hlpQUV9nAEj6rVXxOi37zaBnJuDh e6bqXmhZEIhWo4GT3MC+S+3Y3mWXjIWWt2VXLSO2w9Oa7mZQ6wXzMZxfZSrIGkuIupJO Gnew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:references :cc:to:from:subject:dkim-signature; bh=rcnbfPfvjwvbRBDjXE1pl6H+OGafQ+4UuiRZ3VCNkN4=; b=DfQd4jDOk2PDrLKEJFOUHyZ3Upms0uaivkzs+P7U0Zqhoq2BOjVnX2TxMxJn9cp0+A PQbXteKJFgLpg4Rny7uRdzmH9bDQyqPIBopbswG6QXjJiO2ufeF2pCpLXuUEPhQ4F0Gd vTtot8KpDnXqCPNjaeD0rrRkSNprKRYu5/biUOF+Ikhd/SLQhKGvQ5iMknPX2RmKtmVi yOeGAQx92p5rWk0BQabIwwDLTk5QLJjhCaZ6QhdLdRXsWWwBJgnbBCQiqdXyYMQxhc2X oOy+40DVIv3/RRVdt9X1fdDO32QUC7Q0KqYaul5uNZNwS12h6+358fa6jhyooEd9zA3J Bhcg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b="Cp/nz0BN"; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u11si3952762pgh.201.2021.09.30.05.46.51; Thu, 30 Sep 2021 05:47:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b="Cp/nz0BN"; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349818AbhI3MWi (ORCPT + 99 others); Thu, 30 Sep 2021 08:22:38 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:39675 "EHLO de-smtp-delivery-102.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349808AbhI3MWd (ORCPT ); Thu, 30 Sep 2021 08:22:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1633004449; h=from:from: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; bh=rcnbfPfvjwvbRBDjXE1pl6H+OGafQ+4UuiRZ3VCNkN4=; b=Cp/nz0BNVd+JnG7JJncC3xJH5rnono2A6oRiIoYN6DQC5ba/22optT0SoXayOIPuIrUHQk gI7Xg6cfNe0PKqtDMaXVXkeD4JIfcCFs1a4vo0t4KUJ2HgmHRTuokHnuhgFCmFCTYhRmVW a59OhmkHi/VgvRmaPWmVwoZd3xrdWZE= Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2056.outbound.protection.outlook.com [104.47.13.56]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-11-5AYQGfvzPqC3WQV53YyTvA-1; Thu, 30 Sep 2021 14:20:48 +0200 X-MC-Unique: 5AYQGfvzPqC3WQV53YyTvA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UrBJTr4FxA+8BvHSEZ3m+6PzZSDClJT8lUEHWNuyPzJRqWvdWndhdt3MKur0ZHdnEJDZMauyvi0X/p6HXQUmwyr6ESEesEPyhW34AzeLTjY8hnKOLNSX5jIHYCA7FxVp4rXtMHMvreBwkduk58OHk2flEPTNAwxgOPfw/hHB+Agz0Tn3j0RU5b+JJwJS+rxlCs/hXsmgnnikW1aTHs7SquU8e6CG+ahSTmL9M5t0jqrt4nxZoc9KR3u7fcd4Z7xACB6xDKeKeDbCqN+hdrHtQJEXF1hqOROKTHA2UWVjbrcpuf1dBLLPiip0p426whTH6Sl+719R84ZTzO3C30bVlA== 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; bh=rcnbfPfvjwvbRBDjXE1pl6H+OGafQ+4UuiRZ3VCNkN4=; b=gTMbXi5NorRXIPD1/M6hvcSJ8QYJtdKB65jGRcsnJ9l+zRtZ2ViXG7Prs5ZDkncIkKXj9QMcHW6GH3aDxqIZZOoY2Dcj4OqNfHNRn7p04fzwUo8p4Wvxii/Ds6hO4UFKPspF2uCHX/OV0Pwq7GIJ6egCv/N/y9RPbOpTuYT/hr+L1X8vzgEWFKmfIc+KqJBI0lO36SV85AwcFxr+kUHHSDt6PehUafpGOEvaYsKX+YHzcGUitAvrHk7npAdeUcamcwa8XKZNzbeEAhk9cdfXEXX7JQUh+rOBm0vV7+EeefOOwGYoYX49bQPGdUwHmFJkCvJFECGwqIV8nCpzruZudg== 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 Authentication-Results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB7038.eurprd04.prod.outlook.com (2603:10a6:800:12d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.14; Thu, 30 Sep 2021 12:20:45 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b%7]) with mapi id 15.20.4566.014; Thu, 30 Sep 2021 12:20:45 +0000 Subject: [PATCH v2 8/9] x86/PVH: adjust function/data placement From: Jan Beulich To: Juergen Gross , Boris Ostrovsky Cc: Stefano Stabellini , lkml , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , "xen-devel@lists.xenproject.org" References: <9a26d4ff-80a1-e0c1-f528-31a8568d41f7@suse.com> Message-ID: <3b0bb22e-43f4-e459-c5cb-169f996b5669@suse.com> Date: Thu, 30 Sep 2021 14:20:42 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <9a26d4ff-80a1-e0c1-f528-31a8568d41f7@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AS9PR06CA0138.eurprd06.prod.outlook.com (2603:10a6:20b:467::24) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 Received: from [10.156.60.236] (37.24.206.209) by AS9PR06CA0138.eurprd06.prod.outlook.com (2603:10a6:20b:467::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Thu, 30 Sep 2021 12:20:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2182c689-5b0b-4c06-da13-08d9840cba4a X-MS-TrafficTypeDiagnostic: VI1PR04MB7038: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7URPomHxvGjus8IZCVo+VjyB1HBy2tjx1Gu+BOnX/3gASZa74UFTy4bJrgH6bD/kzfJ8LWwJm3x9vGa5siHDDAPchRtASpUdop5gBUuMaI64aJKQuZfA0psKGycr5lBIpAGmqWVaBAPaxhgNIOsT+fEvyY9BAKFAkwv8resUFWJu6wVWUTT7dZLhS9YwsryV7EG+LFnIDqutKOj8NNY+1OB12laQt9r6RlWngkalJBkZoWmW8vGThOO2c1OMd12MT4Ww/LJmDbb1/z3TVAhXZX4eBV2Oicrfg8IFfO0fFIZ4ZqGJtCleytDXjzVmYwRPk25Wq3pfzI16IO7ROC0GcJxdU0liC0xAHMh0SKaaaIkj9kAiAmxCmurczYcziaSFmMLYme6TBqDkZQeq0boLnIxE+cvsBDkuqe0UzDDd7N3EOC7jQG0MqKPspJtBh6GUMw56OgsvRp4xM9gWOeJZb1WD4zKDZg14vyfFm8cEWQlzqFW4SZdaStW/Tmvq5PxIf7kvENcJk9+SwDdPyUkImWdJh3jhmLa84lcd5yJ9HeL4wexCbD6bIeKvGnpcELpK98Y+A9Ohbky+LLZl0s76cpKnB61YK5kWVojDxSpuMP9v4aIuWx30CBUnSyl1Luv2TZTMA+rpUZaiMbhu83fgr/lR+ZSpNsEDisQw1O4YTSM/bHllwaI7nGPfTFmhWT5v8ahp1fRmydK9dJeDiLnY7tw4leGOEmLeHm7G2oTNnUnLhwBvlvS9J+c/IIhhPhRK X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(2906002)(956004)(8936002)(31686004)(110136005)(2616005)(316002)(186003)(38100700002)(26005)(5660300002)(6486002)(54906003)(4326008)(8676002)(31696002)(16576012)(66946007)(86362001)(508600001)(36756003)(66556008)(66476007)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?blB5NVg1blZyM3oyaVJpWXJ4WTdndklUUUFPSEIrUVVsc1FyV3lsdG4wREZ3?= =?utf-8?B?UDQxZENhVTI5RUJadmJLWU1tWlEvZlFEbmdDaFRJZlhDQnUxNE5ZaWgvRTVU?= =?utf-8?B?OGF3UFlQamIwM2E3eXNBMFlnUjRzNjFNb3ZoZEhpRnIybjMzR1VUdTZZdVB6?= =?utf-8?B?aEtGQUdkbUxNYjcyK1BIOCtReGFjOU9wVEdLaFdJdVRtVWFSTDZjeEZGQUhl?= =?utf-8?B?NUJEaGRxUDhLbjlEZXprU21BQzlZb3JMWWZ0VVB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NVhvUnVlWkFOUWVPa3puUmZHKzRMdFlZ?= =?utf-8?B?N25BbWxaS1kvODdIemhFWjhSbEdleFJVbjRoQmJlcG5PTVNUZy9sc2NOWW5h?= =?utf-8?B?SThmTVlvdUNwcDhyK3loSHdOSVhIb2ZIalVrcEU2ZFhHVmpBTElscFgrUGh5?= =?utf-8?B?RlhRV3E5VHlhcVpGbE1DM1dwakR5WVh2UVJUeUdVMTZPQmR1SFRzTWJmRVpk?= =?utf-8?B?ODY2RGtDUWU2S2VURXRQcFNEZHVJeHExZmlVZzhVWDNQenBkdENFQzlHejJR?= =?utf-8?B?Rjl3cHdZWnVMNzVJcUY4eGN0MDlEdEljZVU4RHc1aGNiQjBEOGxYVm55STly?= =?utf-8?B?NzB1c0xjQVh6aUUyRWVtcCtjUDdYQ3JEVlF2NENXVkp3UktRbnNJTXlYS0Mx?= =?utf-8?B?RE1JVUZDMHlBTjlUMHFtN0JlQ2YrT2NpT0pPYmNSMjZuUzhMNzZlSGFLRmp4?= =?utf-8?B?VDBHdXVQSFdZRXIvc0RtcmhnQ003OEpLN1RSdXk3Wm5ERVV0MWp1Wm5zeHJh?= =?utf-8?B?ZFQ3M2ZKUDkvejdSWkw3QWtPa1I3aGRXcXRjcjZWMTRlaUwrVzhKWVlOcDV3?= =?utf-8?Q?uAwk3aZIqgE9qRXdNMwAnnsfLOyewp0qIGGwNBe?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2182c689-5b0b-4c06-da13-08d9840cba4a X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2021 12:20:45.0786 (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: ppjs6jifD+dQgrIqxFi9CzgyTJJcyBLRME/y1Xr5CHLUX6DNCQ4KPok4NA/IvKleABQxGHy7f4lZLrZJ2We+3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7038 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Two of the variables can live in .init.data, allowing the open-coded placing in .data to go away. Another "variable" is used to communicate a size value only to very early assembly code, which hence can be both const and live in .init.*. Additionally two functions were lacking __init annotations. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross --- a/arch/x86/platform/pvh/enlighten.c +++ b/arch/x86/platform/pvh/enlighten.c @@ -16,15 +16,15 @@ /* * PVH variables. * - * pvh_bootparams and pvh_start_info need to live in the data segment since + * pvh_bootparams and pvh_start_info need to live in a data segment since * they are used after startup_{32|64}, which clear .bss, are invoked. */ -struct boot_params pvh_bootparams __section(".data"); -struct hvm_start_info pvh_start_info __section(".data"); +struct boot_params __initdata pvh_bootparams; +struct hvm_start_info __initdata pvh_start_info; -unsigned int pvh_start_info_sz = sizeof(pvh_start_info); +const unsigned int __initconst pvh_start_info_sz = sizeof(pvh_start_info); -static u64 pvh_get_root_pointer(void) +static u64 __init pvh_get_root_pointer(void) { return pvh_start_info.rsdp_paddr; } @@ -107,7 +107,7 @@ void __init __weak xen_pvh_init(struct b BUG(); } -static void hypervisor_specific_init(bool xen_guest) +static void __init hypervisor_specific_init(bool xen_guest) { if (xen_guest) xen_pvh_init(&pvh_bootparams);