From patchwork Mon Feb 18 18:41:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10818593 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 87AA517D5 for ; Mon, 18 Feb 2019 18:41:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 762F12BB09 for ; Mon, 18 Feb 2019 18:41:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A52B2BBC9; Mon, 18 Feb 2019 18:41:53 +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 C793B2BBB3 for ; Mon, 18 Feb 2019 18:41:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C3E468E0005; Mon, 18 Feb 2019 13:41:51 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BF7288E0002; Mon, 18 Feb 2019 13:41:51 -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 A8F598E0005; Mon, 18 Feb 2019 13:41:51 -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 6DAC28E0002 for ; Mon, 18 Feb 2019 13:41:51 -0500 (EST) Received: by mail-pf1-f199.google.com with SMTP id y66so14357707pfg.16 for ; Mon, 18 Feb 2019 10:41:51 -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=arYk/LA4o53pKMejYH43OPCN77EYbT06XyUWDqgGc6g=; b=SoxUUu39QQebl1o5wrmJAV9CbU3KDvW9ePXdTFkAOogzSju101k3nsaUNWpeyKaRB7 A8TtoQi49KwjIAv2piMXSgap9BJROpW6+esGtfoeTDbGgMrbABrCKaq9A5PqS1WLMS+D L5m1tYlHErOX/c0U6sLopxbWnbzysuHcJ53AkNgKrsBzBLBk/vU0IJ39adkbyUqGXfRw TJIztXxTV2wwL9Y8SsV8Eix6qY07vBIjraOESdcnbjhofX16WwzCVHYlJ+ImXY8SUl4u 64MZHpZg5AmGfSNx+1RjXQY0OY6U1QiT7tJO25i/TOaJAWw6VttxoUVR9bkCG0lxPUhc 9J4Q== 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: AHQUAubLxHPSqH08+dELEOlZe5Sv39Ka4nP3XMx4uijYFZVo2AvnwX4n YWgiqteP9z/q/7ZB6k+PFvdiJClsUR/iAQBRrwqggSONCgRYT98aVdqaW5LHHVspcZ4X0CEwoB7 6DvZXWmMOYZt1pGG/SNl6tRMUp2rTQGiyrI6zsddVlTfJrQida2xLR9AZWCGvY/uJbQ== X-Received: by 2002:a62:6702:: with SMTP id b2mr25170385pfc.244.1550515311081; Mon, 18 Feb 2019 10:41:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IbIEZ41kq+cfK2p7/VHziM0SlZ/3LDQiX/ip5gKSbKHXbG/PrUua1z9WZiDXLNmEATo4Lb+ X-Received: by 2002:a62:6702:: with SMTP id b2mr25170315pfc.244.1550515310037; Mon, 18 Feb 2019 10:41:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550515310; cv=none; d=google.com; s=arc-20160816; b=UE2QxMxWIhPzCA4HYLCDZuLoNuUt57ZHCMP0/rCLHSatuRhswNmziUpHoxcN+KtUNx w6Vh0HQPNXw2LOLd1yWgXnfWpLHXZSxzJ0S57Hk7UXSOzucwc/f4psHlOileO4T9NGF8 gLkwQbEM/lRng3BQDXtmOC6Bar2tBN7/AKW998LyKvhrpKFzaQkh4CyX9adRiUosA6VA qdbGKnL359j7UrH3EacyHY9n7LGBXPBuIGRaPRaSlgHie49JUhlxdrrZX4tIpYzWQHK9 zjY+G6m6AfnGwB+vF5GF7+E0AffHlPTDcgRS+0+EgXfdXNwF2Rbt8JVAdE/6WFf16i8u ZbSQ== 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=arYk/LA4o53pKMejYH43OPCN77EYbT06XyUWDqgGc6g=; b=R7pi7eHGbNu0xc5nAIDv14PgmSmN3aKE60N3vGZy9dEru4OzWnFTnGrxPouDilsic8 bp8nbq5eO4A/gQ34EOPjdkp18xhnv8SIfg4jjH1tpuuZL0iEkXFRj4dftjWQny7Nzu7W Qm/h7o71hqtl75MG/sFQKbgfT9niqls5XrlkF+csJiyrYyN6BZFFUN+Bau/vO4aCPpgL H7xeJbL3o0DjT1PirQtWFyUDTq7J6EeMFeh39ckKKyLskf8IUTeZ4lHx0aZe+LDzg7Sp xiQvs01E/CYEVjWZnXx0+D3AklHQV20eNhgkE7ms4F1DFg28yfc+c0GlkbKIU3IscGyw gMHQ== 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 f24si13663381pgb.398.2019.02.18.10.41.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 10:41:50 -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 (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1IIcqs1057659 for ; Mon, 18 Feb 2019 13:41:49 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qr151b2n0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Feb 2019 13:41:49 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Feb 2019 18:41:46 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) 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, 18 Feb 2019 18:41:42 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1IIffDH19857480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Feb 2019 18:41:41 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 960314C04A; Mon, 18 Feb 2019 18:41:41 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C5DC54C04E; Mon, 18 Feb 2019 18:41:37 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.207.239]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 18 Feb 2019 18:41:37 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Mon, 18 Feb 2019 20:41:36 +0200 From: Mike Rapoport To: Andrew Morton Cc: Christoph Hellwig , Palmer Dabbelt , Richard Kuo , linux-arch@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, Mike Rapoport Subject: [PATCH v2 1/4] init: provide a generic free_initmem implementation Date: Mon, 18 Feb 2019 20:41:22 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550515285-17446-1-git-send-email-rppt@linux.ibm.com> References: <1550515285-17446-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19021818-0028-0000-0000-0000034A033B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021818-0029-0000-0000-000024083C64 Message-Id: <1550515285-17446-2-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-18_14:,, 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-1902180138 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 For most architectures free_initmem just a wrapper for the same free_initmem_default(-1) call. Provide that as a generic implementation marked __weak. Signed-off-by: Mike Rapoport --- arch/alpha/mm/init.c | 6 ------ arch/arc/mm/init.c | 8 -------- arch/c6x/mm/init.c | 5 ----- arch/h8300/mm/init.c | 6 ------ arch/microblaze/mm/init.c | 5 ----- arch/nds32/mm/init.c | 5 ----- arch/nios2/mm/init.c | 5 ----- arch/openrisc/mm/init.c | 5 ----- arch/sh/mm/init.c | 5 ----- arch/unicore32/mm/init.c | 5 ----- arch/xtensa/mm/init.c | 5 ----- init/main.c | 5 +++++ 12 files changed, 5 insertions(+), 60 deletions(-) diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index 97f4940..e2cbec3 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c @@ -285,9 +285,3 @@ mem_init(void) memblock_free_all(); mem_init_print_info(NULL); } - -void -free_initmem(void) -{ - free_initmem_default(-1); -} diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index c357a3b..02b7a3b 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c @@ -206,11 +206,3 @@ void __init mem_init(void) memblock_free_all(); mem_init_print_info(NULL); } - -/* - * free_initmem: Free all the __init memory. - */ -void __ref free_initmem(void) -{ - free_initmem_default(-1); -} diff --git a/arch/c6x/mm/init.c b/arch/c6x/mm/init.c index 5504b71..3257c53 100644 --- a/arch/c6x/mm/init.c +++ b/arch/c6x/mm/init.c @@ -66,8 +66,3 @@ void __init mem_init(void) mem_init_print_info(NULL); } - -void __init free_initmem(void) -{ - free_initmem_default(-1); -} diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c index 2eff00d..73671d0 100644 --- a/arch/h8300/mm/init.c +++ b/arch/h8300/mm/init.c @@ -100,9 +100,3 @@ void __init mem_init(void) mem_init_print_info(NULL); } - -void -free_initmem(void) -{ - free_initmem_default(-1); -} diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 3bd32de..cf29692 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c @@ -186,11 +186,6 @@ void __init setup_memory(void) paging_init(); } -void free_initmem(void) -{ - free_initmem_default(-1); -} - void __init mem_init(void) { high_memory = (void *)__va(memory_start + lowmem_size - 1); diff --git a/arch/nds32/mm/init.c b/arch/nds32/mm/init.c index c02e10a..0003187 100644 --- a/arch/nds32/mm/init.c +++ b/arch/nds32/mm/init.c @@ -244,11 +244,6 @@ void __init mem_init(void) return; } -void free_initmem(void) -{ - free_initmem_default(-1); -} - void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) { diff --git a/arch/nios2/mm/init.c b/arch/nios2/mm/init.c index 60736a7..2c609c2 100644 --- a/arch/nios2/mm/init.c +++ b/arch/nios2/mm/init.c @@ -82,11 +82,6 @@ void __init mmu_init(void) flush_tlb_all(); } -void __ref free_initmem(void) -{ - free_initmem_default(-1); -} - #define __page_aligned(order) __aligned(PAGE_SIZE << (order)) pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER); diff --git a/arch/openrisc/mm/init.c b/arch/openrisc/mm/init.c index d0d94a4..aa83f7d 100644 --- a/arch/openrisc/mm/init.c +++ b/arch/openrisc/mm/init.c @@ -220,8 +220,3 @@ void __init mem_init(void) mem_init_done = 1; return; } - -void free_initmem(void) -{ - free_initmem_default(-1); -} diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 2fa824336..ca9761b 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -405,11 +405,6 @@ void __init mem_init(void) mem_init_done = 1; } -void free_initmem(void) -{ - free_initmem_default(-1); -} - #ifdef CONFIG_MEMORY_HOTPLUG int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, bool want_memblock) diff --git a/arch/unicore32/mm/init.c b/arch/unicore32/mm/init.c index 01271ce..2c52d9b 100644 --- a/arch/unicore32/mm/init.c +++ b/arch/unicore32/mm/init.c @@ -311,8 +311,3 @@ void __init mem_init(void) sysctl_overcommit_memory = OVERCOMMIT_ALWAYS; } } - -void free_initmem(void) -{ - free_initmem_default(-1); -} diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index d498610..b51746f 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c @@ -216,11 +216,6 @@ void free_initrd_mem(unsigned long start, unsigned long end) } #endif -void free_initmem(void) -{ - free_initmem_default(-1); -} - static void __init parse_memmap_one(char *p) { char *oldp; diff --git a/init/main.c b/init/main.c index c86a1c8..38d69e0 100644 --- a/init/main.c +++ b/init/main.c @@ -1047,6 +1047,11 @@ static inline void mark_readonly(void) } #endif +void __weak free_initmem(void) +{ + free_initmem_default(-1); +} + static int __ref kernel_init(void *unused) { int ret; From patchwork Mon Feb 18 18:41:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10818595 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 C8AA417D5 for ; Mon, 18 Feb 2019 18:41:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B70EB2BACC for ; Mon, 18 Feb 2019 18:41:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAE692BB09; Mon, 18 Feb 2019 18:41:55 +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 42FB42BA96 for ; Mon, 18 Feb 2019 18:41:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 16EE78E0006; Mon, 18 Feb 2019 13:41:54 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0F1778E0002; Mon, 18 Feb 2019 13:41:54 -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 E89D98E0006; Mon, 18 Feb 2019 13:41:53 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by kanga.kvack.org (Postfix) with ESMTP id BA3298E0002 for ; Mon, 18 Feb 2019 13:41:53 -0500 (EST) Received: by mail-qt1-f198.google.com with SMTP id k1so17736969qta.2 for ; Mon, 18 Feb 2019 10:41:53 -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=qhg9Az/DDU/n4f5fXjzWqaPfB0uzomNSOq9QUopuYBo=; b=VMg0GD1g9keJbbUwPzxJy9qXYjxv84oO4tOsgET8Tok1/QqchzT2HKH9L0E0zYrvHR 339bzszhDesenhalF2M7e3hEEX7Zb+wovmfcToUcLt6AZJJ5tbR5KuCg6dgc8wWe/MID sTapGajL5NZl7y8iSMzOKl3gCONd5YPK8ahwIZ8aNVLoLeHac94be6LL2hkPFnFdYkpG c0Ov7c8/QHGlApnR3KIADXD4v1hHwqY5EdYHdECVE5nTdS0vr/BV3DJ/T32bYzZhZy74 j29zRnuTETTvX7z+G3bdClsSCcOWWRigVbc4TLTtiHmBdM50JVHC0QJuyzAbcBRgyUf0 j+Qg== 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: AHQUAuajkeigeNo0SmGz8UR/RHhdS9hWxtYMdSVAsj0C3bJdh3Ifp4+T dUm2WFwiQkE99O57p5p5pCjPFzCOi/d8RIBSQnVdhqwEA7zCqae7hihGh2zXzSgr9916+//yNoS Q1pU8mTAXxuea4tlBFoC0eDGNIToM1G+WL7TH68EJ+C0DOGUYwO7v/OlJ4vJkFc1Ugw== X-Received: by 2002:aed:3ef6:: with SMTP id o51mr19353784qtf.183.1550515313487; Mon, 18 Feb 2019 10:41:53 -0800 (PST) X-Google-Smtp-Source: AHgI3IZU53z6wnN0cWDQuZ9lnRFR2K2mPUNxCgfD41d6ovEnX7k5KCa2hZ1tIjEpBnojC/H93PXh X-Received: by 2002:aed:3ef6:: with SMTP id o51mr19353748qtf.183.1550515312830; Mon, 18 Feb 2019 10:41:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550515312; cv=none; d=google.com; s=arc-20160816; b=iZdhm2sEtaoh4p2OoM12slc7h1UbLz5OI4n8rZQ5p2h5IB0j4R8aUXIMETQuJKEU39 7Ia/P04AdIuPFMxOMsQH9WXkjGvsOJ3HQ8Q25zPznHklGJaUTC7gBgKfnGKgtLDjS8wp VIw/pfUgPT72WSt3SgYHBG11FNEdpkyejBi9Ns8lXNpmNzOSq4YBkVZKbexTu0z/EPQv el5bgUYE7kbzdv46S4Y47DgKlwne6PmR5qF5dhCebFn+R8lKWollujvZHGQ7ZsGc3E20 JVY0mtjEFZRchHG3oSiz4mlgV/3dxcA1TVckWbzHSfRmZmI+qY27NmBjeVK8xvKuAtVH rJgQ== 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=qhg9Az/DDU/n4f5fXjzWqaPfB0uzomNSOq9QUopuYBo=; b=iAGLQSmlP81isQVWeBMGBUcrh3rCr417Gn01jhj9bVG1dCkSfwu/+Khq/17pVzB/sL +KF1gsByzYqgZP/a+06iilNFMkfj9L5aQdgUMWOeMPmXWb2Oyeciz6e4e1DGM6S1NzJS luYlKUS1l5fR1BalBGMJRFJQmkbkNyNqRYmMpqorH7uR+AqLsSBN7ye/gCt+iuXqwbU/ J+AiberuMHjR3ikrifrRAPv4kFo2YIwJ6LewUukpi6yOh58DtgRQgPwxOjlzINwlYRy7 JBGHdjOI7mBWmB3tu3OmSEB5bwrRTXLc94QLcuRvrN787SfJxZvjgCYcITqRm8px2ZOB S05w== 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 7si2238247qto.247.2019.02.18.10.41.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 10:41:52 -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 (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1IIcpuq010870 for ; Mon, 18 Feb 2019 13:41:52 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qr06f68v8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Feb 2019 13:41:51 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Feb 2019 18:41:50 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 18 Feb 2019 18:41:47 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1IIfkW460686370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Feb 2019 18:41:46 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 97FA0A4040; Mon, 18 Feb 2019 18:41:46 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D2BFA4053; Mon, 18 Feb 2019 18:41:43 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.207.239]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 18 Feb 2019 18:41:43 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Mon, 18 Feb 2019 20:41:42 +0200 From: Mike Rapoport To: Andrew Morton Cc: Christoph Hellwig , Palmer Dabbelt , Richard Kuo , linux-arch@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, Mike Rapoport Subject: [PATCH v2 2/4] hexagon: switch over to generic free_initmem() Date: Mon, 18 Feb 2019 20:41:23 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550515285-17446-1-git-send-email-rppt@linux.ibm.com> References: <1550515285-17446-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19021818-0008-0000-0000-000002C1EA72 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021818-0009-0000-0000-0000222E1A1C Message-Id: <1550515285-17446-3-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-18_14:,, 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=780 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902180138 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, 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 hexagon implementation of free_initmem() is currently empty and marked with comment * Todo: free pages between __init_begin and __init_end; possibly * some devtree related stuff as well. Switch it to the generic implementation. Signed-off-by: Mike Rapoport --- arch/hexagon/mm/init.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arch/hexagon/mm/init.c b/arch/hexagon/mm/init.c index 1719ede..41cf342 100644 --- a/arch/hexagon/mm/init.c +++ b/arch/hexagon/mm/init.c @@ -85,16 +85,6 @@ void __init mem_init(void) } /* - * free_initmem - frees memory used by stuff declared with __init - * - * Todo: free pages between __init_begin and __init_end; possibly - * some devtree related stuff as well. - */ -void __ref free_initmem(void) -{ -} - -/* * free_initrd_mem - frees... initrd memory. * @start - start of init memory * @end - end of init memory From patchwork Mon Feb 18 18:41:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10818603 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 5637917D5 for ; Mon, 18 Feb 2019 18:42:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45A472BBE4 for ; Mon, 18 Feb 2019 18:42:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 435822BC0C; Mon, 18 Feb 2019 18:42:05 +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 D729F2BC07 for ; Mon, 18 Feb 2019 18:42:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B7B7D8E0007; Mon, 18 Feb 2019 13:42:03 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B020A8E0002; Mon, 18 Feb 2019 13:42:03 -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 9A3F78E0007; Mon, 18 Feb 2019 13:42:03 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by kanga.kvack.org (Postfix) with ESMTP id 53D8F8E0002 for ; Mon, 18 Feb 2019 13:42:03 -0500 (EST) Received: by mail-pg1-f200.google.com with SMTP id n24so12516560pgm.17 for ; Mon, 18 Feb 2019 10:42:03 -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=7nb5sfZMKLy3F4xJmE1rTMV54PH3l/oP5gHKnkf80Q4=; b=tg9EcmhhDEXXy94XIpMQt/jOtgpad4T6CITcs3drMUWE5a/oO/3d8T1bo0aXpiSL18 knrKKF9OeDOnGpOlhtPgcdpbfIZspFTa3Xz6dWeTgLYenUzwawUyld2ERkkkkttVHmPh R5zWcmXPbHdmXqRPE7cYw7cetzgbSrCtxH448uITfZTVk636WmlR4o1tay5T7y/xEn7d RnzvFGQLXRReS/ty+EJoNe266VfFbp5zN8A7HB60jSBgTFurg3bNuT2yY2OmuuEMmPlw yjXzEx7NZO2H0U0hrntf4Vj2kyChGnuSlU6N4PGRQUCRxF1rwgtYSl8O6bLPtWV1igm6 tzfQ== 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: AHQUAuaxZtBhclR0FUWaBIr3cdN1frQuSR/LTeskb30wkSVUlo11N2L/ 8NvWiTWbfKtf/9vZ8ONtue/pNXG/VO/iiJicXIf+ks2oeVcw2Pq5nAQIGNgooUyPB3wLpm7OYmn 9D5IXbqOWN+bt2HIGe3Xpl/omB3r32JM6S3DoL8G26hrbTmJT0v+J7JblvEHFmZDukQ== X-Received: by 2002:a63:e451:: with SMTP id i17mr23883914pgk.413.1550515323012; Mon, 18 Feb 2019 10:42:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IbAdO0pzGHMVGptCGb0S+cvyYcfWxv9OIrw78u9P20edSR2Xfbau/dMElbp3Wet2f2MusRZ X-Received: by 2002:a63:e451:: with SMTP id i17mr23883861pgk.413.1550515322024; Mon, 18 Feb 2019 10:42:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550515322; cv=none; d=google.com; s=arc-20160816; b=dRJliW+RXv6YygwTmWFgm2RehDrXEjDLoGqZAWHDGGl/H9/wLBHfkr1QFGtr9wcP9b fGO6E3geouKLsG9wSffJ/FRmVUkwNRmcYiDtUFYZ0SrfXlPtKtI0LR6/pcwnxqrQz8Ks Wl5vqYGeJ6AfmSARtOA3zoarJxX3obF+uXZ7dlPsy0OMpAuTWq2H69SfUpewnktrva8y Ne5rgeI+7GTZdmuBsaHTHAxZFqOxRjIs7+JNVAt30YrpCTCJw6r0AqkuLqz93T5Rtxek FW4IM+8lu0l6w0OzvT7Wst7TOW98jzb0aoOwU38vprXSq6nWNDqTgiqyFM4ROoDC5FJo ONiw== 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=7nb5sfZMKLy3F4xJmE1rTMV54PH3l/oP5gHKnkf80Q4=; b=DNoLj6MwVaNqYw5BqZPp2wGOktYWm8x0cvV09UGAyw/X3ciVk6Ru2XQMfD8tHuQvpD S5+1awlQYMCqbYYkXb3Qym3hxhn0unAoSFMUSaT3IGx7SJWXP9dePawDVYEcrNH321ZZ /+Ms8MTcVptyCujxthJYtYHlcVuC1+Df1gwCuVy1Z6Pj3a9+9NpTPnG+pOpfvvu9IYI0 zri9/P86wh4bLeq7L4RepelO3LDZfhU1AH21uGsj377SF68NNa3FuS/uF0Oovs0pbbli yaGV8gOl7756BlDVINz9o0VJ8z1BUGOwOw5wa/HGARrxQIgxn4m928Fko9werKQTTi6z +tMg== 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 r17si12725663pgv.329.2019.02.18.10.42.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 10:42:02 -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.27/8.16.0.27) with SMTP id x1IIcqRR094158 for ; Mon, 18 Feb 2019 13:42:01 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qr0nncpwc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Feb 2019 13:42:01 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Feb 2019 18:41:59 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 18 Feb 2019 18:41:54 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1IIfrJJ55181540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Feb 2019 18:41:53 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 459D2AE051; Mon, 18 Feb 2019 18:41:53 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 344B7AE04D; Mon, 18 Feb 2019 18:41:48 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.207.239]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 18 Feb 2019 18:41:48 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Mon, 18 Feb 2019 20:41:46 +0200 From: Mike Rapoport To: Andrew Morton Cc: Christoph Hellwig , Palmer Dabbelt , Richard Kuo , linux-arch@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, Mike Rapoport Subject: [PATCH v2 3/4] init: free_initmem: poison freed init memory Date: Mon, 18 Feb 2019 20:41:24 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550515285-17446-1-git-send-email-rppt@linux.ibm.com> References: <1550515285-17446-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19021818-0008-0000-0000-000002C1EA74 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021818-0009-0000-0000-0000222E1A1E Message-Id: <1550515285-17446-4-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-18_14:,, 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=824 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902180138 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 Various architectures including x86 poison the freed init memory. Do the same in the generic free_initmem implementation and switch sparc32 architecture that is identical to the generic code over to it now. Signed-off-by: Mike Rapoport --- arch/sparc/mm/init_32.c | 5 ----- init/main.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index f0dbc0b..d02a9ae 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c @@ -294,11 +294,6 @@ void __init mem_init(void) mem_init_print_info(NULL); } -void free_initmem (void) -{ - free_initmem_default(POISON_FREE_INITMEM); -} - void sparc_flush_page_to_ram(struct page *page) { unsigned long vaddr = (unsigned long)page_address(page); diff --git a/init/main.c b/init/main.c index 38d69e0..9a61e9c 100644 --- a/init/main.c +++ b/init/main.c @@ -1049,7 +1049,7 @@ static inline void mark_readonly(void) void __weak free_initmem(void) { - free_initmem_default(-1); + free_initmem_default(POISON_FREE_INITMEM); } static int __ref kernel_init(void *unused) From patchwork Mon Feb 18 18:41:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10818607 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 322EA17D5 for ; Mon, 18 Feb 2019 18:42:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2349A2BBFE for ; Mon, 18 Feb 2019 18:42:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 178832BC13; Mon, 18 Feb 2019 18:42:10 +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 D13402BBFE for ; Mon, 18 Feb 2019 18:42:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E89D78E0008; Mon, 18 Feb 2019 13:42:07 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E10288E0002; Mon, 18 Feb 2019 13:42:07 -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 C8A898E0008; Mon, 18 Feb 2019 13:42:07 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by kanga.kvack.org (Postfix) with ESMTP id 9D3D68E0002 for ; Mon, 18 Feb 2019 13:42:07 -0500 (EST) Received: by mail-qk1-f197.google.com with SMTP id w134so15510970qka.6 for ; Mon, 18 Feb 2019 10:42:07 -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=6UfCPPZllTEGGEKF29OGuMk2xjG0QrU1dWYvy6NrkGI=; b=F9+6tlPnxV/uJU7RABBA2D5emr3BLNmm9PZZvz2uvWVrwZYOb/ykI7RNeG9p5QSkdp kfjE5a8It/uXXoK9twwY9s9W7KH/TEQfiRF+lQG9j921ZDTnzxX7CsXKRs47pj/wdjxt Jv6ICVHUB1LS6/3/0IJAPg0otFucrshoZASE3APbk/mGWLjmGRrLjdfZMnr5mgXAyVeZ z/3GuQNTCfOxXhY8bKoCZxmSB1OGTaOuij9r9P3McrQG1NvNelmIuF8RnUbxtG+3LMqp uIB23v2FkGIC0m7Vqjb0Dnhu0Xpo4heI1CaFfJMTl/2WcaQaoFSL//5ggnPT7g5hpl0i fTkw== 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: AHQUAuY5TjljCCctVDbAZClTh3XP2BSGXNWXwDDv4zukEHqivjkB+u3F aV8aNZXMO83Xcs6/HkLJh9bG9ARLKGYfCqkzcVM224vfssLsbDmxhMKAPk54UlirRhKRhBaBM3L wJ07xyfPAGabw9DntYqi/3kCCyK3s8Gz5iFXReJ5dpgM9otIjCsOt2OVgB8QdGQbn9A== X-Received: by 2002:a0c:d4ab:: with SMTP id u40mr18787561qvh.30.1550515327418; Mon, 18 Feb 2019 10:42:07 -0800 (PST) X-Google-Smtp-Source: AHgI3IZsCXLYkF5zTVtiQMPrLol9Fvbs3I8tGfoLtBouZFRkrn70VpKy0D2LJvlwViwx404cG1fk X-Received: by 2002:a0c:d4ab:: with SMTP id u40mr18787522qvh.30.1550515326756; Mon, 18 Feb 2019 10:42:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550515326; cv=none; d=google.com; s=arc-20160816; b=BxukflfSkh8WaBcL0yfi7JWQ+OlAL78a4uKRBhdd+hsOaDJyRI579cVAI7oXY9SDOH zctQI+wG6/a9aOhNQWfamANqFM7tnGAFzl/EQdHQCQmgIeu3LNr+yJ0PveXFbYeuX/h5 uV5/20k0drEj87klEnqVkRPjCkGL+s71514eguTwHsOTbyyvUpVO6UKc7P+iMa0P7OgJ Tk929fZAarpHfEVnGmuKOJbSeH6T03ANaJ5G+ZtDRJcbRsAro9FdZOyeUdfDgKBFKTTT VhvdYB6+uPtecPRAvihsmGxdbK8ESTjccZG+nEv+pqDE8hZfFU9p7KcCS0GParRkJ2Hf A7OA== 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=6UfCPPZllTEGGEKF29OGuMk2xjG0QrU1dWYvy6NrkGI=; b=O4zz3x1YkiTWu/JEXu5umEjgu1A6LW5SRZDSCpVJwvcqWal0e7namaqS+52rTlcOX3 WBOlFKGvoA/Ock9Aqv/AQQkEl2Cw4FCrVAuh1Dx/y5Lj4t7PFmSP/3f0kCnvK4sJknco 0FZWpBk5lCItprAt9msNIlXC5vZM+w9ZUQ6XhzIII+7Xw4s0MOYTuO3nKyche4YcPzBm y8vxQpU1SFNsOsGGE2ma8pfZkCEtjDT724bhW8ArRwr5ExoyMOdXfjPAvsD3NL4fUVmV E3GfPuGzUJ7c+Blqo7IxZZOXgDSrL5rqCmKY0TDV/hdhLvR9hJAweD7H1LLuuHVNm6nq qOOQ== 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 o17si3745739qve.102.2019.02.18.10.42.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 10:42:06 -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 (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1IIcqEu043780 for ; Mon, 18 Feb 2019 13:42:06 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2qqy19j7m2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Feb 2019 13:42:05 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Feb 2019 18:42:04 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 18 Feb 2019 18:42:00 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1IIfxAR26935366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Feb 2019 18:41:59 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2179E11C050; Mon, 18 Feb 2019 18:41:59 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 84BBC11C04C; Mon, 18 Feb 2019 18:41:56 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.207.239]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 18 Feb 2019 18:41:56 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Mon, 18 Feb 2019 20:41:53 +0200 From: Mike Rapoport To: Andrew Morton Cc: Christoph Hellwig , Palmer Dabbelt , Richard Kuo , linux-arch@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, Mike Rapoport Subject: [PATCH v2 4/4] riscv: switch over to generic free_initmem() Date: Mon, 18 Feb 2019 20:41:25 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550515285-17446-1-git-send-email-rppt@linux.ibm.com> References: <1550515285-17446-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19021818-0012-0000-0000-000002F72E7B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021818-0013-0000-0000-0000212EB8B6 Message-Id: <1550515285-17446-5-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-18_14:,, 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=758 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902180138 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 The riscv version of free_initmem() differs from the generic one only in that it sets the freed memory to zero. Make ricsv use the generic version and poison the freed memory. Signed-off-by: Mike Rapoport Reviewed-by: Palmer Dabbelt --- arch/riscv/mm/init.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 658ebf6..2af0010 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -60,11 +60,6 @@ void __init mem_init(void) mem_init_print_info(NULL); } -void free_initmem(void) -{ - free_initmem_default(0); -} - #ifdef CONFIG_BLK_DEV_INITRD void free_initrd_mem(unsigned long start, unsigned long end) {