[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] x86/time: switch platform timer hooks to altcall


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 24 Feb 2022 15:41:57 +0100
  • 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
  • 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=Q2B+OsETm8MxC47cmWXt2pUmYY+TrnfqvkDqckVSlsk=; b=FKViJIhQ83uL4UXegLbwyfeSdX2aEExG/7WU6Bc6ta+XgJD/ZPyvSmrhT6l6mWv+Vk5RefPpkY+YODoak3F47N7REqjeF73bsFHZd7fFzAHhR71yehCB9KjgYS9kPmylWCTf8/wTTNCEjq3gaGVzQBQT5CMFPlvrE+KHZdRHV5LDVW0daJzJsD811w6+CH7dM1RnhZQTZhcYijy2nSvHWoUp8h9kJ5w3kh9FMBIS+XqlpXgnrZ6OHukPgbQmdhMuyHM7FYDJdl1Wu26PBOcJZK/LqBKGQWoKbdezucgsZ09qx6Ib45dGDE4e9p47hHILPLYvNBNXvupl2yJtOQx7uA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ph0vZoWiFGZl3hDfI+X0in0CkzlLjUJj7hrLjizb+8+SOc0NvpiguXBSfmBPXj0Vuv7b/yNT2GrBnHLxVmtkVMjOptlNm6rIk3bTZtIW28IECT95/cGr6z+pcN3s3qXF6Emcrkas3yc6iBw7Rdd3G2+T6Ze4Ni6hF48De7kHL2mudevL7dCPyTngPGUllVlAvDzJpyvVpRyaJVpWF4JYPcgGHse5oUae4kBGX3WjZTXDHdxqe1l8zt7pet2NIpt+yPj7cfD1ovb7lyKvD5BQqEFewl/HKUWthxAj5e5HR/fh6cAcKQWasQ1gw8Nu7ERodGSWlkKqpJyxz3dskEEaKQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 24 Feb 2022 14:42:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.02.2022 15:09, Roger Pau Monné wrote:
> On Thu, Jan 13, 2022 at 02:17:18PM +0100, Jan Beulich wrote:
>> Except in the "clocksource=tsc" case we can replace the indirect calls
>> involved in accessing the platform timers by direct ones, as they get
>> established once and never changed. To also cover the "tsc" case, invoke
>> what read_tsc() resolves to directly. In turn read_tsc() then becomes
>> unreachable and hence can move to .init.*.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

>> ---
>> TBD: Instead of adding __init to read_tsc() we could also ditch the
>>      function altogether, using a dedicated (non-canonical) pointer
>>      constant instead for the .read_counter initializer and the two
>>      comparisons done on plt_src.read_counter.
> 
> I was going to suggest adding an ASSERT_UNREACHABLE, but not sure it
> makes much sense if the function is init only.
> 
> I would be fine with using a non-canonical pointer.

I guess I'll put in the patch as is and do the conversion in a follow-up
change adding __initconst_cf_clobber (once it's clear what to do about
structures which are written to).

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.