All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,ziy@nvidia.com,vgupta@kernel.org,lorenzo.stoakes@oracle.com,lkp@intel.com,liuye@kylinos.cn,dev.jain@arm.com,david@redhat.com,chrisl@kernel.org,akpm@linux-foundation.org,akpm@linux-foundation.org
Subject: + mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix.patch added to mm-unstable branch
Date: Fri, 22 Aug 2025 15:01:58 -0700	[thread overview]
Message-ID: <20250822220159.7AB3BC4CEED@smtp.kernel.org> (raw)


The patch titled
     Subject: mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix
has been added to the -mm mm-unstable branch.  Its filename is
     mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix
Date: Fri Aug 22 02:54:15 PM PDT 2025

add system-wide PAGES_TO_KB/PAGES_FROM_KB to mm.h, remove arc private
versions

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lkml.kernel.org/r/202508230539.pnO97SIj-lkp@intel.com
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: Ye Liu <liuye@kylinos.cn>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Chris Li <chrisl@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arc/include/asm/arcregs.h |    4 ++--
 include/linux/mm.h             |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

--- a/arch/arc/include/asm/arcregs.h~mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix
+++ a/arch/arc/include/asm/arcregs.h
@@ -146,13 +146,13 @@
 
 #ifndef __ASSEMBLER__
 
+#include <linux/mm.h>
+
 #include <soc/arc/arc_aux.h>
 
 /* Helpers */
 #define TO_KB(bytes)		((bytes) >> 10)
 #define TO_MB(bytes)		(TO_KB(bytes) >> 10)
-#define PAGES_TO_KB(n_pages)	((n_pages) << (PAGE_SHIFT - 10))
-#define PAGES_TO_MB(n_pages)	(PAGES_TO_KB(n_pages) >> 10)
 
 
 /*
--- a/include/linux/mm.h~mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix
+++ a/include/linux/mm.h
@@ -75,6 +75,8 @@ extern void * high_memory;
  * PAGE_SHIFT is the shift for page size (e.g., 12 for 4KB pages)
  * So (20 - PAGE_SHIFT) converts between pages and MB
  */
+#define PAGES_TO_KB(pages) ((pages) >> (10 - PAGE_SHIFT))
+#define KB_TO_PAGES(kb)    ((kb) << (10 - PAGE_SHIFT))
 #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
 #define MB_TO_PAGES(mb)    ((mb) << (20 - PAGE_SHIFT))
 
_

Patches currently in -mm which might be from akpm@linux-foundation.org are

mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix.patch
mm-damon-core-skip-needless-update-of-damon_attrs-in-damon_commit_ctx-fix.patch
mm-convert-core-mm-to-mm_flags_-accessors-fix.patch
memcg-optimize-exit-to-user-space-fix.patch
lib-sys_info-handle-sys_info_mask==0-case-fix.patch


             reply	other threads:[~2025-08-22 22:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 22:01 Andrew Morton [this message]
2025-08-22 22:37 ` + mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix.patch added to mm-unstable branch Zi Yan
2025-08-23  1:48   ` Andrew Morton
2025-08-23  2:00   ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2025-08-23  2:00 Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250822220159.7AB3BC4CEED@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=chrisl@kernel.org \
    --cc=david@redhat.com \
    --cc=dev.jain@arm.com \
    --cc=liuye@kylinos.cn \
    --cc=lkp@intel.com \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=vgupta@kernel.org \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.