[PATCH v4 1/2] nmi_backtrace: Allow excluding an arbitrary CPU

2023-08-04 Thread Douglas Anderson
ing the current CPU (maybe because they already traced the current CPU) this makes it more obvious to the caller that they need to make sure that the current CPU ID can't change. Acked-by: Michal Hocko Signed-off-by: Douglas Anderson --- Changes in v4: - Renamed trigger_allbutself_cpu_

[PATCH v3 1/2] nmi_backtrace: Allow excluding an arbitrary CPU

2023-08-03 Thread Douglas Anderson
ing the current CPU (maybe because they already traced the current CPU) this makes it more obvious to the caller that they need to make sure that the current CPU ID can't change. Signed-off-by: Douglas Anderson --- Changes in v3: - ("nmi_backtrace: Allow excluding an arbitrary CPU

[PATCH] powerpc: Include asm/nmi.c in mobility.c for watchdog_hardlockup_set_timeout_pct()

2023-06-29 Thread Douglas Anderson
e. Reported-by: Randy Dunlap Closes: https://lore.kernel.org/r/af19b76d-aa4b-6c88-9cac-eae4b2072...@infradead.org Fixes: 7ca8fe94aa92 ("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH") Signed-off-by: Douglas Anderson --- arch/powerpc/platforms/pseries/mobility.c | 1 + 1 file chan

[PATCH v2] powerpc: Move arch_trigger_cpumask_backtrace from nmi.h to irq.h

2023-06-22 Thread Douglas Anderson
defined. For powerpc that's only selected if "CONFIG_PPC_BOOK3S_64" is defined. Fixes: 7ca8fe94aa92 ("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH") Reported-by: Michael Ellerman Closes: https://lore.kernel.org/r/871qi5otdh.fsf@mail.lhotse Signed-off-by: Douglas Anderson ---

[PATCH] powerpc: Move arch_trigger_cpumask_backtrace from nmi.h to irq.h

2023-06-21 Thread Douglas Anderson
LOCKUP_DETECTOR_ARCH") Reported-by: Michael Ellerman Closes: https://lore.kernel.org/r/871qi5otdh.fsf@mail.lhotse Signed-off-by: Douglas Anderson --- I'd expect that this would land in Andrew Morton's tree along with the other lockup detector stuff. arch/powerpc/include/asm/irq.h |

[PATCH 10/10] watchdog/hardlockup: Rename HAVE_HARDLOCKUP_DETECTOR_NON_ARCH to ..._PERF_OR_BUDDY

2023-05-26 Thread Douglas Anderson
HAVE_HARDLOCKUP_DETECTOR_NON_ARCH is a mouthful and confusing. HAVE_HARDLOCKUP_DETECTOR_PERF_OR_BUDDY is even more of a mouthful, but probably less confusing. Rename the Kconfig names. Signed-off-by: Douglas Anderson --- lib/Kconfig.debug | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH 09/10] watchdog/hardlockup: Move SMP barriers from common code to buddy code

2023-05-26 Thread Douglas Anderson
Signed-off-by: Douglas Anderson --- kernel/watchdog.c | 6 -- kernel/watchdog_buddy.c | 21 + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 6cc46b8e3d07..a351ab0c35eb 100644 --- a/kernel/watchdog

[PATCH 08/10] watchdog/buddy: Simplify the dependency for HARDLOCKUP_DETECTOR_PREFER_BUDDY

2023-05-26 Thread Douglas Anderson
The dependency for HARDLOCKUP_DETECTOR_PREFER_BUDDY was more complicated than it needed to be. If the "perf" detector is available and we have SMP then we have a choice, so enable the config based on just those two config items. Suggested-by: Petr Mladek Signed-off-by: Dougla

[PATCH 07/10] watchdog/buddy: Don't copy the cpumask in watchdog_next_cpu()

2023-05-26 Thread Douglas Anderson
There's no reason to make a copy of the "watchdog_cpus" locally in watchdog_next_cpu(). Making a copy wouldn't make things any more race free and we're just reading the value so there's no need for a copy. Suggested-by: Petr Mladek Signed-off-by: Douglas Anderson

[PATCH 06/10] watchdog/buddy: Cleanup how watchdog_buddy_check_hardlockup() is called

2023-05-26 Thread Douglas Anderson
t, so we should match types. Suggested-by: Petr Mladek Signed-off-by: Douglas Anderson --- include/linux/nmi.h | 4 ++-- kernel/watchdog.c | 15 +++ kernel/watchdog_buddy.c | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/linux/nmi.h b/incl

[PATCH 05/10] watchdog/hardlockup: remove softlockup comment in touch_nmi_watchdog()

2023-05-26 Thread Douglas Anderson
In the patch ("watchdog/hardlockup: add comments to touch_nmi_watchdog()") we adjusted some comments for touch_nmi_watchdog(). The comment about the softlockup had a typo and were also felt to be too obvious. Remove it. Suggested-by: Petr Mladek Signed-off-by: Douglas Anderson ---

[PATCH 04/10] watchdog/hardlockup: In watchdog_hardlockup_check() use cpumask_copy()

2023-05-26 Thread Douglas Anderson
Suggested-by: Petr Mladek Signed-off-by: Douglas Anderson --- kernel/watchdog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 32dac8028753..85f4839b6faf 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c

[PATCH 03/10] watchdog/hardlockup: Don't use raw_cpu_ptr() in watchdog_hardlockup_kick()

2023-05-26 Thread Douglas Anderson
In the patch ("watchdog/hardlockup: add a "cpu" param to watchdog_hardlockup_check()") there was no reason to use raw_cpu_ptr(). Using this_cpu_ptr() works fine. Suggested-by: Petr Mladek Signed-off-by: Douglas Anderson --- kernel/watchdog.c | 2 +- 1 file changed, 1 inse

[PATCH 00/10] watchdog: Cleanup / fixes after buddy series v5 reviews

2023-05-26 Thread Douglas Anderson
anup a few things that were pointed out in review. Douglas Anderson (10): watchdog/hardlockup: Keep kernel.nmi_watchdog sysctl as 0444 if probe fails watchdog/hardlockup: HAVE_NMI_WATCHDOG must implement watchdog_hardlockup_probe() watchdog/hardlockup: Don't use raw_cpu_ptr() in

[PATCH 01/10] watchdog/hardlockup: Keep kernel.nmi_watchdog sysctl as 0444 if probe fails

2023-05-26 Thread Douglas Anderson
Implement init time detection of perf") Reported-by: Petr Mladek Closes: https://lore.kernel.org/r/ZHCn4hNxFpY5-9Ki@alley Signed-off-by: Douglas Anderson --- include/linux/nmi.h | 6 -- kernel/watchdog.c | 30 -- 2 files changed, 20 insertions(+), 16 del

[PATCH 02/10] watchdog/hardlockup: HAVE_NMI_WATCHDOG must implement watchdog_hardlockup_probe()

2023-05-26 Thread Douglas Anderson
by: Petr Mladek Signed-off-by: Douglas Anderson --- Though this does fix a minor bug, I didn't mark this as "Fixes" because it's super minor. One could also argue that this wasn't a bug at all but simply was never an implemented feature. The code that added some amount

[PATCH v5 17/18] arm64: add hw_nmi_get_sample_period for preparation of lockup detector

2023-05-19 Thread Douglas Anderson
arg Co-developed-by: Pingfan Liu Signed-off-by: Pingfan Liu Signed-off-by: Lecopzer Chen Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my series just to make it easier to avoid conflicts between my series and the one adding the arm64 perf hardlockup detec

[PATCH v5 16/18] watchdog/perf: Adapt the watchdog_perf interface for async model

2023-05-19 Thread Douglas Anderson
hen Suggested-by: Petr Mladek Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my series just to make it easier to avoid conflicts between my series and the one adding the arm64 perf hardlockup detector, in case someone wanted to test them both together. As part

[PATCH v5 15/18] watchdog/perf: Add a weak function for an arch to detect if perf can use NMIs

2023-05-19 Thread Douglas Anderson
On arm64, NMI support needs to be detected at runtime. Add a weak function to the perf hardlockup detector so that an architecture can implement it to detect whether NMIs are available. Signed-off-by: Douglas Anderson --- While I won't object to this patch landing, I consider it part o

[PATCH v5 14/18] watchdog/hardlockup: detect hard lockups using secondary (buddy) CPUs

2023-05-19 Thread Douglas Anderson
arm-kernel/20220903093415.15850-1-lecopzer.c...@mediatek.com/ Signed-off-by: Colin Cross Signed-off-by: Matthias Kaehlcke Signed-off-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Signed-off-by: Douglas Anderson --- This patch has been rebased in ChromeOS kernel trees many times, and each time

[PATCH v5 13/18] watchdog/hardlockup: Have the perf hardlockup use __weak functions more cleanly

2023-05-19 Thread Douglas Anderson
we tried to add the buddy lockup detector which was not arch-specific but wanted to hook into those same functions. This is not expected to have any functional impact. Reviewed-by: Petr Mladek Signed-off-by: Douglas Anderson --- (no changes since v4) Changes in v4: - ("Have the perf ha

[PATCH v5 12/18] watchdog/hardlockup: Rename some "NMI watchdog" constants/function

2023-05-19 Thread Douglas Anderson
or, which isn't using NMIs. As part of this, we sanitized a few names for consistency. Signed-off-by: Douglas Anderson --- Changes in v5: - Found a few more names / comments to change. - Tried to make names more consistent as per v4 feedback. Changes in v4: - ("Rename some "NMI wa

[PATCH v5 11/18] watchdog/hardlockup: Move perf hardlockup watchdog petting to watchdog.c

2023-05-19 Thread Douglas Anderson
that the CPU we're running on might be different than the one we're checking. Currently the code in watchdog.c is guarded by CONFIG_HARDLOCKUP_DETECTOR_PERF, which makes this change seem silly. However, a future patch will change this. Signed-off-by: Douglas Anderson --- Changes in v

[PATCH v5 10/18] watchdog/hardlockup: Add a "cpu" param to watchdog_hardlockup_check()

2023-05-19 Thread Douglas Anderson
ted hrtimer_interrupts_saved, however, because we end up petting all affected CPUs to make sure the new and old CPU can't end up somehow read/write hrtimer_interrupts_saved at the same time. Signed-off-by: Douglas Anderson --- Changes in v5: - Don't dump stack on the buddy CPU if we f

[PATCH v5 09/18] watchdog/hardlockup: Style changes to watchdog_hardlockup_check() / is_hardlockup()

2023-05-19 Thread Douglas Anderson
returns since it seemed more symmetric. Reviewed-by: Petr Mladek Signed-off-by: Douglas Anderson --- Changes in v5: - watchdog_hardlockup_dumped_stacks => watchdog_hardlockup_all_cpu_dumped - watchdog_hardlockup_processed => watchdog_hardlockup_warned Changes in v4: - ("Style ch

[PATCH v5 08/18] watchdog/hardlockup: Move perf hardlockup checking/panic to common watchdog.c

2023-05-19 Thread Douglas Anderson
d as well. This change is expected to be a no-op. Signed-off-by: Douglas Anderson --- Changes in v5: - watchdog_hardlockup_interrupt_count() => watchdog_hardlockup_kick() - watchdog_hardlockup_is_lockedup() => is_hardlockup() Changes in v4: - ("Move perf hardlockup checking/panic ...&

[PATCH v5 07/18] watchdog/perf: Rename watchdog_hld.c to watchdog_perf.c

2023-05-19 Thread Douglas Anderson
ewed-by: Petr Mladek Signed-off-by: Douglas Anderson --- (no changes since v4) Changes in v4: - ("Rename watchdog_hld.c to watchdog_perf.c") new for v4. kernel/Makefile| 2 +- kernel/{watchdog_hld.c => watchdog_perf.c} | 2 +- 2 files changed

[PATCH v5 06/18] watchdog/hardlockup: Add comments to touch_nmi_watchdog()

2023-05-19 Thread Douglas Anderson
x27;d like to rename these functions but that is a fairly disruptive change touching a lot of drivers. After discussion [1] the plan is to defer this until a good time. [1] https://lore.kernel.org/r/ZFy0TX1tfhlH8gxj@alley Signed-off-by: Douglas Anderson --- Changes in v5: - No lon

[PATCH v5 05/18] watchdog/perf: Ensure CPU-bound context when creating hardlockup detector event

2023-05-19 Thread Douglas Anderson
to prevent mistakes when calling the code in another code path. Signed-off-by: Pingfan Liu Co-developed-by: Lecopzer Chen Signed-off-by: Lecopzer Chen Reviewed-by: Petr Mladek Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my series just to make it

[PATCH v5 04/18] watchdog/hardlockup: change watchdog_nmi_enable() to void

2023-05-19 Thread Douglas Anderson
From: Lecopzer Chen Nobody cares about the return value of watchdog_nmi_enable(), changing its prototype to void. Signed-off-by: Pingfan Liu Signed-off-by: Lecopzer Chen Reviewed-by: Petr Mladek Acked-by: Nicholas Piggin Signed-off-by: Douglas Anderson --- I yanked this patch from the

[PATCH v5 03/18] watchdog: remove WATCHDOG_DEFAULT

2023-05-19 Thread Douglas Anderson
From: Lecopzer Chen No reference to WATCHDOG_DEFAULT, remove it. Signed-off-by: Pingfan Liu Signed-off-by: Lecopzer Chen Reviewed-by: Petr Mladek Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my series just to make it easier to avoid conflicts

[PATCH v5 02/18] watchdog/perf: More properly prevent false positives with turbo modes

2023-05-19 Thread Douglas Anderson
itives with turbo modes") Signed-off-by: Douglas Anderson --- Changes in v5: - ("More properly prevent false ...") promoted to its own patch for v5. kernel/watchdog_hld.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld

[PATCH v5 00/18] watchdog/hardlockup: Add the buddy hardlockup detector

2023-05-19 Thread Douglas Anderson
into my series for v4. - Pulled ("change watchdog_nmi_enable() to void") into my series for v4. - Pulled ("remove WATCHDOG_DEFAULT") into my series for v4. - Reworked atop a whole pile of cleanups, as suggested by Petr. Changes in v3: - Added a note in commit message about the ef

[PATCH v5 01/18] watchdog/perf: Define dummy watchdog_update_hrtimer_threshold() on correct config

2023-05-19 Thread Douglas Anderson
xes: 7edaeb6841df ("kernel/watchdog: Prevent false positives with turbo modes") Reviewed-by: Nicholas Piggin Reviewed-by: Petr Mladek Signed-off-by: Douglas Anderson --- Changes in v5: - Add Nicholas's explanation of why this didn't break builds. - watchdog_hardlockup_perf.c

[PATCH v4 17/17] arm64: Enable perf events based hard lockup detector

2023-05-04 Thread Douglas Anderson
initialized. Co-developed-by: Sumit Garg Signed-off-by: Sumit Garg Co-developed-by: Pingfan Liu Signed-off-by: Pingfan Liu Signed-off-by: Lecopzer Chen Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my series just to make it easier to avoid conflicts

[PATCH v4 16/17] arm64: add hw_nmi_get_sample_period for preparation of lockup detector

2023-05-04 Thread Douglas Anderson
arg Co-developed-by: Pingfan Liu Signed-off-by: Pingfan Liu Signed-off-by: Lecopzer Chen Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my series just to make it easier to avoid conflicts between my series and the one adding the arm64 perf hardlockup detec

[PATCH v4 15/17] watchdog/perf: Adapt the watchdog_perf interface for async model

2023-05-04 Thread Douglas Anderson
hen Suggested-by: Petr Mladek Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my series just to make it easier to avoid conflicts between my series and the one adding the arm64 perf hardlockup detector, in case someone wanted to test them both together. As part

[PATCH v4 14/17] watchdog/perf: Add a weak function for an arch to detect if perf can use NMIs

2023-05-04 Thread Douglas Anderson
On arm64, NMI support needs to be detected at runtime. Add a weak function to the perf hardlockup detector so that an architecture can implement it to detect whether NMIs are available. Signed-off-by: Douglas Anderson --- While I won't object to this patch landing, I consider it part o

[PATCH v4 13/17] watchdog/hardlockup: detect hard lockups using secondary (buddy) CPUs

2023-05-04 Thread Douglas Anderson
ps://lore.kernel.org/linux-arm-kernel/20220903093415.15850-1-lecopzer.c...@mediatek.com/ Signed-off-by: Colin Cross Signed-off-by: Matthias Kaehlcke Signed-off-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Signed-off-by: Douglas Anderson --- This patch has been rebased in ChromeOS kernel trees many

[PATCH v4 12/17] watchdog/hardlockup: Have the perf hardlockup use __weak functions more cleanly

2023-05-04 Thread Douglas Anderson
we tried to add the buddy lockup detector which was not arch-specific but wanted to hook into those same functions. This is not expected to have any functional impact. Signed-off-by: Douglas Anderson --- Changes in v4: - ("Have the perf hardlockup use __weak ...") new for v4. includ

[PATCH v4 11/17] watchdog/hardlockup: Rename some "NMI watchdog" constants/function

2023-05-04 Thread Douglas Anderson
x27;t using NMIs. Signed-off-by: Douglas Anderson --- Changes in v4: - ("Rename some "NMI watchdog" constants/function ...") new for v4. arch/powerpc/include/asm/nmi.h| 4 +- arch/powerpc/kernel/watchdog.c| 12 ++--- arch/powerpc/platforms/pseries

[PATCH v4 10/17] watchdog/hardlockup: Move perf hardlockup watchdog petting to watchdog.c

2023-05-04 Thread Douglas Anderson
pets super fast. The new behavior of handling super-fast perf before clearing watchdog pets seems better. Signed-off-by: Douglas Anderson --- Changes in v4: - ("Move perf hardlockup watchdog petting to watchdog.c") new for v4. include/linux/nmi.h| 5 +++-

[PATCH v4 09/17] watchdog/hardlockup: Add a "cpu" param to watchdog_hardlockup_check()

2023-05-04 Thread Douglas Anderson
In preparation for the buddy hardlockup detector where the CPU checking for lockup might not be the currently running CPU, add a "cpu" parameter to watchdog_hardlockup_check(). Signed-off-by: Douglas Anderson --- Changes in v4: - ("Add a "cpu" param to watchdog_hardlo

[PATCH v4 08/17] watchdog/hardlockup: Style changes to watchdog_hardlockup_check() / ..._is_lockedup()

2023-05-04 Thread Douglas Anderson
rns since it seemed more symmetric. Signed-off-by: Douglas Anderson --- Changes in v4: - ("Style changes to watchdog_hardlockup_check ...") new for v4. kernel/watchdog.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/kernel/wat

[PATCH v4 07/17] watchdog/hardlockup: Move perf hardlockup checking/panic to common watchdog.c

2023-05-04 Thread Douglas Anderson
ounting to only be there if the perf hardlockup detector is configured as well. This change is expected to be a no-op. Signed-off-by: Douglas Anderson --- Changes in v4: - ("Move perf hardlockup checking/panic ...") new for v4. include/linux/nmi.h| 5 ++- kernel/watchdog.c

[PATCH v4 06/17] watchdog/perf: Rename watchdog_hld.c to watchdog_perf.c

2023-05-04 Thread Douglas Anderson
f. It could be argued that the new name makes it less obvious that this is a hardlockup detector. While true, it's not hard to remember that the "perf" detector is always a hardlockup detector and it's nice not to have names that are too convoluted. Signed-off-by: Douglas Ander

[PATCH v4 05/17] watchdog/hardlockup: Rename touch_nmi_watchdog() to touch_hardlockup_watchdog()

2023-05-04 Thread Douglas Anderson
ned-off-by: Douglas Anderson --- Changes in v4: - ("Rename touch_nmi_watchdog() to ...") new for v4. include/linux/nmi.h | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 454fe99c4874..35d09

[PATCH v4 04/17] watchdog/perf: Ensure CPU-bound context when creating hardlockup detector event

2023-05-04 Thread Douglas Anderson
to prevent mistakes when calling the code in another code path. Signed-off-by: Pingfan Liu Co-developed-by: Lecopzer Chen Signed-off-by: Lecopzer Chen Reviewed-by: Petr Mladek Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my series just to make it

[PATCH v4 03/17] watchdog/hardlockup: change watchdog_nmi_enable() to void

2023-05-04 Thread Douglas Anderson
From: Lecopzer Chen Nobody cares about the return value of watchdog_nmi_enable(), changing its prototype to void. Signed-off-by: Pingfan Liu Signed-off-by: Lecopzer Chen Reviewed-by: Petr Mladek Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my

[PATCH v4 02/17] watchdog: remove WATCHDOG_DEFAULT

2023-05-04 Thread Douglas Anderson
From: Lecopzer Chen No reference to WATCHDOG_DEFAULT, remove it. Signed-off-by: Pingfan Liu Signed-off-by: Lecopzer Chen Reviewed-by: Petr Mladek Signed-off-by: Douglas Anderson --- I yanked this patch from the mailing lists [1] into my series just to make it easier to avoid conflicts

[PATCH v4 01/17] watchdog/perf: Define dummy watchdog_update_hrtimer_threshold() on correct config

2023-05-04 Thread Douglas Anderson
hat quite right. While this doesn't appear to be a huge deal, it's nice to make it consistent. Fixes: 7edaeb6841df ("kernel/watchdog: Prevent false positives with turbo modes") Signed-off-by: Douglas Anderson --- Changes in v4: - ("Define dummy watchdog_update_hrtimer

[PATCH v4 00/17] watchdog/hardlockup: Add the buddy hardlockup detector

2023-05-04 Thread Douglas Anderson
LT") into my series for v4. - Reworked atop a whole pile of cleanups, as suggested by Petr. Changes in v3: - Added a note in commit message about the effect on idle. - Cleaned up commit message pros/cons to be complete sentences. - More cpu => CPU (in Kconfig and comments). - No code changes

[PATCH v8 00/10] arm64: Add framework to turn an IPI as NMI

2023-04-20 Thread Douglas Anderson
db_nmicallback() if !CONFIG_KGDB" new for v8 - "Fallback to a regular IPI if NMI isn't enabled" new for v8 Douglas Anderson (3): arm64: idle: Tag the arm64 idle functions as __cpuidle kgdb: Provide a stub kgdb_nmicallback() if !CONFIG_KGDB arm64: ipi_nmi: Fallback to a regul

[PATCH v8 04/10] nmi: backtrace: Allow runtime arch specific override

2023-04-19 Thread Douglas Anderson
arm64 supporting pseudo NMIs feature which is only available on platforms which have support for GICv3 or later version. Signed-off-by: Sumit Garg Tested-by: Chen-Yu Tsai Signed-off-by: Douglas Anderson --- Changes in v8: - Add loongarch support, too arch/arm/include/asm/irq.h | 2

[REPOST PATCH v6 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-12-04 Thread Douglas Anderson
try to round it up again and potentially hang when we try to grab the csd lock. That's not new behavior but we'll still try to do better in a future patch. Suggested-by: Daniel Thompson Signed-off-by: Douglas Anderson Cc: Vineet Gupta Cc: Russell King Cc: Catalin Marinas Cc: Will

[REPOST PATCH v6 1/4] kgdb: Remove irq flags from roundup

2018-12-04 Thread Douglas Anderson
st did local_irq_enable() and local_irq_disable() without looking at them. So we can definitely remove the flags. Signed-off-by: Douglas Anderson Cc: Vineet Gupta Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Richard Kuo Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Be

[REPOST PATCH v6 0/4] kgdb: Fix kgdb_roundup_cpus()

2018-12-04 Thread Douglas Anderson
ce on a cpu that didn't round up new for v3. Changes in v2: - Removing irq flags separated from fixing lockdep splat. - Don't use smp_call_function (Daniel). Douglas Anderson (4): kgdb: Remove irq flags from roundup kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_functio

[PATCH v6 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-11-27 Thread Douglas Anderson
try to round it up again and potentially hang when we try to grab the csd lock. That's not new behavior but we'll still try to do better in a future patch. Suggested-by: Daniel Thompson Signed-off-by: Douglas Anderson --- Changes in v6: - Moved smp_call_function_single_async() erro

[PATCH v6 1/4] kgdb: Remove irq flags from roundup

2018-11-27 Thread Douglas Anderson
st did local_irq_enable() and local_irq_disable() without looking at them. So we can definitely remove the flags. Signed-off-by: Douglas Anderson Acked-by: Will Deacon --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: - Removing irq flags separated from

[PATCH v6 0/4] kgdb: Fix kgdb_roundup_cpus()

2018-11-27 Thread Douglas Anderson
n v2: - Removing irq flags separated from fixing lockdep splat. - Don't use smp_call_function (Daniel). Douglas Anderson (4): kgdb: Remove irq flags from roundup kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() kgdb: Don't round up a CPU that failed rounding

[PATCH v5 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-11-26 Thread Douglas Anderson
try to round it up again and potentially hang when we try to grab the csd lock. That's not new behavior but we'll still try to do better in a future patch. Suggested-by: Daniel Thompson Signed-off-by: Douglas Anderson --- Changes in v5: - Add a comment about get_irq_regs(). - get_c

[PATCH v5 1/4] kgdb: Remove irq flags from roundup

2018-11-26 Thread Douglas Anderson
st did local_irq_enable() and local_irq_disable() without looking at them. So we can definitely remove the flags. Signed-off-by: Douglas Anderson Acked-by: Will Deacon --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: - Removing irq flags separated from fixing lockdep

[PATCH v5 0/4] kgdb: Fix kgdb_roundup_cpus()

2018-11-26 Thread Douglas Anderson
uot;failed to roundup" case. - Document the ignored parameter. - Don't round up a CPU that failed rounding up before new for v3. - Don't back trace on a cpu that didn't round up new for v3. Changes in v2: - Removing irq flags separated from fixing lockdep splat. - Don't use

[PATCH v4 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-11-12 Thread Douglas Anderson
try to round it up again and potentially hang when we try to grab the csd lock. That's not new behavior but we'll still try to do better in a future patch. Suggested-by: Daniel Thompson Signed-off-by: Douglas Anderson --- Changes in v4: None Changes in v3: - No separate init call. - D

[PATCH v4 1/4] kgdb: Remove irq flags from roundup

2018-11-12 Thread Douglas Anderson
st did local_irq_enable() and local_irq_disable() without looking at them. So we can definitely remove the flags. Signed-off-by: Douglas Anderson --- Changes in v4: None Changes in v3: None Changes in v2: - Removing irq flags separated from fixing lockdep splat. arch/arc/kernel/kgdb.c | 2 +- ar

[PATCH v4 0/4] kgdb: Fix kgdb_roundup_cpus()

2018-11-12 Thread Douglas Anderson
Changes in v2: - Removing irq flags separated from fixing lockdep splat. - Don't use smp_call_function (Daniel). Douglas Anderson (4): kgdb: Remove irq flags from roundup kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() kgdb: Don't round up a CPU that failed roun

[PATCH v3 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-11-06 Thread Douglas Anderson
try to round it up again and potentially hang when we try to grab the csd lock. That's not new behavior but we'll still try to do better in a future patch. Suggested-by: Daniel Thompson Signed-off-by: Douglas Anderson --- Changes in v3: - No separate init call. - Don't round

[PATCH v3 1/4] kgdb: Remove irq flags from roundup

2018-11-06 Thread Douglas Anderson
st did local_irq_enable() and local_irq_disable() without looking at them. So we can definitely remove the flags. Signed-off-by: Douglas Anderson --- Changes in v3: None Changes in v2: - Removing irq flags separated from fixing lockdep splat. arch/arc/kernel/kgdb.c | 2 +- arch/arm/kernel/kgdb.c

[PATCH v3 0/4] kgdb: Fix kgdb_roundup_cpus()

2018-11-06 Thread Douglas Anderson
irq flags separated from fixing lockdep splat. - Removing irq flags separated from fixing lockdep splat. - Don't use smp_call_function (Daniel). Douglas Anderson (4): kgdb: Remove irq flags from roundup kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() kgdb: Don

[PATCH v2 2/2] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-10-30 Thread Douglas Anderson
to. Specifically: * For arch/arc we passed NULL to kgdb_nmicallback() instead of get_irq_regs(). * For arch/mips there was a bit of extra code around kgdb_nmicallback() Suggested-by: Daniel Thompson Signed-off-by: Douglas Anderson --- Changes in v2: - Removing irq flags separated fr

[PATCH v2 1/2] kgdb: Remove irq flags from roundup

2018-10-30 Thread Douglas Anderson
st did local_irq_enable() and local_irq_disable() without looking at them. So we can definitely remove the flags. Signed-off-by: Douglas Anderson --- Changes in v2: - Removing irq flags separated from fixing lockdep splat. arch/arc/kernel/kgdb.c | 2 +- arch/arm/kernel/kgdb.c | 2 +- arch

[PATCH v2 0/2] kgdb: Fix kgdb_roundup_cpus()

2018-10-30 Thread Douglas Anderson
separated from fixing lockdep splat. - Don't use smp_call_function (Daniel). Douglas Anderson (2): kgdb: Remove irq flags from roundup kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() arch/arc/kernel/kgdb.c | 10 ++ arch/arm/kernel/kgdb.c | 12

[PATCH 0/7] serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb

2018-10-29 Thread Douglas Anderson
d. If folks are OK w/ the 'smp' patch it probably should go in some core kernel tree. The kgdb patch won't work without it, though, so to land that we'd need coordination between the folks landing that and the folks landing the 'smp' patch. Douglas Anderson (7): se

[PATCH 7/7] kgdb: Remove irq flags and local_irq_enable/disable from roundup

2018-10-29 Thread Douglas Anderson
le() calls from all of the kgdb_roundup_cpus() calls. Signed-off-by: Douglas Anderson --- arch/arc/kernel/kgdb.c | 4 +--- arch/arm/kernel/kgdb.c | 4 +--- arch/arm64/kernel/kgdb.c | 4 +--- arch/hexagon/kernel/kgdb.c | 11 ++- arch/mips/kernel/kgdb.c| 4 +--- arch/p

[PATCH 6/7] smp: Don't yell about IRQs disabled in kgdb_roundup_cpus()

2018-10-29 Thread Douglas Anderson
with a deadlock of its own. Signed-off-by: Douglas Anderson --- kernel/smp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/smp.c b/kernel/smp.c index 163c451af42e..bb581e58c8dc 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -19,6 +19,7 @@ #include #include