From patchwork Thu Feb 14 15:59:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10813117 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 684821399 for ; Thu, 14 Feb 2019 15:59:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 577812EB5A for ; Thu, 14 Feb 2019 15:59:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B02C2EC4D; Thu, 14 Feb 2019 15:59:54 +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 A6F672EB5A for ; Thu, 14 Feb 2019 15:59:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CF4C78E0003; Thu, 14 Feb 2019 10:59:51 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id CA9078E0001; Thu, 14 Feb 2019 10:59: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 B1FE78E0003; Thu, 14 Feb 2019 10:59:51 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by kanga.kvack.org (Postfix) with ESMTP id 86D368E0001 for ; Thu, 14 Feb 2019 10:59:51 -0500 (EST) Received: by mail-qt1-f200.google.com with SMTP id r24so6042284qtj.13 for ; Thu, 14 Feb 2019 07:59: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=k9VZwu9YWjzbRtHwba6ia+DxawlSg12+yWxnAGjsdwM=; b=odQxmgsf6QOx8bCfAUdy9KFjtVJb3HoQXTlGs2iqrxznCvnWPSVUYM1LkWV8bf8w9x cjR61LsHhIwZ4ZHBq+EwqfOeG9U2+NUXrNU1dV9kLmS7C4wgIRUqitBXMDcOBE0rEMKr B9JtzuIoLr68c18q4BH+kUNOucQXOOh2ljVAQmCQAFAdjRPzpjTgRShyzA16MEJA31dc KqZpfsR0tEkhKZucNS9GZY/lRZuLwit1plFjLzayrK1X/jwFXP53Zfix8TrAl0pTI40s oJvmre8sn6S60jMbLl6Eprt20xlcM+C7Khtceh9UP33xnXxZ00RcEg0DsLxuETqaGsaj g7CQ== 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: AHQUAubC0bkwJkgZTaXmxXXKMkRWGo8is0fcYSxmPhUJXVQEARsqKKYT F54PoEYb10wqqdIBrmpk2O1/ZAMx/yNl3nrfyPENFtohVpA8+Vz5Sj07r6HOoghYgo8wrOSVya4 XJBco79t9kZxOMZhlsPVzwkpTh8juJRe3Fv4utHwesDiyMlUinfqg7Q690CIcqS1Awg== X-Received: by 2002:ac8:101a:: with SMTP id z26mr3663305qti.184.1550159991315; Thu, 14 Feb 2019 07:59:51 -0800 (PST) X-Google-Smtp-Source: AHgI3Iafo9T6GTltnQXwaFoa/TMCDoF/nVPm6m+76SFfP61L/P7gKmiDA71iZz43ycny4z1EbZjj X-Received: by 2002:ac8:101a:: with SMTP id z26mr3663270qti.184.1550159990538; Thu, 14 Feb 2019 07:59:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550159990; cv=none; d=google.com; s=arc-20160816; b=Xdq9+x6VcBOMoNv3kjEIu+Z2cewy9l5dZzVHG0BG7cSv494WZPgcD8AuUGUJJ53hwU TxjWlmf68e5g6DBCufRfMX33NezgWfbAO9mg/Cjbaqd6/jO2jKaeTdetCFx3shg0d7zj Uj5vDVJUgKczExsUH5C6b9Ij9XqVHWa8MAsXSrT33N6vaxG7xgyaUYbkwkO/FOgDDkYr QFTA1hRr+VhfrdbwchtWjOUP+0ESyc7pG9aKGnE/mPg32o/0DDzSKpecLBa+S/fKyHZD qyoYZtNpAbJWv6tt+00mOsoKjJZpob+LlzBISDckgD03183q43vspzyUHfDTCD1XebBQ ihYg== 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=k9VZwu9YWjzbRtHwba6ia+DxawlSg12+yWxnAGjsdwM=; b=NQ11k5tUHyQSELPxYOI+2nAfNsl3LQe8UnFNCBf5VwwqAGcRqgiL+29CwCPeObgXRz ldQj5npjV7eIG3ZMUIYBgXImf4ujTW6dRaIwdWPBsuMJyBAGDihpmUPN8eSugrjLzTvo rN/p3p9iM2rSgdrG6DUuOI7rKCycfDLBnn/LxmjF5bAcr65qMsmPwPYLaPTLF25gyjL/ Zz9mK3ZwslmfwvXCRexSw/usQ64V8uEwauKkd2yU4lEqUXoMJxmlcQnIjgBCdM8DEyS9 GEROXglUKlCmKkSjQBdafSqgnYjcbiOUOSETQbMkEpXP9I94F8/4qN483C+9LKF8EGtF wpkg== 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 b141si345851qka.266.2019.02.14.07.59.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 07:59:50 -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 (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1EFhgYt188585 for ; Thu, 14 Feb 2019 10:59:50 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0b-001b2d01.pphosted.com with ESMTP id 2qnaq1kqpd-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Feb 2019 10:59:49 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 14 Feb 2019 15:59:47 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 14 Feb 2019 15:59:44 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1EFxhpd7602456 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Feb 2019 15:59:43 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1C95AAE051; Thu, 14 Feb 2019 15:59:43 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 55394AE053; Thu, 14 Feb 2019 15:59:41 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.8.84]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 14 Feb 2019 15:59:41 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 14 Feb 2019 17:59:40 +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 1/4] init: provide a generic free_initmem implementation Date: Thu, 14 Feb 2019 17:59:34 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550159977-8949-1-git-send-email-rppt@linux.ibm.com> References: <1550159977-8949-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19021415-4275-0000-0000-0000030F8541 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021415-4276-0000-0000-0000381DA1A3 Message-Id: <1550159977-8949-2-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-14_07:,, 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=723 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902140109 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 a42fc5c..8a8ac09 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c @@ -286,12 +286,6 @@ mem_init(void) mem_init_print_info(NULL); } -void -free_initmem(void) -{ - free_initmem_default(-1); -} - #ifdef CONFIG_BLK_DEV_INITRD void free_initrd_mem(unsigned long start, unsigned long end) diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index e1ab2d7..1d08736 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c @@ -207,14 +207,6 @@ void __init mem_init(void) mem_init_print_info(NULL); } -/* - * free_initmem: Free all the __init memory. - */ -void __ref free_initmem(void) -{ - free_initmem_default(-1); -} - #ifdef CONFIG_BLK_DEV_INITRD void __init free_initrd_mem(unsigned long start, unsigned long end) { diff --git a/arch/c6x/mm/init.c b/arch/c6x/mm/init.c index af5ada0..ca1c182 100644 --- a/arch/c6x/mm/init.c +++ b/arch/c6x/mm/init.c @@ -73,8 +73,3 @@ void __init free_initrd_mem(unsigned long start, unsigned long end) free_reserved_area((void *)start, (void *)end, -1, "initrd"); } #endif - -void __init free_initmem(void) -{ - free_initmem_default(-1); -} diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c index 6519252..fabf9e3 100644 --- a/arch/h8300/mm/init.c +++ b/arch/h8300/mm/init.c @@ -108,9 +108,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) free_reserved_area((void *)start, (void *)end, -1, "initrd"); } #endif - -void -free_initmem(void) -{ - free_initmem_default(-1); -} diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index b17fd8a..4d6fa630 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c @@ -193,11 +193,6 @@ void free_initrd_mem(unsigned long start, unsigned long end) } #endif -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 253f79f..8a1563e 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); -} - #ifdef CONFIG_BLK_DEV_INITRD void free_initrd_mem(unsigned long start, unsigned long end) { diff --git a/arch/nios2/mm/init.c b/arch/nios2/mm/init.c index 16cea57..362a7a7 100644 --- a/arch/nios2/mm/init.c +++ b/arch/nios2/mm/init.c @@ -89,11 +89,6 @@ void __init free_initrd_mem(unsigned long start, unsigned long end) } #endif -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 d157310..bf3a160 100644 --- a/arch/openrisc/mm/init.c +++ b/arch/openrisc/mm/init.c @@ -227,8 +227,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) free_reserved_area((void *)start, (void *)end, -1, "initrd"); } #endif - -void free_initmem(void) -{ - free_initmem_default(-1); -} diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index a8e5c0e..bc59332 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_BLK_DEV_INITRD void free_initrd_mem(unsigned long start, unsigned long end) { diff --git a/arch/unicore32/mm/init.c b/arch/unicore32/mm/init.c index 85ef2c6..3aed4d5 100644 --- a/arch/unicore32/mm/init.c +++ b/arch/unicore32/mm/init.c @@ -312,11 +312,6 @@ void __init mem_init(void) } } -void free_initmem(void) -{ - free_initmem_default(-1); -} - #ifdef CONFIG_BLK_DEV_INITRD static int keep_initrd; 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 Thu Feb 14 15:59:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10813119 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 00C391399 for ; Thu, 14 Feb 2019 15:59:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E44DF2EAB8 for ; Thu, 14 Feb 2019 15:59:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D86052EC4D; Thu, 14 Feb 2019 15:59:56 +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 8297D2EAB8 for ; Thu, 14 Feb 2019 15:59:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E9EA8E0004; Thu, 14 Feb 2019 10:59:54 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9977E8E0001; Thu, 14 Feb 2019 10:59: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 83AD68E0004; Thu, 14 Feb 2019 10:59:54 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by kanga.kvack.org (Postfix) with ESMTP id 461BB8E0001 for ; Thu, 14 Feb 2019 10:59:54 -0500 (EST) Received: by mail-pg1-f199.google.com with SMTP id g188so4555169pgc.22 for ; Thu, 14 Feb 2019 07:59:54 -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=ro6owR6V8YEb1bnzcVgmZfLavY02HndCFAY0J9IDhsAX/MLzPv9p8Q2PFBe7Io+D5Y GN1fmR4u/9zUh1Z9gUGyZfSsA5A+qkJ0Ewy8Ev0mqe9TndF8kJPHUFOkjCOizEGajH1t frb6iUNe6UwL64pjrNxXP/bNFRx5rt38QWVYeQFHp2KXN9IBb3bIWZLk8in5QgS1sVss zjXtTSIRMB3+PrqPeY5jvJRBli6p5QxmXwdYFqNZSjY2tzRKZGQqOjBJS4sTKj/slnaU cV7Q+W4qImirgnjt3QMhi3TTPVFT/JgqaMyhdldsoSbYKld4NltHxHf8fmubmYFCAP9D UvOg== 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: AHQUAubaTkUJb8oGbU3GLRNxT49e70etMrBlRdBKxH/LvOWQJKh9N3uB MjbRegEiTxLPO8tSeksqSFqtjCpvH/r+lTWx1DWeHCOjWAUFtSJFgdB303bYJCh+alkWwdiMOcM kGSZfLtXPzLajUKBxz85UZz8B1eLMzy0wR9ZVT3MR3Q3UILJmuROBz6EOz/oLwgsDgA== X-Received: by 2002:a63:2706:: with SMTP id n6mr538993pgn.352.1550159993955; Thu, 14 Feb 2019 07:59:53 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ0qmPdTDHokyxLfjFGcX8ck3Fyf59kvWZ3F6wfqFhiO3fr+C+ZjRKnYoDJ+SQG9WT4DZ/3 X-Received: by 2002:a63:2706:: with SMTP id n6mr538942pgn.352.1550159993113; Thu, 14 Feb 2019 07:59:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550159993; cv=none; d=google.com; s=arc-20160816; b=tZ4Rz3SR8RdychaLbeb/pFZSgt9qvr62Cf2q3JupbytaJXEmPs6VktSI6j34fYBmA8 vucvmdq5URXcybA03N0gAjWqc4h4S4p0ug/X5WRyv0MFBfMlSauxtaLRqoH98fngB6jN G2Wy81I20oxOXnEfgZt0Fs3O/NX1pKdjsuv5GOUHprPwXcK0B6HgQ+OmuVFC+s5FyEKB HfLF/kakI9jtwMjlwRKzV/1f0AfsasDLHAR8T9epldb7sVYWrbAF6t+ZeL+v4Exx8YfV ZiYdHbXxVhPQXzbrG6TFzIkVnfTNArv+A2D9OiTUeOKAWbcsOT88rAkhlv07LLcm1ojd ZMAA== 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=yOf1lor6qj4Ez9VSFhFIyl1FG8JV7SJUC+K4bQ9xT3fcGhZ9PXmue5W4VLt8JGxAfR HYbFNsHHF7nP1w5nCtpU9J3TxBMZHbMZlvGe8sk1wVHsp5VpdR2oZWJ1VU07rH/quAIH jh+dYsI+4HVqhKEV6vrjULYkKzpfbns3N9PMU/JK5uqdwXM3pPLYe8t7vkKGfRfwouMQ he59nh7/+23yNljckyP5AsNBCitXRg/Hua1Aqw/1LddeoENM+e1nzdwsTEAs2xGYk1Bb tBIrMefAGqUnMNjHUaQ+gtu8/OFeq036ro6Lo6wHzfAQ+7zpEls/VyPSHPVF3WzuZnta KEEw== 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 b11si2884674pla.405.2019.02.14.07.59.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 07:59:53 -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 (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1EFgasi016743 for ; Thu, 14 Feb 2019 10:59:52 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qnaq9v3af-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Feb 2019 10:59:52 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 14 Feb 2019 15:59:49 -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) Thu, 14 Feb 2019 15:59:46 -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 x1EFxjfa1114552 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Feb 2019 15:59:45 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8AAFD4C046; Thu, 14 Feb 2019 15:59:45 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C3AC44C040; Thu, 14 Feb 2019 15:59:43 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.8.84]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 14 Feb 2019 15:59:43 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 14 Feb 2019 17:59:43 +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 2/4] hexagon: switch over to generic free_initmem() Date: Thu, 14 Feb 2019 17:59:35 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550159977-8949-1-git-send-email-rppt@linux.ibm.com> References: <1550159977-8949-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19021415-0028-0000-0000-0000034898F5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021415-0029-0000-0000-00002406C568 Message-Id: <1550159977-8949-3-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-14_07:,, 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=761 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902140109 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 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 Thu Feb 14 15:59:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10813125 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 51F2017D5 for ; Thu, 14 Feb 2019 16:00:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41EA92EAB8 for ; Thu, 14 Feb 2019 16:00:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3647E2EC4D; Thu, 14 Feb 2019 16:00:00 +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 1629D2EAB8 for ; Thu, 14 Feb 2019 15:59:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB1828E0005; Thu, 14 Feb 2019 10:59:56 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A35518E0001; Thu, 14 Feb 2019 10:59:56 -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 8D7F68E0005; Thu, 14 Feb 2019 10:59:56 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by kanga.kvack.org (Postfix) with ESMTP id 4A72E8E0001 for ; Thu, 14 Feb 2019 10:59:56 -0500 (EST) Received: by mail-pl1-f198.google.com with SMTP id ay11so4583674plb.20 for ; Thu, 14 Feb 2019 07:59:56 -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=u1kX5nLZRuvbRDghmPWQsmkHe1ki2AejtDggj/I8LTQ=; b=g3FnFIxatu1C4a8EEty/KiCGdVRRHMV0+0YVptNvORbYRHPzSaMKt3qcXLYTTcif8z sYsjtx2MGnF42x0F/LQN0oTIzZYCyx5CoToEEzkPAx4BfET9xAwRIIdsw/AoHiZK4W8q fE3JXvIOCh14GNPOU3Vi8e5DBdJRLpbw1S6ZhJqw9UDb3KrWSeaPtLVvgz+3uDylPfGN 1oeF1lrYszGb6xLkzT4jjzNp2Z110ewetxlNdKBtg8a2GUsiGtMLOX36T6gCpGxx1Sgp bc+4gBtjI6+8vYZNq9zAjMVB+WujvKLJ6mZxU/xeujatuirIxhVbm4EGl13n5YACI39o EucA== 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: AHQUAuZeQ1upAbrpX3dVgQp2nCkJvwYuSdBjwkUqKUABaE+uvdcT2uIf DmtDbaxe594p6nidb6g+0ePtnBseef4N7D719iSxFAJwvrMNZ7KOt+ayN52O6qluuv1Dj6Or2B0 3RBzxMK8LN2fhJy7cDViv3dZuCL0dQnpuYikxrdvzk0mYsqtxwn0hzfjH1NCIMzgi6Q== X-Received: by 2002:a63:105a:: with SMTP id 26mr542034pgq.184.1550159995978; Thu, 14 Feb 2019 07:59:55 -0800 (PST) X-Google-Smtp-Source: AHgI3IbmU0nFWMBbKNxZR4Ij/eKORBw9U52WI+GvDIPFAfTIgtvSyxE1eEKFGo71gzKk1e3RS5gM X-Received: by 2002:a63:105a:: with SMTP id 26mr542007pgq.184.1550159995354; Thu, 14 Feb 2019 07:59:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550159995; cv=none; d=google.com; s=arc-20160816; b=qPkaGWL/rpi7++dWMQoCPfvDLlq2NT6q9FLP0EkPoo1isi1UKmplNHWYW4ikhPXFAc IaZ7CYhmOeHUrJJfX7W7x4smcnsMnVZZ0FrptuvArimte1BWOEyroPW3PEYFWx3U5L9A ZxPXK3msKM0TZ/dcSYKTavUnpWtAGmT/RinrefaDN4196FBziSICYrJ6PdXO1aFw4uG1 6wYhcXImuvzLv72gk/0+8ym6WGthRZlrewMemdespBCzwgbV9UJTIt6nzvpwL2mczDBp RlfXavM6s+nYasn4HxnGAx01UJflTlayNhcJsIeW4rIvNKSF6fMRd/6y8recaCfPb+2c lvMQ== 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=u1kX5nLZRuvbRDghmPWQsmkHe1ki2AejtDggj/I8LTQ=; b=NM4JwaFtFdXVqmhzOJjVzO1+yFH4Hex706RIvX/eFsDNZH1LNSb0119BaPReVXmZuq c9ul/Ph3WocXh5hs/mUHbE8R8qHY5pb774blKcB9RQevbv4xkbeARBEMBBIZjPernlCu qjWkGoEBF0E4G+fwfW7cwcTFlqfXbDRkuk7rrSmJEk0HTfRLEVJD9R5GY5BSBEvUc5uL nP3i1V3J+fQ5Lfjnp8U+XT9tChp5IH5psWSKn4sHCc2CvmbQcwaeAs2F9Xh6jXrQWj/d BRl9MNRczOEcreeXUA7wKauNXuMIplJQ/MdiwGpHGk9m8FRJop8tV+dDS/bGhME7wM8P HArg== 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 u10si2667315pgi.515.2019.02.14.07.59.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 07:59:55 -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 (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1EFfXWs094473 for ; Thu, 14 Feb 2019 10:59:54 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qnarp44ya-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Feb 2019 10:59:54 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 14 Feb 2019 15:59:52 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) 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) Thu, 14 Feb 2019 15:59:49 -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 x1EFxmF524445166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Feb 2019 15:59:48 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 00D6F11C05C; Thu, 14 Feb 2019 15:59:48 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41C2311C04C; Thu, 14 Feb 2019 15:59:46 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.8.84]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 14 Feb 2019 15:59:46 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 14 Feb 2019 17:59:45 +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 3/4] init: free_initmem: poison freed init memory Date: Thu, 14 Feb 2019 17:59:36 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550159977-8949-1-git-send-email-rppt@linux.ibm.com> References: <1550159977-8949-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19021415-0008-0000-0000-000002C07EAB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021415-0009-0000-0000-0000222CA1C3 Message-Id: <1550159977-8949-4-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-14_07:,, 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=835 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902140109 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 d900952..77e8341 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); -} - #ifdef CONFIG_BLK_DEV_INITRD void free_initrd_mem(unsigned long start, unsigned long end) { 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 Thu Feb 14 15:59:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10813127 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 9E4A513A4 for ; Thu, 14 Feb 2019 16:00:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C5322EAB8 for ; Thu, 14 Feb 2019 16:00:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E9802EC4D; Thu, 14 Feb 2019 16:00: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 27E6F2EAB8 for ; Thu, 14 Feb 2019 16:00:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E7CB88E0006; Thu, 14 Feb 2019 10:59:58 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E0B6F8E0001; Thu, 14 Feb 2019 10:59:58 -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 C83398E0006; Thu, 14 Feb 2019 10:59:58 -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 8A6E48E0001 for ; Thu, 14 Feb 2019 10:59:58 -0500 (EST) Received: by mail-pf1-f199.google.com with SMTP id h70so5083116pfd.11 for ; Thu, 14 Feb 2019 07:59:58 -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=c0/yCleC0+cRKs0NWxaObUZpUHrjkCQzoZuwDL4hADQ=; b=JMptApM7HKSnwizYnTM1yFijNJFh2CohLmPMNMfHZelD7SE/AP+NCf/6qSrrLAGb8c oQvGU4S10dvAuLGi/Huzler2BzXbFRBGFwOJ1BAzEV5G2S0Rc5AcQmQB97rGBmjjtNDn h1tcsGiLStJUxktIhqGKI0xAqzk6UAlLKfVLqQA0Swxw/QmtF+2CTRmwgJNG+RI/A6f1 jmDxB/XBYots0xser1+003Mb119QzMGQsgxuSzZHJWOJV0c8lFPLkaizGDNbaFDuitKW AF4rRR42Rb0imljI26p/qrazpUmfW24xjqtwnI1ORipjPXVMfzRymvXUlxvVDCfc0Veb uD3Q== 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: AHQUAuZmO6tFM3/9je9Zjc68MuwhFiKCxvJ+E8xY9F7lHkwnXmjuCfa+ bvOT5roINsc0Uz56aHFUFpHIh2+ZuhPoGyJasE+r+NrXHuHFeCFobti4EYh4/d/NG8fSGV87goJ +f9DZWLuFTOKzcKCkgxmDbE4SwyCqAHbs5jfCr6r6N23tUFN0UNnps8CpjmZWn2b0hg== X-Received: by 2002:a17:902:820f:: with SMTP id x15mr4774222pln.224.1550159998255; Thu, 14 Feb 2019 07:59:58 -0800 (PST) X-Google-Smtp-Source: AHgI3IZa01QFSCmWoxh64iuib9zAhUTnFVRkMOqySRV0xWpHJR/T7laFWn8XNSolZjlSPFH9dyW+ X-Received: by 2002:a17:902:820f:: with SMTP id x15mr4774179pln.224.1550159997571; Thu, 14 Feb 2019 07:59:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550159997; cv=none; d=google.com; s=arc-20160816; b=hVHGy05cs+KFxJ80CEsMxvyK94hsc6FYmtV65TpnOwwpTlVwVWJcQPMcQDkSbSjsG0 y1LzNSl2aGmbzw0yDHVh2fjh2//gIYUmnM05Gwkrolk77XF71uENVxpoD+myPf1UWYZa T5GT3SAXHunPnp+SV+F6ERqzbVRqpKu9dlVz5qcGUBJzAbPIXW8FW8wNZD+riyllmEN7 uV4lhyX8nsvWSf4f18RyTpg4ggpEpTEKxiMGdKMjfAsVbzA8xuKtJS1ktFTyToGvHV0L 7GtB8TuuU3PJzPGD2sbMAKa5x8WLqegl8fGgF9vp3M22xCQLl9NBKxozP9QfTdrdpqcI J9ZA== 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=c0/yCleC0+cRKs0NWxaObUZpUHrjkCQzoZuwDL4hADQ=; b=pduQXq5YIDR5s+pP3xfq9iB7uPE/sSIFpHQBxk2SMfZDF+DXT0FKqNnRahIyHZX7Br mQh1GQGsHuvFwxbMqHNi2me2DTSHHn8TUZw5zoFsstmMWfWJgAij1yhHNh9f0IXx/Ikf N7SVhVzqQMgjnQaH8mLu+NTnQLxfsbqEWDv+KLObt7zJ0YKKPPVkpOEMIZX6x9eCLHGy fnV9a0q0tZrWyqLfwOwGNtQc/SyyGRJ3UaS82C5jjcr1ZNcX62WvIVl7mlulaXhlvpX8 M0FETlyMFwSNfmHcDC9jwqFtNREGXn1wVQPx3eodsthkpX+EV7Aj1gY0dxIJuItDyUI8 gAZg== 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 c12si2633459pgh.257.2019.02.14.07.59.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 07:59:57 -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 (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1EFi1lX053770 for ; Thu, 14 Feb 2019 10:59:57 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qnb3b1n33-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Feb 2019 10:59:56 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 14 Feb 2019 15:59:54 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 14 Feb 2019 15:59:51 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1EFxo6f48759004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Feb 2019 15:59:50 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 696F752054; Thu, 14 Feb 2019 15:59:50 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.8.84]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 987E052052; Thu, 14 Feb 2019 15:59:48 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 14 Feb 2019 17:59:48 +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 4/4] riscv: switch over to generic free_initmem() Date: Thu, 14 Feb 2019 17:59:37 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550159977-8949-1-git-send-email-rppt@linux.ibm.com> References: <1550159977-8949-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19021415-0016-0000-0000-000002567B00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021415-0017-0000-0000-000032B0AC03 Message-Id: <1550159977-8949-5-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-14_07:,, 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=752 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902140109 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) {