From: slash.tmp@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 2/3] PCI: Add tango PCIe host bridge support
Date: Tue, 4 Jul 2017 17:18:33 +0200 [thread overview]
Message-ID: <d64a48bd-c593-2f0e-e4e9-8863fba38176@free.fr> (raw)
In-Reply-To: <20170704142758.GB7287@worktop>
On 04/07/2017 16:27, Peter Zijlstra wrote:
> Mason wrote:
>
>> if (IS_ENABLED(CONFIG_DEBUG_PREEMPT) && in_atomic_preempt_off()) {
>> pr_err("Preemption disabled at:");
>> print_ip_sym(preempt_disable_ip);
>> pr_cont("\n");
>> }
>>
>> BTW, why didn't print_ip_sym(preempt_disable_ip); say
>> where preemption had been disabled?
>
> It does, but it might be non-obvious. We only store the first 0->!0
> transition IP in there.
The output was:
[ 1.079483] Preemption disabled at:[ 1.082820] [< (null)>] (null)
so preempt_disable_ip was NULL, right?
Has it been already clobbered?
>> Here's the high-level view. My HW is borked and muxes
>> config space and mem space. So I need a way to freeze
>> the entire system, make the config space access, and
>> then return the system to normal. (AFAICT, config space
>> accesses are rare, so if I kill performance for these
>> accesses, the system might remain usable.)
>>
>> Is there a way to do this? Mark suggested stop_machine
>> but it seems using it in my situation is not quite
>> straight-forward.
>
> *groan*... so yeah, broken hardware demands crazy stuff... stop machine
> is tricky here because I'm not sure we can demand all PCI accessors to
> allow sleeping.
>
> And given that PCI lock is irqsave, we can't even assume IRQs are
> enabled.
>
> Does your platform have NMIs? If so, you can do yuck things like the
> kgdb sync. NMI IPI all other CPUs and have them spin-wait on your state.
>
> Then be careful not to deadlock when two CPUs do that concurrently.
My platform is arch/arm/mach-tango (Cortex A9, ARMv7-A)
This looks similar to what you described:
https://www.linaro.org/blog/core-dump/debugging-arm-kernels-using-nmifiq/
(I CCed Daniel Thompson)
Quote article:
> Note: On ARMv7-A devices that have security extensions (TrustZone)
> FIQ can only be used by the kernel if it is possible to run Linux in
> secure mode. It is therefore not possible to exploit FIQ for
> debugging and run a secure monitor simultaneously. At the end of this
> blog post we will discuss potential future work to mitigate this
> problem.
On my platform, Linux runs in non-secure mode...
Sounds like I don't have many options left for this driver :-(
Regards.
next prev parent reply other threads:[~2017-07-04 15:18 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 8:12 [PATCH v9 0/3] Tango PCIe controller support Marc Gonzalez
2017-06-20 8:14 ` [PATCH v9 1/3] PCI: Add DT binding for tango PCIe controller Marc Gonzalez
2017-06-20 8:17 ` [PATCH v9 2/3] PCI: Add tango PCIe host bridge support Marc Gonzalez
2017-07-02 23:18 ` Bjorn Helgaas
2017-07-03 9:35 ` Ard Biesheuvel
2017-07-03 13:27 ` Bjorn Helgaas
2017-07-04 6:58 ` Jisheng Zhang
2017-07-04 7:16 ` Jisheng Zhang
2017-07-04 8:02 ` Ard Biesheuvel
2017-07-04 8:19 ` Jisheng Zhang
2017-07-04 9:38 ` Ard Biesheuvel
2017-07-05 13:53 ` Joao Pinto
2017-07-03 9:54 ` Marc Gonzalez
2017-07-03 13:40 ` Bjorn Helgaas
2017-07-03 14:34 ` Marc Gonzalez
2017-07-04 15:58 ` Bjorn Helgaas
2017-07-04 23:42 ` Mason
2017-07-03 18:11 ` Russell King - ARM Linux
2017-07-03 18:44 ` Ard Biesheuvel
2017-07-04 15:15 ` Bjorn Helgaas
2017-07-04 18:17 ` Russell King - ARM Linux
2017-07-04 23:59 ` Mason
2017-07-05 5:21 ` Greg Kroah-Hartman
2017-07-05 12:33 ` Mark Brown
[not found] ` <e57debab-3457-1d9c-a72e-ecdf7d4f742e@sigmadesigns.com>
2017-07-03 15:30 ` Marc Gonzalez
2017-07-04 7:09 ` Peter Zijlstra
2017-07-04 13:08 ` Mason
2017-07-04 14:27 ` Peter Zijlstra
2017-07-04 15:18 ` Mason [this message]
2017-06-20 8:18 ` [PATCH v9 3/3] PCI: Add tango MSI controller support Marc Gonzalez
2017-07-04 20:24 ` [PATCH v9 0/3] Tango PCIe " Bjorn Helgaas
2017-07-04 22:55 ` Mason
2017-07-05 18:03 ` Bjorn Helgaas
2017-07-05 20:39 ` Mason
2017-07-05 21:34 ` Bjorn Helgaas
2017-07-05 21:59 ` Mason
2017-07-06 3:39 ` Bjorn Helgaas
2017-07-06 12:26 ` Mason
2017-07-06 12:40 ` Marc Zyngier
2017-07-06 19:46 ` Bjorn Helgaas
2017-07-07 9:55 ` Marc Gonzalez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d64a48bd-c593-2f0e-e4e9-8863fba38176@free.fr \
--to=slash.tmp@free.fr \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox