Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2185295rwi; Thu, 3 Nov 2022 13:48:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Wg1IH53a3gbSH/ioOBZtFqwCEsZRMiS4AnDYr0GHtplqoEDq6FYGW/VA1HNFfFVBrSeTu X-Received: by 2002:a17:906:c291:b0:7ad:caae:449e with SMTP id r17-20020a170906c29100b007adcaae449emr24223856ejz.436.1667508517531; Thu, 03 Nov 2022 13:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667508517; cv=none; d=google.com; s=arc-20160816; b=ZrDRzjMm3kvnE7bk5NbZ/ysdDr6oTou1cHMq6BVY6rIfnmvn9En3JTluoqRLWteVMu MpXIRSxh/E1WpQTt16deFIDFeR8zEbkHjt3DKW4gJXRxIIVdbj8DWbojrx7q4js8ULVp ddDwaeuqFzWwJHZDNGWVH9xeEqEGzZzpNoNxHHOyzFDqquahRDLsX2G0TDI1t3f1maXj 0ZfDuh7OT27dG/D9YIuQIjbOiqfJTGTZ2NZMKqXQSEhNOxIs3yDp2DiyWZ8/cDAnUjMX FKFpSadUIO1NvijmwlY9rDzyQgImJFv3y9WYOkQfexrqIAc2cg7oMNd45TiC/nmf/jsS f3BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yoIgtYWRyfNtSHMtnSBqZmToVUwyoTKYR5e6ktsm52I=; b=mZNxVnbD0hp9GJi89IzM20IpeHVKe0uENv8AT3T2n9Oi6yfdUqjP2c5nvTZW2vh8KS Ad9W/jv23lIgvoXAzQrca5JrmMZyDCR5GK5r3xLMuCQq9RcJNihNAugChrScQPknsINi 1GjO0/IixOtxQhv3GR+VdpfSgHg1AIVoDm/BGlKZW/+AMZs0CPTbUPFsKSzeLwIQI68q QmgE2j+s8QwIBFW4SMLE87cPIGHTrGlD5q7yggqfBiw59PKc4X67th4a80CgXfCLYsjO YnmsgU1+7Q+/r296iUmAZyMZexbb+Yan+YC2kQhD4eA4BLKbDDVWGJMndqvY7N/0NeLn iidg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="p//QClwV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a05640235cc00b00459fb0c1d9esi2808020edc.549.2022.11.03.13.48.14; Thu, 03 Nov 2022 13:48:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="p//QClwV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230297AbiKCUkJ (ORCPT + 98 others); Thu, 3 Nov 2022 16:40:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230348AbiKCUkF (ORCPT ); Thu, 3 Nov 2022 16:40:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2A2014028 for ; Thu, 3 Nov 2022 13:40:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6F88561FEF for ; Thu, 3 Nov 2022 20:40:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8A94C43140 for ; Thu, 3 Nov 2022 20:40:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667508003; bh=8A5DvzoRi1Bdtzf7W7j/gUi5tTR9+uK5q+GZ6lGwTHw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=p//QClwV8y/uM9tYtpafsZogTTKSps8F/sE/RMxFAIr6E/g3g2NV9ODqxF20ZGxoS 2+cWai+HG9TB4/6+mTltMT/sqsOfTUnJ/70Ggfst/VOejaE/dDV/kY6+84mPs6dzrh n+ek8FglqHDqxoCH0vBSZr6tI+vDt/Opa+M7lc77czMC/EB2RToxa/apOP16+lDP8h UrgwWbHH6vU3Y3O0FHAKW8WPM4Kayb8or7a40LV3JB+qhjFCCmk2usNYJjbZfNxAg6 hLHgwpnYqACOdSErgov7J0x/kucdiEeYETVQghR63NWSkQ5hXiKyAm7CN/pwVdwI8d QwPITuH02vjig== Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-3704852322fso26714257b3.8 for ; Thu, 03 Nov 2022 13:40:03 -0700 (PDT) X-Gm-Message-State: ACrzQf3GNHyWbfSF7SGxBjsPRduz+c0PmqmfU8oYWfmTXjI9JX8Bo6Rk ej+XHVFyfVtRJzk61+Ga9510vBiCRnbmCsMf2v4= X-Received: by 2002:a81:c11:0:b0:36a:bcf0:6340 with SMTP id 17-20020a810c11000000b0036abcf06340mr30285263ywm.467.1667508002734; Thu, 03 Nov 2022 13:40:02 -0700 (PDT) MIME-Version: 1.0 References: <20221102203405.1797491-1-ogabbay@kernel.org> <20221102203405.1797491-2-ogabbay@kernel.org> In-Reply-To: From: Oded Gabbay Date: Thu, 3 Nov 2022 22:39:36 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major To: Greg Kroah-Hartman , David Airlie , Daniel Vetter Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jason Gunthorpe , John Hubbard , Alex Deucher , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Yuji Ishikawa , Jiho Chu , Daniel Stone , Tvrtko Ursulin , Jeffrey Hugo , Christoph Hellwig , Kevin Hilman , Jagan Teki , Jacek Lawrynowicz , Maciej Kwapulinski , stanislaw.gruszka@intel.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 3, 2022 at 3:31 PM Oded Gabbay wrote: > > On Thu, Nov 3, 2022 at 2:31 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Nov 02, 2022 at 10:34:03PM +0200, Oded Gabbay wrote: > > > --- /dev/null > > > +++ b/drivers/accel/Kconfig > > > @@ -0,0 +1,24 @@ > > > +# SPDX-License-Identifier: GPL-2.0-only > > > +# > > > +# Compute Acceleration device configuration > > > +# > > > +# This framework provides support for compute acceleration devices, such > > > +# as, but not limited to, Machine-Learning and Deep-Learning acceleration > > > +# devices > > > +# > > > +menuconfig ACCEL > > > + tristate "Compute Acceleration Framework" > > > + depends on DRM > > > + help > > > + Framework for device drivers of compute acceleration devices, such > > > + as, but not limited to, Machine-Learning and Deep-Learning > > > + acceleration devices. > > > + If you say Y here, you need to select the module that's right for > > > + your acceleration device from the list below. > > > + This framework is integrated with the DRM subsystem as compute > > > + accelerators and GPUs share a lot in common and can use almost the > > > + same infrastructure code. > > > + Having said that, acceleration devices will have a different > > > + major number than GPUs, and will be exposed to user-space using > > > + different device files, called accel/accel* (in /dev, sysfs > > > + and debugfs) > > > > Module name if "M" is chosen? > Will add So, unfortunately, the path of doing accel as a kernel module won't work cleanly (Thanks stanislaw for pointing this out to me). The reason is the circular dependency between drm and accel. drm calls accel exported symbols during init and when devices are registering (all the minor handling), and accel calls drm exported symbols because I don't want to duplicate the entire drm core code. I'll keep this menuconfig to provide the ability to disable this code for people who think it is too "experimental". And in the future, when drivers will join this subsystem, they will need this place for their kconfig. Thanks, Oded