[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200610204212.GA4595@roeck-us.net>
Date: Wed, 10 Jun 2020 13:42:12 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Mike Rapoport <rppt@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org,
Stephen Rothwell <sfr@...b.auug.org.au>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] mm: consolidate pte_index() and pte_offset_*()
definitions
On Mon, Jun 08, 2020 at 09:33:10PM -0700, Mike Rapoport wrote:
> All architectures define pte_index() as
>
> (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)
>
> and all architectures define pte_offset_kernel() as an entry in the array
> of PTEs indexed by the pte_index().
>
> For the most architectures the pte_offset_kernel() implementation relies
> on the availability of pmd_page_vaddr() that converts a PMD entry value to
> the virtual address of the page containing PTEs array.
>
> Let's move x86 definitions of the PTE accessors to the generic place in
> <linux/pgtable.h> and then simply drop the respective definitions from the
> other architectures.
>
> The architectures that didn't provide pmd_page_vaddr() are updated to have
> that defined.
>
> The generic implementation of pte_offset_kernel() can be overridden by an
> architecture and alpha makes use of this because it has special ordering
> requirements for its version of pte_offset_kernel().
>
> [rppt@...ux.ibm.com: v2]
> Link: http://lkml.kernel.org/r/20200514170327.31389-11-rppt@kernel.org
> [rppt@...ux.ibm.com: update]
> Link: http://lkml.kernel.org/r/20200514170327.31389-12-rppt@kernel.org
> [rppt@...ux.ibm.com: update]
> Link: http://lkml.kernel.org/r/20200514170327.31389-13-rppt@kernel.org
> [akpm@...ux-foundation.org: fix x86 warning]
> [sfr@...b.auug.org.au: fix powerpc build]
> Link: http://lkml.kernel.org/r/20200607153443.GB738695@linux.ibm.com
>
> Signed-off-by: Mike Rapoport <rppt@...ux.ibm.com>
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
[ ... ]
> Link: http://lkml.kernel.org/r/20200514170327.31389-10-rppt@kernel.org
> Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
> ---
Building sparc32:defconfig ... failed
--------------
Error log:
<stdin>:1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
In file included from include/linux/mm.h:32,
from include/linux/memblock.h:13,
from arch/sparc/mm/srmmu.c:14:
include/linux/pgtable.h:74:27: error: redefinition of 'pte_offset_kernel'
74 | #define pte_offset_kernel pte_offset_kernel
| ^~~~~~~~~~~~~~~~~
arch/sparc/mm/srmmu.c:144:8: note: in expansion of macro 'pte_offset_kernel'
144 | pte_t *pte_offset_kernel(pmd_t *dir, unsigned long address)
| ^~~~~~~~~~~~~~~~~
include/linux/pgtable.h:70:22: note: previous definition of 'pte_offset_kernel' was here
70 | static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address)
| ^~~~~~~~~~~~~~~~~
Bisct log attached.
Guenter
---
# bad: [5b14671be58d0084e7e2d1cc9c2c36a94467f6e0] Merge tag 'fuse-update-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
# good: [abfbb29297c27e3f101f348dc9e467b0fe70f919] Merge tag 'rproc-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc
git bisect start 'HEAD' 'abfbb29297c2'
# bad: [595a56ac1b0d5f0a16a89589ef55ffd35c1967a2] Merge tag 'linux-kselftest-kunit-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
git bisect bad 595a56ac1b0d5f0a16a89589ef55ffd35c1967a2
# bad: [d8ed45c5dcd455fc5848d47f86883a1b872ac0d0] mmap locking API: use coccinelle to convert mmap_sem rwsem call sites
git bisect bad d8ed45c5dcd455fc5848d47f86883a1b872ac0d0
# good: [2deebe4d56d638269a4a728086d64de5734b460a] sh: add loglvl to printk_address()
git bisect good 2deebe4d56d638269a4a728086d64de5734b460a
# good: [77819daf247aad16beaeb537ae77d1d6d0697ca2] kdb: don't play with console_loglevel
git bisect good 77819daf247aad16beaeb537ae77d1d6d0697ca2
# good: [e73240be691e1b081190125da67cd38822b8d5f8] m68k/mm/motorola: move comment about page table allocation funcitons
git bisect good e73240be691e1b081190125da67cd38822b8d5f8
# bad: [974b9b2c68f3d35a65e80af9657fe378d2439b60] mm: consolidate pte_index() and pte_offset_*() definitions
git bisect bad 974b9b2c68f3d35a65e80af9657fe378d2439b60
# good: [88107d330de4f175705a3ea03147feb0d7e68499] x86/mm: simplify init_trampoline() and surrounding logic
git bisect good 88107d330de4f175705a3ea03147feb0d7e68499
# good: [e05c7b1f2bc4b7b28199b9a7572f73436d97317e] mm: pgtable: add shortcuts for accessing kernel PMD and PTE
git bisect good e05c7b1f2bc4b7b28199b9a7572f73436d97317e
# first bad commit: [974b9b2c68f3d35a65e80af9657fe378d2439b60] mm: consolidate pte_index() and pte_offset_*() definitions
Powered by blists - more mailing lists