archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <>
Subject: [patch 1/6] m68k: make __pfn_to_phys() and __phys_to_pfn() available for !MMU
Date: Fri, 12 Feb 2021 20:52:38 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Mike Rapoport <>
Subject: m68k: make __pfn_to_phys() and __phys_to_pfn() available for !MMU

Recent changes that obsoleted DISCONTIGMEM on m68k switched the MMU
variant to use generic definitions of __pfn_to_phys() and __phys_to_pfn(),
but missed the !MMU variant which caused a build failure:

All errors (new ones prefixed by >>):

   drivers/media/common/videobuf2/videobuf2-dma-contig.c: In function 'vb2_dc_get_userptr':
>> drivers/media/common/videobuf2/videobuf2-dma-contig.c:509:5: error: implicit declaration of function '__pfn_to_phys' [-Werror=implicit-function-declaration]
     509 |     __pfn_to_phys(nums[0]), size, buf->dma_dir, 0);
         |     ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors

Enable __pfn_to_phys() and __phys_to_pfn() on !MMU builds.

Fixes: 4bfc848e0981 ("m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM")
Signed-off-by: Mike Rapoport <>
Reported-by: kernel test robot <>
Cc: Geert Uytterhoeven <>
Cc: Greg Ungerer <>
Signed-off-by: Andrew Morton <>

 arch/m68k/include/asm/page.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/m68k/include/asm/page.h~m68k-make-__pfn_to_phys-and-__phys_to_pfn-available-for-mmu
+++ a/arch/m68k/include/asm/page.h
@@ -62,7 +62,7 @@ extern unsigned long _ramend;
 #include <asm/page_no.h>
+#if !defined(CONFIG_MMU) || defined(CONFIG_DISCONTIGMEM)
 #define __phys_to_pfn(paddr)	((unsigned long)((paddr) >> PAGE_SHIFT))
 #define __pfn_to_phys(pfn)	PFN_PHYS(pfn)

  reply	other threads:[~2021-02-13  4:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13  4:52 incoming Andrew Morton
2021-02-13  4:52 ` Andrew Morton [this message]
2021-02-13  4:52 ` [patch 2/6] scripts/ support big endian for ARCH sh Andrew Morton
2021-02-13  4:52 ` [patch 3/6] MAINTAINERS: update KASAN file list Andrew Morton
2021-02-13  4:52 ` [patch 4/6] MAINTAINERS: update Andrey Konovalov's email address Andrew Morton
2021-02-13  4:52 ` [patch 5/6] MAINTAINERS: add Andrey Konovalov to KASAN reviewers Andrew Morton
2021-02-13  4:52 ` [patch 6/6] h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 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:

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

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [patch 1/6] m68k: make __pfn_to_phys() and __phys_to_pfn() available for '\!'MMU' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).