From patchwork Fri Oct 11 07:23:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ritesh Harjani (IBM)" X-Patchwork-Id: 13832167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C34ECEDDBD for ; Fri, 11 Oct 2024 07:23:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A66746B0096; Fri, 11 Oct 2024 03:23:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EF356B0098; Fri, 11 Oct 2024 03:23:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8684E6B0099; Fri, 11 Oct 2024 03:23:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6481E6B0096 for ; Fri, 11 Oct 2024 03:23:28 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id C0F441A0E5A for ; Fri, 11 Oct 2024 07:23:20 +0000 (UTC) X-FDA: 82660480854.01.43656A1 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by imf17.hostedemail.com (Postfix) with ESMTP id 74D6B40005 for ; Fri, 11 Oct 2024 07:23:24 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=i2XnAKb3; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf17.hostedemail.com: domain of ritesh.list@gmail.com designates 209.85.214.176 as permitted sender) smtp.mailfrom=ritesh.list@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728631294; a=rsa-sha256; cv=none; b=X7JJn52Qj+gdUeH/DlJv/1r3aQ/Z+7W8lX1Hx231zlAy0QhkG9/UVwTPSr/tdoQnm8mipJ 2SVJ0hixx12DHrxgoAQdDzsgcsJD/6FDKSpZd/cQK10gaKuFfB6FTtiKA+B4EZugO1eU5H McU1syE4S3l9JcxVQ3EPyxy19W8yUoI= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=i2XnAKb3; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf17.hostedemail.com: domain of ritesh.list@gmail.com designates 209.85.214.176 as permitted sender) smtp.mailfrom=ritesh.list@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728631294; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=XnEaqowfcnk7jkRXbNgb4/5Y6pMvkA79KiBX2pek4eE=; b=GHGVeROVQMV6/Wl3Tr2vHCQjO1ebmWzbivYF0TRriEe1yFB+sp8Vs3ji3AMO92y2VatcCZ +lZSUl/ItixxyBBNv0vq+ejrmSl6xr9zSy3gg0MbF9dENMddxEHomXYVf9nARguYlmkITn ik6RdYiii2sRA42zXPSTzEBkbSTQyts= Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-20ca96a155cso1612355ad.2 for ; Fri, 11 Oct 2024 00:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728631405; x=1729236205; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XnEaqowfcnk7jkRXbNgb4/5Y6pMvkA79KiBX2pek4eE=; b=i2XnAKb3vfaDoLR10mXAbTYDMBcrJVFKcuUjMZ0UVhcaxgLaHLubQhSZ5qT+fe6wbm pm0+TpOAPRPe6VyzdZ5pnKyllD+GMabfPOtC+eMSNmvVx/lCvaiVf5EyiemFd2ZblZjD ePPZlwvC84RfUujEAqx6aWcQnF++ZgsdKkKMK7bF84s4VE3x8Lz30dXEdf7+srDS2l0J rLaY4u4yZzHpr1weEDaqhwO7QJ9RXgjgyyK37ALOoCaWcIBt9yCaHIHRrfxkK2a/rH+y Whtx+l80HaT7cZ88EEgGBCn8kDU6iyIAlngz7/Vh1yHTlxQgkLr+r7CQ3XRdACOkqteQ 5xTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728631405; x=1729236205; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XnEaqowfcnk7jkRXbNgb4/5Y6pMvkA79KiBX2pek4eE=; b=W+LYC3Yr9C29JBey2kW6gcihr8ZScSnFF0IBGgyy0WXtUAW4BPSQBG4KpMoGi5SXAZ fP7LBfvAlIwvCyCpcQ8i/RzRseeIU6JoJ/jbJjGQO8rEqdEYc1AUx+PQAYfcDOqqok+8 T2F3UiHZrDJhn9h+uQ/dmFugzieeGa2KiA5no+6dsbTAx2BC5s5oTY5eGsAYaz+f/mSx u50VFYk67Q5ofZXQ6T1eo8+25LPOIB5XEDtz0rQ1ES9MELZtI66zrDCzf+QQ64EZ7GXV EekbOIyIv2UL9wxWbio2J62zxOOWdspdrppp9PAo6Nzjnl3pYOlDroeZWrA9/enJyiAg 11BQ== X-Gm-Message-State: AOJu0YzUBL+gVaBNvwLvdBcckXZgVGe+NTEFCV4BnIMXv55vKsRYcLgp SYp7mY/kbjyLMcia7UzxZckTBN1MfhlfvuTU/m1ql5IycZ/37/tN X-Google-Smtp-Source: AGHT+IEFSIOyyGQ8iJm7Cv2Shmsw3hdd0D/3Fh+uN3QrHhs9C/KyWtczMqCxJnNMNXv5/J4NljymUg== X-Received: by 2002:a17:902:d4ca:b0:20b:7a46:1071 with SMTP id d9443c01a7336-20ca13f7200mr21256995ad.4.1728631404978; Fri, 11 Oct 2024 00:23:24 -0700 (PDT) Received: from dw-tp.ibmuc.com ([49.205.218.89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c8bad335dsm18825155ad.50.2024.10.11.00.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 00:23:24 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: linuxppc-dev@lists.ozlabs.org Cc: linux-mm@kvack.org, Sourabh Jain , Hari Bathini , Zi Yan , David Hildenbrand , "Kirill A . Shutemov" , Mahesh J Salgaonkar , Michael Ellerman , Madhavan Srinivasan , "Aneesh Kumar K . V" , Donet Tom , LKML , Sachin P Bappalige , "Ritesh Harjani (IBM)" Subject: [RFC v2 0/4] cma: powerpc fadump fixes Date: Fri, 11 Oct 2024 12:53:08 +0530 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 74D6B40005 X-Stat-Signature: rekdr7zeshgb1yh1w76gfxxtd9ea9ax7 X-Rspam-User: X-HE-Tag: 1728631404-333559 X-HE-Meta: U2FsdGVkX1/vf2/H55FFWoakNQlGZmljqtUljCJDffgpHb3cq6N/+Q3PcR6X/JJTWFbm3fpZfDp+t4QqnduuQ7/PkUCHR0py5iOcZbpcgsbULXgazVpugN5blZs7uTCmgGT+Vbh8+QzE4YD0cv+umdxtK0dF/FQ22ZKTr5kaY1R3p01EiFzHxpPXL0jJfYbrhgF4pZtP/u7zGkxKsWU2TJ8gUXVkLO3PxwYoliElpwm0yxdkF/lsgLGt1dNN6bQI8jwVxFEY8IA7t+CzEtYUEVr5vs5JSq/uJ4b1m5gq8dX533CSAnP1o0Ppk6B3J1Q9oNXEuiB9v5brRuwkWJYYz0zar6hABb0NfJjn6V8QbP6D8acBg+fpmjFuYpOW37rihBiHRC4AyCs0wu4O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/89C710HEDY+G0+K1DExrO0JO0 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: List-Subscribe: List-Unsubscribe: Please find the v2 of cma related powerpc fadump fixes. Patch-1 is a change in mm/cma.c to make sure we return an error if someone uses cma_init_reserved_mem() before the pageblock_order is initalized. I guess, it's best if Patch-1 goes via mm tree and since rest of the changes are powerpc fadump fixes hence those should go via powerpc tree. Right? v1 -> v2: ========= 1. Review comments from David to call fadump_cma_init() after the pageblock_order is initialized. Also to catch usages if someone tries to call cma_init_reserved_mem() before pageblock_order is initialized. [v1]: https://lore.kernel.org/linuxppc-dev/c1e66d3e69c8d90988c02b84c79db5d9dd93f053.1728386179.git.ritesh.list@gmail.com/ Ritesh Harjani (IBM) (4): cma: Enforce non-zero pageblock_order during cma_init_reserved_mem() fadump: Refactor and prepare fadump_cma_init for late init fadump: Reserve page-aligned boot_memory_size during fadump_reserve_mem fadump: Move fadump_cma_init to setup_arch() after initmem_init() arch/powerpc/include/asm/fadump.h | 7 ++++ arch/powerpc/kernel/fadump.c | 55 +++++++++++++++--------------- arch/powerpc/kernel/setup-common.c | 6 ++-- mm/cma.c | 9 +++++ 4 files changed, 48 insertions(+), 29 deletions(-) --- 2.46.0