All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suzuki K Poulose <Suzuki.Poulose@arm.com>
To: Julien Thierry <julien.thierry@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: mark.rutland@arm.com, marc.zyngier@arm.com, james.morse@arm.com,
	daniel.thompson@linaro.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH v2 1/6] arm64: cpufeature: Allow early detect of specific features
Date: Mon, 22 Jan 2018 15:34:03 +0000	[thread overview]
Message-ID: <8796d5da-8d0f-5c60-619a-40b471433988@arm.com> (raw)
In-Reply-To: <8e65a2e4-4058-1711-605d-481c0cb57e1c@arm.com>

On 22/01/18 15:23, Julien Thierry wrote:
> 
> 
> On 22/01/18 15:13, Suzuki K Poulose wrote:
>> On 22/01/18 15:01, Julien Thierry wrote:
>>>
>>>
>>> On 22/01/18 14:45, Suzuki K Poulose wrote:
>>>> On 22/01/18 12:21, Julien Thierry wrote:
>>>>>
>>>>>
>>>>> On 22/01/18 12:05, Suzuki K Poulose wrote:
>>>>>> On 17/01/18 11:54, Julien Thierry wrote:
>>>>>>> From: Daniel Thompson <daniel.thompson@linaro.org>

>>>>>> Julien,
>>>>>>
>>>>>> One potential problem with this is that we don't have a way
>>>>>> to make this work on a "theoretical" system with and without
>>>>>> GIC system reg interface. i.e, if we don't have the CONFIG
>>>>>> enabled for using ICC system regs for IRQ flags, the kernel
>>>>>> could still panic. I understand this is not a "normal" configuration
>>>>>> but, may be we could make the panic option based on whether
>>>>>> we actually use the system regs early enough ?
>>>>>>
>>>>>
>>>>> I see, however I'm not sure what happens in the GIC drivers if we have a CPU running with a GICv3 and other CPUs with something else... But of course this is not technically limited by the arm64 capabilities handling.
>>>>>
>>>>> What behaviour would you be looking for? A way to prevent the CPU to be brought up instead of panicking?
>>>>>
>>>>
>>>> If we have the CONFIG enabled for using system regs, we can continue
>>>> to panic the system. Otherwise, we should ignore the mismatch early,
>>>> as we don't use the system register access unless all boot time active
>>>> CPUs have it.
>>>>
>>>
>>> Hmmm, we use the CPUIF (if available) in the first CPU pretty much as soon as we re-enable interrupts in the GICv3 driver, which is way before the other CPUs are brought up.
>>
>> Isn't this CPUIF access an alternative, patched only when CPUIF feature
>> enabled ? (which is done only after all the allowed SMP CPUs are brought up )
> 
> The GICv3 doesn't rely on the alternatives, most of the operations are done via the CPUIF (ack IRQ, eoi, send sgi, etc ...).
> 
> So once GICv3 has been successfully probed and interrupts enabled, CPUIF might get used by the GICv3 driver.
> 

Aha, OK. I am sorry. I was thinking that the ARM64_HAS_SYSREG_GIC_CPUIF was used just for that.
In that case, I think you are not breaking any current behavior, so thats fine.

>>>
>>> other CPUs get to die_early().
>>
>> Really ? I thought only late CPUs are sent to die_early().
> 
> Hmmm, I might be wrong here but that was my understanding of the call to verify_local_cpu_features in verify_local_cpu_capabilities.
> 

The verify_local_cpu_features() is invoked only if the CPU is brought up late from userspace,
after we have finalised the system wide capabilities.

Sorry for the noise.

Suzuki

WARNING: multiple messages have this Message-ID (diff)
From: Suzuki.Poulose@arm.com (Suzuki K Poulose)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/6] arm64: cpufeature: Allow early detect of specific features
Date: Mon, 22 Jan 2018 15:34:03 +0000	[thread overview]
Message-ID: <8796d5da-8d0f-5c60-619a-40b471433988@arm.com> (raw)
In-Reply-To: <8e65a2e4-4058-1711-605d-481c0cb57e1c@arm.com>

On 22/01/18 15:23, Julien Thierry wrote:
> 
> 
> On 22/01/18 15:13, Suzuki K Poulose wrote:
>> On 22/01/18 15:01, Julien Thierry wrote:
>>>
>>>
>>> On 22/01/18 14:45, Suzuki K Poulose wrote:
>>>> On 22/01/18 12:21, Julien Thierry wrote:
>>>>>
>>>>>
>>>>> On 22/01/18 12:05, Suzuki K Poulose wrote:
>>>>>> On 17/01/18 11:54, Julien Thierry wrote:
>>>>>>> From: Daniel Thompson <daniel.thompson@linaro.org>

>>>>>> Julien,
>>>>>>
>>>>>> One potential problem with this is that we don't have a way
>>>>>> to make this work on a "theoretical" system with and without
>>>>>> GIC system reg interface. i.e, if we don't have the CONFIG
>>>>>> enabled for using ICC system regs for IRQ flags, the kernel
>>>>>> could still panic. I understand this is not a "normal" configuration
>>>>>> but, may be we could make the panic option based on whether
>>>>>> we actually use the system regs early enough ?
>>>>>>
>>>>>
>>>>> I see, however I'm not sure what happens in the GIC drivers if we have a CPU running with a GICv3 and other CPUs with something else... But of course this is not technically limited by the arm64 capabilities handling.
>>>>>
>>>>> What behaviour would you be looking for? A way to prevent the CPU to be brought up instead of panicking?
>>>>>
>>>>
>>>> If we have the CONFIG enabled for using system regs, we can continue
>>>> to panic the system. Otherwise, we should ignore the mismatch early,
>>>> as we don't use the system register access unless all boot time active
>>>> CPUs have it.
>>>>
>>>
>>> Hmmm, we use the CPUIF (if available) in the first CPU pretty much as soon as we re-enable interrupts in the GICv3 driver, which is way before the other CPUs are brought up.
>>
>> Isn't this CPUIF access an alternative, patched only when CPUIF feature
>> enabled ? (which is done only after all the allowed SMP CPUs are brought up )
> 
> The GICv3 doesn't rely on the alternatives, most of the operations are done via the CPUIF (ack IRQ, eoi, send sgi, etc ...).
> 
> So once GICv3 has been successfully probed and interrupts enabled, CPUIF might get used by the GICv3 driver.
> 

Aha, OK. I am sorry. I was thinking that the ARM64_HAS_SYSREG_GIC_CPUIF was used just for that.
In that case, I think you are not breaking any current behavior, so thats fine.

>>>
>>> other CPUs get to die_early().
>>
>> Really ? I thought only late CPUs are sent to die_early().
> 
> Hmmm, I might be wrong here but that was my understanding of the call to verify_local_cpu_features in verify_local_cpu_capabilities.
> 

The verify_local_cpu_features() is invoked only if the CPU is brought up late from userspace,
after we have finalised the system wide capabilities.

Sorry for the noise.

Suzuki

  reply	other threads:[~2018-01-22 15:34 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 11:54 [PATCH v2 0/6] arm64: provide pseudo NMI with GICv3 Julien Thierry
2018-01-17 11:54 ` Julien Thierry
2018-01-17 11:54 ` [PATCH v2 1/6] arm64: cpufeature: Allow early detect of specific features Julien Thierry
2018-01-17 11:54   ` Julien Thierry
2018-01-22 12:05   ` Suzuki K Poulose
2018-01-22 12:05     ` Suzuki K Poulose
2018-01-22 12:21     ` Julien Thierry
2018-01-22 12:21       ` Julien Thierry
2018-01-22 13:38       ` Daniel Thompson
2018-01-22 13:38         ` Daniel Thompson
2018-01-22 13:57         ` Marc Zyngier
2018-01-22 13:57           ` Marc Zyngier
2018-01-22 14:14           ` Julien Thierry
2018-01-22 14:14             ` Julien Thierry
2018-01-22 14:20             ` Marc Zyngier
2018-01-22 14:20               ` Marc Zyngier
2018-01-22 14:45       ` Suzuki K Poulose
2018-01-22 14:45         ` Suzuki K Poulose
2018-01-22 15:01         ` Julien Thierry
2018-01-22 15:01           ` Julien Thierry
2018-01-22 15:13           ` Suzuki K Poulose
2018-01-22 15:13             ` Suzuki K Poulose
2018-01-22 15:23             ` Julien Thierry
2018-01-22 15:23               ` Julien Thierry
2018-01-22 15:34               ` Suzuki K Poulose [this message]
2018-01-22 15:34                 ` Suzuki K Poulose
2018-01-17 11:54 ` [PATCH v2 2/6] arm64: alternative: Apply alternatives early in boot process Julien Thierry
2018-01-17 11:54   ` Julien Thierry
2018-05-04 10:06   ` Julien Thierry
2018-05-04 10:06     ` Julien Thierry
2018-05-09 14:27     ` Daniel Thompson
2018-05-09 14:27       ` Daniel Thompson
2018-05-09 21:52     ` Suzuki K Poulose
2018-05-09 21:52       ` Suzuki K Poulose
2018-05-11  8:12       ` Julien Thierry
2018-05-11  8:12         ` Julien Thierry
2018-05-11  9:19         ` Suzuki K Poulose
2018-05-11  9:19           ` Suzuki K Poulose
2018-01-17 11:54 ` [PATCH v2 3/6] arm64: irqflags: Use ICC sysregs to implement IRQ masking Julien Thierry
2018-01-17 11:54   ` Julien Thierry
2018-01-17 11:54 ` [PATCH v2 4/6] irqchip/gic: Add functions to access irq priorities Julien Thierry
2018-01-17 11:54   ` Julien Thierry
2018-01-17 11:54 ` [PATCH v2 5/6] arm64: Detect current view of GIC priorities Julien Thierry
2018-01-17 11:54   ` Julien Thierry
2018-02-03  3:01   ` Yang Yingliang
2018-02-03  3:01     ` Yang Yingliang
2018-01-17 11:54 ` [PATCH v2 6/6] arm64: Add support for pseudo-NMIs Julien Thierry
2018-01-17 11:54   ` Julien Thierry
2018-01-17 12:10 ` [PATCH v2 0/6] arm64: provide pseudo NMI with GICv3 Julien Thierry
2018-01-17 12:10   ` Julien Thierry
2018-04-29  6:37   ` Joel Fernandes
2018-04-29  6:37     ` Joel Fernandes
2018-04-30  9:53     ` Julien Thierry
2018-04-30  9:53       ` Julien Thierry
2018-04-30 10:55       ` Daniel Thompson
2018-04-30 10:55         ` Daniel Thompson
2018-05-01 18:18         ` Joel Fernandes
2018-05-01 18:18           ` Joel Fernandes
2018-05-02 11:02           ` Daniel Thompson
2018-05-02 11:02             ` Daniel Thompson
     [not found] ` <8315db11-7899-008d-f37a-c311b278a1c4@hisilicon.com>
     [not found]   ` <7ec201a4-e2dc-8a1e-e8a1-f2b10bd41cd4@huawei.com>
     [not found]     ` <afb46ee0-4f26-fd1a-2fd1-866dc0b25175@arm.com>
2018-03-27 12:48       ` dongbo (E)
2018-03-27 13:02         ` Marc Zyngier
2018-03-27 13:09         ` Julien Thierry
2018-04-29  6:35 ` Joel Fernandes
2018-04-29  6:35   ` Joel Fernandes
2018-04-30  9:46   ` Julien Thierry
2018-04-30  9:46     ` Julien Thierry
2018-05-01 20:51     ` Joel Fernandes
2018-05-01 20:51       ` Joel Fernandes
2018-05-02 11:08       ` Marc Zyngier
2018-05-02 11:08         ` Marc Zyngier

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=8796d5da-8d0f-5c60-619a-40b471433988@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.thompson@linaro.org \
    --cc=james.morse@arm.com \
    --cc=julien.thierry@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.