Message ID | 1393506599-11561-2-git-send-email-Liviu.Dudau@arm.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCZ6BIVBZUDBBVHSXSMAKGQEJNAL4XI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A600120447 for <linaro@patches.linaro.org>; Thu, 27 Feb 2014 13:10:45 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf5958260pab.7 for <linaro@patches.linaro.org>; Thu, 27 Feb 2014 05:10:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=dAmJ7sl4Df6CUbMSCg27LticadlrFjzLKQ8Rmq4dGCo=; b=OfUOphAVkRjZaziEDcsEBNqWTnggCzkD1KIII6mkSA8Z7BjqSZcZBdKBZhXiKszOPp 5wt374PGYOHowQt4Gww5RE1N1p6fwEZiLqhNfEwv9cPLRoHfiOYsmLL5muW67hrFcjOb hea2S5+jTgxLdPYTOGF/MayBiNHPEYdPVad+9DU+dpDkFsEt7SvguDU4u8tvjycw5Fk3 Ay1Egyjs/56quff8KoXnrlUW0/SwI/4LbHV2Iw5pykIE1OEO8wAtXNobrIDqCFw6uRXv JTFvPlasYzxXv/Rcqj8dpQiwtNa94nAVXkW8kEC+K/Ag3x93PFU1jQrg8bl16svk5jEP chrQ== X-Gm-Message-State: ALoCoQlECZGdkB04zrWBTJnwWQ8y5pexkY3BB3eD4Tc9LsTLbulFcDAxqbTB6WOQpbG+0YI3hSGI X-Received: by 10.66.189.228 with SMTP id gl4mr6143582pac.26.1393506644883; Thu, 27 Feb 2014 05:10:44 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.44.101 with SMTP id f92ls647404qga.61.gmail; Thu, 27 Feb 2014 05:10:44 -0800 (PST) X-Received: by 10.58.12.169 with SMTP id z9mr3534veb.61.1393506644595; Thu, 27 Feb 2014 05:10:44 -0800 (PST) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id rl1si1133559vcb.74.2014.02.27.05.10.44 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Feb 2014 05:10:44 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.178 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.178; Received: by mail-ve0-f178.google.com with SMTP id jy13so3749272veb.37 for <patchwork-forward@linaro.org>; Thu, 27 Feb 2014 05:10:44 -0800 (PST) X-Received: by 10.220.103.141 with SMTP id k13mr10567738vco.25.1393506644520; Thu, 27 Feb 2014 05:10:44 -0800 (PST) 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.174.196 with SMTP id u4csp15780vcz; Thu, 27 Feb 2014 05:10:44 -0800 (PST) X-Received: by 10.68.2.99 with SMTP id 3mr13245921pbt.49.1393506643188; Thu, 27 Feb 2014 05:10:43 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ra2si4569468pab.124.2014.02.27.05.10.42; Thu, 27 Feb 2014 05:10:42 -0800 (PST) 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 S1752870AbaB0NKf (ORCPT <rfc822;linus.walleij@linaro.org> + 26 others); Thu, 27 Feb 2014 08:10:35 -0500 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21]:50601 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752586AbaB0NKe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Feb 2014 08:10:34 -0500 Received: from e106497-lin.cambridge.arm.com (e106497-lin.cambridge.arm.com [10.1.195.170]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s1RD9xr1019375; Thu, 27 Feb 2014 13:09:59 GMT From: Liviu Dudau <Liviu.Dudau@arm.com> To: linux-pci <linux-pci@vger.kernel.org>, Bjorn Helgaas <bhelgaas@google.com>, Catalin Marinas <Catalin.Marinas@arm.com>, Will Deacon <Will.Deacon@arm.com>, linaro-kernel <linaro-kernel@lists.linaro.org> Cc: LKML <linux-kernel@vger.kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, LAKML <linux-arm-kernel@lists.infradead.org> Subject: [PATCH v2 1/3] Fix ioport_map() for !CONFIG_GENERIC_IOMAP cases. Date: Thu, 27 Feb 2014 13:09:57 +0000 Message-Id: <1393506599-11561-2-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393506599-11561-1-git-send-email-Liviu.Dudau@arm.com> References: <1393506599-11561-1-git-send-email-Liviu.Dudau@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: liviu.dudau@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.178 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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index d5afe96..df72051 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -331,7 +331,7 @@ static inline void iounmap(void __iomem *addr) #ifndef CONFIG_GENERIC_IOMAP static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) { - return (void __iomem *) port; + return (void __iomem *)(PCI_IOBASE + (port & IO_SPACE_LIMIT)); } static inline void ioport_unmap(void __iomem *p)
The inline version of ioport_map() that gets used when !CONFIG_GENERIC_IOMAP is wrong. It returns a mapped (i.e. virtual) address that can start from zero and completely ignores the PCI_IOBASE and IO_SPACE_LIMIT that most architectures that use !CONFIG_GENERIC_MAP define. Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>