Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp423751pxb; Thu, 21 Jan 2021 10:13:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2UywYeIo4aXpO35eXI0pTJ5Zyl3lpq2XKWun7K4w7AEOQMoySNgAtE1tP2nZ3GHlTx2u8 X-Received: by 2002:a05:6402:1bcd:: with SMTP id ch13mr307456edb.31.1611252828910; Thu, 21 Jan 2021 10:13:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611252828; cv=none; d=google.com; s=arc-20160816; b=D7v7IVUjAunEk2TaTvMe+aUZ3QV78+iZEU1+zi7+7WjLlNrIAAW5Eg1Y4Y6QKe9frz G1tLYlxu8V2g3UwSunsayCGQgkLJolbUqy9aFWnX5TF65NCiPiHbvzPtkItHFiDmeg2E uHfFsPnjmDSURFiVdDSyaFEzoJ1f897L1KC/qpvSNQoj3w96z4ha5MOhHCoKhZPMxOf9 3wVafwmJD4EAVrmZ5P6jObAWmo/T7+X3TuGR0Rn3J2winTZn51PoVgChNI5gSPJvn4Vu Hx5hiGdGEbgrBuW8RmSjTRj2s5dkGrDsEIAuHg8XxeIGOOYKxArJroIkpZwoTtoh2EzU 4pww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=jmb8mC4z/uCV4SBQqeudlssDn9DCKeKUuT6m6kYgfZk=; b=d+MPifIYSp0LQNtdf6pW7FRQZh4olNzAO68zDPEJBDnSwa0DUf6whlz15egp+2bx3W G5KZjf9qiA16DDGDJop2Pzs3O6nwWjgVeEYlzvbG8aoK4rkkMURC9WzYnqLG50qmtecU P3sYXWeutjXVK7Fe9qGfMyArTZfLYzQp9jIIndSgbbquGSr/wMYhnS20bbuSIV8mjG4l HzhXDVH/q96E6sEB/CNWM9Ow6Ghw4NukaahCmOIIMVhrDpkmqkvUVhbDxfqmxqdwCK43 AlS85yoRHvafPF611p5wy8e8G9vueEjhqaf2Xja9AtMNyh2bPbNs8Ajr6w1p3ZqogCbk oAYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=IY3a82MB; 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=fail (p=NONE sp=NONE dis=NONE) header.from=caramail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dj27si2441212edb.398.2021.01.21.10.13.23; Thu, 21 Jan 2021 10:13:48 -0800 (PST) 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=@gmx.net header.s=badeba3b8450 header.b=IY3a82MB; 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=fail (p=NONE sp=NONE dis=NONE) header.from=caramail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733265AbhAUSMv (ORCPT + 99 others); Thu, 21 Jan 2021 13:12:51 -0500 Received: from mout.gmx.net ([212.227.15.19]:44949 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389591AbhAUSLA (ORCPT ); Thu, 21 Jan 2021 13:11:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1611252540; bh=QfhxphCdVKvLvjpXaoa7/kvLOstgKECKtAZEQWM8ywU=; h=X-UI-Sender-Class:Subject:From:In-Reply-To:Date:Cc:References:To; b=IY3a82MBVXnR+XuDjaYBKX0Gm2ZtmPej+W4WID0kHUEvp+jUAxPMycqWXV2WCpElP QknDY3O/U/+JtQVBBk09hvbMRkuaw+u7VSXR6hYjxSf+xb3gfASz4mkG237ZOQ9MpJ uD6yRdWgL+Jhzy9l7WRCtPoBBZwSCzmXMr0A9CVg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.42.0.78] ([83.204.192.78]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1Mz9Yv-1lxvjc2tOt-00wB2z; Thu, 21 Jan 2021 19:08:59 +0100 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.5\)) Subject: Re: [RFC PATCH 7/7] irqchip/apple-aic: add SMP support to the Apple AIC driver. From: Mohamed Mediouni In-Reply-To: Date: Thu, 21 Jan 2021 19:08:54 +0100 Cc: Arnd Bergmann , Mark Rutland , Catalin Marinas , Hector Martin , "linux-kernel@vger.kernel.org" , Marc Zyngier , Will Deacon , Linux ARM , Stan Skowronek Content-Transfer-Encoding: quoted-printable Message-Id: <950D140B-491A-40EB-9FDB-D7173B86737B@caramail.com> References: <20210120132717.395873-1-mohamed.mediouni@caramail.com> <20210120132717.395873-8-mohamed.mediouni@caramail.com> To: Rob Herring X-Mailer: Apple Mail (2.3654.60.0.2.5) X-Provags-ID: V03:K1:5bi+UftWGgKXkK5CIHh5y7Fh4dvoWEqrHS3XkxOUDATNs77NJGF 4QIhagnStQ1QzuSIgQ7O/WwU4bR+9pnsCmbKNoTv/16ubpo/MMhbUvbGHDgZSxeS5dNg1Es 5xnaTkcQ+EJUlixHAJ69SX0Wt2GJYNpX1BpXhq0M+uuPmmlV9t62F/A52NQVnMhC5wo/LMw w0aBftSJVAf9g+a9zZ1rQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:UY3jSNqU8UY=:2uCTpKuUB+Y6//w3U0RofH ssB8BOxWDK7PGddfOJGKVe3pk2J3f6OacbSt2dQMeZGv0kDPpnKBgvfFe94ZyNRb1s/xe8Pu3 OQ2Gc5r8C5XubKGBm7RNOzKDwQasYuhmTjpWXMciImY71M8NrENMtrng+JjV0Pm2epG84xTPh raWoT5D6ytpjU11PRvZRdFpjMZQ69bfJ9jD1KbqqhJi/iTKmSZus2oBVnudwzqWbYugAX+0me T5yAV535XmKC4euHxyPn126pKVSDnVaxdRsiALsowgeu9RdnyGU3TUMJW6p+iR3FwEcqCATxz OEijtOQ1wCwyLRw5+ewoXCGAWZbCK0SC5NvFUTQ0djLYmtdguf12FLml+wMSLwtgwHcs+jkkM axqCe2WxelSsVWAw5hmhHjlt4C6JHYIXZh8TwLlupqnxOXMxD7v4d2oQxx6C3QSLRn/uxVtpb GSAnzuOrS2nEs3/dxuKV8EvEr4JMvELm6nbPKQqNJF54lvyEdFm4EKSPJFu38PfnBDcGyaC+F X29xswgIhIS96mk88Mz0Xy0d3J7eRjTCHwf/AwuachJH5xqr+Le0IPHV1Q0eqyTXyGThu525Z I5xml3F0cHAE0wxVPxRZbNTTAsOGTTr1aAAGFqDlP+07W+Y0E1lNfjUFXdalDc0M0D/FbC1OB Lyue8dPh7aAoBiI2pDnAOOKAyLefKu/oi1JPMVjfYVZZnyIDwywx8np020luFEQmR6yQq61V0 EoKKX323gFh8jeZOeO4y9Ep5lmSYHazaMdvbTEHwGEZ7Le60TXYoMxiXUrqD7gVb/qiWpki3y QoxWOZ0bRknbPcZJK+2J/LDe9mPDnPPJylleMbAlZGAl8liStbS1nU+FTp8odFzxpgoMHLxyD rJzihuFnEhcOVhgRaltfiPTyJzV/BXcTqj7k+Oql8= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 21 Jan 2021, at 18:37, Rob Herring wrote: >=20 > On Thu, Jan 21, 2021 at 10:43 AM Mohamed Mediouni > wrote: >>> On 21 Jan 2021, at 17:40, Rob Herring wrote: >>> On Thu, Jan 21, 2021 at 6:52 AM Mohamed Mediouni >>> wrote: >>>>> On 21 Jan 2021, at 13:44, Arnd Bergmann wrote: >>>>> On Wed, Jan 20, 2021 at 2:27 PM Mohamed Mediouni >>>>> wrote: >=20 > [...] >=20 >>>>>> @@ -186,8 +325,11 @@ static int __init apple_aic_init(struct = device_node *node, >>>>>> if (WARN(!aic.base, "unable to map aic registers\n")) >>>>>> return -EINVAL; >>>>>>=20 >>>>>> + aic.fast_ipi =3D of_property_read_bool(node, "fast-ipi"); >>>>>=20 >>>>> Where is this property documented, and what decides which one to = use? >>>> It=E2=80=99s getting documented in the next patch set. >>>>=20 >>>> This property is there to enable support for older iPhone = processors >>>> later on, some of which do not have fast IPI support. >>>>=20 >>>> On Apple M1, fast-ipi is always on. >>>=20 >>> This should be implied by the compatible string which needs to be = more >>> specific and include the SoC name. >>>=20 >>> Rob >>=20 >> Then we=E2=80=99ll eventually have two aic compatible strings, aic = which is compatible >> with Apple A7 onwards and aicv2 which is a superset with fast IPI = (introduced >> on the Apple A11, 3 years ago, with no further programmer-visible = changes since >> then). >>=20 >> Does that look right? >=20 > If we did this from the start, it would evolve like this: >=20 > A7: "AAPL,a7-aic" > A8: "AAPL,a8-aic", "AAPL,a7-aic" # Read this as A8 AIC is backwards > compatible with A7 AIC > A9: "AAPL,a9-aic", "AAPL,a7-aic" >=20 > A11: "AAPL,a11-aic", "AAPL,a7-aic" >=20 > If the A11 version could work on an OS that only supported the > original model (sounds like this is the case) Or if it's not backwards > compatible: >=20 The A11 AIC indeed can be used by older drivers that aren=E2=80=99t = aware of the fast IPI path introduced on A11 just fine. > A11: "AAPL,a11-aic" >=20 > If the A11 is different and not backwards compatible. >=20 > Then M1 could be: >=20 > M1: "AAPL,m1-aic", "AAPL,a11-aic" >=20 > Or to even support an OS with only v1 support: >=20 > M1: "AAPL,m1-aic", "AAPL,a11-aic", "AAPL,a7-aic" >=20 > You don't really need the fallback here because there isn't any > existing OS support and the baseline is the M1. >=20 > If you want to have generic fallback compatible strings with versions, > that's fine too. I'm not really a fan of version numbers that are just > made up by the binding author though. Most SoC vendors don't have > rigorous versioning of their IP and those that do seem to have a new > version on every SoC. >=20 > The important part is *always* having an SoC specific compatible so > you can deal with any quirk or feature without having to change the > DTB. Everyone says blocks are 'the same' until they aren=E2=80=99t. >=20 Is it fine if such a SoC-specific compatible is present but with having the driver only know about AAPL,a11-aic for example? (To just have it when it=E2=80=99d be needed if ever in the future, but = not uselessly add entries to the driver that will not be currently used) On a tangent: The internal naming scheme used by Apple is off-by-one: Apple A14 for example is Apple H13P (H-series 13th gen processor, Phone) Apple M1 is Apple H13G (H-series 13th gen, G series) (And Apple A12X is Apple H11G for example, with A12 being H11P) Should we bother with those or use the marketing names? Especially = because the beefier SoCs might not be of the H series anyway=E2=80=A6 as the = internal scheme reveals that M1 could as well have been an A14X. And there=E2=80=99s also the other internal naming scheme: Apple A12 being t8020, Apple A12X being t8027 Apple A14 being t8101 Apple M1 being t8103 T there means the foundry at which the chip was manufactured, in the = cases above TSMC. Of course Apple itself uses both=E2=80=A6 with the marketing name being = nowhere in their device trees. Thank you, > Rob