From patchwork Sun Aug 9 18:28:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kuleshov X-Patchwork-Id: 6978781 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7FC7CC05AC for ; Sun, 9 Aug 2015 18:28:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82DBD20576 for ; Sun, 9 Aug 2015 18:28:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 686F520570 for ; Sun, 9 Aug 2015 18:28:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933142AbbHIS20 (ORCPT ); Sun, 9 Aug 2015 14:28:26 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:35240 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933141AbbHIS20 (ORCPT ); Sun, 9 Aug 2015 14:28:26 -0400 Received: by lahi9 with SMTP id i9so13441934lah.2; Sun, 09 Aug 2015 11:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=omm2tHA3xGY19r/KQcYAGNSNQLTQPYzbzt+oVCrqItI=; b=vBja51OxN10RHqJODZwK2S+rpU4aQhwTcuTl8zOtUtVI8yH7O2I2o5YyAeLLWyUvG0 rEvGAbAL0uXBzyuLwfH7culX5v/YRlFvcCOH3kZE63Wa152qxfsg+3m+WG7v5dunO3/u +vhDG3ZplkMQ9ttzrIFEfQ5HAsPzIn+UTFu8c4bBcoYAyAVEyzoqcDGrTE1lNDRTE1FE Tz64XyRbzMkRN5hRVjSSjawK5ONlL56mN7LAjas01a0cjF4jMDTStDGfD7Da1j/8lEny hXuUCXZ3phctDqe5GkzJrpWnoZWyONsqZnVXC60tKtaI0rQ7FMXHeDM7Cyxo2iafrjUk DUmw== X-Received: by 10.152.36.196 with SMTP id s4mr17293238laj.10.1439144904527; Sun, 09 Aug 2015 11:28:24 -0700 (PDT) Received: from alex.fedora ([37.150.82.60]) by smtp.gmail.com with ESMTPSA id qh3sm857616lbb.25.2015.08.09.11.28.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Aug 2015 11:28:24 -0700 (PDT) From: Alexander Kuleshov To: Andrew Morton Cc: Geert Uytterhoeven , Dan Carpenter , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Kuleshov Subject: [PATCH] SH: use PFN_DOWN macro Date: Mon, 10 Aug 2015 00:28:11 +0600 Message-Id: <1439144891-8141-1-git-send-email-kuleshovmail@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace ((x) >> PAGE_SHIFT) with the predefined PFN_DOWN macro. Signed-off-by: Alexander Kuleshov Acked-by: Geert Uytterhoeven --- arch/sh/mm/init.c | 4 ++-- arch/sh/mm/numa.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) - start_pfn = start >> PAGE_SHIFT; - end_pfn = end >> PAGE_SHIFT; + start_pfn = PFN_DOWN(start); + end_pfn = PFN_DOWN(end); pmb_bolt_mapping((unsigned long)__va(start), start, end - start, PAGE_KERNEL); -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 2790b6a..17f4862 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -488,6 +488,6 @@ void free_initrd_mem(unsigned long start, unsigned long end) int arch_add_memory(int nid, u64 start, u64 size) { pg_data_t *pgdat; - unsigned long start_pfn = start >> PAGE_SHIFT; + unsigned long start_pfn = PFN_DOWN(start); unsigned long nr_pages = size >> PAGE_SHIFT; int ret; @@ -517,7 +517,7 @@ EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); #ifdef CONFIG_MEMORY_HOTREMOVE int arch_remove_memory(u64 start, u64 size) { - unsigned long start_pfn = start >> PAGE_SHIFT; + unsigned long start_pfn = PFN_DOWN(start); unsigned long nr_pages = size >> PAGE_SHIFT; struct zone *zone; int ret; diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c index bce52ba..05713d1 100644 --- a/arch/sh/mm/numa.c +++ b/arch/sh/mm/numa.c @@ -33,2 +33,2 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end) /* Don't allow bogus node assignment */ BUG_ON(nid >= MAX_NUMNODES || nid <= 0);