Re: [PATCH v5 0/5] Track and expose idle PURR and SPURR ticks

2020-04-30 Thread Gautham R Shenoy
On Thu, Apr 30, 2020 at 09:46:13AM +0530, Gautham R Shenoy wrote: > Hello Michael, > > > > > > Michael, could you please consider this for 5.8 ? > > > > Yes. Has it been tested on KVM at all? > > No. I haven't tested this on KVM. Will do that today. The results on Shared LPAR and KVM are as

Re: Don't initialise ports with no PHY

2020-04-30 Thread Christian Zigotzky
> On 30. Apr 2020, at 23:36, Darren Stevens wrote: > > Hello Christian > >> On 29/04/2020, Christian Zigotzky wrote: >> >> On 29. Apr 2020, at 17:22, Andrew Lunn wrote: >>> >>> ?On Wed, Apr 29, 2020 at 03:55:28PM +0200, Christian Zigotzky wrote: Hi Andrew, You can

[PATCH v7 28/28] powerpc sstep: Add support for prefixed fixed-point arithmetic

2020-04-30 Thread Jordan Niethe
This adds emulation support for the following prefixed Fixed-Point Arithmetic instructions: * Prefixed Add Immediate (paddi) Reviewed-by: Balamuruhan S Signed-off-by: Jordan Niethe --- v3: Since we moved the prefixed loads/stores into the load/store switch statement it no longer makes sense

[PATCH v7 27/28] powerpc sstep: Add support for prefixed load/stores

2020-04-30 Thread Jordan Niethe
This adds emulation support for the following prefixed integer load/stores: * Prefixed Load Byte and Zero (plbz) * Prefixed Load Halfword and Zero (plhz) * Prefixed Load Halfword Algebraic (plha) * Prefixed Load Word and Zero (plwz) * Prefixed Load Word Algebraic (plwa) * Prefixed Load

[PATCH v7 26/28] powerpc: Support prefixed instructions in alignment handler

2020-04-30 Thread Jordan Niethe
If a prefixed instruction results in an alignment exception, the SRR1_PREFIXED bit is set. The handler attempts to emulate the responsible instruction and then increment the NIP past it. Use SRR1_PREFIXED to determine by how much the NIP should be incremented. Prefixed instructions are not

[PATCH v7 25/28] powerpc: Test prefixed instructions in feature fixups

2020-04-30 Thread Jordan Niethe
Expand the feature-fixups self-tests to includes tests for prefixed instructions. Signed-off-by: Jordan Niethe --- v6: New to series --- arch/powerpc/lib/feature-fixups-test.S | 68 +++ arch/powerpc/lib/feature-fixups.c | 74 ++ 2 files changed,

[PATCH v7 24/28] powerpc: Test prefixed code patching

2020-04-30 Thread Jordan Niethe
Expand the code-patching self-tests to includes tests for patching prefixed instructions. Signed-off-by: Jordan Niethe --- v6: New to series --- arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/code-patching.c | 21 + arch/powerpc/lib/test_code-patching.S

[PATCH v7 23/28] powerpc: Add prefixed instructions to instruction data type

2020-04-30 Thread Jordan Niethe
For powerpc64, redefine the ppc_inst type so both word and prefixed instructions can be represented. On powerpc32 the type will remain the same. Update places which had assumed instructions to be 4 bytes long. Signed-off-by: Jordan Niethe --- v4: New to series v5: - Distinguish normal

[PATCH v7 22/28] powerpc: Define new SRR1 bits for a future ISA version

2020-04-30 Thread Jordan Niethe
Add the BOUNDARY SRR1 bit definition for when the cause of an alignment exception is a prefixed instruction that crosses a 64-byte boundary. Add the PREFIXED SRR1 bit definition for exceptions caused by prefixed instructions. Bit 35 of SRR1 is called SRR1_ISI_N_OR_G. This name comes from it being

[PATCH v7 21/28] powerpc: Enable Prefixed Instructions

2020-04-30 Thread Jordan Niethe
From: Alistair Popple Prefix instructions have their own FSCR bit which needs to enabled via a CPU feature. The kernel will save the FSCR for problem state but it needs to be enabled initially. If prefixed instructions are made unavailable by the [H]FSCR, attempting to use them will cause a

[PATCH v7 20/28] powerpc: Make test_translate_branch() independent of instruction length

2020-04-30 Thread Jordan Niethe
test_translate_branch() uses two pointers to instructions within a buffer, p and q, to test patch_branch(). The pointer arithmetic done on them assumes a size of 4. This will not work if the instruction length changes. Instead do the arithmetic relative to the void * to the buffer. Signed-off-by:

[PATCH v7 19/28] powerpc/xmon: Move insertion of breakpoint for xol'ing

2020-04-30 Thread Jordan Niethe
When a new breakpoint is created, the second instruction of that breakpoint is patched with a trap instruction. This assumes the length of the instruction is always the same. In preparation for prefixed instructions, remove this assumption. Insert the trap instruction at the same time the first

[PATCH v7 18/28] powerpc/xmon: Use a function for reading instructions

2020-04-30 Thread Jordan Niethe
Currently in xmon, mread() is used for reading instructions. In preparation for prefixed instructions, create and use a new function, mread_instr(), especially for reading instructions. Signed-off-by: Jordan Niethe --- v5: New to series, seperated from "Add prefixed instructions to

[PATCH v7 17/28] powerpc: Introduce a function for reporting instruction length

2020-04-30 Thread Jordan Niethe
Currently all instructions have the same length, but in preparation for prefixed instructions introduce a function for returning instruction length. Signed-off-by: Jordan Niethe --- v6: - feature-fixups.c: do_final_fixups(): use here - ppc_inst_len(): change return type from bool to int

[PATCH v7 16/28] powerpc: Define and use __get_user_instr{, inatomic}()

2020-04-30 Thread Jordan Niethe
Define specific __get_user_instr() and __get_user_instr_inatomic() macros for reading instructions from user space. Signed-off-by: Jordan Niethe --- arch/powerpc/include/asm/uaccess.h | 5 + arch/powerpc/kernel/align.c | 2 +- arch/powerpc/kernel/hw_breakpoint.c | 2 +-

[PATCH v7 15/28] powerpc/kprobes: Use patch_instruction()

2020-04-30 Thread Jordan Niethe
Instead of using memcpy() and flush_icache_range() use patch_instruction() which not only accomplishes both of these steps but will also make it easier to add support for prefixed instructions. Signed-off-by: Jordan Niethe --- v6: New to series. --- arch/powerpc/kernel/kprobes.c | 5 + 1

[PATCH v7 14/28] powerpc: Add a probe_kernel_read_inst() function

2020-04-30 Thread Jordan Niethe
Introduce a probe_kernel_read_inst() function to use in cases where probe_kernel_read() is used for getting an instruction. This will be more useful for prefixed instructions. Signed-off-by: Jordan Niethe --- v6: - This was previously just in ftrace.c --- arch/powerpc/include/asm/inst.h| 2

[PATCH v7 13/28] powerpc: Add a probe_user_read_inst() function

2020-04-30 Thread Jordan Niethe
Introduce a probe_user_read_inst() function to use in cases where probe_user_read() is used for getting an instruction. This will be more useful for prefixed instructions. Signed-off-by: Jordan Niethe --- v6: - New to series --- arch/powerpc/include/asm/inst.h | 3 +++

[PATCH v7 12/28] powerpc: Use a function for reading instructions

2020-04-30 Thread Jordan Niethe
Prefixed instructions will mean there are instructions of different length. As a result dereferencing a pointer to an instruction will not necessarily give the desired result. Introduce a function for reading instructions from memory into the instruction data type. Signed-off-by: Jordan Niethe

[PATCH v7 11/28] powerpc: Use a datatype for instructions

2020-04-30 Thread Jordan Niethe
Currently unsigned ints are used to represent instructions on powerpc. This has worked well as instructions have always been 4 byte words. However, a future ISA version will introduce some changes to instructions that mean this scheme will no longer work as well. This change is Prefixed

[PATCH v7 10/28] powerpc: Introduce functions for instruction equality

2020-04-30 Thread Jordan Niethe
In preparation for an instruction data type that can not be directly used with the '==' operator use functions for checking equality. Reviewed-by: Balamuruhan S Signed-off-by: Jordan Niethe --- v5: Remove ppc_inst_null() v7: Fix compilation issue in expected_nop_sequence() when no

[PATCH v7 09/28] powerpc: Use a function for byte swapping instructions

2020-04-30 Thread Jordan Niethe
Use a function for byte swapping instructions in preparation of a more complicated instruction type. Reviewed-by: Balamuruhan S Signed-off-by: Jordan Niethe --- arch/powerpc/include/asm/inst.h | 5 + arch/powerpc/kernel/align.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)

[PATCH v7 08/28] powerpc: Use a function for getting the instruction op code

2020-04-30 Thread Jordan Niethe
In preparation for using a data type for instructions that can not be directly used with the '>>' operator use a function for getting the op code of an instruction. Signed-off-by: Jordan Niethe --- v4: New to series v6: - Rename ppc_inst_primary() to ppc_inst_primary_opcode() - Use in

[PATCH v7 07/28] powerpc: Use an accessor for instructions

2020-04-30 Thread Jordan Niethe
In preparation for introducing a more complicated instruction type to accomodate prefixed instructions use an accessor for getting an instruction as a u32. Signed-off-by: Jordan Niethe --- v4: New to series v5: Remove references to 'word' instructions v6: - test_emulate_step.c:

[PATCH v7 06/28] powerpc: Use a macro for creating instructions from u32s

2020-04-30 Thread Jordan Niethe
In preparation for instructions having a more complex data type start using a macro, ppc_inst(), for making an instruction out of a u32. A macro is used so that instructions can be used as initializer elements. Currently this does nothing, but it will allow for creating a data type that can

[PATCH v7 05/28] powerpc: Change calling convention for create_branch() et. al.

2020-04-30 Thread Jordan Niethe
create_branch(), create_cond_branch() and translate_branch() return the instruction that they create, or return 0 to signal an error. Separate these concerns in preparation for an instruction type that is not just an unsigned int. Fill the created instruction to a pointer passed as the first

[PATCH v7 04/28] powerpc/xmon: Use bitwise calculations in_breakpoint_table()

2020-04-30 Thread Jordan Niethe
A modulo operation is used for calculating the current offset from a breakpoint within the breakpoint table. As instruction lengths are always a power of 2, this can be replaced with a bitwise 'and'. The current check for word alignment can be replaced with checking that the lower 2 bits are not

[PATCH v7 03/28] powerpc/xmon: Move breakpoints to text section

2020-04-30 Thread Jordan Niethe
The instructions for xmon's breakpoint are stored bpt_table[] which is in the data section. This is problematic as the data section may be marked as no execute. Move bpt_table[] to the text section. Signed-off-by: Jordan Niethe --- v6: - New to series. Was part of the previous patch. - Make

[PATCH v7 02/28] powerpc/xmon: Move breakpoint instructions to own array

2020-04-30 Thread Jordan Niethe
To execute an instruction out of line after a breakpoint, the NIP is set to the address of struct bpt::instr. Here a copy of the instruction that was replaced with a breakpoint is kept, along with a trap so normal flow can be resumed after XOLing. The struct bpt's are located within the data

[PATCH v7 01/28] powerpc/xmon: Remove store_inst() for patch_instruction()

2020-04-30 Thread Jordan Niethe
For modifying instructions in xmon, patch_instruction() can serve the same role that store_inst() is performing with the advantage of not being specific to xmon. In some places patch_instruction() is already being using followed by store_inst(). In these cases just remove the store_inst().

[PATCH v7 00/28] Initial Prefixed Instruction support

2020-04-30 Thread Jordan Niethe
A future revision of the ISA will introduce prefixed instructions. A prefixed instruction is composed of a 4-byte prefix followed by a 4-byte suffix. All prefixes have the major opcode 1. A prefix will never be a valid word instruction. A suffix may be an existing word instruction or a new

Re: [PATCH V1 09/10] arch/kmap: Define kmap_atomic_prot() for all arch's

2020-04-30 Thread Al Viro
On Fri, May 01, 2020 at 03:37:34AM +0100, Al Viro wrote: > On Thu, Apr 30, 2020 at 01:38:44PM -0700, ira.we...@intel.com wrote: > > > -static inline void *kmap_atomic(struct page *page) > > +static inline void *kmap_atomic_prot(struct page *page, pgprot_t prot) > > { > > preempt_disable(); >

Re: [PATCH 21/29] mm: remove the pgprot argument to __vmalloc

2020-04-30 Thread John Dorminy
>> On Tue, Apr 14, 2020 at 03:13:40PM +0200, Christoph Hellwig wrote: >> > The pgprot argument to __vmalloc is always PROT_KERNEL now, so remove >> > it. Greetings; I recently noticed this change via the linux-next tree. It may not be possible to edit at this late date, but the change

Re: [PATCH 21/29] mm: remove the pgprot argument to __vmalloc

2020-04-30 Thread John Dorminy
Greetings; I recently noticed this change via the linux-next tree. It may not be possible to edit at this late date, but the change description refers to PROT_KERNEL, which is a symbol which does not appear to exist; perhaps PAGE_KERNEL was meant? The mismatch caused me and a couple other folks

[PATCH v3 3/3] mm/page_alloc: Keep memoryless cpuless node 0 offline

2020-04-30 Thread Srikar Dronamraju
Currently Linux kernel with CONFIG_NUMA on a system with multiple possible nodes, marks node 0 as online at boot. However in practice, there are systems which have node 0 as memoryless and cpuless. This can cause numa_balancing to be enabled on systems with only one node with memory and CPUs.

[PATCH v3 2/3] powerpc/numa: Prefer node id queried from vphn

2020-04-30 Thread Srikar Dronamraju
Node id queried from the static device tree may not be correct. For example: it may always show 0 on a shared processor. Hence prefer the node id queried from vphn and fallback on the device tree based node id if vphn query fails. Cc: linuxppc-dev@lists.ozlabs.org Cc: linux...@kvack.org Cc:

[PATCH v3 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-04-30 Thread Srikar Dronamraju
A Powerpc system with multiple possible nodes and with CONFIG_NUMA enabled always used to have a node 0, even if node 0 does not any cpus or memory attached to it. As per PAPR, node affinity of a cpu is only available once its present / online. For all cpus that are possible but not present,

[PATCH v3 0/3] Offline memoryless cpuless node 0

2020-04-30 Thread Srikar Dronamraju
Changelog v2:->v3: - Resolved comments from Gautham. Link v2: https://lore.kernel.org/linuxppc-dev/20200428093836.27190-1-sri...@linux.vnet.ibm.com/t/#u Changelog v1:->v2: - Rebased to v5.7-rc3 - Updated the changelog. Link v1:

Re: [PATCH V1 09/10] arch/kmap: Define kmap_atomic_prot() for all arch's

2020-04-30 Thread Al Viro
On Thu, Apr 30, 2020 at 01:38:44PM -0700, ira.we...@intel.com wrote: > -static inline void *kmap_atomic(struct page *page) > +static inline void *kmap_atomic_prot(struct page *page, pgprot_t prot) > { > preempt_disable(); > pagefault_disable(); > if (!PageHighMem(page)) >

Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-04-30 Thread Michael Ellerman
ira.we...@intel.com writes: > From: Ira Weiny > > The kmap infrastructure has been copied almost verbatim to every architecture. > This series consolidates obvious duplicated code by defining core functions > which call into the architectures only when needed. > > Some of the k[un]map_atomic()

Re: [PATCH V1 08/10] arch/kmap: Don't hard code kmap_prot values

2020-04-30 Thread Al Viro
On Thu, Apr 30, 2020 at 01:38:43PM -0700, ira.we...@intel.com wrote: > From: Ira Weiny > > To support kmap_atomic_prot() on all architectures each arch must > support protections passed in to them. > > Change csky, mips, nds32 and xtensa to use their global kmap_prot value > rather than a hard

Re: [PATCH V1 05/10] arch/kmap_atomic: Consolidate duplicate code

2020-04-30 Thread Al Viro
On Thu, Apr 30, 2020 at 01:38:40PM -0700, ira.we...@intel.com wrote: > From: Ira Weiny > > Every arch has the same code to ensure atomic operations and a check for > !HIGHMEM page. > > Remove the duplicate code by defining a core kmap_atomic() which only > calls the arch specific

Re: [PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread Andrew Morton
On Thu, 30 Apr 2020 20:43:39 +0200 David Hildenbrand wrote: > > > > Why does the firmware map support hotplug entries? > > I assume: > > The firmware memmap was added primarily for x86-64 kexec (and still, is > mostly used on x86-64 only IIRC). There, we had ACPI hotplug. When DIMMs > get

Re: Don't initialise ports with no PHY

2020-04-30 Thread Darren Stevens
Hello Christian On 29/04/2020, Christian Zigotzky wrote: > > >> On 29. Apr 2020, at 17:22, Andrew Lunn wrote: >> >> ?On Wed, Apr 29, 2020 at 03:55:28PM +0200, Christian Zigotzky wrote: >>> Hi Andrew, >>> >>> You can find some dtb and source files in our kernel package. >>> >>> Download:

Re: Don't initialise ports with no PHY

2020-04-30 Thread Darren Stevens
Hello Andrew On 25/04/2020, Andrew Lunn wrote: > On Fri, Apr 24, 2020 at 11:29:38PM +0100, Darren Stevens wrote: >> Since cbb961ca271e ("Use random MAC address when none is given") >> Varisys Cyrus P5020 boards have been listing 5 ethernet ports instead of >> the 2 the board has.This is because

[PATCH V1 06/10] arch/kunmap_atomic: Consolidate duplicate code

2020-04-30 Thread ira . weiny
From: Ira Weiny Every single architecture (including !CONFIG_HIGHMEM) calls... pagefault_enable(); preempt_enable(); ... before returning from __kunmap_atomic(). Lift this code into the kunmap_atomic() macro. While we are at it rename __kunmap_atomic() to kunmap_atomic_high()

[PATCH V1 08/10] arch/kmap: Don't hard code kmap_prot values

2020-04-30 Thread ira . weiny
From: Ira Weiny To support kmap_atomic_prot() on all architectures each arch must support protections passed in to them. Change csky, mips, nds32 and xtensa to use their global kmap_prot value rather than a hard coded value which was equal. Signed-off-by: Ira Weiny --- arch/csky/mm/highmem.c

[PATCH V1 07/10] arch/kmap: Ensure kmap_prot visibility

2020-04-30 Thread ira . weiny
From: Ira Weiny We want to support kmap_atomic_prot() on all architectures and it makes sense to define kmap_atomic() to use the default kmap_prot. So we ensure all arch's have a globally available kmap_prot either as a define or exported symbol. Signed-off-by: Ira Weiny ---

[PATCH V1 10/10] drm: Remove drm specific kmap_atomic code

2020-04-30 Thread ira . weiny
From: Ira Weiny kmap_atomic_prot() is now exported by all architectures. Use this function rather than open coding a driver specific kmap_atomic. Signed-off-by: Ira Weiny --- drivers/gpu/drm/ttm/ttm_bo_util.c| 56 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 16

[PATCH V1 09/10] arch/kmap: Define kmap_atomic_prot() for all arch's

2020-04-30 Thread ira . weiny
From: Ira Weiny To support kmap_atomic_prot(), all architectures need to support protections passed to their kmap_atomic_high() function. Pass protections into kmap_atomic_high() and change the name to kmap_atomic_high_prot() to match. Then define kmap_atomic_prot() as a core function which

[PATCH V1 03/10] arch/kmap: Remove redundant arch specific kmaps

2020-04-30 Thread ira . weiny
From: Ira Weiny The kmap code for all the architectures is almost 100% identical. Lift the common code to the core. Use ARCH_HAS_KMAP_FLUSH_TLB to indicate if an arch defines kmap_flush_tlb() and call if if needed. This also has the benefit of changing kmap() on a number of architectures to

[PATCH V1 04/10] arch/kunmap: Remove duplicate kunmap implementations

2020-04-30 Thread ira . weiny
From: Ira Weiny All architectures do exactly the same thing for kunmap(); remove all the duplicate definitions and lift the call to the core. This also has the benefit of changing kmap_unmap() on a number of architectures to be an inline call rather than an actual function. Signed-off-by: Ira

[PATCH V1 05/10] arch/kmap_atomic: Consolidate duplicate code

2020-04-30 Thread ira . weiny
From: Ira Weiny Every arch has the same code to ensure atomic operations and a check for !HIGHMEM page. Remove the duplicate code by defining a core kmap_atomic() which only calls the arch specific kmap_atomic_high() when the page is high memory. Signed-off-by: Ira Weiny --- Changes from V0:

[PATCH V1 02/10] arch/xtensa: Move kmap build bug out of the way

2020-04-30 Thread ira . weiny
From: Ira Weiny Move the kmap() build bug to kmap_init() to facilitate patches to lift kmap() to the core. Signed-off-by: Ira Weiny --- arch/xtensa/include/asm/highmem.h | 5 - arch/xtensa/mm/highmem.c | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH V1 01/10] arch/kmap: Remove BUG_ON()

2020-04-30 Thread ira . weiny
From: Ira Weiny Replace the use of BUG_ON(in_interrupt()) in the kmap() and kunmap() in favor of might_sleep(). Besides the benefits of might_sleep(), this normalizes the implementations such that they can be made generic in subsequent patches. Reviewed-by: Dan Williams Signed-off-by: Ira

[PATCH V1 00/10] Remove duplicated kmap code

2020-04-30 Thread ira . weiny
From: Ira Weiny The kmap infrastructure has been copied almost verbatim to every architecture. This series consolidates obvious duplicated code by defining core functions which call into the architectures only when needed. Some of the k[un]map_atomic() implementations have some similarities but

Re: [PATCH net] ibmvnic: Skip fatal error reset after passive init

2020-04-30 Thread David Miller
From: Juliet Kim Date: Thu, 30 Apr 2020 13:22:11 -0500 > During MTU change, the following events may happen. > Client-driven CRQ initialization fails due to partner’s CRQ closed, > causing client to enqueue a reset task for FATAL_ERROR. Then passive > (server-driven) CRQ initialization succeeds,

Re: [PATCH 00/37] net: manually convert files to ReST format - part 2

2020-04-30 Thread David Miller
From: Mauro Carvalho Chehab Date: Thu, 30 Apr 2020 18:03:55 +0200 > That's the second part of my work to convert the networking > text files into ReST. it is based on today's linux-next (next-20200430). > > The full series (including those ones) are at: > > https

[PATCH v3 2/2] PCI/DPC: Use _OSC to determine DPC support

2020-04-30 Thread Jon Derrick
After a5bf8719af: "PCI/AER: Use only _OSC to determine AER ownership", _OSC is the primary determiner of ownership of Firmware First error handling rather than HEST. With the addition of DPC to _OSC [1], OSPM is able to negotiate DPC services from Firmware. ACPI Root Bus enumeration sets the Host

[PATCH v3 1/2] PCI/AER: Use _OSC to determine Firmware First before HEST

2020-04-30 Thread Jon Derrick
After a5bf8719af: "PCI/AER: Use only _OSC to determine AER ownership", _OSC is the primary determiner of ownership of Firmware First error handling rather than HEST. ACPI Root Bus enumeration has been modified to flag Host Bridge devices as using Native AER when _OSC has been negotiated for AER

[PATCH v3 0/2] PCI/ERR: Allow Native AER/DPC using _OSC

2020-04-30 Thread Jon Derrick
Hi Bjorn & Kuppuswamy, I see a problem in the DPC ECN [1] to _OSC in that it doesn't give us a way to determine if firmware supports _OSC DPC negotation, and therefore how to handle DPC. Here is the wording of the ECN that implies that Firmware without _OSC DPC negotiation support should have

Re: [PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread Dan Williams
On Thu, Apr 30, 2020 at 11:44 AM David Hildenbrand wrote: > > >>> If the class of memory is different then please by all means let's mark > >>> it differently in struct resource so everyone knows it is different. > >>> But that difference needs to be more than hotplug. > >>> > >>> That

Re: [PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread David Hildenbrand
>>> If the class of memory is different then please by all means let's mark >>> it differently in struct resource so everyone knows it is different. >>> But that difference needs to be more than hotplug. >>> >>> That difference needs to be the hypervisor loaned us memory and might >>> take it

[PATCH net] ibmvnic: Skip fatal error reset after passive init

2020-04-30 Thread Juliet Kim
During MTU change, the following events may happen. Client-driven CRQ initialization fails due to partner’s CRQ closed, causing client to enqueue a reset task for FATAL_ERROR. Then passive (server-driven) CRQ initialization succeeds, causing client to release CRQ and enqueue a reset task for

Re: [PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread Eric W. Biederman
David Hildenbrand writes: > On 30.04.20 18:33, Eric W. Biederman wrote: >> David Hildenbrand writes: >> >>> On 30.04.20 17:38, Eric W. Biederman wrote: David Hildenbrand writes: > Some devices/drivers that add memory via add_memory() and friends (e.g., > dax/kmem, but also

Re: [PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread David Hildenbrand
On 30.04.20 18:33, Eric W. Biederman wrote: > David Hildenbrand writes: > >> On 30.04.20 17:38, Eric W. Biederman wrote: >>> David Hildenbrand writes: >>> Some devices/drivers that add memory via add_memory() and friends (e.g., dax/kmem, but also virtio-mem in the future) don't want

Re: [PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread Eric W. Biederman
David Hildenbrand writes: > On 30.04.20 17:38, Eric W. Biederman wrote: >> David Hildenbrand writes: >> >>> Some devices/drivers that add memory via add_memory() and friends (e.g., >>> dax/kmem, but also virtio-mem in the future) don't want to create entries >>> in /sys/firmware/memmap/ -

[PATCH v4 00/19] Manually convert thermal, crypto and misc devices to ReST

2020-04-30 Thread Mauro Carvalho Chehab
Manually convert some files from thermal, crypto and misc-devices to ReST format. This series is against linux-next 20200430 tag (as I rebased it, in order to check if some patch were already merged via some other tree), but it should very likely merge fine against docs-next. The full series

[PATCH v4 14/19] docs: powerpc: convert vcpudispatch_stats.txt to ReST

2020-04-30 Thread Mauro Carvalho Chehab
- Add a SPDX header; - Use standard markup for document title; - Adjust identation on lists and add blank lines where needed; - Add it to the powerpc index.rst file. Acked-by: Michael Ellerman # powerpc Signed-off-by: Mauro Carvalho Chehab --- Documentation/powerpc/index.rst

Re: [PATCH] net/bonding: Do not transition down slave after speed/duplex check

2020-04-30 Thread Thomas Falcon
On 4/29/20 1:38 PM, Jay Vosburgh wrote: Thomas Falcon wrote: The following behavior has been observed when testing logical partition migration of LACP-bonded VNIC devices in a PowerVM pseries environment. 1. When performing the migration, the bond master detects that a slave has lost

[PATCH 07/37] docs: networking: convert netconsole.txt to ReST

2020-04-30 Thread Mauro Carvalho Chehab
- add SPDX header; - add a document title; - mark code blocks and literals as such; - mark tables as such; - add notes markups; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab --- .../admin-guide/kernel-parameters.txt

[PATCH 00/37] net: manually convert files to ReST format - part 2

2020-04-30 Thread Mauro Carvalho Chehab
That's the second part of my work to convert the networking text files into ReST. it is based on today's linux-next (next-20200430). The full series (including those ones) are at: https://git.linuxtv.org/mchehab/experimental.git/log/?h=net-docs I should be sending the remaining patches

Re: [PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread Dave Hansen
On 4/30/20 8:52 AM, David Hildenbrand wrote: >> Justifying behavior by documentation that does not consider memory >> hotplug is bad thinking. > Are you maybe confusing this patch series with the arm64 approach? This > is not about ordinary hotplugged DIMMs. > > I'd love to get Dan's, Dave's and

Re: [PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread David Hildenbrand
On 30.04.20 17:38, Eric W. Biederman wrote: > David Hildenbrand writes: > >> Some devices/drivers that add memory via add_memory() and friends (e.g., >> dax/kmem, but also virtio-mem in the future) don't want to create entries >> in /sys/firmware/memmap/ - primarily to hinder kexec from adding

Re: [PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread Eric W. Biederman
David Hildenbrand writes: > Some devices/drivers that add memory via add_memory() and friends (e.g., > dax/kmem, but also virtio-mem in the future) don't want to create entries > in /sys/firmware/memmap/ - primarily to hinder kexec from adding this > memory to the boot memmap of the kexec

Re: [PATCH v2 3/3] device-dax: Add system ram (add_memory()) with MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread David Hildenbrand
On 30.04.20 13:23, Dave Hansen wrote: > On 4/30/20 3:29 AM, David Hildenbrand wrote: >> Currently, when adding memory, we create entries in /sys/firmware/memmap/ >> as "System RAM". This does not reflect the reality and will lead to >> kexec-tools to add that memory to the fixed-up initial memmap

Re: [PATCH] i2c: powermac: use true,false for bool variable

2020-04-30 Thread Wolfram Sang
On Sun, Apr 26, 2020 at 05:42:28PM +0800, Jason Yan wrote: > In i2c_powermac_register_devices(), variable 'found_onyx' is bool and > assigned '0' and 'true' in different places. Use 'false' instead of '0'. > This fixes the following coccicheck warning: > >

[PATCH 1/2 v2] powerpc/dma: Define map/unmap mmio resource callbacks

2020-04-30 Thread Max Gurtovoy
Define the map_resource/unmap_resource callbacks for the dma_iommu_ops used by several powerpc platforms. The map_resource callback is called when trying to map a mmio resource through the dma_map_resource() driver API. For now, the callback returns an invalid address for devices using

[PATCH 2/2 v2] powerpc/powernv: Enable and setup PCI P2P

2020-04-30 Thread Max Gurtovoy
Implement the generic dma_map_resource callback on the PCI controller for powernv. This will enable PCI P2P on POWER9 architecture. It will allow catching a cross-PHB mmio mapping, which needs to be setup in hardware by calling opal. Both the initiator and target PHBs need to be configured, so we

Re: [RFC PATCH v2 7/7] powerpc/selftest: reuse ppc-opcode macros to avoid redundancy

2020-04-30 Thread Naveen N. Rao
Michael Ellerman wrote: "Naveen N. Rao" writes: Michael Ellerman wrote: Balamuruhan S writes: Avoid redefining macros to encode ppc instructions instead reuse it from ppc-opcode.h, Makefile changes are necessary to compile memcmp_64.S with __ASSEMBLY__ defined from selftests.

Re: [PATCH v2 3/3] device-dax: Add system ram (add_memory()) with MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread Dave Hansen
On 4/30/20 3:29 AM, David Hildenbrand wrote: > Currently, when adding memory, we create entries in /sys/firmware/memmap/ > as "System RAM". This does not reflect the reality and will lead to > kexec-tools to add that memory to the fixed-up initial memmap for a > kexec kernel (loaded via

Re: [PATCH v6 3/4] ndctl/papr_scm, uapi: Add support for PAPR nvdimm specific methods

2020-04-30 Thread Vaibhav Jain
Hi Mpe, Thanks again for reviewing this patchset. Michael Ellerman writes: > Vaibhav Jain writes: >> Introduce support for Papr nvDimm Specific Methods (PDSM) in papr_scm >> modules and add the command family to the white list of NVDIMM command >> sets. Also advertise support for ND_CMD_CALL

[PATCH v2 3/3] device-dax: Add system ram (add_memory()) with MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread David Hildenbrand
Currently, when adding memory, we create entries in /sys/firmware/memmap/ as "System RAM". This does not reflect the reality and will lead to kexec-tools to add that memory to the fixed-up initial memmap for a kexec kernel (loaded via kexec_load()). The memory will be considered initial System RAM

[PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP

2020-04-30 Thread David Hildenbrand
Some devices/drivers that add memory via add_memory() and friends (e.g., dax/kmem, but also virtio-mem in the future) don't want to create entries in /sys/firmware/memmap/ - primarily to hinder kexec from adding this memory to the boot memmap of the kexec kernel. In fact, such memory is never

[PATCH v2 1/3] mm/memory_hotplug: Prepare passing flags to add_memory() and friends

2020-04-30 Thread David Hildenbrand
We soon want to pass flags - prepare for that. This patch is based on a similar patch by Oscar Salvador: https://lkml.kernel.org/r/20190625075227.15193-3-osalva...@suse.de Acked-by: Wei Liu Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Rafael J. Wysocki" Cc: Len

[PATCH v2 0/3] mm/memory_hotplug: Allow to not create firmware memmap entries

2020-04-30 Thread David Hildenbrand
This is the follow up of [1]: [PATCH v1 0/3] mm/memory_hotplug: Make virtio-mem play nicely with kexec-tools I realized that this is not only helpful for virtio-mem, but also for dax/kmem - it's a fix for that use case (see patch #3) of persistent memory. Also, while testing, I

Re: [PATCH v6 3/4] ndctl/papr_scm, uapi: Add support for PAPR nvdimm specific methods

2020-04-30 Thread Michael Ellerman
Vaibhav Jain writes: > Introduce support for Papr nvDimm Specific Methods (PDSM) in papr_scm > modules and add the command family to the white list of NVDIMM command > sets. Also advertise support for ND_CMD_CALL for the dimm > command mask and implement necessary scaffolding in the module to >

Re: [PATCH v6 2/4] powerpc/papr_scm: Fetch nvdimm health information from PHYP

2020-04-30 Thread Michael Ellerman
Vaibhav Jain writes: > Implement support for fetching nvdimm health information via > H_SCM_HEALTH hcall as documented in Ref[1]. The hcall returns a pair > of 64-bit big-endian integers, bitwise-and of which is then stored in > 'struct papr_scm_priv' and subsequently partially exposed to >

Re: [PATCH v1 2/3] mm/memory_hotplug: Introduce MHP_DRIVER_MANAGED

2020-04-30 Thread Dan Williams
On Thu, Apr 30, 2020 at 1:21 AM David Hildenbrand wrote: > >> Just because we decided to use some DAX memory in the current kernel as > >> system ram, doesn't mean we should make that decision for the kexec > >> kernel (e.g., using it as initial memory, placing kexec binaries onto > >> it, etc.).

Re: [PATCH v1 2/3] mm/memory_hotplug: Introduce MHP_DRIVER_MANAGED

2020-04-30 Thread David Hildenbrand
On 30.04.20 10:11, Dan Williams wrote: > On Thu, Apr 30, 2020 at 12:20 AM David Hildenbrand wrote: >> >> On 29.04.20 18:08, David Hildenbrand wrote: >>> Some paravirtualized devices that add memory via add_memory() and >>> friends (esp. virtio-mem) don't want to create entries in >>>

Re: [PATCH v1 2/3] mm/memory_hotplug: Introduce MHP_DRIVER_MANAGED

2020-04-30 Thread Dan Williams
On Thu, Apr 30, 2020 at 12:20 AM David Hildenbrand wrote: > > On 29.04.20 18:08, David Hildenbrand wrote: > > Some paravirtualized devices that add memory via add_memory() and > > friends (esp. virtio-mem) don't want to create entries in > > /sys/firmware/memmap/ - primarily to hinder kexec from

Re: [PATCH v1 2/3] mm/memory_hotplug: Introduce MHP_DRIVER_MANAGED

2020-04-30 Thread David Hildenbrand
On 29.04.20 18:08, David Hildenbrand wrote: > Some paravirtualized devices that add memory via add_memory() and > friends (esp. virtio-mem) don't want to create entries in > /sys/firmware/memmap/ - primarily to hinder kexec from adding this > memory to the boot memmap of the kexec kernel. > > In

Re: [PATCH v2 3/3] mm/page_alloc: Keep memoryless cpuless node 0 offline

2020-04-30 Thread Srikar Dronamraju
* Michal Hocko [2020-04-29 14:22:11]: > On Wed 29-04-20 07:11:45, Srikar Dronamraju wrote: > > > > > > > > By marking, N_ONLINE as NODE_MASK_NONE, lets stop assuming that Node 0 > > > > is > > > > always online. > > > > > > > > ... > > > > > > > > --- a/mm/page_alloc.c > > > > +++

Re: [PATCH 2/2] powerpc/spufs: stop using access_ok

2020-04-30 Thread Christophe Leroy
Le 30/04/2020 à 07:39, Christoph Hellwig a écrit : On Thu, Apr 30, 2020 at 08:39:00AM +0800, Jeremy Kerr wrote: Hi Christophe, Just use the proper non __-prefixed get/put_user variants where that is not done yet. But it means you are doing the access_ok() check everytime, which is what

Re: [PATCH v6 1/4] powerpc: Document details on H_SCM_HEALTH hcall

2020-04-30 Thread Michael Ellerman
Vaibhav Jain writes: > Add documentation to 'papr_hcalls.rst' describing the bitmap flags > that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM > specification. > > Cc: Dan Williams > Cc: Michael Ellerman > Cc: "Aneesh Kumar K . V" > Signed-off-by: Vaibhav Jain > --- > Changelog: >