[PATCH] powerpc/pseries: Fix node leak in update_lmb_associativity_index()

2018-11-27 Thread Michael Ellerman
In update_lmb_associativity_index() we lookup dr_node using of_find_node_by_path() which takes a reference for us. In the non-error case we forget to drop the reference. Note that find_aa_index() does modify properties of the node, but doesn't need an extra reference held once it's returned. Signe

[PATCH] powerpc/mm: Remove very old comment in hash-4k.h

2018-11-27 Thread Michael Ellerman
This comment talks about PTEs being 64-bits and PMD/PGD being 32-bits, but that hasn't been true since 2005 when David Gibson implemented 4-level page tables in the commit titled "Four level pagetables for ppc64". Remove it. Signed-off-by: Michael Ellerman --- See: https://github.com/mpe/lin

[PATCH] powerpc/perf: Fix loop exit condition in nest_imc_event_init

2018-11-27 Thread Anju T Sudhakar
The data structure (i.e struct imc_mem_info) to hold the memory address information for nest imc units is allocated based on the number of nodes in the system. nest_imc_event_init() traverse this struct array to calculate the memory base address for the event-cpu. If we fail to find a match for th

[PATCH] powerpc/perf: Return accordingly on invalid chip-id in

2018-11-27 Thread Anju T Sudhakar
Nest hardware counter memory resides in a per-chip reserve-memory. During nest_imc_event_init(), chip-id of the event-cpu is considered to calculate the base memory addresss for that cpu. Return, proper error condition if the chip_id calculated is invalid. Reported-by: Dan Carpenter Fixes: 885dcd

Re: [1/2] powerpc/configs: Remove unnecessary ftrace symbols

2018-11-27 Thread Michael Ellerman
On Mon, 2018-11-26 at 09:19:43 UTC, Michael Ellerman wrote: > In commit 539df7fcb303 ("powerpc/configs: Enable function trace by > default") we added: > > CONFIG_FTRACE=y > CONFIG_FUNCTION_TRACER=y > CONFIG_FUNCTION_GRAPH_TRACER=y > > To ppc64_defconfig, powernv_defconfig and pseries_defcon

Re: [1/9] powerpc/64s: Include cpu header

2018-11-27 Thread Michael Ellerman
On Mon, 2018-10-22 at 14:54:12 UTC, Breno Leitao wrote: > Current powerpc security.c file is defining functions, as > cpu_show_meltdown(), cpu_show_spectre_v{1,2} and others, that are being > declared at linux/cpu.h header without including the header file that > contains these declarations. > > T

Re: powerpc/mm: remove const type qualifier from function ‘pud_pfn’

2018-11-27 Thread Michael Ellerman
On Wed, 2018-10-31 at 11:03:07 UTC, Mathieu Malaterre wrote: > Type qualifier on return type is ignored. Remove warning in W=1: > > arch/powerpc/include/asm/book3s/64/pgtable.h:1268:25: error: type > qualifiers ignored on function return type [-Werror=ignored-qualifiers] > > Signed-off-by: Mat

Re: powerpc/32: Add .data..Lubsan_data*/.data..Lubsan_type* sections explicitly

2018-11-27 Thread Michael Ellerman
On Wed, 2018-10-31 at 12:31:56 UTC, Mathieu Malaterre wrote: > When both `CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y` and `CONFIG_UBSAN=y` > are set, link step typically produce numberous warnings about orphan > section: > > + powerpc-linux-gnu-ld -EB -m elf32ppc -Bstatic --orphan-handling=warn > -

Re: [v2] powerpc/mm: Remove extern from function definition

2018-11-27 Thread Michael Ellerman
On Wed, 2018-10-31 at 14:24:11 UTC, Breno Leitao wrote: > Function huge_ptep_set_access_flags() has the 'extern' keyword in the > function definition and also in the function declaration. This causes a > warning in 'sparse' since the 'extern' storage class should not be used > in the function defin

Re: [v2,1/3] selftests/powerpc: Allocate base registers

2018-11-27 Thread Michael Ellerman
On Wed, 2018-10-31 at 14:38:20 UTC, Breno Leitao wrote: > Some ptrace selftests are passing input operands using a constraint that > can allocate any register for the operand, and using these registers on > load/store operations. > > If the register allocated by the compiler happens to be zero (r0

Re: arch/powerpc: Use dma_zalloc_coherent

2018-11-27 Thread Michael Ellerman
On Mon, 2018-11-05 at 03:28:23 UTC, Sabyasachi Gupta wrote: > Replaced dma_alloc_coherent + memset with dma_zalloc_coherent > > Signed-off-by: Sabyasachi Gupta Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/c3d6a64bd1e82ea486bff46b17d540 cheers

Re: powerpc/fadump: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-27 Thread Michael Ellerman
On Mon, 2018-11-05 at 15:01:19 UTC, Yangtao Li wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Yangtao Li > Reviewed-by: David Gibson Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/f6cee260309807acb12ff84524ffc8 cheers

Re: powerpc/vas: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-27 Thread Michael Ellerman
On Tue, 2018-11-06 at 14:39:30 UTC, Yangtao Li wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Yangtao Li Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/267acedffc614b78ec09bc279f921a cheers

Re: powerpc: mark 64-bit PD_HUGE constant as unsigned long

2018-11-27 Thread Michael Ellerman
On Tue, 2018-11-06 at 14:48:03 UTC, Daniel Axtens wrote: > When compiled for 64-bit, the PD_HUGE constant is a 64-bit integer. > Mark it as an unsigned long. > > This squashes over a thousand sparse warnings on my minimal T4240RDB > (e6500, ppc64be) config, of the following 2 forms: > > arch/powe

Re: [trivial] powerpc: Typo s/use use/use/

2018-11-27 Thread Michael Ellerman
On Wed, 2018-11-07 at 13:49:03 UTC, Geert Uytterhoeven wrote: > Signed-off-by: Geert Uytterhoeven Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/e734dd63cc42febee4730ecef97ae3 cheers

Re: powerpc: Add CONFIG_NR_CPUS to ppc64_defconfig

2018-11-27 Thread Michael Ellerman
On Thu, 2018-11-08 at 10:25:18 UTC, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > CONFIG_NR_CPUS is not set in ppc64_defconfig, So > it gets default to 32 which is not likely suitable for > powerpc systems configuration, hence defaulting it to 2048 > like other powerpc defconf

Re: [-next] powerpc64/ftrace: Drop pointless static qualifier in is_b_op()

2018-11-27 Thread Michael Ellerman
On Tue, 2018-11-13 at 13:56:56 UTC, YueHaibing wrote: > There is no need to have the 'intoffset' variable static since new value > always be assigned before use it. > > Signed-off-by: YueHaibing > Reviewed-by: Naveen N. Rao Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/d64c

Re: powerpc: Add missing config symbols for ppc64_defconfig

2018-11-27 Thread Michael Ellerman
On Thu, 2018-11-15 at 06:27:11 UTC, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > This patch adds missing config symbols for ppc64_defconfig > to enable cgroups, memhotplug, numa balancing and XFS > in core kernel image. > > Signed-off-by: Satheesh Rajendran Applied to powe

Re: [V3] powerpc: Add KVM guest defconfig

2018-11-27 Thread Michael Ellerman
On Thu, 2018-11-15 at 06:49:50 UTC, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > This patch adds new defconfig options for powerpc KVM guest > and guest.config with additional config symbols enabled, > which is to build kernel to boot without initramfs and can be used > as pl

Re: [-next] powerpc/platforms/85xx: drop pointless static qualifier

2018-11-27 Thread Michael Ellerman
On Thu, 2018-11-15 at 12:33:16 UTC, YueHaibing wrote: > From: Yue Haibing > > There is no need to have the 'void __iomem *cpld_base' variable static > since new value always be assigned before use it. > > Signed-off-by: Yue Haibing Applied to powerpc next, thanks. https://git.kernel.org/power

Re: pkeys: Reserve PKEY_DISABLE_READ

2018-11-27 Thread Ram Pai
On Mon, Nov 12, 2018 at 01:00:19PM +0100, Florian Weimer wrote: > * Ram Pai: > > > On Thu, Nov 08, 2018 at 09:23:35PM +0100, Florian Weimer wrote: > >> * Ram Pai: > >> > >> > Florian, > >> > > >> > I can. But I am struggling to understand the requirement. Why is > >> > this needed? Are we prop

Re: [PATCH v2 16/15] syscall_get_arch: add "struct task_struct *" argument

2018-11-27 Thread Michael Ellerman
"Dmitry V. Levin" writes: > diff --git a/arch/powerpc/include/asm/syscall.h > b/arch/powerpc/include/asm/syscall.h > index ab9f3f0a8637..d88b34179118 100644 > --- a/arch/powerpc/include/asm/syscall.h > +++ b/arch/powerpc/include/asm/syscall.h > @@ -100,9 +100,15 @@ static inline void syscall_set

Re: [PATCH v2 15/20] s390: perf/events: advertise PMU exclusion capability

2018-11-27 Thread Hendrik Brueckner
On Mon, Nov 26, 2018 at 11:12:31AM +, Andrew Murray wrote: > The s390 cpum_cf and cpum_sf PMUs have the capability to exclude > events based on context. Let's advertise that we support the > PERF_PMU_CAP_EXCLUDE capability to ensure that perf doesn't > prevent us from handling events where any

Re: [PATCH RESEND] powerpc/perf: Update perf_regs structure to include SIER

2018-11-27 Thread Madhavan Srinivasan
On 27/11/18 12:24 PM, Christophe LEROY wrote: Le 26/11/2018 à 19:04, Madhavan Srinivasan a écrit : On each sample, Sample Instruction Event Register (SIER) content is saved in pt_regs. SIER does not have a entry as-is in the pt_regs but instead, SIER content is saved in the "dar" register of

Re: pkeys: Reserve PKEY_DISABLE_READ

2018-11-27 Thread Florian Weimer
* Ram Pai: > diff --git a/arch/x86/include/uapi/asm/mman.h > b/arch/x86/include/uapi/asm/mman.h > index d4a8d04..e9b121b 100644 > --- a/arch/x86/include/uapi/asm/mman.h > +++ b/arch/x86/include/uapi/asm/mman.h > @@ -24,6 +24,11 @@ > ((key) & 0x2 ? VM_PKEY_BIT1 : 0) | \ >

Re: [PATCH V5 00/10] x86/KVM/Hyper-v: Add HV ept tlb range flush hypercall support in KVM

2018-11-27 Thread Tianyu Lan
Gentile Ping... On Thu, Nov 8, 2018 at 10:43 PM wrote: > > From: Lan Tianyu > > Sorry. Some patches was blocked and I try to resend via another account. > > For nested memory virtualization, Hyper-v doesn't set write-protect > L1 hypervisor EPT page directory and page table node to track changes

Re: [PATCH V5 00/10] x86/KVM/Hyper-v: Add HV ept tlb range flush hypercall support in KVM

2018-11-27 Thread Dan Carpenter
On Tue, Nov 27, 2018 at 07:59:22PM +0800, Tianyu Lan wrote: > Gentile Ping... > > On Thu, Nov 8, 2018 at 10:43 PM wrote: > > > > From: Lan Tianyu > > > > Sorry. Some patches was blocked and I try to resend via another account. The patches were still blocked? They didn't show up on driver-devel

Re: [PATCH V5 00/10] x86/KVM/Hyper-v: Add HV ept tlb range flush hypercall support in KVM

2018-11-27 Thread Tianyu Lan
On Tue, Nov 27, 2018 at 8:12 PM Dan Carpenter wrote: > > On Tue, Nov 27, 2018 at 07:59:22PM +0800, Tianyu Lan wrote: > > Gentile Ping... > > > > On Thu, Nov 8, 2018 at 10:43 PM wrote: > > > > > > From: Lan Tianyu > > > > > > Sorry. Some patches was blocked and I try to resend via another account

Re: [PATCH RESEND] powerpc/perf: Update perf_regs structure to include SIER

2018-11-27 Thread Arnaldo Carvalho de Melo
Em Mon, Nov 26, 2018 at 11:34:08PM +0530, Madhavan Srinivasan escreveu: > On each sample, Sample Instruction Event Register (SIER) content > is saved in pt_regs. SIER does not have a entry as-is in the pt_regs > but instead, SIER content is saved in the "dar" register of pt_regs. > > Patch adds an

Re: [PATCH V2] mm: Replace all open encodings for NUMA_NO_NODE

2018-11-27 Thread Vinod Koul
On 26-11-18, 17:56, Anshuman Khandual wrote: > At present there are multiple places where invalid node number is encoded > as -1. Even though implicitly understood it is always better to have macros > in there. Replace these open encodings for an invalid node number with the > global macro NUMA_NO_

Re: pkeys: Reserve PKEY_DISABLE_READ

2018-11-27 Thread Dave Hansen
On 11/27/18 3:57 AM, Florian Weimer wrote: > I would have expected something that translates PKEY_DISABLE_WRITE | > PKEY_DISABLE_READ into PKEY_DISABLE_ACCESS, and also accepts > PKEY_DISABLE_ACCESS | PKEY_DISABLE_READ, for consistency with POWER. > > (My understanding is that PKEY_DISABLE_ACCESS

Re: [PATCH] lkdtm: do not depend on CONFIG_BLOCK

2018-11-27 Thread Christophe Leroy
On 11/27/2018 07:43 AM, Greg Kroah-Hartman wrote: On Fri, Nov 09, 2018 at 07:05:51AM +, Christophe Leroy wrote: Most parts of lkdtm don't require CONFIG_BLOCK. This patch limits dependency to CONFIG_BLOCK in order to give embedded platforms which don't select CONFIG_BLOCK the opportunity

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-11-27 Thread Michal Suchánek
On Mon, 26 Nov 2018 16:59:14 +0100 David Hildenbrand wrote: > On 26.11.18 15:20, Michal Suchánek wrote: > > On Mon, 26 Nov 2018 14:33:29 +0100 > > David Hildenbrand wrote: > > > >> On 26.11.18 13:30, David Hildenbrand wrote: > >>> On 23.11.18 19:06, Michal Suchánek wrote: > > >

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-11-27 Thread David Hildenbrand
On 27.11.18 17:32, Michal Suchánek wrote: > On Mon, 26 Nov 2018 16:59:14 +0100 > David Hildenbrand wrote: > >> On 26.11.18 15:20, Michal Suchánek wrote: >>> On Mon, 26 Nov 2018 14:33:29 +0100 >>> David Hildenbrand wrote: >>> On 26.11.18 13:30, David Hildenbrand wrote: > On 23.11.18

Re: [PATCH] lkdtm: do not depend on CONFIG_BLOCK

2018-11-27 Thread Kees Cook
On Tue, Nov 27, 2018 at 7:59 AM, Christophe Leroy wrote: > > > On 11/27/2018 07:43 AM, Greg Kroah-Hartman wrote: >> >> On Fri, Nov 09, 2018 at 07:05:51AM +, Christophe Leroy wrote: >>> >>> Most parts of lkdtm don't require CONFIG_BLOCK. >>> >>> This patch limits dependency to CONFIG_BLOCK in o

[PATCH] lkdtm: Do not depend on BLOCK and clean up headers

2018-11-27 Thread Kees Cook
After the transition to kprobes, symbols are resolved at runtime. This means there is no need to have all the Kconfig and header logic to avoid build failures. This also paves the way to having arbitrary test locations. Reported-by: Christophe Leroy Signed-off-by: Kees Cook --- drivers/misc/lkd

Re: [PATCH] lkdtm: print real addresses

2018-11-27 Thread Kees Cook
On Mon, Nov 26, 2018 at 11:43 PM, Greg Kroah-Hartman wrote: > On Wed, Nov 07, 2018 at 08:14:10PM +, Christophe Leroy wrote: >> Today, when doing a lkdtm test before the readiness of the >> random generator, (ptrval) is printed instead of the address >> at which it perform the fault: >> >> [ 15

Re: [PATCH] powerpc/mm/hash: Hand user access of kernel address gracefully

2018-11-27 Thread Breno Leitao
hi Aneesh, On 11/26/18 12:35 PM, Aneesh Kumar K.V wrote: > With commit 2865d08dd9ea ("powerpc/mm: Move the DSISR_PROTFAULT sanity check") > we moved the protection fault access check before vma lookup. That means we > hit that WARN_ON when user space access a kernel address. Before the commit > t

[PATCH] powerpc/8xx: add exception frame marker

2018-11-27 Thread Christophe Leroy
This patch adds STACK_FRAME_REGS_MARKER in the stack at exception entry in order to see interrupts in call traces as below: [0.013964] Call Trace: [0.014014] [c0745db0] [c007a9d4] tick_periodic.constprop.5+0xd8/0x104 (unreliable) [0.014086] [c0745dc0] [c007aa20] tick_handle_periodic+0

[PATCH v6 0/4] kgdb: Fix kgdb_roundup_cpus()

2018-11-27 Thread Douglas Anderson
This series was originally part of the series ("serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb") but it made sense to split it up. It's believed that dropping into kgdb should be more robust once these patches are applied. Changes in v6: - Moved smp_call_function_single_async()

[PATCH v6 1/4] kgdb: Remove irq flags from roundup

2018-11-27 Thread Douglas Anderson
The function kgdb_roundup_cpus() was passed a parameter that was documented as: > the flags that will be used when restoring the interrupts. There is > local_irq_save() call before kgdb_roundup_cpus(). Nobody used those flags. Anyone who wanted to temporarily turn on interrupts just did local_ir

[PATCH v6 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-11-27 Thread Douglas Anderson
When I had lockdep turned on and dropped into kgdb I got a nice splat on my system. Specifically it hit: DEBUG_LOCKS_WARN_ON(current->hardirq_context) Specifically it looked like this: sysrq: SysRq : DEBUG [ cut here ] DEBUG_LOCKS_WARN_ON(current->hardirq_context)

Re: [PATCH v5 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-11-27 Thread Doug Anderson
git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Douglas-Anderson/kgdb-Fix-kgdb_roundup_cpus/20181127-115425 > base: https://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb.git > kgdb-next > conf

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-27 Thread Alex_Gagniuc
On 11/20/2018 04:08 PM, Sinan Kaya wrote: > I followed the ASWG thread yesterday. There will be a meeting next week to > discuss this. Any updates on the meeting?

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-27 Thread Sinan Kaya
On 11/27/2018 1:22 PM, alex_gagn...@dellteam.com wrote: On 11/20/2018 04:08 PM, Sinan Kaya wrote: I followed the ASWG thread yesterday. There will be a meeting next week to discuss this. Any updates on the meeting? Tyler should be able to get an update.

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-27 Thread Tyler Baicar
On Tue, Nov 27, 2018 at 1:32 PM Sinan Kaya wrote: > > On 11/27/2018 1:22 PM, alex_gagn...@dellteam.com wrote: > > On 11/20/2018 04:08 PM, Sinan Kaya wrote: > >> I followed the ASWG thread yesterday. There will be a meeting next week to > >> discuss this. > > > > Any updates on the meeting? > > > >

Re: [PATCH v5 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-11-27 Thread Will Deacon
On Mon, Nov 26, 2018 at 07:51:31PM -0800, Douglas Anderson wrote: > When I had lockdep turned on and dropped into kgdb I got a nice splat > on my system. Specifically it hit: > DEBUG_LOCKS_WARN_ON(current->hardirq_context) > > Specifically it looked like this: > sysrq: SysRq : DEBUG > -

Re: [Internal Review PATCH] powerpc/pseries: Remap hw to kernel cpu indexes

2018-11-27 Thread Michael Bringmann
This should have been posted as RFC. Will repost. On 11/26/2018 02:33 PM, Michael Bringmann wrote: > Define and apply new interface to map hardware-specific powerpc cpu > ids to a kernel specific range of cpu values. Mapping is intended > to prevent confusion within the kernel about the cpu+node

Re: [Internal Review PATCH] powerpc/pseries: Refactor code to centralize drmem feature

2018-11-27 Thread Michael Bringmann
Wrong Subject. Will repost. On 11/26/2018 02:36 PM, Michael Bringmann wrote: > The implementation of the pseries-specific dynamic memory features > is currently implemented in several non-pseries-specific files. > This patch set moves the implementation of the device-tree parsing > code for the p

[PATCH 0/4] powerpc/pseries: Refactor code to centralize drmem feature

2018-11-27 Thread Michael Bringmann
The implementation of the pseries-specific dynamic memory features is currently implemented in several non-pseries-specific files. This patch set moves the implementation of the device-tree parsing code for the properties ibm,dynamic-memory, ibm,dynamic-memory-v2, and its representation in the kern

[PATCH 1/4] powerpc/pseries: Relocate drmem.c to pseries

2018-11-27 Thread Michael Bringmann
The implementation of the pseries-specific dynamic memory features is currently implemented in several non-pseries-specific files. This patch set moves the implementation of the device-tree parsing code for the properties ibm,dynamic-memory, ibm,dynamic-memory-v2, and its representation in the kern

[PATCH 2/4] powerpc/pseries: Move DRMEM processing out of prom.c

2018-11-27 Thread Michael Bringmann
The implementation of the pseries-specific dynamic memory features is currently implemented in several non-pseries-specific files. This patch set moves the implementation of the device-tree parsing code for the properties ibm,dynamic-memory, ibm,dynamic-memory-v2, and its representation in the kern

[PATCH 4/4] powerpc/pseries: Move DRMEM processing out of numa.c

2018-11-27 Thread Michael Bringmann
The implementation of the pseries-specific dynamic memory features is currently implemented in several non-pseries-specific files. This patch set moves the implementation of the device-tree parsing code for the properties ibm,dynamic-memory, ibm,dynamic-memory-v2, and its representation in the kern

[PATCH 4/4] powerpc/pseries: Relocate drmem.h to pseries

2018-11-27 Thread Michael Bringmann
The implementation of the pseries-specific dynamic memory features is currently implemented in several non-pseries-specific files. This patch set moves the implementation of the device-tree parsing code for the properties ibm,dynamic-memory, ibm,dynamic-memory-v2, and its representation in the kern

Re: [PATCH 4/5] openrisc: simplify pte_alloc_one_kernel()

2018-11-27 Thread Stafford Horne
On Sun, Nov 25, 2018 at 11:44:36PM +0200, Mike Rapoport wrote: > The pte_alloc_one_kernel() function allocates a page using > __get_free_page(GFP_KERNEL) when mm initialization is complete and > memblock_phys_alloc() on the earlier stages. The physical address of the > page allocated with memblock_

Re: [PATCH 4/5] openrisc: simplify pte_alloc_one_kernel()

2018-11-27 Thread Mike Rapoport
On November 27, 2018 11:16:00 PM GMT+02:00, Stafford Horne wrote: >On Sun, Nov 25, 2018 at 11:44:36PM +0200, Mike Rapoport wrote: >> The pte_alloc_one_kernel() function allocates a page using >> __get_free_page(GFP_KERNEL) when mm initialization is complete and >> memblock_phys_alloc() on the

[PATCH] powerpc/numa: Ensure nodes are inited for mem changes

2018-11-27 Thread Michael Bringmann
This patch fixes some problems encountered at runtime where changes to memory affinity changes reference nodes that were not initialized during system execution after boot. We are initializing a node description that may be subsequently used for memory or CPUs before it can be referenced as invali

[PATCH 0/1] Fix NULL pointer access in PowerPC MSI teardown code

2018-11-27 Thread Radu Rendec
Hi everyone, It seems there's an unchecked access to a NULL pointer (to a function) in the PowerPC MSI teardown code. I found this on kernel 4.9, but the code looks identical in the latest 4.20-rc. I don't see any reason why this wouldn't happen on recent kernels too. The PowerPC architecture spe

[PATCH 1/1] Fix NULL pointer access in PowerPC MSI teardown code

2018-11-27 Thread Radu Rendec
The arch_teardown_msi_irqs() function assumes that controller ops pointers were already checked in arch_setup_msi_irqs(), but this assumption is wrong: arch_teardown_msi_irqs() can be called even when arch_setup_msi_irqs() returns an error (-ENOSYS). This can happen in the following scenario: *

Re: [PATCH RESEND] powerpc/perf: Update perf_regs structure to include SIER

2018-11-27 Thread Michael Ellerman
Arnaldo Carvalho de Melo writes: > Em Mon, Nov 26, 2018 at 11:34:08PM +0530, Madhavan Srinivasan escreveu: >> On each sample, Sample Instruction Event Register (SIER) content >> is saved in pt_regs. SIER does not have a entry as-is in the pt_regs >> but instead, SIER content is saved in the "dar"

[PATCH] powerpc/boot: Copy serial.c in Makefile

2018-11-27 Thread Daniel Axtens
A couple of weeks ago, I found my powerpc64e builds were broken when building out-of-tree with make O=../destination: BOOTCC arch/powerpc/boot/serial.o powerpc64-linux-gnu-gcc: error: arch/powerpc/boot/serial.c: No such file or directory powerpc64-linux-gnu-gcc: fatal error: no input files Th

Re: [PATCH RESEND] powerpc/perf: Update perf_regs structure to include SIER

2018-11-27 Thread Madhavan Srinivasan
On 28/11/18 9:04 AM, Michael Ellerman wrote: Arnaldo Carvalho de Melo writes: Em Mon, Nov 26, 2018 at 11:34:08PM +0530, Madhavan Srinivasan escreveu: On each sample, Sample Instruction Event Register (SIER) content is saved in pt_regs. SIER does not have a entry as-is in the pt_regs but ins