pci memory resources not being assigned to bridge

2019-07-03 Thread Chris Packham
Hi, I'm in the process of updating our products from a 4.4 based kernel to 5.1 (and probably 5.2 since that release is imminent). On one product which uses a Freescale/NXP P2041 CPU, IDT pcie bridge and Marvell switch chip[1]. Annoyingly the hardware has a reset line that holds the switch

Re: Kernel Bug/oops during boot (PowerVM LPAR w/vTPM)

2019-07-03 Thread Nayna
Hi Sachin and Michal, On 07/03/2019 05:15 PM, Michal Suchánek wrote: On Wed, 3 Jul 2019 13:17:16 +0200 Michal Suchánek wrote: On Wed, 3 Jul 2019 15:54:59 +0530 Sachin Sant wrote: Booting mainline kernel on PowerVM LPAR with vTPM enabled results into a kernel crash. [0.365989] BUG:

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

2019-07-03 Thread Nayna Jain
The nr_allocated_banks and allocated banks are initialized as part of tpm_chip_register. Currently, this is done as part of auto startup function. However, some drivers, like the ibm vtpm driver, do not run auto startup during initialization. This results in uninitialized memory issue and causes a

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

2019-07-03 Thread Nicholas Piggin
Reza Arbab's on July 4, 2019 3:20 am: > On Tue, Jul 02, 2019 at 04:17:11PM +1000, Nicholas Piggin wrote: >>Santosh Sivaraj's on July 2, 2019 3:19 pm: >>> --- a/arch/powerpc/kernel/exceptions-64s.S >>> +++ b/arch/powerpc/kernel/exceptions-64s.S >>> @@ -458,6 +458,12 @@

Re: [PATCH v2] powerpc/boot: pass CONFIG options in a simpler and more robust way

2019-07-03 Thread Michael Ellerman
Masahiro Yamada writes: > Commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper") > was wrong, but commit e41b93a6be57 ("powerpc/boot: Fix build failures > with -j 1") was also wrong. > > The correct dependency is: > > $(obj)/serial.o: $(obj)/autoconf.h > > However, I do not

[PATCH] KVM: PPC: Book3S HV: XIVE: Fix typo in comment

2019-07-03 Thread Greg Kurz
Cc: triv...@kernel.org Signed-off-by: Greg Kurz --- arch/powerpc/kvm/book3s_xive.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c index 1fcb3d6f1db8..e3169e8bf1fc 100644 --- a/arch/powerpc/kvm/book3s_xive.c

Re: [PATCH V2 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-03 Thread Cezary Rojewski
On 2019-07-03 08:42, shengjiu.w...@nxp.com wrote: +static void fsl_esai_reset(unsigned long arg) +{ + struct fsl_esai *esai_priv = (struct fsl_esai *)arg; + u32 saisr, tfcr, rfcr; + + /* save the registers */ + regmap_read(esai_priv->regmap, REG_ESAI_TFCR, ); +

Re: [PATCH v3 03/16] pseries/fadump: move out platform specific support from generic code

2019-07-03 Thread Hari Bathini
On 03/07/19 9:34 AM, Oliver O'Halloran wrote: > On Wed, 2019-06-26 at 02:16 +0530, Hari Bathini wrote: >> Introduce callbacks for platform specific operations like register, >> unregister, invalidate & such, and move pseries specific code into >> platform code. > Please don't move around large

Re: [PATCH v3 01/16] powerpc/fadump: move internal fadump code to a new file

2019-07-03 Thread Hari Bathini
On 03/07/19 9:00 AM, Oliver O'Halloran wrote: > On Wed, 2019-06-26 at 02:15 +0530, Hari Bathini wrote: >> Refactoring fadump code means internal fadump code is referenced from >> different places. For ease, move internal code to a new file. > Can you elaborate a bit? I don't really get what the

Re: Kernel Bug/oops during boot (PowerVM LPAR w/vTPM)

2019-07-03 Thread Michal Suchánek
On Wed, 3 Jul 2019 13:17:16 +0200 Michal Suchánek wrote: > On Wed, 3 Jul 2019 15:54:59 +0530 > Sachin Sant wrote: > > > Booting mainline kernel on PowerVM LPAR with vTPM enabled results > > into a kernel crash. > > > > [0.365989] BUG: Kernel NULL pointer dereference at 0x0012 ... > >

[PATCH v2 7/7] soc/fsl/qbman: Update device tree with reserved memory

2019-07-03 Thread Roy Pledge
When using the reserved memory node in the device tree there are two options - dynamic or static. If a dynamic allocation was selected (where the kernel selects the address for the allocation) convert it to a static allocation by inserting the reg property. This will ensure the same memory is

[PATCH v2 6/7] soc/fsl/qbman: Fixup qman_shutdown_fq()

2019-07-03 Thread Roy Pledge
When shutting down a FQ on a dedicated channel only the SW portal associated with that channel can dequeue from it. Make sure the correct portal is use. Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/qman.c | 53 +++- 1 file changed, 42

[PATCH v2 5/7] soc/fsl/qbman: Disable interrupts during portal recovery

2019-07-03 Thread Roy Pledge
Disable the QBMan interrupts during recovery. Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/qman.c | 22 +++--- drivers/soc/fsl/qbman/qman_ccsr.c | 1 + drivers/soc/fsl/qbman/qman_priv.h | 1 + 3 files changed, 21 insertions(+), 3 deletions(-) diff --git

[PATCH v2 4/7] soc/fsl/qbman: Fix drain_mr_fqni()

2019-07-03 Thread Roy Pledge
The drain_mr_fqni() function may be called fron uninterruptable context so convert the msleep() to an mdelay(). Also ensure that the valid bit is updated while polling. Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/qman.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH v2 2/7] soc/fsl/qbman: Cleanup buffer pools if BMan was initialized prior to bootup

2019-07-03 Thread Roy Pledge
Clean the BMan buffer pools if the device had been initialized previously. This will ensure a consistent state if the kernel was soft restarted (kexec for example) Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/bman.c| 17 + drivers/soc/fsl/qbman/bman_ccsr.c | 10

[PATCH v2 1/7] soc/fsl/qbman: Rework QBMan private memory setup

2019-07-03 Thread Roy Pledge
Rework QBMan private memory setup so that the areas are not zeroed if the device was previously initialized If the QMan private memory was already initialized skip the PFDR initialization. Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/bman_ccsr.c | 26 --

[PATCH v2 0/7] soc/fsl/qbman: Enable Kexec for DPAA1 devices

2019-07-03 Thread Roy Pledge
Most DPAA1 devices do not support a soft reset which is an issue if Kexec starts a new kernel. This patch series allows Kexec to function by detecting that the QBMan device was previously initialized. The patches fix some issues with device cleanup as well as ensuring that the location of the

[PATCH v2 3/7] soc/fsl/qbman: Cleanup QMan queues if device was already initialized

2019-07-03 Thread Roy Pledge
If the QMan device was previously initialized make sure all the frame queues are out of service once all the portals are probed. This handles the case where the kernel is restarted without the SoC being reset (kexec for example) Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/qman.c

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

2019-07-03 Thread Reza Arbab
On Tue, Jul 02, 2019 at 04:17:11PM +1000, Nicholas Piggin wrote: Santosh Sivaraj's on July 2, 2019 3:19 pm: --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -458,6 +458,12 @@ EXC_COMMON_BEGIN(machine_check_handle_early) bl machine_check_early

[PATCH v3 9/9] powerpc/pseries: Add documentation for vcpudispatch_stats

2019-07-03 Thread Naveen N. Rao
Add a document describing the fields provided by /proc/powerpc/vcpudispatch_stats. Signed-off-by: Naveen N. Rao --- Documentation/powerpc/vcpudispatch_stats.txt | 68 1 file changed, 68 insertions(+) create mode 100644 Documentation/powerpc/vcpudispatch_stats.txt diff

[PATCH v3 7/9] powerpc/pseries: Provide vcpu dispatch statistics

2019-07-03 Thread Naveen N. Rao
For Shared Processor LPARs, the POWER Hypervisor maintains a relatively static mapping of the LPAR processors (vcpus) to physical processor chips (representing the "home" node) and tries to always dispatch vcpus on their associated physical processor chip. However, under certain scenarios, vcpus

[PATCH v3 6/9] powerpc/pseries: Move mm/book3s64/vphn.c under platforms/pseries/

2019-07-03 Thread Naveen N. Rao
hcall_vphn() is specific to pseries and will be used in a subsequent patch. So, move it to a more appropriate place under arch/powerpc/platforms/pseries. Also merge vphn.h into lppaca.h and update vphn selftest to use the new files. Signed-off-by: Naveen N. Rao ---

[PATCH v3 5/9] powerpc/pseries: Generalize hcall_vphn()

2019-07-03 Thread Naveen N. Rao
H_HOME_NODE_ASSOCIATIVITY hcall can take two different flags and return different associativity information in each case. Generalize the existing hcall_vphn() function to take flags as an argument and to return the result. Update the only existing user to pass the proper arguments. Signed-off-by:

[PATCH v3 4/9] powerpc/pseries: Introduce rwlock to gatekeep DTLB usage

2019-07-03 Thread Naveen N. Rao
Since we would be introducing a new user of the DTL buffer in a subsequent patch, we need a way to gatekeep use of the DTL buffer. The current debugfs interface for DTL allows registering and opening cpu-specific DTL buffers. Cpu specific files are exposed under debugfs 'powerpc/dtl/' node, and

[PATCH v3 3/9] powerpc/pseries: Factor out DTL buffer allocation and registration routines

2019-07-03 Thread Naveen N. Rao
Introduce new helpers for DTL buffer allocation and registration and have the existing code use those. Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/lppaca.h | 3 ++ arch/powerpc/platforms/pseries/lpar.c | 66 +++--- arch/powerpc/platforms/pseries/setup.c

[PATCH v3 2/9] powerpc/pseries: Do not save the previous DTL mask value

2019-07-03 Thread Naveen N. Rao
When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is enabled, we always initialize DTL enable mask to DTL_LOG_PREEMPT (0x2). There are no other places where the mask is changed. As such, when reading the DTL log buffer through debugfs, there is no need to save and restore the previous mask value. We don't

[PATCH v3 1/9] powerpc/pseries: Use macros for referring to the DTL enable mask

2019-07-03 Thread Naveen N. Rao
Introduce macros to encode the DTL enable mask fields and use those instead of hardcoding numbers. Acked-by: Nathan Lynch Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/lppaca.h | 11 +++ arch/powerpc/platforms/pseries/dtl.c | 8 +---

[PATCH v3 0/9] Provide vcpu dispatch statistics

2019-07-03 Thread Naveen N. Rao
Changes since v2: - Moved most prototypes to asm/lppaca.h instead of asm/plpar_wrappers.h - Patch 4/9 changed to use rwlocks for guarding DTL buffer usage across debugfs and the new vcpudispatch_stats. - Patch 6/9 has been updated to address breakage of the vphn selftest under

[PATCH v2 10/35] macintosh: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

[PATCH v2 02/35] powerpc: Add an allocation failure check

2019-07-03 Thread Fuqian Huang
Add an allocation failure check. Signed-off-by: Fuqian Huang --- Changes in v2: - Split into two patches arch/powerpc/platforms/pseries/dlpar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index

[PATCH] arch: powerpc: Kconfig: pedantic formatting

2019-07-03 Thread Enrico Weigelt, metux IT consult
Formatting of Kconfig files doesn't look so pretty, so let the Great White Handkerchief come around and clean it up. Also convert "---help---" as requested on lkml. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/powerpc/Kconfig | 40

Re: [PATCH 1/4] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-03 Thread Christoph Hellwig
On Thu, Jul 04, 2019 at 12:27:06AM +1000, Michael Ellerman wrote: > On Tue, 2019-06-25 at 14:52:36 UTC, Christoph Hellwig wrote: > > This function has never been used anywhere in the kernel tree since it > > was added to the tree. We also now have proper PCIe P2P APIs in the core > > kernel, and

Re: [PATCH v5 0/4] *** SUBJECT HERE ***

2019-07-03 Thread Herbert Xu
On Mon, Jun 24, 2019 at 07:20:13AM +, Christophe Leroy wrote: > This series is the last set of fixes for the Talitos driver. > > We now get a fully clean boot on both SEC1 (SEC1.2 on mpc885) and > SEC2 (SEC2.2 on mpc8321E) with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS: > > [3.385197] bus:

Re: [PATCH] powerpc/xmon: Fix disabling tracing while in xmon

2019-07-03 Thread Michael Ellerman
On Thu, 2019-06-27 at 09:59:40 UTC, "Naveen N. Rao" wrote: > Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering > xmon") added code to disable recording trace entries while in xmon. The > commit introduced a variable 'tracing_enabled' to record if tracing was > enabled on xmon

Re: [PATCH] recordmcount: Fix spurious mcount entries on powerpc

2019-07-03 Thread Michael Ellerman
On Wed, 2019-06-26 at 18:38:01 UTC, "Naveen N. Rao" wrote: > The recent change enabling HAVE_C_RECORDMCOUNT on powerpc started > showing the following issue: > > # modprobe kprobe_example >ftrace-powerpc: Not expected bl: opcode is 3c4c0001 >WARNING: CPU: 0 PID: 227 at

Re: [PATCH 1/4] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-03 Thread Michael Ellerman
On Tue, 2019-06-25 at 14:52:36 UTC, Christoph Hellwig wrote: > This function has never been used anywhere in the kernel tree since it > was added to the tree. We also now have proper PCIe P2P APIs in the core > kernel, and any new P2P support should be using those. > > Signed-off-by: Christoph

Re: [PATCH] powerpc/rtas: retry when cpu offline races with suspend/migration

2019-07-03 Thread Michael Ellerman
On Fri, 2019-06-21 at 06:05:18 UTC, Nathan Lynch wrote: > The protocol for suspending or migrating an LPAR requires all present > processor threads to enter H_JOIN. So if we have threads offline, we > have to temporarily bring them up. This can race with administrator > actions such as SMT state

Re: [PATCH] powerpc/cacheflush: fix variable set but not used

2019-07-03 Thread Michael Ellerman
On Thu, 2019-06-06 at 13:58:13 UTC, Qian Cai wrote: > The powerpc's flush_cache_vmap() is defined as a macro and never use > both of its arguments, so it will generate a compilation warning, > > lib/ioremap.c: In function 'ioremap_page_range': > lib/ioremap.c:203:16: warning: variable 'start' set

Re: [PATCH] powerpc/eeh_cache: fix a W=1 kernel-doc warning

2019-07-03 Thread Michael Ellerman
On Wed, 2019-06-05 at 20:46:19 UTC, Qian Cai wrote: > The opening comment mark "/**" is reserved for kernel-doc comments, so > it will generate a warning with "make W=1". > > arch/powerpc/kernel/eeh_cache.c:37: warning: cannot understand function > prototype: 'struct pci_io_addr_range > > Since

Re: [PATCH] powerpc: Document xive=off option

2019-07-03 Thread Michael Ellerman
On Mon, 2019-05-13 at 05:39:10 UTC, Michael Neuling wrote: > commit 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE > interrupt controller") added an option to turn off Linux native XIVE > usage via the xive=off kernel command line option. > > This documents this option. > >

Re: [PATCH] powerpc/ftrace: Enable C Version of recordmcount

2019-07-03 Thread Michael Ellerman
On Tue, 2019-05-07 at 13:31:38 UTC, Christophe Leroy wrote: > Selects HAVE_C_RECORDMCOUNT to use the C version of the recordmcount > intead of the old Perl Version of recordmcount. > > This should improve build time. It also seems like the old Perl Version > misses some calls to _mcount that the

Re: [PATCH 09/30] macintosh: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Christophe Leroy
Le 03/07/2019 à 15:14, Fuqian Huang a écrit : kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and

Re: [PATCH 02/30] powerpc: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Christophe Leroy
Le 03/07/2019 à 15:13, Fuqian Huang a écrit : kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and

[PATCH 09/30] macintosh: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

[PATCH 02/30] powerpc: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

Re: Kernel Bug/oops during boot (PowerVM LPAR w/vTPM)

2019-07-03 Thread Michal Suchánek
On Wed, 3 Jul 2019 15:54:59 +0530 Sachin Sant wrote: > Booting mainline kernel on PowerVM LPAR with vTPM enabled results > into a kernel crash. > > [0.365989] BUG: Kernel NULL pointer dereference at 0x0012 > [0.365995] Faulting instruction address: 0xc073dd80 > [

Kernel Bug/oops during boot (PowerVM LPAR w/vTPM)

2019-07-03 Thread Sachin Sant
Booting mainline kernel on PowerVM LPAR with vTPM enabled results into a kernel crash. [0.365989] BUG: Kernel NULL pointer dereference at 0x0012 [0.365995] Faulting instruction address: 0xc073dd80 [0.366000] Oops: Kernel access of bad area, sig: 11 [#1] [0.366005] LE

Re: [PATCH V2 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-03 Thread Nicolin Chen
On Wed, Jul 03, 2019 at 02:42:05PM +0800, shengjiu.w...@nxp.com wrote: > From: Shengjiu Wang > > There is chip errata ERR008000, the reference doc is > (https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf), > > The issue is "While using ESAI transmit or receive and > an underrun/overrun happens,

Re: [PATCH V2 1/2] ASoC: fsl_esai: Wrap some operations to be functions

2019-07-03 Thread Nicolin Chen
Looks good to me, yet two small comments inline. Please add this to this patch in the next version: Acked-by: Nicolin Chen On Wed, Jul 03, 2019 at 02:42:04PM +0800, shengjiu.w...@nxp.com wrote: > +static int fsl_esai_register_restore(struct fsl_esai *esai_priv) > +{ > + int ret; > + /*

[PATCH 14/14] powerpc/64s/exception: machine check improve labels and comments

2019-07-03 Thread Nicholas Piggin
Short forward and backward branches can be given number labels, but larger significant divergences in code path a more readable if they're given descriptive names. Also adjusts a comment to account for guest delivery. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 14

[PATCH 13/14] powerpc/64s/exception: untangle early machine check handler branch

2019-07-03 Thread Nicholas Piggin
machine_check_early_common now branches to machine_check_handle_early which is its only caller. Move interleaving code out of the way, and remove the branch. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 129 +-- 1 file changed, 62

[PATCH 12/14] powerpc/64s/exception: machine check move unrecoverable handling out of line

2019-07-03 Thread Nicholas Piggin
Similarly to the previous change, all callers of the unrecoverable handler run relocated so can reach it with a direct branch. This makes it easy to move out of line, which makes the "normal" path less cluttered and easier to follow. MSR[ME] manipulation still requires the rfi, so that is moved

[PATCH 11/14] powerpc/64s/exception: simplify machine check early path

2019-07-03 Thread Nicholas Piggin
machine_check_handle_early_common can reach machine_check_handle_early directly now that it runs at the relocated address, so just branch directly. The rfi sequence is required to enable MSR[ME] but that step is moved into a helper function, making the code easier to follow. Signed-off-by:

[PATCH 10/14] powerpc/64s/exception: machine check move tramp code

2019-07-03 Thread Nicholas Piggin
Following convention, move the tramp code (unrelocated) above the common handlers (relocated). Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

[PATCH 09/14] powerpc/64s/exception: machine check restructure to reuse common macros

2019-07-03 Thread Nicholas Piggin
Follow the pattern of sreset and HMI handlers more closely: use EXCEPTION_PROLOG_COMMON_1 rather than open-coding it, and run the handler at the relocated location. This helps later simplification and code sharing. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 71

[PATCH 08/14] powerpc/64s/exception: machine check pseries should skip the late handler for host kernel MCEs

2019-07-03 Thread Nicholas Piggin
The powernv machine check handler copes with taking a MCE from one of three contexts, guest, host kernel, and host user. In each case the early handler runs first on a special stack. Then: - The guest case branches to the KVM interrupt handler (via standard interrupt macros). - The host user

[PATCH 07/14] powerpc/64s/exception: machine check use correct cfar for late handler

2019-07-03 Thread Nicholas Piggin
Bare metal machine checks run an "early" handler in real mode before running the main handler which reports the event. The main handler runs exactly as a normal interrupt handler, after the "windup" which sets registers back as they were at interrupt entry. CFAR does not get restored by the

[PATCH 06/14] powerpc/64s/exception: machine check remove machine_check_pSeries_0 branch

2019-07-03 Thread Nicholas Piggin
This label has only one caller, so unwind the branch and move it inline. The location of the comment is adjusted to match similar one in system reset. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 23 ++- 1 file changed, 10 insertions(+), 13

[PATCH 05/14] powerpc/64s/exception: machine check pseries should always run the early handler

2019-07-03 Thread Nicholas Piggin
Now that pseries with fwnmi registered runs the early machine check handler, there is no good reason to special case the non-fwnmi case and skip the early handler. Reducing the code and number of paths is a top priority for asm code, it's better to handle this in C where possible (and the pseries

[PATCH 04/14] powerpc/64s/exception: machine check adjust RFI target

2019-07-03 Thread Nicholas Piggin
The host kernel delivery case for powernv does RFI_TO_USER_OR_KERNEL, but should just use RFI_TO_KERNEL which makes it clear this is not a user case. This is not a bug because RFI_TO_USER_OR_KERNEL deals with kernel returns just fine. Signed-off-by: Nicholas Piggin ---

[PATCH 03/14] powerpc/64s/exception: machine check fix KVM guest test

2019-07-03 Thread Nicholas Piggin
The machine_check_handle_early hypervisor guest test is skipped if !HVMODE or MSR[HV]=0, which is wrong for PR or nested hypervisors that could be running a guest in this state. Test HSTATE_IN_GUEST up front and use that to branch out to the KVM handler, then MSR[PR] alone can test for this

[PATCH 02/14] powerpc/64s/exception: machine check remove bitrotted comment

2019-07-03 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 4 1 file changed, 4 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index db7ef8c8566f..e8734a1dfdb9 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++

[PATCH 01/14] powerpc/64s/exception: machine check fwnmi remove HV case

2019-07-03 Thread Nicholas Piggin
fwnmi does not trigger in HV mode, so remove always-true feature test. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index

[PATCH 00/14] powerpc/64s/exception: machine check cleanup series

2019-07-03 Thread Nicholas Piggin
This ended up blowing out a bit because of some fixes and changes to the way pseries works, and machine check is the trickiest and most custom handler. After this series it's almost understandable, and uses more of the standard interrupt handler macros, which will make it more amenable to

[PATCH V2 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-03 Thread shengjiu . wang
From: Shengjiu Wang There is chip errata ERR008000, the reference doc is (https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf), The issue is "While using ESAI transmit or receive and an underrun/overrun happens, channel swap may occur. The only recovery mechanism is to reset the ESAI." This issue

[PATCH V2 1/2] ASoC: fsl_esai: Wrap some operations to be functions

2019-07-03 Thread shengjiu . wang
From: Shengjiu Wang Extract the operation to be functions, to improve the readability. In this patch, fsl_esai_init, fsl_esai_register_restore, fsl_esai_trigger_start and fsl_esai_trigger_stop are extracted. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c | 191

[PATCH V2 0/2] recover the channel swap after xrun

2019-07-03 Thread shengjiu . wang
From: Shengjiu Wang recover the channel swap after xrun Shengjiu Wang (2): ASoC: fsl_esai: Wrap some operations to be functions ASoC: fsl_esai: recover the channel swap after xrun sound/soc/fsl/fsl_esai.c | 267 --- 1 file changed, 194 insertions(+), 73

Re: [RFC PATCH v2 00/12] Reduce ifdef mess in ptrace

2019-07-03 Thread Ravi Bangoria
On 6/28/19 9:17 PM, Christophe Leroy wrote: > The purpose of this series is to reduce the amount of #ifdefs > in ptrace.c > > This is a first try. Most of it is done, there are still some #ifdefs that > could go away. > > Please comment and tell whether it is worth continuing in that

Re: [PATCH] i2c: remove casting dma_alloc

2019-07-03 Thread Jochen Friedrich
From: Vasyl Generated by: alloc_cast.cocci Signed-off-by: Vasyl Acked-by: Jochen Friedrich --- drivers/i2c/busses/i2c-cpm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index

Re: [PATCH] powerpc/hw_breakpoint: move instruction stepping out of hw_breakpoint_handler()

2019-07-03 Thread Ravi Bangoria
On 6/28/19 9:25 PM, Christophe Leroy wrote: > On 8xx, breakpoints stop after executing the instruction, so > stepping/emulation is not needed. Move it into a sub-function and > remove the #ifdefs. > > Signed-off-by: Christophe Leroy > --- Reviewed-by: Ravi Bangoria Just one neat below...