[PATCH 1/3] powerpc/fsl_booke: replace PAGE_OFFSET with KERNELBASE

2019-07-04 Thread Jason Yan
We setup a mapping in PAGE_OFFSET and jump to KERNELBASE. This is not a problem when PAGE_OFFSET = KERNELBASE. Replace PAGE_OFFSET with KERNELBASE here to make it consistent. Signed-off-by: Jason Yan --- arch/powerpc/kernel/fsl_booke_entry_mapping.S | 4 ++-- 1 file changed, 2 insertions(+), 2 d

[PATCH 3/3] powerpc: move memstart_addr and kernstart_addr to init-common.c

2019-07-04 Thread Jason Yan
These two variables are both defined in init_32.c and init_64.c. Move them to init-common.c. Signed-off-by: Jason Yan --- arch/powerpc/mm/init-common.c | 5 + arch/powerpc/mm/init_32.c | 5 - arch/powerpc/mm/init_64.c | 5 - 3 files changed, 5 insertions(+), 10 deletions(-)

[PATCH 0/3] some misc tidy-up

2019-07-04 Thread Jason Yan
Unify some definitions and micros. No functional change. Jason Yan (3): powerpc/fsl_booke: replace PAGE_OFFSET with KERNELBASE powerpc: unify definition of M_IF_NEEDED powerpc: move memstart_addr and kernstart_addr to init-common.c arch/powerpc/include/asm/nohash/mmu-book3e.h | 10 +++

[PATCH 2/3] powerpc: unify definition of M_IF_NEEDED

2019-07-04 Thread Jason Yan
M_IF_NEEDED is defined too many times. Move it to a common place. Signed-off-by: Jason Yan --- arch/powerpc/include/asm/nohash/mmu-book3e.h | 10 ++ arch/powerpc/kernel/exceptions-64e.S | 10 -- arch/powerpc/kernel/fsl_booke_entry_mapping.S | 10 -- arch/powerpc

Re: [PATCH 2/2] powerpc: expose secure variables via sysfs

2019-07-04 Thread Michael Ellerman
Hi Nayna, Nayna Jain writes: > As part of PowerNV secure boot support, OS verification keys are stored > and controlled by OPAL as secure variables. These need to be exposed to > the userspace so that sysadmins can perform key management tasks. > > This patch adds the support to expose secure var

Re: [PATCH 18/39] docs: admin-guide: add kdump documentation into it

2019-07-04 Thread Dave Young
On 07/05/19 at 11:43am, Alex Shi wrote: > > > 在 2019/6/28 下午8:30, Mauro Carvalho Chehab 写道: > > The Kdump documentation describes procedures with admins use > > in order to solve issues on their systems. > > > > Signed-off-by: Mauro Carvalho Chehab > > --- > > Documentation/admin-guide/bug-hun

Re: [PATCH 18/39] docs: admin-guide: add kdump documentation into it

2019-07-04 Thread Dave Young
On 06/28/19 at 09:30am, Mauro Carvalho Chehab wrote: > The Kdump documentation describes procedures with admins use > in order to solve issues on their systems. > > Signed-off-by: Mauro Carvalho Chehab > --- > Documentation/admin-guide/bug-hunting.rst| 4 ++-- > Documentation/admin-g

[PATCH] mm/kprobes: Add generic kprobe_fault_handler() fallback definition

2019-07-04 Thread Anshuman Khandual
Architectures like parisc enable CONFIG_KROBES without having a definition for kprobe_fault_handler() which results in a build failure. Arch needs to provide kprobe_fault_handler() as it is platform specific and cannot have a generic working alternative. But in the event when platform lacks such a

Re: [v2 09/12] powerpc/mce: Enable MCE notifiers in external modules

2019-07-04 Thread Nicholas Piggin
Reza Arbab's on July 5, 2019 12:50 pm: > On Thu, Jul 04, 2019 at 12:36:18PM +1000, Nicholas Piggin wrote: >>Reza Arbab's on July 4, 2019 3:20 am: >>> Since the notifier chain is actually part of the decision between (1) >>> and (2), it's a hard limitation then that callbacks be in real address >>>

Re: [v2 09/12] powerpc/mce: Enable MCE notifiers in external modules

2019-07-04 Thread Reza Arbab
On Thu, Jul 04, 2019 at 12:36:18PM +1000, Nicholas Piggin wrote: Reza Arbab's on July 4, 2019 3:20 am: Since the notifier chain is actually part of the decision between (1) and (2), it's a hard limitation then that callbacks be in real address space. Is there any way to structure things so that'

[PATCH 7/8] tty: hvcs: Fix odd use of strlcpy

2019-07-04 Thread Joe Perches
Use the typical style of array, not the equivalent &array[0]. Signed-off-by: Joe Perches --- drivers/tty/hvc/hvcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index cb4db1b3ca3c..b6c1c1be06f9 100644 --- a/drivers/tty/hv

[PATCH 0/8] treewide: correct misuses of strscpy/strlcpy

2019-07-04 Thread Joe Perches
These are all likely copy/paste defects where the field size of the 'copied to' array is incorrect. Each patch in this series is independent. Joe Perches (8): Input: synaptics: Fix misuse of strlcpy leds: as3645a: Fix misuse of strlcpy media: m2m-deinterlace: Fix misuse of strscpy media:

Re: [PATCH v12 01/11] MODSIGN: Export module signature definitions

2019-07-04 Thread Thiago Jung Bauermann
Hello Philipp, Philipp Rudo writes: > Hi Thiago, > > > On Thu, 04 Jul 2019 03:42:57 -0300 > Thiago Jung Bauermann wrote: > >> Jessica Yu writes: >> >> > +++ Thiago Jung Bauermann [27/06/19 23:19 -0300]: >> >>IMA will use the module_signature format for append signatures, so export >> >>th

Re: [PATCH] powerpc/64s/exception: Remove unused SOFTEN_VALUE_0x980

2019-07-04 Thread Michael Ellerman
On Tue, 2019-07-02 at 08:28:01 UTC, Michael Ellerman wrote: > Remove SOFTEN_VALUE_0x980, it's been unused since commit > dabe859ec636 ("powerpc: Give hypervisor decrementer interrupts their > own handler") (Sep 2012). > > Signed-off-by: Michael Ellerman Applied to powerpc next. https://git.kern

Re: [PATCH] powerpc: remove device_to_mask

2019-07-04 Thread Michael Ellerman
On Sat, 2019-06-29 at 08:03:59 UTC, Christoph Hellwig wrote: > Use the dma_get_mask helper from dma-mapping.h instead. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Alexey Kardashevskiy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/24911acd64cee411c9e626d3d0ca0733805b

Re: [PATCH 1/5] powerpc/64s/exception: remove bad stack branch

2019-07-04 Thread Michael Ellerman
On Fri, 2019-06-28 at 06:33:18 UTC, Nicholas Piggin wrote: > The bad stack test in interrupt handlers has a few problems. For > performance it is taken in the common case, which is a fetch bubble > and a waste of i-cache. > > For code development and maintainence, it requires yet another stack > f

Re: [PATCH v3 01/13] powerpc/64s/exception: clean up system call entry

2019-07-04 Thread Michael Ellerman
On Fri, 2019-06-28 at 05:33:20 UTC, Nicholas Piggin wrote: > syscall / hcall entry unnecessarily differs between KVM and non-KVM > builds. Move the SMT priority instruction to the same location > (after INTERRUPT_TO_KERNEL). > > Signed-off-by: Nicholas Piggin Series applied to powerpc next, than

Re: [PATCH 1/2] powerpc/64s: Rename PPC_INVALIDATE_ERAT to PPC_ARCH_300_INVALIDATE_ERAT

2019-07-04 Thread Michael Ellerman
On Sun, 2019-06-23 at 10:41:51 UTC, Nicholas Piggin wrote: > This makes it clear to the caller that it can only be used on POWER9 > and later CPUs. > > Signed-off-by: Nicholas Piggin Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/fe7946ce0808eb0e43711f5db7d2d1599b362d0

Re: [PATCH v3 01/25] powerpc/64s/exception: remove H concatenation for EXC_HV variants

2019-07-04 Thread Michael Ellerman
On Sat, 2019-06-22 at 13:15:11 UTC, Nicholas Piggin wrote: > Replace all instances of this with gas macros that test the hsrr > parameter and use the appropriate register names / labels. > > No generated code change. > > Signed-off-by: Nicholas Piggin Series applied to powerpc next, thanks. ht

Re: [PATCH 01/28] powerpc/64s/exception: fix line wrap and semicolon inconsistencies in macros

2019-07-04 Thread Michael Ellerman
On Tue, 2019-06-11 at 14:30:13 UTC, Nicholas Piggin wrote: > By convention, all lines should be separated by a semicolons. Last line > should have neither semicolon or line wrap. > > No generated code change. > > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kerne

Re: [PATCH v5 1/2] powerpc: silence a -Wcast-function-type warning in dawr_write_file_bool

2019-07-04 Thread Michael Ellerman
On Tue, 2019-06-04 at 03:00:36 UTC, Michael Neuling wrote: > From: Mathieu Malaterre > > In commit c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 > option") the following piece of code was added: > >smp_call_function((smp_call_func_t)set_dawr, &null_brk, 0); > > Since GCC 8 this tri

Re: [PATCH] tpm: fixes uninitialized allocated banks for IBM vtpm driver

2019-07-04 Thread Michal Suchánek
On Thu, 4 Jul 2019 19:26:36 +0530 Sachin Sant wrote: > > On 04-Jul-2019, at 5:29 PM, Mimi Zohar wrote: > > > > On Wed, 2019-07-03 at 23:32 -0400, Nayna Jain wrote: > >> The nr_allocated_banks and allocated banks are initialized as part of > >> tpm_chip_register. Currently, this is done as par

Re: [PATCH V2] mm/ioremap: Probe platform for p4d huge map support

2019-07-04 Thread Anshuman Khandual
On 07/03/2019 04:36 AM, Andrew Morton wrote: > On Fri, 28 Jun 2019 10:50:31 +0530 Anshuman Khandual > wrote: > >> Finishing up what the commit c2febafc67734a ("mm: convert generic code to >> 5-level paging") started out while levelling up P4D huge mapping support >> at par with PUD and PMD. A

[PATCH 2/2] ftrace: Check for successful allocation of hash

2019-07-04 Thread Naveen N. Rao
In register_ftrace_function_probe(), we are not checking the return value of alloc_and_copy_ftrace_hash(). The subsequent call to ftrace_match_records() may end up dereferencing the same. Add a check to ensure this doesn't happen. Signed-off-by: Naveen N. Rao --- kernel/trace/ftrace.c | 5 +

[PATCH 1/2] ftrace: Fix NULL pointer dereference in t_probe_next()

2019-07-04 Thread Naveen N. Rao
LTP testsuite on powerpc results in the below crash: Unable to handle kernel paging request for data at address 0x Faulting instruction address: 0xc029d800 Oops: Kernel access of bad area, sig: 11 [#1] LE SMP NR_CPUS=2048 NUMA PowerNV ... CPU: 68 PID: 96584 Comm: cat Kd

[PATCH 0/2] ftrace: two fixes with func_probes handling

2019-07-04 Thread Naveen N. Rao
Two patches addressing bugs in ftrace function probe handling. The first patch addresses a NULL pointer dereference reported by LTP tests, while the second one is a trivial patch to address a missing check for return value, found by code inspection. - Naveen Naveen N. Rao (2): ftrace: Fix N

Re: [PATCH] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block

2019-07-04 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > "Oliver O'Halloran" writes: > >> On Sat, Jun 29, 2019 at 5:39 PM Aneesh Kumar K.V >> wrote: >>> >>> Allocation from altmap area can fail based on vmemmap page size used. Add >>> kernel >>> info message to indicate the failure. That allows the user to identify >>> w

Re: ["RFC PATCH" 1/2] powerpc/mm: Fix node look up with numa=off boot

2019-07-04 Thread Michael Ellerman
Nathan Lynch writes: > "Aneesh Kumar K.V" writes: >>> Just checking: do people still need numa=off? Seems like it's a >>> maintenance burden :-) >>> >> >> That is used in kdump kernel. > > I see, thanks. That doesn't mean it's a good idea :) Does it actually reduce memory usage much? Last time

Re: [PATCH] mm/nvdimm: Add is_ioremap_addr and use that to check ioremap address

2019-07-04 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > Andrew Morton writes: > >> On Mon, 1 Jul 2019 19:10:38 +0530 "Aneesh Kumar K.V" >> wrote: >> >>> Architectures like powerpc use different address range to map ioremap >>> and vmalloc range. The memunmap() check used by the nvdimm layer was >>> wrongly using is_vmal

Re: [PATCH] tpm: fixes uninitialized allocated banks for IBM vtpm driver

2019-07-04 Thread Sachin Sant
> On 04-Jul-2019, at 5:29 PM, Mimi Zohar wrote: > > On Wed, 2019-07-03 at 23:32 -0400, Nayna Jain wrote: >> The nr_allocated_banks and allocated banks are initialized as part of >> tpm_chip_register. Currently, this is done as part of auto startup >> function. However, some drivers, like the ib

Re: [PATCH] tpm: fixes uninitialized allocated banks for IBM vtpm driver

2019-07-04 Thread Mimi Zohar
On Wed, 2019-07-03 at 23:32 -0400, Nayna Jain wrote: > The nr_allocated_banks and allocated banks are initialized as part of > tpm_chip_register. Currently, this is done as part of auto startup > function. However, some drivers, like the ibm vtpm driver, do not run > auto startup during initializat

Re: [PATCH v2] powerpc/pseries: Fix maximum memory value

2019-07-04 Thread Aravinda Prasad
On Thursday 04 July 2019 04:43 PM, Michael Ellerman wrote: > "Naveen N. Rao" writes: >> Nathan Lynch wrote: >>> Aravinda Prasad writes: Calculating the maximum memory based on the number of lmbs and lmb size does not account for the RMA region. Hence use memory_hotplug_max(), wh

Re: [PATCH v2] powerpc/pseries: Fix maximum memory value

2019-07-04 Thread Michael Ellerman
"Naveen N. Rao" writes: > Nathan Lynch wrote: >> Aravinda Prasad writes: >>> Calculating the maximum memory based on the number of lmbs >>> and lmb size does not account for the RMA region. Hence >>> use memory_hotplug_max(), which already accounts for the >>> RMA region, to fetch the maximum mem

Re: [PATCH v12 01/11] MODSIGN: Export module signature definitions

2019-07-04 Thread Philipp Rudo
Hi Thiago, On Thu, 04 Jul 2019 03:42:57 -0300 Thiago Jung Bauermann wrote: > Jessica Yu writes: > > > +++ Thiago Jung Bauermann [27/06/19 23:19 -0300]: > >>IMA will use the module_signature format for append signatures, so export > >>the relevant definitions and factor out the code which ve

[RFC v3 3/3] cpuidle-powernv : Recompute the idle-state timeouts when state usage is enabled/disabled

2019-07-04 Thread Abhishek Goel
The disable callback can be used to compute timeout for other states whenever a state is enabled or disabled. We store the computed timeout in "timeout" defined in cpuidle state strucure. So, we compute timeout only when some state is enabled or disabled and not every time in the fast idle path. We

[RFC v3 2/3] cpuidle : Add callback whenever a state usage is enabled/disabled

2019-07-04 Thread Abhishek Goel
To force wakeup a cpu, we need to compute the timeout in the fast idle path as a state may be enabled or disabled but there did not exist a feedback to driver when a state is enabled or disabled. This patch adds a callback whenever a state_usage records a store for disable attribute. Signed-off-by

[PATCH v3 1/3] cpuidle-powernv : forced wakeup for stop states

2019-07-04 Thread Abhishek Goel
Currently, the cpuidle governors determine what idle state a idling CPU should enter into based on heuristics that depend on the idle history on that CPU. Given that no predictive heuristic is perfect, there are cases where the governor predicts a shallow idle state, hoping that the CPU will be bus

[PATCH v3 0/3] Forced-wakeup for stop states on Powernv

2019-07-04 Thread Abhishek Goel
Currently, the cpuidle governors determine what idle state a idling CPU should enter into based on heuristics that depend on the idle history on that CPU. Given that no predictive heuristic is perfect, there are cases where the governor predicts a shallow idle state, hoping that the CPU will be bus