mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Max Filippov <jcmvbkbc@gmail.com>, linux-xtensa@linux-xtensa.org
Cc: Chris Zankel <chris@zankel.net>,
	linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] xtensa: noMMU: fix vm_get_page_prot definition
Date: Wed, 6 Jul 2022 10:20:48 +0530	[thread overview]
Message-ID: <ef6ee347-4248-9f06-f1a1-9f18613e97dc@arm.com> (raw)
In-Reply-To: <20220705221411.3381797-1-jcmvbkbc@gmail.com>

Hello Max,

I could reproduce the build failure with nommu_kc705_defconfig.

On 7/6/22 03:44, Max Filippov wrote:
> Don't define protection_map and don't use DECLARE_VM_GET_PAGE_PROT in
> noMMU configs, because in that case the definition for vm_get_page_prot
> is provided by the include/linux/mm.h

Right, a fallback (!CONFIG_MMU) stub definition is provided there.
 
> 
> Fixes: 61ab8053710f ("xtensa/mm: enable ARCH_HAS_VM_GET_PAGE_PROT")
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
>  arch/xtensa/mm/init.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
> index fb830ec8183c..b2587a1a7c46 100644
> --- a/arch/xtensa/mm/init.c
> +++ b/arch/xtensa/mm/init.c
> @@ -217,6 +217,7 @@ static int __init parse_memmap_opt(char *str)
>  }
>  early_param("memmap", parse_memmap_opt);
>  
> +#ifdef CONFIG_MMU
>  static const pgprot_t protection_map[16] = {
>  	[VM_NONE]					= PAGE_NONE,
>  	[VM_READ]					= PAGE_READONLY,
> @@ -236,3 +237,4 @@ static const pgprot_t protection_map[16] = {
>  	[VM_SHARED | VM_EXEC | VM_WRITE | VM_READ]	= PAGE_SHARED_EXEC
>  };
>  DECLARE_VM_GET_PAGE_PROT
> +#endif

LGTM and fixes the build problem.

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

Reviewing CONFIG_MMU dependency for other platforms ....

* powerpc    - No CONFIG_MMU found - config MMU - bool default y
* sparc      - No CONFIG_MMU found - config MMU - bool default y
* arm64      - No CONFIG_MMU found - config MMU - bool default y
* x86        - No CONFIG_MMU found - config MMU - bool default y
* microblaze - No CONFIG_MMU found - config MMU - bool default y
* loongarch  - No CONFIG_MMU found - config MMU - bool default y
* openrisc   - No CONFIG_MMU found - config MMU - bool default y
* xtensa     - This fix here
* hexagon    - No CONFIG_MMU found - config MMU - bool default y
* parisc     - No CONFIG_MMU found - config MMU - bool default y
* alpha      - No CONFIG_MMU found - config MMU - bool default y
* nios2      - No CONFIG_MMU found - config MMU - bool default y
* riscv	     - Both protection_map[] and DECLARE_VM_GET_PAGE_PROT
               are inside CONFIG_MMU
* csky       - No CONFIG_MMU found - config MMU - bool default y
* s390       - No CONFIG_MMU found - config MMU - bool default y
* ia64       - No CONFIG_MMU found - config MMU - bool default y
* mips       - No CONFIG_MMU found - config MMU - bool default y
* m68k	     - Both protection_map[] and DECLARE_VM_GET_PAGE_PROT
               are inside CONFIG_MMU (SUN3, MOTOROLA, COLDFIRE)
* arc        - No CONFIG_MMU found - config MMU - bool default y
* arm	     - Both protection_map[] and DECLARE_VM_GET_PAGE_PROT
               are inside CONFIG_MMU
* um         - No CONFIG_MMU found - config MMU - bool default y
* sh	     - Both protection_map[] and DECLARE_VM_GET_PAGE_PROT
               needs to be moved inside CONFIG_MMU, will send a
	       patch soon.

So apart from xtensa and sh, no other platform seems to have this
CONFIG_MMU related build problem. But please do let me know if I
might have missed something.

- Anshuman

      reply	other threads:[~2022-07-06  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05 22:14 Max Filippov
2022-07-06  4:50 ` Anshuman Khandual [this message]

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=ef6ee347-4248-9f06-f1a1-9f18613e97dc@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris@zankel.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®