From patchwork Mon Dec 3 15:47:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10709907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6319214BD for ; Mon, 3 Dec 2018 15:48:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 539072A1F2 for ; Mon, 3 Dec 2018 15:48:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 476F82A563; Mon, 3 Dec 2018 15:48:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB6802A1F2 for ; Mon, 3 Dec 2018 15:48:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D31E46B69EB; Mon, 3 Dec 2018 10:48:32 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D08136B69EC; Mon, 3 Dec 2018 10:48:32 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF6C16B69ED; Mon, 3 Dec 2018 10:48:32 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by kanga.kvack.org (Postfix) with ESMTP id 7C0A16B69EB for ; Mon, 3 Dec 2018 10:48:32 -0500 (EST) Received: by mail-pf1-f199.google.com with SMTP id q63so9950665pfi.19 for ; Mon, 03 Dec 2018 07:48:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:in-reply-to:references:message-id; bh=tfUYTw2xtNj94uKpGZXfl1+7ZvG8At7gBUJavL4EZvc=; b=sWyq8blx7ztV1ozDmXMSfx8uEJ8/il0q3J+qn1rdvkpwpWs2XhJvnQ1aEXyj8sf3D0 8q46RcoXOL3hhwpfnWot8Yb5kuXNM0D6NsNyIzO6bvdmt5VS2R6LdM9YHxA4FyTWqRR2 ibfi8AG86QAFLvL8ycDJ97l4o7UTb9D2wPzjwmZI5+3m/XJX5zo5pjB93tmidtnVHWEt 76LOkuWi/9mTPAX3V6EgkMH4IOVX6TgYBVZxgzpMDbqLK1YNtGDQUqgobptxxZkpOrHi NvNCRXn1Q1jsgJQdevsC9gqkbQLwI64auqSH3UVc9l4Q8bQPRJLB2nZPbdr8Dd9Nmtq7 OZ+g== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of rppt@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=rppt@linux.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: AA+aEWahrTjpbPRaosmH3tZMQ8ciWvE+70msd7yC+G8yk+EG3vz4zZCi 6EnyhhwiJau4Br6eyaxjyK75aosIGuhmkpQxwwhBIYIqer7ternMrVBoeQo+FKDdJyo9J0jl5NU 3Evjn8TImVaGR0jn9DpbdFH0pf79NqdSvHBe8YQM8UYmQTJJ0VkMdpwUy0V5Elbtdxg== X-Received: by 2002:a17:902:4c85:: with SMTP id b5mr15700161ple.226.1543852112178; Mon, 03 Dec 2018 07:48:32 -0800 (PST) X-Google-Smtp-Source: AFSGD/VaII5ClVjPZm366WgR1xSeVIrxfQtITuYrf0Q2VGzFMCL0HsH6Wrr+6FdBlKjLuvfyPfAa X-Received: by 2002:a17:902:4c85:: with SMTP id b5mr15700136ple.226.1543852111569; Mon, 03 Dec 2018 07:48:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543852111; cv=none; d=google.com; s=arc-20160816; b=pXLUNfW6QsXdMhRFDFzAVYECZGu2UkhxSBl7eHjBE0U4IFZTOtDa2ch6B5My5EgQfw WF8pFNu4DR158Hey4I404Q7wJyZkvs/oVVi3rCtNGAG1Yagj6gLjFUx6wD/kidiufQmz ZCFg+q1q1xcLoIJtnpE2BL3QqAOiCvxRPBs/Bv55pddJl1PG/Nfx6Im/2xHPpd7cobCf ZlnbgsVszZITA8oOT7VlcnSynoOYhmgC24Qj4kNpwUa0cKudu9aJUP4YBfjkyIq0e0MU u/xaSvg6G8a5cwmEzTyJ1jwMa8BSPKaQVghnIFNWkKW8ze6k1LShPS3Y6JLMJXkzJF7t Bhbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:references:in-reply-to:date:subject:cc:to:from; bh=tfUYTw2xtNj94uKpGZXfl1+7ZvG8At7gBUJavL4EZvc=; b=DD7ABsZrIKSD1wkpcboLkHTm2/1xaFtXQoZsUbCunHE3/Q//VWF5RMYCx6gpwA0loK BSpJk3K07zKKOz1LI+GU8APsQ7FDi1BFgDbIHIMBejpTasM1jTZeLND12m3u4NLELGod IXCRA3KRU74K+cbDNJsjtnpfWw+XqwQ3cMRPhJCX4NwSECcx8BkZxftYol3Do8/vjTGn H615xiKdMxqSKjKovNA3oT7Oj9tToUHmPYipS7O5ED0GmukOBbNaQJoXY/cdR+ViqQ1m xD7HnN4Q7ww+yEx7fKq13rz6a0I4/YhVt7N9PFA4H6tFJG2vbuAgAtJvDR6l0UT3dSqy RVbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of rppt@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=rppt@linux.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id p14si13037234plq.25.2018.12.03.07.48.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 07:48:31 -0800 (PST) Received-SPF: pass (google.com: domain of rppt@linux.ibm.com designates 148.163.156.1 as permitted sender) client-ip=148.163.156.1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of rppt@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=rppt@linux.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wB3FichM133952 for ; Mon, 3 Dec 2018 10:48:31 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p5677v5f6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 03 Dec 2018 10:48:28 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Dec 2018 15:47:38 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 3 Dec 2018 15:47:32 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wB3FlV2C6357170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Dec 2018 15:47:31 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1AB29A4053; Mon, 3 Dec 2018 15:47:31 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1169A405E; Mon, 3 Dec 2018 15:47:27 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.206.196]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 3 Dec 2018 15:47:27 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Mon, 03 Dec 2018 17:47:27 +0200 From: Mike Rapoport To: Andrew Morton Cc: Arnd Bergmann , Benjamin Herrenschmidt , "David S. Miller" , Guan Xuetao , Greentime Hu , Jonas Bonn , Michael Ellerman , Michal Hocko , Michal Simek , Mark Salter , Paul Mackerras , Rich Felker , Russell King , Stefan Kristiansson , Stafford Horne , Vincent Chen , Yoshinori Sato , linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, Mike Rapoport Subject: [PATCH v2 2/6] microblaze: prefer memblock API returning virtual address Date: Mon, 3 Dec 2018 17:47:11 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543852035-26634-1-git-send-email-rppt@linux.ibm.com> References: <1543852035-26634-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18120315-0020-0000-0000-000002F16E90 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18120315-0021-0000-0000-00002140E297 Message-Id: <1543852035-26634-3-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-03_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=730 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812030148 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Rather than use the memblock_alloc_base that returns a physical address and then convert this address to the virtual one, use appropriate memblock function that returns a virtual address. Signed-off-by: Mike Rapoport Tested-by: Michal Simek --- arch/microblaze/mm/init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index b17fd8a..44f4b89 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c @@ -363,8 +363,9 @@ void __init *early_get_page(void) * Mem start + kernel_tlb -> here is limit * because of mem mapping from head.S */ - return __va(memblock_alloc_base(PAGE_SIZE, PAGE_SIZE, - memory_start + kernel_tlb)); + return memblock_alloc_try_nid_raw(PAGE_SIZE, PAGE_SIZE, + MEMBLOCK_LOW_LIMIT, memory_start + kernel_tlb, + NUMA_NO_NODE); } #endif /* CONFIG_MMU */