Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp52554pxk; Tue, 15 Sep 2020 17:32:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+MQjdXZtVO1kk7vq96XSUpX64fUls4QZOwPWgEyErf+GDM2Em+3eqxgufMo4HNEW3KUgl X-Received: by 2002:a17:906:a3d0:: with SMTP id ca16mr22531501ejb.455.1600216348531; Tue, 15 Sep 2020 17:32:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600216348; cv=none; d=google.com; s=arc-20160816; b=kcMB6EQk31bQmfUFUmO+NPIyogUG9lQvQ2QXPGBwVdqtV04DOF5rnx+E1WQiMNoJhK +Px5dVuu8cTugTQOhl6qa+hrmZQwQs5uI1D0FoxnoB3HMkByhKD61Z6XE3m0leTgfYQz e2V2xb+rjv9E6imW0I4QhpMpOa1DicXbJOmPsC27hNqU/O7lS3DlPCx6PfMqLMW7caJZ EDAmrAQPUQsL3IoE8QSfsgxf5zEcQTHDjzXAX9CMoEpnL+w5TTBx4HMC8/GIoB/maeXw qYh+VqmxjrkGQbCftP0SWGcCBmmE//xSI7NHshE+O0zM97Z4lHZnMwcFki5rudKBFnKi RBcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=/ibDZAJp8RgVWvi3yfn3KyF180esXVcy+NQef5/+Iag=; b=SryQlqHCBKDLL1sz+tgZsb3Pw9XagmQhYhd5UQIVMiSlraX+LhAV2h841B5HAbRKs+ nfmS9eUPo6rjFwgeywjq4JPA80KIz8ibxnHcDbk0DkQ/ZB2xj8SNxF+aS0vLNsAivaLh giCqpwXGyjO9Ozhs65suwBK09rfaXaTcDbvkx0WinBcdbRklV6y412QDM11IRIqyXFFJ oEL/z4Mx0iAMZ0c/IbEQlSrV8qyQ1xP684ZXH2qeLuzFm3AqRSoKG01DOSxTMxnUIQOg lGQCxZzCB4QdiWYUIPDiABy37MfB8wnF4OhGd6u9rdcdJ0nLTEKrlc7ULcyZFeRaVj0m 0qkA== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k19si10421882ejg.563.2020.09.15.17.32.06; Tue, 15 Sep 2020 17:32:28 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727239AbgIPA3c (ORCPT + 99 others); Tue, 15 Sep 2020 20:29:32 -0400 Received: from mga18.intel.com ([134.134.136.126]:64608 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgIPA3Z (ORCPT ); Tue, 15 Sep 2020 20:29:25 -0400 IronPort-SDR: mMLr+s1a5HGdwbkck8gd8nD2MLd6LwhsXtD8tF8FxhHLeNrgo4+BpxOi3L+PUQdUwWDOTBmeD6 mrsIqwZehUQg== X-IronPort-AV: E=McAfee;i="6000,8403,9745"; a="147127009" X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="147127009" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 17:29:24 -0700 IronPort-SDR: isOkeQWRIriQfz2XHlRw4RgNA0C5U/TrxLMuEgAX/XMAX+Z4RkAWoEXYMfjSnGqHvvfrJTQoj/ P6+k6358ZsLw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="507795288" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.141]) by fmsmga005.fm.intel.com with ESMTP; 15 Sep 2020 17:29:22 -0700 Date: Wed, 16 Sep 2020 08:24:59 +0800 From: Xu Yilun To: Moritz Fischer Cc: "Wu, Hao" , "linux-fpga@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "masahiroy@kernel.org" , "trix@redhat.com" , "lgoncalv@redhat.com" , Matthew Gerlach , "Weight, Russell H" Subject: Re: [PATCH v2 2/4] dfl: add dfl bus support to MODULE_DEVICE_TABLE() Message-ID: <20200916002458.GA30711@yilunxu-OptiPlex-7050> References: <1600140473-12351-1-git-send-email-yilun.xu@intel.com> <1600140473-12351-3-git-send-email-yilun.xu@intel.com> <20200915035927.GB2217@epycbox.lan> <20200915051933.GA13516@yilunxu-OptiPlex-7050> <20200915180755.GA11862@epycbox.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200915180755.GA11862@epycbox.lan> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 15, 2020 at 11:07:55AM -0700, Moritz Fischer wrote: > Hi Hao, Xu, > > On Tue, Sep 15, 2020 at 05:58:46AM +0000, Wu, Hao wrote: > > > On Tue, Sep 15, 2020 at 12:08:38PM +0800, Wu, Hao wrote: > > > > > On Tue, Sep 15, 2020 at 11:27:51AM +0800, Xu Yilun wrote: > > > > > > Device Feature List (DFL) is a linked list of feature headers within the > > > > > > device MMIO space. It is used by FPGA to enumerate multiple sub > > > features > > > > > > within it. Each feature can be uniquely identified by DFL type and > > > > > > feature id, which can be read out from feature headers. > > > > > > > > > > > > A dfl bus helps DFL framework modularize DFL device drivers for > > > different > > > > > > sub features. The dfl bus matches its devices and drivers by DFL type > > > and > > > > > > feature id. > > > > > > > > > > > > This patch add dfl bus support to MODULE_DEVICE_TABLE() by adding > > > info > > > > > > about struct dfl_device_id in devicetable-offsets.c and add a dfl entry > > > > > > point in file2alias.c. > > > > > > > > > > > > Signed-off-by: Xu Yilun > > > > > > Signed-off-by: Wu Hao > > > > > > Signed-off-by: Matthew Gerlach > > > > > > Signed-off-by: Russ Weight > > > > > > Acked-by: Wu Hao > > > > > > > > Yilun, > > > > > > > > I haven't acked-by this patch as it doesn't modify any dfl files, ideally you > > > > > > Sorry, I misunderstood your comments "Acked-by: xxx for DFL related > > > changes after this fix". > > Yeah it wasn't entirely clear to me either :) > > > > Because the first patch contains changes to non-dfl files as well. : ) > > > > Hao > > > > > > > > > need acked-by from real maintainer of scripts/mod code, right? > > > > > > Ideally yes. From the MAINTAINERS it is Masahiro Yamada, I added him on > > > the "to" > > > list. But I see some other patches (also for devtable entries) in kernel > > > don't have his acked-by. > > Yeah, I've looked at that and most patches for those files seem to be > from subsystem maintainers. So I *think* it should be fine? I see you have applied the patch. I'm very fine. :) > > > > > > > Hi Moritz: > > > > > > Do you have any ideas on that? > > > > > > Thanks, > > > Yilun. > > > > > > > > > > > Thanks > > > > Hao > > > > > > > > > > --- > > > > > > v2: add comments for the format of modalias > > > > > > --- > > > > > > scripts/mod/devicetable-offsets.c | 4 ++++ > > > > > > scripts/mod/file2alias.c | 17 +++++++++++++++++ > > > > > > 2 files changed, 21 insertions(+) > > > > > > > > > > > > diff --git a/scripts/mod/devicetable-offsets.c > > > b/scripts/mod/devicetable- > > > > > offsets.c > > > > > > index 27007c1..d8350ee 100644 > > > > > > --- a/scripts/mod/devicetable-offsets.c > > > > > > +++ b/scripts/mod/devicetable-offsets.c > > > > > > @@ -243,5 +243,9 @@ int main(void) > > > > > > DEVID(mhi_device_id); > > > > > > DEVID_FIELD(mhi_device_id, chan); > > > > > > > > > > > > +DEVID(dfl_device_id); > > > > > > +DEVID_FIELD(dfl_device_id, type); > > > > > > +DEVID_FIELD(dfl_device_id, feature_id); > > > > > > + > > > > > > return 0; > > > > > > } > > > > > > diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c > > > > > > index 2417dd1..9fd2e60 100644 > > > > > > --- a/scripts/mod/file2alias.c > > > > > > +++ b/scripts/mod/file2alias.c > > > > > > @@ -1368,6 +1368,22 @@ static int do_mhi_entry(const char > > > *filename, > > > > > void *symval, char *alias) > > > > > > return 1; > > > > > > } > > > > > > > > > > > > +/* Looks like: dfl:tNfN */ > > > > > > +static int do_dfl_entry(const char *filename, void *symval, char *alias) > > > > > > +{ > > > > > > +DEF_FIELD(symval, dfl_device_id, type); > > > > > > +DEF_FIELD(symval, dfl_device_id, feature_id); > > > > > > + > > > > > > +/* > > > > > > + * type contains 4 valid bits and feature_id contains 12 valid bits > > > > > > + * according to DFL specification. > > > > > > + */ > > > > > > +sprintf(alias, "dfl:t%01Xf%03X", type, feature_id); > > > > > > + > > > > > > +add_wildcard(alias); > > > > > > +return 1; > > > > > > +} > > > > > > + > > > > > > /* Does namelen bytes of name exactly match the symbol? */ > > > > > > static bool sym_is(const char *name, unsigned namelen, const char > > > > > *symbol) > > > > > > { > > > > > > @@ -1442,6 +1458,7 @@ static const struct devtable devtable[] = { > > > > > > {"tee", SIZE_tee_client_device_id, do_tee_entry}, > > > > > > {"wmi", SIZE_wmi_device_id, do_wmi_entry}, > > > > > > {"mhi", SIZE_mhi_device_id, do_mhi_entry}, > > > > > > +{"dfl", SIZE_dfl_device_id, do_dfl_entry}, > > > > > > }; > > > > > > > > > > > > /* Create MODULE_ALIAS() statements. > > > > > > -- > > > > > > 2.7.4 > > > > > > > > > > > Applied to for-next, > > > > > > > > > > Thanks > > Cheers, > Moritz