Message ID | 1610012822-20291-1-git-send-email-sw0312.kim@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=86FG=GK=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78371C433DB for <linux-arm-kernel@archiver.kernel.org>; Thu, 7 Jan 2021 09:46:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 15FB22333D for <linux-arm-kernel@archiver.kernel.org>; Thu, 7 Jan 2021 09:46:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15FB22333D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:Message-Id:Date:Subject:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Owner; bh=cDOyIUTTZl9322VEuq9zCgrg5xNwQ7VdyaXVmGPfEgE=; b=CRdTGeZAEFGbyG1Dq4KvBctQh9 ohnq/arG4DY17O3bmiNO0F+yFkEKhRabVm1x2eQrhJnjRZhlkbiZ5OeF39Sx9W7BLMzUXFe3hE2aD DXuwIC2LkG1s9f9rGvmxjlA/z8sVREJ19FAuDSFh+RZtYJ5tkziE88OF0JoVwkgJRQmL+py/epOwJ ovNFlRFYTETpKTbu4dqSg7DQ6oSaFdFQBwxrgu+oXJRHnLpCnOBxxAr9fgiCsBMpcsHwUGVK87yeq xC1kNl4q36j2fyQI2ThSi3fYECEfg/buK14UdUadkmbqVuvELvwnT75TagOqRT98omYsJonAjt4ma /nZHRpnQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxRqG-00045m-80; Thu, 07 Jan 2021 09:44:28 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxRqD-00044h-7b for linux-arm-kernel@lists.infradead.org; Thu, 07 Jan 2021 09:44:26 +0000 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210107094417epoutp01e0a80568776cd46b6a5668c548c902aa~X6ftvpSw41114011140epoutp01d for <linux-arm-kernel@lists.infradead.org>; Thu, 7 Jan 2021 09:44:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210107094417epoutp01e0a80568776cd46b6a5668c548c902aa~X6ftvpSw41114011140epoutp01d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1610012657; bh=r/0HIMuAWDGl4sC40IJqtgoGCRFGMy3zgCudWco9GyE=; h=From:To:Cc:Subject:Date:References:From; b=dorORJ43Zsopye2Be4EDIljj/hxB4+earfK1BIM0+NqunZRi47+KuMDOdH/uqPJlD wiPjdVjCos45r+MQ328pZt8AyXkyIojTrybAesdiZWxbUbQYCacO0gL1OenP0i3Pi0 ib9VgQUbD7Q4dBZSkWe27jEk0RaFKVYMSRa6wA1M= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20210107094417epcas1p2e0d3cc35c3ffd68b877d258dc84977a5~X6ftLHunV1299612996epcas1p2E; Thu, 7 Jan 2021 09:44:17 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.40.158]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4DBLsp1VVGz4x9Q9; Thu, 7 Jan 2021 09:44:14 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 31.0F.09577.DE7D6FF5; Thu, 7 Jan 2021 18:44:14 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20210107094413epcas1p1dbbcbbea7ba9a3c4a50e7dc3ae5a5314~X6fpvSCkZ3204532045epcas1p1X; Thu, 7 Jan 2021 09:44:13 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210107094413epsmtrp198b3834b45a048670b141e0cc31b4697~X6fpubEUX3170531705epsmtrp1j; Thu, 7 Jan 2021 09:44:13 +0000 (GMT) X-AuditID: b6c32a39-c13ff70000002569-a8-5ff6d7ed9e67 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id D3.0F.13470.DE7D6FF5; Thu, 7 Jan 2021 18:44:13 +0900 (KST) Received: from localhost.localdomain (unknown [10.113.221.222]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210107094413epsmtip18cf77905d0aadbd158c22add26992e38~X6fpci6RU0611206112epsmtip1s; Thu, 7 Jan 2021 09:44:13 +0000 (GMT) From: Seung-Woo Kim <sw0312.kim@samsung.com> To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: mm: Free memblock from free_initrd_mem() Date: Thu, 7 Jan 2021 18:47:02 +0900 Message-Id: <1610012822-20291-1-git-send-email-sw0312.kim@samsung.com> X-Mailer: git-send-email 1.7.4.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLKsWRmVeSWpSXmKPExsWy7bCmnu6769/iDRZtZbKYs34Nm8XPL+8Z Lb49XMhoceNXG6vFpsfXWC0u75rDZnFo6l5Gi1PXP7NZHFm/nclixuSXbA5cHpevXWT22Dnr LrvHplWdbB4nZvxm8di8pN7jyokmVo++LasYPT5vkgvgiMq2yUhNTEktUkjNS85PycxLt1Xy Do53jjc1MzDUNbS0MFdSyEvMTbVVcvEJ0HXLzAG6UUmhLDGnFCgUkFhcrKRvZ1OUX1qSqpCR X1xiq5RakJJTYFmgV5yYW1yal66XnJ9rZWhgYGQKVJiQnXFq0iTGgg3sFRtOLGdqYJzL1sXI ySEhYCKx8UoPYxcjF4eQwA5Gic6DM5ghnE+MEjvaH0FlvjFKXDn+hh2m5dq62awQib2MEn++ vWKCcL4wSvz7sZMFpIpNQEdi/5LfrCC2iIC9xLXHs8DmMgtsZZRoaf8PlhAWsJNYvmkn2FgW AVWJk12tTCA2r4CbxP5dr5gg1ilILLj3lg2kWULgEbvEj/YfjBAJF4mZm1dCFQlLvDq+Beo+ KYmX/W1QdrXE9gk/2SGaOxgletobWSASxhL7l04GauYAOklTYv0ufYiwosTO33PB5jML8Em8 +9rDClIiIcAr0dEmBFGiIrHz6CQ2iLCUxKwNwRBhD4kfjx+AVQsJxEq8fCc4gVF2FsL4BYyM qxjFUguKc9NTiw0LTJFjaRMjON1pWe5gnP72g94hRiYOxkOMEhzMSiK8Fse+xAv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Bh2eeX3N/05+b16xPG2nuWfChxUVpo/wefe1pJtu+NKyez3XWe03UQqHTgWku7AfP 73ho9moN9zqj7FOyz1R91mozuNnvfcbq98onbfaFjT8us53geG4ftOBzwYGzFluWCO7S+2K+ umf73rTEOTWn9ZiPnJ6il/Lt38ajV3TVq283m8kzpe2frvht+RPVQMaJRx9pnD4R2JT37Ehw 68vEdae9dJ99cL9xcOOe6Yx3uSsXvAvQCUqV+blMj222YNHTyRpRbnsvb0y4kX+78RjL+wTN Ten5GroLNjQVLe1J8lppbPxKN1Gu4ugc34mnT13wW6PEUpyRaKjFXFScCACRl+hOrgIAAA== X-CMS-MailID: 20210107094413epcas1p1dbbcbbea7ba9a3c4a50e7dc3ae5a5314 X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210107094413epcas1p1dbbcbbea7ba9a3c4a50e7dc3ae5a5314 References: <CGME20210107094413epcas1p1dbbcbbea7ba9a3c4a50e7dc3ae5a5314@epcas1p1.samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_044425_825740_141474BF X-CRM114-Status: GOOD ( 18.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, jh80.chung@samsung.com, jcmvbkbc@gmail.com, olof@lixom.net, akpm@linux-foundation.org, ardb@kernel.org, rppt@kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
ARM: mm: Free memblock from free_initrd_mem()
|
expand
|
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 828a256..f7db023 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -530,6 +530,13 @@ void free_initmem(void) #ifdef CONFIG_BLK_DEV_INITRD void free_initrd_mem(unsigned long start, unsigned long end) { +#ifdef CONFIG_ARCH_KEEP_MEMBLOCK + unsigned long aligned_start = ALIGN_DOWN(start, PAGE_SIZE); + unsigned long aligned_end = ALIGN(end, PAGE_SIZE); + + memblock_free(__pa(aligned_start), aligned_end - aligned_start); +#endif + if (start == initrd_start) start = round_down(start, PAGE_SIZE); if (end == initrd_end)
Even after free_initrd_mem(), memblock for initrd remains. Free memblock for initrd from free_initrd_mem(). Reported-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> --- arch/arm/mm/init.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)