Author: bdragon
Date: Fri Aug 21 03:23:10 2020
New Revision: 364446
URL: https://svnweb.freebsd.org/changeset/base/364446

Log:
  [PowerPC64] Fix invalid OPAL call in xive_bind().
  
  This fixes spurious "XIVE[ IC 00  ] ISN 1 lead to invalid IVE !" messages
  generated by OPAL when running with the debug level cranked up.
  
  Discussed with jhibbits.
  
  Sponsored by: Tag1 Consulting, Inc.

Modified:
  head/sys/powerpc/powernv/opal.h
  head/sys/powerpc/powernv/xive.c

Modified: head/sys/powerpc/powernv/opal.h
==============================================================================
--- head/sys/powerpc/powernv/opal.h     Fri Aug 21 00:59:15 2020        
(r364445)
+++ head/sys/powerpc/powernv/opal.h     Fri Aug 21 03:23:10 2020        
(r364446)
@@ -173,6 +173,9 @@ int opal_call(uint64_t token, ...);
 #define        OPAL_XIVE_XICS_MODE_EMU 0
 #define        OPAL_XIVE_XICS_MODE_EXP 1
 
+#define        OPAL_XIVE_SYNC_EAS              0x00000001
+#define        OPAL_XIVE_SYNC_QUEUE            0x00000002
+
 #define        OPAL_XIVE_VP_ENABLED            0x00000001
 #define        OPAL_XIVE_VP_SINGLE_ESCALATION  0x00000002
 

Modified: head/sys/powerpc/powernv/xive.c
==============================================================================
--- head/sys/powerpc/powernv/xive.c     Fri Aug 21 00:59:15 2020        
(r364445)
+++ head/sys/powerpc/powernv/xive.c     Fri Aug 21 03:23:10 2020        
(r364446)
@@ -466,7 +466,7 @@ xive_bind(device_t dev, u_int irq, cpuset_t cpumask, v
                ncpus++;
        }
 
-       opal_call(OPAL_XIVE_SYNC);
+       opal_call(OPAL_XIVE_SYNC, OPAL_XIVE_SYNC_QUEUE, irq);
        
        irqd->vp = pcpu_find(cpu)->pc_hwref;
        error = opal_call(OPAL_XIVE_SET_IRQ_CONFIG, irq, irqd->vp,
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to