[PATCH v2 10/10] powerpc/kvm: Native usage of the XIVE interrupt controller

kbuild test robot lkp at intel.com
Thu Apr 6 10:00:43 AEST 2017


Hi Benjamin,

[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.11-rc5 next-20170405]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Benjamin-Herrenschmidt/powerpc-Add-more-PPC-bit-conversion-macros/20170406-041935
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   arch/powerpc/kvm/book3s_xive.c: In function 'xive_lock_and_mask':
>> arch/powerpc/kvm/book3s_xive.c:340:18: error: 'OPAL_XIVE_IRQ_MASK_VIA_FW' undeclared (first use in this function)
     if (xd->flags & OPAL_XIVE_IRQ_MASK_VIA_FW) {
                     ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/kvm/book3s_xive.c:340:18: note: each undeclared identifier is reported only once for each function it appears in
   arch/powerpc/kvm/book3s_xive.c: In function 'xive_finish_unmask':
   arch/powerpc/kvm/book3s_xive.c:396:18: error: 'OPAL_XIVE_IRQ_MASK_VIA_FW' undeclared (first use in this function)
     if (xd->flags & OPAL_XIVE_IRQ_MASK_VIA_FW) {
                     ^~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/kvm/book3s_xive.c:404:21: error: 'OPAL_XIVE_IRQ_LSI' undeclared (first use in this function)
      if (!(xd->flags & OPAL_XIVE_IRQ_LSI))
                        ^~~~~~~~~~~~~~~~~

vim +/OPAL_XIVE_IRQ_MASK_VIA_FW +340 arch/powerpc/kvm/book3s_xive.c

   334		 * lazy masking instead.
   335		 *
   336		 * For now, we work around this in unmask by forcing
   337		 * an interrupt whenever we unmask a non-LSI via FW
   338		 * (if ever).
   339		 */
 > 340		if (xd->flags & OPAL_XIVE_IRQ_MASK_VIA_FW) {
   341			xive_native_configure_irq(hw_num,
   342						  xive->vp_base + state->act_server,
   343						  MASKED, state->number);
   344			/* set old_p so we can track if an H_EOI was done */
   345			state->old_p = true;
   346			state->old_q = false;
   347		} else {
   348			/* Set PQ to 10, return old P and old Q and remember them */
   349			val = xive_vm_esb_load(xd, XIVE_ESB_SET_PQ_10);
   350			state->old_p = !!(val & 2);
   351			state->old_q = !!(val & 1);
   352	
   353			/*
   354			 * Synchronize hardware to sensure the queues are updated
   355			 * when masking
   356			 */
   357			xive_native_sync_source(hw_num);
   358		}
   359	
   360		return old_prio;
   361	}
   362	
   363	static void xive_lock_for_unmask(struct kvmppc_xive_src_block *sb,
   364					 struct kvmppc_xive_irq_state *state)
   365	{
   366		/*
   367		 * Take the lock try again if racing with H_EOI
   368		 */
   369		for (;;) {
   370			arch_spin_lock(&sb->lock);
   371			if (!state->in_eoi)
   372				break;
   373			arch_spin_unlock(&sb->lock);
   374		}
   375	}
   376	
   377	static void xive_finish_unmask(struct kvmppc_xive *xive,
   378				       struct kvmppc_xive_src_block *sb,
   379				       struct kvmppc_xive_irq_state *state,
   380				       u8 prio)
   381	{
   382		struct xive_irq_data *xd;
   383		u32 hw_num;
   384	
   385		/* If we aren't changing a thing, move on */
   386		if (state->guest_priority != MASKED)
   387			goto bail;
   388	
   389		/* Get the right irq */
   390		kvmppc_xive_select_irq(state, &hw_num, &xd);
   391	
   392		/*
   393		 * See command in xive_lock_and_mask() concerning masking
   394		 * via firmware.
   395		 */
   396		if (xd->flags & OPAL_XIVE_IRQ_MASK_VIA_FW) {
   397			xive_native_configure_irq(hw_num,
   398						  xive->vp_base + state->act_server,
   399						  state->act_priority, state->number);
   400			/* If an EOI is needed, do it here */
   401			if (!state->old_p)
   402				xive_vm_source_eoi(hw_num, xd);
   403			/* If this is not an LSI, force a trigger */
 > 404			if (!(xd->flags & OPAL_XIVE_IRQ_LSI))
   405				xive_irq_trigger(xd);
   406			goto bail;
   407		}

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 23099 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170406/13918e52/attachment-0001.gz>


More information about the Linuxppc-dev mailing list