Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1150080rwl; Fri, 7 Apr 2023 10:39:41 -0700 (PDT) X-Google-Smtp-Source: AKy350Z4KrCElPROQq9RLxeJCEVgRqtuj0gFDaa26FT/eOCjgMBL2Xj2pcZq27kNpNEBj/7OBJsY X-Received: by 2002:a17:902:ebcf:b0:1a5:d0:740c with SMTP id p15-20020a170902ebcf00b001a500d0740cmr2970458plg.46.1680889181118; Fri, 07 Apr 2023 10:39:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680889181; cv=pass; d=google.com; s=arc-20160816; b=H8I7nSt9aed4EzP4uBoGO1BqmnskW+fs0BWVsRSjb3zwTTsbGDg/jMhkogSEhYBrEh HTG24s/dDYaxENDLfF5V5HfUL/SnoxKf2Zzk5MI9i59tZsqf35V53w8uADtNEvYbHN2n VRnFnceYNSJHkeX7xxjlJ+4g6ziVSsPTcIXnKebNatQBq2KqmBJ3YXKeCcI983UErLaz 7UioENBFIf3jGpA7P3yUTYKIAZVCHbGUj8YF6iECpbosE1VHVoogqfmnu2zn33OMFjVn c2feyeFDaz/NrVd5RGZaA7hhqFr/dsO+/tgyH88qjElo5XAyQ48yM147GvrX0jpM1813 KjDg== 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 :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=FVcGRHhHPXNqIBrt0tENJPJnqyotat/A1hbaXL4BS2U=; b=BmeWtOW1IA9Uq1+/9CqKj9Thic0R2+SwBpz1Vd9l7G5dNEnbEqFZlGFpvBeYUa/Lzh VQfchA39tRQx+z/G4LXfQZe6RZxvzPhfaVwHT57VFHkMX3FAxks4cjoo7t5BdFKtfxUf h7zIykH1aCZbMBzR0ApFFdMGBazVWASdkSMuMyZsAWa2/3opb5hAF8ZOhVxjzfWeAomp UaDLTSGRZUho38S7rCp9eBzQGL1OAAGtCwwtxSrXCxxf9Fiy0AgFwoX0deOm76VpyAXw dfqSKvcifkRqM6873DG71G8qy7A9KuiyzfbspLISq3n2ceUIpY/79JA0fjFi2RyLKn1d XKTQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=ihGseaPb; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a170902bf4800b001a1b454e535si4149981pls.257.2023.04.07.10.39.15; Fri, 07 Apr 2023 10:39:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=ihGseaPb; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230101AbjDGRio (ORCPT + 99 others); Fri, 7 Apr 2023 13:38:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbjDGRif (ORCPT ); Fri, 7 Apr 2023 13:38:35 -0400 Received: from BN6PR00CU002.outbound.protection.outlook.com (mail-eastus2azon11021027.outbound.protection.outlook.com [52.101.57.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4600B755; Fri, 7 Apr 2023 10:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GSYoa69jLx1qPLLcM+4LEofTMHIYG0/cqXDNEe2N2yEEJLpSuFJ8BYUFuwzl8p8vPEM2OYOyKlCG3Z9NFbesEbUz54dmD8geOBX2S6imdKD2F4pOpEZOQjvVqOgZ5+xeqSGn4L4+vyDb5WqTlQeYvvZR1IU1Kp7VnYAEheAdNycIDEuUPCDfoFByFjMDt+B2H/KmryO6QrXowkmwcpEVqU760BaEacBJ8HzwY5WhPQ65I6+HEqtG3hzgWcyz/pjtKACEqRVqbkgBuIBO5GEWWiEb+SvW8sP4Mik5K+6ePf7sJB8mYt6HKtnurb8QN4yVJzeE2Nd8FT0IuqvMuqHiVw== 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=FVcGRHhHPXNqIBrt0tENJPJnqyotat/A1hbaXL4BS2U=; b=RPvxdTn8rL66iqu0Omnz9wrWnl6uY5s2gofpsDSaalDIqbQMUKuGLnQrCY+VWZDp04GbZj8vbScLZB86eOo9Q5cWkKEiAkiT3Zd3KeOG8Hkr/Y/t9jsjN+zt8mrN1V+Ro6w9loiuOyJQyWAOSI1nFoHqpbr1HL0V08qRsbYW60t+c4966zdmCiWelbXo4VwJNKoMuuVIm941gXfATRsVecTj0hCqnuAF9Kd2OxgxJ5LZYWhTP7Htrw6C5Q8gsenMkYZTzDMRlBuu/Idhq/7zqZyIGRiDy011zfsW40CZKoh8NMzmYnxuQfh935821DYABK/67ulay0d+roGhtLK/9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FVcGRHhHPXNqIBrt0tENJPJnqyotat/A1hbaXL4BS2U=; b=ihGseaPbfl9d9HbYNKGrSdTR/XIIojyR3rTFdoRaa0vajBROLe5Wk5g8FgVSQAC7kvakpQselyU38PJP+SaBKSFCgwL4WKbl5OEXb7XWHvM32UeUlHLIh8inIaMf2GXfmSKQZCqkoTpPyIGuHiQ+8QEwacTBzMq8mWjofX6OPRk= Received: from BYAPR21MB1688.namprd21.prod.outlook.com (2603:10b6:a02:bf::26) by MW4PR21MB1954.namprd21.prod.outlook.com (2603:10b6:303:7d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.17; Fri, 7 Apr 2023 17:38:30 +0000 Received: from BYAPR21MB1688.namprd21.prod.outlook.com ([fe80::acd0:6aec:7be2:719c]) by BYAPR21MB1688.namprd21.prod.outlook.com ([fe80::acd0:6aec:7be2:719c%7]) with mapi id 15.20.6298.018; Fri, 7 Apr 2023 17:38:30 +0000 From: "Michael Kelley (LINUX)" To: Wei Liu , Saurabh Sengar CC: "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , KY Srinivasan , Haiyang Zhang , Dexuan Cui , "arnd@arndb.de" , Tianyu Lan , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-arch@vger.kernel.org" , "jgross@suse.com" , "mat.jonczyk@o2.pl" Subject: RE: [PATCH v4 1/5] x86/init: Make get/set_rtc_noop() public Thread-Topic: [PATCH v4 1/5] x86/init: Make get/set_rtc_noop() public Thread-Index: AQHZZtQCvsFUj0Ann0ijc8Vm4YMcaK8gHlWAgAAB3+A= Date: Fri, 7 Apr 2023 17:38:30 +0000 Message-ID: References: <1680598864-16981-1-git-send-email-ssengar@linux.microsoft.com> <1680598864-16981-2-git-send-email-ssengar@linux.microsoft.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=fe7fdba0-018f-45a7-af15-0a75bbebe156;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-04-07T17:32:30Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR21MB1688:EE_|MW4PR21MB1954:EE_ x-ms-office365-filtering-correlation-id: 7db32635-b163-417f-f152-08db378ee71d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wqE6/NixICHbEs6dJX9vr9kNY6DtLzM09GYMLBvualmUcQIa0RJLZBueRMONT3RSnInX3sB845FVzYB9EfYemuf7tvCt8D52pmheC7AfZRUuctv2Ztn7HLXttn1yQ+RQkzKsZqsy4YZCH+FSwwwR6AC6kS+v1dHAHovQ0cOQHhUG5EaBSAUaehm3R8wK5ghUR/J7/TcuDlJ2QUkNuS8rZfi4sumFMKtyOIozmfOfb3vqcm3ra1Rjvhb2jATY8mYz05lfl/bxRYTG2010opJYBU6C0R76jyqu1mdtRB0I+iiN28dXGO7q2Zk+GiFF0wqZR/ZrunjR8Obka5/u58MqRUQnZXvIFceTkoE5XPrAIfq/fMPuQfx/nK0Gb8m2f4zPl8tDZj/Ui4EkMIf2hamTTuuV6dVE7/SUQHycXYsPsCygxa8tWNQ8smocnbSWhH2uKxt0ytAWEpKuiDQFJ5lCTBAucC6XwuwcfvB6E/YgQ2BHbNkMEB4j0CFGqa894h/S4UzH+an4VEjRD21EazxbbrJ4FdCt0WKyGIK17nhO3Wvz7cUxo28SnI40Bq3pObFzl4HYssBo7rhCTRB5hQwwKpc3QpKqzMiljmmZvg6UcAaqTfUrHj/lHEcTT6YVsn7NraId9ko9J/wFRFbX+CsgZIt0oabK2T/UkXh3u8efN3w= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:cs;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR21MB1688.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(376002)(366004)(346002)(39860400002)(451199021)(786003)(10290500003)(478600001)(316002)(110136005)(54906003)(55016003)(76116006)(8990500004)(66556008)(8676002)(41300700001)(64756008)(66446008)(66476007)(4326008)(7416002)(71200400001)(38070700005)(86362001)(52536014)(33656002)(8936002)(5660300002)(2906002)(66946007)(7696005)(186003)(82960400001)(82950400001)(83380400001)(38100700002)(122000001)(26005)(6506007)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6nkqmYeIxbX3dhU9Lg1I5YzZuB96kPnTwQAl5RwMyKzgcW50Btt3hnabRYrT?= =?us-ascii?Q?xUYYsqXMcNHIoxa4IpNI/dxWM9uRhk1qL0K/4sifrKPDwAHEbrUoAvvZP6PK?= =?us-ascii?Q?DPXocTpBLnWyA+10OMhwd7+WZx7gxNcjugouZhDn0tQAGcHwXBJS5SghSguT?= =?us-ascii?Q?OB7A4I+mWAL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mzrdspuIjzB?= =?us-ascii?Q?Q1f7KyJ9sfKPbGlohMYXTGGG2HxoN9gWrIbWgDaqNbTr/2GD1Mu5HQwQ2B0S?= =?us-ascii?Q?kTxGhuPc0M3aTEPMHx75lxYnajV00u9n3phJi+pIXaBXTiyCw+9QOYclZTMM?= =?us-ascii?Q?cFqJpLTjptoVnQRXaem+CYZd+8jAGdr1K/6ogimOmBlTvlQmTJsqi5WBHsOJ?= =?us-ascii?Q?cjScazSPRAqJHithQPj0cRoSuwFym2I38LKVaWNX8BPo3tyaYZHnS096W9Lq?= =?us-ascii?Q?bNDIlZka7dvW26PDbI3EKlITzcBdnLckj7bEiFuXqTwpaOko+pK0JS9zQSLI?= =?us-ascii?Q?375vUbaOxFpjDQ6ibxfTJOVQA6Zav3EuOzs5C+b/Lp/vE1FK/Z97PF1DOzOd?= =?us-ascii?Q?8xlPUjMORRmTtK2PwusT38KlepghUtK2z+MM+fKbtAOxxXkcGeX7gR85ZDDI?= =?us-ascii?Q?wMIzz/hrI2cvWAXsihAl1GlKRwc6vFoGJugTomX9f4owUs7d3UmLvNFu3qXj?= =?us-ascii?Q?JohmW9/SqxZjn9ODYXP3oyJ46OC4FIdlJd01ODb6vEuFf4wtJ83tLun8YUsG?= =?us-ascii?Q?XQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR21MB1688.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7db32635-b163-417f-f152-08db378ee71d X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2023 17:38:30.5310 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FIdSQBt98eUKJ1Elk/ZVJqOR1RcsLXS5zPavL8cI++Or/Jr9Jo7IK81N/eRAXRYRCbJEn5SskvzSG+pxiUhHBWv238hFtkyG2Gqupzi4Dt0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR21MB1954 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Liu Sent: Friday, April 7, 2023 10:26 AM >=20 > On Tue, Apr 04, 2023 at 02:01:00AM -0700, Saurabh Sengar wrote: > > Make get/set_rtc_noop() to be public so that they can be used > > in other modules as well. > > > > Co-developed-by: Tianyu Lan > > Signed-off-by: Tianyu Lan > > Signed-off-by: Saurabh Sengar > > Reviewed-by: Wei Liu > > Reviewed-by: Michael Kelley > > --- > > arch/x86/include/asm/x86_init.h | 2 ++ > > arch/x86/kernel/x86_init.c | 4 ++-- > > 2 files changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86= _init.h > > index acc20ae4079d..88085f369ff6 100644 > > --- a/arch/x86/include/asm/x86_init.h > > +++ b/arch/x86/include/asm/x86_init.h > > @@ -330,5 +330,7 @@ extern void x86_init_uint_noop(unsigned int unused)= ; > > extern bool bool_x86_init_noop(void); > > extern void x86_op_int_noop(int cpu); > > extern bool x86_pnpbios_disabled(void); > > +extern int set_rtc_noop(const struct timespec64 *now); > > +extern void get_rtc_noop(struct timespec64 *now); > > > > #endif > > diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c > > index 95be3831df73..d82f4fa2f1bf 100644 > > --- a/arch/x86/kernel/x86_init.c > > +++ b/arch/x86/kernel/x86_init.c > > @@ -33,8 +33,8 @@ static int __init iommu_init_noop(void) { return 0; } > > static void iommu_shutdown_noop(void) { } > > bool __init bool_x86_init_noop(void) { return false; } > > void x86_op_int_noop(int cpu) { } > > -static __init int set_rtc_noop(const struct timespec64 *now) { return = -EINVAL; } > > -static __init void get_rtc_noop(struct timespec64 *now) { } > > +int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; } > > +void get_rtc_noop(struct timespec64 *now) { } >=20 > I just had a second thought on this -- do you really need to drop the > __init annotation for these two functions? >=20 > Thanks, > Wei. I think "yes". In Patch 5 of the series, these are plugged into x86_platform.get_wallclock() and set_wallclock(). The x86_platform.get_wallclock() function can be called by read_persistent_clock64(), which is not a __init function and that may be called during resume from hibernation. x86_platform.set_wallclock() is also called by a non __init function update_persistent_clock64(), which is called by sync_hw_clock(). Michael >=20 > > > > static __initconst const struct of_device_id of_cmos_match[] =3D { > > { .compatible =3D "motorola,mc146818" }, > > -- > > 2.34.1 > >