linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff
@ 2020-11-06  0:19 kernel test robot
  2020-11-07  5:07 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2020-11-06  0:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Memory Management List

tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git  master
branch HEAD: 0a6f624a86e766a27d23cbb73c23be62231d10ff  Add linux-next specific files for 20201105

Error/Warning reports:

https://lore.kernel.org/linux-mm/202010281624.9m2gZw45-lkp@intel.com
https://lore.kernel.org/linux-mm/202010290238.M1tDrV8p-lkp@intel.com
https://lore.kernel.org/linux-mm/202010291054.WEZO3olr-lkp@intel.com
https://lore.kernel.org/linux-mm/202011020749.5XQ3Hfzc-lkp@intel.com

Error/Warning in current branch:

drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/navi10_ppt.c:2527:35: warning: unused variable 'navi10_i2c_algo' [-Wunused-const-variable]
drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c:130:6: warning: no previous prototype for 'amdgpu_fw_attestation_debugfs_init' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c:130:6: warning: no previous prototype for function 'amdgpu_fw_attestation_debugfs_init' [-Wmissing-prototypes]
drivers/misc/mei/hw-virtio.c:715:9: sparse:    bad type *
drivers/misc/mei/hw-virtio.c:715:9: sparse:    unsigned int *
drivers/misc/mei/hw-virtio.c:715:9: sparse: sparse: no generic selection for 'unsigned int [addressable] virtio_cread_v'
drivers/misc/mei/hw-virtio.c:715:9: sparse: sparse: no generic selection for 'unsigned int virtio_cread_v'
include/trace/events/fscache.h:208:7: warning: 'strncpy' specified bound 8 equals destination size [-Wstringop-truncation]
include/trace/events/rcu.h:724:3: warning: 'strncpy' specified bound 8 equals destination size [-Wstringop-truncation]
mm/kasan/init.c:318:9: warning: variable 'pud' set but not used [-Wunused-but-set-variable]

Error/Warning ids grouped by kconfigs:

gcc_recent_errors
|-- alpha-allmodconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- alpha-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- arc-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- arm-allmodconfig
|   |-- arch-arm-mach-omap2-omap_hwmod_common_data.c:error:Cannot-parse-struct-or-union
|   |-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|   `-- mm-kasan-init.c:warning:variable-pud-set-but-not-used
|-- arm-allyesconfig
|   |-- arch-arm-mach-omap2-omap_hwmod_common_data.c:error:Cannot-parse-struct-or-union
|   |-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|   `-- mm-kasan-init.c:warning:variable-pud-set-but-not-used
|-- arm-defconfig
|   `-- arch-arm-mach-omap2-omap_hwmod_common_data.c:error:Cannot-parse-struct-or-union
|-- arm64-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- i386-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- i386-randconfig-a002-20201104
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- i386-randconfig-a005-20201104
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- i386-randconfig-c001-20201104
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- i386-randconfig-r025-20201105
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- i386-randconfig-s001-20201104
|   `-- drivers-hid-hid-vivaldi.c:sparse:sparse:symbol-dev_attr_function_row_physmap-was-not-declared.-Should-it-be-static
|-- i386-randconfig-s002-20201104
|   |-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|   |-- drivers-hid-hid-vivaldi.c:sparse:sparse:symbol-dev_attr_function_row_physmap-was-not-declared.-Should-it-be-static
|   |-- drivers-misc-mei-hw-virtio.c:sparse:bad-type
|   |-- drivers-misc-mei-hw-virtio.c:sparse:sparse:incompatible-types-in-comparison-expression-(different-base-types):
|   |-- drivers-misc-mei-hw-virtio.c:sparse:sparse:no-generic-selection-for-unsigned-int-addressable-virtio_cread_v
|   |-- drivers-misc-mei-hw-virtio.c:sparse:sparse:no-generic-selection-for-unsigned-int-virtio_cread_v
|   |-- drivers-misc-mei-hw-virtio.c:sparse:unsigned-int
|   `-- kernel-rcu-rcuscale.c:sparse:sparse:symbol-__srcu_struct_srcu_ctl_scale-was-not-declared.-Should-it-be-static
|-- ia64-allmodconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- ia64-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- ia64-randconfig-r014-20201104
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- mips-allmodconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- mips-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- parisc-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- powerpc-allmodconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- powerpc-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- riscv-allmodconfig
|   |-- arch-riscv-include-asm-vdso-processor.h:error:implicit-declaration-of-function-barrier
|   |-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|   |-- include-trace-events-fscache.h:warning:strncpy-specified-bound-equals-destination-size
|   `-- include-trace-events-rcu.h:warning:strncpy-specified-bound-equals-destination-size
|-- riscv-allyesconfig
|   |-- arch-riscv-include-asm-vdso-processor.h:error:implicit-declaration-of-function-barrier
|   |-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|   |-- include-trace-events-fscache.h:warning:strncpy-specified-bound-equals-destination-size
|   `-- include-trace-events-rcu.h:warning:strncpy-specified-bound-equals-destination-size
|-- s390-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- sparc-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- sparc64-randconfig-r036-20201104
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- x86_64-allyesconfig
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- x86_64-randconfig-a004-20201105
|   |-- include-trace-events-fscache.h:warning:strncpy-specified-bound-equals-destination-size
|   `-- include-trace-events-rcu.h:warning:strncpy-specified-bound-equals-destination-size
|-- x86_64-randconfig-a011-20201104
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- x86_64-randconfig-a012-20201104
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
|-- x86_64-randconfig-c002-20201104
|   `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init
`-- xtensa-allyesconfig
    `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-amdgpu_fw_attestation_debugfs_init

clang_recent_errors
`-- riscv-randconfig-r022-20201105
    |-- drivers-gpu-drm-amd-amdgpu-..-pm-swsmu-smu11-navi10_ppt.c:warning:unused-variable-navi10_i2c_algo
    `-- drivers-gpu-drm-amd-amdgpu-amdgpu_fw_attestation.c:warning:no-previous-prototype-for-function-amdgpu_fw_attestation_debugfs_init

elapsed time: 722m

configs tested: 90
configs skipped: 2

gcc tested configs:
arm                                 defconfig
arm64                            allyesconfig
arm64                               defconfig
arm                              allyesconfig
arm                              allmodconfig
sh                          rsk7269_defconfig
sh                   secureedge5410_defconfig
mips                        maltaup_defconfig
arm                      pxa255-idp_defconfig
arm                          tango4_defconfig
parisc                           alldefconfig
powerpc               mpc834x_itxgp_defconfig
arm                           tegra_defconfig
mips                         cobalt_defconfig
openrisc                            defconfig
mips                         tb0226_defconfig
mips                          ath25_defconfig
xtensa                              defconfig
m68k                        m5407c3_defconfig
sh                        dreamcast_defconfig
powerpc                        icon_defconfig
ia64                             allmodconfig
ia64                                defconfig
ia64                             allyesconfig
m68k                             allmodconfig
m68k                                defconfig
m68k                             allyesconfig
nds32                               defconfig
nios2                            allyesconfig
csky                                defconfig
alpha                               defconfig
alpha                            allyesconfig
xtensa                           allyesconfig
h8300                            allyesconfig
arc                                 defconfig
sh                               allmodconfig
parisc                              defconfig
s390                             allyesconfig
parisc                           allyesconfig
s390                                defconfig
nios2                               defconfig
arc                              allyesconfig
nds32                             allnoconfig
c6x                              allyesconfig
i386                             allyesconfig
sparc                            allyesconfig
sparc                               defconfig
i386                                defconfig
mips                             allyesconfig
mips                             allmodconfig
powerpc                          allyesconfig
powerpc                          allmodconfig
powerpc                           allnoconfig
i386                 randconfig-a004-20201104
i386                 randconfig-a006-20201104
i386                 randconfig-a005-20201104
i386                 randconfig-a001-20201104
i386                 randconfig-a002-20201104
i386                 randconfig-a003-20201104
x86_64               randconfig-a004-20201105
x86_64               randconfig-a003-20201105
x86_64               randconfig-a005-20201105
x86_64               randconfig-a002-20201105
x86_64               randconfig-a006-20201105
x86_64               randconfig-a001-20201105
x86_64               randconfig-a012-20201104
x86_64               randconfig-a015-20201104
x86_64               randconfig-a013-20201104
x86_64               randconfig-a011-20201104
x86_64               randconfig-a014-20201104
x86_64               randconfig-a016-20201104
i386                 randconfig-a015-20201104
i386                 randconfig-a013-20201104
i386                 randconfig-a014-20201104
i386                 randconfig-a016-20201104
i386                 randconfig-a011-20201104
i386                 randconfig-a012-20201104
riscv                    nommu_k210_defconfig
riscv                            allyesconfig
riscv                    nommu_virt_defconfig
riscv                             allnoconfig
riscv                               defconfig
riscv                          rv32_defconfig
riscv                            allmodconfig
x86_64                                   rhel
x86_64                           allyesconfig
x86_64                    rhel-7.6-kselftests
x86_64                              defconfig
x86_64                               rhel-8.3
x86_64                                  kexec

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


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

* Re: [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff
  2020-11-06  0:19 [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff kernel test robot
@ 2020-11-07  5:07 ` Andrew Morton
  2020-11-09  2:50   ` Anshuman Khandual
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2020-11-07  5:07 UTC (permalink / raw)
  To: kernel test robot
  Cc: Linux Memory Management List, linux-arm-kernel,
	Anshuman Khandual, Russell King, Catalin Marinas

On Fri, 06 Nov 2020 08:19:36 +0800 kernel test robot <lkp@intel.com> wrote:

> tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git  master
> branch HEAD: 0a6f624a86e766a27d23cbb73c23be62231d10ff  Add linux-next specific files for 20201105
> 
> Error/Warning reports:
> 
> https://lore.kernel.org/linux-mm/202010281624.9m2gZw45-lkp@intel.com
> https://lore.kernel.org/linux-mm/202010290238.M1tDrV8p-lkp@intel.com
> https://lore.kernel.org/linux-mm/202010291054.WEZO3olr-lkp@intel.com
> https://lore.kernel.org/linux-mm/202011020749.5XQ3Hfzc-lkp@intel.com
> 
> ...
>
> mm/kasan/init.c:318:9: warning: variable 'pud' set but not used [-Wunused-but-set-variable]
> 

This is because mm/kasan/init.c does

static void kasan_free_pud(pud_t *pud_start, p4d_t *p4d)
{
	pud_t *pud;
	int i;

	for (i = 0; i < PTRS_PER_PUD; i++) {
		pud = pud_start + i;
		if (!pud_none(*pud))
			return;
	}

	pud_free(&init_mm, (pud_t *)page_to_virt(p4d_page(*p4d)));
	p4d_clear(p4d);
}

but arch/arm/include/asm/pgtable-2level.h does

#define pud_none(pud)           (0)

The solution here is for the arm implementation to reference `pud'. 
Typically this is done via the use of an empty static inline C function
rather than a macro.  But really all of these

#define pud_none(pud)           (0)
#define pud_bad(pud)            (0)
#define pud_present(pud)        (1)
#define pud_clear(pudp)         do { } while (0)
#define set_pud(pud,pudp)       do { } while (0)

should be thus converted.

Could someone in arm world please attend to this?

Thanks.



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

* Re: [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff
  2020-11-07  5:07 ` Andrew Morton
@ 2020-11-09  2:50   ` Anshuman Khandual
  2020-11-09  2:55     ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Anshuman Khandual @ 2020-11-09  2:50 UTC (permalink / raw)
  To: Andrew Morton, kernel test robot
  Cc: Linux Memory Management List, linux-arm-kernel, Russell King,
	Catalin Marinas, Linus Walleij, Ard Biesheuvel



On 11/7/20 10:37 AM, Andrew Morton wrote:
> On Fri, 06 Nov 2020 08:19:36 +0800 kernel test robot <lkp@intel.com> wrote:
> 
>> tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git  master
>> branch HEAD: 0a6f624a86e766a27d23cbb73c23be62231d10ff  Add linux-next specific files for 20201105
>>
>> Error/Warning reports:
>>
>> https://lore.kernel.org/linux-mm/202010281624.9m2gZw45-lkp@intel.com
>> https://lore.kernel.org/linux-mm/202010290238.M1tDrV8p-lkp@intel.com
>> https://lore.kernel.org/linux-mm/202010291054.WEZO3olr-lkp@intel.com
>> https://lore.kernel.org/linux-mm/202011020749.5XQ3Hfzc-lkp@intel.com
>>
>> ...
>>
>> mm/kasan/init.c:318:9: warning: variable 'pud' set but not used [-Wunused-but-set-variable]
>>
> 
> This is because mm/kasan/init.c does
> 
> static void kasan_free_pud(pud_t *pud_start, p4d_t *p4d)
> {
> 	pud_t *pud;
> 	int i;
> 
> 	for (i = 0; i < PTRS_PER_PUD; i++) {
> 		pud = pud_start + i;
> 		if (!pud_none(*pud))
> 			return;
> 	}
> 
> 	pud_free(&init_mm, (pud_t *)page_to_virt(p4d_page(*p4d)));
> 	p4d_clear(p4d);
> }
> 
> but arch/arm/include/asm/pgtable-2level.h does
> 
> #define pud_none(pud)           (0)
> 
> The solution here is for the arm implementation to reference `pud'. 
> Typically this is done via the use of an empty static inline C function
> rather than a macro.  But really all of these
> 
> #define pud_none(pud)           (0)
> #define pud_bad(pud)            (0)
> #define pud_present(pud)        (1)
> #define pud_clear(pudp)         do { } while (0)
> #define set_pud(pud,pudp)       do { } while (0)
> 
> should be thus converted.
> 
> Could someone in arm world please attend to this?

+ Ard Biesheuvel <ardb@kernel.org>
+ Linus Walleij <linus.walleij@linaro.org>

There were some earlier discussions to solve this in a different way.

https://lore.kernel.org/linux-mm/CACRpkdbAXCMTW--BmVs8SQ_u5baaeUob+U57E=4=CrMxWtMO2g@mail.gmail.com/

with a subsequent follow up patch.

https://lore.kernel.org/linux-arm-kernel/20201106085157.11211-1-linus.walleij@linaro.org/


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

* Re: [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff
  2020-11-09  2:50   ` Anshuman Khandual
@ 2020-11-09  2:55     ` Andrew Morton
  2020-11-09  6:01       ` Anshuman Khandual
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2020-11-09  2:55 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: kernel test robot, Linux Memory Management List,
	linux-arm-kernel, Russell King, Catalin Marinas, Linus Walleij,
	Ard Biesheuvel

On Mon, 9 Nov 2020 08:20:05 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:

> 
> 
> On 11/7/20 10:37 AM, Andrew Morton wrote:
> > On Fri, 06 Nov 2020 08:19:36 +0800 kernel test robot <lkp@intel.com> wrote:
> > 
> >> tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git  master
> >> branch HEAD: 0a6f624a86e766a27d23cbb73c23be62231d10ff  Add linux-next specific files for 20201105
> >>
> >> Error/Warning reports:
> >>
> >> https://lore.kernel.org/linux-mm/202010281624.9m2gZw45-lkp@intel.com
> >> https://lore.kernel.org/linux-mm/202010290238.M1tDrV8p-lkp@intel.com
> >> https://lore.kernel.org/linux-mm/202010291054.WEZO3olr-lkp@intel.com
> >> https://lore.kernel.org/linux-mm/202011020749.5XQ3Hfzc-lkp@intel.com
> >>
> >> ...
> >>
> >> mm/kasan/init.c:318:9: warning: variable 'pud' set but not used [-Wunused-but-set-variable]
> >>
> > 
> > This is because mm/kasan/init.c does
> > 
> > static void kasan_free_pud(pud_t *pud_start, p4d_t *p4d)
> > {
> > 	pud_t *pud;
> > 	int i;
> > 
> > 	for (i = 0; i < PTRS_PER_PUD; i++) {
> > 		pud = pud_start + i;
> > 		if (!pud_none(*pud))
> > 			return;
> > 	}
> > 
> > 	pud_free(&init_mm, (pud_t *)page_to_virt(p4d_page(*p4d)));
> > 	p4d_clear(p4d);
> > }
> > 
> > but arch/arm/include/asm/pgtable-2level.h does
> > 
> > #define pud_none(pud)           (0)
> > 
> > The solution here is for the arm implementation to reference `pud'. 
> > Typically this is done via the use of an empty static inline C function
> > rather than a macro.  But really all of these
> > 
> > #define pud_none(pud)           (0)
> > #define pud_bad(pud)            (0)
> > #define pud_present(pud)        (1)
> > #define pud_clear(pudp)         do { } while (0)
> > #define set_pud(pud,pudp)       do { } while (0)
> > 
> > should be thus converted.
> > 
> > Could someone in arm world please attend to this?
> 
> + Ard Biesheuvel <ardb@kernel.org>
> + Linus Walleij <linus.walleij@linaro.org>
> 
> There were some earlier discussions to solve this in a different way.
> 
> https://lore.kernel.org/linux-mm/CACRpkdbAXCMTW--BmVs8SQ_u5baaeUob+U57E=4=CrMxWtMO2g@mail.gmail.com/
> 
> with a subsequent follow up patch.
> 
> https://lore.kernel.org/linux-arm-kernel/20201106085157.11211-1-linus.walleij@linaro.org/

Yes, but why?  macros-pretending-to-be-functions just keep on causing
problems and they're so unnecessary.  Why not just write functions in
the first place??   Did anyone try implementing that?



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

* Re: [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff
  2020-11-09  2:55     ` Andrew Morton
@ 2020-11-09  6:01       ` Anshuman Khandual
  2020-11-09 15:54         ` Linus Walleij
  0 siblings, 1 reply; 6+ messages in thread
From: Anshuman Khandual @ 2020-11-09  6:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kernel test robot, Linux Memory Management List,
	linux-arm-kernel, Russell King, Catalin Marinas, Linus Walleij,
	Ard Biesheuvel



On 11/9/20 8:25 AM, Andrew Morton wrote:
> On Mon, 9 Nov 2020 08:20:05 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> 
>>
>>
>> On 11/7/20 10:37 AM, Andrew Morton wrote:
>>> On Fri, 06 Nov 2020 08:19:36 +0800 kernel test robot <lkp@intel.com> wrote:
>>>
>>>> tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git  master
>>>> branch HEAD: 0a6f624a86e766a27d23cbb73c23be62231d10ff  Add linux-next specific files for 20201105
>>>>
>>>> Error/Warning reports:
>>>>
>>>> https://lore.kernel.org/linux-mm/202010281624.9m2gZw45-lkp@intel.com
>>>> https://lore.kernel.org/linux-mm/202010290238.M1tDrV8p-lkp@intel.com
>>>> https://lore.kernel.org/linux-mm/202010291054.WEZO3olr-lkp@intel.com
>>>> https://lore.kernel.org/linux-mm/202011020749.5XQ3Hfzc-lkp@intel.com
>>>>
>>>> ...
>>>>
>>>> mm/kasan/init.c:318:9: warning: variable 'pud' set but not used [-Wunused-but-set-variable]
>>>>
>>>
>>> This is because mm/kasan/init.c does
>>>
>>> static void kasan_free_pud(pud_t *pud_start, p4d_t *p4d)
>>> {
>>> 	pud_t *pud;
>>> 	int i;
>>>
>>> 	for (i = 0; i < PTRS_PER_PUD; i++) {
>>> 		pud = pud_start + i;
>>> 		if (!pud_none(*pud))
>>> 			return;
>>> 	}
>>>
>>> 	pud_free(&init_mm, (pud_t *)page_to_virt(p4d_page(*p4d)));
>>> 	p4d_clear(p4d);
>>> }
>>>
>>> but arch/arm/include/asm/pgtable-2level.h does
>>>
>>> #define pud_none(pud)           (0)
>>>
>>> The solution here is for the arm implementation to reference `pud'. 
>>> Typically this is done via the use of an empty static inline C function
>>> rather than a macro.  But really all of these
>>>
>>> #define pud_none(pud)           (0)
>>> #define pud_bad(pud)            (0)
>>> #define pud_present(pud)        (1)
>>> #define pud_clear(pudp)         do { } while (0)
>>> #define set_pud(pud,pudp)       do { } while (0)
>>>
>>> should be thus converted.
>>>
>>> Could someone in arm world please attend to this?
>>
>> + Ard Biesheuvel <ardb@kernel.org>
>> + Linus Walleij <linus.walleij@linaro.org>
>>
>> There were some earlier discussions to solve this in a different way.
>>
>> https://lore.kernel.org/linux-mm/CACRpkdbAXCMTW--BmVs8SQ_u5baaeUob+U57E=4=CrMxWtMO2g@mail.gmail.com/
>>
>> with a subsequent follow up patch.
>>
>> https://lore.kernel.org/linux-arm-kernel/20201106085157.11211-1-linus.walleij@linaro.org/
> 
> Yes, but why?  macros-pretending-to-be-functions just keep on causing
> problems and they're so unnecessary.  Why not just write functions in
> the first place??   Did anyone try implementing that?

Just build tested this. Observed that set_pud()'s arguments here seems
to have been reversed. If this looks okay, will send out.

diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h
index 3502c2f..9d4f5ee 100644
--- a/arch/arm/include/asm/pgtable-2level.h
+++ b/arch/arm/include/asm/pgtable-2level.h
@@ -177,11 +177,28 @@
  * the pud: the pud entry is never bad, always exists, and can't be set or
  * cleared.
  */
-#define pud_none(pud)          (0)
-#define pud_bad(pud)           (0)
-#define pud_present(pud)       (1)
-#define pud_clear(pudp)                do { } while (0)
-#define set_pud(pud,pudp)      do { } while (0)
+static inline int pud_none(pud_t pud)
+{
+       return 0;
+}
+
+static inline int pud_bad(pud_t pud)
+{
+       return 0;
+}
+
+static inline int pud_present(pud_t pud)
+{
+       return 1;
+}
+
+static inline void pud_clear(pud_t *pudp)
+{
+}
+
+static inline void set_pud(pud_t *pudp, pud_t pud)
+{
+}




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

* Re: [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff
  2020-11-09  6:01       ` Anshuman Khandual
@ 2020-11-09 15:54         ` Linus Walleij
  0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2020-11-09 15:54 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: Andrew Morton, kernel test robot, Linux Memory Management List,
	linux-arm-kernel, Russell King, Catalin Marinas, Ard Biesheuvel

On Mon, Nov 9, 2020 at 7:01 AM Anshuman Khandual
<anshuman.khandual@arm.com> wrote:

> Just build tested this. Observed that set_pud()'s arguments here seems
> to have been reversed. If this looks okay, will send out.

It sure looks good to me.

(It doesn't hurt to have both patches.)

> diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h
> index 3502c2f..9d4f5ee 100644
> --- a/arch/arm/include/asm/pgtable-2level.h
> +++ b/arch/arm/include/asm/pgtable-2level.h
> @@ -177,11 +177,28 @@
>   * the pud: the pud entry is never bad, always exists, and can't be set or
>   * cleared.
>   */
> -#define pud_none(pud)          (0)
> -#define pud_bad(pud)           (0)
> -#define pud_present(pud)       (1)
> -#define pud_clear(pudp)                do { } while (0)
> -#define set_pud(pud,pudp)      do { } while (0)
> +static inline int pud_none(pud_t pud)
> +{
> +       return 0;
> +}
> +
> +static inline int pud_bad(pud_t pud)
> +{
> +       return 0;
> +}
> +
> +static inline int pud_present(pud_t pud)
> +{
> +       return 1;
> +}
> +
> +static inline void pud_clear(pud_t *pudp)
> +{
> +}
> +
> +static inline void set_pud(pud_t *pudp, pud_t pud)
> +{
> +}

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij


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

end of thread, other threads:[~2020-11-09 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06  0:19 [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff kernel test robot
2020-11-07  5:07 ` Andrew Morton
2020-11-09  2:50   ` Anshuman Khandual
2020-11-09  2:55     ` Andrew Morton
2020-11-09  6:01       ` Anshuman Khandual
2020-11-09 15:54         ` Linus Walleij

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