From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 95D6D1A0208 for ; Mon, 28 Jul 2014 11:46:13 +1000 (EST) Message-ID: <1406510394.4935.35.camel@pasglop> Subject: Re: [PATCH v3 12/18] powerpc/iommu: Fix missing permission bits in iommu_put_tce_user_mode() From: Benjamin Herrenschmidt To: Alexey Kardashevskiy Date: Mon, 28 Jul 2014 11:19:54 +1000 In-Reply-To: <1406191691-31441-13-git-send-email-aik@ozlabs.ru> References: <1406191691-31441-1-git-send-email-aik@ozlabs.ru> <1406191691-31441-13-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Gavin Shan List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2014-07-24 at 18:48 +1000, Alexey Kardashevskiy wrote: > This adds missing permission bits to the translated TCE. Is this a bug fix for existing stuff ? If yes, submit it separately. > Signed-off-by: Alexey Kardashevskiy > --- > arch/powerpc/kernel/iommu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c > index 0cda2e8..5af2319 100644 > --- a/arch/powerpc/kernel/iommu.c > +++ b/arch/powerpc/kernel/iommu.c > @@ -1088,6 +1088,7 @@ int iommu_put_tce_user_mode(struct iommu_table *tbl, unsigned long entry, > return -EFAULT; > } > hwaddr = (unsigned long) page_address(page) + offset; > + hwaddr |= tce & (TCE_PCI_READ | TCE_PCI_WRITE); > > ret = iommu_tce_build(tbl, entry, hwaddr, direction); > if (ret)