All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-arch@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, Guo Ren <guoren@kernel.org>,
	linux-alpha@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Michal Simek <monstr@monstr.eu>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Jonas Bonn <jonas@southpole.se>
Subject: [PATCH 2/6][alpha,m68k,openrisc] PAGE_PTR() had been last used outside of arch/* in 1.1.94
Date: Thu, 11 Sep 2025 02:53:06 +0100	[thread overview]
Message-ID: <20250911015306.GB2604499@ZenIV> (raw)
In-Reply-To: <20250911015124.GV31600@ZenIV>

.. and in arch/* - circa 2.2.7.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 arch/alpha/include/asm/pgtable.h    | 13 -------------
 arch/m68k/include/asm/pgtable_mm.h  | 10 ----------
 arch/openrisc/include/asm/pgtable.h | 14 --------------
 3 files changed, 37 deletions(-)

diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
index 44e7aedac6e8..ae2bdbeec91c 100644
--- a/arch/alpha/include/asm/pgtable.h
+++ b/arch/alpha/include/asm/pgtable.h
@@ -141,19 +141,6 @@ extern unsigned long __zero_page(void);
 #define BAD_PAGE	__bad_page()
 #define ZERO_PAGE(vaddr)	(virt_to_page(ZERO_PGE))
 
-/* number of bits that fit into a memory pointer */
-#define BITS_PER_PTR			(8*sizeof(unsigned long))
-
-/* to align the pointer to a pointer address */
-#define PTR_MASK			(~(sizeof(void*)-1))
-
-/* sizeof(void*)==1<<SIZEOF_PTR_LOG2 */
-#define SIZEOF_PTR_LOG2			3
-
-/* to find an entry in a page-table */
-#define PAGE_PTR(address)		\
-  ((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK)
-
 /*
  * On certain platforms whose physical address space can overlap KSEG,
  * namely EV6 and above, we must re-twiddle the physaddr to restore the
diff --git a/arch/m68k/include/asm/pgtable_mm.h b/arch/m68k/include/asm/pgtable_mm.h
index 62f2ff4e6799..bba64a9c49ac 100644
--- a/arch/m68k/include/asm/pgtable_mm.h
+++ b/arch/m68k/include/asm/pgtable_mm.h
@@ -119,16 +119,6 @@ extern void *empty_zero_page;
  */
 #define ZERO_PAGE(vaddr)	(virt_to_page(empty_zero_page))
 
-/* number of bits that fit into a memory pointer */
-#define BITS_PER_PTR			(8*sizeof(unsigned long))
-
-/* to align the pointer to a pointer address */
-#define PTR_MASK			(~(sizeof(void*)-1))
-
-/* sizeof(void*)==1<<SIZEOF_PTR_LOG2 */
-/* 64-bit machines, beware!  SRB. */
-#define SIZEOF_PTR_LOG2			       2
-
 extern void kernel_set_cachemode(void *addr, unsigned long size, int cmode);
 
 /*
diff --git a/arch/openrisc/include/asm/pgtable.h b/arch/openrisc/include/asm/pgtable.h
index d33702831505..138f46fc838b 100644
--- a/arch/openrisc/include/asm/pgtable.h
+++ b/arch/openrisc/include/asm/pgtable.h
@@ -183,20 +183,6 @@ extern void paging_init(void);
 extern unsigned long empty_zero_page[2048];
 #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
 
-/* number of bits that fit into a memory pointer */
-#define BITS_PER_PTR			(8*sizeof(unsigned long))
-
-/* to align the pointer to a pointer address */
-#define PTR_MASK			(~(sizeof(void *)-1))
-
-/* sizeof(void*)==1<<SIZEOF_PTR_LOG2 */
-/* 64-bit machines, beware!  SRB. */
-#define SIZEOF_PTR_LOG2			2
-
-/* to find an entry in a page-table */
-#define PAGE_PTR(address) \
-((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK)
-
 /* to set the page-dir */
 #define SET_PAGE_DIR(tsk, pgdir)
 
-- 
2.47.2


  parent reply	other threads:[~2025-09-11  1:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11  1:51 [PATCHES] misc dead code removals in arch/* - mostly asm/pgtable.h Al Viro
2025-09-11  1:52 ` [PATCH 1/6] csky: remove BS check for FAULT_FLAG_ALLOW_RETRY Al Viro
2025-09-11  2:55   ` Guo Ren
2025-09-11  1:53 ` Al Viro [this message]
2025-09-11  7:29   ` [PATCH 2/6][alpha,m68k,openrisc] PAGE_PTR() had been last used outside of arch/* in 1.1.94 Geert Uytterhoeven
2025-09-11  1:53 ` [PATCH 3/6][openrisc] SET_PAGE_DIR() users had been gone since 2.3.12pre1 Al Viro
2025-09-11  1:54 ` [PATCH 4/6] alpha: get rid of the remnants of BAD_PAGE and friends Al Viro
2025-09-11  1:54 ` [PATCH 5/6][microblaze,xtensa] kill FIRST_USER_PGD_NR Al Viro
2025-09-11 14:57   ` Max Filippov
2025-09-15  6:42   ` Michal Simek
2025-09-11  1:55 ` [PATCH 6/6] alpha: unobfuscate _PAGE_P() definition Al Viro

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=20250911015306.GB2604499@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=arnd@arndb.de \
    --cc=geert@linux-m68k.org \
    --cc=guoren@kernel.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=jonas@southpole.se \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=monstr@monstr.eu \
    /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.