All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Zhen Lei <thunder.leizhen@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Zhen Lei <thunder.leizhen@huawei.com>,
	James Morse <james.morse@arm.com>,
	Christoffer Dall <cdall@linaro.org>
Subject: Re: [PATCH] arm64: add the printing of tpidr_elx in __show_regs()
Date: Wed, 16 Mar 2022 04:45:33 +0800	[thread overview]
Message-ID: <202203160424.FIKayRYG-lkp@intel.com> (raw)
In-Reply-To: <20220315110926.1060-1-thunder.leizhen@huawei.com>

Hi Zhen,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on arm-perf/for-next/perf arm/for-next xilinx-xlnx/master soc/for-next kvmarm/next v5.17-rc8 next-20220315]
[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/Zhen-Lei/arm64-add-the-printing-of-tpidr_elx-in-__show_regs/20220315-191234
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-randconfig-r024-20220313 (https://download.01.org/0day-ci/archive/20220316/202203160424.FIKayRYG-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.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/1a42e34104d70b0b90fe074ba96f2c04d33ffb23
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhen-Lei/arm64-add-the-printing-of-tpidr_elx-in-__show_regs/20220315-191234
        git checkout 1a42e34104d70b0b90fe074ba96f2c04d33ffb23
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:22,
                    from arch/arm64/include/asm/bug.h:26,
                    from include/linux/bug.h:5,
                    from arch/arm64/include/asm/cpufeature.h:19,
                    from arch/arm64/include/asm/hwcap.h:9,
                    from arch/arm64/include/asm/arch_timer.h:12,
                    from arch/arm64/include/asm/timex.h:8,
                    from include/linux/timex.h:65,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/compat.h:10,
                    from arch/arm64/kernel/process.c:9:
   arch/arm64/kernel/process.c: In function '__show_regs':
>> arch/arm64/kernel/process.c:220:24: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'void *' [-Wformat=]
     220 |                 printk("tpidr : %016lx\n", this_cpu_ptr(NULL));
         |                        ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:418:25: note: in definition of macro 'printk_index_wrap'
     418 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   arch/arm64/kernel/process.c:220:17: note: in expansion of macro 'printk'
     220 |                 printk("tpidr : %016lx\n", this_cpu_ptr(NULL));
         |                 ^~~~~~
   arch/arm64/kernel/process.c:220:38: note: format string is defined here
     220 |                 printk("tpidr : %016lx\n", this_cpu_ptr(NULL));
         |                                 ~~~~~^
         |                                      |
         |                                      long unsigned int
         |                                 %016p


vim +220 arch/arm64/kernel/process.c

   200	
   201	void __show_regs(struct pt_regs *regs)
   202	{
   203		int i, top_reg;
   204		u64 lr, sp;
   205	
   206		if (compat_user_mode(regs)) {
   207			lr = regs->compat_lr;
   208			sp = regs->compat_sp;
   209			top_reg = 12;
   210		} else {
   211			lr = regs->regs[30];
   212			sp = regs->sp;
   213			top_reg = 29;
   214		}
   215	
   216		show_regs_print_info(KERN_DEFAULT);
   217		print_pstate(regs);
   218	
   219		if (IS_ENABLED(CONFIG_SMP))
 > 220			printk("tpidr : %016lx\n", this_cpu_ptr(NULL));
   221	
   222		if (!user_mode(regs)) {
   223			printk("pc : %pS\n", (void *)regs->pc);
   224			printk("lr : %pS\n", (void *)ptrauth_strip_insn_pac(lr));
   225		} else {
   226			printk("pc : %016llx\n", regs->pc);
   227			printk("lr : %016llx\n", lr);
   228		}
   229	
   230		printk("sp : %016llx\n", sp);
   231	
   232		if (system_uses_irq_prio_masking())
   233			printk("pmr_save: %08llx\n", regs->pmr_save);
   234	
   235		i = top_reg;
   236	
   237		while (i >= 0) {
   238			printk("x%-2d: %016llx", i, regs->regs[i]);
   239	
   240			while (i-- % 3)
   241				pr_cont(" x%-2d: %016llx", i, regs->regs[i]);
   242	
   243			pr_cont("\n");
   244		}
   245	}
   246	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Zhen Lei <thunder.leizhen@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Zhen Lei <thunder.leizhen@huawei.com>,
	James Morse <james.morse@arm.com>,
	Christoffer Dall <cdall@linaro.org>
Subject: Re: [PATCH] arm64: add the printing of tpidr_elx in __show_regs()
Date: Wed, 16 Mar 2022 04:45:33 +0800	[thread overview]
Message-ID: <202203160424.FIKayRYG-lkp@intel.com> (raw)
In-Reply-To: <20220315110926.1060-1-thunder.leizhen@huawei.com>

Hi Zhen,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on arm-perf/for-next/perf arm/for-next xilinx-xlnx/master soc/for-next kvmarm/next v5.17-rc8 next-20220315]
[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/Zhen-Lei/arm64-add-the-printing-of-tpidr_elx-in-__show_regs/20220315-191234
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-randconfig-r024-20220313 (https://download.01.org/0day-ci/archive/20220316/202203160424.FIKayRYG-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.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/1a42e34104d70b0b90fe074ba96f2c04d33ffb23
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhen-Lei/arm64-add-the-printing-of-tpidr_elx-in-__show_regs/20220315-191234
        git checkout 1a42e34104d70b0b90fe074ba96f2c04d33ffb23
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:22,
                    from arch/arm64/include/asm/bug.h:26,
                    from include/linux/bug.h:5,
                    from arch/arm64/include/asm/cpufeature.h:19,
                    from arch/arm64/include/asm/hwcap.h:9,
                    from arch/arm64/include/asm/arch_timer.h:12,
                    from arch/arm64/include/asm/timex.h:8,
                    from include/linux/timex.h:65,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/compat.h:10,
                    from arch/arm64/kernel/process.c:9:
   arch/arm64/kernel/process.c: In function '__show_regs':
>> arch/arm64/kernel/process.c:220:24: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'void *' [-Wformat=]
     220 |                 printk("tpidr : %016lx\n", this_cpu_ptr(NULL));
         |                        ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:418:25: note: in definition of macro 'printk_index_wrap'
     418 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   arch/arm64/kernel/process.c:220:17: note: in expansion of macro 'printk'
     220 |                 printk("tpidr : %016lx\n", this_cpu_ptr(NULL));
         |                 ^~~~~~
   arch/arm64/kernel/process.c:220:38: note: format string is defined here
     220 |                 printk("tpidr : %016lx\n", this_cpu_ptr(NULL));
         |                                 ~~~~~^
         |                                      |
         |                                      long unsigned int
         |                                 %016p


vim +220 arch/arm64/kernel/process.c

   200	
   201	void __show_regs(struct pt_regs *regs)
   202	{
   203		int i, top_reg;
   204		u64 lr, sp;
   205	
   206		if (compat_user_mode(regs)) {
   207			lr = regs->compat_lr;
   208			sp = regs->compat_sp;
   209			top_reg = 12;
   210		} else {
   211			lr = regs->regs[30];
   212			sp = regs->sp;
   213			top_reg = 29;
   214		}
   215	
   216		show_regs_print_info(KERN_DEFAULT);
   217		print_pstate(regs);
   218	
   219		if (IS_ENABLED(CONFIG_SMP))
 > 220			printk("tpidr : %016lx\n", this_cpu_ptr(NULL));
   221	
   222		if (!user_mode(regs)) {
   223			printk("pc : %pS\n", (void *)regs->pc);
   224			printk("lr : %pS\n", (void *)ptrauth_strip_insn_pac(lr));
   225		} else {
   226			printk("pc : %016llx\n", regs->pc);
   227			printk("lr : %016llx\n", lr);
   228		}
   229	
   230		printk("sp : %016llx\n", sp);
   231	
   232		if (system_uses_irq_prio_masking())
   233			printk("pmr_save: %08llx\n", regs->pmr_save);
   234	
   235		i = top_reg;
   236	
   237		while (i >= 0) {
   238			printk("x%-2d: %016llx", i, regs->regs[i]);
   239	
   240			while (i-- % 3)
   241				pr_cont(" x%-2d: %016llx", i, regs->regs[i]);
   242	
   243			pr_cont("\n");
   244		}
   245	}
   246	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

  parent reply	other threads:[~2022-03-15 20:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 11:09 [PATCH] arm64: add the printing of tpidr_elx in __show_regs() Zhen Lei
2022-03-15 11:09 ` Zhen Lei
2022-03-15 19:54 ` kernel test robot
2022-03-15 19:54   ` kernel test robot
2022-03-15 20:45 ` kernel test robot [this message]
2022-03-15 20:45   ` kernel test robot
2022-03-15 20:55 ` kernel test robot
2022-03-15 20:55   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202203160424.FIKayRYG-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=cdall@linaro.org \
    --cc=james.morse@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thunder.leizhen@huawei.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.