public inbox for [email protected]
 help / color / mirror / Atom feed
* [ammarfaizi2-block:google/android/kernel/common/android13-5.15 5561/5564] arch/arm64/kvm/hyp/nvhe/psci-relay.c:249:6: warning: no previous prototype for 'psci_mem_protect_inc'
@ 2022-03-28 19:12 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-28 19:12 UTC (permalink / raw)
  To: Will Deacon; +Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel

tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android13-5.15
head:   2692f0f6f17ff8ec82ffbcdf2e151249768724a2
commit: 4347917056dadaf7856cce8312eb1c55e1372a2a [5561/5564] ANDROID: KVM: arm64: Use PSCI MEM_PROTECT to zap guest pages on reset
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20220329/[email protected]/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/ammarfaizi2/linux-block/commit/4347917056dadaf7856cce8312eb1c55e1372a2a
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android13-5.15
        git checkout 4347917056dadaf7856cce8312eb1c55e1372a2a
        # 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/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

   arch/arm64/kvm/hyp/nvhe/psci-relay.c:204:28: warning: no previous prototype for 'kvm_host_psci_cpu_entry' [-Wmissing-prototypes]
     204 | asmlinkage void __noreturn kvm_host_psci_cpu_entry(bool is_cpu_on)
         |                            ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kvm/hyp/nvhe/psci-relay.c:249:6: warning: no previous prototype for 'psci_mem_protect_inc' [-Wmissing-prototypes]
     249 | void psci_mem_protect_inc(void)
         |      ^~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kvm/hyp/nvhe/psci-relay.c:256:6: warning: no previous prototype for 'psci_mem_protect_dec' [-Wmissing-prototypes]
     256 | void psci_mem_protect_dec(void)
         |      ^~~~~~~~~~~~~~~~~~~~


vim +/psci_mem_protect_inc +249 arch/arm64/kvm/hyp/nvhe/psci-relay.c

   203	
 > 204	asmlinkage void __noreturn kvm_host_psci_cpu_entry(bool is_cpu_on)
   205	{
   206		struct psci_boot_args *boot_args;
   207		struct kvm_cpu_context *host_ctxt;
   208	
   209		host_ctxt = &this_cpu_ptr(&kvm_host_data)->host_ctxt;
   210	
   211		if (is_cpu_on)
   212			boot_args = this_cpu_ptr(&cpu_on_args);
   213		else
   214			boot_args = this_cpu_ptr(&suspend_args);
   215	
   216		cpu_reg(host_ctxt, 0) = boot_args->r0;
   217		write_sysreg_el2(boot_args->pc, SYS_ELR);
   218	
   219		if (is_cpu_on)
   220			release_boot_args(boot_args);
   221	
   222		__host_enter(host_ctxt);
   223	}
   224	
   225	static DEFINE_HYP_SPINLOCK(mem_protect_lock);
   226	
   227	static u64 psci_mem_protect(s64 offset)
   228	{
   229		static u64 cnt;
   230		u64 new = cnt + offset;
   231	
   232		hyp_assert_lock_held(&mem_protect_lock);
   233	
   234		if (!offset || kvm_host_psci_config.version < PSCI_VERSION(1, 1))
   235			return cnt;
   236	
   237		if (!cnt || !new)
   238			psci_call(PSCI_1_1_FN64_MEM_PROTECT, offset < 0 ? 0 : 1, 0, 0);
   239	
   240		cnt = new;
   241		return cnt;
   242	}
   243	
   244	static bool psci_mem_protect_active(void)
   245	{
   246		return psci_mem_protect(0);
   247	}
   248	
 > 249	void psci_mem_protect_inc(void)
   250	{
   251		hyp_spin_lock(&mem_protect_lock);
   252		psci_mem_protect(1);
   253		hyp_spin_unlock(&mem_protect_lock);
   254	}
   255	
 > 256	void psci_mem_protect_dec(void)
   257	{
   258		hyp_spin_lock(&mem_protect_lock);
   259		psci_mem_protect(-1);
   260		hyp_spin_unlock(&mem_protect_lock);
   261	}
   262	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-28 19:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-28 19:12 [ammarfaizi2-block:google/android/kernel/common/android13-5.15 5561/5564] arch/arm64/kvm/hyp/nvhe/psci-relay.c:249:6: warning: no previous prototype for 'psci_mem_protect_inc' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox