[android-common:android-5.4 2/11] arch/x86/kvm/svm.c:945:17: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-5.4
head: 2eaad10dbde189a44c86dd88b99aa4b7731ec8f9
commit: 70c62d7976e25bb80906db42c8a093d93a6b6185 [2/11] FROMGIT: x86/percpu: Clean up percpu_to_op()
config: i386-randconfig-s002-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-5.4
git checkout 70c62d7976e25bb80906db42c8a093d93a6b6185
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kvm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/x86/kvm/svm.c:945:17: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
>> arch/x86/kvm/svm.c:945:17: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
>> arch/x86/kvm/svm.c:945:17: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
arch/x86/kvm/svm.c: note: in included file (through include/linux/bitops.h, include/linux/kernel.h, include/linux/list.h, ...):
arch/x86/include/asm/bitops.h:77:37: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f)
arch/x86/kvm/svm.c:6776:60: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm.c:6776:60: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm.c:6799:14: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm.c:6805:59: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm.c:6805:59: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm.c:6819:14: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm.c:6844:70: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm.c:6844:70: sparse: sparse: dereference of noderef expression
vim +945 arch/x86/kvm/svm.c
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 911
0fe1e009541e92 arch/x86/kvm/svm.c Tejun Heo 2009-10-29 912 struct svm_cpu_data *sd;
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 913 uint64_t efer;
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 914 struct desc_struct *gdt;
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 915 int me = raw_smp_processor_id();
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 916
10474ae8945ce0 arch/x86/kvm/svm.c Alexander Graf 2009-09-15 917 rdmsrl(MSR_EFER, efer);
10474ae8945ce0 arch/x86/kvm/svm.c Alexander Graf 2009-09-15 918 if (efer & EFER_SVME)
10474ae8945ce0 arch/x86/kvm/svm.c Alexander Graf 2009-09-15 919 return -EBUSY;
10474ae8945ce0 arch/x86/kvm/svm.c Alexander Graf 2009-09-15 920
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 921 if (!has_svm()) {
1f5b77f51a221f arch/x86/kvm/svm.c Borislav Petkov 2012-10-20 922 pr_err("%s: err EOPNOTSUPP on %d\n", __func__, me);
10474ae8945ce0 arch/x86/kvm/svm.c Alexander Graf 2009-09-15 923 return -EINVAL;
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 924 }
0fe1e009541e92 arch/x86/kvm/svm.c Tejun Heo 2009-10-29 925 sd = per_cpu(svm_data, me);
0fe1e009541e92 arch/x86/kvm/svm.c Tejun Heo 2009-10-29 926 if (!sd) {
1f5b77f51a221f arch/x86/kvm/svm.c Borislav Petkov 2012-10-20 927 pr_err("%s: svm_data is NULL on %d\n", __func__, me);
10474ae8945ce0 arch/x86/kvm/svm.c Alexander Graf 2009-09-15 928 return -EINVAL;
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 929 }
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 930
0fe1e009541e92 arch/x86/kvm/svm.c Tejun Heo 2009-10-29 931 sd->asid_generation = 1;
0fe1e009541e92 arch/x86/kvm/svm.c Tejun Heo 2009-10-29 932 sd->max_asid = cpuid_ebx(SVM_CPUID_FUNC) - 1;
0fe1e009541e92 arch/x86/kvm/svm.c Tejun Heo 2009-10-29 933 sd->next_asid = sd->max_asid + 1;
ed3cd233f80740 arch/x86/kvm/svm.c Brijesh Singh 2017-12-04 934 sd->min_asid = max_sev_asid + 1;
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 935
45fc8757d1d212 arch/x86/kvm/svm.c Thomas Garnier 2017-03-14 936 gdt = get_current_gdt_rw();
0fe1e009541e92 arch/x86/kvm/svm.c Tejun Heo 2009-10-29 937 sd->tss_desc = (struct kvm_ldttss_desc *)(gdt + GDT_ENTRY_TSS);
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 938
9962d032bbff02 arch/x86/kvm/svm.c Alexander Graf 2008-11-25 939 wrmsrl(MSR_EFER, efer | EFER_SVME);
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 940
d0316554d3586c arch/x86/kvm/svm.c Linus Torvalds 2009-12-14 941 wrmsrl(MSR_VM_HSAVE_PA, page_to_pfn(sd->save_area) << PAGE_SHIFT);
10474ae8945ce0 arch/x86/kvm/svm.c Alexander Graf 2009-09-15 942
fbc0db76b77125 arch/x86/kvm/svm.c Joerg Roedel 2011-03-25 943 if (static_cpu_has(X86_FEATURE_TSCRATEMSR)) {
fbc0db76b77125 arch/x86/kvm/svm.c Joerg Roedel 2011-03-25 944 wrmsrl(MSR_AMD64_TSC_RATIO, TSC_RATIO_DEFAULT);
89cbc76768c2fa arch/x86/kvm/svm.c Christoph Lameter 2014-08-17 @945 __this_cpu_write(current_tsc_ratio, TSC_RATIO_DEFAULT);
fbc0db76b77125 arch/x86/kvm/svm.c Joerg Roedel 2011-03-25 946 }
fbc0db76b77125 arch/x86/kvm/svm.c Joerg Roedel 2011-03-25 947
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 948
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 949 /*
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 950 * Get OSVW bits.
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 951 *
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 952 * Note that it is possible to have a system with mixed processor
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 953 * revisions and therefore different OSVW bits. If bits are not the same
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 954 * on different processors then choose the worst case (i.e. if erratum
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 955 * is present on one processor and not on another then assume that the
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 956 * erratum is present everywhere).
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 957 */
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 958 if (cpu_has(&boot_cpu_data, X86_FEATURE_OSVW)) {
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 959 uint64_t len, status = 0;
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 960 int err;
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 961
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 962 len = native_read_msr_safe(MSR_AMD64_OSVW_ID_LENGTH, &err);
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 963 if (!err)
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 964 status = native_read_msr_safe(MSR_AMD64_OSVW_STATUS,
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 965 &err);
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 966
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 967 if (err)
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 968 osvw_status = osvw_len = 0;
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 969 else {
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 970 if (len < osvw_len)
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 971 osvw_len = len;
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 972 osvw_status |= status;
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 973 osvw_status &= (1ULL << osvw_len) - 1;
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 974 }
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 975 } else
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 976 osvw_status = osvw_len = 0;
2b036c6b861dc5 arch/x86/kvm/svm.c Boris Ostrovsky 2012-01-09 977
67ec66077799f2 arch/x86/kvm/svm.c Joerg Roedel 2010-05-17 978 svm_init_erratum_383();
67ec66077799f2 arch/x86/kvm/svm.c Joerg Roedel 2010-05-17 979
1018faa6cf23b2 arch/x86/kvm/svm.c Joerg Roedel 2012-02-29 980 amd_pmu_enable_virt();
1018faa6cf23b2 arch/x86/kvm/svm.c Joerg Roedel 2012-02-29 981
10474ae8945ce0 arch/x86/kvm/svm.c Alexander Graf 2009-09-15 982 return 0;
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 983 }
6aa8b732ca01c3 drivers/kvm/svm.c Avi Kivity 2006-12-10 984
:::::: The code at line 945 was first introduced by commit
:::::: 89cbc76768c2fa4ed95545bf961f3a14ddfeed21 x86: Replace __get_cpu_var uses
:::::: TO: Christoph Lameter <cl(a)linux.com>
:::::: CC: Tejun Heo <tj(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[kees:kspp/memcpy/next-20210803/v2-devel 42/86] drivers/video/fbdev/cirrusfb.c:1852:17: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210803/v2-devel
head: 4752984fc24104f399e70f99d48afa047d86a381
commit: 21b2d9d06a3a4d6bfafc9cfe88fcfa1a48e95162 [42/86] fortify: Detect struct member overflows in memcpy() at compile-time
config: powerpc-randconfig-s031-20210810 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210803/v2-devel
git checkout 21b2d9d06a3a4d6bfafc9cfe88fcfa1a48e95162
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/video/fbdev/cirrusfb.c:1852:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/cirrusfb.c:1852:17: sparse: expected void const *
drivers/video/fbdev/cirrusfb.c:1852:17: sparse: got char [noderef] __iomem *screen_base
>> drivers/video/fbdev/cirrusfb.c:1852:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/cirrusfb.c:1852:17: sparse: expected void const *
drivers/video/fbdev/cirrusfb.c:1852:17: sparse: got char [noderef] __iomem *screen_base
drivers/video/fbdev/cirrusfb.c:1852:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/cirrusfb.c:1852:17: sparse: expected void *
drivers/video/fbdev/cirrusfb.c:1852:17: sparse: got char [noderef] __iomem *screen_base
vim +1852 drivers/video/fbdev/cirrusfb.c
^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1809
8503df65976d0f drivers/video/cirrusfb.c Krzysztof Helt 2007-10-16 1810 static void cirrusfb_imageblit(struct fb_info *info,
8503df65976d0f drivers/video/cirrusfb.c Krzysztof Helt 2007-10-16 1811 const struct fb_image *image)
^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1812 {
^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1813 struct cirrusfb_info *cinfo = info->par;
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1814 unsigned char op = (info->var.bits_per_pixel == 24) ? 0xc : 0x4;
^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1815
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1816 if (info->state != FBINFO_STATE_RUNNING)
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1817 return;
df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1818 /* Alpine/SD64 does not work at 24bpp ??? */
df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1819 if (info->flags & FBINFO_HWACCEL_DISABLED || image->depth != 1)
df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1820 cfb_imageblit(info, image);
df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1821 else if ((cinfo->btype == BT_ALPINE || cinfo->btype == BT_SD64) &&
df3aafd57d590d drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1822 op == 0xc)
^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1823 cfb_imageblit(info, image);
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1824 else {
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1825 unsigned size = ((image->width + 7) >> 3) * image->height;
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1826 int m = info->var.bits_per_pixel;
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1827 u32 fg, bg;
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1828
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1829 if (info->var.bits_per_pixel == 8) {
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1830 fg = image->fg_color;
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1831 bg = image->bg_color;
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1832 } else {
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1833 fg = ((u32 *)(info->pseudo_palette))[image->fg_color];
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1834 bg = ((u32 *)(info->pseudo_palette))[image->bg_color];
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1835 }
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1836 if (info->var.bits_per_pixel == 24) {
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1837 /* clear background first */
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1838 cirrusfb_RectFill(cinfo->regbase,
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1839 info->var.bits_per_pixel,
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1840 (image->dx * m) / 8, image->dy,
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1841 (image->width * m) / 8,
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1842 image->height,
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1843 bg, bg,
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1844 info->fix.line_length, 0x40);
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1845 }
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1846 cirrusfb_RectFill(cinfo->regbase,
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1847 info->var.bits_per_pixel,
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1848 (image->dx * m) / 8, image->dy,
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1849 (image->width * m) / 8, image->height,
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1850 fg, bg,
7cade31cabec33 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1851 info->fix.line_length, op);
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 @1852 memcpy(info->screen_base, image->data, size);
9e848062533207 drivers/video/cirrusfb.c Krzysztof Helt 2009-03-31 1853 }
^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1854 }
^1da177e4c3f41 drivers/video/cirrusfb.c Linus Torvalds 2005-04-16 1855
:::::: The code at line 1852 was first introduced by commit
:::::: 9e848062533207130667f6eaa748549367ccbedf cirrusfb: add imageblit function
:::::: TO: Krzysztof Helt <krzysztof.h1(a)wp.pl>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[ipmi:for-next 1/2] drivers/char/ipmi/ipmi_si_intf.c:689:5: error: expected ')'
by kernel test robot
tree: https://github.com/cminyard/linux-ipmi for-next
head: f68d16759343cdbe44de07b9569b0b992291d13c
commit: 8365203515c64c9f7c11d14cdcccdac58c793598 [1/2] ipmi: rate limit ipmi smi_event failure message
config: hexagon-randconfig-r031-20210811 (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
# https://github.com/cminyard/linux-ipmi/commit/8365203515c64c9f7c11d14cdcc...
git remote add ipmi https://github.com/cminyard/linux-ipmi
git fetch --no-tags ipmi for-next
git checkout 8365203515c64c9f7c11d14cdcccdac58c793598
# 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
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 >>):
>> drivers/char/ipmi/ipmi_si_intf.c:689:5: error: expected ')'
msg[2]);
^
drivers/char/ipmi/ipmi_si_intf.c:686:4: note: to match this '('
dev_warn_ratelimited(smi_info->io.dev,
^
include/linux/dev_printk.h:188:24: note: expanded from macro 'dev_warn_ratelimited'
dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
^
1 error generated.
vim +689 drivers/char/ipmi/ipmi_si_intf.c
536
537 static void handle_transaction_done(struct smi_info *smi_info)
538 {
539 struct ipmi_smi_msg *msg;
540
541 debug_timestamp("Done");
542 switch (smi_info->si_state) {
543 case SI_NORMAL:
544 if (!smi_info->curr_msg)
545 break;
546
547 smi_info->curr_msg->rsp_size
548 = smi_info->handlers->get_result(
549 smi_info->si_sm,
550 smi_info->curr_msg->rsp,
551 IPMI_MAX_MSG_LENGTH);
552
553 /*
554 * Do this here becase deliver_recv_msg() releases the
555 * lock, and a new message can be put in during the
556 * time the lock is released.
557 */
558 msg = smi_info->curr_msg;
559 smi_info->curr_msg = NULL;
560 deliver_recv_msg(smi_info, msg);
561 break;
562
563 case SI_GETTING_FLAGS:
564 {
565 unsigned char msg[4];
566 unsigned int len;
567
568 /* We got the flags from the SMI, now handle them. */
569 len = smi_info->handlers->get_result(smi_info->si_sm, msg, 4);
570 if (msg[2] != 0) {
571 /* Error fetching flags, just give up for now. */
572 smi_info->si_state = SI_NORMAL;
573 } else if (len < 4) {
574 /*
575 * Hmm, no flags. That's technically illegal, but
576 * don't use uninitialized data.
577 */
578 smi_info->si_state = SI_NORMAL;
579 } else {
580 smi_info->msg_flags = msg[3];
581 handle_flags(smi_info);
582 }
583 break;
584 }
585
586 case SI_CLEARING_FLAGS:
587 {
588 unsigned char msg[3];
589
590 /* We cleared the flags. */
591 smi_info->handlers->get_result(smi_info->si_sm, msg, 3);
592 if (msg[2] != 0) {
593 /* Error clearing flags */
594 dev_warn_ratelimited(smi_info->io.dev,
595 "Error clearing flags: %2.2x\n", msg[2]);
596 }
597 smi_info->si_state = SI_NORMAL;
598 break;
599 }
600
601 case SI_GETTING_EVENTS:
602 {
603 smi_info->curr_msg->rsp_size
604 = smi_info->handlers->get_result(
605 smi_info->si_sm,
606 smi_info->curr_msg->rsp,
607 IPMI_MAX_MSG_LENGTH);
608
609 /*
610 * Do this here becase deliver_recv_msg() releases the
611 * lock, and a new message can be put in during the
612 * time the lock is released.
613 */
614 msg = smi_info->curr_msg;
615 smi_info->curr_msg = NULL;
616 if (msg->rsp[2] != 0) {
617 /* Error getting event, probably done. */
618 msg->done(msg);
619
620 /* Take off the event flag. */
621 smi_info->msg_flags &= ~EVENT_MSG_BUFFER_FULL;
622 handle_flags(smi_info);
623 } else {
624 smi_inc_stat(smi_info, events);
625
626 /*
627 * Do this before we deliver the message
628 * because delivering the message releases the
629 * lock and something else can mess with the
630 * state.
631 */
632 handle_flags(smi_info);
633
634 deliver_recv_msg(smi_info, msg);
635 }
636 break;
637 }
638
639 case SI_GETTING_MESSAGES:
640 {
641 smi_info->curr_msg->rsp_size
642 = smi_info->handlers->get_result(
643 smi_info->si_sm,
644 smi_info->curr_msg->rsp,
645 IPMI_MAX_MSG_LENGTH);
646
647 /*
648 * Do this here becase deliver_recv_msg() releases the
649 * lock, and a new message can be put in during the
650 * time the lock is released.
651 */
652 msg = smi_info->curr_msg;
653 smi_info->curr_msg = NULL;
654 if (msg->rsp[2] != 0) {
655 /* Error getting event, probably done. */
656 msg->done(msg);
657
658 /* Take off the msg flag. */
659 smi_info->msg_flags &= ~RECEIVE_MSG_AVAIL;
660 handle_flags(smi_info);
661 } else {
662 smi_inc_stat(smi_info, incoming_messages);
663
664 /*
665 * Do this before we deliver the message
666 * because delivering the message releases the
667 * lock and something else can mess with the
668 * state.
669 */
670 handle_flags(smi_info);
671
672 deliver_recv_msg(smi_info, msg);
673 }
674 break;
675 }
676
677 case SI_CHECKING_ENABLES:
678 {
679 unsigned char msg[4];
680 u8 enables;
681 bool irq_on;
682
683 /* We got the flags from the SMI, now handle them. */
684 smi_info->handlers->get_result(smi_info->si_sm, msg, 4);
685 if (msg[2] != 0) {
686 dev_warn_ratelimited(smi_info->io.dev,
687 "Couldn't get irq info: %x,\n"
688 "Maybe ok, but ipmi might run very slowly.\n"
> 689 msg[2]);
690 smi_info->si_state = SI_NORMAL;
691 break;
692 }
693 enables = current_global_enables(smi_info, 0, &irq_on);
694 if (smi_info->io.si_type == SI_BT)
695 /* BT has its own interrupt enable bit. */
696 check_bt_irq(smi_info, irq_on);
697 if (enables != (msg[3] & GLOBAL_ENABLES_MASK)) {
698 /* Enables are not correct, fix them. */
699 msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
700 msg[1] = IPMI_SET_BMC_GLOBAL_ENABLES_CMD;
701 msg[2] = enables | (msg[3] & ~GLOBAL_ENABLES_MASK);
702 smi_info->handlers->start_transaction(
703 smi_info->si_sm, msg, 3);
704 smi_info->si_state = SI_SETTING_ENABLES;
705 } else if (smi_info->supports_event_msg_buff) {
706 smi_info->curr_msg = ipmi_alloc_smi_msg();
707 if (!smi_info->curr_msg) {
708 smi_info->si_state = SI_NORMAL;
709 break;
710 }
711 start_getting_events(smi_info);
712 } else {
713 smi_info->si_state = SI_NORMAL;
714 }
715 break;
716 }
717
718 case SI_SETTING_ENABLES:
719 {
720 unsigned char msg[4];
721
722 smi_info->handlers->get_result(smi_info->si_sm, msg, 4);
723 if (msg[2] != 0)
724 dev_warn_ratelimited(smi_info->io.dev,
725 "Could not set the global enables: 0x%x.\n",
726 msg[2]);
727
728 if (smi_info->supports_event_msg_buff) {
729 smi_info->curr_msg = ipmi_alloc_smi_msg();
730 if (!smi_info->curr_msg) {
731 smi_info->si_state = SI_NORMAL;
732 break;
733 }
734 start_getting_events(smi_info);
735 } else {
736 smi_info->si_state = SI_NORMAL;
737 }
738 break;
739 }
740 }
741 }
742
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [RFC PATCH v7 4/4] arm64: Create a list of SYM_CODE functions, check return PC against list
by kernel test robot
Hi,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on v5.14-rc5]
[also build test WARNING on next-20210812]
[cannot apply to arm64/for-next/core tip/perf/core]
[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/madvenka-linux-microsoft-com/arm...
base: 36a21d51725af2ce0700c6ebcb6b9594aac658a6
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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/fcc398e417dd1c8521e069b516322c5e5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review madvenka-linux-microsoft-com/arm64-Make-all-stack-walking-functions-use-arch_stack_walk/20210812-222448
git checkout fcc398e417dd1c8521e069b516322c5e5f615444
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arm64
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/arm64/kernel/stacktrace.c:29:12: warning: no previous prototype for 'init_sym_code_functions' [-Wmissing-prototypes]
29 | int __init init_sym_code_functions(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/init_sym_code_functions +29 arch/arm64/kernel/stacktrace.c
28
> 29 int __init init_sym_code_functions(void)
30 {
31 size_t size = (unsigned long)__sym_code_functions_end -
32 (unsigned long)__sym_code_functions_start;
33
34 sym_code_functions = (struct code_range *)__sym_code_functions_start;
35 /*
36 * Order it so that sym_code_functions is not visible before
37 * num_sym_code_functions.
38 */
39 smp_mb();
40 num_sym_code_functions = size / sizeof(struct code_range);
41
42 return 0;
43 }
44 early_initcall(init_sym_code_functions);
45
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[ipmi:for-next 1/2] drivers/char/ipmi/ipmi_si_intf.c:689:5: error: expected ')' before 'msg'
by kernel test robot
tree: https://github.com/cminyard/linux-ipmi for-next
head: f68d16759343cdbe44de07b9569b0b992291d13c
commit: 8365203515c64c9f7c11d14cdcccdac58c793598 [1/2] ipmi: rate limit ipmi smi_event failure message
config: arc-randconfig-r011-20210812 (attached as .config)
compiler: arc-elf-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/cminyard/linux-ipmi/commit/8365203515c64c9f7c11d14cdcc...
git remote add ipmi https://github.com/cminyard/linux-ipmi
git fetch --no-tags ipmi for-next
git checkout 8365203515c64c9f7c11d14cdcccdac58c793598
# 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=arc SHELL=/bin/bash
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 include/linux/device.h:15,
from include/linux/acpi.h:15,
from include/linux/ipmi.h:21,
from drivers/char/ipmi/ipmi_si_intf.c:40:
drivers/char/ipmi/ipmi_si_intf.c: In function 'handle_transaction_done':
>> drivers/char/ipmi/ipmi_si_intf.c:689:5: error: expected ')' before 'msg'
689 | msg[2]);
| ^~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
include/linux/dev_printk.h:176:3: note: in expansion of macro 'dev_warn'
176 | dev_level(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
include/linux/dev_printk.h:188:2: note: in expansion of macro 'dev_level_ratelimited'
188 | dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/char/ipmi/ipmi_si_intf.c:686:4: note: in expansion of macro 'dev_warn_ratelimited'
686 | dev_warn_ratelimited(smi_info->io.dev,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/char/ipmi/ipmi_si_intf.c:687:5: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=]
687 | "Couldn't get irq info: %x,\n"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
include/linux/dev_printk.h:176:3: note: in expansion of macro 'dev_warn'
176 | dev_level(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
include/linux/dev_printk.h:188:2: note: in expansion of macro 'dev_level_ratelimited'
188 | dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/char/ipmi/ipmi_si_intf.c:686:4: note: in expansion of macro 'dev_warn_ratelimited'
686 | dev_warn_ratelimited(smi_info->io.dev,
| ^~~~~~~~~~~~~~~~~~~~
drivers/char/ipmi/ipmi_si_intf.c:687:30: note: format string is defined here
687 | "Couldn't get irq info: %x,\n"
| ~^
| |
| unsigned int
vim +689 drivers/char/ipmi/ipmi_si_intf.c
536
537 static void handle_transaction_done(struct smi_info *smi_info)
538 {
539 struct ipmi_smi_msg *msg;
540
541 debug_timestamp("Done");
542 switch (smi_info->si_state) {
543 case SI_NORMAL:
544 if (!smi_info->curr_msg)
545 break;
546
547 smi_info->curr_msg->rsp_size
548 = smi_info->handlers->get_result(
549 smi_info->si_sm,
550 smi_info->curr_msg->rsp,
551 IPMI_MAX_MSG_LENGTH);
552
553 /*
554 * Do this here becase deliver_recv_msg() releases the
555 * lock, and a new message can be put in during the
556 * time the lock is released.
557 */
558 msg = smi_info->curr_msg;
559 smi_info->curr_msg = NULL;
560 deliver_recv_msg(smi_info, msg);
561 break;
562
563 case SI_GETTING_FLAGS:
564 {
565 unsigned char msg[4];
566 unsigned int len;
567
568 /* We got the flags from the SMI, now handle them. */
569 len = smi_info->handlers->get_result(smi_info->si_sm, msg, 4);
570 if (msg[2] != 0) {
571 /* Error fetching flags, just give up for now. */
572 smi_info->si_state = SI_NORMAL;
573 } else if (len < 4) {
574 /*
575 * Hmm, no flags. That's technically illegal, but
576 * don't use uninitialized data.
577 */
578 smi_info->si_state = SI_NORMAL;
579 } else {
580 smi_info->msg_flags = msg[3];
581 handle_flags(smi_info);
582 }
583 break;
584 }
585
586 case SI_CLEARING_FLAGS:
587 {
588 unsigned char msg[3];
589
590 /* We cleared the flags. */
591 smi_info->handlers->get_result(smi_info->si_sm, msg, 3);
592 if (msg[2] != 0) {
593 /* Error clearing flags */
594 dev_warn_ratelimited(smi_info->io.dev,
595 "Error clearing flags: %2.2x\n", msg[2]);
596 }
597 smi_info->si_state = SI_NORMAL;
598 break;
599 }
600
601 case SI_GETTING_EVENTS:
602 {
603 smi_info->curr_msg->rsp_size
604 = smi_info->handlers->get_result(
605 smi_info->si_sm,
606 smi_info->curr_msg->rsp,
607 IPMI_MAX_MSG_LENGTH);
608
609 /*
610 * Do this here becase deliver_recv_msg() releases the
611 * lock, and a new message can be put in during the
612 * time the lock is released.
613 */
614 msg = smi_info->curr_msg;
615 smi_info->curr_msg = NULL;
616 if (msg->rsp[2] != 0) {
617 /* Error getting event, probably done. */
618 msg->done(msg);
619
620 /* Take off the event flag. */
621 smi_info->msg_flags &= ~EVENT_MSG_BUFFER_FULL;
622 handle_flags(smi_info);
623 } else {
624 smi_inc_stat(smi_info, events);
625
626 /*
627 * Do this before we deliver the message
628 * because delivering the message releases the
629 * lock and something else can mess with the
630 * state.
631 */
632 handle_flags(smi_info);
633
634 deliver_recv_msg(smi_info, msg);
635 }
636 break;
637 }
638
639 case SI_GETTING_MESSAGES:
640 {
641 smi_info->curr_msg->rsp_size
642 = smi_info->handlers->get_result(
643 smi_info->si_sm,
644 smi_info->curr_msg->rsp,
645 IPMI_MAX_MSG_LENGTH);
646
647 /*
648 * Do this here becase deliver_recv_msg() releases the
649 * lock, and a new message can be put in during the
650 * time the lock is released.
651 */
652 msg = smi_info->curr_msg;
653 smi_info->curr_msg = NULL;
654 if (msg->rsp[2] != 0) {
655 /* Error getting event, probably done. */
656 msg->done(msg);
657
658 /* Take off the msg flag. */
659 smi_info->msg_flags &= ~RECEIVE_MSG_AVAIL;
660 handle_flags(smi_info);
661 } else {
662 smi_inc_stat(smi_info, incoming_messages);
663
664 /*
665 * Do this before we deliver the message
666 * because delivering the message releases the
667 * lock and something else can mess with the
668 * state.
669 */
670 handle_flags(smi_info);
671
672 deliver_recv_msg(smi_info, msg);
673 }
674 break;
675 }
676
677 case SI_CHECKING_ENABLES:
678 {
679 unsigned char msg[4];
680 u8 enables;
681 bool irq_on;
682
683 /* We got the flags from the SMI, now handle them. */
684 smi_info->handlers->get_result(smi_info->si_sm, msg, 4);
685 if (msg[2] != 0) {
686 dev_warn_ratelimited(smi_info->io.dev,
> 687 "Couldn't get irq info: %x,\n"
688 "Maybe ok, but ipmi might run very slowly.\n"
> 689 msg[2]);
690 smi_info->si_state = SI_NORMAL;
691 break;
692 }
693 enables = current_global_enables(smi_info, 0, &irq_on);
694 if (smi_info->io.si_type == SI_BT)
695 /* BT has its own interrupt enable bit. */
696 check_bt_irq(smi_info, irq_on);
697 if (enables != (msg[3] & GLOBAL_ENABLES_MASK)) {
698 /* Enables are not correct, fix them. */
699 msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
700 msg[1] = IPMI_SET_BMC_GLOBAL_ENABLES_CMD;
701 msg[2] = enables | (msg[3] & ~GLOBAL_ENABLES_MASK);
702 smi_info->handlers->start_transaction(
703 smi_info->si_sm, msg, 3);
704 smi_info->si_state = SI_SETTING_ENABLES;
705 } else if (smi_info->supports_event_msg_buff) {
706 smi_info->curr_msg = ipmi_alloc_smi_msg();
707 if (!smi_info->curr_msg) {
708 smi_info->si_state = SI_NORMAL;
709 break;
710 }
711 start_getting_events(smi_info);
712 } else {
713 smi_info->si_state = SI_NORMAL;
714 }
715 break;
716 }
717
718 case SI_SETTING_ENABLES:
719 {
720 unsigned char msg[4];
721
722 smi_info->handlers->get_result(smi_info->si_sm, msg, 4);
723 if (msg[2] != 0)
724 dev_warn_ratelimited(smi_info->io.dev,
725 "Could not set the global enables: 0x%x.\n",
726 msg[2]);
727
728 if (smi_info->supports_event_msg_buff) {
729 smi_info->curr_msg = ipmi_alloc_smi_msg();
730 if (!smi_info->curr_msg) {
731 smi_info->si_state = SI_NORMAL;
732 break;
733 }
734 start_getting_events(smi_info);
735 } else {
736 smi_info->si_state = SI_NORMAL;
737 }
738 break;
739 }
740 }
741 }
742
---
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 v5] platform/x86: acer-wmi: Add Turbo Mode support for Acer PH315-53
by kernel test robot
Hi JafarAkhondali,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING 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/JafarAkhondali/platform-x86-acer...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1746f4db513563bb22e0ba0c419d0c90912dfae1
config: x86_64-randconfig-a011-20210812 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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/292cfa3c9af2eb61b782c6d94d08d3530...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review JafarAkhondali/platform-x86-acer-wmi-Add-Turbo-Mode-support-for-Acer-PH315-53/20210812-212347
git checkout 292cfa3c9af2eb61b782c6d94d08d35300318ca3
# 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/platform/x86/acer-wmi.c:1466:6: warning: no previous prototype for function 'WMID_gaming_set_fan_mode' [-Wmissing-prototypes]
void WMID_gaming_set_fan_mode(u8 fan_mode)
^
drivers/platform/x86/acer-wmi.c:1466:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void WMID_gaming_set_fan_mode(u8 fan_mode)
^
static
1 warning generated.
vim +/WMID_gaming_set_fan_mode +1466 drivers/platform/x86/acer-wmi.c
1465
> 1466 void WMID_gaming_set_fan_mode(u8 fan_mode)
1467 {
1468 /* fan_mode = 1 is used for auto, fan_mode = 2 used for turbo*/
1469 u64 gpu_fan_config1 = 0, gpu_fan_config2 = 0;
1470 int i;
1471
1472 if (quirks->cpu_fans > 0)
1473 gpu_fan_config2 |= 1;
1474 for (i = 0; i < (quirks->cpu_fans + quirks->gpu_fans); ++i)
1475 gpu_fan_config2 |= 1 << (i + 1);
1476 for (i = 0; i < quirks->gpu_fans; ++i)
1477 gpu_fan_config2 |= 1 << (i + 3);
1478 if (quirks->cpu_fans > 0)
1479 gpu_fan_config1 |= fan_mode;
1480 for (i = 0; i < (quirks->cpu_fans + quirks->gpu_fans); ++i)
1481 gpu_fan_config1 |= fan_mode << (2 * i + 2);
1482 for (i = 0; i < quirks->gpu_fans; ++i)
1483 gpu_fan_config1 |= fan_mode << (2 * i + 6);
1484 WMID_gaming_set_u64(gpu_fan_config2 | gpu_fan_config1 << 16, ACER_CAP_TURBO_FAN);
1485 }
1486
---
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/xmon/xmon.c:3174 show_task() warn: unsigned 'p_state' is never less than zero.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1746f4db513563bb22e0ba0c419d0c90912dfae1
commit: 2f064a59a11ff9bc22e52e9678bc601404c7cb34 sched: Change task_struct::state
date: 8 weeks ago
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>
New smatch warnings:
arch/powerpc/xmon/xmon.c:3174 show_task() warn: unsigned 'p_state' is never less than zero.
Old smatch warnings:
arch/powerpc/include/asm/mmu.h:233 early_mmu_has_feature() warn: bitwise AND condition is false here
arch/powerpc/xmon/xmon.c:2798 dump() warn: '"d?
vim +/p_state +3174 arch/powerpc/xmon/xmon.c
3162
3163 static void show_task(struct task_struct *tsk)
3164 {
3165 unsigned int p_state = READ_ONCE(tsk->__state);
3166 char state;
3167
3168 /*
3169 * Cloned from kdb_task_state_char(), which is not entirely
3170 * appropriate for calling from xmon. This could be moved
3171 * to a common, generic, routine used by both.
3172 */
3173 state = (p_state == 0) ? 'R' :
> 3174 (p_state < 0) ? 'U' :
3175 (p_state & TASK_UNINTERRUPTIBLE) ? 'D' :
3176 (p_state & TASK_STOPPED) ? 'T' :
3177 (p_state & TASK_TRACED) ? 'C' :
3178 (tsk->exit_state & EXIT_ZOMBIE) ? 'Z' :
3179 (tsk->exit_state & EXIT_DEAD) ? 'E' :
3180 (p_state & TASK_INTERRUPTIBLE) ? 'S' : '?';
3181
3182 printf("%16px %16lx %16px %6d %6d %c %2d %s\n", tsk,
3183 tsk->thread.ksp, tsk->thread.regs,
3184 tsk->pid, rcu_dereference(tsk->parent)->pid,
3185 state, task_cpu(tsk),
3186 tsk->comm);
3187 }
3188
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month