[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <E959C4978C3B6342920538CF579893F002546B1B@SHSMSX104.ccr.corp.intel.com>
Date: Fri, 22 May 2015 01:03:17 +0000
From: "Wu, Feng" <feng.wu@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: "joro@...tes.org" <joro@...tes.org>,
"dwmw2@...radead.org" <dwmw2@...radead.org>,
"jiang.liu@...ux.intel.com" <jiang.liu@...ux.intel.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Wu, Feng" <feng.wu@...el.com>
Subject: RE: [v6 6/8] iommu, x86: Setup Posted-Interrupts capability for
Intel iommu
> -----Original Message-----
> From: Thomas Gleixner [mailto:tglx@...utronix.de]
> Sent: Thursday, May 21, 2015 6:51 PM
> To: Wu, Feng
> Cc: joro@...tes.org; dwmw2@...radead.org; jiang.liu@...ux.intel.com;
> iommu@...ts.linux-foundation.org; linux-kernel@...r.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists