linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net/ibmvnic: Support both XIVE and XICS modes in ibmvnic
@ 2019-11-20 16:16 Juliet Kim
  2019-11-20 16:16 ` [PATCH 1/2] net/ibmvnic: Revert "net/ibmvnic: Fix EOI when running in XIVE mode" Juliet Kim
  2019-11-20 16:16 ` [PATCH 2/2] net/ibmvnic: Ignore H_FUNCTION return from H_EOI to tolerate XIVE mode Juliet Kim
  0 siblings, 2 replies; 3+ messages in thread
From: Juliet Kim @ 2019-11-20 16:16 UTC (permalink / raw)
  To: netdev; +Cc: julietk, tlfalcon, linuxppc-dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 585 bytes --]

This series aims to support both XICS and XIVE with avoiding
a regression in behavior when a system runs in XICS mode.

Patch 1 Reverts commit 11d49ce9f7946dfed4dcf5dbde865c78058b50ab
(“net/ibmvnic: Fix EOI when running in XIVE mode.”)

Patch 2 Ignore H_FUNCTION return from H_EOI to tolerate XIVE mode

Juliet Kim (2):
  net/ibmvnic: Revert "net/ibmvnic: Fix EOI when running in XIVE mode"
  net/ibmvnic: Ignore H_FUNCTION return from H_EOI to tolerate XIVE mode

 drivers/net/ethernet/ibm/ibmvnic.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] net/ibmvnic: Revert "net/ibmvnic: Fix EOI when running in XIVE mode"
  2019-11-20 16:16 [PATCH 0/2] net/ibmvnic: Support both XIVE and XICS modes in ibmvnic Juliet Kim
@ 2019-11-20 16:16 ` Juliet Kim
  2019-11-20 16:16 ` [PATCH 2/2] net/ibmvnic: Ignore H_FUNCTION return from H_EOI to tolerate XIVE mode Juliet Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Juliet Kim @ 2019-11-20 16:16 UTC (permalink / raw)
  To: netdev; +Cc: julietk, tlfalcon, linuxppc-dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1165 bytes --]

This reverts commit 11d49ce9f7946dfed4dcf5dbde865c78058b50ab
(“net/ibmvnic: Fix EOI when running in XIVE mode.”) since that
has the unintended effect of changing the interrupt priority
and emits warning when running in legacy XICS mode.

Signed-off-by: Juliet Kim <julietk@linux.vnet.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index f59d9a8..2b073a3 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2878,10 +2878,12 @@ static int enable_scrq_irq(struct ibmvnic_adapter *adapter,
 
 	if (test_bit(0, &adapter->resetting) &&
 	    adapter->reset_reason == VNIC_RESET_MOBILITY) {
-		struct irq_desc *desc = irq_to_desc(scrq->irq);
-		struct irq_chip *chip = irq_desc_get_chip(desc);
+		u64 val = (0xff000000) | scrq->hw_irq;
 
-		chip->irq_eoi(&desc->irq_data);
+		rc = plpar_hcall_norets(H_EOI, val);
+		if (rc)
+			dev_err(dev, "H_EOI FAILED irq 0x%llx. rc=%ld\n",
+				val, rc);
 	}
 
 	rc = plpar_hcall_norets(H_VIOCTL, adapter->vdev->unit_address,
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] net/ibmvnic: Ignore H_FUNCTION return from H_EOI to tolerate XIVE mode
  2019-11-20 16:16 [PATCH 0/2] net/ibmvnic: Support both XIVE and XICS modes in ibmvnic Juliet Kim
  2019-11-20 16:16 ` [PATCH 1/2] net/ibmvnic: Revert "net/ibmvnic: Fix EOI when running in XIVE mode" Juliet Kim
@ 2019-11-20 16:16 ` Juliet Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Juliet Kim @ 2019-11-20 16:16 UTC (permalink / raw)
  To: netdev; +Cc: julietk, tlfalcon, linuxppc-dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1091 bytes --]

Reversion of commit 11d49ce9f7946dfed4dcf5dbde865c78058b50ab
(“net/ibmvnic: Fix EOI when running in XIVE mode.”) leaves us
calling H_EOI even in XIVE mode. That will fail with H_FUNCTION
because H_EOI is not supported in that mode. That failure is
harmless. Ignore it so we can use common code for both XICS and
XIVE.

Signed-off-by: Juliet Kim <julietk@linux.vnet.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 2b073a3..0686ded 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2881,7 +2881,10 @@ static int enable_scrq_irq(struct ibmvnic_adapter *adapter,
 		u64 val = (0xff000000) | scrq->hw_irq;
 
 		rc = plpar_hcall_norets(H_EOI, val);
-		if (rc)
+		/* H_EOI would fail with rc = H_FUNCTION when running
+		 * in XIVE mode which is expected, but not an error.
+		 */
+		if (rc && (rc != H_FUNCTION))
 			dev_err(dev, "H_EOI FAILED irq 0x%llx. rc=%ld\n",
 				val, rc);
 	}
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-20 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-20 16:16 [PATCH 0/2] net/ibmvnic: Support both XIVE and XICS modes in ibmvnic Juliet Kim
2019-11-20 16:16 ` [PATCH 1/2] net/ibmvnic: Revert "net/ibmvnic: Fix EOI when running in XIVE mode" Juliet Kim
2019-11-20 16:16 ` [PATCH 2/2] net/ibmvnic: Ignore H_FUNCTION return from H_EOI to tolerate XIVE mode Juliet Kim

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).