llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [davidhildenbrand:pfn_cow 1/8] arch/x86/mm/pat/memtype.c:977:45: error: no member named 'pat_cachemode' in 'struct vma_pfnmap_ctx'
Date: Sun, 10 Mar 2024 08:23:31 +0800	[thread overview]
Message-ID: <202403100812.f7oiFzER-lkp@intel.com> (raw)

tree:   https://github.com/davidhildenbrand/linux pfn_cow
head:   00b7acecadc66f73e664b6bffeb7a237a9c0a47a
commit: abd1306234acff20b98e11f44f3dfaadc40a15c5 [1/8] x86/mm/pat: don't rely on PTE information in COW mappings
config: x86_64-buildonly-randconfig-001-20240309 (https://download.01.org/0day-ci/archive/20240310/202403100812.f7oiFzER-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240310/202403100812.f7oiFzER-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/202403100812.f7oiFzER-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/mm/pat/memtype.c:977:45: error: no member named 'pat_cachemode' in 'struct vma_pfnmap_ctx'
     977 |                         prot = cachemode2protval(vma->pfnmap_ctx.pat_cachemode);
         |                                                  ~~~~~~~~~~~~~~~ ^
   arch/x86/mm/pat/memtype.c:1009:20: error: no member named 'pat_cachemode' in 'struct vma_pfnmap_ctx'
    1009 |                         vma->pfnmap_ctx.pat_cachemode = pgprot2cachemode(*prot);
         |                         ~~~~~~~~~~~~~~~ ^
   2 errors generated.


vim +977 arch/x86/mm/pat/memtype.c

   952	
   953	/*
   954	 * track_pfn_copy is called when vma that is covering the pfnmap gets
   955	 * copied through copy_page_range().
   956	 *
   957	 * If the vma has a linear pfn mapping for the entire range, we get the prot
   958	 * from pte and reserve the entire vma range with single reserve_pfn_range call.
   959	 */
   960	int track_pfn_copy(struct vm_area_struct *vma)
   961	{
   962		resource_size_t paddr;
   963		unsigned long prot;
   964		unsigned long vma_size = vma->vm_end - vma->vm_start;
   965		pgprot_t pgprot;
   966	
   967		if (vma->vm_flags & VM_PAT) {
   968			/*
   969			 * reserve the whole chunk covered by vma. We need the
   970			 * starting address and protection from pte.
   971			 *
   972			 * For COW mappings, we have the PFN in vma->vm_pgoff, see
   973			 * remap_pfn_range_notrack().
   974			 */
   975			if (is_cow_mapping(vma->vm_flags)) {
   976				paddr = (resource_size_t)vma->vm_pgoff << PAGE_SHIFT;
 > 977				prot = cachemode2protval(vma->pfnmap_ctx.pat_cachemode);
   978			} else if (follow_phys(vma, vma->vm_start, 0, &prot, &paddr)) {
   979				WARN_ON_ONCE(1);
   980				return -EINVAL;
   981			}
   982			pgprot = __pgprot(prot);
   983			return reserve_pfn_range(paddr, vma_size, &pgprot, 1);
   984		}
   985	
   986		return 0;
   987	}
   988	

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

                 reply	other threads:[~2024-03-10  0:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202403100812.f7oiFzER-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=david@redhat.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 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).