Re: [PATCH 09/34] KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace

2023-11-08 Thread Xiaoyao Li
On 11/6/2023 12:30 AM, Paolo Bonzini wrote: From: Chao Peng Add a new KVM exit type to allow userspace to handle memory faults that KVM cannot resolve, but that userspace *may* be able to handle (without terminating the guest). KVM will initially use KVM_EXIT_MEMORY_FAULT to report implicit

[PATCH v4 4/5] powerpc/smp: Avoid asym packing within thread_group of a core

2023-11-08 Thread Srikar Dronamraju
PowerVM Hypervisor will schedule at a core granularity. However each core can have more than one thread_groups. For better utilization in case of a shared processor, its preferable for the scheduler to pack to the lowest core. However there is no benefit of moving a thread between two thread

[PATCH v4 5/5] powerpc/smp: Dynamically build Powerpc topology

2023-11-08 Thread Srikar Dronamraju
Currently there are four Powerpc specific sched topologies. These are all statically defined. However not all these topologies are used by all Powerpc systems. To avoid unnecessary degenerations by the scheduler, masks and flags are compared. However if the sched topologies are build

[PATCH v4 3/5] powerpc/smp: Add __ro_after_init attribute

2023-11-08 Thread Srikar Dronamraju
There are some variables that are only updated at boot time. So add __ro_after_init attribute to such variables Signed-off-by: Srikar Dronamraju --- Changelog: v2 -> v3: Use __ro_after_init instead of __read_mostly Suggested by : Peter Zijlstra and Michael Ellerman arch/powerpc/kernel/smp.c |

[PATCH v4 0/5] powerpc/smp: Topology and shared processor optimizations

2023-11-08 Thread Srikar Dronamraju
PowerVM systems configured in shared processors mode have some unique challenges. Some device-tree properties will be missing on a shared processor. Hence some sched domains may not make sense for shared processor systems. Most shared processor systems are over-provisioned. Underlying PowerVM

[PATCH v4 1/5] powerpc/smp: Enable Asym packing for cores on shared processor

2023-11-08 Thread Srikar Dronamraju
If there are shared processor LPARs, underlying Hypervisor can have more virtual cores to handle than actual physical cores. Starting with Power 9, a big core (aka SMT8 core) has 2 nearly independent thread groups. On a shared processors LPARs, it helps to pack threads to lesser number of cores

[PATCH v4 2/5] powerpc/smp: Disable MC domain for shared processor

2023-11-08 Thread Srikar Dronamraju
Like L2-cache info, coregroup information which is used to determine MC sched domains is only present on dedicated LPARs. i.e PowerVM doesn't export coregroup information for shared processor LPARs. Hence disable creating MC domains on shared LPAR Systems. Signed-off-by: Srikar Dronamraju ---

Re: [PATCH 02/22] [RESEND^2] jffs2: mark __jffs2_dbg_superblock_counts() static

2023-11-08 Thread Zhihao Cheng
在 2023/11/8 20:58, Arnd Bergmann 写道: From: Arnd Bergmann This function is only called locally and does not need to be global. Since there is no external prototype, gcc warns about the non-static definition: fs/jffs2/debug.c:160:6: error: no previous prototype for

Re: [PATCH 34/34] KVM: selftests: Add a memory region subtest to validate invalid flags

2023-11-08 Thread Anish Moorthy
Applying [1] and [2] reveals that this also breaks non-x86 builds- the MEM_REGION_GPA/SLOT definitions are guarded behind an #ifdef __x86_64__, while the usages introduced here aren't. Should On Sun, Nov 5, 2023 at 8:35 AM Paolo Bonzini wrote: > > + test_invalid_memory_region_flags(); be

Re: [PATCH 03/22] [RESEND] kprobes: unify kprobes_exceptions_nofify() prototypes

2023-11-08 Thread Google
On Wed, 8 Nov 2023 13:58:24 +0100 Arnd Bergmann wrote: > From: Arnd Bergmann > > Most architectures that support kprobes declare this function in their > own asm/kprobes.h header and provide an override, but some are missing > the prototype, which causes a warning for the __weak stub

Re: [PATCH 09/22] [v2] arch: fix asm-offsets.c building with -Wmissing-prototypes

2023-11-08 Thread Sam Ravnborg
On Wed, Nov 08, 2023 at 01:58:30PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > When -Wmissing-prototypes is enabled, the some asm-offsets.c files fail > to build, even when this warning is disabled in the Makefile for normal > files: > > arch/sparc/kernel/asm-offsets.c:22:5: error: no

Re: [PATCH 27/34] KVM: selftests: Introduce VM "shape" to allow tests to specify the VM type

2023-11-08 Thread Anish Moorthy
On Wed, Nov 8, 2023 at 9:00 AM Anish Moorthy wrote: > > This commit breaks the arm64 selftests build btw: looks like a simple > oversight? Yup, fix is a one-liner. Posted below. diff --git a/tools/testing/selftests/kvm/aarch64/page_fault_test.c

Re: [PATCH 10/22] microblaze: include linux/cpu.h for trap_init() prototype

2023-11-08 Thread Arnd Bergmann
On Wed, Nov 8, 2023, at 21:42, Geert Uytterhoeven wrote: > > On Wed, Nov 8, 2023 at 2:01 PM Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> Microblaze runs into a single -Wmissing-prototypes warning when that is >> enabled: >> >> arch/microblaze/kernel/traps.c:21:6: warning: no previous

Re: [PATCH 16/22] bcachefs: mark bch2_target_to_text_sb() static

2023-11-08 Thread Kent Overstreet
On Wed, Nov 08, 2023 at 01:58:37PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > bch2_target_to_text_sb() is only called in the file it is defined in, > and it has no extern prototype: > > fs/bcachefs/disk_groups.c:583:6: error: no previous prototype for > 'bch2_target_to_text_sb'

Re: [PATCH 15/22] arch: vdso: consolidate gettime prototypes

2023-11-08 Thread Arnd Bergmann
On Wed, Nov 8, 2023, at 19:31, Christophe Leroy wrote: > Le 08/11/2023 à 13:58, Arnd Bergmann a écrit : > powerpc has functions doing more or less the same, they are called > __c_kernel_clock_gettime() and alike with their prototypes siting in > arch/powerpc/include/asm/vdso/gettimeofday.h > >

Re: [PATCH 15/22] arch: vdso: consolidate gettime prototypes

2023-11-08 Thread Christophe Leroy
Hi Arnd, Le 08/11/2023 à 13:58, Arnd Bergmann a écrit : > From: Arnd Bergmann > > The VDSO functions are defined as globals in the kernel sources but intended > to be called from userspace, so there is no need to declare them in a kernel > side header. > > Without a prototype, this now causes

Re: [PATCH 27/34] KVM: selftests: Introduce VM "shape" to allow tests to specify the VM type

2023-11-08 Thread Anish Moorthy
This commit breaks the arm64 selftests build btw: looks like a simple oversight? $ cd ${LINUX_ROOT}/tools/testing/selftests/kvm $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make # ... aarch64/page_fault_test.c: In function ‘run_test’: aarch64/page_fault_test.c:708:28: error: incompatible type

Re: [PATCH 17/22] powerpc: ps3: move udbg_shutdown_ps3gelic prototype

2023-11-08 Thread Jakub Kicinski
On Wed, 8 Nov 2023 14:18:09 + Geoff Levand wrote: > Seems good to me. I'll test it next chance I get. > > Signed-off-by: Geoff Levand Seems like this is best routed via powerpc: Acked-by: Jakub Kicinski

Re: [PATCH 17/22] powerpc: ps3: move udbg_shutdown_ps3gelic prototype

2023-11-08 Thread Geoff Levand
Hi Arnd, On 11/8/23 12:58, Arnd Bergmann wrote: > From: Arnd Bergmann > > Allmodconfig kernels produce a missing-prototypes warning: > > arch/powerpc/platforms/ps3/gelic_udbg.c:239:6: error: no previous prototype > for 'udbg_shutdown_ps3gelic' [-Werror=missing-prototypes] > > Move the

[PATCH 22/22] Makefile.extrawarn: turn on missing-prototypes globally

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Over the years we went from > 1000 of warnings to under 100 earlier this year, and I sent patches to address all the ones that I saw with compile testing randcom configs on arm64, arm and x86 kernels. This is a really useful warning, as it catches real bugs when there are

[PATCH 21/22] fbdev/fsl-diu-fb: mark wr_reg_wa() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann wr_reg_wa() is not an appropriate name for a global function, and doesn't need to be global anyway, so mark it static and avoid the warning: drivers/video/fbdev/fsl-diu-fb.c:493:6: error: no previous prototype for 'wr_reg_wa' [-Werror=missing-prototypes] Fixes:

[PATCH 20/22] usb: fsl-mph-dr-of: mark fsl_usb2_mpc5121_init() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann This function is only called locally and should always have been static: drivers/usb/host/fsl-mph-dr-of.c:291:5: error: no previous prototype for 'fsl_usb2_mpc5121_init' [-Werror=missing-prototypes] Fixes: 230f7ede6c2f ("USB: add USB EHCI support for MPC5121 SoC")

[PATCH 19/22] powerpc: powermac: mark smp_psurge_{give,take}_timebase static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann These functions are only called locally and should be static like the other corresponding functions are: arch/powerpc/platforms/powermac/smp.c:416:13: error: no previous prototype for 'smp_psurge_take_timebase' [-Werror=missing-prototypes] 416 | void __init

[PATCH 18/22] powerpc: pasemi: mark pas_shutdown() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Allmodconfig builds show a warning about one function that is accidentally marked global: arch/powerpc/platforms/pasemi/setup.c:67:6: error: no previous prototype for 'pas_shutdown' [-Werror=missing-prototypes] Fixes: 656fdf3ad8e0 ("powerpc/pasemi: Add Nemo board device

[PATCH 17/22] powerpc: ps3: move udbg_shutdown_ps3gelic prototype

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Allmodconfig kernels produce a missing-prototypes warning: arch/powerpc/platforms/ps3/gelic_udbg.c:239:6: error: no previous prototype for 'udbg_shutdown_ps3gelic' [-Werror=missing-prototypes] Move the declaration from a local header to asm/ps3.h where it can be seen from

[PATCH 16/22] bcachefs: mark bch2_target_to_text_sb() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann bch2_target_to_text_sb() is only called in the file it is defined in, and it has no extern prototype: fs/bcachefs/disk_groups.c:583:6: error: no previous prototype for 'bch2_target_to_text_sb' [-Werror=missing-prototypes] Mark it static to avoid the warning and have the

[PATCH 15/22] arch: vdso: consolidate gettime prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann The VDSO functions are defined as globals in the kernel sources but intended to be called from userspace, so there is no need to declare them in a kernel side header. Without a prototype, this now causes warnings such as arch/mips/vdso/vgettimeofday.c:14:5: error: no

[PATCH 14/22] arch: add missing prepare_ftrace_return() prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann The prototype for prepare_ftrace_return() is architecture specific and can't be in a global header. Since it's normally called from assembly, it doesn't really need a prototype, but we get a warning if it's missing: arch/csky/kernel/ftrace.c:147:6: error: no previous

[PATCH 13/22] arch: add do_page_fault prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann arch/alpha/mm/fault.c:85:1: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/csky/mm/fault.c:187:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/mips/mm/fault.c:323:17: error: no previous prototype for

[PATCH 12/22] csky: fix arch_jump_label_transform_static override

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann The arch_jump_label_transform_static() function in csky was originally meant to override the generic __weak function, but that got changed to an #ifndef check. This showed up as a missing-prototype warning: arch/csky/kernel/jump_label.c:43:6: error: no previous prototype for

[PATCH 11/22] x86: sta2x11: include header for sta2x11_get_instance() prototype

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann sta2x11_get_instance() is a global function declared in asm/sta2x11.h, but this header is not included before the definition, causing a warning: arch/x86/pci/sta2x11-fixup.c:95:26: error: no previous prototype for 'sta2x11_get_instance' [-Werror=missing-prototypes] Add the

[PATCH 10/22] microblaze: include linux/cpu.h for trap_init() prototype

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Microblaze runs into a single -Wmissing-prototypes warning when that is enabled: arch/microblaze/kernel/traps.c:21:6: warning: no previous prototype for 'trap_init' [-Wmissing-prototypes] Include the right header to avoid this. Signed-off-by: Arnd Bergmann ---

[PATCH 09/22] [v2] arch: fix asm-offsets.c building with -Wmissing-prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann When -Wmissing-prototypes is enabled, the some asm-offsets.c files fail to build, even when this warning is disabled in the Makefile for normal files: arch/sparc/kernel/asm-offsets.c:22:5: error: no previous prototype for 'sparc32_foo' [-Werror=missing-prototypes]

[PATCH 08/22] [v2] arch: consolidate arch_irq_work_raise prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann The prototype was hidden in an #ifdef on x86, which causes a warning: kernel/irq_work.c:72:13: error: no previous prototype for 'arch_irq_work_raise' [-Werror=missing-prototypes] Some architectures have a working prototype, while others don't. Fix this by providing it in

[PATCH 07/22] [RESEND] sched: fair: move unused stub functions to header

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann These four functions have a normal definition for CONFIG_FAIR_GROUP_SCHED, and empty one that is only referenced when FAIR_GROUP_SCHED is disabled but CGROUP_SCHED is still enabled. If both are turned off, the functions are still defined but the misisng prototype causes a W=1

[PATCH 06/22] [RESEND] stackleak: add declarations for global functions

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann With -Wmissing-prototypes enabled, the stackleak code produces a couple of warnings that have no declarations because they are only called from assembler: stackleak.c:127:25: error: no previous prototype for 'stackleak_erase' [-Werror=missing-prototypes] stackleak.c:139:25:

[PATCH 05/22] [RESEND] parport: gsc: mark init function static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann This is only used locally, so mark it static to avoid a warning: drivers/parport/parport_gsc.c:395:5: error: no previous prototype for 'parport_gsc_init' [-Werror=missing-prototypes] Acked-by: Helge Deller Acked-by: Sudip Mukherjee Signed-off-by: Arnd Bergmann ---

[PATCH 04/22] [RESEND] time: make sysfs_get_uname() function visible in header

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann This function is defined globally in clocksource.c and used conditionally in clockevent.c, which the declaration hidden when clockevent support is disabled. This causes a harmless warning in the definition: kernel/time/clocksource.c:1324:9: warning: no previous prototype for

[PATCH 03/22] [RESEND] kprobes: unify kprobes_exceptions_nofify() prototypes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann Most architectures that support kprobes declare this function in their own asm/kprobes.h header and provide an override, but some are missing the prototype, which causes a warning for the __weak stub implementation: kernel/kprobes.c:1865:12: error: no previous prototype for

[PATCH 02/22] [RESEND^2] jffs2: mark __jffs2_dbg_superblock_counts() static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann This function is only called locally and does not need to be global. Since there is no external prototype, gcc warns about the non-static definition: fs/jffs2/debug.c:160:6: error: no previous prototype for '__jffs2_dbg_superblock_counts' [-Werror=missing-prototypes]

[PATCH 01/22] [RESEND^2] ida: make 'ida_dump' static

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann There is no global declaration for ida_dump() and no other callers, so make it static to avoid this warning: lib/test_ida.c:16:6: error: no previous prototype for 'ida_dump' Fixes: 8ab8ba38d488 ("ida: Start new test_ida module") Signed-off-by: Arnd Bergmann ---

[PATCH 00/22] -Wmissing-prototype warning fixes

2023-11-08 Thread Arnd Bergmann
From: Arnd Bergmann I slightly dropped the ball on this since last sending the series in August, but a number of warning fixes have made it into the kernel in the meantime, both from my earlier submission and from architecture maintainers. I have none patches that remain from the previous

[powerpc:merge] BUILD REGRESSION 11121f9bdf3d1f7a04a87381df18587b9fe8f908

2023-11-08 Thread kernel test robot
defconfig gcc arc allmodconfig gcc arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20231108 gcc arc

Re: [PATCH 1/3] perf tests test_arm_coresight: Fix the shellcheck warning in latest test_arm_coresight.sh

2023-11-08 Thread Arnaldo Carvalho de Melo
Em Tue, Nov 07, 2023 at 12:08:25PM +0530, Athira Rajeev escreveu: > > On 07-Nov-2023, at 3:14 AM, Arnaldo Carvalho de Melo > > wrote: > >>> Reviewed-by: James Clark > > Some are not applying, even after b4 picking up v2 > > Total patches: 3 > > Cover: > >

Re: [PATCH] powerpc: Fix signature of pfn_to_kaddr()

2023-11-08 Thread Christophe Leroy
Le 07/11/2023 à 06:57, Michael Ellerman a écrit : > Linus Walleij writes: >> There is a const in the returned value from pfn_to_kaddr() >> but there are consumers that want to modify the result >> and the generic function pfn_to_virt() in >> does allow this, so let's relax this requirement and

Re: [PATCH 1/4] add generic builtin command line

2023-11-08 Thread Daniel Walker (danielwa)
On Wed, Nov 08, 2023 at 11:33:37AM +, Christophe Leroy wrote: > As far as I remember, Daniel's proposal had some weaknesses that were > never addressed. At that time I proposed an alternative series that was > addressing most weaknesses, and my series was considered more mature > that

Re: [PATCH 1/4] add generic builtin command line

2023-11-08 Thread Christophe Leroy
Hi Pratyush, Le 17/10/2023 à 12:40, Pratyush Brahma a écrit : > Hi Daniel > > We have a usecase which requires this patch necessarily. For android > usecases, we have two different build variants > differentiated by defconfigs - production and debug. However, we only > have a single dts for both

Re: [PATCH v2 1/1] powerpc: fix a memory leak

2023-11-08 Thread kernel test robot
Hi Yuanjun, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v6.6 next-20231108] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented