[PATCH v3 4/4] dt-bindings: fsl: convert fsl,layerscape-scfg to YAML

2022-04-27 Thread Michael Walle
Convert the fsl,layerscape-scfg binding to the new YAML format. In the device trees, the device node always have a "syscon" compatible, which wasn't mentioned in the previous binding. Also added, compared to the original binding, is the interrupt-controller subnode as used in arch/arm/boot/dts/ls

[PATCH v3 3/4] dt-bindings: interrupt-controller: fsl, ls-extirq: convert to YAML

2022-04-27 Thread Michael Walle
Convert the fsl,ls-extirq binding to the new YAML format. In contrast to the original binding documentation, there are three compatibles which are used in their corresponding device trees which have a specific compatible and the (already documented) fallback compatible: - "fsl,ls1046a-extirq", "f

[PATCH v3 2/4] arm64: dts: freescale: reduce the interrup-map-mask

2022-04-27 Thread Michael Walle
Reduce the interrupt-map-mask of the external interrupt controller to 0xf to align with the devicetree schema. Signed-off-by: Michael Walle --- arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1088a.

[PATCH v3 1/4] ARM: dts: ls1021a: reduce the interrupt-map-mask

2022-04-27 Thread Michael Walle
Reduce the interrupt-map-mask of the external interrupt controller to 7 to align with the devicetree schema. Signed-off-by: Michael Walle --- arch/arm/boot/dts/ls1021a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls10

[PATCH v3 0/4] dt-bindings: convert freescale extirq and scfg schemas

2022-04-27 Thread Michael Walle
The first two patches will be resend to the soc tree once the schema is approved/picked up. Please note, I'm still getting these weird "is too short" errors for for interrupt-map entries, but it seems to work for you, so.. ;) Michael Walle (4): ARM: dts: ls1021a: reduce the interrupt-map-mask

[PATCH v6 05/17] powerpc: define get_cycles macro for arch-override

2022-04-27 Thread Jason A. Donenfeld
PowerPC defines a get_cycles() function, but it forgot to do the usual `#define get_cycles get_cycles` dance, making it impossible for generic code to see if an arch-specific function was defined. Cc: Thomas Gleixner Cc: Arnd Bergmann Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Ma

[PATCH 2/2] recordmcount: Handle sections with no non-weak symbols

2022-04-27 Thread Naveen N. Rao
Kernel builds on powerpc are failing with the below error [1]: CC kernel/kexec_file.o Cannot find symbol for section 9: .text.unlikely. kernel/kexec_file.o: failed Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") [2], binutils started dropping section s

[PATCH 0/2] ftrace/recordmcount: Handle object files without section symbols

2022-04-27 Thread Naveen N. Rao
This solves a build issue on powerpc with binutils v2.36 and newer [1]. Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") [2], binutils started dropping section symbols that it thought were unused. Due to this, in certain scenarios, recordmcount is unable to find a non-wea

[PATCH 1/2] ftrace: Drop duplicate mcount locations

2022-04-27 Thread Naveen N. Rao
In the absence of section symbols [1], objtool (today) and recordmcount (with a subsequent patch) generate __mcount_loc relocation records with weak symbols as the base. This works fine as long as those weak symbols are not overridden, but if they are, these can result in duplicate entries in the f

Re: [PATCH 1/2] ftrace: Drop duplicate mcount locations

2022-04-27 Thread Steven Rostedt
On Wed, 27 Apr 2022 15:01:21 +0530 "Naveen N. Rao" wrote: > In the absence of section symbols [1], objtool (today) and recordmcount > (with a subsequent patch) generate __mcount_loc relocation records with > weak symbols as the base. This works fine as long as those weak symbols > are not overrid

Re: [PATCH 2/2] recordmcount: Handle sections with no non-weak symbols

2022-04-27 Thread Steven Rostedt
On Wed, 27 Apr 2022 15:01:22 +0530 "Naveen N. Rao" wrote: > If one or both of these weak functions are overridden in future, in the > final vmlinux mcount table, references to these will change over to the > non-weak variant which has its own mcount location entry. As such, there > will now be tw

Re: [PATCH v3 4/4] dt-bindings: fsl: convert fsl, layerscape-scfg to YAML

2022-04-27 Thread Rob Herring
On Wed, 27 Apr 2022 09:53:38 +0200, Michael Walle wrote: > Convert the fsl,layerscape-scfg binding to the new YAML format. > > In the device trees, the device node always have a "syscon" > compatible, which wasn't mentioned in the previous binding. > > Also added, compared to the original binding

Re: serial hang in qemu-system-ppc64 -M pseries

2022-04-27 Thread Thomas Huth
On 26/04/2022 12.26, Rob Landley wrote: When I cut and paste 80-ish characters of text into the Linux serial console, it reads 16 characters and stops. When I hit space, it reads another 16 characters, and if I keep at it will eventually catch up without losing data. If I type, every character sh

Re: serial hang in qemu-system-ppc64 -M pseries

2022-04-27 Thread Thomas Huth
On 27/04/2022 17.27, Thomas Huth wrote: On 26/04/2022 12.26, Rob Landley wrote: When I cut and paste 80-ish characters of text into the Linux serial console, it reads 16 characters and stops. When I hit space, it reads another 16 characters, and if I keep at it will eventually catch up without

[PATCH net-next 13/14] eth: spider: remove a copy of the NAPI_POLL_WEIGHT define

2022-04-27 Thread Jakub Kicinski
Defining local versions of NAPI_POLL_WEIGHT with the same values in the drivers just makes refactoring harder. Signed-off-by: Jakub Kicinski --- CC: kou.ishiz...@toshiba.co.jp CC: ge...@infradead.org CC: linuxppc-dev@lists.ozlabs.org --- drivers/net/ethernet/toshiba/spider_net.c | 2 +- drivers/

[PATCH net-next v5 00/18] Remove use of list iterator after loop body

2022-04-27 Thread Jakob Koschel
When the list iterator loop does not exit early the list iterator variable contains a type-confused pointer to a 'bogus' list element computed based on the head [1]. Often a 'found' variable is used to ensure the list iterator variable is only accessed after the loop body if the loop did exit earl

[PATCH net-next v5 01/18] connector: Replace usage of found with dedicated list iterator variable

2022-04-27 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boole

[PATCH net-next v5 02/18] net: dsa: sja1105: remove use of iterator after list_for_each_entry() loop

2022-04-27 Thread Jakob Koschel
From: Vladimir Oltean The link below explains that there is a desire to syntactically change list_for_each_entry() and list_for_each() such that it becomes impossible to use the iterator variable outside the scope of the loop. Although sja1105_insert_gate_entry() makes legitimate use of the iter

[PATCH net-next v5 03/18] net: dsa: sja1105: reorder sja1105_first_entry_longer_than with memory allocation

2022-04-27 Thread Jakob Koschel
From: Vladimir Oltean sja1105_first_entry_longer_than() does not make use of the full struct sja1105_gate_entry *e, just of e->interval which is set from the passed entry_time. This means that if there is a gate conflict, we have allocated e for nothing, just to free it later. Reorder the memory

[PATCH net-next v5 04/18] net: dsa: sja1105: use list_add_tail(pos) instead of list_add(pos->prev)

2022-04-27 Thread Jakob Koschel
From: Vladimir Oltean When passed a non-head list element, list_add_tail() actually adds the new element to its left, which is what we want. Despite the slightly confusing name, use the dedicated function which does the same thing as the open-coded list_add(pos->prev). Suggested-by: Jakub Kicins

[PATCH net-next v5 05/18] net: dsa: mv88e6xxx: remove redundant check in mv88e6xxx_port_vlan()

2022-04-27 Thread Jakob Koschel
From: Vladimir Oltean We know that "dev > dst->last_switch" in the "else" block. In other words, that "dev - dst->last_switch" is > 0. dsa_port_bridge_num_get(dp) can be 0, but the check "if (bridge_num + dst->last_switch != dev) continue", rewritten as "if (bridge_num != dev - dst->last_switch)

[PATCH net-next v5 06/18] net: dsa: mv88e6xxx: refactor mv88e6xxx_port_vlan()

2022-04-27 Thread Jakob Koschel
From: Vladimir Oltean To avoid bugs and speculative execution exploits due to type-confused pointers at the end of a list_for_each_entry() loop, one measure is to restrict code to not use the iterator variable outside the loop block. In the case of mv88e6xxx_port_vlan(), this isn't a problem, as

[PATCH net-next v5 07/18] net: dsa: Replace usage of found with dedicated list iterator variable

2022-04-27 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boole

[PATCH net-next v5 08/18] net: sparx5: Replace usage of found with dedicated list iterator variable

2022-04-27 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boole

[PATCH net-next v5 09/18] qed: Use dedicated list iterator variable

2022-04-27 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable [1]. Link: https://lor

[PATCH net-next v5 10/18] qed: Replace usage of found with dedicated list iterator variable

2022-04-27 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boole

[PATCH net-next v5 11/18] qed: Remove usage of list iterator variable after the loop

2022-04-27 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. Since "found" and "p_ent" need to be equal, "found" should be used consistently to limit the scope of "p_ent" to the list traversal in

[PATCH net-next v5 12/18] net: qede: Replace usage of found with dedicated list iterator variable

2022-04-27 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boole

[PATCH net-next v5 13/18] net: qede: Remove check of list iterator against head past the loop body

2022-04-27 Thread Jakob Koschel
When list_for_each_entry() completes the iteration over the whole list without breaking the loop, the iterator value will be a bogus pointer computed based on the head element. While it is safe to use the pointer to determine if it was computed based on the head element, either with list_entry_is_

[PATCH net-next v5 14/18] sfc: Remove usage of list iterator for list_add() after the loop body

2022-04-27 Thread Jakob Koschel
In preparation to limit the scope of a list iterator to the list traversal loop, use a dedicated pointer pointing to the location where the element should be inserted [1]. Before, the code implicitly used the head when no element was found when using &new->list. The new 'pos' variable is set to th

[PATCH net-next v5 15/18] net: netcp: Remove usage of list iterator for list_add() after loop body

2022-04-27 Thread Jakob Koschel
In preparation to limit the scope of a list iterator to the list traversal loop, use a dedicated pointer pointing to the location where the element should be inserted [1]. Before, the code implicitly used the head when no element was found when using &next->list. The new 'pos' variable is set to t

[PATCH net-next v5 16/18] ps3_gelic: Replace usage of found with dedicated list iterator variable

2022-04-27 Thread Jakob Koschel
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boole

[PATCH net-next v5 17/18] ipvlan: Remove usage of list iterator variable for the loop body

2022-04-27 Thread Jakob Koschel
In preparation to limit the scope of the list iterator variable to the list traversal loop, use a dedicated pointer to iterate through the list [1]. Since that variable should not be used past the loop iteration, a separate variable is used to 'remember the current location within the loop'. To e

[PATCH net-next v5 18/18] team: Remove use of list iterator variable for list_for_each_entry_from()

2022-04-27 Thread Jakob Koschel
In preparation to limit the scope of the list iterator variable to the list traversal loop, use a dedicated pointer to iterate through the list [1]. Since that variable should not be used past the loop iteration, a separate variable is used to 'remember the current location within the loop'. To e

RE: [PATCH v3 3/4] dt-bindings: interrupt-controller: fsl, ls-extirq: convert to YAML

2022-04-27 Thread Leo Li
> -Original Message- > From: Michael Walle > Sent: Wednesday, April 27, 2022 2:54 AM > To: Rob Herring ; Krzysztof Kozlowski > > Cc: Leo Li ; Michael Walle ; Shawn > Guo ; Thomas Gleixner ; Marc > Zyngier ; linuxppc-dev@lists.ozlabs.org; linux-arm- > ker...@lists.infradead.org; devicet

Re: [PATCH net-next 13/14] eth: spider: remove a copy of the NAPI_POLL_WEIGHT define

2022-04-27 Thread Geoff Levand
Hi Jakub, On 4/27/22 08:41, Jakub Kicinski wrote: > Defining local versions of NAPI_POLL_WEIGHT with the same > values in the drivers just makes refactoring harder. > --- a/drivers/net/ethernet/toshiba/spider_net.c > +++ b/drivers/net/ethernet/toshiba/spider_net.c > > netif_napi_add(netde

Re: [PATCH 24/30] panic: Refactor the panic path

2022-04-27 Thread Randy Dunlap
On 4/27/22 15:49, Guilherme G. Piccoli wrote: > + crash_kexec_post_notifiers > + This was DEPRECATED - users should always prefer the This is DEPRECATED - users should always prefer the > + parameter "panic_notifiers_level" -

[PATCH 07/30] mips: ip22: Reword PANICED to PANICKED and remove useless header

2022-04-27 Thread Guilherme G. Piccoli
Many other place in the kernel prefer the latter, so let's keep it consistent in MIPS code as well. Also, removes a useless header. Cc: Thomas Bogendoerfer Signed-off-by: Guilherme G. Piccoli --- arch/mips/sgi-ip22/ip22-reset.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

[PATCH 08/30] powerpc/setup: Refactor/untangle panic notifiers

2022-04-27 Thread Guilherme G. Piccoli
The panic notifiers infrastructure is a bit limited in the scope of the callbacks - basically every kind of functionality is dropped in a list that runs in the same point during the kernel panic path. This is not really on par with the complexities and particularities of architecture / hypervisors'

[PATCH 09/30] coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier

2022-04-27 Thread Guilherme G. Piccoli
The panic notifier infrastructure executes registered callbacks when a panic event happens - such callbacks are executed in atomic context, with interrupts and preemption disabled in the running CPU and all other CPUs disabled. That said, mutexes in such context are not a good idea. This patch rep

[PATCH 10/30] alpha: Clean-up the panic notifier code

2022-04-27 Thread Guilherme G. Piccoli
The alpha panic notifier has some code issues, not following the conventions of other notifiers. Also, it might halt the machine but still it is set to run as early as possible, which doesn't seem to be a good idea. This patch cleans the code, and set the notifier to run as the latest, following t

[PATCH 11/30] um: Improve panic notifiers consistency and ordering

2022-04-27 Thread Guilherme G. Piccoli
Currently the panic notifiers from user mode linux don't follow the convention for most of the other notifiers present in the kernel (indentation, priority setting, numeric return). More important, the priorities could be improved, since it's a special case (userspace), hence we could run the notif

[PATCH 12/30] parisc: Replace regular spinlock with spin_trylock on panic path

2022-04-27 Thread Guilherme G. Piccoli
The panic notifiers' callbacks execute in an atomic context, with interrupts/preemption disabled, and all CPUs not running the panic function are off, so it's very dangerous to wait on a regular spinlock, there's a risk of deadlock. This patch refactors the panic notifier of parisc/power driver to

[PATCH 13/30] s390/consoles: Improve panic notifiers reliability

2022-04-27 Thread Guilherme G. Piccoli
Currently many console drivers for s390 rely on panic/reboot notifiers to invoke callbacks on these events. The panic() function disables local IRQs, secondary CPUs and preemption, so callbacks invoked on panic are effectively running in atomic context. Happens that most of these console callbacks

[PATCH 14/30] panic: Properly identify the panic event to the notifiers' callbacks

2022-04-27 Thread Guilherme G. Piccoli
The notifiers infrastructure provides a way to pass an "id" to the callbacks to determine what kind of event happened, i.e., what is the reason behind they getting called. The panic notifier currently pass 0, but this is soon to be used in a multi-targeted notifier, so let's pass a meaningful "id"

[PATCH 15/30] bus: brcmstb_gisb: Clean-up panic/die notifiers

2022-04-27 Thread Guilherme G. Piccoli
This patch improves the panic/die notifiers in this driver by making use of a passed "id" instead of comparing pointer address; also, it removes an useless prototype declaration and unnecessary header inclusion. This is part of a panic notifiers refactor - this notifier in the future will be moved

[PATCH 16/30] drivers/hv/vmbus, video/hyperv_fb: Untangle and refactor Hyper-V panic notifiers

2022-04-27 Thread Guilherme G. Piccoli
Currently Hyper-V guests are among the most relevant users of the panic infrastructure, like panic notifiers, kmsg dumpers, etc. The reasons rely both in cleaning-up procedures (closing a hypervisor <-> guest connection, disabling a paravirtualized timer) as well as to data collection (sending pani

[PATCH 17/30] tracing: Improve panic/die notifiers

2022-04-27 Thread Guilherme G. Piccoli
Currently the tracing dump_on_oops feature is implemented through separate notifiers, one for die/oops and the other for panic. With the addition of panic notifier "id", this patch makes use of such "id" to unify both functions. It also comments the function and changes the priority of the notifie

[PATCH 18/30] notifier: Show function names on notifier routines if DEBUG_NOTIFIERS is set

2022-04-27 Thread Guilherme G. Piccoli
Currently we have a debug infrastructure in the notifiers file, but it's very simple/limited. This patch extends it by: (a) Showing all registered/unregistered notifiers' callback names; (b) Adding a dynamic debug tuning to allow showing called notifiers' function names. Notice that this should b

[PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-04-27 Thread Guilherme G. Piccoli
The goal of this new panic notifier is to allow its users to register callbacks to run very early in the panic path. This aims hypervisor/FW notification mechanisms as well as simple LED functions, and any other simple and safe mechanism that should run early in the panic path; more dangerous callb

[PATCH 20/30] panic: Add the panic informational notifier list

2022-04-27 Thread Guilherme G. Piccoli
The goal of this new panic notifier is to allow its users to register callbacks to run earlier in the panic path than they currently do. This aims at informational mechanisms, like dumping kernel offsets and showing device error data (in case it's simple registers reading, for example) as well as m

[PATCH 21/30] panic: Introduce the panic pre-reboot notifier list

2022-04-27 Thread Guilherme G. Piccoli
This patch renames the panic_notifier_list to panic_pre_reboot_list; the idea is that a subsequent patch will refactor the panic path in order to better split the notifiers, running some of them very early, some of them not so early [but still before kmsg_dump()] and finally, the rest should execut

[PATCH 22/30] panic: Introduce the panic post-reboot notifier list

2022-04-27 Thread Guilherme G. Piccoli
Currently we have 3 notifier lists in the panic path, which will be wired in a way to allow the notifier callbacks to run in different moments at panic time, in a subsequent patch. But there is also an odd set of architecture calls hardcoded in the end of panic path, after the restart machinery. T

[PATCH 23/30] printk: kmsg_dump: Introduce helper to inform number of dumpers

2022-04-27 Thread Guilherme G. Piccoli
Currently we don't have a way to check if there are dumpers set, except counting the list members maybe. This patch introduces a very simple helper to provide this information, by just keeping track of registered/unregistered kmsg dumpers. It's going to be used on the panic path in the subsequent p

[PATCH 24/30] panic: Refactor the panic path

2022-04-27 Thread Guilherme G. Piccoli
The panic() function is somewhat convoluted - a lot of changes were made over the years, adding comments that might be misleading/outdated now, it has a code structure that is a bit complex to follow, with lots of conditionals, for example. The panic notifier list is something else - a single list,

[PATCH 25/30] panic, printk: Add console flush parameter and convert panic_print to a notifier

2022-04-27 Thread Guilherme G. Piccoli
Currently the parameter "panic_print" relies in a function called directly on panic path; one of the flags the users can set for panic_print triggers a console replay mechanism, to show the entire kernel log buffer (from the beginning) in a panic event. Two problems with that: the dual nature of t

[PATCH 26/30] Drivers: hv: Do not force all panic notifiers to execute before kdump

2022-04-27 Thread Guilherme G. Piccoli
Since commit a11589563e96 ("x86/Hyper-V: Report crash register data or kmsg before running crash kernel") Hyper-V forcibly sets the kernel parameter "crash_kexec_post_notifiers"; with that, it did enforce the execution of *all* panic notifiers before kdump. The main reason behind that is that Hyper

[PATCH 27/30] powerpc: Do not force all panic notifiers to execute before kdump

2022-04-27 Thread Guilherme G. Piccoli
Commit 06e629c25daa ("powerpc/fadump: Fix inaccurate CPU state info in vmcore generated with panic") introduced a hardcoded setting of kernel parameter "crash_kexec_post_notifiers", effectively forcing all the panic notifiers to execute earlier in the panic path, before kdump. The reason for that

[PATCH 28/30] panic: Unexport crash_kexec_post_notifiers

2022-04-27 Thread Guilherme G. Piccoli
There is no users anymore of this variable that requires it to be "exported" in the headers; also, it was deprecated by the kernel parameter "panic_notifiers_level". Signed-off-by: Guilherme G. Piccoli --- include/linux/panic.h | 2 -- include/linux/panic_notifier.h | 1 - 2 files chang

[PATCH 29/30] powerpc: ps3, pseries: Avoid duplicate call to kmsg_dump() on panic

2022-04-27 Thread Guilherme G. Piccoli
Currently both pseries and ps3 are platforms that define special panic notifiers that run as callbacks inside powerpc generic panic notifier. In both cases kmsg_dump() is called, and the reason seems to be that both of these callbacks aims to effectively stop the machine, so nothing would execute a

[PATCH 30/30] um: Avoid duplicate call to kmsg_dump()

2022-04-27 Thread Guilherme G. Piccoli
Currently the panic notifier panic_exit() calls kmsg_dump() and some console flushing routines - this makes sense since such panic notifier exits UserMode Linux and never returns. Happens that after a panic refactor, kmsg_dump() is now always called *before* the pre_reboot list of panic notifiers,

[PATCH 05/30] misc/pvpanic: Convert regular spinlock into trylock on panic path

2022-04-27 Thread Guilherme G. Piccoli
The pvpanic driver relies on panic notifiers to execute a callback on panic event. Such function is executed in atomic context - the panic function disables local IRQs, preemption and all other CPUs that aren't running the panic code. With that said, it's dangerous to use regular spinlocks in such

[PATCH 02/30] ARM: kexec: Disable IRQs/FIQs also on crash CPUs shutdown path

2022-04-27 Thread Guilherme G. Piccoli
Currently the regular CPU shutdown path for ARM disables IRQs/FIQs in the secondary CPUs - smp_send_stop() calls ipi_cpu_stop(), which is responsible for that. This makes sense, since we're turning off such CPUs, putting them in an endless busy-wait loop. Problem is that there is an alternative pa

[PATCH 04/30] firmware: google: Convert regular spinlock into trylock on panic path

2022-04-27 Thread Guilherme G. Piccoli
Currently the gsmi driver registers a panic notifier as well as reboot and die notifiers. The callbacks registered are called in atomic and very limited context - for instance, panic disables preemption, local IRQs and all other CPUs that aren't running the current panic function. With that said,

[PATCH 01/30] x86/crash, reboot: Avoid re-disabling VMX in all CPUs on crash/restart

2022-04-27 Thread Guilherme G. Piccoli
In the panic path we have a list of functions to be called, the panic notifiers - such callbacks perform various actions in the machine's last breath, and sometimes users want them to run before kdump. We have the parameter "crash_kexec_post_notifiers" for that. When such parameter is used, the fun

[PATCH 06/30] soc: bcm: brcmstb: Document panic notifier action and remove useless header

2022-04-27 Thread Guilherme G. Piccoli
The panic notifier of this driver is very simple code-wise, just a memory write to a special position with some numeric code. But this is not clear from the semantic point-of-view, and there is no public documentation about that either. After discussing this in the mailing-lists [0] and having Flo

[PATCH 03/30] notifier: Add panic notifiers info and purge trailing whitespaces

2022-04-27 Thread Guilherme G. Piccoli
Although many notifiers are mentioned in the comments, the panic notifiers infrastructure is not. Also, the file contains some trailing whitespaces. This commit fix both issues. Cc: Arjan van de Ven Cc: Cong Wang Cc: Sebastian Andrzej Siewior Cc: Valentin Schneider Cc: Xiaoming Ni Signed-off-

[PATCH 00/30] The panic notifiers refactor

2022-04-27 Thread Guilherme G. Piccoli
Hey folks, this is an attempt to improve/refactor the dated panic notifiers infrastructure. This is strongly based in a suggestion made by Pter Mladek [0] some time ago, and it's finally ready. Below I'll detail the patch ordering, testing made, etc. First, a bit about the reason behind this. The

Re: [PATCH 20/30] panic: Add the panic informational notifier list

2022-04-27 Thread Paul E. McKenney
On Wed, Apr 27, 2022 at 07:49:14PM -0300, Guilherme G. Piccoli wrote: > The goal of this new panic notifier is to allow its users to > register callbacks to run earlier in the panic path than they > currently do. This aims at informational mechanisms, like dumping > kernel offsets and showing devic

Re: [PATCH] KVM: PPC: Book3S HV: Initialize AMOR in nested entry

2022-04-27 Thread Nicholas Piggin
Excerpts from Fabiano Rosas's message of April 26, 2022 12:21 am: > The hypervisor always sets AMOR to ~0, but let's ensure we're not > passing stale values around. > Reviewed-by: Nicholas Piggin Looks like our L0 doesn't do anything with hvregs.amor ? Thanks, Nick > Signed-off-by: Fabiano Ro

Re: [PATCH] powerpc/time: Always set decrementer in timer_interrupt()

2022-04-27 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of April 21, 2022 12:07 pm: > Excerpts from Michal Suchánek's message of April 21, 2022 12:28 am: >> Hello, >> >> On Thu, Apr 21, 2022 at 12:16:57AM +1000, Michael Ellerman wrote: >>> This is a partial revert of commit 0faf20a1ad16 ("powerpc/64s/interrupt: >

Re: serial hang in qemu-system-ppc64 -M pseries

2022-04-27 Thread Rob Landley
On 4/27/22 10:27, Thomas Huth wrote: > On 26/04/2022 12.26, Rob Landley wrote: >> When I cut and paste 80-ish characters of text into the Linux serial >> console, it >> reads 16 characters and stops. When I hit space, it reads another 16 >> characters, >> and if I keep at it will eventually catch

[PATCH] powerpc/perf: Add support for caps under sysfs in powerpc

2022-04-27 Thread Athira Rajeev
Add caps support under "/sys/bus/event_source/devices//" for powerpc. This directory can be used to expose some of the specific features that powerpc PMU supports to the user. Example: pmu_name. The name of PMU registered will depend on platform, say power9 or power10 or it could be Generic Compat

Re: serial hang in qemu-system-ppc64 -M pseries

2022-04-27 Thread Rob Landley
On 4/28/22 00:41, Rob Landley wrote: > On 4/27/22 10:27, Thomas Huth wrote: >> On 26/04/2022 12.26, Rob Landley wrote: >>> When I cut and paste 80-ish characters of text into the Linux serial >>> console, it >>> reads 16 characters and stops. When I hit space, it reads another 16 >>> character

Re: [PATCH v3 3/4] dt-bindings: interrupt-controller: fsl, ls-extirq: convert to YAML

2022-04-27 Thread Krzysztof Kozlowski
On 27/04/2022 22:08, Leo Li wrote: >> Convert the fsl,ls-extirq binding to the new YAML format. >> >> In contrast to the original binding documentation, there are three >> compatibles which are used in their corresponding device trees which have a >> specific compatible and the (already documented)