From patchwork Sat Apr 19 14:32:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 28656 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CBABF20553 for ; Sat, 19 Apr 2014 14:34:35 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id jt11sf10983181pbb.11 for ; Sat, 19 Apr 2014 07:34:35 -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=Thud0bOfEcPW+/SJo0vgmNIt9haCAHzcOvNR91jahRg=; b=ENUyfDZcsSaMp8cX3lyd3EnDl3qm6KljdzPnWvKXEji1a8huJWO2DiGmzAGq5d8N3C fdo1JbtM2VIyFFNM5rEoQbJBnHgDBJfHU3dA/zSFP7Kj5Jw8jhU/V0zAF1rzFyq3CfCE qAEsfkLSULNhRmRPAiwCZ5jg5q78yuOF16hTbktrylsDLmdOrV/Mhr9e5ZQAvSs+deRQ v8v2ixMK4ksnhoobYm/uukdzBWptJDW+0i/pISP1cBuP31kkLlz0sfeEyiByZyG89qMO 8UnSOtW6zQAb4ULp8uyk1bwg8jqBCHpjVEbqnrcNRsI0VnIJikX13v8m3bvU81LxCKxV 7MyA== X-Gm-Message-State: ALoCoQlGgGnAhkdwxPYwW9dLHNyg/UzpYQBT++QD+9ykb5CVD2dr2h6vGVb4LEayFS7Euj2j+KrS X-Received: by 10.67.5.165 with SMTP id cn5mr15158306pad.9.1397918075096; Sat, 19 Apr 2014 07:34:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.72 with SMTP id s66ls1924710qgd.11.gmail; Sat, 19 Apr 2014 07:34:34 -0700 (PDT) X-Received: by 10.220.59.65 with SMTP id k1mr19508845vch.22.1397918074946; Sat, 19 Apr 2014 07:34:34 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id tm8si5439985vdc.134.2014.04.19.07.34.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 19 Apr 2014 07:34:34 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so4913339veb.34 for ; Sat, 19 Apr 2014 07:34:34 -0700 (PDT) X-Received: by 10.58.211.69 with SMTP id na5mr691791vec.30.1397918074863; Sat, 19 Apr 2014 07:34:34 -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 ib8csp182169vcb; Sat, 19 Apr 2014 07:34:34 -0700 (PDT) X-Received: by 10.68.249.195 with SMTP id yw3mr2884737pbc.134.1397918074013; Sat, 19 Apr 2014 07:34:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pb4si17955895pac.154.2014.04.19.07.34.33; Sat, 19 Apr 2014 07:34:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753322AbaDSOeW (ORCPT + 26 others); Sat, 19 Apr 2014 10:34:22 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:38757 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbaDSOeP (ORCPT ); Sat, 19 Apr 2014 10:34:15 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3JEXq3G014714; Sat, 19 Apr 2014 09:33:52 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3JEXq5W012031; Sat, 19 Apr 2014 09:33:52 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Sat, 19 Apr 2014 09:33:52 -0500 Received: from ula0393909.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3JEXT35019097; Sat, 19 Apr 2014 09:33:52 -0500 From: Santosh Shilimkar To: CC: , , Santosh Shilimkar Subject: [PATCH v2 7/7] ARM: mm: use phys_addr_t in __dma_page_[cpu_to_dev/dev_to_cpu] Date: Sat, 19 Apr 2014 10:32:52 -0400 Message-ID: <1397917972-6293-8-git-send-email-santosh.shilimkar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397917972-6293-1-git-send-email-santosh.shilimkar@ti.com> References: <1397917972-6293-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: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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. Signed-off-by: Santosh Shilimkar --- 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 */