[xlnx:xlnx_rebase_v5.10 626/1760] drivers/fpga/fpga-mgr.c:451:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-a...
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: bf98c1493fb23bfd7e2678498b7e337ce2cd1d53
commit: 824faebe34d034969fc79852a2999fdc11c5cd33 [626/1760] fpga: Add
firmware store function
:::::: branch date: 14 hours ago
:::::: commit date: 3 months ago
config: x86_64-randconfig-c001-20210810 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project
d39ebdae674c8efc84ebe8dc32716ec353220530)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
-O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
#
https://github.com/Xilinx/linux-xlnx/commit/824faebe34d034969fc79852a2999...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.10
git checkout 824faebe34d034969fc79852a2999fdc11c5cd33
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~~~~~
mm/hugetlb.c:1900:9: note: Returning from 'alloc_surplus_huge_page'
page = alloc_surplus_huge_page(h, gfp_mask, nid, nodemask);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/hugetlb.c:1903:2: note: Returning null pointer (loaded from
'page'), which participates in a condition later
return page;
^~~~~~~~~~~
mm/hugetlb.c:2327:10: note: Returning from
'alloc_buddy_huge_page_with_mpol'
page = alloc_buddy_huge_page_with_mpol(h, vma, addr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/hugetlb.c:2328:8: note: 'page' is null
if (!page)
^~~~
mm/hugetlb.c:2328:3: note: Taking true branch
if (!page)
^
mm/hugetlb.c:2329:4: note: Control jumps to line 2373
goto out_uncharge_cgroup;
^
mm/hugetlb.c:2373:2: note: 3rd function call argument is an
uninitialized value
hugetlb_cgroup_uncharge_cgroup(idx, pages_per_huge_page(h),
h_cg);
^ ~~~~
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
fs/crypto/keysetup_v1.c:82:2: warning: Potential leak of memory
pointed to by 'req' [clang-analyzer-unix.Malloc]
crypto_free_skcipher(tfm);
^
fs/crypto/keysetup_v1.c:307:30: note: Left side of '&&' is false
if (key == ERR_PTR(-ENOKEY) &&
ci->ci_inode->i_sb->s_cop->key_prefix) {
^
fs/crypto/keysetup_v1.c:312:2: note: Taking false branch
if (IS_ERR(key))
^
fs/crypto/keysetup_v1.c:315:8: note: Calling 'fscrypt_setup_v1_file_key'
err = fscrypt_setup_v1_file_key(ci, payload->raw);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/crypto/keysetup_v1.c:292:6: note: Assuming the condition is false
if (ci->ci_policy.v1.flags & FSCRYPT_POLICY_FLAG_DIRECT_KEY)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/crypto/keysetup_v1.c:292:2: note: Taking false branch
if (ci->ci_policy.v1.flags & FSCRYPT_POLICY_FLAG_DIRECT_KEY)
^
fs/crypto/keysetup_v1.c:295:10: note: Calling
'setup_v1_file_key_derived'
return setup_v1_file_key_derived(ci, raw_master_key);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/crypto/keysetup_v1.c:276:6: note: Assuming 'derived_key' is non-null
if (!derived_key)
^~~~~~~~~~~~
fs/crypto/keysetup_v1.c:276:2: note: Taking false branch
if (!derived_key)
^
fs/crypto/keysetup_v1.c:279:8: note: Calling 'derive_key_aes'
err = derive_key_aes(raw_master_key, ci->ci_nonce,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/crypto/keysetup_v1.c:57:2: note: Taking false branch
if (IS_ERR(tfm)) {
^
fs/crypto/keysetup_v1.c:63:8: note: Calling 'skcipher_request_alloc'
req = skcipher_request_alloc(tfm, GFP_KERNEL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/crypto/skcipher.h:496:8: note: Memory is allocated
req = kmalloc(sizeof(struct skcipher_request) +
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/crypto/skcipher.h:499:6: note: Assuming 'req' is non-null
if (likely(req))
^
include/linux/compiler.h:77:38: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^~~~
include/crypto/skcipher.h:499:2: note: Taking true branch
if (likely(req))
^
fs/crypto/keysetup_v1.c:63:8: note: Returned allocated memory
req = skcipher_request_alloc(tfm, GFP_KERNEL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/crypto/keysetup_v1.c:64:7: note: 'req' is non-null
if (!req) {
^~~
fs/crypto/keysetup_v1.c:64:2: note: Taking false branch
if (!req) {
^
fs/crypto/keysetup_v1.c:72:6: note: Assuming 'res' is < 0
if (res < 0)
^~~~~~~
fs/crypto/keysetup_v1.c:72:2: note: Taking true branch
if (res < 0)
^
fs/crypto/keysetup_v1.c:73:3: note: Control jumps to line 81
goto out;
^
fs/crypto/keysetup_v1.c:82:2: note: Potential leak of memory pointed
to by 'req'
crypto_free_skcipher(tfm);
^
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
7 warnings generated.
>> drivers/fpga/fpga-mgr.c:451:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(image_name, buf);
^~~~~~
drivers/fpga/fpga-mgr.c:451:2: note: Call to function 'strcpy' is
insecure as it does not provide bounding of the memory buffer. Replace
unbounded copy functions with analogous functions that support length
arguments such as 'strlcpy'. CWE-119
strcpy(image_name, buf);
^~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
11 warnings generated.
drivers/fsi/fsi-core.c:719:4: warning: Value stored to 'rc' is never
read [clang-analyzer-deadcode.DeadStores]
rc = -EFAULT;
^ ~~~~~~~
drivers/fsi/fsi-core.c:719:4: note: Value stored to 'rc' is never read
rc = -EFAULT;
^ ~~~~~~~
drivers/fsi/fsi-core.c:724:2: warning: Value stored to 'rc' is never
read [clang-analyzer-deadcode.DeadStores]
rc = count;
^ ~~~~~
drivers/fsi/fsi-core.c:724:2: note: Value stored to 'rc' is never read
rc = count;
^ ~~~~~
drivers/fsi/fsi-core.c:753:4: warning: Value stored to 'rc' is never
read [clang-analyzer-deadcode.DeadStores]
rc = -EFAULT;
^ ~~~~~~~
drivers/fsi/fsi-core.c:753:4: note: Value stored to 'rc' is never read
rc = -EFAULT;
^ ~~~~~~~
drivers/fsi/fsi-core.c:761:2: warning: Value stored to 'rc' is never
read [clang-analyzer-deadcode.DeadStores]
rc = count;
^ ~~~~~
drivers/fsi/fsi-core.c:761:2: note: Value stored to 'rc' is never read
rc = count;
^ ~~~~~
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
8 warnings generated.
drivers/fsi/fsi-scom.c:356:17: warning: Value stored to 'dev' during
its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = &scom->fsi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~
drivers/fsi/fsi-scom.c:356:17: note: Value stored to 'dev' during
its initialization is never read
struct device *dev = &scom->fsi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~
drivers/fsi/fsi-scom.c:386:17: warning: Value stored to 'dev' during
its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = &scom->fsi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~
drivers/fsi/fsi-scom.c:386:17: note: Value stored to 'dev' during
its initialization is never read
struct device *dev = &scom->fsi_dev->dev;
^~~ ~~~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
18 warnings generated.
drivers/net/xen-netfront.c:105:8: warning: Excessive padding in
'struct netfront_queue' (96 padding bytes, where 32 is optimal).
Optimal fields order: xdp_rxq, rx_lock, info, xdp_prog,
page_pool, tx, rx, tx_lock, rx_refill_timer, napi,
tx_skbs, grant_tx_page, rx_skbs, id, tx_evtchn,
rx_evtchn, tx_irq, rx_irq, tx_ring_ref, gref_tx_head,
tx_skb_freelist, rx_ring_ref, gref_rx_head, grant_tx_ref,
grant_rx_ref, name, tx_irq_name, rx_irq_name, consider
reordering the fields or adding explicit padding members
[clang-analyzer-optin.performance.Padding]
struct netfront_queue {
~~~~~~~^~~~~~~~~~~~~~~~
drivers/net/xen-netfront.c:105:8: note: Excessive padding in 'struct
netfront_queue' (96 padding bytes, where 32 is optimal). Optimal fields
order: xdp_rxq, rx_lock, info, xdp_prog, page_pool, tx, rx, tx_lock,
rx_refill_timer, napi, tx_skbs, grant_tx_page, rx_skbs, id, tx_evtchn,
rx_evtchn, tx_irq, rx_irq, tx_ring_ref, gref_tx_head, tx_skb_freelist,
rx_ring_ref, gref_rx_head, grant_tx_ref, grant_rx_ref, name,
tx_irq_name, rx_irq_name, consider reordering the fields or adding
explicit padding members
struct netfront_queue {
~~~~~~~^~~~~~~~~~~~~~~~
drivers/net/xen-netfront.c:299:11: warning: Value stored to
'req_prod' during its initialization is never read
[clang-analyzer-deadcode.DeadStores]
RING_IDX req_prod = queue->rx.req_prod_pvt;
^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
drivers/net/xen-netfront.c:299:11: note: Value stored to 'req_prod'
during its initialization is never read
RING_IDX req_prod = queue->rx.req_prod_pvt;
vim +451 drivers/fpga/fpga-mgr.c
ecb5fbe299dfaa Wu Hao 2018-06-30 437 824faebe34d034 Michal Simek
2019-12-31 438 static ssize_t firmware_store(struct device *dev,
824faebe34d034 Michal Simek 2019-12-31 439 struct
device_attribute *attr,
824faebe34d034 Michal Simek 2019-12-31 440 const char *buf,
size_t count)
824faebe34d034 Michal Simek 2019-12-31 441 {
824faebe34d034 Michal Simek 2019-12-31 442 struct fpga_manager *mgr =
to_fpga_manager(dev);
824faebe34d034 Michal Simek 2019-12-31 443 unsigned int len;
824faebe34d034 Michal Simek 2019-12-31 444 char image_name[NAME_MAX];
824faebe34d034 Michal Simek 2019-12-31 445 int ret;
824faebe34d034 Michal Simek 2019-12-31 446 824faebe34d034 Michal Simek
2019-12-31 447 /* struct with information about the FPGA image to
program. */
824faebe34d034 Michal Simek 2019-12-31 448 struct fpga_image_info
info = {0};
824faebe34d034 Michal Simek 2019-12-31 449 824faebe34d034 Michal Simek
2019-12-31 450 /* lose terminating \n */
824faebe34d034 Michal Simek 2019-12-31 @451 strcpy(image_name, buf);
824faebe34d034 Michal Simek 2019-12-31 452 len = strlen(image_name);
824faebe34d034 Michal Simek 2019-12-31 453 if (image_name[len - 1] ==
'\n')
824faebe34d034 Michal Simek 2019-12-31 454 image_name[len - 1] = 0;
824faebe34d034 Michal Simek 2019-12-31 455 824faebe34d034 Michal Simek
2019-12-31 456 ret = fpga_mgr_firmware_load(mgr, &info, image_name);
824faebe34d034 Michal Simek 2019-12-31 457 if (ret)
824faebe34d034 Michal Simek 2019-12-31 458 return ret;
824faebe34d034 Michal Simek 2019-12-31 459 824faebe34d034 Michal Simek
2019-12-31 460 return count;
824faebe34d034 Michal Simek 2019-12-31 461 }
824faebe34d034 Michal Simek 2019-12-31 462
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[chrome-os:chromeos-4.19 7/9] arch/x86/include/asm/kvm_host.h:579:13: error: field 'user_fpu' has incomplete type
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 6e912d0ff604d23a34ef2b97db21c1e00be18da0
commit: fd9a4d32a26b88309fe68b292d38471785fec955 [7/9] BACKPORT: FROMLIST: x86/kvm: Add definitions for virtual suspend time injection
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.19
git checkout fd9a4d32a26b88309fe68b292d38471785fec955
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash kernel/time/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
49 | #define pgd_page_vaddr(pgd) (pud_page_vaddr((pud_t){ pgd }))
|
In file included from arch/x86/include/asm/pgtable_types.h:322,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:34,
from include/linux/kvm_host.h:40,
from kernel/time/timekeeping.c:29:
include/asm-generic/pgtable-nop4d.h:52: warning: "__p4d_free_tlb" redefined
52 | #define __p4d_free_tlb(tlb, x, a) do { } while (0)
|
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/memremap.h:7,
from include/linux/mm.h:27,
from kernel/time/timekeeping.c:16:
include/asm-generic/5level-fixup.h:38: note: this is the location of the previous definition
38 | #define __p4d_free_tlb(tlb, x, addr) do { } while (0)
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:34,
from include/linux/kvm_host.h:40,
from kernel/time/timekeeping.c:29:
arch/x86/include/asm/pgtable_types.h: In function 'native_make_pud':
arch/x86/include/asm/pgtable_types.h:352:20: error: 'pud_t' {aka 'struct <anonymous>'} has no member named 'p4d'; did you mean 'pgd'?
352 | return (pud_t) { .p4d.pgd = native_make_pgd(val) };
| ^~~
| pgd
arch/x86/include/asm/pgtable_types.h:352:30: error: incompatible types when initializing type 'long unsigned int' using type 'pgd_t' {aka 'struct <anonymous>'}
352 | return (pud_t) { .p4d.pgd = native_make_pgd(val) };
| ^~~~~~~~~~~~~~~
arch/x86/include/asm/pgtable_types.h: In function 'native_pud_val':
arch/x86/include/asm/pgtable_types.h:357:28: error: 'pud_t' {aka 'struct <anonymous>'} has no member named 'p4d'; did you mean 'pgd'?
357 | return native_pgd_val(pud.p4d.pgd);
| ^~~
| pgd
arch/x86/include/asm/pgtable_types.h:355:45: warning: parameter 'pud' set but not used [-Wunused-but-set-parameter]
355 | static inline pudval_t native_pud_val(pud_t pud)
| ~~~~~~^~~
arch/x86/include/asm/pgtable_types.h: At top level:
arch/x86/include/asm/pgtable_types.h:362:34: error: conflicting types for 'pmd_t'
362 | typedef struct { pmdval_t pmd; } pmd_t;
| ^~~~~
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:81,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/page.h:61:39: note: previous declaration of 'pmd_t' was here
61 | typedef struct { unsigned long pmd; } pmd_t;
| ^~~~~
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:34,
from include/linux/kvm_host.h:40,
from kernel/time/timekeeping.c:29:
arch/x86/include/asm/pgtable_types.h:516: warning: "pgprot_writecombine" redefined
516 | #define pgprot_writecombine pgprot_writecombine
|
In file included from arch/um/include/asm/pgtable.h:360,
from include/linux/memremap.h:7,
from include/linux/mm.h:27,
from kernel/time/timekeeping.c:16:
include/asm-generic/pgtable.h:467: note: this is the location of the previous definition
467 | #define pgprot_writecombine pgprot_noncached
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:34,
from include/linux/kvm_host.h:40,
from kernel/time/timekeeping.c:29:
arch/x86/include/asm/pgtable_types.h:519: warning: "pgprot_writethrough" redefined
519 | #define pgprot_writethrough pgprot_writethrough
|
In file included from arch/um/include/asm/pgtable.h:360,
from include/linux/memremap.h:7,
from include/linux/mm.h:27,
from kernel/time/timekeeping.c:16:
include/asm-generic/pgtable.h:471: note: this is the location of the previous definition
471 | #define pgprot_writethrough pgprot_noncached
|
In file included from include/linux/kvm_host.h:40,
from kernel/time/timekeeping.c:29:
arch/x86/include/asm/kvm_host.h:439:29: error: 'INTEL_PMC_MAX_GENERIC' undeclared here (not in a function)
439 | struct kvm_pmc gp_counters[INTEL_PMC_MAX_GENERIC];
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/kvm_host.h:440:32: error: 'INTEL_PMC_MAX_FIXED' undeclared here (not in a function)
440 | struct kvm_pmc fixed_counters[INTEL_PMC_MAX_FIXED];
| ^~~~~~~~~~~~~~~~~~~
>> arch/x86/include/asm/kvm_host.h:579:13: error: field 'user_fpu' has incomplete type
579 | struct fpu user_fpu;
| ^~~~~~~~
>> arch/x86/include/asm/kvm_host.h:580:13: error: field 'guest_fpu' has incomplete type
580 | struct fpu guest_fpu;
| ^~~~~~~~~
arch/x86/include/asm/kvm_host.h: In function 'read_msr':
arch/x86/include/asm/kvm_host.h:1415:2: error: implicit declaration of function 'rdmsrl' [-Werror=implicit-function-declaration]
1415 | rdmsrl(msr, value);
| ^~~~~~
arch/x86/include/asm/kvm_host.h: In function 'kvm_cpu_get_apicid':
arch/x86/include/asm/kvm_host.h:1563:9: error: 'BAD_APICID' undeclared (first use in this function)
1563 | return BAD_APICID;
| ^~~~~~~~~~
arch/x86/include/asm/kvm_host.h:1563:9: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +/user_fpu +579 arch/x86/include/asm/kvm_host.h
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 426
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 427 struct kvm_pmu {
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 428 unsigned nr_arch_gp_counters;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 429 unsigned nr_arch_fixed_counters;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 430 unsigned available_event_types;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 431 u64 fixed_ctr_ctrl;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 432 u64 global_ctrl;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 433 u64 global_status;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 434 u64 global_ovf_ctrl;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 435 u64 counter_bitmask[2];
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 436 u64 global_ctrl_mask;
103af0a9878859 arch/x86/include/asm/kvm_host.h Andi Kleen 2013-07-18 437 u64 reserved_bits;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 438 u8 version;
15c7ad51ad58cb arch/x86/include/asm/kvm_host.h Robert Richter 2012-06-20 @439 struct kvm_pmc gp_counters[INTEL_PMC_MAX_GENERIC];
15c7ad51ad58cb arch/x86/include/asm/kvm_host.h Robert Richter 2012-06-20 440 struct kvm_pmc fixed_counters[INTEL_PMC_MAX_FIXED];
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 441 struct irq_work irq_work;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 442 u64 reprogram_pmi;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 443 };
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 444
25462f7f5295e2 arch/x86/include/asm/kvm_host.h Wei Huang 2015-06-19 445 struct kvm_pmu_ops;
25462f7f5295e2 arch/x86/include/asm/kvm_host.h Wei Huang 2015-06-19 446
360b948d88bf30 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2014-02-21 447 enum {
360b948d88bf30 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2014-02-21 448 KVM_DEBUGREG_BP_ENABLED = 1,
c77fb5fe6f031b arch/x86/include/asm/kvm_host.h Paolo Bonzini 2014-02-21 449 KVM_DEBUGREG_WONT_EXIT = 2,
ae561edeb421fb arch/x86/include/asm/kvm_host.h Nadav Amit 2015-04-02 450 KVM_DEBUGREG_RELOAD = 4,
360b948d88bf30 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2014-02-21 451 };
360b948d88bf30 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2014-02-21 452
86fd52701cfae7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 453 struct kvm_mtrr_range {
86fd52701cfae7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 454 u64 base;
86fd52701cfae7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 455 u64 mask;
19efffa244071c arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 456 struct list_head node;
86fd52701cfae7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 457 };
86fd52701cfae7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 458
70109e7d9d4ac7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 459 struct kvm_mtrr {
86fd52701cfae7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 460 struct kvm_mtrr_range var_ranges[KVM_NR_VAR_MTRR];
70109e7d9d4ac7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 461 mtrr_type fixed_ranges[KVM_NR_FIXED_MTRR_REGION];
10fac2dc2b3b54 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 462 u64 deftype;
19efffa244071c arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 463
19efffa244071c arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 464 struct list_head head;
70109e7d9d4ac7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 465 };
70109e7d9d4ac7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 466
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 467 /* Hyper-V SynIC timer */
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 468 struct kvm_vcpu_hv_stimer {
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 469 struct hrtimer timer;
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 470 int index;
3b14b5f77d9468 arch/x86/include/asm/kvm_host.h Vitaly Kuznetsov 2018-11-26 471 union hv_stimer_config config;
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 472 u64 count;
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 473 u64 exp_time;
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 474 struct hv_message msg;
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 475 bool msg_pending;
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 476 };
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 477
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 478 /* Hyper-V synthetic interrupt controller (SynIC)*/
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 479 struct kvm_vcpu_hv_synic {
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 480 u64 version;
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 481 u64 control;
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 482 u64 msg_page;
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 483 u64 evt_page;
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 484 atomic64_t sint[HV_SYNIC_SINT_COUNT];
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 485 atomic_t sint_to_gsi[HV_SYNIC_SINT_COUNT];
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 486 DECLARE_BITMAP(auto_eoi_bitmap, 256);
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 487 DECLARE_BITMAP(vec_bitmap, 256);
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 488 bool active;
efc479e6900c22 arch/x86/include/asm/kvm_host.h Roman Kagan 2017-06-22 489 bool dont_zero_synic_pages;
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 490 };
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 491
e83d58874ba1de arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-07-03 492 /* Hyper-V per vcpu emulation context */
e83d58874ba1de arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-07-03 493 struct kvm_vcpu_hv {
d3457c877b14aa arch/x86/include/asm/kvm_host.h Roman Kagan 2017-07-14 494 u32 vp_index;
e83d58874ba1de arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-07-03 495 u64 hv_vapic;
9eec50b8bbe153 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-09-16 496 s64 runtime_offset;
5c919412fe61c3 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 497 struct kvm_vcpu_hv_synic synic;
db3975717ac5e2 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 498 struct kvm_hyperv_exit exit;
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 499 struct kvm_vcpu_hv_stimer stimer[HV_SYNIC_STIMER_COUNT];
1f4b34f825e8ce arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-30 500 DECLARE_BITMAP(stimer_pending_bitmap, HV_SYNIC_STIMER_COUNT);
e2f11f42824bf2 arch/x86/include/asm/kvm_host.h Vitaly Kuznetsov 2018-05-16 501 cpumask_t tlb_lush;
e83d58874ba1de arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-07-03 502 };
e83d58874ba1de arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-07-03 503
ad312c7c79f781 drivers/kvm/x86.h Zhang Xiantao 2007-12-13 504 struct kvm_vcpu_arch {
5fdbf9765b7ba6 include/asm-x86/kvm_host.h Marcelo Tosatti 2008-06-27 505 /*
5fdbf9765b7ba6 include/asm-x86/kvm_host.h Marcelo Tosatti 2008-06-27 506 * rip and regs accesses must go through
5fdbf9765b7ba6 include/asm-x86/kvm_host.h Marcelo Tosatti 2008-06-27 507 * kvm_{register,rip}_{read,write} functions.
5fdbf9765b7ba6 include/asm-x86/kvm_host.h Marcelo Tosatti 2008-06-27 508 */
5fdbf9765b7ba6 include/asm-x86/kvm_host.h Marcelo Tosatti 2008-06-27 509 unsigned long regs[NR_VCPU_REGS];
5fdbf9765b7ba6 include/asm-x86/kvm_host.h Marcelo Tosatti 2008-06-27 510 u32 regs_avail;
5fdbf9765b7ba6 include/asm-x86/kvm_host.h Marcelo Tosatti 2008-06-27 511 u32 regs_dirty;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 512
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 513 unsigned long cr0;
e8467fda83cdc9 arch/x86/include/asm/kvm_host.h Avi Kivity 2009-12-29 514 unsigned long cr0_guest_owned_bits;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 515 unsigned long cr2;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 516 unsigned long cr3;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 517 unsigned long cr4;
fc78f51938e1ea arch/x86/include/asm/kvm_host.h Avi Kivity 2009-12-07 518 unsigned long cr4_guest_owned_bits;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 519 unsigned long cr8;
b9dd21e104bcd4 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2017-08-23 520 u32 pkru;
1371d90460189d arch/x86/include/asm/kvm_host.h Alexander Graf 2008-11-25 521 u32 hflags;
f6801dff23bd19 arch/x86/include/asm/kvm_host.h Avi Kivity 2010-01-21 522 u64 efer;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 523 u64 apic_base;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 524 struct kvm_lapic *apic; /* kernel irqchip context */
d62caabb41f33d arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 525 bool apicv_active;
e40ff1d6608dd9 arch/x86/include/asm/kvm_host.h Liran Alon 2018-03-21 526 bool load_eoi_exitmap_pending;
6308630bd3dbb6 arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-11-10 527 DECLARE_BITMAP(ioapic_handled_vectors, 256);
413837714232b3 arch/x86/include/asm/kvm_host.h Gleb Natapov 2012-04-19 528 unsigned long apic_attention;
e1035715ef8d31 arch/x86/include/asm/kvm_host.h Gleb Natapov 2009-03-05 529 int32_t apic_arb_prio;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 530 int mp_state;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 531 u64 ia32_misc_enable_msr;
64d6067057d965 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2015-05-07 532 u64 smbase;
52797bf9a875c4 arch/x86/include/asm/kvm_host.h Liran Alon 2017-11-15 533 u64 smi_count;
b209749f528488 include/asm-x86/kvm_host.h Avi Kivity 2007-10-22 534 bool tpr_access_reporting;
203000993de509 arch/x86/include/asm/kvm_host.h Wanpeng Li 2014-12-02 535 u64 ia32_xss;
518e7b94817abe arch/x86/include/asm/kvm_host.h Wanpeng Li 2018-02-28 536 u64 microcode_version;
3a18eabaa71231 arch/x86/include/asm/kvm_host.h Sean Christopherson 2019-03-07 537 u64 arch_capabilities;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 538
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 539 /*
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 540 * Paging state of the vcpu
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 541 *
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 542 * If the vcpu runs in guest mode with two level paging this still saves
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 543 * the paging mode of the l1 guest. This context is always used to
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 544 * handle faults.
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 545 */
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 546 struct kvm_mmu mmu;
8df25a328a6ca3 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 547
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 548 /*
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 549 * Paging state of an L2 guest (used for nested npt)
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 550 *
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 551 * This context will save all necessary information to walk page tables
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 552 * of the an L2 guest. This context is only initialized for page table
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 553 * walking and not for faulting since we never handle l2 page faults on
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 554 * the host.
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 555 */
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 556 struct kvm_mmu nested_mmu;
6539e738f65a8f arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 557
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 558 /*
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 559 * Pointer to the mmu context currently used for
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 560 * gva_to_gpa translations.
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 561 */
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 562 struct kvm_mmu *walk_mmu;
14dfe855f97818 arch/x86/include/asm/kvm_host.h Joerg Roedel 2010-09-10 563
53c07b18787d56 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2011-05-15 564 struct kvm_mmu_memory_cache mmu_pte_list_desc_cache;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 565 struct kvm_mmu_memory_cache mmu_page_cache;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 566 struct kvm_mmu_memory_cache mmu_page_header_cache;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 567
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 568 /*
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 569 * QEMU userspace and the guest each have their own FPU state.
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 570 * In vcpu_run, we switch between the user and guest FPU contexts.
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 571 * While running a VCPU, the VCPU thread will have the guest FPU
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 572 * context.
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 573 *
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 574 * Note that while the PKRU state lives inside the fpu registers,
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 575 * it is switched out separately at VMENTER and VMEXIT time. The
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 576 * "guest_fpu" state here contains the guest FPU context, with the
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 577 * host PRKU bits.
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 578 */
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 @579 struct fpu user_fpu;
98918833a3e21f arch/x86/include/asm/kvm_host.h Sheng Yang 2010-05-17 @580 struct fpu guest_fpu;
f775b13eedee2f arch/x86/include/asm/kvm_host.h Rik van Riel 2017-11-14 581
2acf923e38fb6a arch/x86/include/asm/kvm_host.h Dexuan Cui 2010-06-10 582 u64 xcr0;
d7876f1be40a16 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2013-10-02 583 u64 guest_supported_xcr0;
4344ee981e2199 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2013-10-02 584 u32 guest_xstate_size;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 585
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 586 struct kvm_pio_request pio;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 587 void *pio_data;
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 588
66fd3f7f901f29 arch/x86/include/asm/kvm_host.h Gleb Natapov 2009-05-11 589 u8 event_exit_inst_len;
66fd3f7f901f29 arch/x86/include/asm/kvm_host.h Gleb Natapov 2009-05-11 590
298101da2f507c drivers/kvm/x86.h Avi Kivity 2007-11-25 591 struct kvm_queued_exception {
298101da2f507c drivers/kvm/x86.h Avi Kivity 2007-11-25 592 bool pending;
664f8e26b00c76 arch/x86/include/asm/kvm_host.h Wanpeng Li 2017-08-24 593 bool injected;
298101da2f507c drivers/kvm/x86.h Avi Kivity 2007-11-25 594 bool has_error_code;
298101da2f507c drivers/kvm/x86.h Avi Kivity 2007-11-25 595 u8 nr;
298101da2f507c drivers/kvm/x86.h Avi Kivity 2007-11-25 596 u32 error_code;
adfe20fb48785d arch/x86/include/asm/kvm_host.h Wanpeng Li 2017-07-13 597 u8 nested_apf;
298101da2f507c drivers/kvm/x86.h Avi Kivity 2007-11-25 598 } exception;
298101da2f507c drivers/kvm/x86.h Avi Kivity 2007-11-25 599
937a7eaef9f083 include/asm-x86/kvm_host.h Avi Kivity 2008-07-03 600 struct kvm_queued_interrupt {
04140b4144cd88 arch/x86/include/asm/kvm_host.h Liran Alon 2018-03-23 601 bool injected;
66fd3f7f901f29 arch/x86/include/asm/kvm_host.h Gleb Natapov 2009-05-11 602 bool soft;
937a7eaef9f083 include/asm-x86/kvm_host.h Avi Kivity 2008-07-03 603 u8 nr;
937a7eaef9f083 include/asm-x86/kvm_host.h Avi Kivity 2008-07-03 604 } interrupt;
937a7eaef9f083 include/asm-x86/kvm_host.h Avi Kivity 2008-07-03 605
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 606 int halt_request; /* real mode on Intel only */
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 607
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 608 int cpuid_nent;
0771671749b59a drivers/kvm/x86.h Dan Kenigsberg 2007-11-21 609 struct kvm_cpuid_entry2 cpuid_entries[KVM_MAX_CPUID_ENTRIES];
5a4f55cde81f16 arch/x86/include/asm/kvm_host.h Eugene Korenevsky 2015-03-29 610
5a4f55cde81f16 arch/x86/include/asm/kvm_host.h Eugene Korenevsky 2015-03-29 611 int maxphyaddr;
5a4f55cde81f16 arch/x86/include/asm/kvm_host.h Eugene Korenevsky 2015-03-29 612
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 613 /* emulate context */
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 614
34c16eecf78ed4 drivers/kvm/x86.h Zhang Xiantao 2007-10-20 615 struct x86_emulate_ctxt emulate_ctxt;
7ae441eac521b2 arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-03-31 616 bool emulate_regs_need_sync_to_vcpu;
7ae441eac521b2 arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-03-31 617 bool emulate_regs_need_sync_from_vcpu;
716d51abff06f4 arch/x86/include/asm/kvm_host.h Gleb Natapov 2012-09-03 618 int (*complete_userspace_io)(struct kvm_vcpu *vcpu);
18068523d3a0b4 include/asm-x86/kvm_host.h Glauber de Oliveira Costa 2008-02-15 619
18068523d3a0b4 include/asm-x86/kvm_host.h Glauber de Oliveira Costa 2008-02-15 620 gpa_t time;
50d0a0f987b83a include/asm-x86/kvm_host.h Gerd Hoffmann 2008-06-03 621 struct pvclock_vcpu_time_info hv_clock;
e48672fa25e879 arch/x86/include/asm/kvm_host.h Zachary Amsden 2010-08-19 622 unsigned int hw_tsc_khz;
0b79459b482e85 arch/x86/include/asm/kvm_host.h Andy Honig 2013-02-20 623 struct gfn_to_hva_cache pv_time;
0b79459b482e85 arch/x86/include/asm/kvm_host.h Andy Honig 2013-02-20 624 bool pv_time_enabled;
51d59c6b422f3f arch/x86/include/asm/kvm_host.h Marcelo Tosatti 2012-08-03 625 /* set guest stopped flag in pvclock flags field */
51d59c6b422f3f arch/x86/include/asm/kvm_host.h Marcelo Tosatti 2012-08-03 626 bool pvclock_set_guest_stopped_request;
c9aaa8957f203b arch/x86/include/asm/kvm_host.h Glauber Costa 2011-07-11 627
c9aaa8957f203b arch/x86/include/asm/kvm_host.h Glauber Costa 2011-07-11 628 struct {
c434092ef8172e arch/x86/include/asm/kvm_host.h Boris Ostrovsky 2019-12-06 629 u8 preempted;
c9aaa8957f203b arch/x86/include/asm/kvm_host.h Glauber Costa 2011-07-11 630 u64 msr_val;
c9aaa8957f203b arch/x86/include/asm/kvm_host.h Glauber Costa 2011-07-11 631 u64 last_steal;
ccfc73e56da7c8 arch/x86/include/asm/kvm_host.h Boris Ostrovsky 2019-12-05 632 struct gfn_to_pfn_cache cache;
c9aaa8957f203b arch/x86/include/asm/kvm_host.h Glauber Costa 2011-07-11 633 } st;
c9aaa8957f203b arch/x86/include/asm/kvm_host.h Glauber Costa 2011-07-11 634
a545ab6a0085e6 arch/x86/include/asm/kvm_host.h Luiz Capitulino 2016-09-07 635 u64 tsc_offset;
1d5f066e0b6327 arch/x86/include/asm/kvm_host.h Zachary Amsden 2010-08-19 636 u64 last_guest_tsc;
6f526ec5383dcd arch/x86/include/asm/kvm_host.h Zachary Amsden 2012-02-03 637 u64 last_host_tsc;
0dd6a6edb0124e arch/x86/include/asm/kvm_host.h Zachary Amsden 2012-02-03 638 u64 tsc_offset_adjustment;
e26101b116a623 arch/x86/include/asm/kvm_host.h Zachary Amsden 2012-02-03 639 u64 this_tsc_nsec;
e26101b116a623 arch/x86/include/asm/kvm_host.h Zachary Amsden 2012-02-03 640 u64 this_tsc_write;
0d3da0d26e3c35 arch/x86/include/asm/kvm_host.h Tomasz Grabiec 2014-06-24 641 u64 this_tsc_generation;
c285545f813d7b arch/x86/include/asm/kvm_host.h Zachary Amsden 2010-09-18 642 bool tsc_catchup;
cc578287e3224d arch/x86/include/asm/kvm_host.h Zachary Amsden 2012-02-03 643 bool tsc_always_catchup;
cc578287e3224d arch/x86/include/asm/kvm_host.h Zachary Amsden 2012-02-03 644 s8 virtual_tsc_shift;
cc578287e3224d arch/x86/include/asm/kvm_host.h Zachary Amsden 2012-02-03 645 u32 virtual_tsc_mult;
cc578287e3224d arch/x86/include/asm/kvm_host.h Zachary Amsden 2012-02-03 646 u32 virtual_tsc_khz;
ba904635d498fe arch/x86/include/asm/kvm_host.h Will Auld 2012-11-29 647 s64 ia32_tsc_adjust_msr;
ad721883e9c5f4 arch/x86/include/asm/kvm_host.h Haozhong Zhang 2015-10-20 648 u64 tsc_scaling_ratio;
3419ffc8e45a53 include/asm-x86/kvm_host.h Sheng Yang 2008-05-15 649
7460fb4a340033 arch/x86/include/asm/kvm_host.h Avi Kivity 2011-09-20 650 atomic_t nmi_queued; /* unprocessed asynchronous NMIs */
7460fb4a340033 arch/x86/include/asm/kvm_host.h Avi Kivity 2011-09-20 651 unsigned nmi_pending; /* NMI queued after currently running handler */
7460fb4a340033 arch/x86/include/asm/kvm_host.h Avi Kivity 2011-09-20 652 bool nmi_injected; /* Trying to inject an NMI this entry */
f077825a8758d7 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2015-04-01 653 bool smi_pending; /* SMI queued after currently running handler */
9ba075a664dff8 include/asm-x86/kvm_host.h Avi Kivity 2008-05-26 654
70109e7d9d4ac7 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2015-06-15 655 struct kvm_mtrr mtrr_state;
7cb060a91c0efc arch/x86/include/asm/kvm_host.h Paolo Bonzini 2014-06-19 656 u64 pat;
42dbaa5a057736 arch/x86/include/asm/kvm_host.h Jan Kiszka 2008-12-15 657
360b948d88bf30 arch/x86/include/asm/kvm_host.h Paolo Bonzini 2014-02-21 658 unsigned switch_db_regs;
42dbaa5a057736 arch/x86/include/asm/kvm_host.h Jan Kiszka 2008-12-15 659 unsigned long db[KVM_NR_DB_REGS];
42dbaa5a057736 arch/x86/include/asm/kvm_host.h Jan Kiszka 2008-12-15 660 unsigned long dr6;
42dbaa5a057736 arch/x86/include/asm/kvm_host.h Jan Kiszka 2008-12-15 661 unsigned long dr7;
42dbaa5a057736 arch/x86/include/asm/kvm_host.h Jan Kiszka 2008-12-15 662 unsigned long eff_db[KVM_NR_DB_REGS];
c863901075a42d arch/x86/include/asm/kvm_host.h Jan Kiszka 2012-09-21 663 unsigned long guest_debug_dr7;
db2336a80489e7 arch/x86/include/asm/kvm_host.h Kyle Huey 2017-03-20 664 u64 msr_platform_info;
db2336a80489e7 arch/x86/include/asm/kvm_host.h Kyle Huey 2017-03-20 665 u64 msr_misc_features_enables;
890ca9aefa78f7 arch/x86/include/asm/kvm_host.h Huang Ying 2009-05-11 666
890ca9aefa78f7 arch/x86/include/asm/kvm_host.h Huang Ying 2009-05-11 667 u64 mcg_cap;
890ca9aefa78f7 arch/x86/include/asm/kvm_host.h Huang Ying 2009-05-11 668 u64 mcg_status;
890ca9aefa78f7 arch/x86/include/asm/kvm_host.h Huang Ying 2009-05-11 669 u64 mcg_ctl;
c45dcc71b794b5 arch/x86/include/asm/kvm_host.h Ashok Raj 2016-06-22 670 u64 mcg_ext_ctl;
890ca9aefa78f7 arch/x86/include/asm/kvm_host.h Huang Ying 2009-05-11 671 u64 *mce_banks;
94fe45da48f921 arch/x86/include/asm/kvm_host.h Jan Kiszka 2009-10-18 672
bebb106a5afa32 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2011-07-12 673 /* Cache MMIO info */
bebb106a5afa32 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2011-07-12 674 u64 mmio_gva;
bebb106a5afa32 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2011-07-12 675 unsigned access;
bebb106a5afa32 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2011-07-12 676 gfn_t mmio_gfn;
56f17dd3fbc44a arch/x86/include/asm/kvm_host.h David Matlack 2014-08-18 677 u64 mmio_gen;
bebb106a5afa32 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2011-07-12 678
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 679 struct kvm_pmu pmu;
f5132b01386b5a arch/x86/include/asm/kvm_host.h Gleb Natapov 2011-11-10 680
94fe45da48f921 arch/x86/include/asm/kvm_host.h Jan Kiszka 2009-10-18 681 /* used for guest single stepping over the given code position */
94fe45da48f921 arch/x86/include/asm/kvm_host.h Jan Kiszka 2009-10-18 682 unsigned long singlestep_rip;
f92653eeb496fe arch/x86/include/asm/kvm_host.h Jan Kiszka 2010-02-23 683
e83d58874ba1de arch/x86/include/asm/kvm_host.h Andrey Smetanin 2015-07-03 684 struct kvm_vcpu_hv hyperv;
f5f48ee15c2ee3 arch/x86/include/asm/kvm_host.h Sheng Yang 2010-06-30 685
f5f48ee15c2ee3 arch/x86/include/asm/kvm_host.h Sheng Yang 2010-06-30 686 cpumask_var_t wbinvd_dirty_mask;
af585b921e5d1e arch/x86/include/asm/kvm_host.h Gleb Natapov 2010-10-14 687
1cb3f3ae5a3855 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2011-09-22 688 unsigned long last_retry_eip;
1cb3f3ae5a3855 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2011-09-22 689 unsigned long last_retry_addr;
1cb3f3ae5a3855 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2011-09-22 690
af585b921e5d1e arch/x86/include/asm/kvm_host.h Gleb Natapov 2010-10-14 691 struct {
af585b921e5d1e arch/x86/include/asm/kvm_host.h Gleb Natapov 2010-10-14 692 bool halted;
af585b921e5d1e arch/x86/include/asm/kvm_host.h Gleb Natapov 2010-10-14 693 gfn_t gfns[roundup_pow_of_two(ASYNC_PF_PER_VCPU)];
344d9588a9df06 arch/x86/include/asm/kvm_host.h Gleb Natapov 2010-10-14 694 struct gfn_to_hva_cache data;
344d9588a9df06 arch/x86/include/asm/kvm_host.h Gleb Natapov 2010-10-14 695 u64 msr_val;
7c90705bf2a373 arch/x86/include/asm/kvm_host.h Gleb Natapov 2010-10-14 696 u32 id;
6adba527420651 arch/x86/include/asm/kvm_host.h Gleb Natapov 2010-10-14 697 bool send_user_only;
1261bfa326f5e9 arch/x86/include/asm/kvm_host.h Wanpeng Li 2017-07-13 698 u32 host_apf_reason;
adfe20fb48785d arch/x86/include/asm/kvm_host.h Wanpeng Li 2017-07-13 699 unsigned long nested_apf_token;
52a5c155cf79f1 arch/x86/include/asm/kvm_host.h Wanpeng Li 2017-07-13 700 bool delivery_as_pf_vmexit;
af585b921e5d1e arch/x86/include/asm/kvm_host.h Gleb Natapov 2010-10-14 701 } apf;
2b036c6b861dc5 arch/x86/include/asm/kvm_host.h Boris Ostrovsky 2012-01-09 702
2b036c6b861dc5 arch/x86/include/asm/kvm_host.h Boris Ostrovsky 2012-01-09 703 /* OSVW MSRs (AMD only) */
2b036c6b861dc5 arch/x86/include/asm/kvm_host.h Boris Ostrovsky 2012-01-09 704 struct {
2b036c6b861dc5 arch/x86/include/asm/kvm_host.h Boris Ostrovsky 2012-01-09 705 u64 length;
2b036c6b861dc5 arch/x86/include/asm/kvm_host.h Boris Ostrovsky 2012-01-09 706 u64 status;
2b036c6b861dc5 arch/x86/include/asm/kvm_host.h Boris Ostrovsky 2012-01-09 707 } osvw;
ae7a2a3fb6f8b7 arch/x86/include/asm/kvm_host.h Michael S. Tsirkin 2012-06-24 708
ae7a2a3fb6f8b7 arch/x86/include/asm/kvm_host.h Michael S. Tsirkin 2012-06-24 709 struct {
ae7a2a3fb6f8b7 arch/x86/include/asm/kvm_host.h Michael S. Tsirkin 2012-06-24 710 u64 msr_val;
ae7a2a3fb6f8b7 arch/x86/include/asm/kvm_host.h Michael S. Tsirkin 2012-06-24 711 struct gfn_to_hva_cache data;
ae7a2a3fb6f8b7 arch/x86/include/asm/kvm_host.h Michael S. Tsirkin 2012-06-24 712 } pv_eoi;
93c05d3ef25275 arch/x86/include/asm/kvm_host.h Xiao Guangrong 2013-01-13 713
2cd3f941867572 arch/x86/include/asm/kvm_host.h Suleiman Souhlal 2021-07-28 714 u64 msr_kvm_poll_control;
2cd3f941867572 arch/x86/include/asm/kvm_host.h Suleiman Souhlal 2021-07-28 715
:::::: The code at line 579 was first introduced by commit
:::::: f775b13eedee2f7f3c6fdd4e90fb79090ce5d339 x86,kvm: move qemu/guest FPU switching out to vcpu_run
:::::: TO: Rik van Riel <riel(a)redhat.com>
:::::: CC: Radim Krčmář <rkrcmar(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
arch/nds32/kernel/ftrace.c:29:29: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *)' to 'void (*)(struct ftrace_graph_ret *)'
by kernel test robot
Hi Steven,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
commit: d19ad0775dcd64b49eecf4fa79c17959ebfbd26b ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs
date: 9 months ago
config: nds32-randconfig-r001-20210813 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d19ad0775dcd64b49eecf4fa79c17959ebfbd26b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/nds32/kernel/ftrace.c: In function '_mcount':
arch/nds32/kernel/ftrace.c:24:28: warning: comparison of distinct pointer types lacks a cast
24 | if (ftrace_trace_function != ftrace_stub)
| ^~
>> arch/nds32/kernel/ftrace.c:29:29: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *)' to 'void (*)(struct ftrace_graph_ret *)' [-Wcast-function-type]
29 | if (ftrace_graph_return != (trace_func_graph_ret_t)ftrace_stub
| ^
arch/nds32/kernel/ftrace.c: At top level:
arch/nds32/kernel/ftrace.c:198:6: warning: no previous prototype for 'prepare_ftrace_return' [-Wmissing-prototypes]
198 | void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
| ^~~~~~~~~~~~~~~~~~~~~
vim +29 arch/nds32/kernel/ftrace.c
a18082575c6648 Zong Li 2018-08-15 17
a18082575c6648 Zong Li 2018-08-15 18 noinline void _mcount(unsigned long parent_ip)
a18082575c6648 Zong Li 2018-08-15 19 {
a18082575c6648 Zong Li 2018-08-15 20 /* save all state by the compiler prologue */
a18082575c6648 Zong Li 2018-08-15 21
a18082575c6648 Zong Li 2018-08-15 22 unsigned long ip = (unsigned long)__builtin_return_address(0);
a18082575c6648 Zong Li 2018-08-15 23
a18082575c6648 Zong Li 2018-08-15 @24 if (ftrace_trace_function != ftrace_stub)
a18082575c6648 Zong Li 2018-08-15 25 ftrace_trace_function(ip - MCOUNT_INSN_SIZE, parent_ip,
a18082575c6648 Zong Li 2018-08-15 26 NULL, NULL);
a18082575c6648 Zong Li 2018-08-15 27
1e9b14c0d92b61 Zong Li 2018-08-15 28 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
1e9b14c0d92b61 Zong Li 2018-08-15 @29 if (ftrace_graph_return != (trace_func_graph_ret_t)ftrace_stub
1e9b14c0d92b61 Zong Li 2018-08-15 30 || ftrace_graph_entry != ftrace_graph_entry_stub)
1e9b14c0d92b61 Zong Li 2018-08-15 31 ftrace_graph_caller();
1e9b14c0d92b61 Zong Li 2018-08-15 32 #endif
1e9b14c0d92b61 Zong Li 2018-08-15 33
a18082575c6648 Zong Li 2018-08-15 34 /* restore all state by the compiler epilogue */
a18082575c6648 Zong Li 2018-08-15 35 }
a18082575c6648 Zong Li 2018-08-15 36 EXPORT_SYMBOL(_mcount);
1e9b14c0d92b61 Zong Li 2018-08-15 37
:::::: The code at line 29 was first introduced by commit
:::::: 1e9b14c0d92b61a0979fd5ee24d5e7f080f11030 nds32/ftrace: Support static function graph tracer
:::::: TO: Zong Li <zong(a)andestech.com>
:::::: CC: Greentime Hu <greentime(a)andestech.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH] raid1: ensure bio doesn't have more than BIO_MAX_VECS sectors
by kernel test robot
Hi Guoqing,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on song-md/md-next]
[also build test ERROR on v5.14-rc5 next-20210812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Guoqing-Jiang/raid1-ensure-bio-d...
base: git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git md-next
config: nds32-randconfig-r035-20210813 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/29b7720a83de1deea0d8ecfafe0db4614...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Guoqing-Jiang/raid1-ensure-bio-doesn-t-have-more-than-BIO_MAX_VECS-sectors/20210813-140810
git checkout 29b7720a83de1deea0d8ecfafe0db46146636b15
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/md/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:15,
from include/asm-generic/bug.h:20,
from ./arch/nds32/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/md/raid1.c:26:
drivers/md/raid1.c: In function 'raid1_write_request':
>> drivers/md/raid1.c:1459:55: error: 'PAGE_SECTORS' undeclared (first use in this function); did you mean 'PAGE_MEMORY'?
1459 | max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
| ^~~~~~~~~~~~
include/linux/minmax.h:20:39: note: in definition of macro '__typecheck'
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/minmax.h:36:24: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:104:27: note: in expansion of macro '__careful_cmp'
104 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/md/raid1.c:1459:16: note: in expansion of macro 'min_t'
1459 | max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
| ^~~~~
drivers/md/raid1.c:1459:55: note: each undeclared identifier is reported only once for each function it appears in
1459 | max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
| ^~~~~~~~~~~~
include/linux/minmax.h:20:39: note: in definition of macro '__typecheck'
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/minmax.h:36:24: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:104:27: note: in expansion of macro '__careful_cmp'
104 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/md/raid1.c:1459:16: note: in expansion of macro 'min_t'
1459 | max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
| ^~~~~
>> include/linux/minmax.h:36:2: error: first argument to '__builtin_choose_expr' not a constant
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:104:27: note: in expansion of macro '__careful_cmp'
104 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/md/raid1.c:1459:16: note: in expansion of macro 'min_t'
1459 | max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
| ^~~~~
vim +1459 drivers/md/raid1.c
1320
1321 static void raid1_write_request(struct mddev *mddev, struct bio *bio,
1322 int max_write_sectors)
1323 {
1324 struct r1conf *conf = mddev->private;
1325 struct r1bio *r1_bio;
1326 int i, disks;
1327 struct bitmap *bitmap = mddev->bitmap;
1328 unsigned long flags;
1329 struct md_rdev *blocked_rdev;
1330 struct blk_plug_cb *cb;
1331 struct raid1_plug_cb *plug = NULL;
1332 int first_clone;
1333 int max_sectors;
1334
1335 if (mddev_is_clustered(mddev) &&
1336 md_cluster_ops->area_resyncing(mddev, WRITE,
1337 bio->bi_iter.bi_sector, bio_end_sector(bio))) {
1338
1339 DEFINE_WAIT(w);
1340 for (;;) {
1341 prepare_to_wait(&conf->wait_barrier,
1342 &w, TASK_IDLE);
1343 if (!md_cluster_ops->area_resyncing(mddev, WRITE,
1344 bio->bi_iter.bi_sector,
1345 bio_end_sector(bio)))
1346 break;
1347 schedule();
1348 }
1349 finish_wait(&conf->wait_barrier, &w);
1350 }
1351
1352 /*
1353 * Register the new request and wait if the reconstruction
1354 * thread has put up a bar for new requests.
1355 * Continue immediately if no resync is active currently.
1356 */
1357 wait_barrier(conf, bio->bi_iter.bi_sector);
1358
1359 r1_bio = alloc_r1bio(mddev, bio);
1360 r1_bio->sectors = max_write_sectors;
1361
1362 if (conf->pending_count >= max_queued_requests) {
1363 md_wakeup_thread(mddev->thread);
1364 raid1_log(mddev, "wait queued");
1365 wait_event(conf->wait_barrier,
1366 conf->pending_count < max_queued_requests);
1367 }
1368 /* first select target devices under rcu_lock and
1369 * inc refcount on their rdev. Record them by setting
1370 * bios[x] to bio
1371 * If there are known/acknowledged bad blocks on any device on
1372 * which we have seen a write error, we want to avoid writing those
1373 * blocks.
1374 * This potentially requires several writes to write around
1375 * the bad blocks. Each set of writes gets it's own r1bio
1376 * with a set of bios attached.
1377 */
1378
1379 disks = conf->raid_disks * 2;
1380 retry_write:
1381 blocked_rdev = NULL;
1382 rcu_read_lock();
1383 max_sectors = r1_bio->sectors;
1384 for (i = 0; i < disks; i++) {
1385 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev);
1386 if (rdev && unlikely(test_bit(Blocked, &rdev->flags))) {
1387 atomic_inc(&rdev->nr_pending);
1388 blocked_rdev = rdev;
1389 break;
1390 }
1391 r1_bio->bios[i] = NULL;
1392 if (!rdev || test_bit(Faulty, &rdev->flags)) {
1393 if (i < conf->raid_disks)
1394 set_bit(R1BIO_Degraded, &r1_bio->state);
1395 continue;
1396 }
1397
1398 atomic_inc(&rdev->nr_pending);
1399 if (test_bit(WriteErrorSeen, &rdev->flags)) {
1400 sector_t first_bad;
1401 int bad_sectors;
1402 int is_bad;
1403
1404 is_bad = is_badblock(rdev, r1_bio->sector, max_sectors,
1405 &first_bad, &bad_sectors);
1406 if (is_bad < 0) {
1407 /* mustn't write here until the bad block is
1408 * acknowledged*/
1409 set_bit(BlockedBadBlocks, &rdev->flags);
1410 blocked_rdev = rdev;
1411 break;
1412 }
1413 if (is_bad && first_bad <= r1_bio->sector) {
1414 /* Cannot write here at all */
1415 bad_sectors -= (r1_bio->sector - first_bad);
1416 if (bad_sectors < max_sectors)
1417 /* mustn't write more than bad_sectors
1418 * to other devices yet
1419 */
1420 max_sectors = bad_sectors;
1421 rdev_dec_pending(rdev, mddev);
1422 /* We don't set R1BIO_Degraded as that
1423 * only applies if the disk is
1424 * missing, so it might be re-added,
1425 * and we want to know to recover this
1426 * chunk.
1427 * In this case the device is here,
1428 * and the fact that this chunk is not
1429 * in-sync is recorded in the bad
1430 * block log
1431 */
1432 continue;
1433 }
1434 if (is_bad) {
1435 int good_sectors = first_bad - r1_bio->sector;
1436 if (good_sectors < max_sectors)
1437 max_sectors = good_sectors;
1438 }
1439 }
1440 r1_bio->bios[i] = bio;
1441 }
1442 rcu_read_unlock();
1443
1444 if (unlikely(blocked_rdev)) {
1445 /* Wait for this device to become unblocked */
1446 int j;
1447
1448 for (j = 0; j < i; j++)
1449 if (r1_bio->bios[j])
1450 rdev_dec_pending(conf->mirrors[j].rdev, mddev);
1451 r1_bio->state = 0;
1452 allow_barrier(conf, bio->bi_iter.bi_sector);
1453 raid1_log(mddev, "wait rdev %d blocked", blocked_rdev->raid_disk);
1454 md_wait_for_blocked_rdev(blocked_rdev, mddev);
1455 wait_barrier(conf, bio->bi_iter.bi_sector);
1456 goto retry_write;
1457 }
1458
> 1459 max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
1460 if (max_sectors < bio_sectors(bio)) {
1461 struct bio *split = bio_split(bio, max_sectors,
1462 GFP_NOIO, &conf->bio_split);
1463 bio_chain(split, bio);
1464 submit_bio_noacct(bio);
1465 bio = split;
1466 r1_bio->master_bio = bio;
1467 r1_bio->sectors = max_sectors;
1468 }
1469
1470 if (blk_queue_io_stat(bio->bi_bdev->bd_disk->queue))
1471 r1_bio->start_time = bio_start_io_acct(bio);
1472 atomic_set(&r1_bio->remaining, 1);
1473 atomic_set(&r1_bio->behind_remaining, 0);
1474
1475 first_clone = 1;
1476
1477 for (i = 0; i < disks; i++) {
1478 struct bio *mbio = NULL;
1479 struct md_rdev *rdev = conf->mirrors[i].rdev;
1480 if (!r1_bio->bios[i])
1481 continue;
1482
1483 if (first_clone) {
1484 /* do behind I/O ?
1485 * Not if there are too many, or cannot
1486 * allocate memory, or a reader on WriteMostly
1487 * is waiting for behind writes to flush */
1488 if (bitmap &&
1489 (atomic_read(&bitmap->behind_writes)
1490 < mddev->bitmap_info.max_write_behind) &&
1491 !waitqueue_active(&bitmap->behind_wait)) {
1492 alloc_behind_master_bio(r1_bio, bio);
1493 }
1494
1495 md_bitmap_startwrite(bitmap, r1_bio->sector, r1_bio->sectors,
1496 test_bit(R1BIO_BehindIO, &r1_bio->state));
1497 first_clone = 0;
1498 }
1499
1500 if (r1_bio->behind_master_bio)
1501 mbio = bio_clone_fast(r1_bio->behind_master_bio,
1502 GFP_NOIO, &mddev->bio_set);
1503 else
1504 mbio = bio_clone_fast(bio, GFP_NOIO, &mddev->bio_set);
1505
1506 if (r1_bio->behind_master_bio) {
1507 if (test_bit(CollisionCheck, &rdev->flags))
1508 wait_for_serialization(rdev, r1_bio);
1509 if (test_bit(WriteMostly, &rdev->flags))
1510 atomic_inc(&r1_bio->behind_remaining);
1511 } else if (mddev->serialize_policy)
1512 wait_for_serialization(rdev, r1_bio);
1513
1514 r1_bio->bios[i] = mbio;
1515
1516 mbio->bi_iter.bi_sector = (r1_bio->sector +
1517 conf->mirrors[i].rdev->data_offset);
1518 bio_set_dev(mbio, conf->mirrors[i].rdev->bdev);
1519 mbio->bi_end_io = raid1_end_write_request;
1520 mbio->bi_opf = bio_op(bio) | (bio->bi_opf & (REQ_SYNC | REQ_FUA));
1521 if (test_bit(FailFast, &conf->mirrors[i].rdev->flags) &&
1522 !test_bit(WriteMostly, &conf->mirrors[i].rdev->flags) &&
1523 conf->raid_disks - mddev->degraded > 1)
1524 mbio->bi_opf |= MD_FAILFAST;
1525 mbio->bi_private = r1_bio;
1526
1527 atomic_inc(&r1_bio->remaining);
1528
1529 if (mddev->gendisk)
1530 trace_block_bio_remap(mbio, disk_devt(mddev->gendisk),
1531 r1_bio->sector);
1532 /* flush_pending_writes() needs access to the rdev so...*/
1533 mbio->bi_bdev = (void *)conf->mirrors[i].rdev;
1534
1535 cb = blk_check_plugged(raid1_unplug, mddev, sizeof(*plug));
1536 if (cb)
1537 plug = container_of(cb, struct raid1_plug_cb, cb);
1538 else
1539 plug = NULL;
1540 if (plug) {
1541 bio_list_add(&plug->pending, mbio);
1542 plug->pending_cnt++;
1543 } else {
1544 spin_lock_irqsave(&conf->device_lock, flags);
1545 bio_list_add(&conf->pending_bio_list, mbio);
1546 conf->pending_count++;
1547 spin_unlock_irqrestore(&conf->device_lock, flags);
1548 md_wakeup_thread(mddev->thread);
1549 }
1550 }
1551
1552 r1_bio_write_done(r1_bio);
1553
1554 /* In case raid1d snuck in to freeze_array */
1555 wake_up(&conf->wait_barrier);
1556 }
1557
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-stable-rc:linux-5.4.y 3700/4278] arch/powerpc/kernel/traps.c:2073:6: warning: no previous prototype for function 'CacheLockingException'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head: f52a40401ee9825556cc803c110c67bfec5f6b94
commit: acac3f7d7d2283a1b8bc1e1c286dcd6c96e573e4 [3700/4278] powerpc: Drop -me200 addition to build flags
config: powerpc64-randconfig-r035-20210813 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.4.y
git checkout acac3f7d7d2283a1b8bc1e1c286dcd6c96e573e4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:29:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/traps.c:24:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:31:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:544:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/traps.c:24:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:33:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/traps.c:24:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:35:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/traps.c:24:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:37:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:547:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
arch/powerpc/kernel/traps.c:1960:6: warning: no previous prototype for function 'DebugException' [-Wmissing-prototypes]
void DebugException(struct pt_regs *regs, unsigned long debug_status)
^
arch/powerpc/kernel/traps.c:1960:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void DebugException(struct pt_regs *regs, unsigned long debug_status)
^
static
>> arch/powerpc/kernel/traps.c:2073:6: warning: no previous prototype for function 'CacheLockingException' [-Wmissing-prototypes]
void CacheLockingException(struct pt_regs *regs, unsigned long address,
^
arch/powerpc/kernel/traps.c:2073:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void CacheLockingException(struct pt_regs *regs, unsigned long address,
^
static
>> arch/powerpc/kernel/traps.c:2087:6: warning: no previous prototype for function 'SPEFloatingPointException' [-Wmissing-prototypes]
void SPEFloatingPointException(struct pt_regs *regs)
^
arch/powerpc/kernel/traps.c:2087:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void SPEFloatingPointException(struct pt_regs *regs)
^
static
>> arch/powerpc/kernel/traps.c:2139:6: warning: no previous prototype for function 'SPEFloatingPointRoundException' [-Wmissing-prototypes]
void SPEFloatingPointRoundException(struct pt_regs *regs)
^
arch/powerpc/kernel/traps.c:2139:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void SPEFloatingPointRoundException(struct pt_regs *regs)
^
static
11 warnings generated.
--
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:60:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/perf/core-fsl-emb.c:10:
In file included from include/linux/perf_event.h:57:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:62:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:544:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/perf/core-fsl-emb.c:10:
In file included from include/linux/perf_event.h:57:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:64:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/perf/core-fsl-emb.c:10:
In file included from include/linux/perf_event.h:57:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:66:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/perf/core-fsl-emb.c:10:
In file included from include/linux/perf_event.h:57:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:68:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:547:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
arch/powerpc/perf/core-fsl-emb.c:661:6: warning: variable 'found' set but not used [-Wunused-but-set-variable]
int found = 0;
^
>> arch/powerpc/perf/core-fsl-emb.c:700:6: warning: no previous prototype for function 'hw_perf_event_setup' [-Wmissing-prototypes]
void hw_perf_event_setup(int cpu)
^
arch/powerpc/perf/core-fsl-emb.c:700:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void hw_perf_event_setup(int cpu)
^
static
9 warnings generated.
--
In file included from drivers/staging/exfat/exfat_super.c:12:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:241:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/staging/exfat/exfat_super.c:12:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:243:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:544:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/staging/exfat/exfat_super.c:12:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:245:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/staging/exfat/exfat_super.c:12:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:247:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/staging/exfat/exfat_super.c:12:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:249:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:547:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/staging/exfat/exfat_super.c:3835:12: warning: stack frame size (1040) exceeds limit (1024) in function 'exfat_fill_super' [-Wframe-larger-than]
static int exfat_fill_super(struct super_block *sb, void *data, int silent)
^
>> drivers/staging/exfat/exfat_super.c:2200:12: warning: stack frame size (1552) exceeds limit (1024) in function 'exfat_readdir' [-Wframe-larger-than]
static int exfat_readdir(struct file *filp, struct dir_context *ctx)
^
9 warnings generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FSL_EMB_PERFMON
Depends on E500 || PPC_83xx
Selected by
- PPC_FSL_BOOK3E
vim +/CacheLockingException +2073 arch/powerpc/kernel/traps.c
14cf11af6cf608 Paul Mackerras 2005-09-26 2071
14cf11af6cf608 Paul Mackerras 2005-09-26 2072 #ifdef CONFIG_FSL_BOOKE
14cf11af6cf608 Paul Mackerras 2005-09-26 @2073 void CacheLockingException(struct pt_regs *regs, unsigned long address,
14cf11af6cf608 Paul Mackerras 2005-09-26 2074 unsigned long error_code)
14cf11af6cf608 Paul Mackerras 2005-09-26 2075 {
14cf11af6cf608 Paul Mackerras 2005-09-26 2076 /* We treat cache locking instructions from the user
14cf11af6cf608 Paul Mackerras 2005-09-26 2077 * as priv ops, in the future we could try to do
14cf11af6cf608 Paul Mackerras 2005-09-26 2078 * something smarter
14cf11af6cf608 Paul Mackerras 2005-09-26 2079 */
14cf11af6cf608 Paul Mackerras 2005-09-26 2080 if (error_code & (ESR_DLK|ESR_ILK))
14cf11af6cf608 Paul Mackerras 2005-09-26 2081 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip);
14cf11af6cf608 Paul Mackerras 2005-09-26 2082 return;
14cf11af6cf608 Paul Mackerras 2005-09-26 2083 }
14cf11af6cf608 Paul Mackerras 2005-09-26 2084 #endif /* CONFIG_FSL_BOOKE */
14cf11af6cf608 Paul Mackerras 2005-09-26 2085
14cf11af6cf608 Paul Mackerras 2005-09-26 2086 #ifdef CONFIG_SPE
14cf11af6cf608 Paul Mackerras 2005-09-26 @2087 void SPEFloatingPointException(struct pt_regs *regs)
14cf11af6cf608 Paul Mackerras 2005-09-26 2088 {
6a800f36acd5bf Liu Yu 2008-10-28 2089 extern int do_spe_mathemu(struct pt_regs *regs);
14cf11af6cf608 Paul Mackerras 2005-09-26 2090 unsigned long spefscr;
14cf11af6cf608 Paul Mackerras 2005-09-26 2091 int fpexc_mode;
aeb1c0f6ff18f5 Eric W. Biederman 2018-04-17 2092 int code = FPE_FLTUNK;
6a800f36acd5bf Liu Yu 2008-10-28 2093 int err;
6a800f36acd5bf Liu Yu 2008-10-28 2094
ef4291243f51d0 Christophe Leroy 2019-04-30 2095 /* We restore the interrupt state now */
ef4291243f51d0 Christophe Leroy 2019-04-30 2096 if (!arch_irq_disabled_regs(regs))
ef4291243f51d0 Christophe Leroy 2019-04-30 2097 local_irq_enable();
ef4291243f51d0 Christophe Leroy 2019-04-30 2098
685659ee70db0b yu liu 2011-06-14 2099 flush_spe_to_thread(current);
14cf11af6cf608 Paul Mackerras 2005-09-26 2100
14cf11af6cf608 Paul Mackerras 2005-09-26 2101 spefscr = current->thread.spefscr;
14cf11af6cf608 Paul Mackerras 2005-09-26 2102 fpexc_mode = current->thread.fpexc_mode;
14cf11af6cf608 Paul Mackerras 2005-09-26 2103
14cf11af6cf608 Paul Mackerras 2005-09-26 2104 if ((spefscr & SPEFSCR_FOVF) && (fpexc_mode & PR_FP_EXC_OVF)) {
14cf11af6cf608 Paul Mackerras 2005-09-26 2105 code = FPE_FLTOVF;
14cf11af6cf608 Paul Mackerras 2005-09-26 2106 }
14cf11af6cf608 Paul Mackerras 2005-09-26 2107 else if ((spefscr & SPEFSCR_FUNF) && (fpexc_mode & PR_FP_EXC_UND)) {
14cf11af6cf608 Paul Mackerras 2005-09-26 2108 code = FPE_FLTUND;
14cf11af6cf608 Paul Mackerras 2005-09-26 2109 }
14cf11af6cf608 Paul Mackerras 2005-09-26 2110 else if ((spefscr & SPEFSCR_FDBZ) && (fpexc_mode & PR_FP_EXC_DIV))
14cf11af6cf608 Paul Mackerras 2005-09-26 2111 code = FPE_FLTDIV;
14cf11af6cf608 Paul Mackerras 2005-09-26 2112 else if ((spefscr & SPEFSCR_FINV) && (fpexc_mode & PR_FP_EXC_INV)) {
14cf11af6cf608 Paul Mackerras 2005-09-26 2113 code = FPE_FLTINV;
14cf11af6cf608 Paul Mackerras 2005-09-26 2114 }
14cf11af6cf608 Paul Mackerras 2005-09-26 2115 else if ((spefscr & (SPEFSCR_FG | SPEFSCR_FX)) && (fpexc_mode & PR_FP_EXC_RES))
14cf11af6cf608 Paul Mackerras 2005-09-26 2116 code = FPE_FLTRES;
14cf11af6cf608 Paul Mackerras 2005-09-26 2117
6a800f36acd5bf Liu Yu 2008-10-28 2118 err = do_spe_mathemu(regs);
6a800f36acd5bf Liu Yu 2008-10-28 2119 if (err == 0) {
6a800f36acd5bf Liu Yu 2008-10-28 2120 regs->nip += 4; /* skip emulated instruction */
6a800f36acd5bf Liu Yu 2008-10-28 2121 emulate_single_step(regs);
6a800f36acd5bf Liu Yu 2008-10-28 2122 return;
6a800f36acd5bf Liu Yu 2008-10-28 2123 }
14cf11af6cf608 Paul Mackerras 2005-09-26 2124
6a800f36acd5bf Liu Yu 2008-10-28 2125 if (err == -EFAULT) {
6a800f36acd5bf Liu Yu 2008-10-28 2126 /* got an error reading the instruction */
6a800f36acd5bf Liu Yu 2008-10-28 2127 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip);
6a800f36acd5bf Liu Yu 2008-10-28 2128 } else if (err == -EINVAL) {
6a800f36acd5bf Liu Yu 2008-10-28 2129 /* didn't recognize the instruction */
6a800f36acd5bf Liu Yu 2008-10-28 2130 printk(KERN_ERR "unrecognized spe instruction "
6a800f36acd5bf Liu Yu 2008-10-28 2131 "in %s at %lx\n", current->comm, regs->nip);
6a800f36acd5bf Liu Yu 2008-10-28 2132 } else {
14cf11af6cf608 Paul Mackerras 2005-09-26 2133 _exception(SIGFPE, regs, code, regs->nip);
6a800f36acd5bf Liu Yu 2008-10-28 2134 }
6a800f36acd5bf Liu Yu 2008-10-28 2135
14cf11af6cf608 Paul Mackerras 2005-09-26 2136 return;
14cf11af6cf608 Paul Mackerras 2005-09-26 2137 }
6a800f36acd5bf Liu Yu 2008-10-28 2138
6a800f36acd5bf Liu Yu 2008-10-28 @2139 void SPEFloatingPointRoundException(struct pt_regs *regs)
6a800f36acd5bf Liu Yu 2008-10-28 2140 {
6a800f36acd5bf Liu Yu 2008-10-28 2141 extern int speround_handler(struct pt_regs *regs);
6a800f36acd5bf Liu Yu 2008-10-28 2142 int err;
6a800f36acd5bf Liu Yu 2008-10-28 2143
ef4291243f51d0 Christophe Leroy 2019-04-30 2144 /* We restore the interrupt state now */
ef4291243f51d0 Christophe Leroy 2019-04-30 2145 if (!arch_irq_disabled_regs(regs))
ef4291243f51d0 Christophe Leroy 2019-04-30 2146 local_irq_enable();
ef4291243f51d0 Christophe Leroy 2019-04-30 2147
6a800f36acd5bf Liu Yu 2008-10-28 2148 preempt_disable();
6a800f36acd5bf Liu Yu 2008-10-28 2149 if (regs->msr & MSR_SPE)
6a800f36acd5bf Liu Yu 2008-10-28 2150 giveup_spe(current);
6a800f36acd5bf Liu Yu 2008-10-28 2151 preempt_enable();
6a800f36acd5bf Liu Yu 2008-10-28 2152
6a800f36acd5bf Liu Yu 2008-10-28 2153 regs->nip -= 4;
6a800f36acd5bf Liu Yu 2008-10-28 2154 err = speround_handler(regs);
6a800f36acd5bf Liu Yu 2008-10-28 2155 if (err == 0) {
6a800f36acd5bf Liu Yu 2008-10-28 2156 regs->nip += 4; /* skip emulated instruction */
6a800f36acd5bf Liu Yu 2008-10-28 2157 emulate_single_step(regs);
6a800f36acd5bf Liu Yu 2008-10-28 2158 return;
6a800f36acd5bf Liu Yu 2008-10-28 2159 }
6a800f36acd5bf Liu Yu 2008-10-28 2160
6a800f36acd5bf Liu Yu 2008-10-28 2161 if (err == -EFAULT) {
6a800f36acd5bf Liu Yu 2008-10-28 2162 /* got an error reading the instruction */
6a800f36acd5bf Liu Yu 2008-10-28 2163 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip);
6a800f36acd5bf Liu Yu 2008-10-28 2164 } else if (err == -EINVAL) {
6a800f36acd5bf Liu Yu 2008-10-28 2165 /* didn't recognize the instruction */
6a800f36acd5bf Liu Yu 2008-10-28 2166 printk(KERN_ERR "unrecognized spe instruction "
6a800f36acd5bf Liu Yu 2008-10-28 2167 "in %s at %lx\n", current->comm, regs->nip);
6a800f36acd5bf Liu Yu 2008-10-28 2168 } else {
aeb1c0f6ff18f5 Eric W. Biederman 2018-04-17 2169 _exception(SIGFPE, regs, FPE_FLTUNK, regs->nip);
6a800f36acd5bf Liu Yu 2008-10-28 2170 return;
6a800f36acd5bf Liu Yu 2008-10-28 2171 }
6a800f36acd5bf Liu Yu 2008-10-28 2172 }
14cf11af6cf608 Paul Mackerras 2005-09-26 2173 #endif
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 2174
:::::: The code at line 2073 was first introduced by commit
:::::: 14cf11af6cf608eb8c23e989ddb17a715ddce109 powerpc: Merge enough to start building in arch/powerpc.
:::::: TO: Paul Mackerras <paulus(a)samba.org>
:::::: CC: Paul Mackerras <paulus(a)samba.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
arch/powerpc/platforms/book3s/vas-api.c:100 coproc_ioc_tx_win_open() error: we previously assumed 'cp_inst->coproc->vops' could be null (see line 100)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1746f4db513563bb22e0ba0c419d0c90912dfae1
commit: 1a0d0d5ed5e3cd9e3fc1ad4459f1db2f3618fce0 powerpc/vas: Add platform specific user window operations
config: powerpc64-randconfig-m031-20210812 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
arch/powerpc/platforms/book3s/vas-api.c:100 coproc_ioc_tx_win_open() error: we previously assumed 'cp_inst->coproc->vops' could be null (see line 100)
arch/powerpc/platforms/book3s/vas-api.c:170 coproc_mmap() error: we previously assumed 'cp_inst->coproc->vops' could be null (see line 170)
vim +100 arch/powerpc/platforms/book3s/vas-api.c
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 73 static int coproc_ioc_tx_win_open(struct file *fp, unsigned long arg)
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 74 {
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 75 void __user *uptr = (void __user *)arg;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 76 struct vas_tx_win_open_attr uattr;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 77 struct coproc_instance *cp_inst;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 78 struct vas_window *txwin;
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 79 int rc;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 80
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 81 cp_inst = fp->private_data;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 82
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 83 /*
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 84 * One window for file descriptor
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 85 */
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 86 if (cp_inst->txwin)
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 87 return -EEXIST;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 88
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 89 rc = copy_from_user(&uattr, uptr, sizeof(uattr));
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 90 if (rc) {
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 91 pr_err("%s(): copy_from_user() returns %d\n", __func__, rc);
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 92 return -EFAULT;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 93 }
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 94
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 95 if (uattr.version != 1) {
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 96 pr_err("Invalid window open API version\n");
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 97 return -EINVAL;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 98 }
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 99
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 @100 if (!cp_inst->coproc->vops && !cp_inst->coproc->vops->open_win) {
^^
This was intended to be ||.
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 101 pr_err("VAS API is not registered\n");
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 102 return -EACCES;
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 103 }
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 104
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 105 txwin = cp_inst->coproc->vops->open_win(uattr.vas_id, uattr.flags,
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 106 cp_inst->coproc->cop_type);
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 107 if (IS_ERR(txwin)) {
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 108 pr_err("%s() VAS window open failed, %ld\n", __func__,
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 109 PTR_ERR(txwin));
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 110 return PTR_ERR(txwin);
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 111 }
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 112
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 113 cp_inst->txwin = txwin;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 114
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 115 return 0;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 116 }
[ snip ]
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 147 static int coproc_mmap(struct file *fp, struct vm_area_struct *vma)
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 148 {
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 149 struct coproc_instance *cp_inst = fp->private_data;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 150 struct vas_window *txwin;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 151 unsigned long pfn;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 152 u64 paste_addr;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 153 pgprot_t prot;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 154 int rc;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 155
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 156 txwin = cp_inst->txwin;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 157
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 158 if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) {
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 159 pr_debug("%s(): size 0x%zx, PAGE_SIZE 0x%zx\n", __func__,
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 160 (vma->vm_end - vma->vm_start), PAGE_SIZE);
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 161 return -EINVAL;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 162 }
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 163
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 164 /* Ensure instance has an open send window */
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 165 if (!txwin) {
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 166 pr_err("%s(): No send window open?\n", __func__);
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 167 return -EINVAL;
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 168 }
dda44eb29c2357 arch/powerpc/platforms/powernv/vas-api.c Haren Myneni 2020-04-17 169
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 @170 if (!cp_inst->coproc->vops && !cp_inst->coproc->vops->paste_addr) {
^^
Same.
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 171 pr_err("%s(): VAS API is not registered\n", __func__);
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 172 return -EACCES;
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 173 }
1a0d0d5ed5e3cd arch/powerpc/platforms/book3s/vas-api.c Haren Myneni 2021-06-17 174
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[chrome-os:chromeos-5.4 34/40] arch/x86/include/asm/pgtable-2level_types.h:18:3: error: conflicting types for 'pte_t'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 93e3864c8d0c394f924882214846e755b95a8e83
commit: a39af6150bf16871cff0479ede93e809f4aa21a4 [34/40] BACKPORT: FROMLIST: x86/kvm: Add definitions for virtual suspend time injection
config: um-i386_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout a39af6150bf16871cff0479ede93e809f4aa21a4
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash kernel/time/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/um/include/asm/mmu.h:10,
from include/linux/mm_types.h:20,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/clocksource.h:19,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/x86/um/asm/mm_context.h:65: note: this is the location of the previous definition
65 | #define LDT_empty(info) (_LDT_empty(info))
|
In file included from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/page_types.h:11: warning: "PAGE_SIZE" redefined
11 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
|
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:14: note: this is the location of the previous definition
14 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
|
In file included from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/page_types.h:36: warning: "PAGE_OFFSET" redefined
36 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
|
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:93: note: this is the location of the previous definition
93 | #define PAGE_OFFSET (uml_physmem)
|
In file included from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/page_types.h:38: warning: "VM_DATA_DEFAULT_FLAGS" redefined
38 | #define VM_DATA_DEFAULT_FLAGS \
|
In file included from arch/um/include/asm/page.h:23,
from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/x86/um/asm/vm-flags.h:12: note: this is the location of the previous definition
12 | #define VM_DATA_DEFAULT_FLAGS \
|
In file included from arch/x86/include/asm/page_types.h:51,
from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/page_32_types.h:22: warning: "THREAD_SIZE_ORDER" redefined
22 | #define THREAD_SIZE_ORDER 1
|
In file included from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/thread_info.h:9: note: this is the location of the previous definition
9 | #define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER
|
In file included from arch/x86/include/asm/page_types.h:51,
from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/page_32_types.h:23: warning: "THREAD_SIZE" redefined
23 | #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
|
In file included from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/thread_info.h:10: note: this is the location of the previous definition
10 | #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
|
In file included from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/page_types.h:52: warning: "IOREMAP_MAX_ORDER" redefined
52 | #define IOREMAP_MAX_ORDER (PMD_SHIFT)
|
In file included from include/asm-generic/io.h:887,
from arch/um/include/asm/io.h:16,
from include/linux/clocksource.h:21,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
include/linux/vmalloc.h:38: note: this is the location of the previous definition
38 | #define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT) /* 128 pages */
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:42: warning: "_PAGE_PRESENT" redefined
42 | #define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:13: note: this is the location of the previous definition
13 | #define _PAGE_PRESENT 0x001
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:43: warning: "_PAGE_RW" redefined
43 | #define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:16: note: this is the location of the previous definition
16 | #define _PAGE_RW 0x020
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:44: warning: "_PAGE_USER" redefined
44 | #define _PAGE_USER (_AT(pteval_t, 1) << _PAGE_BIT_USER)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:17: note: this is the location of the previous definition
17 | #define _PAGE_USER 0x040
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:47: warning: "_PAGE_ACCESSED" redefined
47 | #define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:18: note: this is the location of the previous definition
18 | #define _PAGE_ACCESSED 0x080
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:48: warning: "_PAGE_DIRTY" redefined
48 | #define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:19: note: this is the location of the previous definition
19 | #define _PAGE_DIRTY 0x100
|
In file included from arch/x86/include/asm/pat.h:6,
--
75 | #define __P100 PAGE_READONLY
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:223: warning: "__P101" redefined
223 | #define __P101 PAGE_READONLY_EXEC
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:76: note: this is the location of the previous definition
76 | #define __P101 PAGE_READONLY
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:224: warning: "__P110" redefined
224 | #define __P110 PAGE_COPY_EXEC
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:77: note: this is the location of the previous definition
77 | #define __P110 PAGE_COPY
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:225: warning: "__P111" redefined
225 | #define __P111 PAGE_COPY_EXEC
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:78: note: this is the location of the previous definition
78 | #define __P111 PAGE_COPY
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:231: warning: "__S100" redefined
231 | #define __S100 PAGE_READONLY_EXEC
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:84: note: this is the location of the previous definition
84 | #define __S100 PAGE_READONLY
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:232: warning: "__S101" redefined
232 | #define __S101 PAGE_READONLY_EXEC
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:85: note: this is the location of the previous definition
85 | #define __S101 PAGE_READONLY
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:233: warning: "__S110" redefined
233 | #define __S110 PAGE_SHARED_EXEC
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:86: note: this is the location of the previous definition
86 | #define __S110 PAGE_SHARED
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:234: warning: "__S111" redefined
234 | #define __S111 PAGE_SHARED_EXEC
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:87: note: this is the location of the previous definition
87 | #define __S111 PAGE_SHARED
|
In file included from arch/x86/include/asm/pgtable_32_types.h:15,
from arch/x86/include/asm/pgtable_types.h:248,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/pgtable-2level_types.h:18:3: error: conflicting types for 'pte_t'
18 | } pte_t;
| ^~~~~
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:37:39: note: previous declaration of 'pte_t' was here
37 | typedef struct { unsigned long pte; } pte_t;
| ^~~~~
In file included from arch/x86/include/asm/pgtable_32_types.h:15,
from arch/x86/include/asm/pgtable_types.h:248,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/pgtable-2level_types.h:27: warning: "PGDIR_SHIFT" redefined
27 | #define PGDIR_SHIFT 22
|
In file included from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable-3level.h:18: note: this is the location of the previous definition
18 | #define PGDIR_SHIFT 31
|
In file included from arch/x86/include/asm/pgtable_32_types.h:15,
from arch/x86/include/asm/pgtable_types.h:248,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/pgtable-2level_types.h:36: warning: "PTRS_PER_PTE" redefined
36 | #define PTRS_PER_PTE 1024
|
In file included from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable-3level.h:35: note: this is the location of the previous definition
35 | #define PTRS_PER_PTE 512
|
In file included from arch/x86/include/asm/pgtable_types.h:248,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/pgtable_32_types.h:21: warning: "PGDIR_MASK" redefined
21 | #define PGDIR_MASK (~(PGDIR_SIZE - 1))
|
In file included from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable-3level.h:21: note: this is the location of the previous definition
21 | #define PGDIR_MASK (~(PGDIR_SIZE-1))
|
In file included from arch/x86/include/asm/pgtable_types.h:248,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/pgtable_32_types.h:30: warning: "VMALLOC_OFFSET" redefined
30 | #define VMALLOC_OFFSET (8 * 1024 * 1024)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:45: note: this is the location of the previous definition
45 | #define VMALLOC_OFFSET (__va_space)
|
In file included from arch/x86/include/asm/pgtable_types.h:248,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/pgtable_32_types.h:36: warning: "VMALLOC_START" redefined
36 | #define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:46: note: this is the location of the previous definition
46 | #define VMALLOC_START ((end_iomem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
|
In file included from arch/x86/include/asm/pgtable_types.h:248,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/pgtable_32_types.h:58: warning: "PKMAP_BASE" redefined
58 | #define PKMAP_BASE \
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:47: note: this is the location of the previous definition
47 | #define PKMAP_BASE ((FIXADDR_START - LAST_PKMAP * PAGE_SIZE) & PMD_MASK)
|
In file included from arch/x86/include/asm/pgtable_types.h:248,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> arch/x86/include/asm/pgtable_32_types.h:64: warning: "VMALLOC_END" redefined
64 | # define VMALLOC_END (LDT_BASE_ADDR - 2 * PAGE_SIZE)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:48: note: this is the location of the previous definition
48 | #define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE)
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:266:47: error: conflicting types for 'pgprot_t'
266 | typedef struct pgprot { pgprotval_t pgprot; } pgprot_t;
| ^~~~~~~~
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:80:42: note: previous declaration of 'pgprot_t' was here
80 | typedef struct { unsigned long pgprot; } pgprot_t;
| ^~~~~~~~
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:268:34: error: conflicting types for 'pgd_t'
268 | typedef struct { pgdval_t pgd; } pgd_t;
| ^~~~~
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:39:39: note: previous declaration of 'pgd_t' was here
39 | typedef struct { unsigned long pgd; } pgd_t;
| ^~~~~
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/5level-fixup.h:14:18: error: conflicting types for 'pgd_t'
14 | #define p4d_t pgd_t
| ^~~~~
include/asm-generic/pgtable-nop4d.h:9:31: note: in expansion of macro 'p4d_t'
9 | typedef struct { pgd_t pgd; } p4d_t;
| ^~~~~
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:268:34: note: previous declaration of 'pgd_t' was here
268 | typedef struct { pgdval_t pgd; } pgd_t;
| ^~~~~
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
include/asm-generic/pgtable-nop4d.h:14: warning: "P4D_SIZE" redefined
14 | #define P4D_SIZE (1UL << P4D_SHIFT)
|
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/5level-fixup.h:9: note: this is the location of the previous definition
9 | #define P4D_SIZE PGDIR_SIZE
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
include/asm-generic/pgtable-nop4d.h:15: warning: "P4D_MASK" redefined
..
vim +/pte_t +18 arch/x86/include/asm/pgtable-2level_types.h
54321d947ae9d6 arch/x86/include/asm/pgtable-2level_types.h Jeremy Fitzhardinge 2009-02-11 14
54321d947ae9d6 arch/x86/include/asm/pgtable-2level_types.h Jeremy Fitzhardinge 2009-02-11 15 typedef union {
54321d947ae9d6 arch/x86/include/asm/pgtable-2level_types.h Jeremy Fitzhardinge 2009-02-11 16 pteval_t pte;
54321d947ae9d6 arch/x86/include/asm/pgtable-2level_types.h Jeremy Fitzhardinge 2009-02-11 17 pteval_t pte_low;
54321d947ae9d6 arch/x86/include/asm/pgtable-2level_types.h Jeremy Fitzhardinge 2009-02-11 @18 } pte_t;
54321d947ae9d6 arch/x86/include/asm/pgtable-2level_types.h Jeremy Fitzhardinge 2009-02-11 19 #endif /* !__ASSEMBLY__ */
54321d947ae9d6 arch/x86/include/asm/pgtable-2level_types.h Jeremy Fitzhardinge 2009-02-11 20
5311ab62cdc778 include/asm-i386/pgtable-2level-defs.h Jeremy Fitzhardinge 2007-05-02 21 #define SHARED_KERNEL_PMD 0
5311ab62cdc778 include/asm-i386/pgtable-2level-defs.h Jeremy Fitzhardinge 2007-05-02 22
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 23 /*
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 24 * traditional i386 two-level paging structure:
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 25 */
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 26
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 @27 #define PGDIR_SHIFT 22
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 28 #define PTRS_PER_PGD 1024
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 29
9b3651cbc26cfc arch/x86/include/asm/pgtable-2level_types.h Jeremy Fitzhardinge 2009-02-13 30
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 31 /*
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 32 * the i386 is two-level, so we don't really have any
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 33 * PMD directory physically.
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 34 */
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 35
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 @36 #define PTRS_PER_PTE 1024
^1da177e4c3f41 include/asm-i386/pgtable-2level-defs.h Linus Torvalds 2005-04-16 37
:::::: The code at line 18 was first introduced by commit
:::::: 54321d947ae9d6a051b81e3eccaf2d8658aeecc6 x86: move pte types into pgtable*.h
:::::: TO: Jeremy Fitzhardinge <jeremy.fitzhardinge(a)citrix.com>
:::::: CC: Jeremy Fitzhardinge <jeremy.fitzhardinge(a)citrix.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 4136/7554] drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:702:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9b992972fb9c2a1bc3fb25bab70da8a4385e3abe
commit: 5ff013914c62c493c206d70554cfb1d311ea481a [4136/7554] brcmfmac: firmware: Allow per-board firmware binaries
config: x86_64-randconfig-a004-20210813 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 5ff013914c62c493c206d70554cfb1d311ea481a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:702:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (alt_path) {
^~~~~~~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:709:6: note: uninitialized use occurs here
if (ret) {
^~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:702:2: note: remove the 'if' if its condition is always true
if (alt_path) {
^~~~~~~~~~~~~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:683:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +702 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
675
676 int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
677 void (*fw_cb)(struct device *dev, int err,
678 struct brcmf_fw_request *req))
679 {
680 struct brcmf_fw_item *first = &req->items[0];
681 struct brcmf_fw *fwctx;
682 char *alt_path;
683 int ret;
684
685 brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
686 if (!fw_cb)
687 return -EINVAL;
688
689 if (!brcmf_fw_request_is_valid(req))
690 return -EINVAL;
691
692 fwctx = kzalloc(sizeof(*fwctx), GFP_KERNEL);
693 if (!fwctx)
694 return -ENOMEM;
695
696 fwctx->dev = dev;
697 fwctx->req = req;
698 fwctx->done = fw_cb;
699
700 /* First try alternative board-specific path if any */
701 alt_path = brcm_alt_fw_path(first->path, fwctx->req->board_type);
> 702 if (alt_path) {
703 ret = request_firmware_nowait(THIS_MODULE, true, alt_path,
704 fwctx->dev, GFP_KERNEL, fwctx,
705 brcmf_fw_request_done);
706 kfree(alt_path);
707 }
708 /* Else try canonical path */
709 if (ret) {
710 ret = request_firmware_nowait(THIS_MODULE, true, first->path,
711 fwctx->dev, GFP_KERNEL, fwctx,
712 brcmf_fw_request_done);
713 }
714 if (ret < 0)
715 brcmf_fw_request_done(NULL, fwctx);
716
717 return 0;
718 }
719
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[chrome-os:chromeos-5.4 34/40] include/uapi/linux/kvm.h:14:10: fatal error: 'asm/kvm.h' file not found
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 93e3864c8d0c394f924882214846e755b95a8e83
commit: a39af6150bf16871cff0479ede93e809f4aa21a4 [34/40] BACKPORT: FROMLIST: x86/kvm: Add definitions for virtual suspend time injection
config: hexagon-randconfig-r025-20210813 (attached as .config)
compiler: clang version 12.0.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout a39af6150bf16871cff0479ede93e809f4aa21a4
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/time/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from kernel/time/timekeeping.c:25:
In file included from include/linux/kvm_host.h:32:
>> include/uapi/linux/kvm.h:14:10: fatal error: 'asm/kvm.h' file not found
#include <asm/kvm.h>
^~~~~~~~~~~
1 error generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- LATENCYTOP && DEBUG_KERNEL && STACKTRACE_SUPPORT && PROC_FS && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
- LOCKDEP && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86
vim +14 include/uapi/linux/kvm.h
6aa8b732ca01c3 include/linux/kvm.h Avi Kivity 2006-12-10 4
6aa8b732ca01c3 include/linux/kvm.h Avi Kivity 2006-12-10 5 /*
6aa8b732ca01c3 include/linux/kvm.h Avi Kivity 2006-12-10 6 * Userspace interface for /dev/kvm - kernel based virtual machine
6aa8b732ca01c3 include/linux/kvm.h Avi Kivity 2006-12-10 7 *
dea8caee7b6971 include/linux/kvm.h Rusty Russell 2007-07-17 8 * Note: you must update KVM_API_VERSION if you change this interface.
6aa8b732ca01c3 include/linux/kvm.h Avi Kivity 2006-12-10 9 */
6aa8b732ca01c3 include/linux/kvm.h Avi Kivity 2006-12-10 10
00bfddaf7f68a6 include/linux/kvm.h Jaswinder Singh Rajput 2009-01-15 11 #include <linux/types.h>
97646202bc3f19 include/linux/kvm.h Christian Borntraeger 2008-03-12 12 #include <linux/compiler.h>
6aa8b732ca01c3 include/linux/kvm.h Avi Kivity 2006-12-10 13 #include <linux/ioctl.h>
f6a40e3bdf5fe0 include/linux/kvm.h Jerone Young 2007-11-19 @14 #include <asm/kvm.h>
6aa8b732ca01c3 include/linux/kvm.h Avi Kivity 2006-12-10 15
:::::: The code at line 14 was first introduced by commit
:::::: f6a40e3bdf5fe0a7d7d7f2dbc5b10158fbdad968 KVM: Portability: Move kvm_memory_alias to asm/kvm.h
:::::: TO: Jerone Young <jyoung5(a)us.ibm.com>
:::::: CC: Avi Kivity <avi(a)qumranet.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month