Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp462006pxb; Thu, 21 Jan 2021 11:11:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/DJHbHi+dERJPxdfg3m6itLk2NtlVU6OaSAp+4h7X7tEoUx9ik/BQZ+xSdpMMoDZBkupr X-Received: by 2002:a17:906:7f83:: with SMTP id f3mr616066ejr.282.1611256282909; Thu, 21 Jan 2021 11:11:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611256282; cv=none; d=google.com; s=arc-20160816; b=TxlUhyC3D1NhoPtjANzigMCPUCZc0ORoHB/iaqstOfQs8OLdChAme8yrBEaMPZJNZW ARhaW/qXsDPavadomWmCnSPYJLWKGZt/hZ9RkJMbaJrvq62xjcGiMCQ18f+elmc8WECt 3UBptLvqBo7+wsdoUOX60Ui/lIQlg6aClVlRvwLnsJBrk61yR2yS/NSoJxtrxUD8IQc5 cZNVIQf8bgbfSHdS1qlWgI2FCDSFB+yKoDOkQ1oOn+F0RiFfjqro6d98+B9iej9VEjtS fyahXhd/0kKnigVcxmQKpeh1dd0n2rZDWhywmzKg/0vxWpmxI3fO0IgJ31OLCMfFoEv3 IOsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=a0g3eqwf/bTXAEevWGwUviXlabEyme5Qcxv+Gf3H+F8=; b=DQPadWuCGRYDSF74cVIwISGzqIV1mSlxIpVr771FoPs6U0VcKq3Uq62ni4PSKpIs9C foYG9P/mpL8GNOD0VQ06u5R79DAl3Jo7fwIZ8kFv/35QbDIOmU+K8kJRlJi5S25YQXAk Wp1aHNzs06mQemNcNB1fKuDnIdatZsEATpK8CsGPf8AV1bXFWuwZFmt/u7d5vpbhr9C3 YmTHNzH2sd4pZrywJyl6IUIbJWIsVu9zvPdxU4QmMnELXc6zOZr/TdzJOhZxmfuQYP8y MPd2LAKOwv/W/s2xBMIOAnoqkn61xxFf00oMPW8AOlkyLWbNPdnAAcRAj8Nni5qpRz7J Af/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ts6wmKw/"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l18si2110139eji.492.2021.01.21.11.10.56; Thu, 21 Jan 2021 11:11:22 -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=@kernel.org header.s=k20201202 header.b="ts6wmKw/"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726390AbhAUTJW (ORCPT + 99 others); Thu, 21 Jan 2021 14:09:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:38136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbhAUTHU (ORCPT ); Thu, 21 Jan 2021 14:07:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 810E523A63 for ; Thu, 21 Jan 2021 18:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611255467; bh=9uEG+UKcIRbXlM2KsrUvRrmi/R25J0TMFGny/+Avp+A=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ts6wmKw/C6qGIPi/X3U8SOs0bh2imUtKlPGxDMnUOvz5k7lg0wt40Ln1zfxgJ/526 mDC5KLDwm8bMKgHaqhW0fwwpVc0RcL7mG2LPeJZSJhC3tYWM/PMcZ73Pv8E6/OlvLA Cl0JE6JdkvQJ56hyhg4Fas8SR8RzaAvYaHWZzBwxEzySz+wS0HUtHLUVt5/nVgom5z QcVSv6esagipoJ/EBEtnjf1VR2fMVF2gmY80DKSj3XTXHT74J5JsdMhrWKcZfTXB17 RRTOuu7wnfEfIIRfeqespolzX952/PXsIMjJQnKiAKFMeoyxIeqqLeSE+XQTIWVdtE x3siMvU70ILeA== Received: by mail-ej1-f48.google.com with SMTP id w1so4099860ejf.11 for ; Thu, 21 Jan 2021 10:57:47 -0800 (PST) X-Gm-Message-State: AOAM532GdSWOzo+2HQ1WKCLd+CWRHLzwheoOFf/HG2hm3jYU2TI8QCBj 4un9OauP78PUnrrd04nkCfYuZDCLwJcgIA4rRQ== X-Received: by 2002:a17:907:d01:: with SMTP id gn1mr561009ejc.130.1611255465946; Thu, 21 Jan 2021 10:57:45 -0800 (PST) MIME-Version: 1.0 References: <20210120132717.395873-1-mohamed.mediouni@caramail.com> <20210120132717.395873-8-mohamed.mediouni@caramail.com> <950D140B-491A-40EB-9FDB-D7173B86737B@caramail.com> In-Reply-To: <950D140B-491A-40EB-9FDB-D7173B86737B@caramail.com> From: Rob Herring Date: Thu, 21 Jan 2021 12:57:34 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 7/7] irqchip/apple-aic: add SMP support to the Apple AIC driver. To: Mohamed Mediouni Cc: Arnd Bergmann , Mark Rutland , Catalin Marinas , Hector Martin , "linux-kernel@vger.kernel.org" , Marc Zyngier , Will Deacon , Linux ARM , Stan Skowronek Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 21, 2021 at 12:09 PM Mohamed Mediouni wrote: > > > > > On 21 Jan 2021, at 18:37, Rob Herring wrote: > > > > 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: > > > > [...] > > > >>>>>> @@ -186,8 +325,11 @@ static int __init apple_aic_init(struct devic= e_node *node, > >>>>>> if (WARN(!aic.base, "unable to map aic registers\n")) > >>>>>> return -EINVAL; > >>>>>> > >>>>>> + aic.fast_ipi =3D of_property_read_bool(node, "fast-ipi"); > >>>>> > >>>>> Where is this property documented, and what decides which one to us= e? > >>>> It=E2=80=99s getting documented in the next patch set. > >>>> > >>>> This property is there to enable support for older iPhone processors > >>>> later on, some of which do not have fast IPI support. > >>>> > >>>> On Apple M1, fast-ipi is always on. > >>> > >>> This should be implied by the compatible string which needs to be mor= e > >>> specific and include the SoC name. > >>> > >>> Rob > >> > >> Then we=E2=80=99ll eventually have two aic compatible strings, aic whi= ch is compatible > >> with Apple A7 onwards and aicv2 which is a superset with fast IPI (int= roduced > >> on the Apple A11, 3 years ago, with no further programmer-visible chan= ges since > >> then). > >> > >> Does that look right? > > > > If we did this from the start, it would evolve like this: > > > > 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" > > > > A11: "AAPL,a11-aic", "AAPL,a7-aic" > > > > 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: > > > > 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" > > > > If the A11 is different and not backwards compatible. > > > > Then M1 could be: > > > > M1: "AAPL,m1-aic", "AAPL,a11-aic" > > > > Or to even support an OS with only v1 support: > > > > M1: "AAPL,m1-aic", "AAPL,a11-aic", "AAPL,a7-aic" > > > > You don't really need the fallback here because there isn't any > > existing OS support and the baseline is the M1. > > > > 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. > > > > 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. > > > 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 n= ot uselessly > add entries to the driver that will not be currently used) Yes, that's expected. You add the more specific compatible when you add the feature or quirk work-around. > > 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 becaus= e > the beefier SoCs might not be of the H series anyway=E2=80=A6 as the inte= rnal 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 case= s above TSMC. > > Of course Apple itself uses both=E2=80=A6 with the marketing name being n= owhere in their device > trees. I'd probably lean toward the marketing names, but don't really care as long as you're consistent both for a given SoC and across generations. Rob