Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3090406pxb; Mon, 24 Jan 2022 02:07:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3W5rSUgsVf8+QHZLLLFBUiO7KWLb3zn3rKqkDO0a7O6FL/esdqDy351+BoYG0/ySNYvHp X-Received: by 2002:a17:90a:7e8a:: with SMTP id j10mr1147647pjl.13.1643018869539; Mon, 24 Jan 2022 02:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643018869; cv=none; d=google.com; s=arc-20160816; b=zjsluWuOezULD4BHpdGe/Yfjj5VGpoo0iujwXDk26DFiQxbncwyuqZrGwhxjm72Pjy gBWAYvT3FIlQqD05Y0tdFKfl0gp/EQXDwGQoXjlCjfxV+XD+EeZnW2Ld/DOuQTyG6OYN HYZ1p0SEEdS8rOrLaP8nlJWXDSWj1Fh8JApyQC+OBUyYbI89q8ViTcgdKmr3bhDtRq/X CCNrDKNCAqPZFcOItK4oq0rH7pYGtN5AXwt9JXp1ZTilvpzG40Iez6/hc5X8ZkaD5Ui+ LHLFCoNjYpbZpO/RvHUICwKzifmiAMaF+Q2IbnZ5cK/DFnD+hwhp+VJ5816jMe4AXgVO RNUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/XJa6NgllmWwMAvULn7iqvVIiuNMFYWRB3oyBrfWSVw=; b=BB8DqEeZa14e14KqHB1kiWLtqCSjY8BH/RjtMbO6Wdx6ERbX8d+iKBB0ddofBzuP+G /+Xq53vR0aHfWxw9xlcQHJD/+pAeoA+Z5La2HWVIgS00hIeJvvA5J2mdDgrypVuvMp2M ZN0MOOzLfL5IFhG+eh8DZRzAOglfalxZHVPOQiCi8robeYQJusr+MqxGr+MWHHEllOiQ 8f/VeNvtCh8AJM6BFe7/FavoGYPUnBe9Q7mIJQoTv0nQ0wg4OagUam+1ICIDLB4lFh2R No6jmKF1syeD7xBmPpnsBJDyYjVQ6BPWGgObqzBl0EkhREFBIpI3he51QAn2KfqaIo09 Rt6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E+Z8K22c; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si15720027plh.339.2022.01.24.02.07.38; Mon, 24 Jan 2022 02:07:49 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=E+Z8K22c; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238412AbiAWQIo (ORCPT + 99 others); Sun, 23 Jan 2022 11:08:44 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:60890 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238406AbiAWQIn (ORCPT ); Sun, 23 Jan 2022 11:08:43 -0500 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 21E9960F7E for ; Sun, 23 Jan 2022 16:08:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D919BC340E4; Sun, 23 Jan 2022 16:08:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1642954122; bh=ExT9K/VARuNRP16/Jqu6RgZol1HI4WOkK1n71Pls1Pw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E+Z8K22c20bxkDXKfIvyvGrfgZNwTnUZit4yjFBSymkiHhs1yQctiN0dQOwiXlz8J uFs/coWsaH5Vmq8JHkz5BlqVJgY6MXJLUUY1KxqFe3RIyLHvBoznLsaixxqKwZdqE1 GiSUH7BefJgSAZX0RIzIGc6woGBNZQaS0tDxh3Cc= Date: Sun, 23 Jan 2022 17:08:39 +0100 From: Greg Kroah-Hartman To: Oded Gabbay Cc: Cai Huoqing , Arnd Bergmann , "Linux-Kernel@Vger. Kernel. Org" Subject: Re: [PATCH] habanalabs: Remove unused enum member DMA_SRAM_TO_SRAM Message-ID: References: <20220111114724.7987-1-cai.huoqing@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 23, 2022 at 06:01:53PM +0200, Oded Gabbay wrote: > On Sun, Jan 23, 2022 at 5:04 PM Greg Kroah-Hartman > wrote: > > > > On Sun, Jan 23, 2022 at 04:43:15PM +0200, Oded Gabbay wrote: > > > On Tue, Jan 11, 2022 at 1:47 PM Cai Huoqing wrote: > > > > > > > > The driver don't support the SRAM-to-SRAM translation of DMA, > > > > so remove 'DMA_SRAM_TO_SRAM'. > > > > > > > > Signed-off-by: Cai Huoqing > > > > --- > > > > drivers/misc/habanalabs/include/goya/goya_packets.h | 1 - > > > > 1 file changed, 1 deletion(-) > > > > > > > > diff --git a/drivers/misc/habanalabs/include/goya/goya_packets.h b/drivers/misc/habanalabs/include/goya/goya_packets.h > > > > index ef54bad20509..25fbebdc6143 100644 > > > > --- a/drivers/misc/habanalabs/include/goya/goya_packets.h > > > > +++ b/drivers/misc/habanalabs/include/goya/goya_packets.h > > > > @@ -36,7 +36,6 @@ enum goya_dma_direction { > > > > DMA_SRAM_TO_HOST, > > > > DMA_DRAM_TO_HOST, > > > > DMA_DRAM_TO_DRAM, > > > > - DMA_SRAM_TO_SRAM, > > > > DMA_ENUM_MAX > > > > }; > > > > > > > > -- > > > > 2.25.1 > > > > > > > > > > This is a general spec file in our s/w stack, and therefore a change > > > in it in the driver will cause our driver to be out of sync with our > > > user-space stack. i.e. the value of DMA_ENUM_MAX will be different in > > > the driver and in the user-space stack. I don't know if there will be > > > any consequences but I prefer not to risk it. > > > > If this is synced to userspace, shouldn't it be in a uapi file with a > > specific value associated with it? > > > > thanks, > > > > greg k-h > > Yes, it was a mistake from day 1. A mistake we didn't repeat in future ASICs. > I take great care of putting anything that is synced between driver > and userspace in our uapi file. > > Having said that, after almost 3 years of having this mistake, I feel > it is not too disastrous to leave it as is. > Our Goya s/w stack is pretty much stable and I don't want to make > changes without good reason. You should just move this to a uapi file to show that it is something that can't be changed. Can't you do that without breaking anything on the kernel side? Otherwise maintaining this is going to be hard as no one has a clue that this is a value that userspace uses. thanks, greg k-h