Message ID | 1543852035-26634-5-git-send-email-rppt@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 2138A109C for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 3 Dec 2018 15:48:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 105DE2A06C for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 3 Dec 2018 15:48:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03BED2A1F2; Mon, 3 Dec 2018 15:48:02 +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=ham 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 826AE2A06C for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 3 Dec 2018 15:48:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E1B996B69E4; Mon, 3 Dec 2018 10:47:59 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DCB7B6B69E5; Mon, 3 Dec 2018 10:47:59 -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 CBA646B69E6; Mon, 3 Dec 2018 10:47:59 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id 72C766B69E4 for <linux-mm@kvack.org>; Mon, 3 Dec 2018 10:47:59 -0500 (EST) Received: by mail-ed1-f69.google.com with SMTP id w15so6685799edl.21 for <linux-mm@kvack.org>; Mon, 03 Dec 2018 07:47:59 -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=0KMfyYLyN5o6yRvFEXtgLvdgGc2uMzx7ET/a+cXuAWQ=; b=T6qDcGnrQ0fq9xPUJXl3JHWRsJML3zdj47QLXhxG4jpwK7IWEm++3cqF3WJWwKB3Ku jW/QXNcvU9p0qkPylMg5a8XJsfuFZ2WGYZNevFrjTAkrze7JHkf2a/Nzfj+8MuXVwd5F Y6ZaKcFSANdC5KMlVem8IN81D8g0Cq24vP8/5BmDWQ1bGO2IuCgJtd7ufkeyGT4VBVnZ cpsiN+3iKEgwwEBXT3542Cw4oNsGbio/p4qatadpboZXDdvsa8kk3cEZLCMAwOcZQKUr todcPFPvRSyTVCWI2ZzHzHebdfjq2QWSEwKrU6Z18ZUd44pme2uMlez6gTydvCezf/jA HGZQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of rppt@linux.ibm.com designates 148.163.158.5 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+aEWZPy39ISsXUJu10FmlfWy4XaBZZgR5Gi8ugqQkH+QHDFkB5A+wi euLe+fItu0772syo933cwFGCudSEZpJofZelnRx4DBvJM+BSMkBxY1WHKAzVmKCD8hgE/7o2nJF CSaaVTHi9sG0QT5upNg5bApmMysAiB3pjwJbx6j7h+xs1qPn69tbEjZUjceg4FB1RZQ== X-Received: by 2002:a17:906:bb02:: with SMTP id jz2-v6mr12899517ejb.59.1543852078972; Mon, 03 Dec 2018 07:47:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/WFlqWTVedf4HNguLl4lc7s/6J4iy3N+Ie/oHCo5yJHuatjRGvBD7/+iqeaLHf6a9qutwYY X-Received: by 2002:a17:906:bb02:: with SMTP id jz2-v6mr12899490ejb.59.1543852078051; Mon, 03 Dec 2018 07:47:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543852078; cv=none; d=google.com; s=arc-20160816; b=Be2777tbKQ9kPR4dQQNPHWK8xhKxTXOIn8RV64jHiXHfcRaVbkltBJ39SGdTPIopPi Vt4FeFA6gVL38HUn7TxmT/4OF6EE4wQA/4zP6g7nLFWWTfwlpQ119dAxB86BDTGNkzAZ EKORlFBP8NQn+fAPhIkASPuMR1ZaQU2uIVhgYJtdc1Gu+xo+Tn5mvNMCHQjq0OTl0jxO MjA5CdHyHvaMs8IJiQtyvomiosYM8TRXPKb7nq14BgS18Wx/AbdYrz4iAaWFEuaBOO0+ Z/hPWbwxSVuWk+KqajSzR8cuaAcSiICYad4+aZt98sc6qBczAIPdAXK/T0+HUKMhLN/H VeSA== 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=0KMfyYLyN5o6yRvFEXtgLvdgGc2uMzx7ET/a+cXuAWQ=; b=W2JysN+DyEdqQj3uCgdbjE6TpcGnF5Cep3ZYofF5rNwpptCIKkKZW/kxtgA1KvFbmG S4EycZAZt61zv7eoFPNFCVumwyQYLttzrWVQTx/BlfHKQ16RZDH86bdk43ZZQVeFBPAD TWFKuaaBX7eyfjXeFGMjwZamsB/iuBM/swdcGrsGnWPSg+ijThky7Kd3rez3L7kHQLdt B6QurCzU4LYZs77u4OM1JXFwgK4NIcbJffTkhQSHN4iBa4OY+6x2dIrgKXZ5PEM8P4Xs cgNga6C6Tds6D89cpohtLAkxEIcUSgubQTU81vPzhO1a9lQ/lwjSv0jaFPwtfkIFnVtd zBzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of rppt@linux.ibm.com designates 148.163.158.5 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 (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id w5si910469edr.322.2018.12.03.07.47.57 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 07:47:58 -0800 (PST) Received-SPF: pass (google.com: domain of rppt@linux.ibm.com designates 148.163.158.5 as permitted sender) client-ip=148.163.158.5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of rppt@linux.ibm.com designates 148.163.158.5 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 (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wB3FiCa0000719 for <linux-mm@kvack.org>; Mon, 3 Dec 2018 10:47:56 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p5680mjd8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <linux-mm@kvack.org>; Mon, 03 Dec 2018 10:47:55 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <linux-mm@kvack.org> from <rppt@linux.ibm.com>; Mon, 3 Dec 2018 15:47:48 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp07.uk.ibm.com (192.168.101.137) 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:40 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wB3Fldqi393682 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Dec 2018 15:47:39 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53C3211C050; Mon, 3 Dec 2018 15:47:39 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 13B0611C05E; Mon, 3 Dec 2018 15:47:36 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.206.196]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 3 Dec 2018 15:47:35 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Mon, 03 Dec 2018 17:47:35 +0200 From: Mike Rapoport <rppt@linux.ibm.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, "David S. Miller" <davem@davemloft.net>, Guan Xuetao <gxt@pku.edu.cn>, Greentime Hu <green.hu@gmail.com>, Jonas Bonn <jonas@southpole.se>, Michael Ellerman <mpe@ellerman.id.au>, Michal Hocko <mhocko@suse.com>, Michal Simek <monstr@monstr.eu>, Mark Salter <msalter@redhat.com>, Paul Mackerras <paulus@samba.org>, Rich Felker <dalias@libc.org>, Russell King <linux@armlinux.org.uk>, Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>, Stafford Horne <shorne@gmail.com>, Vincent Chen <deanbo422@gmail.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, 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 <rppt@linux.ibm.com> Subject: [PATCH v2 4/6] openrisc: simplify pte_alloc_one_kernel() Date: Mon, 3 Dec 2018 17:47:13 +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-0028-0000-0000-00000325602D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18120315-0029-0000-0000-000023E164D7 Message-Id: <1543852035-26634-5-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=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=850 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: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
memblock: simplify several early memory allocation
|
expand
|
diff --git a/arch/openrisc/mm/ioremap.c b/arch/openrisc/mm/ioremap.c index c969752..cfef989 100644 --- a/arch/openrisc/mm/ioremap.c +++ b/arch/openrisc/mm/ioremap.c @@ -123,13 +123,10 @@ pte_t __ref *pte_alloc_one_kernel(struct mm_struct *mm, { pte_t *pte; - if (likely(mem_init_done)) { - pte = (pte_t *) __get_free_page(GFP_KERNEL); - } else { - pte = (pte_t *) __va(memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE)); - } + if (likely(mem_init_done)) + pte = (pte_t *)get_zeroed_page(GFP_KERNEL); + else + pte = memblock_alloc(PAGE_SIZE, PAGE_SIZE); - if (pte) - clear_page(pte); return pte; }