From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935517AbcA1Mgt (ORCPT ); Thu, 28 Jan 2016 07:36:49 -0500 Received: from mga14.intel.com ([192.55.52.115]:63411 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933786AbcA1Mgp (ORCPT ); Thu, 28 Jan 2016 07:36:45 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,358,1449561600"; d="scan'208";a="900103655" Message-ID: <1453984510.2521.290.camel@linux.intel.com> Subject: Re: [PATCH v2 1/1] iommu/vt-d: use lo_hi_readq() / lo_hi_writeq() From: Andy Shevchenko To: linux-kernel@vger.kernel.org, David Woodhouse , iommu@lists.linux-foundation.org Date: Thu, 28 Jan 2016 14:35:10 +0200 In-Reply-To: <1447950167-111241-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1447950167-111241-1-git-send-email-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-11-19 at 18:22 +0200, Andy Shevchenko wrote: > There is already helper functions to do 64-bit I/O on 32-bit machines > or buses, > thus we don't need to reinvent the wheel. > Any comment on this? > Signed-off-by: Andy Shevchenko > --- > Cahngelog v2: > - rebase on top of recent linux-next >  include/linux/intel-iommu.h | 18 ++---------------- >  1 file changed, 2 insertions(+), 16 deletions(-) > > diff --git a/include/linux/intel-iommu.h b/include/linux/intel- > iommu.h > index 821273c..34066ee 100644 > --- a/include/linux/intel-iommu.h > +++ b/include/linux/intel-iommu.h > @@ -29,6 +29,8 @@ >  #include >  #include >  #include > +#include > + >  #include >  #include >   > @@ -71,24 +73,8 @@ >   >  #define OFFSET_STRIDE (9) >   > -#ifdef CONFIG_64BIT >  #define dmar_readq(a) readq(a) >  #define dmar_writeq(a,v) writeq(v,a) > -#else > -static inline u64 dmar_readq(void __iomem *addr) > -{ > - u32 lo, hi; > - lo = readl(addr); > - hi = readl(addr + 4); > - return (((u64) hi) << 32) + lo; > -} > - > -static inline void dmar_writeq(void __iomem *addr, u64 val) > -{ > - writel((u32)val, addr); > - writel((u32)(val >> 32), addr + 4); > -} > -#endif >   >  #define DMAR_VER_MAJOR(v) (((v) & 0xf0) >> 4) >  #define DMAR_VER_MINOR(v) ((v) & 0x0f) -- Andy Shevchenko Intel Finland Oy