Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp655018pxk; Wed, 16 Sep 2020 13:28:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg/+/ljDAK+ZUWbezd1QMXYdZArxrR+sfJbwYetaXtIp+khzGL/yQlW+F24c4LLsvJgQtr X-Received: by 2002:aa7:ce15:: with SMTP id d21mr29552706edv.284.1600288123278; Wed, 16 Sep 2020 13:28:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600288123; cv=none; d=google.com; s=arc-20160816; b=sm08Kd7mdEuOu6Ljftc4pXgLLgSg4WtR7xyhNi3BZHU2QjcANu4pJO2bqy6H6rGjxv U+TYfaCxhCPRTfnhIEMHyZoFy2IDHR/GNy+hmtLpTUw+5DwRDs8pWtnI9kzfLOF60yXh e+KEjZGh5H3cWkO6q6UJFyCHcHwfuzJQcGfoRNOrcvCKCcNPWbT5UbYuzD7ib8P5MdiR p7uGZWSy2d82X7/36QM80maV8xZBjkkX3FVmKvml7BhH7e8gJgdGKG+31rFj0+u1f50x 6WmuLmN5OKcuJhm/gxoO9umJyyBBVpSJwzfq/AcafMFj32NS2nV2cCi+85QRtRmL9nQk glVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=OInfV1VGaZqOky+4sqAk+1JkJLOXjadzDikei1Od4OI=; b=ETS6FpYpk6GfFcWqupXAV0GIVxd7jyVyWiR75zTHpFcWsE4GFKyLT3WDiJGMtDf2SJ UErdYGKJnHuIYVeEH08/br1c5EBIujNoD3zBY4Sgvnoc/mzJIoSPYPVIyLq0siz2w6lh I28jfyufEunmTXEDz1hb52KFK5taNjMaxqTp1nPv6NUPodCCwT4DqHK9Ys9+QkNPHVOo Cgs3dPMRlCLcGmEy2oJtF8YPQh4MtGrr7KQEXUf4HveVxODLKGnqPnC9t/x5QiTu0VZx UE51wvlPMrU+8CUaRbfmPrukiT3owBn+p8rNmn6zsQotfZdWVHKvkD7eTr8zqE6hNfKF 7fxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=Gb4KarHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yr3si6681348ejb.322.2020.09.16.13.28.19; Wed, 16 Sep 2020 13:28:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=Gb4KarHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727658AbgIPUZp (ORCPT + 99 others); Wed, 16 Sep 2020 16:25:45 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:14539 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726878AbgIPR1i (ORCPT ); Wed, 16 Sep 2020 13:27:38 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 16 Sep 2020 08:58:22 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 16 Sep 2020 08:58:34 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 16 Sep 2020 08:58:34 -0700 Received: from [10.26.74.242] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 16 Sep 2020 15:58:22 +0000 Subject: Re: [PATCH v3 08/16] irqchip/gic: Configure SGIs as standard interrupts To: Marc Zyngier CC: Sumit Garg , , "Florian Fainelli" , Russell King , Jason Cooper , Saravana Kannan , Andrew Lunn , Catalin Marinas , Gregory Clement , Bartlomiej Zolnierkiewicz , , "Krzysztof Kozlowski" , Will Deacon , "'Linux Samsung SOC'" , linux-tegra , Thomas Gleixner , , Valentin Schneider , , Marek Szyprowski References: <20200901144324.1071694-1-maz@kernel.org> <20200901144324.1071694-9-maz@kernel.org> <933bc43e-3cd7-10ec-b9ec-58afaa619fb7@nvidia.com> <3378cd07b92e87a24f1db75f708424ee@kernel.org> From: Jon Hunter Message-ID: Date: Wed, 16 Sep 2020 16:58:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1600271902; bh=OInfV1VGaZqOky+4sqAk+1JkJLOXjadzDikei1Od4OI=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=Gb4KarHw3+zcTv/V6iSsJDbvfGwcXVN4lmZsAkeW/bxXJblXfSYu2paCUtH3M18RZ bZwmG2KuON5AniHraV5oygS6tN7yHMYb/78WfizBc+pdEdTMI/8Tglh3muYkqrN5Ss lksxTyfGWT5qBzw+oDcyNKRWoqzJ4OtbfJZPK15CCF2Nf1avZSz5ovP0h2aOSl6SN/ TR+Y7x+9vk2Tx8Hh9eiUD3m28nC7kFhh5r23VCSCv7kWmOgU9s+6VbL0M2s4K+/1zI 0ajW2N0f6Bv8MapUXyl7o3tyOm+HMvZIAVt6eHEndChF1cR6Q6k0VJ0TFl1u5+D4CU Pbd4YSB80xeEQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/09/2020 16:55, Marc Zyngier wrote: > On 2020-09-16 16:46, Jon Hunter wrote: >> On 16/09/2020 16:10, Marc Zyngier wrote: >>> Hi Jon, >>> >>> +Linus, who is facing a similar issue. >>> >>> On 2020-09-16 15:16, Jon Hunter wrote: >>>> Hi Marc, >>>> >>>> On 14/09/2020 14:06, Marek Szyprowski wrote: >>>>> Hi Marc, >>>>> >>>>> On 01.09.2020 16:43, Marc Zyngier wrote: >>>>>> Change the way we deal with GIC SGIs by turning them into proper >>>>>> IRQs, and calling into the arch code to register the interrupt range >>>>>> instead of a callback. >>>>>> >>>>>> Reviewed-by: Valentin Schneider >>>>>> Signed-off-by: Marc Zyngier >>>>> This patch landed in linux next-20200914 as commit ac063232d4b0 >>>>> ("irqchip/gic: Configure SGIs as standard interrupts"). Sadly it >>>>> breaks >>>>> booting of all Samsung Exynos 4210/4412 based boards (dual/quad ARM >>>>> Cortex A9 based). Here are the last lines from the bootlog: >>>> >>>> I am observing the same thing on several Tegra boards (both arm and >>>> arm64). Bisect is pointing to this commit. Reverting this alone does >>>> not >>>> appear to be enough to fix the issue. >>> >>> Right, I am just massively by the GICv3 spec, and failed to remember >>> that ye olde GIC exposes the source CPU in AIR *and* wants it back, >>> while >>> newer GICs deal with that transparently. >>> >>> Can you try the patch below and let me know? >> >> Yes will do. >> >>> @@ -365,14 +354,13 @@ static void __exception_irq_entry >>> gic_handle_irq(struct pt_regs *regs) >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 smp_rmb(); >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 /* >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * Samsung's funky GIC encodes the source CPU in >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * GICC_IAR, leading to the deactivation to fail if >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * not written back as is to GICC_EOI.=C2=A0 Stash the >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * INTID away for gic_eoi_irq() to write back. >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * This only works because we don't nest SGIs... >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * The GIC encodes the source CPU in GICC_IAR, >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * leading to the deactivation to fail if not >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * written back as is to GICC_EOI.=C2=A0 Stash the INTID >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * away for gic_eoi_irq() to write back.=C2=A0 This only >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * works because we don't nest SGIs... >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 */ >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if = (is_frankengic()) >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 set_sgi_intid(irqstat); >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 thi= s_cpu_write(sgi_intid, intid); >> >> I assume that it should be irqstat here and not intid? >=20 > Indeed. As you can tell, I haven't even tried to compile it, sorry about > that. No worries, I got the gist. However, even with this change, it still does not boot :-( Jon --=20 nvpublic