Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755960AbbEVBGh (ORCPT ); Thu, 21 May 2015 21:06:37 -0400 Received: from mga02.intel.com ([134.134.136.20]:6132 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754061AbbEVBGf convert rfc822-to-8bit (ORCPT ); Thu, 21 May 2015 21:06:35 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,472,1427785200"; d="scan'208";a="733428426" From: "Wu, Feng" To: Thomas Gleixner CC: "joro@8bytes.org" , "dwmw2@infradead.org" , "jiang.liu@linux.intel.com" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "Wu, Feng" Subject: RE: [v6 6/8] iommu, x86: Setup Posted-Interrupts capability for Intel iommu Thread-Topic: [v6 6/8] iommu, x86: Setup Posted-Interrupts capability for Intel iommu Thread-Index: AQHQk7QLQD9yJpTtckKLSYfJK1jNC52HLrSA Date: Fri, 22 May 2015 01:03:17 +0000 Message-ID: References: <1432191555-3516-1-git-send-email-feng.wu@intel.com> <1432191555-3516-7-git-send-email-feng.wu@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1644 Lines: 60 > -----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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/