From nobody Tue Oct 15 15:22:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1707139673; cv=none; d=zohomail.com; s=zohoarc; b=awf5xymPDqAlJO7WJbXLZXWR7UpDom5D2y30teAty7AyrwxW4t/OFn7rQ2xtB3RShYSNzHge1lCrtZoP/7RwzCPU/+lJjNciHy2PeUUVNzyxZTRMIcyalaYyUgDjN8XJWr0Fb0X5rdGIM1ShmNsR+PdMFhDVXmkzkrHCcl+XaLo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707139673; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ozjB5J6HgFQRbYi1xrcNJWW3dzIQpHOtBsFN5IPmgeU=; b=mMYG/CcpsigkJqS15+GlNDW8ByCWHaty3kMEit0d+905EdktHyM8t7R+MtuETikLyLiulLFY4vJazFYHlV2gegITzSW+en8bmMb5bBvLUuT4iTksOrdGL0fv5fUnSWzyN//ZJ4jdYotKT5vnbgOLz+w4D0KSg+RwxVlwH7GgxcM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 17071396738239.175389701633776; Mon, 5 Feb 2024 05:27:53 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.676035.1051793 (Exim 4.92) (envelope-from ) id 1rWz0a-0001xw-9e; Mon, 05 Feb 2024 13:27:36 +0000 Received: by outflank-mailman (output) from mailman id 676035.1051793; Mon, 05 Feb 2024 13:27:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz0a-0001xp-6U; Mon, 05 Feb 2024 13:27:36 +0000 Received: by outflank-mailman (input) for mailman id 676035; Mon, 05 Feb 2024 13:27:34 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz0Y-0001wW-CR for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 13:27:34 +0000 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [2a00:1450:4864:20::332]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 517f0cfd-c42a-11ee-8a45-1f161083a0e0; Mon, 05 Feb 2024 14:27:33 +0100 (CET) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40efcb37373so40352735e9.2 for ; Mon, 05 Feb 2024 05:27:33 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id n10-20020a5d67ca000000b0033b3cf1ff09sm2278382wrw.29.2024.02.05.05.27.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:27:32 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 517f0cfd-c42a-11ee-8a45-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707139652; x=1707744452; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=ozjB5J6HgFQRbYi1xrcNJWW3dzIQpHOtBsFN5IPmgeU=; b=N75r1lEm7ZV9bxdme4uvOMyOHqMFOzF7yv2Tgdrszlyi/i5foX1lCjC/f3Au3suE81 0092pC5hJqJm500JFPWSOb9aO3Q9BUVSArWmXKyzrgkmJIpt+BwLUoSpEHOZ1p2tAMH/ jfTTRAb7HdnPG7qT8NuDsynUgR34iNKY7TbzlgLTPy9bX1DwxAl+S4KU9WUK/Oi0908f 1rl6cone2cyWgvLIrSw/Rq+0MHAQySZmVu6F7jjGl+aTYLTgOG4Yz2zWjbcusiB/GBtB Lp5ywGM+AKPR/HDbr3Sbaa0mHxYyQP7Q8zhuyAV+o5gvksHTdBKydCk/62f9c2gSrzOw JObQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707139652; x=1707744452; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ozjB5J6HgFQRbYi1xrcNJWW3dzIQpHOtBsFN5IPmgeU=; b=omVhkbYJRBt5CiVuwoX0P8eUKOxQ4aAhKkAQYP4PI+qvXtABuL5QTnP1neXeJliYqd HrzDwjUEkTzRT+3gHAUZZXoodOkRmimzQRfgcb7Ip460OriioHmwCk28UqfP6ZrNDPv5 a6kgAueE5D1s/oumIAeyIULIDMUbV5kyTxgi2AbRSs4z/OuUamJLwrDlWusR3dUrj+SG RBBQ63rVmxtukxlnoXyWHLZMp3/W9oGIpeGXiTdOKHpc2mfls8qPH6tvgFZCKmzmEO6n L71TUdO5UwXUGGrIy8DN0hC3R6TgbTNIly8QKuvQpXfKLq5m9DpTzoIA5L9AXyqiod44 VAOw== X-Gm-Message-State: AOJu0YwKKh3z7hi9Pxcyjew9aJwx//e6qctGQD2IJfCJSfDQlP6Eoqd6 IRSJc6EuzcZni2qNCzugWt5JoCEN7x95VCjmxp/5EswpWMxnPZvuHZjomBhliUrNtb+Q0Qp3kAM = X-Google-Smtp-Source: AGHT+IGc3yD9tlPmWCc3rLBakfLjqIRUvsu9Jtp9Vlhp7n5P7rswL2RvRIzw6bwThJ4Qnw9t60xh9w== X-Received: by 2002:adf:fccf:0:b0:33b:1bf4:de87 with SMTP id f15-20020adffccf000000b0033b1bf4de87mr6880273wrs.24.1707139652555; Mon, 05 Feb 2024 05:27:32 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWN/NZWe1fmN3Ql8B3HxMKepciFXQzWxSSKE0lF+fPsQqQGpFYQvehBVCvgG1cYu8iiDVvdRU6jC2HNAOMkMIL0I9j93NgMDarT8SBQIGFODpqRguKxjpMuEkhw1E/RAv1wT9iSG/tNGPj+T5Rs7xTtpEj7fQvh07ft0TkoLLiebm4kxcDKtVX41UpMYTR77p4xrBi8Wp5gW//wYsXO Message-ID: <893be03d-22cc-4b8c-8a54-6479961c5aa2@suse.com> Date: Mon, 5 Feb 2024 14:27:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 1/8] serial: fake IRQ-regs context in poll handlers From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu , Marek Marczykowski References: Content-Language: en-US Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1707139674522100001 Content-Type: text/plain; charset="utf-8" In preparation of dropping the register parameters from serial_[rt]x_interrupt() and in turn from IRQ handler functions, register state needs making available another way for the few key handlers which need it. Fake IRQ-like state. Signed-off-by: Jan Beulich --- The use of guest_cpu_user_regs() in dbc_uart_poll() is inconsistent with other console poll functions we have, and it's unclear whether that's actually generally correct. Andrew suggested to move set_irq_regs() to BUGFRAME_run_fn handling; it's not clear to me whether that would be (a) correct from an abstract pov (that's exception, not interrupt context after all) and (b) really beneficial. --- v2: New. --- a/xen/drivers/char/ehci-dbgp.c +++ b/xen/drivers/char/ehci-dbgp.c @@ -1253,6 +1253,7 @@ static void cf_check _ehci_dbgp_poll(str unsigned long flags; unsigned int timeout =3D MICROSECS(DBGP_CHECK_INTERVAL); bool empty =3D false; + struct cpu_user_regs *old_regs; =20 if ( !dbgp->ehci_debug ) return; @@ -1268,12 +1269,17 @@ static void cf_check _ehci_dbgp_poll(str spin_unlock_irqrestore(&port->tx_lock, flags); } =20 + /* Mimic interrupt context. */ + old_regs =3D set_irq_regs(regs); + if ( dbgp->in.chunk ) serial_rx_interrupt(port, regs); =20 if ( empty ) serial_tx_interrupt(port, regs); =20 + set_irq_regs(old_regs); + if ( spin_trylock_irqsave(&port->tx_lock, flags) ) { if ( dbgp->state =3D=3D dbgp_idle && !dbgp->in.chunk && --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -211,10 +211,14 @@ static void cf_check __ns16550_poll(stru { struct serial_port *port =3D this_cpu(poll_port); struct ns16550 *uart =3D port->uart; + struct cpu_user_regs *old_regs; =20 if ( uart->intr_works ) return; /* Interrupts work - no more polling */ =20 + /* Mimic interrupt context. */ + old_regs =3D set_irq_regs(regs); + while ( ns_read_reg(uart, UART_LSR) & UART_LSR_DR ) { if ( ns16550_ioport_invalid(uart) ) @@ -227,6 +231,7 @@ static void cf_check __ns16550_poll(stru serial_tx_interrupt(port, regs); =20 out: + set_irq_regs(old_regs); set_timer(&uart->timer, NOW() + MILLISECS(uart->timeout_ms)); } =20 --- a/xen/drivers/char/xhci-dbc.c +++ b/xen/drivers/char/xhci-dbc.c @@ -1164,6 +1164,7 @@ static void cf_check dbc_uart_poll(void struct dbc_uart *uart =3D port->uart; struct dbc *dbc =3D &uart->dbc; unsigned long flags =3D 0; + struct cpu_user_regs *old_regs; =20 if ( spin_trylock_irqsave(&port->tx_lock, flags) ) { @@ -1175,10 +1176,15 @@ static void cf_check dbc_uart_poll(void spin_unlock_irqrestore(&port->tx_lock, flags); } =20 + /* Mimic interrupt context. */ + old_regs =3D set_irq_regs(guest_cpu_user_regs()); + while ( dbc_work_ring_size(&dbc->dbc_iwork) ) serial_rx_interrupt(port, guest_cpu_user_regs()); =20 serial_tx_interrupt(port, guest_cpu_user_regs()); + + set_irq_regs(old_regs); set_timer(&uart->timer, NOW() + MICROSECS(DBC_POLL_INTERVAL)); } From nobody Tue Oct 15 15:22:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1707139706; cv=none; d=zohomail.com; s=zohoarc; b=bWMayfRsISuMuNJfpY8kCmaOphL7aPKQzfJN3YlKdXHPEGLA+9oRaWPmyGZByZN47VzoeHzo4oRQ2SxMZ95hIGV7QibiYHFqTcxh80uMoZmGqusN4ZTQX7dt1czounnSF8wKMVghpcX4i1wjVHItY7J/4OLAgzjOyISemIapTVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707139706; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ydAWDx9h9IVXFzTidsD6Z1TLZe7e5dY/H1Vr9S9PwiE=; b=GGNuK7dLh69qr7MScBAPkcB6xMCrvhu7Gncdi7SkNHsxq6/BxpnjwG/9qbcqz96e4LHqkgyumuHYVpR8laKu+Tg0suWjHbQHrHzzsAx3UplEwEFbcUNCRNjrKHb+MSGp7NITkJ+0FT5esufghx22Ae+LP64kzwQSUmVskSXwINY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707139706702825.5287951983821; Mon, 5 Feb 2024 05:28:26 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.676037.1051803 (Exim 4.92) (envelope-from ) id 1rWz1D-0002l4-Hb; Mon, 05 Feb 2024 13:28:15 +0000 Received: by outflank-mailman (output) from mailman id 676037.1051803; Mon, 05 Feb 2024 13:28:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz1D-0002kx-Ed; Mon, 05 Feb 2024 13:28:15 +0000 Received: by outflank-mailman (input) for mailman id 676037; Mon, 05 Feb 2024 13:28:14 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz1C-0001wW-Dd for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 13:28:14 +0000 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [2a00:1450:4864:20::433]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 696dd4f7-c42a-11ee-8a45-1f161083a0e0; Mon, 05 Feb 2024 14:28:13 +0100 (CET) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3394ca0c874so3065680f8f.2 for ; Mon, 05 Feb 2024 05:28:13 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id n10-20020a5d67ca000000b0033b3cf1ff09sm2278382wrw.29.2024.02.05.05.28.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:28:12 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 696dd4f7-c42a-11ee-8a45-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707139693; x=1707744493; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=ydAWDx9h9IVXFzTidsD6Z1TLZe7e5dY/H1Vr9S9PwiE=; b=M85Rma8KDEK2bz8CMRFn/wGvt6wJ7J2+5qMwGf5DD1VXe/thRwDw6T2ExVmEWsV29y /CePWXA8xEBj77p67SOY9AvGefJh+qJgMwQSn+nVHRX0d8jkURFQmRrmcV7G2d2t5eDB LQ8Hym1Xk3EcgfIyMje12GvhpZdivZ7v9O4dIneSoZqk7sXN7pxAJiCbTF76vA9THLnd qyHnBVKwRrNjaxtk8XZkLjwf6HRJyAfd7iNz0zAFxHQrPP/oHoHF6H89vFVwOAh0MAPK 5PJ8o3u6rLjX6fY1b5xuA3v3BiUp5gXtn4sYaHbugQKaPBIU+k8zx2G7SiuVlU7OrOhz Z7Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707139693; x=1707744493; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ydAWDx9h9IVXFzTidsD6Z1TLZe7e5dY/H1Vr9S9PwiE=; b=Bwo09h8G6bpHZN6lIOTeMqFblWjgd2qXsLl57Ute1Cxo7oPmQIuUbo9+27/0VE8ERe IToFXXVuFETD4AoksIU650I+iJp6W0K1NDPGlFVc+ywtOrlDSW3+n9oEhL2W4kKq9JyB ZFQzdaRStD2FN8qHAaw+uOCqAF8lXXlKA8yc9mUKpTM0Bx4uhJvK5lW9HTYL8CD8bCJX h8g5h2BjZI+eV4PrNAXRZcgx54dA7qOGIgVIGo3XDsSX7lE2aVXvZiRGoYXBUEbWVPiU RCHfrWzsWoUl6Muy/3p7NO3eDdhgT6amfFRcuQUTc+j/k7Vc9VZ2PRub+4T0tT6IFEG6 wUrw== X-Gm-Message-State: AOJu0Yze5PhHjapHwMAEQQmHHXrzfXqmqJaw2+NgQ3P0kexxCTU9x+/p Aj+/1qKpq6o48Prqhms3uLKP/76qQi/Aav3m/ADaWRcb6syTgoWL0hwC5vO0CwzLo4VLLgejzmw = X-Google-Smtp-Source: AGHT+IG9O74TbbFhs8wDKqrVpx4p5dH0NkSqdkZDU59Z6j8Sq5nvwWXjpfokpf2TTmtpmiWYKrMfrw== X-Received: by 2002:a05:6000:156b:b0:33b:4164:5fbe with SMTP id 11-20020a056000156b00b0033b41645fbemr1659186wrz.20.1707139692820; Mon, 05 Feb 2024 05:28:12 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUZWkTBBEG2t7OzrySSCvjbFwDbr1QH0r1fZRnhkzOu/ApKX7CMgkT6xIEayL91ZcWyMJYO0X5Os1eviVGmpjpr5+IawEty+KY0EZ26glJRyS8BVr/KZEWyN89RNnMyrn1Uu2uYhYM/y/N9rwwjN5jMnAd+jKwlLvM/sWJq Message-ID: <5258d8a9-a7ef-4342-9b5c-fc0078139bb2@suse.com> Date: Mon, 5 Feb 2024 14:28:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 2/8] keyhandler: drop regs parameter from handle_keyregs() Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1707139708638100001 Content-Type: text/plain; charset="utf-8" In preparation for further removal of regs parameters, drop it here. In the two places where it's actually needed, retrieve IRQ context if available, or else guest context. Suggested-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Julien Grall --- As an alternative to the new boolean parameter, I wonder if we couldn't special-case the idle vCPU case: It's only there where we would not have proper context retrievable via guest_cpu_user_regs(). --- v3: Re-base. v2: New. --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -73,12 +73,12 @@ static struct keyhandler { =20 static void cf_check keypress_action(void *unused) { - handle_keypress(keypress_key, NULL); + handle_keypress(keypress_key, true); } =20 static DECLARE_TASKLET(keypress_tasklet, keypress_action, NULL); =20 -void handle_keypress(unsigned char key, struct cpu_user_regs *regs) +void handle_keypress(unsigned char key, bool need_context) { struct keyhandler *h; =20 @@ -88,7 +88,7 @@ void handle_keypress(unsigned char key, if ( !in_irq() || h->irq_callback ) { console_start_log_everything(); - h->irq_callback ? h->irq_fn(key, regs) : h->fn(key); + h->irq_callback ? h->irq_fn(key, need_context) : h->fn(key); console_end_log_everything(); } else @@ -169,7 +169,7 @@ void cf_check dump_execstate(struct cpu_ } =20 static void cf_check dump_registers( - unsigned char key, struct cpu_user_regs *regs) + unsigned char key, bool need_context) { unsigned int cpu; =20 @@ -182,8 +182,8 @@ static void cf_check dump_registers( cpumask_copy(&dump_execstate_mask, &cpu_online_map); =20 /* Get local execution state out immediately, in case we get stuck. */ - if ( regs ) - dump_execstate(regs); + if ( !need_context ) + dump_execstate(get_irq_regs() ?: guest_cpu_user_regs()); else run_in_exception_handler(dump_execstate); =20 @@ -245,8 +245,7 @@ static void cf_check dump_hwdom_register } } =20 -static void cf_check reboot_machine( - unsigned char key, struct cpu_user_regs *regs) +static void cf_check reboot_machine(unsigned char key, bool unused) { printk("'%c' pressed -> rebooting machine\n", key); machine_restart(0); @@ -474,8 +473,7 @@ static void cf_check run_all_nonirq_keyh static DECLARE_TASKLET(run_all_keyhandlers_tasklet, run_all_nonirq_keyhandlers, NULL); =20 -static void cf_check run_all_keyhandlers( - unsigned char key, struct cpu_user_regs *regs) +static void cf_check run_all_keyhandlers(unsigned char key, bool need_cont= ext) { struct keyhandler *h; unsigned int k; @@ -491,7 +489,7 @@ static void cf_check run_all_keyhandlers if ( !h->irq_fn || !h->diagnostic || !h->irq_callback ) continue; printk("[%c: %s]\n", k, h->desc); - h->irq_fn(k, regs); + h->irq_fn(k, need_context); } =20 watchdog_enable(); @@ -500,8 +498,7 @@ static void cf_check run_all_keyhandlers tasklet_schedule(&run_all_keyhandlers_tasklet); } =20 -static void cf_check do_toggle_alt_key( - unsigned char key, struct cpu_user_regs *regs) +static void cf_check do_toggle_alt_key(unsigned char key, bool unused) { alt_key_handling =3D !alt_key_handling; printk("'%c' pressed -> using %s key handling\n", key, @@ -566,7 +563,7 @@ void keyhandler_crash_action(enum crash_ if ( *action =3D=3D '+' ) mdelay(10); else - handle_keypress(*action, NULL); + handle_keypress(*action, true); action++; } } --- a/xen/common/sysctl.c +++ b/xen/common/sysctl.c @@ -134,7 +134,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xe { if ( copy_from_guest_offset(&c, op->u.debug_keys.keys, i, 1) ) goto out; - handle_keypress(c, guest_cpu_user_regs()); + handle_keypress(c, false); } ret =3D 0; copyback =3D 0; --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -279,7 +279,7 @@ static int *__read_mostly upper_thresh_a static int *__read_mostly lower_thresh_adj =3D &xenlog_lower_thresh; static const char *__read_mostly thresh_adj =3D "standard"; =20 -static void cf_check do_toggle_guest(unsigned char key, struct cpu_user_re= gs *regs) +static void cf_check do_toggle_guest(unsigned char key, bool unused) { if ( upper_thresh_adj =3D=3D &xenlog_upper_thresh ) { @@ -306,13 +306,13 @@ static void do_adj_thresh(unsigned char loglvl_str(*upper_thresh_adj)); } =20 -static void cf_check do_inc_thresh(unsigned char key, struct cpu_user_regs= *regs) +static void cf_check do_inc_thresh(unsigned char key, bool unused) { ++*lower_thresh_adj; do_adj_thresh(key); } =20 -static void cf_check do_dec_thresh(unsigned char key, struct cpu_user_regs= *regs) +static void cf_check do_dec_thresh(unsigned char key, bool unused) { if ( *lower_thresh_adj ) --*lower_thresh_adj; @@ -531,7 +531,7 @@ static void __serial_rx(char c, struct c switch ( console_rx ) { case 0: - return handle_keypress(c, regs); + return handle_keypress(c, false); =20 case 1: /* --- a/xen/include/xen/keyhandler.h +++ b/xen/include/xen/keyhandler.h @@ -24,9 +24,8 @@ typedef void (keyhandler_fn_t)(unsigned * * Called in hardirq context with interrupts disabled. */ -struct cpu_user_regs; typedef void (irq_keyhandler_fn_t)(unsigned char key, - struct cpu_user_regs *regs); + bool need_context); =20 /* Initialize keytable with default handlers. */ void initialize_keytable(void); @@ -46,7 +45,7 @@ void register_irq_keyhandler(unsigned ch bool diagnostic); =20 /* Inject a keypress into the key-handling subsystem. */ -extern void handle_keypress(unsigned char key, struct cpu_user_regs *regs); +extern void handle_keypress(unsigned char key, bool need_context); =20 enum crash_reason { CRASHREASON_PANIC, From nobody Tue Oct 15 15:22:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1707139741; cv=none; d=zohomail.com; s=zohoarc; b=GPwe4847Img8h1ZbV2ItxDnlldDogTuvFTN168lMJ0KLIgk88wR0LtXzR3+wXr0OlQkMDn63gqHyy0Tk05f7cbO8ZnLiIGtVhNmw6fnqvcNCTQ82ky6JWbPNg+VtDtUGXZG7XbAxrECQvmiehVIBPihLN7ClYrXIQ4MGri9wz28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707139741; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=psVWVy2hduK7Z6lfch3dygRM4LRvywrY0uUoZLjxYv8=; b=cFdRAucBz82ox9UB8D04KFaqx12QOvyGudumeLw0+4Pq5s8RwWwPPOB+dfPfX9VaQGzMC5XtS2XVFbjJC5pVfGVnlV4h+bTrz35CNqYJkCQZgN/PMuuGQ2O/d+yvIiooYBTunExizBlQ026fVkTwdCbpApWiorQBV6dMfsckuiQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707139741945844.8646871263871; Mon, 5 Feb 2024 05:29:01 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.676040.1051813 (Exim 4.92) (envelope-from ) id 1rWz1j-0003Mm-P5; Mon, 05 Feb 2024 13:28:47 +0000 Received: by outflank-mailman (output) from mailman id 676040.1051813; Mon, 05 Feb 2024 13:28:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz1j-0003Mf-MS; Mon, 05 Feb 2024 13:28:47 +0000 Received: by outflank-mailman (input) for mailman id 676040; Mon, 05 Feb 2024 13:28:46 +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 1rWz1i-0003FY-EJ for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 13:28:46 +0000 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [2a00:1450:4864:20::334]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7c23d31a-c42a-11ee-98f5-efadbce2ee36; Mon, 05 Feb 2024 14:28:44 +0100 (CET) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40ef3f351d2so30817615e9.1 for ; Mon, 05 Feb 2024 05:28:44 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id n10-20020a5d67ca000000b0033b3cf1ff09sm2278382wrw.29.2024.02.05.05.28.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:28:43 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 7c23d31a-c42a-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707139724; x=1707744524; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=psVWVy2hduK7Z6lfch3dygRM4LRvywrY0uUoZLjxYv8=; b=XxsJcSpVeLPdoygIXnZKEQxv3TpI3O4yXTZcxsG7/1DkqBBZmyHUbfnJF0goCAcxyM 1/opdVEh/awrbMjplAAIwgLEfyiuOOcdxqhYn+u7dQcfXpp4WkDWYo7mu/YI0RwdyaVj ANgZCdqhXv4pfRUvjHVpIc0jYugKnXhhOXiqNzv0nI8yBg8Ks3M+7eq4riBG8NpkhtQs BruiQ8KKIthtlpVR1olclttMdPpBpyPiAl45l9H4Dj2bCRlFe+Rxvlv9wK5by+WKfp/h BLgRgKfZkOLGstdxdMmO4Ox5TJrL2NSSwTOXxp8CprQC8gb3g2l8H2EpCITfstB9fdn5 BRjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707139724; x=1707744524; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=psVWVy2hduK7Z6lfch3dygRM4LRvywrY0uUoZLjxYv8=; b=HZ5ujlHHoob2g6BZlc50WsNM9ta/YpOw95JPYOPCqMAqYjyi7kbJPFLjXPa/4titoi O+Pa86BwUsV70BQJSY6xe4YBu6BFl1sBTcxCyF5IQYDFgC268z8blWk5pVlm856gM+QX ue7GmPTMqXcy9XzOlAciYDAmvJMo7zLtERAsSbtneBm77Ha7haCrQAoIs7S27sFAtYBM ntYvAjjK7MjLQwr+KDnaIbLdWW/JG1vNOPmMe38OATAW73/MzClQZuwc1Vm5BwvHbmlJ 8VBUYCmZIy5eCjQmPfEq6EhFkhm1i7uz3MuySNuc8KuR0Tgav1RHAowPfKalFych/ctd q8rg== X-Gm-Message-State: AOJu0YzFpNZgjfQKHogK1A6StPMerRSLYG8z2FFhriDJGONbCMWiy9jk QR01nWFtDh1UHX//tC+DQpzu0RaSRS1my6TMB9jeNrADz+o4x96gwGJ1hvqwmQ97iaSKYUMH9bw = X-Google-Smtp-Source: AGHT+IGadlMeSymDT4u27ECo2thETBDBX07yTDsj5dYtgL1QRTtoKZr2/2EiQhy21ukKeSs0azWEgQ== X-Received: by 2002:adf:f54b:0:b0:33b:1ab8:3736 with SMTP id j11-20020adff54b000000b0033b1ab83736mr3609865wrp.1.1707139724189; Mon, 05 Feb 2024 05:28:44 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWrOAgZ6PvaxGE80/qVy3edix+XQ0UT7axQGqqF0eVHZGh63882Z1eDXnGQhaaag+ud2jBLdzd5hcfwRzDCimBcCGIICuJyylauEK4CzgTWpkSHsnnw7kBv3emdxgMgt3Y/8kY2PbZd1ll47wCEwmyGPgafERC3dxUyBvq9 Message-ID: Date: Mon, 5 Feb 2024 14:28:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 3/8] serial: drop serial_rx_fn's regs parameter Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1707139742898100001 Content-Type: text/plain; charset="utf-8" It's simply not needed anymore. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- v2: Re-base over earlier (new/split) patches. --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -526,7 +526,7 @@ static void switch_serial_input(void) printk("\n"); } =20 -static void __serial_rx(char c, struct cpu_user_regs *regs) +static void __serial_rx(char c) { switch ( console_rx ) { @@ -578,7 +578,7 @@ static void __serial_rx(char c, struct c #endif } =20 -static void cf_check serial_rx(char c, struct cpu_user_regs *regs) +static void cf_check serial_rx(char c) { static int switch_code_count =3D 0; =20 @@ -594,10 +594,10 @@ static void cf_check serial_rx(char c, s } =20 for ( ; switch_code_count !=3D 0; switch_code_count-- ) - __serial_rx(switch_code, regs); + __serial_rx(switch_code); =20 /* Finally process the just-received character. */ - __serial_rx(c, regs); + __serial_rx(c); } =20 static void cf_check notify_dom0_con_ring(void *unused) --- a/xen/drivers/char/serial.c +++ b/xen/drivers/char/serial.c @@ -68,7 +68,7 @@ void serial_rx_interrupt(struct serial_p spin_unlock_irqrestore(&port->rx_lock, flags); =20 if ( fn !=3D NULL ) - (*fn)(c & 0x7f, regs); + fn(c & 0x7f); } =20 void serial_tx_interrupt(struct serial_port *port, struct cpu_user_regs *r= egs) --- a/xen/drivers/char/xen_pv_console.c +++ b/xen/drivers/char/xen_pv_console.c @@ -118,7 +118,7 @@ size_t pv_console_rx(struct cpu_user_reg { c =3D cons_ring->in[MASK_XENCONS_IDX(cons++, cons_ring->in)]; if ( cons_rx_handler ) - cons_rx_handler(c, regs); + cons_rx_handler(c); recv++; } =20 --- a/xen/include/xen/serial.h +++ b/xen/include/xen/serial.h @@ -15,7 +15,7 @@ struct cpu_user_regs; =20 /* Register a character-receive hook on the specified COM port. */ -typedef void (*serial_rx_fn)(char c, struct cpu_user_regs *regs); +typedef void (*serial_rx_fn)(char c); void serial_set_rx_handler(int handle, serial_rx_fn fn); =20 /* Number of characters we buffer for a polling receiver. */ From nobody Tue Oct 15 15:22:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1707139785; cv=none; d=zohomail.com; s=zohoarc; b=Y/doMrj1Jlb3+5Q4+1Umld6iiuynICQLS0d+ez1ehKwN+/WLQry7TYoQjicGXZPUt7J/+IL1f07JtxRfL5021euciJYPXtW+x1EUOn1WExchguxrtmTQ0/BQRPaw2J6Z4mqg9UFkkyRGGsFIJLc8dlp48N8JfnzvMmmbtaMsoNk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707139785; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YO3g36PvHebDUpK9/W9a6xU16xqzRXgrwigdPTnIuIA=; b=CPiaKfsrI/OzXVFRrA4MNL3UhRO0883/DDmXhO2Az57J5PAxFjcBGy1ajD+v71/GG74hD0+iYHnJ2HNczlSe8R5d5dRpy3kzuJqfUGV0FugtK17msUD8qsO1efFIx5pEDeT7HyjsvmU9iIxjir7gJcXA/K+qIW0RgQNE92A9ouY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707139784995516.204117935924; Mon, 5 Feb 2024 05:29:44 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.676043.1051823 (Exim 4.92) (envelope-from ) id 1rWz2R-0003tu-2y; Mon, 05 Feb 2024 13:29:31 +0000 Received: by outflank-mailman (output) from mailman id 676043.1051823; Mon, 05 Feb 2024 13:29:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz2Q-0003tn-VK; Mon, 05 Feb 2024 13:29:30 +0000 Received: by outflank-mailman (input) for mailman id 676043; Mon, 05 Feb 2024 13:29:30 +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 1rWz2Q-0003FY-2H for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 13:29:30 +0000 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [2a00:1450:4864:20::434]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 96289b97-c42a-11ee-98f5-efadbce2ee36; Mon, 05 Feb 2024 14:29:28 +0100 (CET) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3392b12dd21so2444406f8f.0 for ; Mon, 05 Feb 2024 05:29:28 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id n10-20020a5d67ca000000b0033b3cf1ff09sm2278382wrw.29.2024.02.05.05.29.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:29:27 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 96289b97-c42a-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707139768; x=1707744568; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=YO3g36PvHebDUpK9/W9a6xU16xqzRXgrwigdPTnIuIA=; b=g2MbNanWmMBW1mXFwpf9WhmxUvOHR+Wxk305SNGPET7KdNPIXavA6/U0yaK+ixxMyI BO2lVLsZHc6Jr8/hOt2FNVxvzqZg8mO4rtRTm12lfARNqdoC0WGUQiq4t0d8xOaPydnY 7zJbyM9ka2IgghQUeMuEveXsQQa+rkD2vIAITf3ONh0Bm/UAg31ueWdSKEg4gbNPMDnv OjDb4DPnjAdfNJI81zTN0thvU+A7YMiYQGk5wcqdOezfYl3a+R6qSL/ttmngxwPCQjSA E+4mRFYUpAYbRRLlT1jfpBppL30paHojevvLfnRF9sH5y2DQ8rOZtFkpwc4dtUwauGuw N9iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707139768; x=1707744568; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YO3g36PvHebDUpK9/W9a6xU16xqzRXgrwigdPTnIuIA=; b=ZLWEOlnod+3fdGQWAHtbAwQnmJvZR7ugaYl1I7QuqsIlOO1YHe5qHwfvBPjfFB0MmM zKPzrAipg6vT/PQHuWAJOxQk7mZGCR+JziaGJ42itoAY6nasmdkBsOT8qrUTcC8MKnsd czn0BKNmpC4QyR185tria61M0Qv57rHt8btejYLFu7Mx1LZH7I6YRgK6zFtPL8poDYat cSgL0XTV83F4DhPgiyg5F7fx6uMIX4luCgXNAzyqklbrBqYZ01WLlo7s8ZlpDNk/PMGB +nTc4kysZS0rQy9X7rzx+fs4j1Qc4ReN5bZQQwe93hn7nzedJr6q38wUtBDhuX7gYinZ rekw== X-Gm-Message-State: AOJu0Yx8OdFXzF7EcOA8JPtXt5JZtQT7ivS82nV4M7sEe0EFhdSTsTT5 zYiyb5ySJ56eBJxG6okmAhVz8M+XKFZHx7Z7voIOCYw8oy3FjOftESnmZHqQPXRt17LJ5PuYfic = X-Google-Smtp-Source: AGHT+IEh7yjmBHiIGhoxsC8ZOitxgl5YrK3VW6GD8r1s9VL9siV/a5Vfv15NM47eHWMWt7W38eHMcw== X-Received: by 2002:adf:b184:0:b0:33a:e8be:51bd with SMTP id q4-20020adfb184000000b0033ae8be51bdmr5584809wra.51.1707139767744; Mon, 05 Feb 2024 05:29:27 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVm84qLJXYYsjwVfmXrUWyqek0PAuFuHurAmJQnD6G03zBzM1DV9CdKp+QdglcvAAEdXvl4KpbSm/pQgJqRT850IUT/n0tWwcVRmYkA+NjtHs9yoiVVh10RUl84tHg32oQTMEHBHyq82cimKpPvIjaG/vR3PYlvKGR5AGbzGUNlknWZyi74xvgGB+LoECbto2lL+A== Message-ID: <5f76c01f-4cf0-4508-af94-81516b745d37@suse.com> Date: Mon, 5 Feb 2024 14:29:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 4/8] PV-shim: drop pv_console_rx()'s regs parameter Content-Language: en-US From: Jan Beulich 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?= References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1707139786962100001 Content-Type: text/plain; charset="utf-8" It's not needed anymore. This is in preparation of dropping the register parameters from IRQ handler functions. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -181,7 +181,7 @@ static void cf_check xen_evtchn_upcall(s port +=3D l1 * BITS_PER_LONG; =20 if ( pv_console && port =3D=3D pv_console_evtchn() ) - pv_console_rx(regs); + pv_console_rx(); else if ( pv_shim ) pv_shim_inject_evtchn(port); } --- a/xen/drivers/char/xen_pv_console.c +++ b/xen/drivers/char/xen_pv_console.c @@ -94,7 +94,7 @@ evtchn_port_t pv_console_evtchn(void) return cons_evtchn; } =20 -size_t pv_console_rx(struct cpu_user_regs *regs) +size_t pv_console_rx(void) { char c; XENCONS_RING_IDX cons, prod; --- a/xen/include/xen/pv_console.h +++ b/xen/include/xen/pv_console.h @@ -9,7 +9,7 @@ void pv_console_init(void); void pv_console_set_rx_handler(serial_rx_fn fn); void pv_console_init_postirq(void); void pv_console_puts(const char *buf, size_t nr); -size_t pv_console_rx(struct cpu_user_regs *regs); +size_t pv_console_rx(void); evtchn_port_t pv_console_evtchn(void); =20 #else @@ -18,7 +18,7 @@ static inline void pv_console_init(void) static inline void pv_console_set_rx_handler(serial_rx_fn fn) { } static inline void pv_console_init_postirq(void) { } static inline void pv_console_puts(const char *buf, size_t nr) { } -static inline size_t pv_console_rx(struct cpu_user_regs *regs) { return 0;= } +static inline size_t pv_console_rx(void) { return 0; } =20 #endif /* !CONFIG_XEN_GUEST */ #endif /* __XEN_PV_CONSOLE_H__ */ From nobody Tue Oct 15 15:22:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1707139834; cv=none; d=zohomail.com; s=zohoarc; b=mF+8sSLQ4lRNCOfC6PMzLIinOzDPj8W102nX5Pdst2h3ep4hR5F4vR9q6j3B9V/DbTTrtoJKIJlzWHrYuBreOTO3JyKUKjsAdZlx/p6gNpPJ1MnJE/lWE7zTD/T3LwBSRDh+j6KnIiPQft0bfes01qm1VmihuyC2IZ/IbMHngCs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707139834; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0DlbwChHh3lVOiwYmNPTJJLzXFhauBoipOMIM8LYm04=; b=kF5YObHFp6VjzldK9XjvL9CJunMSPLEgSk+cqhwfboqIeNpONSExsDJYyPGsOlUWmIBwvZp5o9BjpMfNBbNnVuyt3Ies3hr9zq5J3wNBEeB99BmpnStiLts+63vnuk87jj5oZPQcH8y44UX+Zz3hXxJydXM09m0gjTfbjoMOzBw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707139834583241.7812131005511; Mon, 5 Feb 2024 05:30:34 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.676047.1051833 (Exim 4.92) (envelope-from ) id 1rWz3C-0005Mc-Eo; Mon, 05 Feb 2024 13:30:18 +0000 Received: by outflank-mailman (output) from mailman id 676047.1051833; Mon, 05 Feb 2024 13:30:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz3C-0005MV-Ah; Mon, 05 Feb 2024 13:30:18 +0000 Received: by outflank-mailman (input) for mailman id 676047; Mon, 05 Feb 2024 13:30:17 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz3B-0004HJ-E0 for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 13:30:17 +0000 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [2a00:1450:4864:20::333]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b2dab967-c42a-11ee-8a45-1f161083a0e0; Mon, 05 Feb 2024 14:30:16 +0100 (CET) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40fd280421aso15725275e9.3 for ; Mon, 05 Feb 2024 05:30:16 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id n10-20020a5d67ca000000b0033b3cf1ff09sm2278382wrw.29.2024.02.05.05.30.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:30:15 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: b2dab967-c42a-11ee-8a45-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707139816; x=1707744616; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=0DlbwChHh3lVOiwYmNPTJJLzXFhauBoipOMIM8LYm04=; b=fFKq0LqqmrSiqo+Cli0FN1OV82rY8UgBbtiETk0CUTgAR/A/2y6iK5ZcekWPfswbLg TWUTiH0KaUCD+r1tDOzYrQmco+Qu8VB1GDlpxVUnZeiw3xvEHLHrdP10py7ppP5vDpQ3 uK6aZ0gqb9sxgq1ondzBcl6HgaJtVcJvxbS3QV92GH07uuVvOVVAJBIWPiJCgMyVRXRP 4vHgND8Yk62tig7OJY66FUSe/b3ZUcaftSKnlICYyS2MaYGgZpz7P4cp6VLL1WbI9tsh d9Daqyg2jp++JjXbfpmdHtuGj5nwnQzutg/ndlqK4p5FhK7WobdPWRX3R4lJzZ81UG92 Xdjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707139816; x=1707744616; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0DlbwChHh3lVOiwYmNPTJJLzXFhauBoipOMIM8LYm04=; b=CUPfr58Q1dDsEWfJVXWK6sKSsHvuQDcQ5jg13Sc9ssFoIK3t4CtqoUPEIqAtluvofu euNx/4Q3eJ4dECEPHYJgh7LVF4NX+Y1wjyg1I53nYh3NHJCkJ2n5lprWIUgGisMtYYHv JTxu2/Pb4wnz9SFN9TQMlcBTcfzSRthg7I0P5ZlUwHpgBRP7V26oADTP5V8xEcAiHDpr CwsxAKQQwI4s24qxUb2orQ0fzoaLmkP8kn8BLIz9+hrhTsV46WmHcF6T5Pm8L6zHzX1J p7Syy/Oulvz1n0ViXOu2tfw+WnenZeOAK9vkMP4z1jOrG1opKeN75u/ByuNditDAAW1b ZNoA== X-Gm-Message-State: AOJu0YwSz86IRUvLhE495Y8GAKGKU/vpuTPkVQzRKshOH1kIqA15ljHX tz6M2wZMWjRdFnNXG+W96bxn1o2emEAWCpK13wf2BsOPpPV2cOHuMBZbUbsARs+vcLxahpEV4uM = X-Google-Smtp-Source: AGHT+IEWfBJhc0XvEQRQk7IjE0kBMObIrmCcQzT6dWwQH+7AdZByvK3ccdT0AUCQHrl2vijDWLcVcw== X-Received: by 2002:adf:a39b:0:b0:33a:fc6e:c728 with SMTP id l27-20020adfa39b000000b0033afc6ec728mr6175580wrb.32.1707139815886; Mon, 05 Feb 2024 05:30:15 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWFJN9zGAhJw44sNlKGBPB2AVw9uieWHp0F7BpfVyryjKkSP6jkROxDikQOcnmwgCoRAYGpUHUMeYKj/wSXFgipt/nLruwrbXeUR63nhh1KYMp/LB2aNBwERpjto3WYIHaZ7F9PAk9ND0OGeTUOvUQsNPJi+NesYbMNX/Kl/bLgG+R9ln1AMx9XIiG2JDWAGn+lKnaWz0wYtDbx6GrpC8Hg0MzCufcerGTzILpk/1RS7Bk8cHT2B5r7vR7GkLPZAU6KqO3d+nzhUA== Message-ID: <93aec041-70f6-4385-9a52-8808e0cea931@suse.com> Date: Mon, 5 Feb 2024 14:30:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 5/8] serial: drop serial_[rt]x_interrupt()'s regs parameter Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu , Michal Orzel , Bertrand Marquis , Volodymyr Babchuk References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1707139835203100001 Content-Type: text/plain; charset="utf-8" They're simply not needed anymore. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- v2: Setting of IRQ regs split off to an earlier patch. --- a/xen/drivers/char/cadence-uart.c +++ b/xen/drivers/char/cadence-uart.c @@ -51,7 +51,7 @@ static void cuart_interrupt(int irq, voi /* ACK. */ if ( status & UART_SR_INTR_RTRIG ) { - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); cuart_write(uart, R_UART_CISR, UART_SR_INTR_RTRIG); } } while ( status & UART_SR_INTR_RTRIG ); --- a/xen/drivers/char/ehci-dbgp.c +++ b/xen/drivers/char/ehci-dbgp.c @@ -1273,10 +1273,10 @@ static void cf_check _ehci_dbgp_poll(str old_regs =3D set_irq_regs(regs); =20 if ( dbgp->in.chunk ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); =20 if ( empty ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); =20 set_irq_regs(old_regs); =20 --- a/xen/drivers/char/exynos4210-uart.c +++ b/xen/drivers/char/exynos4210-uart.c @@ -81,7 +81,7 @@ static void exynos4210_uart_interrupt(in if ( status & (UINTM_RXD | UINTM_ERROR) ) { /* uart->regs[UINTM] |=3D RXD|ERROR; */ - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); /* uart->regs[UINTM] &=3D ~(RXD|ERROR); */ exynos4210_write(uart, UINTP, UINTM_RXD | UINTM_ERROR); } @@ -89,7 +89,7 @@ static void exynos4210_uart_interrupt(in if ( status & (UINTM_TXD | UINTM_MODEM) ) { /* uart->regs[UINTM] |=3D TXD|MODEM; */ - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); /* uart->regs[UINTM] &=3D ~(TXD|MODEM); */ exynos4210_write(uart, UINTP, UINTM_TXD | UINTM_MODEM); } --- a/xen/drivers/char/imx-lpuart.c +++ b/xen/drivers/char/imx-lpuart.c @@ -48,10 +48,10 @@ static void imx_lpuart_interrupt(int irq rxcnt =3D imx_lpuart_read(uart, UARTWATER) >> UARTWATER_RXCNT_OFF; =20 if ( (sts & UARTSTAT_RDRF) || (rxcnt > 0) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); =20 if ( sts & UARTSTAT_TDRE ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); =20 imx_lpuart_write(uart, UARTSTAT, sts); } --- a/xen/drivers/char/meson-uart.c +++ b/xen/drivers/char/meson-uart.c @@ -69,10 +69,10 @@ static void meson_uart_interrupt(int irq uint32_t st =3D readl(uart->regs + AML_UART_STATUS_REG); =20 if ( !(st & AML_UART_RX_FIFO_EMPTY) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); =20 if ( !(st & AML_UART_TX_FIFO_FULL) ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); } =20 static void __init meson_uart_init_preirq(struct serial_port *port) --- a/xen/drivers/char/mvebu-uart.c +++ b/xen/drivers/char/mvebu-uart.c @@ -76,10 +76,10 @@ static void mvebu3700_uart_interrupt(int =20 if ( st & (STATUS_RX_RDY | STATUS_OVR_ERR | STATUS_FRM_ERR | STATUS_BRK_DET) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); =20 if ( st & STATUS_TX_RDY ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); } =20 static void __init mvebu3700_uart_init_preirq(struct serial_port *port) --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -188,9 +188,9 @@ static void cf_check ns16550_interrupt( u8 lsr =3D ns_read_reg(uart, UART_LSR); =20 if ( (lsr & uart->lsr_mask) =3D=3D uart->lsr_mask ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); if ( lsr & UART_LSR_DR ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); =20 /* A "busy-detect" condition is observed on Allwinner/sunxi UART * after LCR is written during setup. It needs to be cleared at @@ -224,11 +224,11 @@ static void cf_check __ns16550_poll(stru if ( ns16550_ioport_invalid(uart) ) goto out; =20 - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); } =20 if ( ( ns_read_reg(uart, UART_LSR) & uart->lsr_mask ) =3D=3D uart->lsr= _mask ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); =20 out: set_irq_regs(old_regs); --- a/xen/drivers/char/omap-uart.c +++ b/xen/drivers/char/omap-uart.c @@ -70,9 +70,9 @@ static void omap_uart_interrupt(int irq, { lsr =3D omap_read(uart, UART_LSR) & 0xff; if ( lsr & UART_LSR_THRE ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); if ( lsr & UART_LSR_DR ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); =20 if ( port->txbufc =3D=3D port->txbufp ) { reg =3D omap_read(uart, UART_IER); --- a/xen/drivers/char/pl011.c +++ b/xen/drivers/char/pl011.c @@ -95,7 +95,7 @@ static void pl011_interrupt(int irq, voi pl011_write(uart, ICR, status & ~(TXI|RTI|RXI)); =20 if ( status & (RTI|RXI) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); =20 /* TODO if ( status & (DSRMI|DCDMI|CTSMI|RIMI) ) @@ -103,7 +103,7 @@ static void pl011_interrupt(int irq, voi */ =20 if ( status & (TXI) ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); =20 status =3D pl011_intr_status(uart); } while (status !=3D 0); --- a/xen/drivers/char/scif-uart.c +++ b/xen/drivers/char/scif-uart.c @@ -119,11 +119,11 @@ static void scif_uart_interrupt(int irq, { /* TX Interrupt */ if ( status & SCFSR_TDFE ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); =20 /* RX Interrupt */ if ( status & (SCFSR_RDF | SCFSR_DR) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); =20 /* Error Interrupt */ if ( status & params->error_mask ) --- a/xen/drivers/char/serial.c +++ b/xen/drivers/char/serial.c @@ -45,7 +45,7 @@ static inline void serial_stop_tx(struct port->driver->stop_tx(port); } =20 -void serial_rx_interrupt(struct serial_port *port, struct cpu_user_regs *r= egs) +void serial_rx_interrupt(struct serial_port *port) { char c; serial_rx_fn fn =3D NULL; @@ -71,7 +71,7 @@ void serial_rx_interrupt(struct serial_p fn(c & 0x7f); } =20 -void serial_tx_interrupt(struct serial_port *port, struct cpu_user_regs *r= egs) +void serial_tx_interrupt(struct serial_port *port) { int i, n; unsigned long flags; --- a/xen/drivers/char/xhci-dbc.c +++ b/xen/drivers/char/xhci-dbc.c @@ -1180,9 +1180,9 @@ static void cf_check dbc_uart_poll(void old_regs =3D set_irq_regs(guest_cpu_user_regs()); =20 while ( dbc_work_ring_size(&dbc->dbc_iwork) ) - serial_rx_interrupt(port, guest_cpu_user_regs()); + serial_rx_interrupt(port); =20 - serial_tx_interrupt(port, guest_cpu_user_regs()); + serial_tx_interrupt(port); =20 set_irq_regs(old_regs); set_timer(&uart->timer, NOW() + MICROSECS(DBC_POLL_INTERVAL)); --- a/xen/include/xen/serial.h +++ b/xen/include/xen/serial.h @@ -12,8 +12,6 @@ #include #include =20 -struct cpu_user_regs; - /* Register a character-receive hook on the specified COM port. */ typedef void (*serial_rx_fn)(char c); void serial_set_rx_handler(int handle, serial_rx_fn fn); @@ -155,8 +153,8 @@ void serial_register_uart(int idx, struc /* Place the serial port into asynchronous transmit mode. */ void serial_async_transmit(struct serial_port *port); /* Process work in interrupt context. */ -void serial_rx_interrupt(struct serial_port *port, struct cpu_user_regs *r= egs); -void serial_tx_interrupt(struct serial_port *port, struct cpu_user_regs *r= egs); +void serial_rx_interrupt(struct serial_port *port); +void serial_tx_interrupt(struct serial_port *port); =20 /* * Initialisers for individual uart drivers. From nobody Tue Oct 15 15:22:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1707139882; cv=none; d=zohomail.com; s=zohoarc; b=ddjdMUl+njMOz0z6nsJgL2TVh6QAAlBM6GK5fXD5Y3/Hzmebnw7MGL7jlW/V3RzQV6jy16Vto3qUNzbhlhvIPtYaebOGBe7vD2ieIoVadOLEd1f5dl/hxjRYIjyOhwi4biYsjS1zOhEjCJ99BiU9k8mkr+jZQCZDFWYJr0Z82lw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707139882; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vY7h+x/uY/tx4SThVUK3+EyH+28fbreju2/f4B+vk7s=; b=bJHDhEPtRYwHyDuiZXEMjrlR/B1BcCEO1X1syuli4RBI/fJNZCoLXD6MzMJBKyIo+QxN0n+T+QteBns/mhmfxuYR8W/FHe2dfNP4+P8VGDUO3GsvlwxfugW8IsiaAyZeRiQ+H660d4nirPffnkhF2/h+TtBN3N/r4H4hZQCqxWU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707139882260927.0311306727402; Mon, 5 Feb 2024 05:31:22 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.676050.1051843 (Exim 4.92) (envelope-from ) id 1rWz3w-0005tU-NG; Mon, 05 Feb 2024 13:31:04 +0000 Received: by outflank-mailman (output) from mailman id 676050.1051843; Mon, 05 Feb 2024 13:31:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz3w-0005tN-KX; Mon, 05 Feb 2024 13:31:04 +0000 Received: by outflank-mailman (input) for mailman id 676050; Mon, 05 Feb 2024 13:31:03 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz3v-0004HJ-Ac for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 13:31:03 +0000 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [2a00:1450:4864:20::330]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id ce35a050-c42a-11ee-8a45-1f161083a0e0; Mon, 05 Feb 2024 14:31:02 +0100 (CET) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40fdcae97e7so5909665e9.1 for ; Mon, 05 Feb 2024 05:31:02 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id n10-20020a5d67ca000000b0033b3cf1ff09sm2278382wrw.29.2024.02.05.05.31.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:31:01 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: ce35a050-c42a-11ee-8a45-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707139862; x=1707744662; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=vY7h+x/uY/tx4SThVUK3+EyH+28fbreju2/f4B+vk7s=; b=OjcsHD+hW5fNoTNferm4LkddzLGFXrfQPHgAwaXPDqOJBGv7QnLlo9fmQmzBA+gv4x beCVuywxYgitic1ATn38iknkcoP/SMbXkjJ/YLhZgjX6ImZdFmddfcNnlE88ES/BHP/S ZRL6yMSZE2BIHwCKlYDj6I+bv5kfRyR2cgvIBBCdtVYLiICZDuok7il7jD0cEBL8Z/c2 EVnGmba9m7ET5Bl5XBmDLOSO0Vsw8LDonIXXbKcz/miWrWCIInj9N6e/9yYcpKUtvaXA 9x4ug4vkaCq7RmpAAh+5MEIMxQ9YlgVa7ec82HGSaMJLGeqeG+Z/I8lFdn0VHanH2G78 w08Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707139862; x=1707744662; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vY7h+x/uY/tx4SThVUK3+EyH+28fbreju2/f4B+vk7s=; b=as8ZTcE9FnDUAcWFtlez62oknRnTc5XiydVBpvUnwQ5XOqEMhyw1RZKWHPrN6eF14X jklmcHNp2b5tsX9PUCyZu+HIgxFMSeqk89hTUXqF+qW4mfFghWh5WFkppvhcI6DmlevE 8FJNqI13uCPsBsTxPeVemTn3guQRRa377B7xo19Nps86EgMilObdFMtKSzNwCDZraXIB TEY2E718tWRu+CLfZdR2oZAyxEhD7bNy0aDbRnY08uzLNz1bFs9UrD3IQNcMiT9CQ47z 2SN7zQWUm2Sok67uoGl1GbznqZQffRLStLmAy+kspc9nn8+791Ws/RFX08r/4YMVB2+R DrMQ== X-Gm-Message-State: AOJu0Yy+hn4aqWjVxPHx04/ytq4kXpHehRUpki7UGdqy6wS0rOxAwpJx jRXFShbbqt3KrW33lQuOILDMJLEPwJiDsa8viB6tclKJ82yku8UjDzagcyZfh/EQ+hOaaflR/Og = X-Google-Smtp-Source: AGHT+IH6MbR/g8j+hw5ZnhR8vKIqLjsBF5B3Dwfy9d0iWHbVDtujDNlWP0J9CAu9n0+/I02GtX5C1Q== X-Received: by 2002:a5d:55c4:0:b0:337:8f98:8ab4 with SMTP id i4-20020a5d55c4000000b003378f988ab4mr5650559wrw.37.1707139861828; Mon, 05 Feb 2024 05:31:01 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWcXc548klzDRD7WHkkYPkGFws+xgjAypm5h/s1MxCi+j3IwmwiM53r3gm+lJiP0Z0W/wdUYq7HVuL8Fg8uvRbXvZHjzc2f042CvpuYRloOrIbS8qyI69DM5pM2rNP8JA88aO9srDB3pj0wa26ci7w12uAL0R+Hs68ymUrhSPu/PNo9SADSUFMqop1VtuHPEz0pCrAET51452KTp9ak4RHgE3zklPBZ64JKwKwLmDQ/WbaDdbpaHOCBBbpyVhy224cDcEEHpXK6Yw== Message-ID: Date: Mon, 5 Feb 2024 14:31:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 6/8] IRQ: drop regs parameter from handler functions Content-Language: en-US From: Jan Beulich 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 References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1707139883472100001 Content-Type: text/plain; charset="utf-8" It's simply not needed anymore. Note how Linux made this change many years ago already, in 2.6.19 (late 2006, see [1]). Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Acked-by: Julien Grall [1] https://git.kernel.org/torvalds/c/7d12e780e003f93433d49ce78cfedf4b4c52a= dc5 --- v2: Arm build fixes. --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -397,7 +397,7 @@ void gic_interrupt(struct cpu_user_regs } while (1); } =20 -static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_r= egs *regs) +static void maintenance_interrupt(int irq, void *dev_id) { /* * This is a dummy interrupt handler. --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -182,8 +182,7 @@ void irq_set_affinity(struct irq_desc *d } =20 int request_irq(unsigned int irq, unsigned int irqflags, - void (*handler)(int irq, void *dev_id, - struct cpu_user_regs *regs), + void (*handler)(int irq, void *dev_id), const char *devname, void *dev_id) { struct irqaction *action; @@ -276,7 +275,7 @@ void do_IRQ(struct cpu_user_regs *regs, =20 do { - action->handler(irq, action->dev_id, regs); + action->handler(irq, action->dev_id); action =3D action->next; } while ( action ); =20 --- a/xen/arch/arm/time.c +++ b/xen/arch/arm/time.c @@ -241,7 +241,7 @@ int reprogram_timer(s_time_t timeout) } =20 /* Handle the firing timer */ -static void htimer_interrupt(int irq, void *dev_id, struct cpu_user_regs *= regs) +static void htimer_interrupt(int irq, void *dev_id) { if ( unlikely(!(READ_SYSREG(CNTHP_CTL_EL2) & CNTx_CTL_PENDING)) ) return; @@ -255,7 +255,7 @@ static void htimer_interrupt(int irq, vo WRITE_SYSREG(0, CNTHP_CTL_EL2); } =20 -static void vtimer_interrupt(int irq, void *dev_id, struct cpu_user_regs *= regs) +static void vtimer_interrupt(int irq, void *dev_id) { /* * Edge-triggered interrupts can be used for the virtual timer. Even --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -962,7 +962,7 @@ static int __init cf_check irq_ratelimit __initcall(irq_ratelimit_init); =20 int __init request_irq(unsigned int irq, unsigned int irqflags, - void (*handler)(int irq, void *dev_id, struct cpu_user_regs *regs), + void (*handler)(int irq, void *dev_id), const char * devname, void *dev_id) { struct irqaction * action; @@ -2009,7 +2009,7 @@ void do_IRQ(struct cpu_user_regs *regs) spin_unlock_irq(&desc->lock); =20 tsc_in =3D tb_init_done ? get_cycles() : 0; - action->handler(irq, action->dev_id, regs); + action->handler(irq, action->dev_id); TRACE_3D(TRC_HW_IRQ_HANDLED, irq, tsc_in, get_cycles()); =20 spin_lock_irq(&desc->lock); --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -237,8 +237,7 @@ again: } } =20 -static void cf_check hpet_interrupt_handler( - int irq, void *data, struct cpu_user_regs *regs) +static void cf_check hpet_interrupt_handler(int irq, void *data) { struct hpet_event_channel *ch =3D data; =20 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -198,8 +198,7 @@ static void smp_send_timer_broadcast_ipi } } =20 -static void cf_check timer_interrupt( - int irq, void *dev_id, struct cpu_user_regs *regs) +static void cf_check timer_interrupt(int irq, void *dev_id) { ASSERT(local_irq_is_enabled()); =20 --- a/xen/common/irq.c +++ b/xen/common/irq.c @@ -29,7 +29,7 @@ int init_one_irq_desc(struct irq_desc *d return err; } =20 -void cf_check no_action(int cpl, void *dev_id, struct cpu_user_regs *regs) +void cf_check no_action(int cpl, void *dev_id) { } =20 --- a/xen/drivers/char/cadence-uart.c +++ b/xen/drivers/char/cadence-uart.c @@ -40,7 +40,7 @@ static struct cuart { #define cuart_read(uart, off) readl((uart)->regs + (off)) #define cuart_write(uart, off,val) writel((val), (uart)->regs + (off)) =20 -static void cuart_interrupt(int irq, void *data, struct cpu_user_regs *reg= s) +static void cuart_interrupt(int irq, void *data) { struct serial_port *port =3D data; struct cuart *uart =3D port->uart; --- a/xen/drivers/char/exynos4210-uart.c +++ b/xen/drivers/char/exynos4210-uart.c @@ -45,7 +45,7 @@ static struct exynos4210_uart { #define exynos4210_read(uart, off) readl((uart)->regs + off) #define exynos4210_write(uart, off, val) writel(val, (uart->regs) + off) =20 -static void exynos4210_uart_interrupt(int irq, void *data, struct cpu_user= _regs *regs) +static void exynos4210_uart_interrupt(int irq, void *data) { struct serial_port *port =3D data; struct exynos4210_uart *uart =3D port->uart; --- a/xen/drivers/char/imx-lpuart.c +++ b/xen/drivers/char/imx-lpuart.c @@ -37,8 +37,7 @@ static struct imx_lpuart { struct vuart_info vuart; } imx8_com; =20 -static void imx_lpuart_interrupt(int irq, void *data, - struct cpu_user_regs *regs) +static void imx_lpuart_interrupt(int irq, void *data) { struct serial_port *port =3D data; struct imx_lpuart *uart =3D port->uart; --- a/xen/drivers/char/meson-uart.c +++ b/xen/drivers/char/meson-uart.c @@ -61,8 +61,7 @@ static struct meson_uart { struct vuart_info vuart; } meson_com; =20 -static void meson_uart_interrupt(int irq, void *data, - struct cpu_user_regs *regs) +static void meson_uart_interrupt(int irq, void *data) { struct serial_port *port =3D data; struct meson_uart *uart =3D port->uart; --- a/xen/drivers/char/mvebu-uart.c +++ b/xen/drivers/char/mvebu-uart.c @@ -67,8 +67,7 @@ static struct mvebu3700_uart { #define mvebu3700_read(uart, off) readl((uart)->regs + (off)) #define mvebu3700_write(uart, off, val) writel(val, (uart)->regs + (of= f)) =20 -static void mvebu3700_uart_interrupt(int irq, void *data, - struct cpu_user_regs *regs) +static void mvebu3700_uart_interrupt(int irq, void *data) { struct serial_port *port =3D data; struct mvebu3700_uart *uart =3D port->uart; --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -175,8 +175,7 @@ static void handle_dw_usr_busy_quirk(str } } =20 -static void cf_check ns16550_interrupt( - int irq, void *dev_id, struct cpu_user_regs *regs) +static void cf_check ns16550_interrupt(int irq, void *dev_id) { struct serial_port *port =3D dev_id; struct ns16550 *uart =3D port->uart; --- a/xen/drivers/char/omap-uart.c +++ b/xen/drivers/char/omap-uart.c @@ -59,7 +59,7 @@ static struct omap_uart { struct vuart_info vuart; } omap_com =3D {0}; =20 -static void omap_uart_interrupt(int irq, void *data, struct cpu_user_regs = *regs) +static void omap_uart_interrupt(int irq, void *data) { struct serial_port *port =3D data; struct omap_uart *uart =3D port->uart; --- a/xen/drivers/char/pl011.c +++ b/xen/drivers/char/pl011.c @@ -82,7 +82,7 @@ static unsigned int pl011_intr_status(st return (pl011_read(uart, RIS) & pl011_read(uart, IMSC)); } =20 -static void pl011_interrupt(int irq, void *data, struct cpu_user_regs *reg= s) +static void pl011_interrupt(int irq, void *data) { struct serial_port *port =3D data; struct pl011 *uart =3D port->uart; --- a/xen/drivers/char/scif-uart.c +++ b/xen/drivers/char/scif-uart.c @@ -102,7 +102,7 @@ static const struct port_params port_par }, }; =20 -static void scif_uart_interrupt(int irq, void *data, struct cpu_user_regs = *regs) +static void scif_uart_interrupt(int irq, void *data) { struct serial_port *port =3D data; struct scif_uart *uart =3D port->uart; --- a/xen/drivers/passthrough/amd/iommu_init.c +++ b/xen/drivers/passthrough/amd/iommu_init.c @@ -718,8 +718,7 @@ static void cf_check do_amd_iommu_irq(vo =20 static DECLARE_SOFTIRQ_TASKLET(amd_iommu_irq_tasklet, do_amd_iommu_irq, NU= LL); =20 -static void cf_check iommu_interrupt_handler( - int irq, void *dev_id, struct cpu_user_regs *regs) +static void cf_check iommu_interrupt_handler(int irq, void *dev_id) { unsigned long flags; struct amd_iommu *iommu =3D dev_id; --- a/xen/drivers/passthrough/arm/ipmmu-vmsa.c +++ b/xen/drivers/passthrough/arm/ipmmu-vmsa.c @@ -642,7 +642,7 @@ static void ipmmu_domain_irq(struct ipmm domain->d, status, iova); } =20 -static void ipmmu_irq(int irq, void *dev, struct cpu_user_regs *regs) +static void ipmmu_irq(int irq, void *dev) { struct ipmmu_vmsa_device *mmu =3D dev; unsigned int i; --- a/xen/drivers/passthrough/arm/smmu.c +++ b/xen/drivers/passthrough/arm/smmu.c @@ -1097,16 +1097,14 @@ static irqreturn_t arm_smmu_global_fault } =20 /* Xen: Interrupt handlers wrapper */ -static void arm_smmu_context_fault_xen(int irq, void *dev, - struct cpu_user_regs *regs) +static void arm_smmu_context_fault_xen(int irq, void *dev) { arm_smmu_context_fault(irq, dev); } =20 #define arm_smmu_context_fault arm_smmu_context_fault_xen =20 -static void arm_smmu_global_fault_xen(int irq, void *dev, - struct cpu_user_regs *regs) +static void arm_smmu_global_fault_xen(int irq, void *dev) { arm_smmu_global_fault(irq, dev); } --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -880,8 +880,7 @@ static void arm_smmu_priq_tasklet(void * =20 static int arm_smmu_device_disable(struct arm_smmu_device *smmu); =20 -static void arm_smmu_gerror_handler(int irq, void *dev, - struct cpu_user_regs *regs) +static void arm_smmu_gerror_handler(int irq, void *dev) { u32 gerror, gerrorn, active; struct arm_smmu_device *smmu =3D dev; @@ -926,12 +925,11 @@ static void arm_smmu_gerror_handler(int writel(gerror, smmu->base + ARM_SMMU_GERRORN); } =20 -static void arm_smmu_combined_irq_handler(int irq, void *dev, - struct cpu_user_regs *regs) +static void arm_smmu_combined_irq_handler(int irq, void *dev) { struct arm_smmu_device *smmu =3D dev; =20 - arm_smmu_gerror_handler(irq, dev, regs); + arm_smmu_gerror_handler(irq, dev); =20 tasklet_schedule(&(smmu->combined_irq_tasklet)); } @@ -945,16 +943,14 @@ static void arm_smmu_combined_irq_taskle arm_smmu_priq_tasklet(dev); } =20 -static void arm_smmu_evtq_irq_tasklet(int irq, void *dev, - struct cpu_user_regs *regs) +static void arm_smmu_evtq_irq_tasklet(int irq, void *dev) { struct arm_smmu_device *smmu =3D dev; =20 tasklet_schedule(&(smmu->evtq_irq_tasklet)); } =20 -static void arm_smmu_priq_irq_tasklet(int irq, void *dev, - struct cpu_user_regs *regs) +static void arm_smmu_priq_irq_tasklet(int irq, void *dev) { struct arm_smmu_device *smmu =3D dev; =20 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1117,8 +1117,7 @@ static void cf_check do_iommu_page_fault __do_iommu_page_fault(drhd->iommu); } =20 -static void cf_check iommu_page_fault( - int irq, void *dev_id, struct cpu_user_regs *regs) +static void cf_check iommu_page_fault(int irq, void *dev_id) { /* * Just flag the tasklet as runnable. This is fine, according to VT-d --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -18,7 +18,7 @@ ASSERT(!in_irq() && (local_irq_is_enabled() || num_online_cpus() <=3D = 1)) =20 struct irqaction { - void (*handler)(int irq, void *dev_id, struct cpu_user_regs *regs); + void (*handler)(int irq, void *dev_id); const char *name; void *dev_id; bool free_on_release; @@ -119,12 +119,11 @@ extern int setup_irq(unsigned int irq, u struct irqaction *new); extern void release_irq(unsigned int irq, const void *dev_id); extern int request_irq(unsigned int irq, unsigned int irqflags, - void (*handler)(int irq, void *dev_id, - struct cpu_user_regs *regs), + void (*handler)(int irq, void *dev_id), const char *devname, void *dev_id); =20 extern hw_irq_controller no_irq_type; -void cf_check no_action(int cpl, void *dev_id, struct cpu_user_regs *regs); +void cf_check no_action(int cpl, void *dev_id); unsigned int cf_check irq_startup_none(struct irq_desc *desc); void cf_check irq_actor_none(struct irq_desc *desc); #define irq_shutdown_none irq_actor_none From nobody Tue Oct 15 15:22:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1707139922; cv=none; d=zohomail.com; s=zohoarc; b=m2hrHWRvZNLOvNvP/kq2CTHvCFotsd6065jJ83UXSmWPpk3h8r2dZi0jB5Mcdh6vQ/sQKDAn+Wwa31oj7EIgyqNsDI9SsOUqL4uIJxgM8x7LfjGeLJvN+qhvpt2QsWfFXTKpBtJ/x19VI372jHVuaegUA/HI8FlJqwckoChJue0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707139922; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gEqRJt64VcumCTtnR8WkrhpV/gUr3OF3qVsMsouyC7A=; b=WmmvosjUs6EMFfkCK1e9e+7vrrjNHX6P5MjYWgLPV6huKQr0hi6nt6lQE1C+pErRLlbJdq0yLdAv8maASCfm1ULMumfyX0DhI+eP0dkzpKTmMXxXq3vjLa9p8p3bf/U79FNK12e/DNo+QgJ5/HxNfGN63MxDye+Qn2ROjXRRmb0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707139922656995.0907579747064; Mon, 5 Feb 2024 05:32:02 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.676060.1051853 (Exim 4.92) (envelope-from ) id 1rWz4g-0006Sc-51; Mon, 05 Feb 2024 13:31:50 +0000 Received: by outflank-mailman (output) from mailman id 676060.1051853; Mon, 05 Feb 2024 13:31:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz4g-0006SV-1T; Mon, 05 Feb 2024 13:31:50 +0000 Received: by outflank-mailman (input) for mailman id 676060; Mon, 05 Feb 2024 13:31:48 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz4e-0004HJ-O2 for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 13:31:48 +0000 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [2a00:1450:4864:20::132]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e984baf9-c42a-11ee-8a45-1f161083a0e0; Mon, 05 Feb 2024 14:31:48 +0100 (CET) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5100cb238bcso7942285e87.3 for ; Mon, 05 Feb 2024 05:31:48 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id n10-20020a5d67ca000000b0033b3cf1ff09sm2278382wrw.29.2024.02.05.05.31.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:31:47 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: e984baf9-c42a-11ee-8a45-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707139907; x=1707744707; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=gEqRJt64VcumCTtnR8WkrhpV/gUr3OF3qVsMsouyC7A=; b=VawSKcJgQXK21l1YXTA5hk0LH8xnlRqfvMRRoNjFPkc37gYrkRUACWLaweYpNhSh16 DctfDcsLwpu4360lWSYwwSLgjxXxYoMMJbvMK6Aydx1GeavKjBjota3gGeRbRMurDFTa Kv7kUcK6m4lfiP0TDx3nRusxd9RmvII1sKf/135+EJAnhcN1i8fldSakpPpXPsXQ4aQm MTtl0AwPfh1XQzHXyJK50KDXLW12y6wuLIa4cUZqiG7D/GPq1jvOEYiu1Z9H3430RL0F 9V1TMvD9AJf6sh3GAO+EGhkfsyNnyCOX/cwlnG7hqwkypPSgNFTvfFwfweV2QgwItlR/ 6/pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707139907; x=1707744707; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gEqRJt64VcumCTtnR8WkrhpV/gUr3OF3qVsMsouyC7A=; b=otNwWGLSvS+lmX9dB4UFbS6B+Xcyg67x82K2yrtTszyNj7T9KDmWnKi9eGPpntUoQA RrsG9HpWO7Px4Yj/E0JTjI1WYJeVWoThpHGLzDa67o/kd7mHzQeNQ85KHk8A+Lw+z0Nk YqzAAL0gdQ/Xio+caSvz83ZajfHOb391+/9Y5bijw2Glrzhyopj2Xye4A6VdWEEya36L m3T39kLz7yJmWoeiIHD6WJmXt1yuANcloUSHUZSu4DiPAQ87GJ6wxWLWbG1IWi2A/Gl5 vrjLy/8TslSxXA1WzrStLHpltEZG5KmzXTEDo8+mqeSgorOYcLMKx99NjBHO51/2UIbe T2uA== X-Gm-Message-State: AOJu0YyJl1Gjn2kKTza8fTyOrHxFU6lHBlXUp9nfXVpWfwiJoREMD4Jc Urm94eB1AGRvmGV8ySAAvpCwbsQnZ/AdhyyY1x81Rt6/cE9bRKR3G+i1wDAq1DKr2KXjmuvsIQM = X-Google-Smtp-Source: AGHT+IFrFVP3TfIbgIMT87bMnfEeRRPkJ7aKkrdXuEKYf5lnr2tL3R7tzhfm5/tp2tedPXGNUgc8ag== X-Received: by 2002:a05:6512:1289:b0:511:5385:595d with SMTP id u9-20020a056512128900b005115385595dmr1473621lfs.41.1707139907575; Mon, 05 Feb 2024 05:31:47 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWdxlNgwzzOZXU8TNg2tyMXtWd0Pidw4BilmsICRarkIGrec4jvn4gCavIxalaAY7DXQkQqhAIJtNvRpnlcahl7akcDyRxq1caEIGnk1CbKimOnm4IHCvN0jzO/oobMf26WvepPfI6hCPQC5GgK6GUcZXVV2YEttFh24XHg+CzZrcjbWrmMZCNhqBjk0kpn12ocIPpGg39JNw== Message-ID: Date: Mon, 5 Feb 2024 14:31:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 7/8] x86/APIC: drop regs parameter from direct vector handler functions Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Kevin Tian , Jun Nakajima References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1707139923874100001 Content-Type: text/plain; charset="utf-8" The only place it was needed is in the spurious handler, and there we can use get_irq_regs() instead. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1322,7 +1322,7 @@ int reprogram_timer(s_time_t timeout) return apic_tmict || !timeout; } =20 -static void cf_check apic_timer_interrupt(struct cpu_user_regs *regs) +static void cf_check apic_timer_interrupt(void) { ack_APIC_irq(); perfc_incr(apic_timer); @@ -1341,7 +1341,7 @@ void smp_send_state_dump(unsigned int cp /* * Spurious interrupts should _never_ happen with our APIC/SMP architectur= e. */ -static void cf_check spurious_interrupt(struct cpu_user_regs *regs) +static void cf_check spurious_interrupt(void) { /* * Check if this is a vectored interrupt (most likely, as this is prob= ably @@ -1355,7 +1355,7 @@ static void cf_check spurious_interrupt( is_spurious =3D !nmi_check_continuation(); if (this_cpu(state_dump_pending)) { this_cpu(state_dump_pending) =3D false; - dump_execstate(regs); + dump_execstate(get_irq_regs()); is_spurious =3D false; } =20 @@ -1372,7 +1372,7 @@ static void cf_check spurious_interrupt( * This interrupt should never happen with our APIC/SMP architecture */ =20 -static void cf_check error_interrupt(struct cpu_user_regs *regs) +static void cf_check error_interrupt(void) { static const char *const esr_fields[] =3D { ", Send CS error", @@ -1407,7 +1407,7 @@ static void cf_check error_interrupt(str * This interrupt handles performance counters interrupt */ =20 -static void cf_check pmu_interrupt(struct cpu_user_regs *regs) +static void cf_check pmu_interrupt(void) { ack_APIC_irq(); vpmu_do_interrupt(); --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -58,7 +58,7 @@ bool __read_mostly lmce_support; #define MCE_RING 0x1 static DEFINE_PER_CPU(int, last_state); =20 -static void cf_check intel_thermal_interrupt(struct cpu_user_regs *regs) +static void cf_check intel_thermal_interrupt(void) { uint64_t msr_content; unsigned int cpu =3D smp_processor_id(); @@ -642,7 +642,7 @@ static void cpu_mcheck_disable(void) clear_cmci(); } =20 -static void cf_check cmci_interrupt(struct cpu_user_regs *regs) +static void cf_check cmci_interrupt(void) { mctelem_cookie_t mctc; struct mca_summary bs; --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -158,7 +158,7 @@ static void __init init_memmap(void) } } =20 -static void cf_check xen_evtchn_upcall(struct cpu_user_regs *regs) +static void cf_check xen_evtchn_upcall(void) { struct vcpu_info *vcpu_info =3D this_cpu(vcpu_info); unsigned long pending; --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2776,7 +2776,7 @@ static struct hvm_function_table __initd }; =20 /* Handle VT-d posted-interrupt when VCPU is blocked. */ -static void cf_check pi_wakeup_interrupt(struct cpu_user_regs *regs) +static void cf_check pi_wakeup_interrupt(void) { struct vmx_vcpu *vmx, *tmp; spinlock_t *lock =3D &per_cpu(vmx_pi_blocking, smp_processor_id()).loc= k; @@ -2808,7 +2808,7 @@ static void cf_check pi_wakeup_interrupt } =20 /* Handle VT-d posted-interrupt when VCPU is running. */ -static void cf_check pi_notification_interrupt(struct cpu_user_regs *regs) +static void cf_check pi_notification_interrupt(void) { ack_APIC_irq(); this_cpu(irq_count)++; --- a/xen/arch/x86/include/asm/irq.h +++ b/xen/arch/x86/include/asm/irq.h @@ -72,17 +72,15 @@ extern int opt_irq_vector_map; =20 #define platform_legacy_irq(irq) ((irq) < 16) =20 -void cf_check event_check_interrupt(struct cpu_user_regs *regs); -void cf_check invalidate_interrupt(struct cpu_user_regs *regs); -void cf_check call_function_interrupt(struct cpu_user_regs *regs); -void cf_check irq_move_cleanup_interrupt(struct cpu_user_regs *regs); +void cf_check event_check_interrupt(void); +void cf_check invalidate_interrupt(void); +void cf_check call_function_interrupt(void); +void cf_check irq_move_cleanup_interrupt(void); =20 uint8_t alloc_hipriority_vector(void); =20 -void set_direct_apic_vector( - uint8_t vector, void (*handler)(struct cpu_user_regs *regs)); -void alloc_direct_apic_vector( - uint8_t *vector, void (*handler)(struct cpu_user_regs *regs)); +void set_direct_apic_vector(uint8_t vector, void (*handler)(void)); +void alloc_direct_apic_vector(uint8_t *vector, void (*handler)(void)); =20 void do_IRQ(struct cpu_user_regs *regs); =20 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -743,7 +743,7 @@ void move_native_irq(struct irq_desc *de desc->handler->enable(desc); } =20 -void cf_check irq_move_cleanup_interrupt(struct cpu_user_regs *regs) +void cf_check irq_move_cleanup_interrupt(void) { unsigned vector, me; =20 @@ -913,16 +913,14 @@ uint8_t alloc_hipriority_vector(void) return next++; } =20 -static void (*direct_apic_vector[X86_NR_VECTORS])(struct cpu_user_regs *re= gs); -void set_direct_apic_vector( - uint8_t vector, void (*handler)(struct cpu_user_regs *regs)) +static void (*direct_apic_vector[X86_NR_VECTORS])(void); +void set_direct_apic_vector(uint8_t vector, void (*handler)(void)) { BUG_ON(direct_apic_vector[vector] !=3D NULL); direct_apic_vector[vector] =3D handler; } =20 -void alloc_direct_apic_vector( - uint8_t *vector, void (*handler)(struct cpu_user_regs *regs)) +void alloc_direct_apic_vector(uint8_t *vector, void (*handler)(void)) { static DEFINE_SPINLOCK(lock); =20 @@ -1907,7 +1905,7 @@ void do_IRQ(struct cpu_user_regs *regs) if ( irq < 0 ) { if ( direct_apic_vector[vector] ) - direct_apic_vector[vector](regs); + direct_apic_vector[vector](); else { const char *kind =3D ", LAPIC"; --- a/xen/arch/x86/smp.c +++ b/xen/arch/x86/smp.c @@ -245,7 +245,7 @@ static cpumask_t flush_cpumask; static const void *flush_va; static unsigned int flush_flags; =20 -void cf_check invalidate_interrupt(struct cpu_user_regs *regs) +void cf_check invalidate_interrupt(void) { unsigned int flags =3D flush_flags; ack_APIC_irq(); @@ -387,14 +387,14 @@ void smp_send_nmi_allbutself(void) send_IPI_mask(&cpu_online_map, APIC_DM_NMI); } =20 -void cf_check event_check_interrupt(struct cpu_user_regs *regs) +void cf_check event_check_interrupt(void) { ack_APIC_irq(); perfc_incr(ipis); this_cpu(irq_count)++; } =20 -void cf_check call_function_interrupt(struct cpu_user_regs *regs) +void cf_check call_function_interrupt(void) { ack_APIC_irq(); perfc_incr(ipis); From nobody Tue Oct 15 15:22:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1707139975; cv=none; d=zohomail.com; s=zohoarc; b=nf6kCYxb4dnAzusQ+lgIVmmys4jiIWwfz4R2aWVgfFgMY98F7TcLHXysNj6C2U81HvibjYyiHGNLctTn/mC6LlWDxOl9r4VlseVre+OH5ysTxqgLJ+wwWNkn2ghl0aPWi9f6N0Bf/5su3hKG6899CHPD/gUnegm1BXysSXlUNok= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707139975; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=l1ReB3jZD1WlYuF9U7WzsUOq1WPtCay0Ptk0kyAo6EU=; b=VIpOhXcgyGVVxSjcN/nPXfdmteP7lN21SMljpNONVvKOLGzgoZzFnABLm1A8Uxh7/he5hwG8jB43Q6jp7BUxad9uv0F9rDHelS+DXApSYW8ypv6PxwY860XYtrdzcw6Jyr0L/dAlr9J8Xutbi0Wwo/bflbLKwywQA9U29YyIWNE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1707139975702790.9023861260662; Mon, 5 Feb 2024 05:32:55 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.676063.1051863 (Exim 4.92) (envelope-from ) id 1rWz5V-0006zk-EM; Mon, 05 Feb 2024 13:32:41 +0000 Received: by outflank-mailman (output) from mailman id 676063.1051863; Mon, 05 Feb 2024 13:32:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWz5V-0006zd-B0; Mon, 05 Feb 2024 13:32:41 +0000 Received: by outflank-mailman (input) for mailman id 676063; Mon, 05 Feb 2024 13:32:39 +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 1rWz5T-0006zC-KT for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 13:32:39 +0000 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [2a00:1450:4864:20::32f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 06b4388b-c42b-11ee-98f5-efadbce2ee36; Mon, 05 Feb 2024 14:32:37 +0100 (CET) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40fcb4ef7bcso24017385e9.0 for ; Mon, 05 Feb 2024 05:32:37 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id n10-20020a5d67ca000000b0033b3cf1ff09sm2278382wrw.29.2024.02.05.05.32.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:32:36 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 06b4388b-c42b-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707139956; x=1707744756; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=l1ReB3jZD1WlYuF9U7WzsUOq1WPtCay0Ptk0kyAo6EU=; b=OsdNTd6VMeUh4ga+XuwOrHQkxh7A6GWbkpi5eCDqNmXBkK834Jk91+PHum1oZG0uRY IbeMiLbL5Qcsp0gAJN2LvqZX9zOZb3D7Ex9VTfhtK91vPnvcB3e6bGEzOIo92tFh40HQ zY456ruFJqnqln0ALSAajjDy4OgmqWiB/QcBCFTZwxkrVwjiMN1CYanWby17eoWp6+rm WOt82awziojisi29NohcHVLvrug6WuVEYYY7qIsgqLDOQbNtCZ6pMMMbvgY7gVeAwfyr lMXhzKY6lwYYKLYIxOhtJ+aX4853V52XNuHTx2S4oP827WCjoKNAkVdg6BFD2lzTGult WSfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707139956; x=1707744756; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l1ReB3jZD1WlYuF9U7WzsUOq1WPtCay0Ptk0kyAo6EU=; b=kObTvxeaDCx9jVG2wR7dMXqgkc/SOPy93t5UEIkcCw4JVKLaHkvgIr3phM5ZkHdPoz CvMnEeLe7n8E4vc36YSQjFgGhgyJtGhP1z1mexpKMjlDefspBLD8NyoJZ53vxZnVRvez 79QGkTmUuLi3mqt51Xi+BCl5e+YKubCOU3/wzIYrhTVRmtzpwncU2NGGDt2rEVilr9gR BpzYiVqWvTTIJ7dWUl/Y0mz9Nrc7xzfVdwY5wIxIlBEpiVLn8nTB4M7xPC/3/D33+ETj ZrhvecvoNs/Z19hHBa4NtvCl0EfvrXEYHEdNQ9wsedRXJ/qR8PihAlKP10ML25KWn8YI tIRA== X-Gm-Message-State: AOJu0YxJqQwAQN+KpEOjBjZ6RBXbvelnNZ/lZ8+XkVL0PJCd2jM5fK1+ pP55waFQkGLwK7rs6WO8bAMLBQGp2INcyA+u+dtjPlP0EdZ8xaWUfITLREbr9W2qhXEPg/H5jU4 = X-Google-Smtp-Source: AGHT+IF5ujFRkwOP55BlIw1cbRp7a5E9Ub1z36GcCR65nDdw4WLhkgsaaFcxuA6JhcSbFMJ2OgtpNg== X-Received: by 2002:adf:fc07:0:b0:33b:381f:a89d with SMTP id i7-20020adffc07000000b0033b381fa89dmr2590949wrr.67.1707139956605; Mon, 05 Feb 2024 05:32:36 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUzG0P9zKzwFHwq5DPm4P9WDTXo3Zio+7hklMnfnsR5ZTOxFq+l7Aqqzb3rFGSatuJAUaPnHDX7I0n1fg8v7aPhvjDIsY42b2FhjXJRSW9pGCldwZTGy8+jl8BqgNMT7rDsN0WOdDG48EnSZ75tczgGbRCqN7de3njxXpq9UMLcU+Wzsi5Uzldk91rLha61HW8jwbDJWtGQN7avnT+dRarUUie1fDPZhpHozEAHlpjVA4shmyUOXSRZ5INT2kXwEdxTEUA/togY1DNLDDEMeFkiy2B1COzJJtqHOBYWylo= Message-ID: Date: Mon, 5 Feb 2024 14:32:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 8/8] consolidate do_bug_frame() / bug_fn_t Content-Language: en-US From: Jan Beulich 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 , Michal Orzel , Volodymyr Babchuk References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1707139977995100001 Content-Type: text/plain; charset="utf-8" The type not being used in do_bug_frame() is suspicious. Apparently that's solely because the type uses a pointer-to-const parameter, when so far run_in_exception_handler() wanted functions taking pointer- to-non-const. Expand use of const, in turn requiring common code's do_bug_frame() as well as [gs]et_irq_regs() to also gain const. This then brings the former function also closer to the common one, with Arm's use of vaddr_t remaining as a difference. While there also replace the bogus use of hard tabs in [gs]et_irq_regs() (I clearly didn't mean to put it in like this). Signed-off-by: Jan Beulich Acked-by: Julien Grall Reviewed-by: Andrew Cooper --- This is an alternative proposal to https://lists.xen.org/archives/html/xen-devel/2023-12/msg01385.html. --- v3: Retain / extend use of const. Make part of series. v2: [skipped] --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -220,7 +220,7 @@ void do_IRQ(struct cpu_user_regs *regs, { struct irq_desc *desc =3D irq_to_desc(irq); struct irqaction *action; - struct cpu_user_regs *old_regs =3D set_irq_regs(regs); + const struct cpu_user_regs *old_regs =3D set_irq_regs(regs); =20 perfc_incr(irqs); =20 --- a/xen/arch/x86/include/asm/processor.h +++ b/xen/arch/x86/include/asm/processor.h @@ -409,8 +409,7 @@ static always_inline void rep_nop(void) void show_code(const struct cpu_user_regs *regs); void show_stack_overflow(unsigned int cpu, const struct cpu_user_regs *reg= s); void show_registers(const struct cpu_user_regs *regs); -#define dump_execution_state() \ - run_in_exception_handler(show_execution_state_nonconst) +#define dump_execution_state() run_in_exception_handler(show_execution_sta= te) void show_page_walk(unsigned long addr); void noreturn fatal_trap(const struct cpu_user_regs *regs, bool show_remot= e); =20 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1896,7 +1896,7 @@ void do_IRQ(struct cpu_user_regs *regs) struct irq_desc *desc; unsigned int vector =3D (uint8_t)regs->entry_vector; int irq =3D this_cpu(vector_irq)[vector]; - struct cpu_user_regs *old_regs =3D set_irq_regs(regs); + const struct cpu_user_regs *old_regs =3D set_irq_regs(regs); =20 perfc_incr(irqs); this_cpu(irq_count)++; --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -643,7 +643,7 @@ void show_stack_overflow(unsigned int cp printk("\n"); } =20 -void show_execution_state(const struct cpu_user_regs *regs) +void cf_check show_execution_state(const struct cpu_user_regs *regs) { /* Prevent interleaving of output. */ unsigned long flags =3D console_lock_recursive_irqsave(); @@ -655,11 +655,6 @@ void show_execution_state(const struct c console_unlock_recursive_irqrestore(flags); } =20 -void cf_check show_execution_state_nonconst(struct cpu_user_regs *regs) -{ - show_execution_state(regs); -} - void vcpu_show_execution_state(struct vcpu *v) { unsigned long flags =3D 0; --- a/xen/common/bug.c +++ b/xen/common/bug.c @@ -10,7 +10,7 @@ * Returns a negative value in case of an error otherwise * BUGFRAME_{run_fn, warn, bug, assert} */ -int do_bug_frame(struct cpu_user_regs *regs, unsigned long pc) +int do_bug_frame(const struct cpu_user_regs *regs, unsigned long pc) { const struct bug_frame *bug =3D NULL; const struct virtual_region *region; @@ -44,14 +44,10 @@ int do_bug_frame(struct cpu_user_regs *r =20 if ( id =3D=3D BUGFRAME_run_fn ) { - void (*fn)(struct cpu_user_regs *) =3D bug_ptr(bug); + bug_fn_t *fn =3D bug_ptr(bug); =20 fn(regs); =20 - /* Re-enforce consistent types, because of the casts involved. */ - if ( false ) - run_in_exception_handler(fn); - return id; } =20 --- a/xen/common/irq.c +++ b/xen/common/irq.c @@ -1,7 +1,7 @@ #include #include =20 -DEFINE_PER_CPU(struct cpu_user_regs *, irq_regs); +DEFINE_PER_CPU(const struct cpu_user_regs *, irq_regs); =20 int init_one_irq_desc(struct irq_desc *desc) { --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -135,7 +135,7 @@ static void cf_check show_handlers(unsig =20 static cpumask_t dump_execstate_mask; =20 -void cf_check dump_execstate(struct cpu_user_regs *regs) +void cf_check dump_execstate(const struct cpu_user_regs *regs) { unsigned int cpu =3D smp_processor_id(); =20 --- a/xen/drivers/char/ehci-dbgp.c +++ b/xen/drivers/char/ehci-dbgp.c @@ -1246,14 +1246,14 @@ static int cf_check ehci_dbgp_getc(struc /* Safe: ehci_dbgp_poll() runs as timer handler, so not reentrant. */ static struct serial_port *poll_port; =20 -static void cf_check _ehci_dbgp_poll(struct cpu_user_regs *regs) +static void cf_check _ehci_dbgp_poll(const struct cpu_user_regs *regs) { struct serial_port *port =3D poll_port; struct ehci_dbgp *dbgp =3D port->uart; unsigned long flags; unsigned int timeout =3D MICROSECS(DBGP_CHECK_INTERVAL); bool empty =3D false; - struct cpu_user_regs *old_regs; + const struct cpu_user_regs *old_regs; =20 if ( !dbgp->ehci_debug ) return; --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -206,11 +206,11 @@ static void cf_check ns16550_interrupt(i /* Safe: ns16550_poll() runs as softirq so not reentrant on a given CPU. */ static DEFINE_PER_CPU(struct serial_port *, poll_port); =20 -static void cf_check __ns16550_poll(struct cpu_user_regs *regs) +static void cf_check __ns16550_poll(const struct cpu_user_regs *regs) { struct serial_port *port =3D this_cpu(poll_port); struct ns16550 *uart =3D port->uart; - struct cpu_user_regs *old_regs; + const struct cpu_user_regs *old_regs; =20 if ( uart->intr_works ) return; /* Interrupts work - no more polling */ --- a/xen/drivers/char/xhci-dbc.c +++ b/xen/drivers/char/xhci-dbc.c @@ -1164,7 +1164,7 @@ static void cf_check dbc_uart_poll(void struct dbc_uart *uart =3D port->uart; struct dbc *dbc =3D &uart->dbc; unsigned long flags =3D 0; - struct cpu_user_regs *old_regs; + const struct cpu_user_regs *old_regs; =20 if ( spin_trylock_irqsave(&port->tx_lock, flags) ) { --- a/xen/include/xen/bug.h +++ b/xen/include/xen/bug.h @@ -101,8 +101,7 @@ typedef void bug_fn_t(const struct cpu_u =20 #ifndef run_in_exception_handler =20 -static void always_inline run_in_exception_handler( - void (*fn)(struct cpu_user_regs *regs)) +static void always_inline run_in_exception_handler(bug_fn_t *fn) { BUG_FRAME(BUGFRAME_run_fn, 0, fn, 0, NULL); } @@ -133,7 +132,7 @@ static void always_inline run_in_excepti * Returns a negative value in case of an error otherwise * BUGFRAME_{run_fn, warn, bug, assert} */ -int do_bug_frame(struct cpu_user_regs *regs, unsigned long pc); +int do_bug_frame(const struct cpu_user_regs *regs, unsigned long pc); =20 #endif /* CONFIG_GENERIC_BUG_FRAME */ =20 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -134,21 +134,22 @@ void cf_check irq_actor_none(struct irq_ * Per-cpu interrupted context register state - the inner-most interrupt f= rame * on the stack. */ -DECLARE_PER_CPU(struct cpu_user_regs *, irq_regs); +DECLARE_PER_CPU(const struct cpu_user_regs *, irq_regs); =20 -static inline struct cpu_user_regs *get_irq_regs(void) +static inline const struct cpu_user_regs *get_irq_regs(void) { - return this_cpu(irq_regs); + return this_cpu(irq_regs); } =20 -static inline struct cpu_user_regs *set_irq_regs(struct cpu_user_regs *new= _regs) +static inline const struct cpu_user_regs *set_irq_regs( + const struct cpu_user_regs *new_regs) { - struct cpu_user_regs *old_regs, **pp_regs =3D &this_cpu(irq_regs); + const struct cpu_user_regs *old_regs, **pp_regs =3D &this_cpu(irq_regs= ); =20 - old_regs =3D *pp_regs; - *pp_regs =3D new_regs; + old_regs =3D *pp_regs; + *pp_regs =3D new_regs; =20 - return old_regs; + return old_regs; } =20 struct domain; --- a/xen/include/xen/kernel.h +++ b/xen/include/xen/kernel.h @@ -110,8 +110,7 @@ extern const unsigned int xen_config_dat struct cpu_user_regs; struct vcpu; =20 -void show_execution_state(const struct cpu_user_regs *regs); -void cf_check show_execution_state_nonconst(struct cpu_user_regs *regs); +void cf_check show_execution_state(const struct cpu_user_regs *regs); void vcpu_show_execution_state(struct vcpu *v); =20 #endif /* _LINUX_KERNEL_H */ --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -173,7 +173,7 @@ extern char *print_tainted(char *str); extern void add_taint(unsigned int taint); =20 struct cpu_user_regs; -void cf_check dump_execstate(struct cpu_user_regs *regs); +void cf_check dump_execstate(const struct cpu_user_regs *regs); =20 void init_constructors(void);