Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3081783rwl; Tue, 27 Dec 2022 04:11:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXucQcbSm8iuOwiOYTmkAU1rkNjbXj86pNJ9iHcBkwd9f8/384LisRz/vJyayaLQQ1GO7pNi X-Received: by 2002:a05:6a21:1709:b0:ac:5671:adfa with SMTP id nv9-20020a056a21170900b000ac5671adfamr42194652pzb.18.1672143078339; Tue, 27 Dec 2022 04:11:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672143078; cv=none; d=google.com; s=arc-20160816; b=0xafIX0tOA+YA8DsR70CzlIYjMpiSXZFv0UAQQmDW+Mr+Ob/WeaOPQArpxQJrSwo6U tPuHaWTYEDhUCNUI74fXGBmhMVfwYLamsy8a8U8P4KoiG/MmtNjYjyOh5DVlTlDrVUCA Y/1LitU4BbqOvlbAMbN16FzlC36AMpSA6BGbr2XDh456OWsEwLcXNGC3GWtAmkN8uNeL vRoRv3CBXvaNWuk3/lXJqPE3dafm/TdPiGdg3g80JBjDlCsHeftAuX6Xl7wponCDeN7j 7DF8HexCdDcFLoKxIRtluJktpZpH0sKnhN8seXP5RB9/NeBmrPyYR9b33YSJSCl+HTOA 3ANA== 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=3ikdamuP4cqp7NUfGFMIC3fR37Qo2ogBxNgbkR/Q6Tk=; b=dx1S8pDAnx97BPorNODtly3OcPMGFD43fVUjqU1YyrMtwtdK2QO4TCfWvIL6qpAr7m f4kftUm6Y6fEvLhukJd/CR1RUWIS1zrIbUvlUyY6erQi6qoFfi4eMGGAfY/lPCoe+wra gvsIkVF/a8LaaL1P834BiX8GVMFNeSwSSKskdTSzHwSBYgQv246lW+leq0uV2lBeQOgZ nSF2NWHrzPGtIE4ijaQR5WWSqlmxieWmj+He3ART5/nFsbJkmOpPYQa5EwQUygf/4HUU /1e5Fvuj3rilgPsuvzR/QP2XYdH5RxzigcHpxMINYdaqPBwMQIBdgE+ZcV6sm0zdAMNI TVAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EVqjUCkf; 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 h3-20020a056a001a4300b005631aaf81f2si13897107pfv.183.2022.12.27.04.11.09; Tue, 27 Dec 2022 04:11:18 -0800 (PST) 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=EVqjUCkf; 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 S231550AbiL0MFz (ORCPT + 66 others); Tue, 27 Dec 2022 07:05:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231540AbiL0MFa (ORCPT ); Tue, 27 Dec 2022 07:05:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A316DB48C for ; Tue, 27 Dec 2022 04:04:44 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 54F98B80EBF for ; Tue, 27 Dec 2022 12:04:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00199C433EF for ; Tue, 27 Dec 2022 12:04:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672142682; bh=YRZYZEZqxhYz5HBI5rM384SwiIQ90WVN3HJ7bun9/a0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EVqjUCkfapdmI9fQVM8aeq3aaV98lO3nKYfv5e1o+RB6571DKPWZsgjCSVyAuoXH1 Ey3OVUuLPu5lKDURZz8cDsGvjuMTVVCnX1ax26FnGERZ1JjJOs2e8mBcc+zPrrlnNe sx7f9tSDohEoK0mWuTaTEsgf0JvLaMPzteYFoV9NT6jfZd4qlNQViEJ9EkVNxlNxvl XXlAR4uPEQIg2G/xLPBjZK1yH7Xwi3GtgB4gYAXRSgEpk3JWcDqpC1XZOsSBkfp9S/ 7q3EG7niuCqhVGxibmrOcaJbq0EG31/HBbst2lucVC1Q6bUe2AiKFOWggbDYQ8jXq0 trNs/QNqQU1Ww== Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-46198b81e5eso181503767b3.4 for ; Tue, 27 Dec 2022 04:04:41 -0800 (PST) X-Gm-Message-State: AFqh2kpUTNQ95Y5BrjKgLNfpWgapcNLxY/7b7SYkQtD6g62iwGZpPoml OfJJWjM27D6Mxtbu54+ynKceVjoQm+G/WQ0Yvqg= X-Received: by 2002:a81:1c54:0:b0:45b:1789:fe4c with SMTP id c81-20020a811c54000000b0045b1789fe4cmr1854507ywc.182.1672142681055; Tue, 27 Dec 2022 04:04:41 -0800 (PST) MIME-Version: 1.0 References: <20221226213227.26953-1-ogabbay@kernel.org> In-Reply-To: From: Oded Gabbay Date: Tue, 27 Dec 2022 14:04:14 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] habanalabs/uapi: move uapi file to drm To: Greg KH Cc: airlied@gmail.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.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 Tue, Dec 27, 2022 at 9:26 AM Greg KH wrote: > > On Mon, Dec 26, 2022 at 11:32:26PM +0200, Oded Gabbay wrote: > > Move the habanalabs.h uapi file from include/uapi/misc to > > include/uapi/drm, and rename it to habanalabs_accel.h. > > > > This is required before moving the actual driver to the accel > > subsystem. > > What requires this? Isn't this going to break userspace code? Yes, most definitely it will break userspace code. Moreover, the patches I'll send in 1-2 weeks to change the device char files will also break it. Having said that, I'm not worried because I don't believe anyone is working with the upstream version because there is no NIC support (yet). If this is unacceptable, I can offer a couple of alternatives and we can discuss what's best: 1. Do what AMD did a couple of years ago with radeon and amdgpu. We keep the habanalabs original driver in misc to support Goya, Gaudi1 and Gaudi2 (only with the current features). Create a new habanalabs driver in accel that will support only Gaudi2 and beyond. Our NIC driver (which I will start upstreaming in a few months) anyway will only support Gaudi2, so it will only work with the new driver. Make the drivers mutually exclusive in Kconfig. Gaudi2 as-is will be supported in the current driver, but if users want to use new features (and NIC), they will need to move to the new driver. 2. Move the driver to the new accel, but keep a copy of the uapi file in misc (to prevent breaking include paths). In addition, expose both new accel device char file (through drm code) and current habanalabs char file. Users can "acquire" the device through either /dev/accel/accel0 or /dev/hl0. Add new uapi content only to the uapi file in include/uapi/drm. This is what I'm going to do in our internal tree that we release as an out-of-tree driver to customers. 3. Keep the driver in misc. Clone it to accel only for next-gen ASIC, whenever that may be. WDYT ? I'm sure there are additional variations of the three options above, or a different option entirely. Thanks, Oded > > thanks, > > greg k-h