From patchwork Mon Jan 22 13:48:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13525498 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8CD6CC47DDB for ; Mon, 22 Jan 2024 13:48:34 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.669903.1042403 (Exim 4.92) (envelope-from ) id 1rRuf0-0007MF-Hj; Mon, 22 Jan 2024 13:48:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 669903.1042403; Mon, 22 Jan 2024 13:48:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRuf0-0007M8-Ec; Mon, 22 Jan 2024 13:48:22 +0000 Received: by outflank-mailman (input) for mailman id 669903; Mon, 22 Jan 2024 13:48:22 +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 1rRuf0-0007Lx-1r for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 13:48:22 +0000 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [2a00:1450:4864:20::231]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e6f1ea63-b92c-11ee-9b0f-b553b5be7939; Mon, 22 Jan 2024 14:48:20 +0100 (CET) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2cd0d05838fso36520391fa.1 for ; Mon, 22 Jan 2024 05:48:20 -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 cw13-20020a05663849cd00b0046e627dbc4csm3035114jab.121.2024.01.22.05.48.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 05:48:19 -0800 (PST) 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: e6f1ea63-b92c-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705931299; x=1706536099; 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=F6sfSK5/SEtKGPEcmvIsDK1a/u9AKBGy1bR54EVhbWU=; b=OkSR/V9YdLw27FJ3+jZ+yGWSCEr+yYIVAjEQLVa02rFBDSG8I+LEM+FUIHsP1yBFAX bnGDrnR7HCk3lkkAM19hCjOKP880fNZvXCToqSbyIRn+YCBT7hxy/CAv1TkgfnbD0HKT oTprAv7y50N2S4i2N1+6DViK6UxIcANVkTwpNmQubBWiOFX35IIgGK743DBk1wCRkfUW /GfKFKkSIJ6jIrLqBJ3NC3al/nAUrpYtVtQ72KgrHRJrY2mopshHks+E87GOjxXnmRjq cBhhGDpLTzLvlCiHKKrLAJc2/byUA/03guijnWZ6C3miPy3i3JH+23ct4tIlvv5pPUpv UPeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705931299; x=1706536099; 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=F6sfSK5/SEtKGPEcmvIsDK1a/u9AKBGy1bR54EVhbWU=; b=N4N4C4LE1G8aEV7NG98ygFEY9U9vBBwJWQ1YyM3iMXsKr1oqMFjDpAIpVbYxtiwxHz shltwzrdbPwuYpH0h1myohdbMC8j4Y5mQdPc8myyat96oc2dmqj61Mnb6nsGxWJcp9iX hmTFgUypZqOUiXB3ult3ypVWDsf0jWuV9R9LScjv1AEKx81JgwtNFyC8ooLBQHKIGMSd p1jrNthtatmD9lfhLx2E7y6UFYt2DrlXdeLoasRKOPLaut4joa0V52CXg8OGkE9g+SEw 6cj9dnect4L6nFNjGs8F3n+2JEeHKQnWrbLuzKd+oMBstohHX+jq8VSs9BNIs/MmnkUm qNSA== X-Gm-Message-State: AOJu0YxIF8RSWwhtfyH2rjtmF+DT8fVhw54b+W8hiLF+pkq03ej+vRzt 5pJ624W/JljB9XX7pYPMZqqpqlzXLNJIcANP2ty/le6jAkdswYtxNhuxPfa0Jc7AQBHlKpjf3BY = X-Google-Smtp-Source: AGHT+IEy0es+DcUtS81PJaJXL6AOMKdRsEhFyA0WPkwSR99PlWMJIilCPgx048+qJuGD0Z+dZczjLA== X-Received: by 2002:a2e:b0f4:0:b0:2cc:603f:5cd7 with SMTP id h20-20020a2eb0f4000000b002cc603f5cd7mr1722201ljl.6.1705931299498; Mon, 22 Jan 2024 05:48:19 -0800 (PST) Message-ID: <03da16df-2d31-495e-9757-17e329b89d8d@suse.com> Date: Mon, 22 Jan 2024 14:48:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 1/8] IRQ: generalize [gs]et_irq_regs() 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 References: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> Content-Language: en-US Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwG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lNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> Move functions (and their data) to common code, and invoke the functions on Arm as well. This is in preparation of dropping the register parameters from handler functions. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Reviewed-by: Julien Grall --- To limit visibility of the per-CPU data item, we may want to consider making the functions out-of-line ones (in common/irq.c). --- v2: Add a blank line. --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -221,6 +221,7 @@ void do_IRQ(struct cpu_user_regs *regs, { struct irq_desc *desc = irq_to_desc(irq); struct irqaction *action; + struct cpu_user_regs *old_regs = set_irq_regs(regs); perfc_incr(irqs); @@ -288,6 +289,7 @@ out: out_no_end: spin_unlock(&desc->lock); irq_exit(); + set_irq_regs(old_regs); } void release_irq(unsigned int irq, const void *dev_id) --- a/xen/arch/x86/include/asm/irq.h +++ b/xen/arch/x86/include/asm/irq.h @@ -70,27 +70,6 @@ extern bool opt_noirqbalance; extern int opt_irq_vector_map; -/* - * Per-cpu current frame pointer - the location of the last exception frame on - * the stack - */ -DECLARE_PER_CPU(struct cpu_user_regs *, __irq_regs); - -static inline struct cpu_user_regs *get_irq_regs(void) -{ - return this_cpu(__irq_regs); -} - -static inline struct cpu_user_regs *set_irq_regs(struct cpu_user_regs *new_regs) -{ - struct cpu_user_regs *old_regs, **pp_regs = &this_cpu(__irq_regs); - - old_regs = *pp_regs; - *pp_regs = new_regs; - return old_regs; -} - - #define platform_legacy_irq(irq) ((irq) < 16) void cf_check event_check_interrupt(struct cpu_user_regs *regs); --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -53,8 +53,6 @@ static DEFINE_SPINLOCK(vector_lock); DEFINE_PER_CPU(vector_irq_t, vector_irq); -DEFINE_PER_CPU(struct cpu_user_regs *, __irq_regs); - static LIST_HEAD(irq_ratelimit_list); static DEFINE_SPINLOCK(irq_ratelimit_lock); static struct timer irq_ratelimit_timer; --- a/xen/common/irq.c +++ b/xen/common/irq.c @@ -1,6 +1,8 @@ #include #include +DEFINE_PER_CPU(struct cpu_user_regs *, irq_regs); + int init_one_irq_desc(struct irq_desc *desc) { int err; --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -131,6 +131,27 @@ void cf_check irq_actor_none(struct irq_ #define irq_disable_none irq_actor_none #define irq_enable_none irq_actor_none +/* + * Per-cpu interrupted context register state - the inner-most interrupt frame + * on the stack. + */ +DECLARE_PER_CPU(struct cpu_user_regs *, irq_regs); + +static inline struct cpu_user_regs *get_irq_regs(void) +{ + return this_cpu(irq_regs); +} + +static inline struct cpu_user_regs *set_irq_regs(struct cpu_user_regs *new_regs) +{ + struct cpu_user_regs *old_regs, **pp_regs = &this_cpu(irq_regs); + + old_regs = *pp_regs; + *pp_regs = new_regs; + + return old_regs; +} + struct domain; struct vcpu; From patchwork Mon Jan 22 13:48:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13525503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E019CC47DAF for ; Mon, 22 Jan 2024 13:49:11 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.669913.1042452 (Exim 4.92) (envelope-from ) id 1rRuff-0001YW-Pz; Mon, 22 Jan 2024 13:49:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 669913.1042452; Mon, 22 Jan 2024 13:49:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRuff-0001YN-NI; Mon, 22 Jan 2024 13:49:03 +0000 Received: by outflank-mailman (input) for mailman id 669913; Mon, 22 Jan 2024 13:49:02 +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 1rRufe-0007Lx-Lp for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 13:49:02 +0000 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [2a00:1450:4864:20::234]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ff5cc492-b92c-11ee-9b0f-b553b5be7939; Mon, 22 Jan 2024 14:49:01 +0100 (CET) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2cddb2c2b54so29739741fa.1 for ; Mon, 22 Jan 2024 05:49:00 -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 cw13-20020a05663849cd00b0046e627dbc4csm3035114jab.121.2024.01.22.05.48.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 05:49:00 -0800 (PST) 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: ff5cc492-b92c-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705931340; x=1706536140; 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=ozjB5J6HgFQRbYi1xrcNJWW3dzIQpHOtBsFN5IPmgeU=; b=AmmVygo/CZDpNNYwne3iqjpqKGlfPkj3QXiSh4K/lOkYQo1yva/OK0gpNDDMGVzO35 +qd/vVY/gkRXc7ByIgPZFAOzPdzfrxTDjVYPNTVwtFqaTsa4dX2w1TznF6/BsO0t04U8 +6XEtPtyKpmp9acvcE0ZmXr/3dww4sM5t1rjsI4kbitJ03+mr6/0JBx4Dbl3HonUngU1 Z4hxh8nHDdm2Rguzr31jyevYCbAkvzUnECPQxRJrx8dPbyQY3DS5rJ4WH4+AY3u9cKVN PualTACx86V+99qCnEwdW/8WiQE+hhJEAxCSFGfRxwuhD9Hum1wTKiSaKgVuayoFwV6Z b1EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705931340; x=1706536140; 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=ozjB5J6HgFQRbYi1xrcNJWW3dzIQpHOtBsFN5IPmgeU=; b=PE9otAvDwFSNj1sdZwFX+vlbAsniI20H8U9Xdzz3L2qFR1TfWvFXafxPH5VGRI5h2u VKQEpn3BFZKa5ATCwUE4xhTz5jlIXlNrTL1EdA500MkJYC9nskwHmPJEpiiiHZNiJmTN MbOxsp/1w1NI6C0MnnNfkqTch62jUx0BW1XAIiw8lJiw3eqBTfgHVxsp0Ra1RhDAxTKZ k0X48KAp/UiT2NHlXcuNzf2Z2cOfrfkamRcY8DfVlrb2qH4kv3zCr0ErCeiBvDN9m6/t Q13uT2r1X20OyXBZ44FbdDomSiSR965JExbQ2VXfoZ3MmSYKv8BJTO1zitXTY/Of4CQL z09Q== X-Gm-Message-State: AOJu0Yx5mn9Xiq3jfB40UnrqKH+Ir3g1309Zvd75SNRlgII+kCbwqKZy p7VI1AkgaKg70DEWowbLmiG/roc90dobo5rOskkQ9ao+Uyx2LWEKoQyhy3+10K3QLeYj+6Q1tPU = X-Google-Smtp-Source: AGHT+IFKt7nIuw0Mpt1DPTm+e+/wh44JMrTgeYWpK7fTmq9NxDSx1vv6RLdBKm/+/ANeQip6xgkt3A== X-Received: by 2002:a2e:a992:0:b0:2cc:7814:11b with SMTP id x18-20020a2ea992000000b002cc7814011bmr2504641ljq.65.1705931340676; Mon, 22 Jan 2024 05:49:00 -0800 (PST) Message-ID: <058e0b9f-51f8-4e20-a328-20b968e8ebb0@suse.com> Date: Mon, 22 Jan 2024 14:48:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 2/8] serial: fake IRQ-regs context in poll handlers Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu , Marek Marczykowski References: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpB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bMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> 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 = MICROSECS(DBGP_CHECK_INTERVAL); bool empty = false; + struct cpu_user_regs *old_regs; if ( !dbgp->ehci_debug ) return; @@ -1268,12 +1269,17 @@ static void cf_check _ehci_dbgp_poll(str spin_unlock_irqrestore(&port->tx_lock, flags); } + /* Mimic interrupt context. */ + old_regs = set_irq_regs(regs); + if ( dbgp->in.chunk ) serial_rx_interrupt(port, regs); if ( empty ) serial_tx_interrupt(port, regs); + set_irq_regs(old_regs); + if ( spin_trylock_irqsave(&port->tx_lock, flags) ) { if ( dbgp->state == 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 = this_cpu(poll_port); struct ns16550 *uart = port->uart; + struct cpu_user_regs *old_regs; if ( uart->intr_works ) return; /* Interrupts work - no more polling */ + /* Mimic interrupt context. */ + old_regs = 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); out: + set_irq_regs(old_regs); set_timer(&uart->timer, NOW() + MILLISECS(uart->timeout_ms)); } --- 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 = port->uart; struct dbc *dbc = &uart->dbc; unsigned long flags = 0; + struct cpu_user_regs *old_regs; 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); } + /* Mimic interrupt context. */ + old_regs = set_irq_regs(guest_cpu_user_regs()); + while ( dbc_work_ring_size(&dbc->dbc_iwork) ) serial_rx_interrupt(port, guest_cpu_user_regs()); serial_tx_interrupt(port, guest_cpu_user_regs()); + + set_irq_regs(old_regs); set_timer(&uart->timer, NOW() + MICROSECS(DBC_POLL_INTERVAL)); } From patchwork Mon Jan 22 13:49:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13525504 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7126BC4725D for ; Mon, 22 Jan 2024 13:49:34 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.669920.1042463 (Exim 4.92) (envelope-from ) id 1rRug3-0002JO-6l; Mon, 22 Jan 2024 13:49:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 669920.1042463; Mon, 22 Jan 2024 13:49:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRug3-0002JH-35; Mon, 22 Jan 2024 13:49:27 +0000 Received: by outflank-mailman (input) for mailman id 669920; Mon, 22 Jan 2024 13:49:25 +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 1rRug1-0007Lx-FT for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 13:49:25 +0000 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [2a00:1450:4864:20::231]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 0cf04a59-b92d-11ee-9b0f-b553b5be7939; Mon, 22 Jan 2024 14:49:23 +0100 (CET) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2cd880ceaf2so34543561fa.2 for ; Mon, 22 Jan 2024 05:49:23 -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 cw13-20020a05663849cd00b0046e627dbc4csm3035114jab.121.2024.01.22.05.49.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 05:49:22 -0800 (PST) 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: 0cf04a59-b92d-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705931363; x=1706536163; 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=Ro3tacV+Cx2+fVIZpZoKa/X2F9kQbo9bRfxSzAFGBaM=; b=eEeR5Q8k0zH+TxAn28OQbOUSx5MVJPKHjFWez0XZGTUZ/oAETTlqJguTaHz23d9qqJ 4CpNWg+wGAo0FsIgcd31Cw000mpOzpJARJlvF5NIhn9SaTzZKkh//zMtcOqOxzkLXxqf lFidsM35nUQQK4W+yA1fmrI50aqFvYrHHaqX34CYVvuBr3X84STQeaLdxee4IPpfirDh 9F5d5GTnXUVPsx22gFQv2Tj0TpOjTALBftPa7yIZfUb9U2d/sPtMMHSvI858PPOz4+UG po5mXT6m8cpTOK3XRpv17mjK/lAMzdshUsqjoUBKKzjaS3caeqzayq1qOiYar+/L9h1V RTOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705931363; x=1706536163; 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=Ro3tacV+Cx2+fVIZpZoKa/X2F9kQbo9bRfxSzAFGBaM=; b=ckw8htldl1QgQ7gfVgbgcsCqUEyXftCH50vQZI/wStqJDgusuOooT0nFUUYfG77+aO xiXW4D+JUUWI1lgodMpYs0NExlliHSNNZCRdovxseLjigwDDwvhtqrszh+y8UWr7S12P 462MhUuO9BLarks/tGdb0IGsEghJgQqJtJ9loHeqLORa3pKPg8i1XBNAOhodizy6Tdtv RSmvdHw8AcYHSq/XRhYsuRp7BWz/3pgS3MZw+uRZgGUZzZsptRceVahspNgG0OPs7Qz6 VWqoTyIbucXQy4spuX32LJhfZhWJ7yThZGXp+xlt3gzJxrCcz0hOUp+X6MQnxYobpPXY RscQ== X-Gm-Message-State: AOJu0YweoOyHPrWF7lcGzhIBj3ZQWSiQuPDr/rVEB+sU37tYdZBE8LqY ASkUoEF77QH+h+qMGPodUvQUZgHZ3SVIWSMWobhlRaT4kH/Pne9Mik+BpsHb+pLBhe9Xb5PY8zw = X-Google-Smtp-Source: AGHT+IHL1dfd46V/LaVagjznxYEfU6kkJwJnBT3ES4IVsZM41AhQHWRiwerW0sYtTUXVhzG2lMIaZA== X-Received: by 2002:a2e:a54e:0:b0:2cc:c6e0:fbb with SMTP id e14-20020a2ea54e000000b002ccc6e00fbbmr2264172ljn.20.1705931363314; Mon, 22 Jan 2024 05:49:23 -0800 (PST) Message-ID: <34fba5ac-84e2-477f-8333-afd39c54ad71@suse.com> Date: Mon, 22 Jan 2024 14:49:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 3/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: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 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b@suse.com> 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 --- 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(). --- v2: New. --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -76,12 +76,12 @@ static struct keyhandler { static void cf_check keypress_action(void *unused) { - handle_keypress(keypress_key, NULL); + handle_keypress(keypress_key, true); } static DECLARE_TASKLET(keypress_tasklet, keypress_action, NULL); -void handle_keypress(unsigned char key, struct cpu_user_regs *regs) +void handle_keypress(unsigned char key, bool need_context) { struct keyhandler *h; @@ -91,7 +91,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 @@ -172,7 +172,7 @@ void cf_check dump_execstate(struct cpu_ } static void cf_check dump_registers( - unsigned char key, struct cpu_user_regs *regs) + unsigned char key, bool need_context) { unsigned int cpu; @@ -185,8 +185,8 @@ static void cf_check dump_registers( cpumask_copy(&dump_execstate_mask, &cpu_online_map); /* 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); @@ -248,8 +248,7 @@ static void cf_check dump_hwdom_register } } -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); @@ -477,8 +476,7 @@ static void cf_check run_all_nonirq_keyh static DECLARE_TASKLET(run_all_keyhandlers_tasklet, run_all_nonirq_keyhandlers, NULL); -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_context) { struct keyhandler *h; unsigned int k; @@ -494,7 +492,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); } watchdog_enable(); @@ -511,17 +509,16 @@ static void cf_check do_debugger_trap_fa barrier(); } -static void cf_check do_debug_key(unsigned char key, struct cpu_user_regs *regs) +static void cf_check do_debug_key(unsigned char key, bool need_context) { printk("'%c' pressed -> trapping into debugger\n", key); - if ( regs ) - do_debugger_trap_fatal(regs); + if ( !need_context ) + do_debugger_trap_fatal(get_irq_regs() ?: guest_cpu_user_regs()); else run_in_exception_handler(do_debugger_trap_fatal); } -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 = !alt_key_handling; printk("'%c' pressed -> using %s key handling\n", key, @@ -586,7 +583,7 @@ void keyhandler_crash_action(enum crash_ if ( *action == '+' ) 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 = 0; copyback = 0; --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -280,7 +280,7 @@ static int *__read_mostly upper_thresh_a static int *__read_mostly lower_thresh_adj = &xenlog_lower_thresh; static const char *__read_mostly thresh_adj = "standard"; -static void cf_check do_toggle_guest(unsigned char key, struct cpu_user_regs *regs) +static void cf_check do_toggle_guest(unsigned char key, bool unused) { if ( upper_thresh_adj == &xenlog_upper_thresh ) { @@ -307,13 +307,13 @@ static void do_adj_thresh(unsigned char loglvl_str(*upper_thresh_adj)); } -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); } -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; @@ -532,7 +532,7 @@ static void __serial_rx(char c, struct c switch ( console_rx ) { case 0: - return handle_keypress(c, regs); + return handle_keypress(c, false); 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); /* Initialize keytable with default handlers. */ void initialize_keytable(void); @@ -46,7 +45,7 @@ void register_irq_keyhandler(unsigned ch bool diagnostic); /* 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); enum crash_reason { CRASHREASON_PANIC, From patchwork Mon Jan 22 13:49:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13525505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F084C47DAF for ; Mon, 22 Jan 2024 13:50:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.669925.1042472 (Exim 4.92) (envelope-from ) id 1rRugb-00033p-Dg; Mon, 22 Jan 2024 13:50:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 669925.1042472; Mon, 22 Jan 2024 13:50:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRugb-00033i-Av; Mon, 22 Jan 2024 13:50:01 +0000 Received: by outflank-mailman (input) for mailman id 669925; Mon, 22 Jan 2024 13:50:00 +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 1rRuga-00033S-BC for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 13:50:00 +0000 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [2a00:1450:4864:20::229]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 223ddf2a-b92d-11ee-98f2-6d05b1d4d9a1; Mon, 22 Jan 2024 14:49:59 +0100 (CET) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2cd0f4f306fso34229151fa.0 for ; Mon, 22 Jan 2024 05:49:59 -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 cw13-20020a05663849cd00b0046e627dbc4csm3035114jab.121.2024.01.22.05.49.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 05:49:58 -0800 (PST) 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: 223ddf2a-b92d-11ee-98f2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705931399; x=1706536199; 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=fK812nh3pwQPfsrNIv1f+BF+0piaboacJxzlQr2GGy0=; b=R4fqUeCDcja18SrSTNOLMA2HKNfrm9StTtSf2UQX83E/RYsogow/JVmx4H4SLjWN/w qsl3lsBImX07uGtZy2ogiuIXjpAGYjy9PqnobZaOUBR8Kbb3kM4lVhlfYIX6/v12cgOP jIYzUvRXJVBViQyaQ4/HUJEwzfDFdto+wMDTf9/cMIrUmk+/T85jxwiU0bmA6xuBo+ta N9qWaANmPxr2qQPlzDZsKPDdfDGnaqmmwZlA0ZDldX2Yoa3nJtN+IsOD3KYDM2vFUWaA eQVItdgND5dBq9VJIaPR+8gsGKbo2FrCod4nzDVHu4rp/3zq9dl5RBcQnfIgNQdKi5yP HtMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705931399; x=1706536199; 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=fK812nh3pwQPfsrNIv1f+BF+0piaboacJxzlQr2GGy0=; b=JTTrTg0zc7Ip4pDyEVfrU8nUEhc6Tsw1HdbsU6tbM/+yP6MksfvLf9yeJAgmR8sHb6 a2Wpmmrc6TWIA/TkMV53ovvpo3/q80wPdmLLPkPJMkI9E7YFZtlGHUfqcQBaaAz4Jwel 3u/DFivQ5nlIk/R9aljgm07dYNXsm1uyo2zSC1w54dxYFn1xhs5vq7Ertt6xmHPmQvIk Il3WngTiexs4e0z/v4bc8o+/VlKyotNQqSqLjBzsdO/IPEcqW+/d9DKOtwBUPVaW3EQF N5X1RTj5aUEGFkDE7qN5REPXhIpe1diLtsRucTnmOdMVq4vjYhDYbK3QasmdDQnhUhJO w0JA== X-Gm-Message-State: AOJu0YzLLLdxbnypixbd47p2QTrlcMuonpxuJaojOqpygUaSr8QAXxzN T+MerZXGhAi1lmMhze7TXAo5EYXa1Yb/hP+ERNzNIKTarKFBGaDv9KKjmYDqHLQoMKlpjV867tA = X-Google-Smtp-Source: AGHT+IE96fWGY9pXTRhdgZ9fOaNrkfVlRgARYOkoM9WlLoFdZqXQPkZr3zU0l/ezxypZ6QqAzAIrDg== X-Received: by 2002:a2e:8201:0:b0:2cd:1d5d:322b with SMTP id w1-20020a2e8201000000b002cd1d5d322bmr1673216ljg.57.1705931399219; Mon, 22 Jan 2024 05:49:59 -0800 (PST) Message-ID: <851cd74b-0fba-44b7-9f81-cd49c25b748f@suse.com> Date: Mon, 22 Jan 2024 14:49:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 4/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: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> 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: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> It's simply not needed anymore. Signed-off-by: Jan Beulich --- v2: Re-base over earlier (new/split) patches. --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -527,7 +527,7 @@ static void switch_serial_input(void) printk("\n"); } -static void __serial_rx(char c, struct cpu_user_regs *regs) +static void __serial_rx(char c) { switch ( console_rx ) { @@ -579,7 +579,7 @@ static void __serial_rx(char c, struct c #endif } -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 = 0; @@ -595,10 +595,10 @@ static void cf_check serial_rx(char c, s } for ( ; switch_code_count != 0; switch_code_count-- ) - __serial_rx(switch_code, regs); + __serial_rx(switch_code); /* Finally process the just-received character. */ - __serial_rx(c, regs); + __serial_rx(c); } 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); if ( fn != NULL ) - (*fn)(c & 0x7f, regs); + fn(c & 0x7f); } void serial_tx_interrupt(struct serial_port *port, struct cpu_user_regs *regs) --- 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 = cons_ring->in[MASK_XENCONS_IDX(cons++, cons_ring->in)]; if ( cons_rx_handler ) - cons_rx_handler(c, regs); + cons_rx_handler(c); recv++; } --- a/xen/include/xen/serial.h +++ b/xen/include/xen/serial.h @@ -15,7 +15,7 @@ struct cpu_user_regs; /* 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); /* Number of characters we buffer for a polling receiver. */ From patchwork Mon Jan 22 13:50:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13525529 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9F72C47DAF for ; Mon, 22 Jan 2024 14:08:42 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.669958.1042523 (Exim 4.92) (envelope-from ) id 1rRuyQ-0001Ns-0q; Mon, 22 Jan 2024 14:08:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 669958.1042523; Mon, 22 Jan 2024 14:08:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRuyP-0001Nl-Tl; Mon, 22 Jan 2024 14:08:25 +0000 Received: by outflank-mailman (input) for mailman id 669958; Mon, 22 Jan 2024 14:08:24 +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 1rRuh6-0007Lx-R9 for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 13:50:32 +0000 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [2a00:1450:4864:20::236]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 352ead07-b92d-11ee-9b0f-b553b5be7939; Mon, 22 Jan 2024 14:50:31 +0100 (CET) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2cdeb80fdfdso34057841fa.2 for ; Mon, 22 Jan 2024 05:50:31 -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 cw13-20020a05663849cd00b0046e627dbc4csm3035114jab.121.2024.01.22.05.50.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 05:50:30 -0800 (PST) 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: 352ead07-b92d-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705931431; x=1706536231; 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=HOMvVrCr86rjfwSJ9F53Aa4gr7n7Q3jgMH7hioghRIWohIc++9d7k02CXAVptry/n1 bDmsBfl/LF8aww6gbyKBnDM6is9sRspcm+7xNd4IfZ3ovkdrtLw1ZBMDwdSDI12codRO Y0xyZOiadsPuM50bkAnyBbzbOBKDi8RMIxQmUZt4Y8pw/Lcv0489S2AwvxMnQIc5vLIA e8DVPm5RT65AFa7ncjRuS/U9mK6TfAVSsy5iMjWFHLin44QCPLu1yK1WoDPV+s+VTleQ czZtIr55fcBZYSYOOxz6zUihpZX4AKDs1Q8r8WUKgYcF/kU/R57h/jt0PlJH2fwz2iHG T4WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705931431; x=1706536231; 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=v6+J7b4uO/usdmMSElFXDu1FovvPOFybarEsWhlwPT0qyG9Nh7UbCBQUBE6akFUaHQ krIq6+mrnn+IWEHjB102VoJst7DLChB5W2oOtRAjE+t2Ob1rF2GQ8FDN2cuOkykyvkCq 1HyE70cl0SP3kCnFtFx9+GH7YwS2wzh9NBLt2u2SlGS4mW6cLceAqlMXCPBXLGTyevX7 x7TiiFiFpdvfESrXbKao/he+KQRL7K2OEBRYWBs/KAfJ5SJh6NX3YnszmKSJ9IxMZCSA 1oogwwLaplzAwB3svyKxw9gbcKyHQ1qTLBHX41voYck4gJxQFV/bl4rEIE940LXn+8Tp fFTQ== X-Gm-Message-State: AOJu0Ywgh9H+xJSEx51WzBPzUr/vl++cC+/MjeynAtZZCagdt5D25uCn zJhzsRVgwm+/uS8xforqryWgZx0TlICG22Od5TCQV3bRFOkoVkRiYlR+t5A0hdOsHpXb4mNJMyc = X-Google-Smtp-Source: AGHT+IEkacxUKb+IkyqWLFq78R4UAKR5nr2WMQlZsMaoUnVrnsDn4Vy1CTXya62jS+ergCB6GpyiRA== X-Received: by 2002:a2e:a485:0:b0:2cc:dda6:44fa with SMTP id h5-20020a2ea485000000b002ccdda644famr588581lji.92.1705931430843; Mon, 22 Jan 2024 05:50:30 -0800 (PST) Message-ID: Date: Mon, 22 Jan 2024 14:50:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 5/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: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYc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cqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> 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 += l1 * BITS_PER_LONG; if ( pv_console && port == 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; } -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); #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; } #endif /* !CONFIG_XEN_GUEST */ #endif /* __XEN_PV_CONSOLE_H__ */ From patchwork Mon Jan 22 13:51:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13525506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC43BC4725D for ; Mon, 22 Jan 2024 13:51:28 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.669928.1042482 (Exim 4.92) (envelope-from ) id 1rRuhm-0004Xl-Nk; Mon, 22 Jan 2024 13:51:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 669928.1042482; Mon, 22 Jan 2024 13:51:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRuhm-0004Xe-L8; Mon, 22 Jan 2024 13:51:14 +0000 Received: by outflank-mailman (input) for mailman id 669928; Mon, 22 Jan 2024 13:51:13 +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 1rRuhl-0004XY-IT for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 13:51:13 +0000 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [2a00:1450:4864:20::22b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4d1576c0-b92d-11ee-9b0f-b553b5be7939; Mon, 22 Jan 2024 14:51:11 +0100 (CET) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2cdeb80fdfdso34067331fa.2 for ; Mon, 22 Jan 2024 05:51:11 -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 cw13-20020a05663849cd00b0046e627dbc4csm3035114jab.121.2024.01.22.05.51.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 05:51:10 -0800 (PST) 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: 4d1576c0-b92d-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705931471; x=1706536271; 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=GIs0n7VImCPALKZLXJT6DVRMX/0lelm0/pok4oh/GBA8SGvF9HNjf984nychVNr4hY AsAfEBjezel0RQQTK90p4k3y3xj786AKtA3bCUhZPJU6Y2ePrgVia2I6iehfqxZFuURj cq0ri8xTAHS3nxExCoBPFpcNLiM4rEolKS01gU2HSM4PYHq2NIo4RHmbtU7ni8/N8jhe 3kjs9+anJx0lfTwLT7XIcZSL3G5Qb/MCCM6i63DftYGgy736OzCYlEYCvAvETD93kV+f K42yHtPLw+0kEsrS6kuqsbkTEq6QGWhMROI4hmDU/Cld20x0ShwCowm6wlXAsZgvugG8 M+8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705931471; x=1706536271; 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=Rld5QhbFoL1YeUUoDMjCMnJdoCNJhLcuN3wQQD8tfeqlmzUjGKLpw5qR3rJaRqZFP+ iOCP4jtIV/dp1RmdOKFSJv4Y7+yOGWJuJsPAEB0ahcPo3l8SlHh95ONC7CoWGMDOPFPu qyLpsolIUqMtvZJwAsJL2tJi5y5bRR6PMBWUKWbzKJEorDemUVRgJIvMs9mhmET56jMS U0/HYjA2oPf+Aw2eIaCPxcEcU0+Zv+CQgL7NhDafi7l0y6niJ+LgoESGB8rnp6NaSEbB ddd73g3DdrdmXUlPJw4Vi3RXI4gMtxEUpAWSM56GO2lXxIp24GTw5ELGSPz6BGgCgQNK z8bw== X-Gm-Message-State: AOJu0YwkVlG/X5T8SnKTodTlHYhJnT6B4JmdVDJ3ppQ6PuEGZLCaPsVv bjPrIiAXsidEnx4YyJCvZqVfW9YDyGe8sUZx2ucPQgRYEwX0EUGm9nwQyIdsitnuVmctqPt0F3c = X-Google-Smtp-Source: AGHT+IGBuTNm1MoxvXDHdtdm1SYp6BAOZ9TKrCNTmDrmshgXeB12M6qM7pvuTd3OZ7uvVPSzop++OA== X-Received: by 2002:a05:651c:19a3:b0:2cd:54d:4838 with SMTP id bx35-20020a05651c19a300b002cd054d4838mr865048ljb.53.1705931470896; Mon, 22 Jan 2024 05:51:10 -0800 (PST) Message-ID: <6a40828d-35fa-458c-8b31-5768e54498d7@suse.com> Date: Mon, 22 Jan 2024 14:51:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 6/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 , Bertrand Marquis , Michal Orzel References: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata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2OV8 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: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> They're simply not needed anymore. Signed-off-by: Jan Beulich --- 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 = set_irq_regs(regs); if ( dbgp->in.chunk ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); if ( empty ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); set_irq_regs(old_regs); --- 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] |= RXD|ERROR; */ - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); /* uart->regs[UINTM] &= ~(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] |= TXD|MODEM; */ - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); /* uart->regs[UINTM] &= ~(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 = imx_lpuart_read(uart, UARTWATER) >> UARTWATER_RXCNT_OFF; if ( (sts & UARTSTAT_RDRF) || (rxcnt > 0) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); if ( sts & UARTSTAT_TDRE ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); 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 = readl(uart->regs + AML_UART_STATUS_REG); if ( !(st & AML_UART_RX_FIFO_EMPTY) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); if ( !(st & AML_UART_TX_FIFO_FULL) ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); } 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 if ( st & (STATUS_RX_RDY | STATUS_OVR_ERR | STATUS_FRM_ERR | STATUS_BRK_DET) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); if ( st & STATUS_TX_RDY ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); } 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 = ns_read_reg(uart, UART_LSR); if ( (lsr & uart->lsr_mask) == 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); /* 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; - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); } if ( ( ns_read_reg(uart, UART_LSR) & uart->lsr_mask ) == uart->lsr_mask ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); 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 = 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); if ( port->txbufc == port->txbufp ) { reg = 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)); if ( status & (RTI|RXI) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); /* TODO if ( status & (DSRMI|DCDMI|CTSMI|RIMI) ) @@ -103,7 +103,7 @@ static void pl011_interrupt(int irq, voi */ if ( status & (TXI) ) - serial_tx_interrupt(port, regs); + serial_tx_interrupt(port); status = pl011_intr_status(uart); } while (status != 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); /* RX Interrupt */ if ( status & (SCFSR_RDF | SCFSR_DR) ) - serial_rx_interrupt(port, regs); + serial_rx_interrupt(port); /* 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); } -void serial_rx_interrupt(struct serial_port *port, struct cpu_user_regs *regs) +void serial_rx_interrupt(struct serial_port *port) { char c; serial_rx_fn fn = NULL; @@ -71,7 +71,7 @@ void serial_rx_interrupt(struct serial_p fn(c & 0x7f); } -void serial_tx_interrupt(struct serial_port *port, struct cpu_user_regs *regs) +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 = set_irq_regs(guest_cpu_user_regs()); while ( dbc_work_ring_size(&dbc->dbc_iwork) ) - serial_rx_interrupt(port, guest_cpu_user_regs()); + serial_rx_interrupt(port); - serial_tx_interrupt(port, guest_cpu_user_regs()); + serial_tx_interrupt(port); 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 -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 *regs); -void serial_tx_interrupt(struct serial_port *port, struct cpu_user_regs *regs); +void serial_rx_interrupt(struct serial_port *port); +void serial_tx_interrupt(struct serial_port *port); /* * Initialisers for individual uart drivers. From patchwork Mon Jan 22 13:51:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13525507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 795F8C47DAF for ; Mon, 22 Jan 2024 13:52:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.669935.1042493 (Exim 4.92) (envelope-from ) id 1rRuiZ-000586-3x; Mon, 22 Jan 2024 13:52:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 669935.1042493; Mon, 22 Jan 2024 13:52:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRuiZ-00057z-15; Mon, 22 Jan 2024 13:52:03 +0000 Received: by outflank-mailman (input) for mailman id 669935; Mon, 22 Jan 2024 13:52:02 +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 1rRuiY-0004XY-FT for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 13:52:02 +0000 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [2a00:1450:4864:20::236]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6a526313-b92d-11ee-9b0f-b553b5be7939; Mon, 22 Jan 2024 14:52:00 +0100 (CET) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2cddb2c2b54so29773351fa.1 for ; Mon, 22 Jan 2024 05:52:00 -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 cw13-20020a05663849cd00b0046e627dbc4csm3035114jab.121.2024.01.22.05.51.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 05:51:59 -0800 (PST) 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: 6a526313-b92d-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705931520; x=1706536320; 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=SnztAn5RnbJ1KGOhJP3RqH5wwHJC2HwWQ6wc1hqi010=; b=a8eXGvUfY/sRfW27K83SRkHwaLFf5SGcm3EVpr1b9QwX++MFh+8nqn9ZX5DZ2m/7Fm wxK+PtMFfNX/rsOsrFVBRlK+iuQvis5cbTeFfIMHRfVKKiD/N8XRPuJv+l/KfCQIYfKf 1pDVzw5aM+cg/FQ9fUNpCze2HwwrxxcnwSXdHVubzngOr7tKlienERgsQVagz9LMQb81 i4v1roQe3PX06Uqg3I6FgHR/oBAi0pjdBSnpVIOUBa4FoT905P7eqELViKn4PESwbI8N apkx/oSeyZDVAIMeeW5qBkzRksb0QFevjNVj7+6g60Dq/3yfkk7JPTLPTTAHu9VV3IP7 7IZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705931520; x=1706536320; 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=SnztAn5RnbJ1KGOhJP3RqH5wwHJC2HwWQ6wc1hqi010=; b=Z1TFStF+3UiiEDF5KxE1UYACBb00vr7k+XXdZzO+Xwk3fN0zSqKiWKWhT6CT53NaUz 4MBso8ImWJvAXWdclczVvWt60hwMmYCxBAxleWM/nc5TJZ15cWPjx+yuqX0ly+7flSho BNRx4adx79gh09z8ybk3HF8oCeOvpQiNSg4CXqPJXOjjN/olvejSUPTjzpu9Aq0dZrJd 1YiL2uT5RUnLP2hKRkxHPfGce4yS/ov3Ho6ebklJeuubipOi2vVkaPohd5SA6Hv4QjDA BucWjZ9RmNkuVa1uGdtditn3H87RK9pAkgc45HBeTMwM/4wV9OprzHe/u3C8WU/i4pEP CpWQ== X-Gm-Message-State: AOJu0YzLMlU3z/6t/SkccrdjMBqbmrIY5BjLUYZy6wd+9PqXt4LowRxf ksaM+pA8qe8rcRxpr/k/akSgPo5DUy/QtGZNAHgDTcAYKecRZClLJys4o2TwUS1wFK+cCbrttZU = X-Google-Smtp-Source: AGHT+IFK4wn2gn1Ij49sRt8jZHh77R97AH4O+Hi9QzB86xNY7N+FHVqWlwlgXqJ8Os9w3z3vWKH25w== X-Received: by 2002:a2e:9d85:0:b0:2cd:993f:32a0 with SMTP id c5-20020a2e9d85000000b002cd993f32a0mr1571513ljj.37.1705931520057; Mon, 22 Jan 2024 05:52:00 -0800 (PST) Message-ID: <3d1755fb-808f-4333-8dd1-b5cfa16eedfe@suse.com> Date: Mon, 22 Jan 2024 14:51:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 7/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 , Michal Orzel References: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> 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: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> 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/7d12e780e003f93433d49ce78cfedf4b4c52adc5 --- 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); } -static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *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 } 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, do { - action->handler(irq, action->dev_id, regs); + action->handler(irq, action->dev_id); action = action->next; } while ( action ); --- a/xen/arch/arm/time.c +++ b/xen/arch/arm/time.c @@ -241,7 +241,7 @@ int reprogram_timer(s_time_t timeout) } /* 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); } -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); 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); tsc_in = 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()); spin_lock_irq(&desc->lock); --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -237,8 +237,7 @@ again: } } -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 = data; --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -198,8 +198,7 @@ static void smp_send_timer_broadcast_ipi } } -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()); --- 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; } -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) { } --- 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)) -static void cuart_interrupt(int irq, void *data, struct cpu_user_regs *regs) +static void cuart_interrupt(int irq, void *data) { struct serial_port *port = data; struct cuart *uart = 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) -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 = data; struct exynos4210_uart *uart = 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; -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 = data; struct imx_lpuart *uart = 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; -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 = data; struct meson_uart *uart = 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 + (off)) -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 = data; struct mvebu3700_uart *uart = 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 } } -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 = dev_id; struct ns16550 *uart = 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 = {0}; -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 = data; struct omap_uart *uart = 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)); } -static void pl011_interrupt(int irq, void *data, struct cpu_user_regs *regs) +static void pl011_interrupt(int irq, void *data) { struct serial_port *port = data; struct pl011 *uart = 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 }, }; -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 = data; struct scif_uart *uart = 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 static DECLARE_SOFTIRQ_TASKLET(amd_iommu_irq_tasklet, do_amd_iommu_irq, NULL); -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 = 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); } -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 = 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 } /* 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); } #define arm_smmu_context_fault arm_smmu_context_fault_xen -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 * static int arm_smmu_device_disable(struct arm_smmu_device *smmu); -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 = dev; @@ -926,12 +925,11 @@ static void arm_smmu_gerror_handler(int writel(gerror, smmu->base + ARM_SMMU_GERRORN); } -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 = dev; - arm_smmu_gerror_handler(irq, dev, regs); + arm_smmu_gerror_handler(irq, dev); tasklet_schedule(&(smmu->combined_irq_tasklet)); } @@ -945,16 +943,14 @@ static void arm_smmu_combined_irq_taskle arm_smmu_priq_tasklet(dev); } -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 = dev; tasklet_schedule(&(smmu->evtq_irq_tasklet)); } -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 = dev; --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1119,8 +1119,7 @@ static void cf_check do_iommu_page_fault __do_iommu_page_fault(drhd->iommu); } -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() <= 1)) 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); 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 patchwork Mon Jan 22 13:52:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13525508 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2DD36C4725D for ; Mon, 22 Jan 2024 13:52:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.669938.1042503 (Exim 4.92) (envelope-from ) id 1rRujB-0005f8-Cl; Mon, 22 Jan 2024 13:52:41 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 669938.1042503; Mon, 22 Jan 2024 13:52: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 1rRujB-0005f1-9a; Mon, 22 Jan 2024 13:52:41 +0000 Received: by outflank-mailman (input) for mailman id 669938; Mon, 22 Jan 2024 13:52:40 +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 1rRujA-0005c3-Mw for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 13:52:40 +0000 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [2a00:1450:4864:20::235]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 81de4e49-b92d-11ee-98f2-6d05b1d4d9a1; Mon, 22 Jan 2024 14:52:40 +0100 (CET) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2cca5d81826so36964431fa.2 for ; Mon, 22 Jan 2024 05:52:40 -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 cw13-20020a05663849cd00b0046e627dbc4csm3035114jab.121.2024.01.22.05.52.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 05:52:39 -0800 (PST) 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: 81de4e49-b92d-11ee-98f2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705931559; x=1706536359; 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=t0UgnOP68BxJCm+ns2eSiUnCsXGTkJgNp1lvTQv+pgE=; b=OvLzCc1uumgr5gOU5vJ5txxgj0VWTogmREzeA/oPFo6Ajvc9NLjAKFyaNdKw9SGBy6 RQIAZzqpkQeReM+Hbbx0Wx3tALVzon8ETrtF0Q++eOiYCR0u9Xm94MFygMTSCDiKd9Ef 2uNIIVzRnEW4VxmTlQTGBmD6bC8cZbKF8jXFDlQwl8BQWOIYf+yE5jS1OJ4ItU+bcJ1z ANoiAbhQDf40wQbwhhI89aDzq1l8MB6fS+K5ltFSPCBwAwsa+RKHRees+rJHER5mRWW7 0WMoCsUizPx3XHDOJL2/zZqLE/zrh/QIAThNxHjoPtSCfcqBQsuZpyt13pBmW895HCdg 4H0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705931559; x=1706536359; 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=t0UgnOP68BxJCm+ns2eSiUnCsXGTkJgNp1lvTQv+pgE=; b=n/lO40nPQjIqAScFNa67HnNQUz2ysd8Ym7QF4+EeTB//oEdrBn9w8NmgFSSRofINvo BAy35yUe/vuKhLG12nMr/goWdhXSIM6qLJtSqdxSfR79n9uIUY2fgugKs/aQKdCCeC58 vmes4RqSRDdCv4iPH9OyoCa9KXowA2GqKP2jt4qg0U4HFCq436V+dm/I2R81x/yXDo2M iTpArEU00quzNCGpa4s3f+5ePIKjBvLLzEW82J8rwptsDzy6VL8fVE0zBt/nWexe6fPB Sh7Z0nxV8GZfoLuvo9rNmwCeC6wlN/227O1G/e72kXAFA3hDKfIidhOgGap8MsTLtHXa HwYQ== X-Gm-Message-State: AOJu0Ywiby/TR20GwOolgWVAUhtkEmWejB5aWh2yeTt7ZT0Al0NbQx05 +Z5LIHNAMy1pbbZ4m7aD4ehToRJSHTkkJGkAdqqgHNtkpYds1ybNueDnhWi7MFv6yI3/eztKC80 = X-Google-Smtp-Source: AGHT+IGQ/1fgxj6jJoB6zQ0kfRBSvEDgjZN0Tn3TAA8oFx7WYj7j6uVLAm52kbFwopUmrdgYy/JcNw== X-Received: by 2002:a05:651c:b28:b0:2cf:13d:4c5e with SMTP id b40-20020a05651c0b2800b002cf013d4c5emr538190ljr.7.1705931559518; Mon, 22 Jan 2024 05:52:39 -0800 (PST) Message-ID: <7e020077-be19-4075-b21c-5a493a8d0cda@suse.com> Date: Mon, 22 Jan 2024 14:52:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 8/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?R?= =?utf-8?q?oger_Pau_Monn=C3=A9?= References: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWC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dNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <33db57a2-b569-4fa8-b0b0-36ea92528d7b@suse.com> 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 @@ -1324,7 +1324,7 @@ int reprogram_timer(s_time_t timeout) return apic_tmict || !timeout; } -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); @@ -1343,7 +1343,7 @@ void smp_send_state_dump(unsigned int cp /* * Spurious interrupts should _never_ happen with our APIC/SMP architecture. */ -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 probably @@ -1357,7 +1357,7 @@ static void cf_check spurious_interrupt( is_spurious = !nmi_check_continuation(); if (this_cpu(state_dump_pending)) { this_cpu(state_dump_pending) = false; - dump_execstate(regs); + dump_execstate(get_irq_regs()); is_spurious = false; } @@ -1374,7 +1374,7 @@ static void cf_check spurious_interrupt( * This interrupt should never happen with our APIC/SMP architecture */ -static void cf_check error_interrupt(struct cpu_user_regs *regs) +static void cf_check error_interrupt(void) { static const char *const esr_fields[] = { ", Send CS error", @@ -1409,7 +1409,7 @@ static void cf_check error_interrupt(str * This interrupt handles performance counters interrupt */ -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); -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 = smp_processor_id(); @@ -642,7 +642,7 @@ static void cpu_mcheck_disable(void) clear_cmci(); } -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) } } -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 = 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 }; /* 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 = &per_cpu(vmx_pi_blocking, smp_processor_id()).lock; @@ -2808,7 +2808,7 @@ static void cf_check pi_wakeup_interrupt } /* 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; #define platform_legacy_irq(irq) ((irq) < 16) -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); uint8_t alloc_hipriority_vector(void); -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)); void do_IRQ(struct cpu_user_regs *regs); --- 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); } -void cf_check irq_move_cleanup_interrupt(struct cpu_user_regs *regs) +void cf_check irq_move_cleanup_interrupt(void) { unsigned vector, me; @@ -913,16 +913,14 @@ uint8_t alloc_hipriority_vector(void) return next++; } -static void (*direct_apic_vector[X86_NR_VECTORS])(struct cpu_user_regs *regs); -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] != NULL); direct_apic_vector[vector] = handler; } -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); @@ -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 = ", 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; -void cf_check invalidate_interrupt(struct cpu_user_regs *regs) +void cf_check invalidate_interrupt(void) { unsigned int flags = flush_flags; ack_APIC_irq(); @@ -387,14 +387,14 @@ void smp_send_nmi_allbutself(void) send_IPI_mask(&cpu_online_map, APIC_DM_NMI); } -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)++; } -void cf_check call_function_interrupt(struct cpu_user_regs *regs) +void cf_check call_function_interrupt(void) { ack_APIC_irq(); perfc_incr(ipis);