From: "Arnd Bergmann" <arnd@arndb.de>
To: "Rosen Penev" <rosenp@gmail.com>, linux-mm@kvack.org
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"David Hildenbrand (Red Hat)" <david@kernel.org>,
"Lorenzo Stoakes" <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
"Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
"Mike Rapoport" <rppt@kernel.org>,
"Suren Baghdasaryan" <surenb@google.com>,
"Michal Hocko" <mhocko@suse.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
"Bill Wendling" <morbo@google.com>,
"Justin Stitt" <justinstitt@google.com>,
"open list" <linux-kernel@vger.kernel.org>,
"open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b"
<llvm@lists.linux.dev>
Subject: Re: [PATCH] mm: move phys_mem_access_prot_allowed to header
Date: Tue, 05 May 2026 07:54:01 +0200 [thread overview]
Message-ID: <0f11390f-e8bd-4f8d-aea8-59ef545b2c32@app.fastmail.com> (raw)
In-Reply-To: <20260505010112.645361-1-rosenp@gmail.com>
On Tue, May 5, 2026, at 03:01, Rosen Penev wrote:
> phys_mem_access_prot_allowed is only implemented for X86. For others, it
> returns 1. Move it to header to avoid using __weak.
>
> Fixes compilation with make LLVM=1 ARCH=mips
Can you describe what exactly goes wrong here on mips?
> @@ -239,12 +239,6 @@ static ssize_t write_mem(struct file *file, const
> char __user *buf,
> return written;
> }
>
> -int __weak phys_mem_access_prot_allowed(struct file *file,
> - unsigned long pfn, unsigned long size, pgprot_t *vma_prot)
> -{
> - return 1;
> -}
> -
Removing __weak functions is usually an improvement, but I think
we can go further here, see the discussion from last year at
https://lore.kernel.org/all/20250520152030.1499670-1-arnd@kernel.org/#t
Arnd
next prev parent reply other threads:[~2026-05-05 5:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 1:01 [PATCH] mm: move phys_mem_access_prot_allowed to header Rosen Penev
2026-05-05 5:54 ` Arnd Bergmann [this message]
2026-05-05 7:47 ` Rosen Penev
2026-05-05 8:29 ` Arnd Bergmann
2026-05-05 8:54 ` Rosen Penev
2026-05-05 9:22 ` Arnd Bergmann
2026-05-05 22:36 ` Rosen Penev
2026-05-06 5:48 ` Nathan Chancellor
2026-05-06 6:02 ` Rosen Penev
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=0f11390f-e8bd-4f8d-aea8-59ef545b2c32@app.fastmail.com \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=justinstitt@google.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mhocko@suse.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=rosenp@gmail.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.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