linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Farhan Ali <alifm@linux.ibm.com>
To: Niklas Schnelle <schnelle@linux.ibm.com>,
	linux-s390@vger.kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: mjrosato@linux.ibm.com, alex.williamson@redhat.com
Subject: Re: [PATCH v1 1/6] s390/pci: Restore airq unconditionally for the zPCI device
Date: Thu, 14 Aug 2025 09:42:43 -0700	[thread overview]
Message-ID: <be3a05c6-a016-4fdb-a3c4-d23ccd13b9c9@linux.ibm.com> (raw)
In-Reply-To: <94289b685aae2c329ecae06a56e3648375841ab4.camel@linux.ibm.com>


On 8/14/2025 4:32 AM, Niklas Schnelle wrote:
> On Wed, 2025-08-13 at 10:08 -0700, Farhan Ali wrote:
>> Commit c1e18c17bda6 ("s390/pci: add zpci_set_irq()/zpci_clear_irq()"),
>> introduced the zpci_set_irq() and zpci_clear_irq(), to be used while
>> resetting a zPCI device.
>>
>> Commit da995d538d3a ("s390/pci: implement reset_slot for hotplug slot"),
>> mentions zpci_clear_irq() being called in the path for zpci_hot_reset_device().
>> But that is not the case anymore and these functions are not called
>> outside of this file.
>>
>> However after a CLP disable/enable reset (zpci_hot_reset_device),
>> the airq setup of the device will need to be restored. Since we
>> are no longer calling zpci_clear_airq() in the reset path, we should
>> restore the airq for device unconditionally.
>>
>> Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
>> ---
>>   arch/s390/pci/pci_irq.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/arch/s390/pci/pci_irq.c b/arch/s390/pci/pci_irq.c
>> index 84482a921332..8b5493f0dee0 100644
>> --- a/arch/s390/pci/pci_irq.c
>> +++ b/arch/s390/pci/pci_irq.c
>> @@ -427,8 +427,7 @@ bool arch_restore_msi_irqs(struct pci_dev *pdev)
>>   {
>>   	struct zpci_dev *zdev = to_zpci(pdev);
>>   
>> -	if (!zdev->irqs_registered)
>> -		zpci_set_irq(zdev);
>> +	zpci_set_irq(zdev);
>>   	return true;
>>   }
>>   
> This would make zdev->irqs_registered effectively without function so
> the patch should remove that field from struct zpci_dev and
> zpci_set_irq()/zpci_clear_irq(). Alternatively you could also clear
> zdev->irqs_registed in zpci_disable_device(). I think the former is
> cleaner though.
>
> Thanks,
> Niklas
Yeah agreed, will remove the irqs_registered from zdev as its not needed 
anymore.

Thanks
Farhan

  reply	other threads:[~2025-08-14 16:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 17:08 [PATCH v1 0/6] Error recovery for vfio-pci devices on s390x Farhan Ali
2025-08-13 17:08 ` [PATCH v1 1/6] s390/pci: Restore airq unconditionally for the zPCI device Farhan Ali
2025-08-14 11:32   ` Niklas Schnelle
2025-08-14 16:42     ` Farhan Ali [this message]
2025-08-13 17:08 ` [PATCH v1 2/6] s390/pci: Update the logic for detecting passthrough device Farhan Ali
2025-08-13 17:08 ` [PATCH v1 3/6] s390/pci: Store PCI error information for passthrough devices Farhan Ali
2025-08-13 17:08 ` [PATCH v1 4/6] vfio-pci/zdev: Setup a zpci memory region for error information Farhan Ali
2025-08-13 20:30   ` Alex Williamson
2025-08-13 21:25     ` Farhan Ali
2025-08-13 21:42       ` Alex Williamson
2025-08-13 17:08 ` [PATCH v1 5/6] vfio-pci/zdev: Perform platform specific function reset for zPCI Farhan Ali
2025-08-13 20:30   ` Alex Williamson
2025-08-13 21:52     ` Farhan Ali
2025-08-13 22:56       ` Alex Williamson
2025-08-14 13:12         ` Niklas Schnelle
2025-08-14 16:33           ` Farhan Ali
2025-08-14 19:55             ` Niklas Schnelle
2025-08-14 20:57             ` Alex Williamson
2025-08-14 22:33               ` Farhan Ali
2025-08-14  5:22   ` kernel test robot
2025-08-14  7:42   ` kernel test robot
2025-08-13 17:08 ` [PATCH v1 6/6] vfio: Allow error notification and recovery for ISM device Farhan Ali
2025-08-14 20:48   ` Bjorn Helgaas
2025-08-14 21:02     ` Farhan Ali
2025-08-15 20:48       ` Alex Williamson
2025-08-15 21:36         ` Farhan Ali
2025-08-13 17:45 ` [PATCH v1 0/6] Error recovery for vfio-pci devices on s390x Farhan Ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be3a05c6-a016-4fdb-a3c4-d23ccd13b9c9@linux.ibm.com \
    --to=alifm@linux.ibm.com \
    --cc=alex.williamson@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=schnelle@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).