Files
android_kernel_xiaomi_sm8450/arch/x86/include/asm
Arjun Roy c97078bd21 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.

Signed-off-by: Arjun Roy <arjunroy@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
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>
Link: http://lkml.kernel.org/r/20200228054714.204424-1-arjunroy.kdev@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-04-10 15:36:21 -07:00
..
2020-03-26 15:02:14 -04:00
2019-07-22 12:00:51 +02:00
2020-01-23 10:41:20 -08:00
2018-12-03 10:49:13 +01:00
2020-01-24 15:00:35 -06:00
2020-03-09 14:51:31 +00:00
2018-08-15 13:44:10 -07:00
2019-07-03 16:35:23 +02:00
2019-04-16 12:26:18 +02:00
2017-12-22 20:13:04 +01:00
2019-04-22 11:42:59 +02:00
2019-07-17 23:17:38 +02:00
2020-01-23 10:41:20 -08:00
2019-07-22 12:00:51 +02:00
2019-06-17 12:43:44 +02:00
2019-09-24 16:15:36 +02:00
2018-03-20 10:01:57 +01:00
2019-04-10 09:53:31 +02:00
2020-03-21 16:03:25 +01:00
2020-01-14 12:20:58 +01:00
2020-03-23 18:45:14 +01:00
2020-01-14 12:20:58 +01:00