[PATCH v2] powerpc/powermac: Fix low_sleep_handler with CONFIG_VMAP_STACK

2020-12-07 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

[PATCH] powerpc/book3s64/kuap: Improve error reporting with KUAP

2020-12-07 Thread Aneesh Kumar K.V
This partially reverts commit eb232b162446 ("powerpc/book3s64/kuap: Improve error reporting with KUAP") and update the fault handler to print [ 55.022514] Kernel attempted to access user page (7e6725b7) - exploit attempt? (uid: 0) [ 55.022528] BUG: Unable to handle kernel data access on

RE: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-07 Thread Qiang Zhao
On 06/12/2020 05:12, Rasmus Villemoes wrote: > -Original Message- > From: Rasmus Villemoes > Sent: 2020年12月6日 5:12 > To: Jakub Kicinski > Cc: Leo Li ; David S. Miller ; > Qiang Zhao ; net...@vger.kernel.org; > linuxppc-dev@lists.ozlabs.org; linux-ker...@vger.kernel.org; >

Re: [PATCH] arch: fix 'unexpected IRQ trap at vector' warnings

2020-12-07 Thread Michael Ellerman
"Enrico Weigelt, metux IT consult" writes: > All archs, except Alpha, print out the irq number in hex, but the message > looks like it was a decimal number, which is quite confusing. Fixing this > by adding "0x" prefix. Arguably decimal would be better, /proc/interrupts and /proc/irq/ both use

Re: [PATCH] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-07 Thread Michael Ellerman
Christophe Leroy writes: > Le 07/12/2020 à 01:24, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> Since commit c33165253492 ("powerpc: use non-set_fs based maccess >>> routines"), userspace access is not granted anymore when using >>> copy_from_kernel_nofault() >>> >>> However,

Re: [PATCH v2 2/2] ASoC: fsl: Add imx-hdmi machine driver

2020-12-07 Thread Nicolin Chen
On Sun, Dec 06, 2020 at 06:41:59PM +0800, Shengjiu Wang wrote: > The driver is initially designed for sound card using HDMI > interface on i.MX platform. There is internal HDMI IP or > external HDMI modules connect with SAI or AUD2HTX interface. > It supports both transmitter and receiver devices.

Re: [PATCH v6 1/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-12-07 Thread Jim Quinlan
On Sun, Dec 6, 2020 at 10:25 PM Florian Fainelli wrote: > > +JimQ, > > On 12/6/2020 12:16 PM, Krzysztof Wilczyński wrote: > > Hello Nicolas, Florian and Florian, > > > > [...] > >> -/* Configuration space read/write support */ > >> -static inline int brcm_pcie_cfg_index(int busnr, int devfn, int

[powerpc:next] BUILD SUCCESS 250ad7a45b1e58d580decfb935fc063c4cf56f91

2020-12-07 Thread kernel test robot
defconfig mips allyesconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig i386 randconfig-a005-20201207 i386 randconfig-a004-20201207 i386

Re: [RFC][PATCH 1/2] libnvdimm: Introduce ND_CMD_GET_STAT to retrieve nvdimm statistics

2020-12-07 Thread Dan Williams
[ add perf maintainers ] On Sun, Nov 8, 2020 at 1:16 PM Vaibhav Jain wrote: > > Implement support for exposing generic nvdimm statistics via newly > introduced dimm-command ND_CMD_GET_STAT that can be handled by nvdimm > command handler function and provide values for these statistics back > to

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

2020-12-07 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

[PATCH v2 22/28] powerpc/pseries/hibernation: switch to rtas_ibm_suspend_me()

2020-12-07 Thread Nathan Lynch
rtas_suspend_last_cpu() and related code perform a lot of work that isn't relevant to the hibernation workflow. All other CPUs are offline when called so there is no need to place them in H_JOIN or prod them on resume, nor is there need for retries or operations on shared state. Call the

[PATCH v2 23/28] powerpc/rtas: remove unused rtas_suspend_last_cpu()

2020-12-07 Thread Nathan Lynch
rtas_suspend_last_cpu() is now unused, remove it and __rtas_suspend_last_cpu() which also becomes unused. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 - arch/powerpc/kernel/rtas.c | 43 - 2 files changed, 44 deletions(-) diff --git

[PATCH v2 28/28] powerpc/pseries/mobility: refactor node lookup during DT update

2020-12-07 Thread Nathan Lynch
In pseries_devicetree_update(), with each call to ibm,update-nodes the partition firmware communicates the node to be deleted or updated by placing its phandle in the work buffer. Each of delete_dt_node(), update_dt_node(), and add_dt_node() have duplicate lookups using the phandle value and

[PATCH v2 27/28] powerpc/rtas: remove unused rtas_suspend_me_data

2020-12-07 Thread Nathan Lynch
All code which used this type has been removed. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas-types.h | 8 1 file changed, 8 deletions(-) diff --git a/arch/powerpc/include/asm/rtas-types.h b/arch/powerpc/include/asm/rtas-types.h index aa420561bc10..8df6235d64d1 100644

[PATCH v2 25/28] powerpc/pseries/hibernation: perform post-suspend fixups later

2020-12-07 Thread Nathan Lynch
The pseries hibernate code calls post_mobility_fixup() which is sort of a dumping ground of fixups that need to run after resuming from suspend regardless of whether suspend was a hibernation or a migration. Calling post_mobility_fixup() from pseries_suspend_enable_irqs() runs this code early in

[PATCH v2 26/28] powerpc/pseries/hibernation: remove prepare_late() callback

2020-12-07 Thread Nathan Lynch
The pseries hibernate code no longer calls into the original join/suspend code in kernel/rtas.c, so pseries_prepare_late() and related code don't accomplish anything now. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/suspend.c | 25 1 file changed, 25

[PATCH v2 24/28] powerpc/pseries/hibernation: remove redundant cacheinfo update

2020-12-07 Thread Nathan Lynch
Partitions with cache nodes in the device tree can encounter the following warning on resume: CPU 0 already accounted in PowerPC,POWER9@0(Data) WARNING: CPU: 0 PID: 3177 at arch/powerpc/kernel/cacheinfo.c:197 cacheinfo_cpu_online+0x640/0x820 These calls to cacheinfo_cpu_offline/online have been

[PATCH v2 21/28] powerpc/rtas: remove rtas_suspend_cpu()

2020-12-07 Thread Nathan Lynch
rtas_suspend_cpu() no longer has users; remove it and __rtas_suspend_cpu() which now becomes unused as well. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 - arch/powerpc/kernel/rtas.c | 52 - 2 files changed, 53 deletions(-) diff

[PATCH v2 20/28] powerpc/machdep: remove suspend_disable_cpu()

2020-12-07 Thread Nathan Lynch
There are no users left of the suspend_disable_cpu() callback, remove it. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/machdep.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index

[PATCH v2 19/28] powerpc/pseries/hibernation: remove pseries_suspend_cpu()

2020-12-07 Thread Nathan Lynch
Since commit 48f6e7f6d948 ("powerpc/pseries: remove cede offline state for CPUs"), ppc_md.suspend_disable_cpu() is no longer used and all CPUs (save one) are placed into true offline state as opposed to H_JOIN. So pseries_suspend_cpu() is effectively unused; remove it. Signed-off-by: Nathan Lynch

[PATCH v2 17/28] powerpc/pseries/hibernation: drop pseries_suspend_begin() from suspend ops

2020-12-07 Thread Nathan Lynch
There are three ways pseries_suspend_begin() can be reached: 1. When "mem" is written to /sys/power/state: kobj_attr_store() -> state_store() -> pm_suspend() -> suspend_devices_and_enter() -> pseries_suspend_begin() This never works because there is no way to supply a valid stream

[PATCH v2 18/28] powerpc/pseries/hibernation: pass stream id via function arguments

2020-12-07 Thread Nathan Lynch
There is no need for the stream id to be a file-global variable; pass it from hibernate_store() to pseries_suspend_begin() for the H_VASI_STATE call. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/suspend.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[PATCH v2 16/28] powerpc/rtas: remove rtas_ibm_suspend_me_unsafe()

2020-12-07 Thread Nathan Lynch
rtas_ibm_suspend_me_unsafe() is now unused; remove it and rtas_percpu_suspend_me() which becomes unused as a result. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 - arch/powerpc/kernel/rtas.c | 67 + 2 files changed, 1 insertion(+),

[PATCH v2 15/28] powerpc/rtas: dispatch partition migration requests to pseries

2020-12-07 Thread Nathan Lynch
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 amount of platform-specific

[PATCH v2 14/28] powerpc/pseries/mobility: retry partition suspend after error

2020-12-07 Thread Nathan Lynch
This is a mitigation for the relatively rare occurrence where a virtual IOA can be in a transient state that prevents the suspend/migration from succeeding, resulting in an error from ibm,suspend-me. If the join/suspend sequence returns an error, it is acceptable to retry as long as the VASI

[PATCH v2 13/28] powerpc/pseries/mobility: signal suspend cancellation to platform

2020-12-07 Thread Nathan Lynch
If we're returning an error to user space, use H_VASI_SIGNAL to send a cancellation request to the platform. This isn't strictly required but it communicates that Linux will not attempt to complete the suspend, which allows the various entities involved to promptly end the operation in progress.

[PATCH v2 12/28] powerpc/pseries/mobility: use stop_machine for join/suspend

2020-12-07 Thread Nathan Lynch
The partition suspend sequence as specified in the platform architecture requires that all active processor threads call H_JOIN, which: - suspends the calling thread until it is the target of an H_PROD; or - immediately returns H_CONTINUE, if the calling thread is the last to call H_JOIN.

[PATCH v2 10/28] powerpc/pseries/mobility: use rtas_activate_firmware() on resume

2020-12-07 Thread Nathan Lynch
It's incorrect to abort post-suspend processing if ibm,activate-firmware isn't available. Use rtas_activate_firmware(), which logs this condition appropriately and allows us to proceed. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/mobility.c | 15 +-- 1 file

[PATCH v2 11/28] powerpc/pseries/mobility: extract VASI session polling logic

2020-12-07 Thread Nathan Lynch
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 the join/suspend sequence,

[PATCH v2 09/28] powerpc/pseries/mobility: error message improvements

2020-12-07 Thread Nathan Lynch
- Convert printk(KERN_ERR) to pr_err(). - Include errno in property update failure message. - Remove reference to "Post-mobility" from device tree update message: with pr_err() it will have a "mobility:" prefix. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/mobility.c | 7

[PATCH v2 08/28] powerpc/pseries/mobility: add missing break to default case

2020-12-07 Thread Nathan Lynch
update_dt_node() has a switch statement where the default case lacks a break statement. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/mobility.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/mobility.c

[PATCH v2 06/28] powerpc/hvcall: add token and codes for H_VASI_SIGNAL

2020-12-07 Thread Nathan Lynch
H_VASI_SIGNAL can be used by a partition to request cancellation of its migration. To be used in future changes. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/hvcall.h | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/include/asm/hvcall.h

[PATCH v2 07/28] powerpc/pseries/mobility: don't error on absence of ibm, update-nodes

2020-12-07 Thread Nathan Lynch
Treat the absence of the ibm,update-nodes function as benign instead of reporting an error. If the platform does not provide that facility, it's not a problem for Linux. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/mobility.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 05/28] powerpc/rtas: add rtas_activate_firmware()

2020-12-07 Thread Nathan Lynch
Provide a documented wrapper function for the ibm,activate-firmware service, which must be called after a partition migration or hibernation. If the function is absent or the call fails, the OS will continue to run normally with the current firmware, so there is no need to perform any recovery.

[PATCH v2 02/28] powerpc/rtas: complete ibm,suspend-me status codes

2020-12-07 Thread Nathan Lynch
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 a/arch/powerpc/include/asm/rtas.h

[PATCH v2 04/28] powerpc/rtas: add rtas_ibm_suspend_me()

2020-12-07 Thread Nathan Lynch
Now that the name is available, provide a simple wrapper for ibm,suspend-me which returns both a Linux errno and optionally the actual RTAS status to the caller. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 + arch/powerpc/kernel/rtas.c | 57

[PATCH v2 00/28] partition suspend updates

2020-12-07 Thread Nathan Lynch
This series aims to improve the pseries-specific partition migration and hibernation implementation, part of which has been living in kernel/rtas.c. Most of that code is eliminated or moved to platforms/pseries, and the following major functional changes are made: - Use stop_machine() instead of

[PATCH v2 03/28] powerpc/rtas: rtas_ibm_suspend_me -> rtas_ibm_suspend_me_unsafe

2020-12-07 Thread Nathan Lynch
The pseries partition suspend sequence requires that all active CPUs call H_JOIN, which suspends all but one of them with interrupts disabled. The "chosen" CPU is then to call ibm,suspend-me to complete the suspend. Upon returning from ibm,suspend-me, the chosen CPU is to use H_PROD to wake the

[PATCH v2 01/28] powerpc/rtas: prevent suspend-related sys_rtas use on LE

2020-12-07 Thread Nathan Lynch
While drmgr has had work in some areas to make its RTAS syscall interactions endian-neutral, its code for performing partition migration via the syscall has never worked on LE. While it is able to complete ibm,suspend-me successfully, it crashes when attempting the subsequent ibm,update-nodes

Re: [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-07 Thread Segher Boessenkool
On Mon, Dec 07, 2020 at 09:56:56AM -0800, Nick Desaulniers wrote: > On Mon, Dec 7, 2020 at 4:23 AM Michael Ellerman wrote: > > So is clang defining __powerpc64__ even for 32-bit code? > > > > And the answer appears to be yes: > > > > $ clang --version > > Ubuntu clang version 11.0.0-2 > >

Re: [PATCH] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-07 Thread Christophe Leroy
Le 07/12/2020 à 01:24, Michael Ellerman a écrit : Christophe Leroy writes: Since commit c33165253492 ("powerpc: use non-set_fs based maccess routines"), userspace access is not granted anymore when using copy_from_kernel_nofault() However, kthread_probe_data() uses

[PATCH v2] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-07 Thread Christophe Leroy
Since commit c33165253492 ("powerpc: use non-set_fs based maccess routines"), userspace access is not granted anymore when using copy_from_kernel_nofault() However, kthread_probe_data() uses copy_from_kernel_nofault() to check validity of pointers. When the pointer is NULL, it points to

Re: [PATCH v5 19/19] dt-bindings: usb: intel, keembay-dwc3: Validate DWC3 sub-node

2020-12-07 Thread Rob Herring
On Sat, 05 Dec 2020 18:24:26 +0300, Serge Semin wrote: > Intel Keem Bay DWC3 compatible DT nodes are supposed to have a DWC USB3 > compatible sub-node to describe a fully functioning USB interface. Let's > use the available DWC USB3 DT schema to validate the Qualcomm DWC3 > sub-nodes. > > Note

Re: [PATCH v5 01/19] dt-bindings: usb: usb-hcd: Detach generic USB controller properties

2020-12-07 Thread Rob Herring
On Sat, 05 Dec 2020 18:24:08 +0300, Serge Semin wrote: > There can be three distinctive types of the USB controllers: USB hosts, > USB peripherals/gadgets and USB OTG, which can switch from one role to > another. In order to have that hierarchy handled in the DT binding files, > we need to collect

Re: [PATCH v5 10/19] dt-bindings: usb: Convert DWC USB3 bindings to DT schema

2020-12-07 Thread Rob Herring
On Sat, 05 Dec 2020 18:24:17 +0300, Serge Semin wrote: > DWC USB3 DT node is supposed to be compliant with the Generic xHCI > Controller schema, but with additional vendor-specific properties, the > controller-specific reference clocks and PHYs. So let's convert the > currently available legacy

[PATCH] powerpc: fix spelling mistake in Kconfig "seleted" -> "selected"

2020-12-07 Thread Colin King
From: Colin Ian King There is a spelling mistake in the help text of the Kconfig. Fix it. Signed-off-by: Colin Ian King --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 8fb61a285c76..4010bae52351

[PATCH] arch: fix 'unexpected IRQ trap at vector' warnings

2020-12-07 Thread Enrico Weigelt, metux IT consult
All archs, except Alpha, print out the irq number in hex, but the message looks like it was a decimal number, which is quite confusing. Fixing this by adding "0x" prefix. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm/include/asm/hw_irq.h | 2 +-

Re: [PATCH 3/3] powerpc/cacheinfo: Print correct cache-sibling map/list for L2 cache

2020-12-07 Thread Srikar Dronamraju
* Gautham R. Shenoy [2020-12-04 10:18:47]: > From: "Gautham R. Shenoy" > > > Signed-off-by: Gautham R. Shenoy > --- > > +extern bool thread_group_shares_l2; > /* > * On big-core systems, each core has two groups of CPUs each of which > * has its own L1-cache. The thread-siblings which

Re: [PATCH 2/3] powerpc/smp: Add support detecting thread-groups sharing L2 cache

2020-12-07 Thread Srikar Dronamraju
* Gautham R. Shenoy [2020-12-04 10:18:46]: > From: "Gautham R. Shenoy" > > On POWER systems, groups of threads within a core sharing the L2-cache > can be indicated by the "ibm,thread-groups" property array with the > identifier "2". > > This patch adds support for detecting this, and when

Re: [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-07 Thread Michael Ellerman
kernel test robot writes: > 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:

Re: [PATCH 1/3] powerpc/smp: Parse ibm,thread-groups with multiple properties

2020-12-07 Thread Srikar Dronamraju
* Gautham R. Shenoy [2020-12-04 10:18:45]: > From: "Gautham R. Shenoy" > > static int parse_thread_groups(struct device_node *dn, > -struct thread_groups *tg, > -unsigned int property) > +struct

Re: Build regressions/improvements in v5.10-rc7

2020-12-07 Thread Geert Uytterhoeven
On Mon, Dec 7, 2020 at 1:08 PM Geert Uytterhoeven wrote: > JFYI, when comparing v5.10-rc7[1] to v5.10-rc6[3], the summaries are: > - build errors: +1/-0 + /kisskb/src/arch/powerpc/platforms/powermac/smp.c: error: implicit declaration of function 'cleanup_cpu_mmu_context'

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

2020-12-07 Thread Hannes Reinecke
On 12/4/20 3:26 PM, Brian King wrote: 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.

[Bug 209277] powerpc: obsolete driver: Marvell MV64X60 MPSC

2020-12-07 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=209277 --- Comment #2 from Borislav Petkov (b...@alien8.de) --- https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git/commit/?h=edac-drivers=0385979a30dc4abdef2dcebbccef818947c80cb7 -- You are receiving this mail because: You are watching the

Re: [PATCH] EDAC/mv64x60: Remove orphan mv64x60 driver

2020-12-07 Thread Borislav Petkov
On Mon, Dec 07, 2020 at 03:02:53PM +1100, Michael Ellerman wrote: > The mv64x60 EDAC driver depends on CONFIG_MV64X60. But that symbol is > not user-selectable, and the last code that selected it was removed > with the C2K board support in 2018, see: > > 92c8c16f3457 ("powerpc/embedded6xx:

Re: [PATCH v5 10/19] dt-bindings: usb: Convert DWC USB3 bindings to DT schema

2020-12-07 Thread Chunfeng Yun
On Sat, 2020-12-05 at 18:24 +0300, Serge Semin wrote: > DWC USB3 DT node is supposed to be compliant with the Generic xHCI > Controller schema, but with additional vendor-specific properties, the > controller-specific reference clocks and PHYs. So let's convert the > currently available legacy