oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [opencloudos:next 6514/6518] drivers/crypto/ccp/hygon/hct.c:2098:6: warning: no previous prototype for 'hct_noiommu_set_memory_wb'
@ 2024-05-07 18:37 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-07 18:37 UTC (permalink / raw)
  To: jasperwang, kaixuxia, frankjpliu, kasong, sagazchen, kernelxing,
	aurelianliu, jason.zeng, wu.zheng, yingbao.jia, pei.p.jia
  Cc: oe-kbuild-all

tree:   https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel.git next
head:   b294718c76ed688d3272e48c431221a8194cd2d3
commit: f0872dfb71fb45aaf2ea14da6e32c68bf43a399f [6514/6518] ccp: supporting memory encryption features for host vfio-noiommu mode, and wb attribute for the bar memory of virtual machine.
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240508/202405080231.NA9geGDj-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240508/202405080231.NA9geGDj-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405080231.NA9geGDj-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/crypto/ccp/hygon/hct.c:1345:15: warning: no previous prototype for 'hct_pin_memory' [-Wmissing-prototypes]
    1345 | struct page **hct_pin_memory(struct hct_private *private, unsigned long uaddr,
         |               ^~~~~~~~~~~~~~
>> drivers/crypto/ccp/hygon/hct.c:2098:6: warning: no previous prototype for 'hct_noiommu_set_memory_wb' [-Wmissing-prototypes]
    2098 | void hct_noiommu_set_memory_wb(unsigned long address)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~


vim +/hct_noiommu_set_memory_wb +2098 drivers/crypto/ccp/hygon/hct.c

  2094	
  2095	/* set the flags PAT, PCT and PWT of page all to 0
  2096	 * for obtaining cache properties.
  2097	 */
> 2098	void hct_noiommu_set_memory_wb(unsigned long address)
  2099	{
  2100		pgd_t *pgd = current->mm->pgd + pgd_index(address);
  2101		p4d_t *p4d;
  2102		pud_t *pud;
  2103		pmd_t *pmd;
  2104		pte_t *pte;
  2105		pte_t old_pte;
  2106		pte_t new_pte;
  2107		pgprot_t new_prot;
  2108		unsigned long pfn;
  2109	
  2110		if (pgd_none(*pgd)) {
  2111			pr_err("pgd val shouldn't be none\n");
  2112			return;
  2113		}
  2114	
  2115		p4d = p4d_offset(pgd, address);
  2116		if (p4d_none(*p4d)) {
  2117			pr_err("p4d val shouldn't be none\n");
  2118			return;
  2119		}
  2120	
  2121		pud = pud_offset(p4d, address);
  2122		if (pud_none(*pud) || pud_large(*pud) || !pud_present(*pud)) {
  2123			pr_err("pud val is invalid.\n");
  2124			return;
  2125		}
  2126	
  2127		pmd = pmd_offset(pud, address);
  2128		if (pmd_none(*pmd) || pmd_large(*pmd) || !pmd_present(*pmd)) {
  2129			pr_err("pmd val is invalid.\n");
  2130			return;
  2131		}
  2132	
  2133		pte = pte_offset_kernel(pmd, address);
  2134		if (pte_none(*pte)) {
  2135			pr_err("pte val shouldn't be none\n");
  2136			return;
  2137		}
  2138	
  2139		old_pte = *pte;
  2140		pfn = pte_pfn(old_pte);
  2141		new_prot = pte_pgprot(old_pte);
  2142		pgprot_val(new_prot) &= ~(_PAGE_PAT | _PAGE_PCD | _PAGE_PWT);
  2143		new_pte = pfn_pte(pfn, new_prot);
  2144		set_pte_atomic(pte, new_pte);
  2145	}
  2146	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

only message in thread, other threads:[~2024-05-07 18:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 18:37 [opencloudos:next 6514/6518] drivers/crypto/ccp/hygon/hct.c:2098:6: warning: no previous prototype for 'hct_noiommu_set_memory_wb' 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;
as well as URLs for NNTP newsgroup(s).