From: kernel test robot <lkp@intel.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [luto:x86/mm 1/7] arch/x86/include/asm/mmu_context.h:95:46: error: 'cpu_tlbstate' undeclared
Date: Thu, 30 Sep 2021 11:22:44 +0800 [thread overview]
Message-ID: <202109301136.2nOT5ZW6-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6262 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/mm
head: e69827244c2f1e534aa83a40334ffa00bafe54c2
commit: f11196dfb449b51be4cf583fa343b90e20f95d48 [1/7] x86/ldt: Refactor the LDT loading functions
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id=f11196dfb449b51be4cf583fa343b90e20f95d48
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/mm
git checkout f11196dfb449b51be4cf583fa343b90e20f95d48
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/asm-generic/percpu.h:7,
from arch/x86/include/asm/percpu.h:390,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from arch/x86/include/asm/mmu.h:5,
from arch/x86/include/asm/desc.h:7,
from arch/x86/include/asm/mmu_context.h:5,
from include/linux/mmu_context.h:5,
from drivers/gpu/drm/i915/gem/i915_gem_userptr.c:7:
arch/x86/include/asm/mmu_context.h: In function 'load_ldt_if_present':
>> arch/x86/include/asm/mmu_context.h:95:46: error: 'cpu_tlbstate' undeclared (first use in this function)
95 | return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
318 | typeof(variable) pscr_ret__; \
| ^~~~~~~~
arch/x86/include/asm/mmu_context.h:95:32: note: in expansion of macro 'this_cpu_read'
95 | return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
| ^~~~~~~~~~~~~
arch/x86/include/asm/mmu_context.h:95:46: note: each undeclared identifier is reported only once for each function it appears in
95 | return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
318 | typeof(variable) pscr_ret__; \
| ^~~~~~~~
arch/x86/include/asm/mmu_context.h:95:32: note: in expansion of macro 'this_cpu_read'
95 | return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
| ^~~~~~~~~~~~~
>> include/linux/percpu-defs.h:317:2: warning: passing argument 1 of 'load_mm_ldt_if_present' makes pointer from integer without a cast [-Wint-conversion]
317 | ({ \
| ~^~~~~~~~~~~
| |
| int
318 | typeof(variable) pscr_ret__; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
319 | __verify_pcpu_ptr(&(variable)); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
320 | switch(sizeof(variable)) { \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
321 | case 1: pscr_ret__ = stem##1(variable); break; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
322 | case 2: pscr_ret__ = stem##2(variable); break; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
323 | case 4: pscr_ret__ = stem##4(variable); break; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
324 | case 8: pscr_ret__ = stem##8(variable); break; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
325 | default: \
| ~~~~~~~~~~~~~~~~
326 | __bad_size_call_parameter(); break; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
327 | } \
| ~~~~~~~~~~
328 | pscr_ret__; \
| ~~~~~~~~~~~~~~~~~~~
329 | })
| ~~
include/linux/percpu-defs.h:507:29: note: in expansion of macro '__pcpu_size_call_return'
507 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/mmu_context.h:95:32: note: in expansion of macro 'this_cpu_read'
95 | return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
| ^~~~~~~~~~~~~
In file included from include/linux/mmu_context.h:5,
from drivers/gpu/drm/i915/gem/i915_gem_userptr.c:7:
arch/x86/include/asm/mmu_context.h:83:61: note: expected 'struct mm_struct *' but argument is of type 'int'
83 | static inline bool load_mm_ldt_if_present(struct mm_struct *mm)
| ~~~~~~~~~~~~~~~~~~^~
vim +/cpu_tlbstate +95 arch/x86/include/asm/mmu_context.h
79
80 #ifdef CONFIG_MODIFY_LDT_SYSCALL
81 extern void load_ldt_struct(struct ldt_struct *ldt);
82 extern void switch_ldt(struct mm_struct *prev, struct mm_struct *next);
83 static inline bool load_mm_ldt_if_present(struct mm_struct *mm)
84 {
85 struct ldt_struct *ldt = smp_load_acquire(&mm->context.ldt);
86
87 if (likely(!ldt))
88 return false;
89
90 load_ldt_struct(ldt);
91 return true;
92 }
93 static inline bool load_ldt_if_present(void)
94 {
> 95 return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
96 }
97 #else
98 static inline bool load_mm_ldt_if_present(struct mm_struct *mm) { return false; }
99 static inline bool load_ldt_if_present(void) { return false; }
100 static inline void switch_ldt(struct mm_struct *prev, struct mm_struct *next)
101 {
102 DEBUG_LOCKS_WARN_ON(preemptible());
103 }
104 #endif
105
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40678 bytes --]
reply other threads:[~2021-09-30 3:23 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=202109301136.2nOT5ZW6-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@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