lkml.org 
[lkml]   [2015]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [v6 6/8] iommu, x86: Setup Posted-Interrupts capability for Intel iommu
Date


> -----Original Message-----
> From: Thomas Gleixner [mailto:tglx@linutronix.de]
> Sent: Thursday, May 21, 2015 6:51 PM
> To: Wu, Feng
> Cc: joro@8bytes.org; dwmw2@infradead.org; jiang.liu@linux.intel.com;
> iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> Subject: Re: [v6 6/8] iommu, x86: Setup Posted-Interrupts capability for Intel
> iommu
>
> On Thu, 21 May 2015, Feng Wu wrote:
> > @@ -647,6 +647,20 @@ static int __init intel_enable_irq_remapping(void)
> > + /*
> > + * Set Posted-Interrupts capability.
> > + */
> > + if (!disable_irq_post) {
> > + intel_irq_remap_ops.capability |= 1 << IRQ_POSTING_CAP;
> > +
> > + for_each_iommu(iommu, drhd)
> > + if (!cap_pi_support(iommu->cap)) {
> > + intel_irq_remap_ops.capability &=
> > + ~(1 << IRQ_POSTING_CAP);
> > + break;
> > + }
> > + }
> > +
>
> > @@ -874,6 +894,20 @@ static int reenable_irq_remapping(int eim)
> > + /*
> > + * Set Posted-Interrupts capability.
> > + */
> > + if (!disable_irq_post) {
> > + intel_irq_remap_ops.capability |= 1 << IRQ_POSTING_CAP;
> > +
> > + for_each_iommu(iommu, drhd)
> > + if (!cap_pi_support(iommu->cap)) {
> > + intel_irq_remap_ops.capability &=
> > + ~(1 << IRQ_POSTING_CAP);
> > + break;
> > + }
> > + }
> > +
>
> Verbatim copy and paste. Ever heard about the concept of helper functions?

Good idea!

Thanks,
Feng

>
> Thanks,
>
> tglx


\
 
 \ /
  Last update: 2015-05-22 03:41    [W:0.033 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site