# git rev-parse -q --verify b53ab70eaf6ce5df58a1985dcfcda07683255778^{commit} b53ab70eaf6ce5df58a1985dcfcda07683255778 already have revision, skipping fetch # git checkout -q -f -B kisskb b53ab70eaf6ce5df58a1985dcfcda07683255778 # git clean -qxdf # < git log -1 # commit b53ab70eaf6ce5df58a1985dcfcda07683255778 # Author: Linus Walleij # Date: Wed Aug 9 10:07:13 2023 +0200 # # powerpc: Make virt_to_pfn() a static inline # # Making virt_to_pfn() a static inline taking a strongly typed # (const void *) makes the contract of a passing a pointer of that # type to the function explicit and exposes any misuse of the # macro virt_to_pfn() acting polymorphic and accepting many types # such as (void *), (unitptr_t) or (unsigned long) as arguments # without warnings. # # Move the virt_to_pfn() and related functions below the # declaration of __pa() so it compiles. # # For symmetry do the same with pfn_to_kaddr(). # # As the file is included right into the linker file, we need # to surround the functions with ifndef __ASSEMBLY__ so we # don't cause compilation errors. # # The conversion moreover exposes the fact that pmd_page_vaddr() # was returning an unsigned long rather than a const void * as # could be expected, so all the sites defining pmd_page_vaddr() # had to be augmented as well. # # Finally the KVM code in book3s_64_mmu_hv.c was passing an # unsigned int to virt_to_phys() so fix that up with a cast so the # result compiles. # # Signed-off-by: Linus Walleij # Signed-off-by: Michael Ellerman # Link: https://msgid.link/20230809-virt-to-phys-powerpc-v1-1-12e912a7d439@linaro.org # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 b53ab70eaf6ce5df58a1985dcfcda07683255778 # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_defconfig Using /kisskb/src/arch/powerpc/configs/mpc85xx_base.config as base Merging /kisskb/src/arch/powerpc/configs/85xx-32bit.config Merging /kisskb/src/arch/powerpc/configs/85xx-hw.config Merging /kisskb/src/arch/powerpc/configs/fsl-emb-nonhw.config # # merged configuration written to .config (needs make) # # < make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/build_bug.h:5:0, from /kisskb/src/include/linux/container_of.h:5, from /kisskb/src/include/linux/list.h:5, from /kisskb/src/include/linux/module.h:12, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:28:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ^ /kisskb/src/include/linux/compiler.h:77:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^ Completed OK # rm -rf /kisskb/build/powerpc-next_mpc85xx_defconfig_powerpc-gcc5 # Build took: 0:01:14.060018