From patchwork Thu Apr 24 15:30:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 28981 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0A0AE2036A for ; Thu, 24 Apr 2014 15:32:29 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id q9sf5960449ykb.7 for ; Thu, 24 Apr 2014 08:32:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=9zsZmMuP13zSGrFFL3Mt4QFpuvI1nPzbQ1b+VnzAeQI=; b=XG79Edb2XHqoVPCY+AfTAoPrRL3FkhE4nSP6BBVWyV0s814/6MKnHMmCyutGm31AO+ UuI0B3S35cLf03Xw0f7/S4R8kE6ogCzLXm/CYN+J/TRjhvfUWTLhFWJtKhC0Lg43A/JO DnAEFz5WSp388ySFRznWDD7kPQvuGSdLXMv+4ezGXu5goetoddf+EbK7+Al15TLcX/dE ANNXZqgcVq7lJwgpl73XY8RzX5ZNJqR8vrnv+P6TT88sDyoSXQ7CoPAHAPdokBdQc5gs 19kSlttTWDvV6wEgpBrKHgAj9UZor+YxkxmUBXEr9wX+luCI9iZX2QwXqdNYu6R0C0Hb nBbA== X-Gm-Message-State: ALoCoQl6NiuWKvqLAmCJHAz9RWN3RNiv+EajO1qwwjqu9dHXDsbyQ3z+pIlpT5+s/5QtMxVitEbN X-Received: by 10.224.147.72 with SMTP id k8mr1166630qav.5.1398353549704; Thu, 24 Apr 2014 08:32:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.20.138 with SMTP id 10ls1087101qgj.92.gmail; Thu, 24 Apr 2014 08:32:29 -0700 (PDT) X-Received: by 10.221.37.1 with SMTP id tc1mr1052171vcb.32.1398353549527; Thu, 24 Apr 2014 08:32:29 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id tv3si1004034vdc.90.2014.04.24.08.32.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 08:32:29 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id lf12so933176vcb.27 for ; Thu, 24 Apr 2014 08:32:29 -0700 (PDT) X-Received: by 10.52.53.101 with SMTP id a5mr1425108vdp.14.1398353549443; Thu, 24 Apr 2014 08:32:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp25435vcb; Thu, 24 Apr 2014 08:32:28 -0700 (PDT) X-Received: by 10.66.155.102 with SMTP id vv6mr831192pab.89.1398353548620; Thu, 24 Apr 2014 08:32:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ug9si2920746pab.48.2014.04.24.08.32.27; Thu, 24 Apr 2014 08:32:27 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932251AbaDXPbs (ORCPT + 27 others); Thu, 24 Apr 2014 11:31:48 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:49529 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758199AbaDXPbj (ORCPT ); Thu, 24 Apr 2014 11:31:39 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3OFV7ko032616; Thu, 24 Apr 2014 10:31:07 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3OFV6la003364; Thu, 24 Apr 2014 10:31:06 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Thu, 24 Apr 2014 10:31:06 -0500 Received: from ula0393909.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3OFU9MD019851; Thu, 24 Apr 2014 10:31:06 -0500 From: Santosh Shilimkar To: CC: , , Santosh Shilimkar , Nicolas Pitre , Russell King - ARM Linux , Catalin Marinas , Will Deacon Subject: [PATCH v3 7/7] ARM: dma: use phys_addr_t in __dma_page_[cpu_to_dev/dev_to_cpu] Date: Thu, 24 Apr 2014 11:30:07 -0400 Message-ID: <1398353407-2345-8-git-send-email-santosh.shilimkar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398353407-2345-1-git-send-email-santosh.shilimkar@ti.com> References: <1398353407-2345-1-git-send-email-santosh.shilimkar@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: santosh.shilimkar@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On a 32 bit ARM architecture with LPAE extension physical addresses cannot fit into unsigned long variable. So fix it by using phys_addr_t instead of unsigned long. Cc: Nicolas Pitre Cc: Russell King - ARM Linux Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Santosh Shilimkar Acked-by: Will Deacon --- arch/arm/mm/dma-mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index f62aa06..5260f43 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -885,7 +885,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, static void __dma_page_cpu_to_dev(struct page *page, unsigned long off, size_t size, enum dma_data_direction dir) { - unsigned long paddr; + phys_addr_t paddr; dma_cache_maint_page(page, off, size, dir, dmac_map_area); @@ -901,7 +901,7 @@ static void __dma_page_cpu_to_dev(struct page *page, unsigned long off, static void __dma_page_dev_to_cpu(struct page *page, unsigned long off, size_t size, enum dma_data_direction dir) { - unsigned long paddr = page_to_phys(page) + off; + phys_addr_t paddr = page_to_phys(page) + off; /* FIXME: non-speculating: not required */ /* don't bother invalidating if DMA to device */