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 A6F83CD5BB1 for ; Thu, 21 May 2026 13:25:41 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1315217.1585059 (Exim 4.92) (envelope-from ) id 1wQ3Ov-0008WL-ST; Thu, 21 May 2026 13:25:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1315217.1585059; Thu, 21 May 2026 13:25: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 1wQ3Ov-0008WE-Pd; Thu, 21 May 2026 13:25:25 +0000 Received: by outflank-mailman (input) for mailman id 1315217; Thu, 21 May 2026 13:25:24 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) id 1wQ3Ou-0008W6-1I for xen-devel@lists.xenproject.org; Thu, 21 May 2026 13:25:24 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wQ3Ot-00362c-DU for xen-devel@lists.xenproject.org; Thu, 21 May 2026 15:25:23 +0200 Received: from [10.42.69.5] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a0f07b9-2eae-0a2a0a5409dd-0a2a4505bba8-40 for ; Thu, 21 May 2026 15:25:23 +0200 Received: from [209.85.128.51] (helo=mail-wm1-f51.google.com) by tlsNG-c201ff.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a0f07c3-aaa8-0a2a45050019-d1558033a4b3-3 for ; Thu, 21 May 2026 15:25:23 +0200 Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-48fde648a71so44163585e9.0 for ; Thu, 21 May 2026 06:25:23 -0700 (PDT) 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 5b1f17b1804b1-49033cdcc01sm73668495e9.0.2026.05.21.06.25.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2026 06:25:22 -0700 (PDT) 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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=suse.com header.i="@suse.com" header.h="Content-Transfer-Encoding:In-Reply-To:Autocrypt:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1779369923; x=1779974723; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=1E/Bznlp+WNpMwj62zhBu6ZBHv3a8SyoZnd97uVJ/74=; b=RThbXKStUIBaN/JJfBpzVrDUn6+VKzHwCXJs4Gmfb+QAoYo0C/enQDqqwVeQHCAYFa E75fh3ZQ66uPM/ib8f7JpcJ5BdJe0cCz1V8niLcMX1inRzyJ0VkkcDMmMoYuAFeP5get G3cosH+y4gIE8PWFlfM3+Nyw6QqNNOQygDGYkTaMaul5H+m/So/zsQi/ATv1tZuVGLJr P+e5jaEpD2lEpCtrrgyyYj2r4p2YvY8AuxPiLKu1q8Zb291HjlCnjAtOqFU9aisFhK9I kf2lLHSMFRuP0u2n5k4/ir6f6xsq5OtnsDnxVuzSeDc1gdMiVElRwT2QR5elIHnSva0d FBHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779369923; x=1779974723; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1E/Bznlp+WNpMwj62zhBu6ZBHv3a8SyoZnd97uVJ/74=; b=hRxttLTY/fwKJIE6ECbZ6LrFJ8Ddljhnbdr9ckKuOESOMbZic5GKw1+dpoTA2RjgHg zuEoXgX15DKCqYK9HHADsCxby7OR7aBPUSA36WKktBVKGZBt6QR4aAWgQGVhIpZS0E9d LoIM6yXeL6JlmWzI/pn5y5xk4MkCxr+o2o1t6LVh9fLT87AZl+nvxmtVatahpAC9mleu n1vEiaH073WqpM1DjJ+xtLySLkTW/agCVT4eAPv867v1pwu03Z3iSSHpJ5gACR8sNSFJ ydA0/wRoiakmJihZQruMTC3qK6S4YS6LMrEJ2TTfxeDNE/mwKPNgqrYEu7pC4OTKbKYZ yI0w== X-Forwarded-Encrypted: i=1; AFNElJ9BbntDJ2S97lOxj0/b1/hFCHCXIddCr5phuPiQeTzPiFK7U2TNHzACBdqa3SB3Hs8WV5glE/6q/xY=@lists.xenproject.org X-Gm-Message-State: AOJu0YwBpMtDr2QITsry+bVcGTiebR9aHdmf6kJP9OJ4bcGtsEvLj+Bp 4aqSbd8q1W22w1QMxyzqrVW73C9K2piLkuw2EwOMax22NB51ziSFMrpuq5mCRLxk/Q== X-Gm-Gg: Acq92OFv4joNW14Htd0Ev7WI9v/rHewOtrgy3oH9oAvEE79GpS9pY+kUr8j0BT9tMSp 4GacxxSdwgG38enHo3cRnoHnhqfN+MO/I65MahZzZ7P59snB5+7+iCZTz93NBrl/sds4I8lYWI7 LiRMmx/U7rYOZhsnuDUzI1hjvkGXLPH0QvjIzhdAAlJhkgw/nlWYhAY70Eoaly01kOJw1DsJIe9 /V56Az861OpJG+Ue4MHC1Oi6Ka9hQhHadC0+EYTAiGxKfq6XgqudVHH8zSe1HibIPuWCzlRFpzs m+XZ3wD0CFJEfDzhu/FjV275fD6fsfdupPrlU0Z183NkJKDRPAmrhrzdFaKhALXKP8HCXkHcBC+ k+KyNv+v7ZJEAFQ83AKDgn8qt8JibJL5s4RJgBo4E3KaCjX8AcZoWcBUhI0ojs7DBZH4b6JQZuj D2dg01N5VQwTHPX2czQTVUGvSuPB/wQTzW1x+AYIAlTVDVRxvNayArhb8G4nL0CRTvZUrlU5/b0 ZE5T70B6DEXy9A= X-Received: by 2002:a05:600c:4849:b0:48a:761:5816 with SMTP id 5b1f17b1804b1-4903608030amr20839555e9.8.1779369922791; Thu, 21 May 2026 06:25:22 -0700 (PDT) Message-ID: Date: Thu, 21 May 2026 15:25:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 09/26] xen/riscv: introduce init interrupt controller operations To: Oleksii Kurochko Cc: Romain Caritey , Alistair Francis , Connor Davis , Andrew Cooper , Anthony PERARD , Michal Orzel , Julien Grall , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini , xen-devel@lists.xenproject.org References: <286a8b99ad7c107fc46c346f7c075617740fa194.1778250616.git.oleksii.kurochko@gmail.com> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1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BECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <286a8b99ad7c107fc46c346f7c075617740fa194.1778250616.git.oleksii.kurochko@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-purgate-ID: tlsNG-c201ff/1779369923-DBB60443-C94E8BB8/10/73395122804 X-purgate-type: spam X-purgate-size: 2136 On 08.05.2026 16:43, Oleksii Kurochko wrote: > Introduce intc_hw_init_ops structure to avoid risky mix of init > function and non-init function. > > Signed-off-by: Oleksii Kurochko > --- > Changes in v2: > - New patch. > --- > xen/arch/riscv/aplic.c | 7 +++++-- > xen/arch/riscv/include/asm/intc.h | 10 +++++++--- > xen/arch/riscv/intc.c | 10 ++++++++-- > 3 files changed, 20 insertions(+), 7 deletions(-) > > diff --git a/xen/arch/riscv/aplic.c b/xen/arch/riscv/aplic.c > index 739e8dab3498..97dc0ef731f0 100644 > --- a/xen/arch/riscv/aplic.c > +++ b/xen/arch/riscv/aplic.c > @@ -306,12 +306,15 @@ static const hw_irq_controller aplic_xen_irq_type = { > > static const struct intc_hw_operations aplic_ops = { > .info = &aplic_info, > - .init = aplic_init, > .host_irq_type = &aplic_xen_irq_type, > .handle_interrupt = aplic_handle_interrupt, > .set_irq_type = aplic_set_irq_type, > }; > > +static const struct intc_hw_init_ops __initdata aplic_init_ops = { > + .init = aplic_init, > +}; const wants to pair with __initconst. Then: Acked-by: Jan Beulich However, I have another comment for consideration: > --- a/xen/arch/riscv/intc.c > +++ b/xen/arch/riscv/intc.c > @@ -12,9 +12,13 @@ > > static const struct intc_hw_operations *__ro_after_init intc_hw_ops; > > -void __init register_intc_ops(const struct intc_hw_operations *ops) > +static const struct intc_hw_init_ops *__initdata intc_hw_init_ops; > + > +void __init register_intc_ops(const struct intc_hw_operations *ops, > + const struct intc_hw_init_ops *init_ops) > { > intc_hw_ops = ops; > + intc_hw_init_ops = init_ops; > } Again following what we do e.g. in x86'es IOMMU code, instead of passing two pointers to the function, have struct intc_hw_init_ops have a const struct intc_hw_operations * member which then can be used to set intc_hw_ops here? Both will always come in pairs anyway. Jan