Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1615393ybk; Thu, 21 May 2020 10:59:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYSuSg3rny5NBbkhoMIQAsRMmNkOTcHCEmI70r6rW2bKqMATUhA5iZEeevrhVGw0b57zRu X-Received: by 2002:a17:906:509:: with SMTP id j9mr4509515eja.152.1590083992862; Thu, 21 May 2020 10:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590083992; cv=none; d=google.com; s=arc-20160816; b=YszOEDdIKd9YPkGfCxBgyY40Dfp3VJSF5pXweWV2dzwr5HGvMjPxtEBQ8l2hoW8RId SxN4JYuCBzJaBQi0Voq+zHi2GR9udFsF2ehtgdxSUNNzrBKRwGIkE+9BHRSe8ECK0CW0 AacQxz8v1PAi+XWUl8yfxMjNIY4zpO6QERi2qPN2L51JPW+J8hYGXjN6odaNxktjA41b Yn1R14mN3tRDZAbetbrDjYKW5NHbApGMZhtZkTH7VedBIrkzYBf712i4+K+/IIsKj9j/ ejA6CD6jpPabekDZtfzLi/5b5CruX+ZhP7/J3CybM7Foo++D170rdjhjl2CvuoWLIkDB OG9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=JoWH0REhDbs0g6wW5aH8Wpi/nb2uuxOqbrdrCjoMjrI=; b=wmdtnuxow8zkf26OMW57pZiOlZfeNzI0C1IZFwZhvy8iiRGQqS+oBAPLdHnaGyBBd5 pL38j6yAzo+9Eu8suN4knXagnZ1xFAWJwPdSVbWipZQ7CD2wjS3oZBz7Rci9Z73+Sks/ wDntsOywVIiQniXRO+voLigaQTMdWtaiUGuUB6u11wGpg0QSG75hzD12mlDR4iiD5RgJ rDhTfzEt65Sbvj7zNQbFoCozMWHMVfNBzIK1vc97LcglyX9ca6XGnKZDihy51ipMnrzq 64VLmPHP1gZqSvmRZdb1pWGizeJVYWeWRx+9LtBWqnMPFLVM/oSrA9WFhf8tTSzBV1cj DrYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ViIzU9LQ; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ba4si2905573edb.479.2020.05.21.10.59.29; Thu, 21 May 2020 10:59:52 -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=@linaro.org header.s=google header.b=ViIzU9LQ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729011AbgEURzm (ORCPT + 99 others); Thu, 21 May 2020 13:55:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728013AbgEURzl (ORCPT ); Thu, 21 May 2020 13:55:41 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62A99C05BD43 for ; Thu, 21 May 2020 10:55:41 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id t8so1331031pju.3 for ; Thu, 21 May 2020 10:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JoWH0REhDbs0g6wW5aH8Wpi/nb2uuxOqbrdrCjoMjrI=; b=ViIzU9LQNw75MOmE5VTuvUeN7jOryNVvFx8+ZRqtUDHTR/f7tFcd1DOLXKl2MVNFkc bDkpesjGCYOnam7JUaI3LXRpBilNYiFEh59k86RsudmUF2WC0ooRRmnnLQstWRrUfhkD 3IwUlrFgtq6L4Qfi/0mnC1RtiFOlTdlBw0v5hinyynS+56wyDNYHuErMi/UCXK3JyaNX +ReL8f/44ulBHJeT0QOhGuy1ogAjkOEKjI2kN8ag8NeGfX2jMoqsKIooGz5WxwI+lMDo ErtkvJSA70kUA7bsK7dYUHKa7qIPiVOCh97AywxPbXQv8rxZzW+Ie6mTpCBHNDGjAura X+eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JoWH0REhDbs0g6wW5aH8Wpi/nb2uuxOqbrdrCjoMjrI=; b=nBCZNW39QeVBEgF4Wn5M68zWgj17MtGQ1KbXlZcMsAbKk1PC2PCjWoly/BOh7QQQwR HvYiYnkM8ncAhQR4TYE8jiUVBHfdP4CpVvPpRXozYNXz62YyBXh0uhxpMZBna94uGtpo qjEOuBa3TAhsbeTYCr/dF3VqFaTKPaDhSvmCgS15bhRLhx5bQ0f6EWKpA9Z3HNY1AiZR Zf7XfqVIxHGl4bsaSl1L+kHxNCfuWkgqwxUvZhjtzRXvaOw80J/YoWauBmwCb8BX8S4Z qN+ZrzBQ2YmsSc2oMfsQEJ/NLWOfzxGkYRl+Q6ezq9H/kGrzKqjp5MMmIhz5P4wCJsoN lLRw== X-Gm-Message-State: AOAM533DczRDFfOClAQSJKKb5ML+chGIhuP9eS6TWa6Nsd/wc/4rK78X mI9BciuseN7iB/Lz4IkGqqseuA== X-Received: by 2002:a17:90a:ea98:: with SMTP id h24mr12335013pjz.195.1590083740620; Thu, 21 May 2020 10:55:40 -0700 (PDT) Received: from builder.lan (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id v75sm5160768pjb.35.2020.05.21.10.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 10:55:39 -0700 (PDT) Date: Thu, 21 May 2020 10:54:21 -0700 From: Bjorn Andersson To: Suman Anna Cc: Rob Herring , Mathieu Poirier , Clement Leger , Loic Pallardy , Arnaud Pouliquen , Lokesh Vutla , linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] remoteproc: introduce version element into resource type field Message-ID: <20200521175421.GI408178@builder.lan> References: <20200325204701.16862-1-s-anna@ti.com> <20200325204701.16862-3-s-anna@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200325204701.16862-3-s-anna@ti.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 25 Mar 13:46 PDT 2020, Suman Anna wrote: > The current remoteproc core has supported only 32-bit remote > processors and as such some of the current resource structures > may not scale well for 64-bit remote processors, and would > require new versions of resource types. Each resource is currently > identified by a 32-bit type field. Introduce the concept of version > for these resource types by overloading this 32-bit type field > into two 16-bit version and type fields with the existing resources > behaving as version 0 thereby providing backward compatibility. > > The version field is passed as an additional argument to each of > the handler functions, and all the existing handlers are updated > accordingly. Each specific handler will be updated on a need basis > when a new version of the resource type is added. > I really would prefer that we add additional types for the new structures, neither side will be compatible with new versions without enhancements to their respective implementations anyways. > An alternate way would be to introduce the new types as completely > new resource types which would require additional customization of > the resource handlers based on the 32-bit or 64-bit mode of a remote > processor, and introduction of an additional mode flag to the rproc > structure. > What would this "mode" indicate? If it's version 0 or 1? > Signed-off-by: Suman Anna > --- > drivers/remoteproc/remoteproc_core.c | 25 +++++++++++++++---------- > drivers/remoteproc/remoteproc_debugfs.c | 17 ++++++++++------- > include/linux/remoteproc.h | 8 +++++++- > 3 files changed, 32 insertions(+), 18 deletions(-) > [..] > diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h > index 77788a4bb94e..526d3cb45e37 100644 > --- a/include/linux/remoteproc.h > +++ b/include/linux/remoteproc.h > @@ -86,7 +86,13 @@ struct resource_table { > * this header, and it should be parsed according to the resource type. > */ > struct fw_rsc_hdr { > - u32 type; > + union { > + u32 type; > + struct { > + u16 t; > + u16 v; > + } st; I see your "type" is little endian... Regards, Bjorn