From patchwork Wed Jul 27 20:10:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 72911 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp495932qga; Wed, 27 Jul 2016 13:12:37 -0700 (PDT) X-Received: by 10.98.96.193 with SMTP id u184mr23703298pfb.85.1469650357116; Wed, 27 Jul 2016 13:12:37 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id z185si7984047pfz.64.2016.07.27.13.12.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 13:12:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bSVAx-0007GC-EC; Wed, 27 Jul 2016 20:11:31 +0000 Received: from mail-qt0-x22f.google.com ([2607:f8b0:400d:c0d::22f]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bSVAP-0007FC-Vj for linux-arm-kernel@lists.infradead.org; Wed, 27 Jul 2016 20:11:02 +0000 Received: by mail-qt0-x22f.google.com with SMTP id w38so36662224qtb.0 for ; Wed, 27 Jul 2016 13:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:user-agent:mime-version; bh=I4olkDM7Z6QrGdqCRhx8W6CTehL3mz5nDUXTNJzoiTg=; b=XzwKcXHzSSTHd7KPckFZYBQQ4XsU5kVVtRkU9NY8u2B8K5Lu9bK0B+HsTkFgkVmmUU lQ81BjX+39hxjTwSXtNGXuoqXohELpMtg+/WnYScLyENgBaAr/IdHPhhpVADaxmW22ZG BFB0DDrEcVm0Yrk5RCXL0cLbGY9LKMKEE9qOg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:user-agent :mime-version; bh=I4olkDM7Z6QrGdqCRhx8W6CTehL3mz5nDUXTNJzoiTg=; b=DupUN4qTlh6QSpFR6slpopIjG/4tJOYA6GM+a/vsnN1LJrbUmb8MZtBatsIdSGcr7V NLKmFK+rNQ9Hq6ly7UAGQKHfvftanuhdsabm33lCmXXak6lvnsu7cqyuGOZIXYU6a1E1 Fqk/ZMMwzJQHBtIAaeX1Hy2+wDFKiug/pVmSQxOiN/SWTR9gvWwFZ1cKK0XPJZyf3/Z4 bW/PBjS522/DKCSkpi3CGu7A9sKog0FP8IxQ/OKAJgB2UnZITGXh734tNogijql9vKho Fyr3mJqoB6tpdH8RedhO9AS2X+D9xphKB4VSr3HPsuuEvcvzLUWVEDLj+k6z5PxZdXbV bQVw== X-Gm-Message-State: AEkoouv6Xr+Pcj04lzG7zd0AcSB8KzDBzRodHMoexc3CH/fEqb28JIXy0fRzpX1VDscShd5Y X-Received: by 10.237.42.197 with SMTP id t63mr51005221qtd.84.1469650236339; Wed, 27 Jul 2016 13:10:36 -0700 (PDT) Received: from xanadu.home ([2607:fa48:6e39:d410:feaa:14ff:fea7:ed77]) by smtp.gmail.com with ESMTPSA id 73sm5227674qtc.16.2016.07.27.13.10.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 13:10:35 -0700 (PDT) Date: Wed, 27 Jul 2016 16:10:34 -0400 (EDT) From: Nicolas Pitre To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] asm/memory.h: remove dead definitions Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160727_131058_244450_CEC91331 X-CRM114-Status: GOOD ( 10.61 ) X-Spam-Score: -1.7 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400d:c0d:0:0:0:22f listed in] [list.dnswl.org] 1.0 FSL_HELO_HOME No description available. -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The last ad-hoc __phys_to_virt definition was removed in commit fd0053c9 ("ARM: realview: remove sparsemem hack"). Therefore we can remove the unneeded definitions and unduplicate the virt_to_pfn macro from asm/memory.h. Signed-off-by: Nicolas Pitre _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 31c07a2cc1..76cbd9c674 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -159,13 +159,8 @@ * PFNs are used to describe any physical page; this means * PFN 0 == physical address 0. */ -#if defined(__virt_to_phys) -#define PHYS_OFFSET PLAT_PHYS_OFFSET -#define PHYS_PFN_OFFSET ((unsigned long)(PHYS_OFFSET >> PAGE_SHIFT)) - -#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) -#elif defined(CONFIG_ARM_PATCH_PHYS_VIRT) +#if defined(CONFIG_ARM_PATCH_PHYS_VIRT) /* * Constants used to force the right instruction encodings and shifts @@ -182,10 +177,6 @@ extern const void *__pv_table_begin, *__pv_table_end; #define PHYS_OFFSET ((phys_addr_t)__pv_phys_pfn_offset << PAGE_SHIFT) #define PHYS_PFN_OFFSET (__pv_phys_pfn_offset) -#define virt_to_pfn(kaddr) \ - ((((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT) + \ - PHYS_PFN_OFFSET) - #define __pv_stub(from,to,instr,type) \ __asm__("@ __pv_stub\n" \ "1: " instr " %0, %1, %2\n" \ @@ -257,12 +248,12 @@ static inline unsigned long __phys_to_virt(phys_addr_t x) return x - PHYS_OFFSET + PAGE_OFFSET; } +#endif + #define virt_to_pfn(kaddr) \ ((((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT) + \ PHYS_PFN_OFFSET) -#endif - /* * These are *only* valid on the kernel direct mapped RAM memory. * Note: Drivers should NOT use these. They are the wrong