linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* memory_model.h:64:14: error: implicit declaration of function 'page_to_section'
@ 2021-02-03 15:51 Naresh Kamboju
  2021-02-03 19:55 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Naresh Kamboju @ 2021-02-03 15:51 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Linux Next Mailing List, linux-mm,
	Linux-Arch, lkft-triage, linux-mips, Linux-sh list
  Cc: Randy Dunlap, Stephen Rothwell, Arnd Bergmann, Andrew Morton,
	Geert Uytterhoeven, Pavel Tatashin

Linux next tag 20210203 the mips and sh builds failed due to below errors.
Following builds failed with gcc-8, gcc-9 and gcc-10,
  - mips (cavium_octeon_defconfig)
  - sh (defconfig)
  - sh (shx3_defconfig)

make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=mips
CROSS_COMPILE=mips-linux-gnu- 'CC=sccache mips-linux-gnu-gcc'
'HOSTCC=sccache gcc' uImage.gz
In file included from arch/mips/include/asm/page.h:258,
                 from arch/mips/include/asm/io.h:29,
                 from include/linux/io.h:13,
                 from arch/mips/include/asm/mips-cps.h:10,
                 from arch/mips/include/asm/smp-ops.h:16,
                 from arch/mips/include/asm/smp.h:21,
                 from include/linux/smp.h:84,
                 from arch/mips/include/asm/cpu-type.h:12,
                 from arch/mips/include/asm/timex.h:19,
                 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/mips/kernel/asm-offsets.c:12:
include/linux/mm.h: In function 'is_pinnable_page':
include/asm-generic/memory_model.h:64:14: error: implicit declaration
of function 'page_to_section'; did you mean 'present_section'?
[-Werror=implicit-function-declaration]
  int __sec = page_to_section(__pg);   \
              ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro
'__page_to_pfn'
 #define page_to_pfn __page_to_pfn
                     ^~~~~~~~~~~~~
include/linux/mm.h:1135:15: note: in expansion of macro 'page_to_pfn'
   is_zero_pfn(page_to_pfn(page));
               ^~~~~~~~~~~
In file included from arch/mips/kernel/asm-offsets.c:15:
include/linux/mm.h: At top level:
include/linux/mm.h:1512:29: error: conflicting types for 'page_to_section'
 static inline unsigned long page_to_section(const struct page *page)
                             ^~~~~~~~~~~~~~~
Steps to reproduce:
--------------------------
# TuxMake is a command line tool and Python library that provides
# portable and repeatable Linux kernel builds across a variety of
# architectures, toolchains, kernel configurations, and make targets.
#
# TuxMake supports the concept of runtimes.
# See https://docs.tuxmake.org/runtimes/, for that to work it requires
# that you install podman or docker on your system.
#
# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#
# See https://docs.tuxmake.org/ for complete documentation.


tuxmake --runtime podman --target-arch mips --toolchain gcc-10
--kconfig cavium_octeon_defconfig


-- 
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: memory_model.h:64:14: error: implicit declaration of function 'page_to_section'
  2021-02-03 15:51 memory_model.h:64:14: error: implicit declaration of function 'page_to_section' Naresh Kamboju
@ 2021-02-03 19:55 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2021-02-03 19:55 UTC (permalink / raw)
  To: Naresh Kamboju, Linux Kernel Mailing List,
	Linux Next Mailing List, linux-mm, Linux-Arch, lkft-triage,
	linux-mips, Linux-sh list, Mike Rapoport
  Cc: Stephen Rothwell, Arnd Bergmann, Andrew Morton,
	Geert Uytterhoeven, Pavel Tatashin

On 2/3/21 7:51 AM, Naresh Kamboju wrote:
> Linux next tag 20210203 the mips and sh builds failed due to below errors.
> Following builds failed with gcc-8, gcc-9 and gcc-10,
>   - mips (cavium_octeon_defconfig)
>   - sh (defconfig)
>   - sh (shx3_defconfig)
> 
> make --silent --keep-going --jobs=8
> O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=mips
> CROSS_COMPILE=mips-linux-gnu- 'CC=sccache mips-linux-gnu-gcc'
> 'HOSTCC=sccache gcc' uImage.gz
> In file included from arch/mips/include/asm/page.h:258,
>                  from arch/mips/include/asm/io.h:29,
>                  from include/linux/io.h:13,
>                  from arch/mips/include/asm/mips-cps.h:10,
>                  from arch/mips/include/asm/smp-ops.h:16,
>                  from arch/mips/include/asm/smp.h:21,
>                  from include/linux/smp.h:84,
>                  from arch/mips/include/asm/cpu-type.h:12,
>                  from arch/mips/include/asm/timex.h:19,
>                  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/mips/kernel/asm-offsets.c:12:
> include/linux/mm.h: In function 'is_pinnable_page':
> include/asm-generic/memory_model.h:64:14: error: implicit declaration
> of function 'page_to_section'; did you mean 'present_section'?
> [-Werror=implicit-function-declaration]
>   int __sec = page_to_section(__pg);   \
>               ^~~~~~~~~~~~~~~
> include/asm-generic/memory_model.h:81:21: note: in expansion of macro
> '__page_to_pfn'
>  #define page_to_pfn __page_to_pfn
>                      ^~~~~~~~~~~~~
> include/linux/mm.h:1135:15: note: in expansion of macro 'page_to_pfn'
>    is_zero_pfn(page_to_pfn(page));
>                ^~~~~~~~~~~
> In file included from arch/mips/kernel/asm-offsets.c:15:
> include/linux/mm.h: At top level:
> include/linux/mm.h:1512:29: error: conflicting types for 'page_to_section'
>  static inline unsigned long page_to_section(const struct page *page)
>                              ^~~~~~~~~~~~~~~
> Steps to reproduce:
> --------------------------
> # TuxMake is a command line tool and Python library that provides
> # portable and repeatable Linux kernel builds across a variety of
> # architectures, toolchains, kernel configurations, and make targets.
> #
> # TuxMake supports the concept of runtimes.
> # See https://docs.tuxmake.org/runtimes/, for that to work it requires
> # that you install podman or docker on your system.
> #
> # To install tuxmake on your system globally:
> # sudo pip3 install -U tuxmake
> #
> # See https://docs.tuxmake.org/ for complete documentation.
> 
> 
> tuxmake --runtime podman --target-arch mips --toolchain gcc-10
> --kconfig cavium_octeon_defconfig

Looks to me like this is due to <linux/mm.h>:

#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
#define SECTION_IN_PAGE_FLAGS
#endif


with
CONFIG_SPARSEMEM=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
# CONFIG_SPARSEMEM_VMEMMAP is not set


I'm still digging.

-- 
~Randy


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-03 19:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 15:51 memory_model.h:64:14: error: implicit declaration of function 'page_to_section' Naresh Kamboju
2021-02-03 19:55 ` Randy Dunlap

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).