Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp7166890imm; Tue, 24 Jul 2018 09:26:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf8AjE2iG/wmHAyCfg7ihHXrU6ina/ZQsqqoOihgD7cBksphGEj92Rq9qAXsiWJWsMP9ona X-Received: by 2002:a63:8b44:: with SMTP id j65-v6mr17082606pge.248.1532449594573; Tue, 24 Jul 2018 09:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532449594; cv=none; d=google.com; s=arc-20160816; b=rYwfOilJGp4aOzDx+f8Bke8I2QJCE6QXhk4S8yON323XteEtKnqLnYDe7UKxHnS454 DlpN/z4R9T2tLjJX+EV4d1p5XET7+CNq83Be62cj2xftD70WPikjHZcWMrG2ZWaDL27Q dm8YNYG8gKFzvMF5vb27kuO4K3xFeu4KxJcauYqRiTw8fQBFpJ2/kcqCuA+OCMQiC/6k 6I4Tct8FoHEbA52FS6crNe5ALriqOb/R4kvI7ZYyzDamgBM8nip/QKGXjRYFMzsJ+r1E V00gOJniVS0+hNCnw407HbCm0DT/5XmOOiGzV3lkJ9vfJu/2bKaB2POzLxW3gHTIXizg yvJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=qjm3UTnBUv3UROMnMrmq856i4dxEjJaSH4PR6XPxztc=; b=oV1lDlyOOoIS9nCkbB16ICZI0d5I4G2aftyYnofTKeJChNIomQE1fvm9GwQu31PzMJ zs9p+792uffTSpsRd2FD5jBEgTL1nPviZ+ZwcR5c31wJvDKQKfAgGgxF9VTaFtgPTGLs K4SElTHxozhofoclSCF6z5fsK6EnXXUtbyk5Zu3rf3p0c28PzTlG2XVaGscy4K19Gbyc nVoMDzstJwP5gKG7jSYHYXEzoLA9aZ0xkVzCSTfq5zHO0fQEHyFLPBHBsCtKCBFxYUgH 5ce+sF4PUAAmyYJI7uInSSkSPdhc5S4BnIQE3RqlbM3ZsRp/5rlHBtwEcQ6vWljF9Akj wOsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=K+v5q77r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si12805482pll.412.2018.07.24.09.26.19; Tue, 24 Jul 2018 09:26:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=K+v5q77r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388457AbeGXRcj (ORCPT + 99 others); Tue, 24 Jul 2018 13:32:39 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:36806 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388324AbeGXRci (ORCPT ); Tue, 24 Jul 2018 13:32:38 -0400 Received: by mail-qt0-f193.google.com with SMTP id t5-v6so4703943qtn.3; Tue, 24 Jul 2018 09:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=qjm3UTnBUv3UROMnMrmq856i4dxEjJaSH4PR6XPxztc=; b=K+v5q77ro0nfMqrSyjPeXZsGbz5tWt7QDMjrQao8EnLZ6ijnb6h198HOEhWB0AzFJ1 RQFkTqGh7EZ66Wu6trEUyeAWaglIe5z4GUTBfH0xRnDW+EoLDaegDnwQ5TnusXNLt8i5 ZIm3sCMed2v0rNkxhwMMpYG2DjKsu2IlPxN+Tmmve/XYJsreBFWeIIlIw26D24vvYzDU RoX7yRAhF+4irX5vRRZKVM1MgyWq5I3uBCBQSgW8/4NZn9PI4Qk4OTMgGdkIt7/TyzOS VIS/zkgGPlb4NehX3EP30EbmjVj5+GEILw1KFHwQZTDzAAUuKaVLVdP+mKsDCkr3Fzvd 3eTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=qjm3UTnBUv3UROMnMrmq856i4dxEjJaSH4PR6XPxztc=; b=ZULomDu/QrkP87mQe65UVmg0WffD+Yn21pi4ccCt4vTPhf9aS8h/bVMLvLIvbgs3Pe Qw6PGDC16TZBPqss80DgQ09URsCNqe/VWIPrELwe034vM/HZcWtjduyfGd/ryyW07Nzb mgtiMtk5gqa2XXtHVxyd1bCBqrPn908hZAE9BUsmnV4tEwykAHQUbBTrYfeKcZvD/PE3 1IsO91UBcdncyf0F+ks1LAOKQQMUxtLwXp2gsa+I4TljvQ0i/lwKdvP+TkjJOlA3FFkA EjJMcW1wQ751/4S2fNjKFXCVMEhCbxUJHSeOCzuvegxcyZrfvDrDJ6pgxlT/LPR1eBbp u7XQ== X-Gm-Message-State: AOUpUlEVCaCeaxcTFEW3Gj73jkGG/51IWPt7R9iY1ZSZulQZ6Vp26zbB MsUv9ZDBOkbqKbV0I/NIYG85WfIK9flF3Iz0i+g= X-Received: by 2002:a0c:f804:: with SMTP id r4-v6mr15663606qvn.156.1532449523052; Tue, 24 Jul 2018 09:25:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:967d:0:0:0:0:0 with HTTP; Tue, 24 Jul 2018 09:25:22 -0700 (PDT) In-Reply-To: <20180724181437.1d1b27a8@bbrezillon> References: <20180719152930.3715-1-boris.brezillon@bootlin.com> <2ab0ab75-2df0-2714-f007-c33b25481016@axentia.se> <20180720101206.tv7nsoanwo5ftnia@ninjato> <21b269c5-a3a7-c5de-c81e-c9c9301ae13e@axentia.se> <20180720151751.242d4809@bbrezillon> <20180724162806.318a92c6@bbrezillon> <20180724181437.1d1b27a8@bbrezillon> From: Arnd Bergmann Date: Tue, 24 Jul 2018 18:25:22 +0200 X-Google-Sender-Auth: tB-CBZse7BgubK89aIV1551LF9I Message-ID: Subject: Re: [PATCH v6 00/10] Add the I3C subsystem To: Boris Brezillon Cc: Geert Uytterhoeven , Peter Rosin , Wolfram Sang , Linux I2C , Jonathan Corbet , "open list:DOCUMENTATION" , Greg KH , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Rafal Ciepiela , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Vitor Soares , Linus Walleij , Xiang Lin , "open list:GPIO SUBSYSTEM" , Sekhar Nori , Przemyslaw Gaj Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 24, 2018 at 6:14 PM, Boris Brezillon wrote: > On Tue, 24 Jul 2018 17:58:29 +0200 > Arnd Bergmann wrote: > >> On Tue, Jul 24, 2018 at 5:46 PM, Geert Uytterhoeven >> wrote: >> > On Tue, Jul 24, 2018 at 5:40 PM Arnd Bergmann wrote: >> >> On Tue, Jul 24, 2018 at 5:15 PM, Geert Uytterhoeven >> >> wrote: >> >> > On Tue, Jul 24, 2018 at 5:05 PM Arnd Bergmann wrote: >> The second case is the one that started the discussion, and >> this is where I said I'd prefer to associate each slave with at >> most one master at boot time, while the current v6 patch >> is prepared for having one slave be accessed alternatingly >> by multiple masters using the master handover, though so >> far nobody has been able to describe exactly how we'd pick >> which master is active at what point, > > Even if it's not yet implemented, I have everything in place to figure > this out (see the ->cur_master field in the i3c_bus object). Now, > what's missing is a list of possible masters attached to an i3c device > so that the framework can pick the most appropriate one at runtime and > initiate mastership handover if required (if the selected master is not > the currently active one). > > The selection logic should look like this: > > if (active_master supports requested feature) > use active master > else > pick an inactive one that has relevant caps and initiate > mastership handover (+ update bus->cur_master) How would you deal with soft requirements like performance? E.g. if you have one master that can do large transfers faster through a special DMA engine, and other master that can be faster for small transfers, but both support all capabilities for that device, won't you need some complex logic to avoid being stuck with a slow master indefinitely? >> or what specific scenario >> would require it. > > I think I described a scenario (masters having different > capabilities all connected to the same bus), though I don't know how > likely this use case is :-/. I was looking for something more specific here. What (lack of) capabilities could two i3c controllers have that require you to use both of them for the same device, rather than picking a master for each slave with the right feature set? Arnd