linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] mm: consolidate pte_index() and pte_offset_*() definitions
@ 2020-06-10 20:42 Guenter Roeck
  2020-06-10 22:13 ` Stephen Rothwell
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2020-06-10 20:42 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: linux-kernel, Stephen Rothwell, Andrew Morton, Linus Torvalds

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@linux.ibm.com: v2]
>   Link: http://lkml.kernel.org/r/20200514170327.31389-11-rppt@kernel.org
> [rppt@linux.ibm.com: update]
>   Link: http://lkml.kernel.org/r/20200514170327.31389-12-rppt@kernel.org
> [rppt@linux.ibm.com: update]
>   Link: http://lkml.kernel.org/r/20200514170327.31389-13-rppt@kernel.org
> [akpm@linux-foundation.org: fix x86 warning]
> [sfr@canb.auug.org.au: fix powerpc build]
>   Link: http://lkml.kernel.org/r/20200607153443.GB738695@linux.ibm.com
> 
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ ... ]
> Link: http://lkml.kernel.org/r/20200514170327.31389-10-rppt@kernel.org
> Signed-off-by: Linus Torvalds <torvalds@linux-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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: consolidate pte_index() and pte_offset_*() definitions
  2020-06-10 20:42 [PATCH] mm: consolidate pte_index() and pte_offset_*() definitions Guenter Roeck
@ 2020-06-10 22:13 ` Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2020-06-10 22:13 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Mike Rapoport, linux-kernel, Andrew Morton, Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]

Hi Guenter,

On Wed, 10 Jun 2020 13:42:12 -0700 Guenter Roeck <linux@roeck-us.net> wrote:
>
> 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)
>       |                      ^~~~~~~~~~~~~~~~~

This was reported on Tuesday (by me among others) and is fixed in
Linus' tree now.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-10 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 20:42 [PATCH] mm: consolidate pte_index() and pte_offset_*() definitions Guenter Roeck
2020-06-10 22:13 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).