Re: [PATCH 05/21] powerpc: Avoid comparison of unsigned long >= 0 in pfn_valid

2018-02-25 Thread Mathieu Malaterre
On Mon, Feb 26, 2018 at 7:32 AM, Christophe LEROY wrote: > > > Le 25/02/2018 à 18:22, Mathieu Malaterre a écrit : >> >> Rewrite comparison since all values compared are of type `unsigned long`. >> >> Fix a warning (treated as error in W=1): >> >>CC

Re: [PATCH 06/21] powerpc: Avoid comparison of unsigned long >= 0 in __access_ok

2018-02-25 Thread Mathieu Malaterre
On Mon, Feb 26, 2018 at 7:50 AM, Christophe LEROY wrote: > > > Le 26/02/2018 à 07:34, Christophe LEROY a écrit : >> >> >> >> Le 25/02/2018 à 18:22, Mathieu Malaterre a écrit : >>> >>> Rewrite check size - 1 <= Y as size < Y since `size` is unsigned value. >>> Fix warning

Re: [PATCH v12 1/3] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled

2018-02-25 Thread Ram Pai
On Sun, Feb 25, 2018 at 05:27:11PM +0530, Aneesh Kumar K.V wrote: > > > On 02/24/2018 06:35 AM, Ram Pai wrote: > >On Fri, Feb 23, 2018 at 03:11:45PM +0800, kbuild test robot wrote: > >>Hi Ram, > >> > >>Thank you for the patch! Yet something to improve: > >> > >>[auto build test ERROR on

Re: [PATCH 06/21] powerpc: Avoid comparison of unsigned long >= 0 in __access_ok

2018-02-25 Thread Christophe LEROY
Le 26/02/2018 à 07:34, Christophe LEROY a écrit : Le 25/02/2018 à 18:22, Mathieu Malaterre a écrit : Rewrite check size - 1 <= Y as size < Y since `size` is unsigned value. Fix warning (treated as error in W=1):    CC  arch/powerpc/kernel/signal_32.o In file included from

Re: [PATCH 06/21] powerpc: Avoid comparison of unsigned long >= 0 in __access_ok

2018-02-25 Thread Christophe LEROY
Le 25/02/2018 à 18:22, Mathieu Malaterre a écrit : Rewrite check size - 1 <= Y as size < Y since `size` is unsigned value. Fix warning (treated as error in W=1): CC arch/powerpc/kernel/signal_32.o In file included from ./include/linux/uaccess.h:14:0, from

Re: [PATCH 05/21] powerpc: Avoid comparison of unsigned long >= 0 in pfn_valid

2018-02-25 Thread Christophe LEROY
Le 25/02/2018 à 18:22, Mathieu Malaterre a écrit : Rewrite comparison since all values compared are of type `unsigned long`. Fix a warning (treated as error in W=1): CC arch/powerpc/kernel/irq.o In file included from ./include/linux/bug.h:5:0, from

Re: [PATCH v12 07/11] mm: Add address parameter to arch_validate_prot()

2018-02-25 Thread Michael Ellerman
Khalid Aziz writes: > A protection flag may not be valid across entire address space and > hence arch_validate_prot() might need the address a protection bit is > being set on to ensure it is a valid protection flag. For example, sparc > processors support memory

Re: [2/2] powerpc/powernv: Support firmware disable of RFI flush

2018-02-25 Thread Michael Ellerman
On Thu, 2018-02-22 at 13:21:18 UTC, Michael Ellerman wrote: > Some versions of firmware will have a setting that can be configured > to disable the RFI flush, add support for it. > > Fixes: 6e032b350cd1 ("powerpc/powernv: Check device-tree for RFI flush > settings") > Signed-off-by: Michael

Re: [1/2] powerpc/pseries: Support firmware disable of RFI flush

2018-02-25 Thread Michael Ellerman
On Thu, 2018-02-22 at 13:21:17 UTC, Michael Ellerman wrote: > Some versions of firmware will have a setting that can be configured > to disable the RFI flush, add support for it. > > Fixes: 8989d56878a7 ("powerpc/pseries: Query hypervisor for RFI flush > settings") > Signed-off-by: Michael

Re: [RFC, v0, 1/2] powerpc, drmem: Fix unexpected flag value in ibm, dynamic-memory-v2

2018-02-25 Thread Michael Ellerman
On Wed, 2018-02-21 at 10:36:26 UTC, Bharata B Rao wrote: > Memory addtion and removal by count and indexed-count methods > temporarily mark the LMBs that are being added/removed by a special > flag value DRMEM_LMB_RESERVED. Accessing flags value directly at > a few places without proper accessor

[PATCH 15/27] cpufreq: powerenv: Don't validate the frequency table twice

2018-02-25 Thread Viresh Kumar
The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency

[PATCH 00/27] cpufreq: Stop validating cpufreq table in drivers

2018-02-25 Thread Viresh Kumar
Hi, A patchset [1] sent last week already updated the cpufreq core to start validating cpufreq table if the policy contains a valid "policy->freq_table" pointer. This series updates all such drivers to stop validating the cpufreq table directly and let only the core handle it. It depends on the

Re: [PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-02-25 Thread Stewart Smith
Akshay Adiga writes: > commit 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle > states via stop API.") uses stop-api provided by the firmware to restore > PSSCR. PSSCR restore is required for handling special wakeup. When special > wakeup is

Re: [PATCH] selftests/powerpc: Skip the subpage_prot tests if the syscall is disabled

2018-02-25 Thread Aneesh Kumar K.V
Michael Ellerman writes: > The subpage_prot syscall is only functional when the system is using > the Hash MMU. Since commit 5b2b80714796 ("powerpc/mm: Invalidate > subpage_prot() system call on radix platforms") it returns ENOENT when > the Radix MMU is active. Currently

[PATCH] selftests/powerpc: Skip the subpage_prot tests if the syscall is disabled

2018-02-25 Thread Michael Ellerman
The subpage_prot syscall is only functional when the system is using the Hash MMU. Since commit 5b2b80714796 ("powerpc/mm: Invalidate subpage_prot() system call on radix platforms") it returns ENOENT when the Radix MMU is active. Currently this just makes the test fail. Instead check explicitly

[PATCH] selftests/powerpc: Skip tm-trap if transactional memory is not enabled

2018-02-25 Thread Michael Ellerman
Some processor revisions do not support transactional memory, and additionally kernel support can be disabled. In either case the tm-trap test should be skipped, otherwise it will fail with a SIGILL. Fixes: a08082f8e4e1 ("powerpc/selftests: Check endianness on trap in TM") Signed-off-by: Michael

[PATCH stable v4.4] powerpc/64s: Fix RFI flush dependency on HARDLOCKUP_DETECTOR

2018-02-25 Thread Michael Ellerman
The backport of commit aa8a5e0062ac ("powerpc/64s: Add support for RFI flush of L1-D cache"), incorrectly placed the new RFI flush code inside an existing #ifdef CONFIG_HARDLOCKUP_DETECTOR block. This has the obvious effect of requiring HARDLOCKUP_DETECTOR to be enabled in order for RFI flush to

Re: [PATCH v12 22/22] selftests/vm: Fix deadlock in protection_keys.c

2018-02-25 Thread Balbir Singh
On Wed, 21 Feb 2018 17:55:41 -0800 Ram Pai wrote: > From: Thiago Jung Bauermann > > The sig_chld() handler calls dprintf2() taking care of setting > dprint_in_signal so that sigsafe_printf() won't call printf(). > Unfortunately, this precaution

Re: [PATCH 01/21] powerpc: Remove warning on array size when empty

2018-02-25 Thread Segher Boessenkool
Hi! On Sun, Feb 25, 2018 at 06:22:16PM +0100, Mathieu Malaterre wrote: > When neither CONFIG_ALTIVEC, nor CONFIG_VSX or CONFIG_PPC64 is defined, the > array feature_properties is defined as an empty array, which in turn > triggers the following warning (treated as error on W=1): > - for (i =

[PATCH 21/21] powerpc: Add missing prototypes in setup_32.c

2018-02-25 Thread Mathieu Malaterre
This commit add the prototypes for the following function: - early_init - machine_init - ppc_setup_l2cr - ppc_setup_l3cr - ppc_init the other missing ones were already added in setup.h previously. Fix the following warnings (treated as error in W=1): AR init/built-in.o

[PATCH 20/21] powerpc: Add missing prototypes for ppc_select & ppc_fadvise64_64

2018-02-25 Thread Mathieu Malaterre
Add missing prototypes for ppc_select & ppc_fadvise64_64 to header asm-prototypes.h. Fix the following warnings (treated as errors in W=1) CC arch/powerpc/kernel/syscalls.o arch/powerpc/kernel/syscalls.c:87:1: error: no previous prototype for ‘ppc_select’ [-Werror=missing-prototypes]

[PATCH 19/21] powerpc: Add missing prototypes for hw_breakpoint_handler & arch_unregister_hw_breakpoint

2018-02-25 Thread Mathieu Malaterre
In commit 5aae8a537080 ("powerpc, hw_breakpoints: Implement hw_breakpoints for 64-bit server processors") function hw_breakpoint_handler and arch_unregister_hw_breakpoint were added without function prototypes in hw_breakpoint.h header. Fix the following warning(s) (treated as error in W=1):

[PATCH 18/21] powerpc: Add missing prototypes for sys_sigreturn & sys_rt_sigreturn

2018-02-25 Thread Mathieu Malaterre
Two functions did not have a prototype defined in signal.h header. Fix the following two warnings (treated as errors in W=1): CC arch/powerpc/kernel/signal_32.o arch/powerpc/kernel/signal_32.c:1135:6: error: no previous prototype for ‘sys_rt_sigreturn’ [-Werror=missing-prototypes] long

[PATCH 17/21] powerpc: Add missing prototype for sys_debug_setcontext

2018-02-25 Thread Mathieu Malaterre
In commit 81e7009ea46c ("powerpc: merge ppc signal.c and ppc64 signal32.c") the function sys_debug_setcontext was added without a prototype. Fix compilation warning (treated as error in W=1): CC arch/powerpc/kernel/signal_32.o arch/powerpc/kernel/signal_32.c:1227:5: error: no previous

[PATCH 16/21] powerpc: Add missing prototype for init_IRQ

2018-02-25 Thread Mathieu Malaterre
A function init_IRQ was added without a prototype declared in header irq.h. Fix the following warning (treated as error in W=1): CC arch/powerpc/kernel/irq.o arch/powerpc/kernel/irq.c:662:13: error: no previous prototype for ‘init_IRQ’ [-Werror=missing-prototypes] void __init

[PATCH 15/21] powerpc: Add missing prototype for MMU_setup

2018-02-25 Thread Mathieu Malaterre
Add a function declaration for MMU_setup at the beginning of the file to fix a warning (treated as error in W=1): CC kernel/sys.o arch/powerpc/mm/init_32.c:102:13: error: no previous prototype for ‘MMU_setup’ [-Werror=missing-prototypes] void __init MMU_setup(void) ^

[PATCH 14/21] powerpc: Add missing prototype for arch_irq_work_raise

2018-02-25 Thread Mathieu Malaterre
In commit 4f8b50bbbe63 ("irq_work, ppc: Fix up arch hooks") a new function arch_irq_work_raise was added without a prototype in header irq_work.h. Fix the following warning (treated as error in W=1): CC arch/powerpc/kernel/time.o arch/powerpc/kernel/time.c:523:6: error: no previous

[PATCH 13/21] powerpc: Add missing prototype for arch_dup_task_struct

2018-02-25 Thread Mathieu Malaterre
In commit 55ccf3fe3f9a ("fork: move the real prepare_to_copy() users to arch_dup_task_struct()") a new arch_dup_task_struct was added without a prototype declared in thread_info.h header. Fix the following warning (treated as error in W=1): CC arch/powerpc/kernel/process.o

[PATCH 12/21] powerpc: Add missing prototype for time_init

2018-02-25 Thread Mathieu Malaterre
The function time_init did not have a prototype defined in the time.h header. Fix the following warning (treated as error in W=1): CC arch/powerpc/kernel/time.o arch/powerpc/kernel/time.c:1068:13: error: no previous prototype for ‘time_init’ [-Werror=missing-prototypes] void __init

[PATCH 11/21] powerpc: Add missing prototype for hdec_interrupt

2018-02-25 Thread Mathieu Malaterre
In commit dabe859ec636 ("powerpc: Give hypervisor decrementer interrupts their own handler") an empty body function was added, but no prototype was declared. Fix warning (treated as error in W=1): CC arch/powerpc/kernel/time.o arch/powerpc/kernel/time.c:629:6: error: no previous prototype

[PATCH 10/21] powerpc: Add missing prototype for slb_miss_bad_addr

2018-02-25 Thread Mathieu Malaterre
In commit f0f558b131db ("powerpc/mm: Preserve CFAR value on SLB miss caused by access to bogus address"), the function slb_miss_bad_addr was added without a prototype. This commit adds it. Fix a warning (treated as error in W=1): CC arch/powerpc/kernel/traps.o

[PATCH 09/21] powerpc: Make function save_all static

2018-02-25 Thread Mathieu Malaterre
Since function `save_all` is not meant to be exported, change the signature to `static`. Fix warning (treated as error with W=1): CC arch/powerpc/kernel/process.o arch/powerpc/kernel/process.c:559:6: error: no previous prototype for ‘save_all’ [-Werror=missing-prototypes] void

[PATCH 08/21] powerpc: Make function __giveup_fpu static

2018-02-25 Thread Mathieu Malaterre
When CONFIG_PPC_FPU is defined the prototype exposed in asm/switch_to.h is: extern void giveup_fpu(struct task_struct *); Change the function prototype of __giveup_fpu to static. Fix warning (treated as error in W=1): CC arch/powerpc/kernel/process.o

[PATCH 07/21] powerpc: Make functions flipper_pic_init & ug_udbg_putc static

2018-02-25 Thread Mathieu Malaterre
Change signature of two functions, adding static keyword to prevent the following two warnings (treated as errors on W=1): CC kernel/sys.o arch/powerpc/platforms/embedded6xx/flipper-pic.c:135:28: error: no previous prototype for ‘flipper_pic_init’ [-Werror=missing-prototypes] struct

[PATCH 06/21] powerpc: Avoid comparison of unsigned long >= 0 in __access_ok

2018-02-25 Thread Mathieu Malaterre
Rewrite check size - 1 <= Y as size < Y since `size` is unsigned value. Fix warning (treated as error in W=1): CC arch/powerpc/kernel/signal_32.o In file included from ./include/linux/uaccess.h:14:0, from ./include/asm-generic/termios-base.h:8, from

[PATCH 05/21] powerpc: Avoid comparison of unsigned long >= 0 in pfn_valid

2018-02-25 Thread Mathieu Malaterre
Rewrite comparison since all values compared are of type `unsigned long`. Fix a warning (treated as error in W=1): CC arch/powerpc/kernel/irq.o In file included from ./include/linux/bug.h:5:0, from ./include/linux/cpumask.h:13, from

[PATCH 04/21] powerpc: Mark both tmp variables as unused

2018-02-25 Thread Mathieu Malaterre
Since the value of `tmp` is never intended to be read, declare both `tmp` variables as unused. Fix warning (treated as error in W=1): CC arch/powerpc/kernel/signal_32.o arch/powerpc/kernel/signal_32.c: In function ‘sys_swapcontext’: arch/powerpc/kernel/signal_32.c:1048:16: error: variable

[PATCH 03/21] powerpc: Mark the variable earlycon_acpi_spcr_enable maybe_unused

2018-02-25 Thread Mathieu Malaterre
Re-use the object-like macro EARLYCON_USED_OR_UNUSED to mark `earlycon_acpi_spcr_enable` as maybe_unused. Fix the following warning (treated as error in W=1) CC arch/powerpc/kernel/setup-common.o In file included from ./include/linux/serial_8250.h:14:0, from

[PATCH 02/21] powerpc: Move the inline keyword at the beginning of function declaration

2018-02-25 Thread Mathieu Malaterre
The inline keyword was not at the beginning of the function declaration. Fix the following warning (treated as error in W=1) CC kernel/sys.o arch/powerpc/lib/sstep.c:283:1: error: ‘inline’ is not at beginning of declaration [-Werror=old-style-declaration] static int nokprobe_inline

[PATCH 01/21] powerpc: Remove warning on array size when empty

2018-02-25 Thread Mathieu Malaterre
When neither CONFIG_ALTIVEC, nor CONFIG_VSX or CONFIG_PPC64 is defined, the array feature_properties is defined as an empty array, which in turn triggers the following warning (treated as error on W=1): CC arch/powerpc/kernel/prom.o arch/powerpc/kernel/prom.c: In function

[PATCH 00/21] powerpc/gamecube: make W=1 compilation errors free

2018-02-25 Thread Mathieu Malaterre
I started working on warnings treated as error on ppc32. As a first step, here is a set of patches to make gamecube error free when using W=1: $ make ARCH=powerpc gamecube_defconfig $ make -j8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- W=1 Using: $ powerpc-linux-gnu-gcc --version

Re: [PATCH 1/3] ftrace: Add module to ftrace_make_call() parameters

2018-02-25 Thread kbuild test robot
/linux/commits/Alexander-Sverdlin/ARM-Implement-MODULE_PLT-support-in-FTRACE/20180225-191957 config: i386-randconfig-h1-02251623 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new

Re: [PATCH v12 1/3] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled

2018-02-25 Thread Aneesh Kumar K.V
On 02/24/2018 06:35 AM, Ram Pai wrote: On Fri, Feb 23, 2018 at 03:11:45PM +0800, kbuild test robot wrote: Hi Ram, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc2 next-20180222] [if your patch is applied to the

Re: [PATCH 1/3] ftrace: Add module to ftrace_make_call() parameters

2018-02-25 Thread kbuild test robot
/commits/Alexander-Sverdlin/ARM-Implement-MODULE_PLT-support-in-FTRACE/20180225-191957 config: x86_64-randconfig-x011-201808 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new