From: akpm@linux-foundation.org
To: arjunroy@google.com, davem@davemloft.net, edumazet@google.com,
jgg@ziepe.ca, mm-commits@vger.kernel.org, sfr@canb.auug.org.au,
soheil@google.com, willy@infradead.org
Subject: + mm-define-pte_index-as-macro-for-x86.patch added to -mm tree
Date: Sat, 29 Feb 2020 20:27:57 -0800 [thread overview]
Message-ID: <20200301042757.FZfiOeLFA%akpm@linux-foundation.org> (raw)
The patch titled
Subject: mm: define pte_index as macro for x86
has been added to the -mm tree. Its filename is
mm-define-pte_index-as-macro-for-x86.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-define-pte_index-as-macro-for-x86.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-define-pte_index-as-macro-for-x86.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Arjun Roy <arjunroy@google.com>
Subject: mm: define pte_index as macro for x86
pte_index() is either defined as a macro (e.g. sparc64) or as an inlined
function (e.g. x86). vm_insert_pages() depends on pte_index but it is
not defined on all platforms (e.g. m68k).
To fix compilation of vm_insert_pages() on architectures not providing
pte_index(), we perform the following fix:
0. For platforms where it is meaningful, and defined as a macro, no
change is needed.
1. For platforms where it is meaningful and defined as an inlined
function, and we want to use it with vm_insert_pages(), we define
a degenerate macro of the form: #define pte_index pte_index
2. vm_insert_pages() checks for the existence of a pte_index macro
definition. If found, it implements a batched insert. If not found,
it devolves to calling vm_insert_page() in a loop.
This patch implements step 1 for x86.
v3 of this patch fixes a compilation warning for an unused method.
v2 of this patch moved a macro definition to a more readable location.
Link: http://lkml.kernel.org/r/20200228054714.204424-1-arjunroy.kdev@gmail.com
Signed-off-by: Arjun Roy <arjunroy@google.com>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/x86/include/asm/pgtable.h | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/x86/include/asm/pgtable.h~mm-define-pte_index-as-macro-for-x86
+++ a/arch/x86/include/asm/pgtable.h
@@ -828,7 +828,10 @@ static inline unsigned long pmd_index(un
*
* this function returns the index of the entry in the pte page which would
* control the given virtual address
+ *
+ * Also define macro so we can test if pte_index is defined for arch.
*/
+#define pte_index pte_index
static inline unsigned long pte_index(unsigned long address)
{
return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
_
Patches currently in -mm which might be from arjunroy@google.com are
mm-refactor-insert_page-to-prepare-for-batched-lock-insert.patch
mm-bring-sparc-pte_index-semantics-inline-with-other-platforms.patch
mm-define-pte_index-as-macro-for-x86.patch
mm-add-vm_insert_pages.patch
mm-add-vm_insert_pages-2.patch
mm-add-vm_insert_pages-2-fix.patch
net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy.patch
reply other threads:[~2020-03-01 4:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200301042757.FZfiOeLFA%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arjunroy@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=soheil@google.com \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).