[PATCH v9 12/12] powerpc/64s/radix: Enable huge vmalloc mappings

2020-12-04 Thread Nicholas Piggin
Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nicholas Piggin --- Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/powerpc/Kconfig| 1 + arch/powerpc/kernel/module.c| 13 +++-- 3 files changed, 14 insertions(+), 2

[PATCH v9 11/12] mm/vmalloc: Hugepage vmalloc mappings

2020-12-04 Thread Nicholas Piggin
Support huge page vmalloc mappings. Config option HAVE_ARCH_HUGE_VMALLOC enables support on architectures that define HAVE_ARCH_HUGE_VMAP and supports PMD sized vmap mappings. vmalloc will attempt to allocate PMD-sized pages if allocating PMD size or larger, and fall back to small pages if that

[PATCH v9 10/12] mm/vmalloc: add vmap_range_noflush variant

2020-12-04 Thread Nicholas Piggin
As a side-effect, the order of flush_cache_vmap() and arch_sync_kernel_mappings() calls are switched, but that now matches the other callers in this file. Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCH v9 09/12] mm: Move vmap_range from mm/ioremap.c to mm/vmalloc.c

2020-12-04 Thread Nicholas Piggin
This is a generic kernel virtual memory mapper, not specific to ioremap. Signed-off-by: Nicholas Piggin --- include/linux/vmalloc.h | 3 + mm/ioremap.c| 197 mm/vmalloc.c| 196 +++ 3 files

[PATCH v9 08/12] x86: inline huge vmap supported functions

2020-12-04 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Nicholas Piggin ---

[PATCH v9 07/12] arm64: inline huge vmap supported functions

2020-12-04 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Acked-by: Catalin Marinas Signed-off-by: Nicholas Piggin ---

[PATCH v9 06/12] powerpc: inline huge vmap supported functions

2020-12-04 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/vmalloc.h | 19 ---

[PATCH v9 05/12] mm: HUGE_VMAP arch support cleanup

2020-12-04 Thread Nicholas Piggin
This changes the awkward approach where architectures provide init functions to determine which levels they can provide large mappings for, to one where the arch is queried for each call. This removes code and indirection, and allows constant-folding of dead code for unsupported levels. This

[PATCH v9 04/12] mm/ioremap: rename ioremap_*_range to vmap_*_range

2020-12-04 Thread Nicholas Piggin
This will be used as a generic kernel virtual mapping function, so re-name it in preparation. Signed-off-by: Nicholas Piggin --- mm/ioremap.c | 64 +++- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/mm/ioremap.c b/mm/ioremap.c

[PATCH v9 03/12] mm/vmalloc: rename vmap_*_range vmap_pages_*_range

2020-12-04 Thread Nicholas Piggin
The vmalloc mapper operates on a struct page * array rather than a linear physical address, re-name it to make this distinction clear. Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c

[PATCH v9 02/12] mm: apply_to_pte_range warn and fail if a large pte is encountered

2020-12-04 Thread Nicholas Piggin
apply_to_pte_range might mistake a large pte for bad, or treat it as a page table, resulting in a crash or corruption. Add a test to warn and return error if large entries are found. Signed-off-by: Nicholas Piggin --- mm/memory.c | 66 +++-- 1

[PATCH v9 01/12] mm/vmalloc: fix vmalloc_to_page for huge vmap mappings

2020-12-04 Thread Nicholas Piggin
vmalloc_to_page returns NULL for addresses mapped by larger pages[*]. Whether or not a vmap is huge depends on the architecture details, alignments, boot options, etc., which the caller can not be expected to know. Therefore HUGE_VMAP is a regression for vmalloc_to_page. This change teaches

[PATCH v9 00/12] huge vmalloc mappings

2020-12-04 Thread Nicholas Piggin
Hi Andrew, A couple of things Rick noticed, he's working on huge module mappings to help iTLB pressure and seems to think this series will be useful infrastructure for his work. I think it finally should be just about ready. Thanks, Nick Since v8: - Fixed nommu compile. - Added Kconfig option

Re: [PATCH v2] clk: renesas: r9a06g032: Drop __packed for portability

2020-12-04 Thread Stephen Boyd
Quoting Geert Uytterhoeven (2020-11-30 00:57:43) > The R9A06G032 clock driver uses an array of packed structures to reduce > kernel size. However, this array contains pointers, which are no longer > aligned naturally, and cannot be relocated on PPC64. Hence when > compile-testing this driver on

Re: [PATCH 1/2] powerpc: Retire e200 core (mpc555x processor)

2020-12-04 Thread Scott Wood
On Tue, 2020-11-17 at 05:07 +, Christophe Leroy wrote: > There is no defconfig selecting CONFIG_E200, and no platform. > > e200 is an earlier version of booke, a predecessor of e500, > with some particularities like an unified cache instead of both an > instruction cache and a data cache. >

Re: [RFC v2 2/2] [MOCKUP] sched/mm: Lightweight lazy mm refcounting

2020-12-04 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of December 5, 2020 12:37 am: > > >> On Dec 3, 2020, at 11:54 PM, Nicholas Piggin wrote: >> >> Excerpts from Andy Lutomirski's message of December 4, 2020 3:26 pm: >>> This is a mockup. It's designed to illustrate the algorithm and how the >>> code

Re: [PATCH v8 11/12] mm/vmalloc: Hugepage vmalloc mappings

2020-12-04 Thread Nicholas Piggin
Excerpts from Edgecombe, Rick P's message of December 5, 2020 4:33 am: > On Fri, 2020-12-04 at 18:12 +1000, Nicholas Piggin wrote: >> Excerpts from Edgecombe, Rick P's message of December 1, 2020 6:21 >> am: >> > On Sun, 2020-11-29 at 01:25 +1000, Nicholas Piggin wrote: >> > > Support huge page

[PATCH] MAINTAINERS: Update 68k Mac entry

2020-12-04 Thread Finn Thain
Two files under drivers/macintosh are actually m68k-only. I think that patches for these files should be reviewed in the appropriate forum and merged via the appropriate tree, rather than falling to the powerpc maintainers to deal with. Update the "M68K ON APPLE MACINTOSH" section accordingly.

Re: [PATCH] macintosh/adb-iop: Send correct poll command

2020-12-04 Thread Finn Thain
On Fri, 4 Dec 2020, Geert Uytterhoeven wrote: > Hi Finn, > > On Fri, Nov 20, 2020 at 5:54 AM Finn Thain wrote: > > The behaviour of the IOP firmware is not well documented but we do know > > that IOP message reply data can be used to issue new ADB commands. > > Use the message reply to better

Re: [PATCH] macintosh/adb-iop: Always wait for reply message from IOP

2020-12-04 Thread Finn Thain
On Fri, 4 Dec 2020, Geert Uytterhoeven wrote: > Hi Finn, > > On Fri, Nov 20, 2020 at 5:54 AM Finn Thain wrote: > > A recent patch incorrectly altered the adb-iop state machine behaviour > > and introduced a regression that can appear intermittently as a > > malfunctioning ADB input device. This

[powerpc:merge] BUILD SUCCESS 466556ab940c1dfc7aee8db02a8329f1f3efed3d

2020-12-04 Thread kernel test robot
allmodconfig powerpc allnoconfig x86_64 randconfig-a004-20201204 x86_64 randconfig-a006-20201204 x86_64 randconfig-a002-20201204 x86_64 randconfig-a001-20201204 x86_64 randconfig-a005-20201204

[powerpc:next-test] BUILD REGRESSION 4e4ed87981c764498942c52004c620bb8f104eac

2020-12-04 Thread kernel test robot
grouped by kconfigs: clang_recent_errors |-- powerpc-randconfig-r016-20201204 | `-- arch-powerpc-kernel-rtas.c:error:no-member-named-rtas_args_reentrant-in-struct-paca_struct `-- powerpc64-randconfig-r011-20201204 |-- arch-powerpc-kernel-vdso32-vgettimeofday.c:error:conflicting-types

Re: [PATCH v3 18/18] ibmvfc: drop host lock when completing commands in CRQ

2020-12-04 Thread Tyrel Datwyler
On 12/4/20 1:35 PM, Brian King wrote: > On 12/2/20 8:08 PM, Tyrel Datwyler wrote: >> The legacy CRQ holds the host lock the even while completing commands. >> This presents a problem when in legacy single queue mode and >> nr_hw_queues is greater than one since calling scsi_done() introduces >>

Re: [PATCH v3 06/18] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-12-04 Thread Tyrel Datwyler
On 12/4/20 6:51 AM, Brian King wrote: > On 12/2/20 8:07 PM, Tyrel Datwyler wrote: >> The logic for iterating over the Sub-CRQ responses is similiar to that >> of the primary CRQ. Add the necessary handlers for processing those >> responses. >> >> Signed-off-by: Tyrel Datwyler >> --- >>

Re: [PATCH v3 04/18] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2020-12-04 Thread Tyrel Datwyler
On 12/4/20 6:47 AM, Brian King wrote: > On 12/2/20 8:07 PM, Tyrel Datwyler wrote: >> @@ -4983,6 +4993,118 @@ static int ibmvfc_init_crq(struct ibmvfc_host *vhost) >> return retrc; >> } >> >> +static int ibmvfc_register_scsi_channel(struct ibmvfc_host *vhost, >> +

[PATCH] powerpc: Stop exporting __clear_user which is now inlined.

2020-12-04 Thread Michal Suchanek
Stable commit 452e2a83ea23 ("powerpc: Fix __clear_user() with KUAP enabled") redefines __clear_user as inline function but does not remove the export. Fixes: 452e2a83ea23 ("powerpc: Fix __clear_user() with KUAP enabled") Signed-off-by: Michal Suchanek --- arch/powerpc/lib/ppc_ksyms.c | 1 - 1

[powerpc:next] BUILD SUCCESS c9344769e2b46ba28b947bec7a8a8f0a091ecd57

2020-12-04 Thread kernel test robot
allmodconfig powerpc allnoconfig x86_64 randconfig-a004-20201204 x86_64 randconfig-a006-20201204 x86_64 randconfig-a002-20201204 x86_64 randconfig-a001-20201204 x86_64 randconfig

Re: [PATCH v3 18/18] ibmvfc: drop host lock when completing commands in CRQ

2020-12-04 Thread Brian King
On 12/2/20 8:08 PM, Tyrel Datwyler wrote: > The legacy CRQ holds the host lock the even while completing commands. > This presents a problem when in legacy single queue mode and > nr_hw_queues is greater than one since calling scsi_done() introduces > the potential for deadlock. > > If

Re: [PATCH v3 17/18] ibmvfc: provide modules parameters for MQ settings

2020-12-04 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v3 15/18] ibmvfc: send Cancel MAD down each hw scsi channel

2020-12-04 Thread Brian King
On 12/2/20 8:08 PM, Tyrel Datwyler wrote: > In general the client needs to send Cancel MADs and task management > commands down the same channel as the command(s) intended to cancel or > abort. The client assigns cancel keys per LUN and thus must send a > Cancel down each channel commands were

Re: [PATCH kernel v2] powerpc/kuap: Restore AMR after replaying soft interrupts

2020-12-04 Thread kernel test robot
Hi Alexey, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.10-rc6 next-20201204] [cannot apply to powerpc/next scottwood/next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

Re: [PATCH 01/29] powerpc/rtas: move rtas_call_reentrant() out of pseries guards

2020-12-04 Thread Nathan Lynch
Nathan Lynch writes: > rtas_call_reentrant() isn't platform-dependent; move it out of > CONFIG_PPC_PSERIES-guarded code. As reported by the 0-day CI, this is mistaken, and it breaks non-pseries builds: >> arch/powerpc/kernel/rtas.c:938:21: error: no member named >> 'rtas_args_reentrant' in

Re: [RFC v2 1/2] [NEEDS HELP] x86/mm: Handle unlazying membarrier core sync in the arch code

2020-12-04 Thread Mathieu Desnoyers
- On Dec 4, 2020, at 3:17 AM, Nadav Amit nadav.a...@gmail.com wrote: > I am not very familiar with membarrier, but here are my 2 cents while trying > to answer your questions. > >> On Dec 3, 2020, at 9:26 PM, Andy Lutomirski wrote: >> @@ -496,6 +497,8 @@ void switch_mm_irqs_off(struct

Re: [RFC v2 1/2] [NEEDS HELP] x86/mm: Handle unlazying membarrier core sync in the arch code

2020-12-04 Thread Mathieu Desnoyers
- On Dec 4, 2020, at 12:26 AM, Andy Lutomirski l...@kernel.org wrote: > The core scheduler isn't a great place for > membarrier_mm_sync_core_before_usermode() -- the core scheduler doesn't > actually know whether we are lazy. With the old code, if a CPU is > running a membarrier-registered

Re: powerpc 5.10-rcN boot failures with RCU_SCALE_TEST=m

2020-12-04 Thread Uladzislau Rezki
On Thu, Dec 03, 2020 at 03:34:45PM +0100, Uladzislau Rezki wrote: > On Thu, Dec 03, 2020 at 05:22:20PM +1100, Michael Ellerman wrote: > > Uladzislau Rezki writes: > > > On Thu, Dec 03, 2020 at 01:03:32AM +1100, Michael Ellerman wrote: > > ... > > >> > > >> The SMP bringup stalls because

[powerpc:next-test 192/220] arch/powerpc/kernel/rtas.c:938:21: error: no member named 'rtas_args_reentrant' in 'struct paca_struct'

2020-12-04 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test head: 4e4ed87981c764498942c52004c620bb8f104eac commit: e2f67efc6c8654d7aed885e943499f00a29eecdc [192/220] powerpc/rtas: move rtas_call_reentrant() out of pseries guards config: powerpc-randconfig-r016-20201204

[PATCH] powerpc/powermac: Fix low_sleep_handler with CONFIG_VMAP_STACK

2020-12-04 Thread Christophe Leroy
low_sleep_handler() can't restore the context from standard stack because the stack can hardly be accessed with MMU OFF. Store everything in a global storage area instead of storing a pointer to the stack in that global storage area. To avoid a complete churn of the function, still use r1 as the

Re: [PATCH v8 11/12] mm/vmalloc: Hugepage vmalloc mappings

2020-12-04 Thread Edgecombe, Rick P
On Fri, 2020-12-04 at 18:12 +1000, Nicholas Piggin wrote: > Excerpts from Edgecombe, Rick P's message of December 1, 2020 6:21 > am: > > On Sun, 2020-11-29 at 01:25 +1000, Nicholas Piggin wrote: > > > Support huge page vmalloc mappings. Config option > > > HAVE_ARCH_HUGE_VMALLOC > > > enables

Re: [PATCH] powerpc/book3s_hv_uvmem: Check for failed page migration

2020-12-04 Thread Ram Pai
On Fri, Dec 04, 2020 at 03:48:41PM +0530, Bharata B Rao wrote: > On Thu, Dec 03, 2020 at 04:08:12PM +1100, Alistair Popple wrote: > > migrate_vma_pages() may still clear MIGRATE_PFN_MIGRATE on pages which > > are not able to be migrated. Drivers may safely copy data prior to > > calling

Re: [PATCH 16/29] powerpc/rtas: dispatch partition migration requests to pseries

2020-12-04 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch writes: >> sys_rtas() cannot call ibm,suspend-me directly in the same way it >> handles other inputs. Instead it must dispatch the request to code >> that can first perform the H_JOIN sequence before any call to >> ibm,suspend-me can succeed. Over time

Re: [PATCH 13/29] powerpc/pseries/mobility: use stop_machine for join/suspend

2020-12-04 Thread Nathan Lynch
Hi Michael, Michael Ellerman writes: > Nathan Lynch writes: >> The partition suspend sequence as specified in the platform >> architecture requires that all active processor threads call >> H_JOIN, which: > ... >> diff --git a/arch/powerpc/platforms/pseries/mobility.c >>

Re: [PATCH] powerpc/xmon: Change printk() to pr_cont()

2020-12-04 Thread Joe Perches
On Fri, 2020-12-04 at 21:56 +1100, Michael Ellerman wrote: > Christophe Leroy writes: > > Since some time now, printk() adds carriage return, leading to > > unusable xmon output: > > > > [ 54.288722] sysrq: Entering xmon > > [ 54.292209] Vector: 0 at [cace3d2c] > > [ 54.292274] pc: >

Re: [PATCH v3 06/18] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-12-04 Thread Brian King
On 12/2/20 8:07 PM, Tyrel Datwyler wrote: > The logic for iterating over the Sub-CRQ responses is similiar to that > of the primary CRQ. Add the necessary handlers for processing those > responses. > > Signed-off-by: Tyrel Datwyler > --- > drivers/scsi/ibmvscsi/ibmvfc.c | 80

Re: [PATCH v3 04/18] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2020-12-04 Thread Brian King
On 12/2/20 8:07 PM, Tyrel Datwyler wrote: > @@ -4983,6 +4993,118 @@ static int ibmvfc_init_crq(struct ibmvfc_host *vhost) > return retrc; > } > > +static int ibmvfc_register_scsi_channel(struct ibmvfc_host *vhost, > + int index) > +{ > + struct device

Re: [PATCH 12/29] powerpc/pseries/mobility: extract VASI session polling logic

2020-12-04 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch writes: >> The behavior of rtas_ibm_suspend_me_unsafe() is to return -EAGAIN to >> the caller until the specified VASI suspend session state makes the >> transition from H_VASI_ENABLED to H_VASI_SUSPENDING. In the interest >> of separating concerns to

Re: [PATCH 03/29] powerpc/rtas: complete ibm,suspend-me status codes

2020-12-04 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch writes: >> We don't completely account for the possible return codes for >> ibm,suspend-me. Add definitions for these. >> >> Signed-off-by: Nathan Lynch >> --- >> arch/powerpc/include/asm/rtas.h | 7 ++- >> 1 file changed, 6 insertions(+), 1

Re: [RFC v2 2/2] [MOCKUP] sched/mm: Lightweight lazy mm refcounting

2020-12-04 Thread Andy Lutomirski
> On Dec 3, 2020, at 11:54 PM, Nicholas Piggin wrote: > > Excerpts from Andy Lutomirski's message of December 4, 2020 3:26 pm: >> This is a mockup. It's designed to illustrate the algorithm and how the >> code might be structured. There are several things blatantly wrong with >> it: >> >>

Re: [PATCH v2 01/17] ibmvfc: add vhost fields and defaults for MQ enablement

2020-12-04 Thread Brian King
On 12/2/20 11:27 AM, Tyrel Datwyler wrote: > On 12/2/20 7:14 AM, Brian King wrote: >> On 12/1/20 6:53 PM, Tyrel Datwyler wrote: >>> Introduce several new vhost fields for managing MQ state of the adapter >>> as well as initial defaults for MQ enablement. >>> >>> Signed-off-by: Tyrel Datwyler >>>

[powerpc:next-test 54/220] arch/powerpc/kernel/vdso32/vgettimeofday.c:13:5: warning: no previous prototype for function '__c_kernel_clock_gettime64'

2020-12-04 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test head: 4e4ed87981c764498942c52004c620bb8f104eac commit: d0e3fc69d00d1f50d22d6b6acfc555ccda80ad1e [54/220] powerpc/vdso: Provide __kernel_clock_gettime64() on vdso32 config: powerpc64-randconfig-r011-20201204

Re: [PATCH 16/29] powerpc/rtas: dispatch partition migration requests to pseries

2020-12-04 Thread Michael Ellerman
Nathan Lynch writes: > sys_rtas() cannot call ibm,suspend-me directly in the same way it > handles other inputs. Instead it must dispatch the request to code > that can first perform the H_JOIN sequence before any call to > ibm,suspend-me can succeed. Over time kernel/rtas.c has accreted a fair >

Re: [PATCH 13/29] powerpc/pseries/mobility: use stop_machine for join/suspend

2020-12-04 Thread Michael Ellerman
Hi Nathan, Just a couple of nits ... Nathan Lynch writes: > The partition suspend sequence as specified in the platform > architecture requires that all active processor threads call > H_JOIN, which: ... > diff --git a/arch/powerpc/platforms/pseries/mobility.c >

Re: [PATCH 03/29] powerpc/rtas: complete ibm,suspend-me status codes

2020-12-04 Thread Michael Ellerman
Nathan Lynch writes: > We don't completely account for the possible return codes for > ibm,suspend-me. Add definitions for these. > > Signed-off-by: Nathan Lynch > --- > arch/powerpc/include/asm/rtas.h | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH 12/29] powerpc/pseries/mobility: extract VASI session polling logic

2020-12-04 Thread Michael Ellerman
Nathan Lynch writes: > The behavior of rtas_ibm_suspend_me_unsafe() is to return -EAGAIN to > the caller until the specified VASI suspend session state makes the > transition from H_VASI_ENABLED to H_VASI_SUSPENDING. In the interest > of separating concerns to prepare for a new implementation of

Re: [PATCH v2 3/5] MIPS: configs: drop unused BACKLIGHT_GENERIC option

2020-12-04 Thread Thomas Bogendoerfer
On Tue, Dec 01, 2020 at 10:29:20PM +, Andrey Zhizhikin wrote: > Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is > unused") removed geenric_bl driver from the tree, together with > corresponding config option. > > Remove BACKLIGHT_GENERIC config item from all MIPS

Re: [PATCH] powerpc/numa: Fix a regression on memoryless node 0

2020-12-04 Thread Michael Ellerman
On Fri, 27 Nov 2020 11:07:38 +0530, Srikar Dronamraju wrote: > Commit e75130f20b1f ("powerpc/numa: Offline memoryless cpuless node 0") > offlines node 0 and expects nodes to be subsequently onlined when CPUs > or nodes are detected. > > Commit 6398eaa26816 ("powerpc/numa: Prefer node id queried

Re: [PATCH 0/8] powerpc/64s: fix and improve machine check handling

2020-12-04 Thread Michael Ellerman
On Sat, 28 Nov 2020 17:07:20 +1000, Nicholas Piggin wrote: > First patch is a nasty memory scribble introduced by me :( That > should go into fixes. > > The next ones could wait for next merge window. They get things to the > point where misbehaving or buggy guest isn't so painful for the host, >

Re: [PATCH] KVM: PPC: Book3S HV: XIVE: Fix vCPU id sanity check

2020-12-04 Thread Michael Ellerman
On Mon, 30 Nov 2020 13:19:27 +0100, Greg Kurz wrote: > Commit 062cfab7069f ("KVM: PPC: Book3S HV: XIVE: Make VP block size > configurable") updated kvmppc_xive_vcpu_id_valid() in a way that > allows userspace to trigger an assertion in skiboot and crash the host: > > [ 696.186248988,3] XIVE[ IC

Re: [PATCH 0/4] powerpc/64s: Fix for radix TLB invalidation bug

2020-12-04 Thread Michael Ellerman
On Thu, 26 Nov 2020 20:25:26 +1000, Nicholas Piggin wrote: > This fixes a tricky bug that was noticed by TLB multi-hits in a guest > stress testing CPU hotplug, but TLB invalidation means any kind of > data corruption is possible. > > Thanks, > Nick > > [...] Applied to powerpc/fixes. [1/4]

Re: [PATCH] powerpc/xmon: Change printk() to pr_cont()

2020-12-04 Thread Michael Ellerman
Christophe Leroy writes: > Since some time now, printk() adds carriage return, leading to > unusable xmon output: > > [ 54.288722] sysrq: Entering xmon > [ 54.292209] Vector: 0 at [cace3d2c] > [ 54.292274] pc: > [ 54.292331] c0023650 ... > diff --git a/arch/powerpc/xmon/nonstdio.c

[PATCH] powerpc/xmon: Change printk() to pr_cont()

2020-12-04 Thread Christophe Leroy
Since some time now, printk() adds carriage return, leading to unusable xmon output: [ 54.288722] sysrq: Entering xmon [ 54.292209] Vector: 0 at [cace3d2c] [ 54.292274] pc: [ 54.292331] c0023650 [ 54.292468] : xmon+0x28/0x58 [ 54.292519] [ 54.292574] lr: [ 54.292630]

[PATCH] powerpc/mce: Remove per cpu variables from MCE handlers

2020-12-04 Thread Ganesh Goudar
Access to per-cpu variables requires translation to be enabled on pseries machine running in hash mmu mode, Since part of MCE handler runs in realmode and part of MCE handling code is shared between ppc architectures pseries and powernv, it becomes difficult to manage these variables differently

Re: [PATCH] powerpc/book3s_hv_uvmem: Check for failed page migration

2020-12-04 Thread Bharata B Rao
On Thu, Dec 03, 2020 at 04:08:12PM +1100, Alistair Popple wrote: > migrate_vma_pages() may still clear MIGRATE_PFN_MIGRATE on pages which > are not able to be migrated. Drivers may safely copy data prior to > calling migrate_vma_pages() however a remote mapping must not be > established until

[PATCH] powerpc/process: Remove target specific __set_dabr()

2020-12-04 Thread Christophe Leroy
__set_dabr() are simple functions that can be inline directly inside set_dabr() and using IS_ENABLED() instead of #ifdef Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/process.c | 37 --- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git

[PATCH] powerpc/8xx: Fix early debug when SMC1 is relocated

2020-12-04 Thread Christophe Leroy
When SMC1 is relocated and early debug is selected, the board hangs is ppc_md.setup_arch(). This is because ones the microcode has been loaded and SMC1 relocated, early debug writes in the weed. To allow smooth continuation, the SMC1 parameter RAM set up by the bootloader have to be copied into

Re: [PATCH] macintosh/adb-iop: Always wait for reply message from IOP

2020-12-04 Thread Geert Uytterhoeven
Hi Finn, On Fri, Nov 20, 2020 at 5:54 AM Finn Thain wrote: > A recent patch incorrectly altered the adb-iop state machine behaviour > and introduced a regression that can appear intermittently as a > malfunctioning ADB input device. This seems to be caused when reply > packets from different ADB

Re: [PATCH] macintosh/adb-iop: Send correct poll command

2020-12-04 Thread Geert Uytterhoeven
Hi Finn, On Fri, Nov 20, 2020 at 5:54 AM Finn Thain wrote: > The behaviour of the IOP firmware is not well documented but we do know > that IOP message reply data can be used to issue new ADB commands. > Use the message reply to better control autopoll behaviour by sending > a Talk Register 0

Re: [PATCH v3 05/19] powerpc: interrupt handler wrapper functions

2020-12-04 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of November 30, 2020 5:37 pm: > Nicholas Piggin writes: > > . > +#endif >> +DECLARE_INTERRUPT_HANDLER(emulation_assist_interrupt); >> +DECLARE_INTERRUPT_HANDLER_RAW(do_slb_fault); > > Can we add comments here explaining why some of these handlers

Re: [RFC v2 1/2] [NEEDS HELP] x86/mm: Handle unlazying membarrier core sync in the arch code

2020-12-04 Thread Nadav Amit
I am not very familiar with membarrier, but here are my 2 cents while trying to answer your questions. > On Dec 3, 2020, at 9:26 PM, Andy Lutomirski wrote: > @@ -496,6 +497,8 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct > mm_struct *next, >* from one thread in a

Re: [PATCH v8 11/12] mm/vmalloc: Hugepage vmalloc mappings

2020-12-04 Thread Nicholas Piggin
Excerpts from Edgecombe, Rick P's message of December 1, 2020 6:21 am: > On Sun, 2020-11-29 at 01:25 +1000, Nicholas Piggin wrote: >> Support huge page vmalloc mappings. Config option >> HAVE_ARCH_HUGE_VMALLOC >> enables support on architectures that define HAVE_ARCH_HUGE_VMAP and >> supports PMD

Re: [PATCH] powerpc/hotplug: assign hot added LMB to the right node

2020-12-04 Thread Laurent Dufour
Le 03/12/2020 à 19:25, Greg KH a écrit : On Thu, Dec 03, 2020 at 11:15:14AM +0100, Laurent Dufour wrote: This patch applies to 5.9 and earlier kernels only. Since 5.10, this has been fortunately fixed by the commit e5e179aa3a39 ("pseries/drmem: don't cache node id in drmem_lmb struct"). Why