From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Mladek Date: Wed, 18 May 2022 09:58:18 +0200 Subject: [PATCH 19/30] panic: Add the panic hypervisor notifier list In-Reply-To: References: <20220427224924.592546-1-gpiccoli@igalia.com> <20220427224924.592546-20-gpiccoli@igalia.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kexec@lists.infradead.org On Tue 2022-05-17 15:57:34, Petr Mladek wrote: > On Mon 2022-05-16 12:06:17, Guilherme G. Piccoli wrote: > > >> --- a/drivers/soc/bcm/brcmstb/pm/pm-arm.c > > >> +++ b/drivers/soc/bcm/brcmstb/pm/pm-arm.c > > >> @@ -814,7 +814,7 @@ static int brcmstb_pm_probe(struct platform_device *pdev) > > >> goto out; > > >> } > > >> > > >> - atomic_notifier_chain_register(&panic_notifier_list, > > >> + atomic_notifier_chain_register(&panic_hypervisor_list, > > >> &brcmstb_pm_panic_nb); > > > > > > I am not sure about this one. It instruct some HW to preserve DRAM. > > > IMHO, it better fits into pre_reboot category but I do not have > > > strong opinion. > > > > Disagree here, I'm CCing Florian for information. > > > > This notifier preserves RAM so it's *very interesting* if we have > > kmsg_dump() for example, but maybe might be also relevant in case kdump > > kernel is configured to store something in a persistent RAM (then, > > without this notifier, after kdump reboots the system data would be lost). > > I see. It is actually similar problem as with > drivers/firmware/google/gsmi.c. As discussed in the other other reply, it seems that both affected notifiers do not store kernel logs and should stay in the "hypervisor". > I does similar things like kmsg_dump() so it should be called in > the same location (after info notifier list and before kdump). > > A solution might be to put it at these notifiers at the very > end of the "info" list or make extra "dump" notifier list. I just want to point out that the above idea has problems. Notifiers storing kernel log need to be treated as kmsg_dump(). In particular, we would need to know if there are any. We do not need to call "info" notifier list before kdump when there is no kernel log dumper registered. Best Regards, Petr