All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linuxppc-dev@lists.ozlabs.org, kbuild-all@lists.01.org
Subject: [powerpc:next-test 31/71] arch/powerpc/mm/nohash/fsl_book3e.c:126:40: error: '_PAGE_BAP_SX' undeclared
Date: Sun, 31 Oct 2021 00:40:33 +0800	[thread overview]
Message-ID: <202110310018.CixV3K5n-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5312 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head:   81291383ffde08b23bce75e7d6b2575ce9d3475c
commit: 01116e6e98b08ab0641fa516ddafb1b1b2088e64 [31/71] powerpc/fsl_booke: Take exec flag into account when setting TLBCAMs
config: powerpc-ge_imp3a_defconfig (attached as .config)
compiler: powerpc-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://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=01116e6e98b08ab0641fa516ddafb1b1b2088e64
        git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
        git fetch --no-tags powerpc next-test
        git checkout 01116e6e98b08ab0641fa516ddafb1b1b2088e64
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash

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

Note: the powerpc/next-test HEAD 81291383ffde08b23bce75e7d6b2575ce9d3475c builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   arch/powerpc/mm/nohash/fsl_book3e.c:63:15: error: no previous prototype for 'tlbcam_sz' [-Werror=missing-prototypes]
      63 | unsigned long tlbcam_sz(int idx)
         |               ^~~~~~~~~
   arch/powerpc/mm/nohash/fsl_book3e.c: In function 'settlbcam':
>> arch/powerpc/mm/nohash/fsl_book3e.c:126:40: error: '_PAGE_BAP_SX' undeclared (first use in this function)
     126 |         TLBCAM[index].MAS3 |= (flags & _PAGE_BAP_SX) ? MAS3_SX : 0;
         |                                        ^~~~~~~~~~~~
   arch/powerpc/mm/nohash/fsl_book3e.c:126:40: note: each undeclared identifier is reported only once for each function it appears in
   cc1: all warnings being treated as errors


vim +/_PAGE_BAP_SX +126 arch/powerpc/mm/nohash/fsl_book3e.c

    62	
  > 63	unsigned long tlbcam_sz(int idx)
    64	{
    65		return tlbcam_addrs[idx].limit - tlbcam_addrs[idx].start + 1;
    66	}
    67	
    68	#ifdef CONFIG_FSL_BOOKE
    69	/*
    70	 * Return PA for this VA if it is mapped by a CAM, or 0
    71	 */
    72	phys_addr_t v_block_mapped(unsigned long va)
    73	{
    74		int b;
    75		for (b = 0; b < tlbcam_index; ++b)
    76			if (va >= tlbcam_addrs[b].start && va < tlbcam_addrs[b].limit)
    77				return tlbcam_addrs[b].phys + (va - tlbcam_addrs[b].start);
    78		return 0;
    79	}
    80	
    81	/*
    82	 * Return VA for a given PA or 0 if not mapped
    83	 */
    84	unsigned long p_block_mapped(phys_addr_t pa)
    85	{
    86		int b;
    87		for (b = 0; b < tlbcam_index; ++b)
    88			if (pa >= tlbcam_addrs[b].phys
    89				&& pa < (tlbcam_addrs[b].limit-tlbcam_addrs[b].start)
    90			              +tlbcam_addrs[b].phys)
    91				return tlbcam_addrs[b].start+(pa-tlbcam_addrs[b].phys);
    92		return 0;
    93	}
    94	#endif
    95	
    96	/*
    97	 * Set up a variable-size TLB entry (tlbcam). The parameters are not checked;
    98	 * in particular size must be a power of 4 between 4k and the max supported by
    99	 * an implementation; max may further be limited by what can be represented in
   100	 * an unsigned long (for example, 32-bit implementations cannot support a 4GB
   101	 * size).
   102	 */
   103	static void settlbcam(int index, unsigned long virt, phys_addr_t phys,
   104			unsigned long size, unsigned long flags, unsigned int pid)
   105	{
   106		unsigned int tsize;
   107	
   108		tsize = __ilog2(size) - 10;
   109	
   110	#if defined(CONFIG_SMP) || defined(CONFIG_PPC_E500MC)
   111		if ((flags & _PAGE_NO_CACHE) == 0)
   112			flags |= _PAGE_COHERENT;
   113	#endif
   114	
   115		TLBCAM[index].MAS0 = MAS0_TLBSEL(1) | MAS0_ESEL(index) | MAS0_NV(index+1);
   116		TLBCAM[index].MAS1 = MAS1_VALID | MAS1_IPROT | MAS1_TSIZE(tsize) | MAS1_TID(pid);
   117		TLBCAM[index].MAS2 = virt & PAGE_MASK;
   118	
   119		TLBCAM[index].MAS2 |= (flags & _PAGE_WRITETHRU) ? MAS2_W : 0;
   120		TLBCAM[index].MAS2 |= (flags & _PAGE_NO_CACHE) ? MAS2_I : 0;
   121		TLBCAM[index].MAS2 |= (flags & _PAGE_COHERENT) ? MAS2_M : 0;
   122		TLBCAM[index].MAS2 |= (flags & _PAGE_GUARDED) ? MAS2_G : 0;
   123		TLBCAM[index].MAS2 |= (flags & _PAGE_ENDIAN) ? MAS2_E : 0;
   124	
   125		TLBCAM[index].MAS3 = (phys & MAS3_RPN) | MAS3_SR;
 > 126		TLBCAM[index].MAS3 |= (flags & _PAGE_BAP_SX) ? MAS3_SX : 0;
   127		TLBCAM[index].MAS3 |= (flags & _PAGE_RW) ? MAS3_SW : 0;
   128		if (mmu_has_feature(MMU_FTR_BIG_PHYS))
   129			TLBCAM[index].MAS7 = (u64)phys >> 32;
   130	
   131		/* Below is unlikely -- only for large user pages or similar */
   132		if (pte_user(__pte(flags))) {
   133			TLBCAM[index].MAS3 |= MAS3_UR;
   134			TLBCAM[index].MAS3 |= (flags & _PAGE_EXEC) ? MAS3_UX : 0;
   135			TLBCAM[index].MAS3 |= (flags & _PAGE_RW) ? MAS3_UW : 0;
   136		}
   137	
   138		tlbcam_addrs[index].start = virt;
   139		tlbcam_addrs[index].limit = virt + size - 1;
   140		tlbcam_addrs[index].phys = phys;
   141	}
   142	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21066 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [powerpc:next-test 31/71] arch/powerpc/mm/nohash/fsl_book3e.c:126:40: error: '_PAGE_BAP_SX' undeclared
Date: Sun, 31 Oct 2021 00:40:33 +0800	[thread overview]
Message-ID: <202110310018.CixV3K5n-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5436 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head:   81291383ffde08b23bce75e7d6b2575ce9d3475c
commit: 01116e6e98b08ab0641fa516ddafb1b1b2088e64 [31/71] powerpc/fsl_booke: Take exec flag into account when setting TLBCAMs
config: powerpc-ge_imp3a_defconfig (attached as .config)
compiler: powerpc-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://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=01116e6e98b08ab0641fa516ddafb1b1b2088e64
        git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
        git fetch --no-tags powerpc next-test
        git checkout 01116e6e98b08ab0641fa516ddafb1b1b2088e64
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash

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

Note: the powerpc/next-test HEAD 81291383ffde08b23bce75e7d6b2575ce9d3475c builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   arch/powerpc/mm/nohash/fsl_book3e.c:63:15: error: no previous prototype for 'tlbcam_sz' [-Werror=missing-prototypes]
      63 | unsigned long tlbcam_sz(int idx)
         |               ^~~~~~~~~
   arch/powerpc/mm/nohash/fsl_book3e.c: In function 'settlbcam':
>> arch/powerpc/mm/nohash/fsl_book3e.c:126:40: error: '_PAGE_BAP_SX' undeclared (first use in this function)
     126 |         TLBCAM[index].MAS3 |= (flags & _PAGE_BAP_SX) ? MAS3_SX : 0;
         |                                        ^~~~~~~~~~~~
   arch/powerpc/mm/nohash/fsl_book3e.c:126:40: note: each undeclared identifier is reported only once for each function it appears in
   cc1: all warnings being treated as errors


vim +/_PAGE_BAP_SX +126 arch/powerpc/mm/nohash/fsl_book3e.c

    62	
  > 63	unsigned long tlbcam_sz(int idx)
    64	{
    65		return tlbcam_addrs[idx].limit - tlbcam_addrs[idx].start + 1;
    66	}
    67	
    68	#ifdef CONFIG_FSL_BOOKE
    69	/*
    70	 * Return PA for this VA if it is mapped by a CAM, or 0
    71	 */
    72	phys_addr_t v_block_mapped(unsigned long va)
    73	{
    74		int b;
    75		for (b = 0; b < tlbcam_index; ++b)
    76			if (va >= tlbcam_addrs[b].start && va < tlbcam_addrs[b].limit)
    77				return tlbcam_addrs[b].phys + (va - tlbcam_addrs[b].start);
    78		return 0;
    79	}
    80	
    81	/*
    82	 * Return VA for a given PA or 0 if not mapped
    83	 */
    84	unsigned long p_block_mapped(phys_addr_t pa)
    85	{
    86		int b;
    87		for (b = 0; b < tlbcam_index; ++b)
    88			if (pa >= tlbcam_addrs[b].phys
    89				&& pa < (tlbcam_addrs[b].limit-tlbcam_addrs[b].start)
    90			              +tlbcam_addrs[b].phys)
    91				return tlbcam_addrs[b].start+(pa-tlbcam_addrs[b].phys);
    92		return 0;
    93	}
    94	#endif
    95	
    96	/*
    97	 * Set up a variable-size TLB entry (tlbcam). The parameters are not checked;
    98	 * in particular size must be a power of 4 between 4k and the max supported by
    99	 * an implementation; max may further be limited by what can be represented in
   100	 * an unsigned long (for example, 32-bit implementations cannot support a 4GB
   101	 * size).
   102	 */
   103	static void settlbcam(int index, unsigned long virt, phys_addr_t phys,
   104			unsigned long size, unsigned long flags, unsigned int pid)
   105	{
   106		unsigned int tsize;
   107	
   108		tsize = __ilog2(size) - 10;
   109	
   110	#if defined(CONFIG_SMP) || defined(CONFIG_PPC_E500MC)
   111		if ((flags & _PAGE_NO_CACHE) == 0)
   112			flags |= _PAGE_COHERENT;
   113	#endif
   114	
   115		TLBCAM[index].MAS0 = MAS0_TLBSEL(1) | MAS0_ESEL(index) | MAS0_NV(index+1);
   116		TLBCAM[index].MAS1 = MAS1_VALID | MAS1_IPROT | MAS1_TSIZE(tsize) | MAS1_TID(pid);
   117		TLBCAM[index].MAS2 = virt & PAGE_MASK;
   118	
   119		TLBCAM[index].MAS2 |= (flags & _PAGE_WRITETHRU) ? MAS2_W : 0;
   120		TLBCAM[index].MAS2 |= (flags & _PAGE_NO_CACHE) ? MAS2_I : 0;
   121		TLBCAM[index].MAS2 |= (flags & _PAGE_COHERENT) ? MAS2_M : 0;
   122		TLBCAM[index].MAS2 |= (flags & _PAGE_GUARDED) ? MAS2_G : 0;
   123		TLBCAM[index].MAS2 |= (flags & _PAGE_ENDIAN) ? MAS2_E : 0;
   124	
   125		TLBCAM[index].MAS3 = (phys & MAS3_RPN) | MAS3_SR;
 > 126		TLBCAM[index].MAS3 |= (flags & _PAGE_BAP_SX) ? MAS3_SX : 0;
   127		TLBCAM[index].MAS3 |= (flags & _PAGE_RW) ? MAS3_SW : 0;
   128		if (mmu_has_feature(MMU_FTR_BIG_PHYS))
   129			TLBCAM[index].MAS7 = (u64)phys >> 32;
   130	
   131		/* Below is unlikely -- only for large user pages or similar */
   132		if (pte_user(__pte(flags))) {
   133			TLBCAM[index].MAS3 |= MAS3_UR;
   134			TLBCAM[index].MAS3 |= (flags & _PAGE_EXEC) ? MAS3_UX : 0;
   135			TLBCAM[index].MAS3 |= (flags & _PAGE_RW) ? MAS3_UW : 0;
   136		}
   137	
   138		tlbcam_addrs[index].start = virt;
   139		tlbcam_addrs[index].limit = virt + size - 1;
   140		tlbcam_addrs[index].phys = phys;
   141	}
   142	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 21066 bytes --]

             reply	other threads:[~2021-10-30 16:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-30 16:40 kernel test robot [this message]
2021-10-30 16:40 ` [powerpc:next-test 31/71] arch/powerpc/mm/nohash/fsl_book3e.c:126:40: error: '_PAGE_BAP_SX' undeclared 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=202110310018.CixV3K5n-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=kbuild-all@lists.01.org \
    --cc=linuxppc-dev@lists.ozlabs.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.