Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2349567ybv; Fri, 14 Feb 2020 16:59:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzM1kj0j7hMidPkhn2vfkWib7j6UBbc7YMrauwtfXdhmx8QTXNbdL3p8pTRjoOp1n+o8xqb X-Received: by 2002:a9d:51c1:: with SMTP id d1mr4228558oth.136.1581728369099; Fri, 14 Feb 2020 16:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581728369; cv=none; d=google.com; s=arc-20160816; b=UZ6S2UPL3fXQgqT+T5XE+M/RRxk3yvmJqp6zELDHQbpc8qhLzAB4/aaBWAscDCHuqJ Ajfi7juILuX5hIzdXqq86f+KWbit90VEfX5DoWsdW8KllGua/G/jYtfxvK3RTvWHoSPa OEVq9LpMwVNgXY0cwrWMJ1KN8sLszOmBJLFBuaFe7qUswWoLaLuNjkrHpplf2yI6lUZC 2+DE7zy7aGXhoW4YysfYXxQw9D0wONDdhd/rsi4mZmfE0A+5xU5DAis6hHJX9L9ewTmi XAHoHhQeaQP5duzFj9p/8B15RyEpCzuXkN/YSFJjmfGdm0iMYm0J2dqIXWQqudKHY5CU 1bHQ== 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=ED0h8n5+Fh0tebxikC0UfNpm5b9aYxWhZjqFZOqyBLU=; b=jmnVbjczlybkoV+cMoF8noAahBcxF7Zpp5qNHBGB8+fzL9KqKUFDie2OVOv8vOxmYi sxnG/cOnBmzBobm4ckcXw/RRMplBHc9/H7WSAKLKeYQ6LEnQmVMmdw3UkkneJf+huvla I93tUIn8FMscauwbHIP8WI8RTKDPxrHe5QFbPxKmWfmdRchVtwzMdWULWazXLGHGghZ1 K/WIwPB/w4EZ+IFjypAA8BCGgb5Yc0k/ZEjYEhwVsN6HZng1hlOHz53VnPmoyZ6ezX/e d0l90ldY6X2fxlHLhQtal0QPhnHlwkEgy4yPcgLJCZai1We/RvrhuUVuwF5HPHdYHPFY QbcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LJ7VCwPE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v141si3288740oif.161.2020.02.14.16.59.16; Fri, 14 Feb 2020 16:59:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LJ7VCwPE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727881AbgBOA6i (ORCPT + 99 others); Fri, 14 Feb 2020 19:58:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:52508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727567AbgBOA6i (ORCPT ); Fri, 14 Feb 2020 19:58:38 -0500 Received: from localhost (unknown [38.98.37.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9BFF720726; Sat, 15 Feb 2020 00:58:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581728318; bh=epAipassIVTXLEk61xbPswQ/wJFZR8JeHH7+aNFL18w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LJ7VCwPEWnIEAj+lS8iPopr8Gi5FgFwj1wdOvOdgCLWp/8gK/V4Ij8yF6l734w1Cf n0D+VkC39CWrj1swmFEjR1TCM2g9XODsAG9y930H/cSJzSGIvYyyXCTw1obME+cKus SU8s68S+0oKLyV1ne3cxnSsHAmp0LQX5c6pSXhaE= Date: Fri, 14 Feb 2020 19:52:35 -0500 From: 'Greg KH' To: Jolly Shah Cc: Rajan Vaja , "ard.biesheuvel@linaro.org" , "mingo@kernel.org" , "matt@codeblueprint.co.uk" , "sudeep.holla@arm.com" , "hkallweit1@gmail.com" , "keescook@chromium.org" , "dmitry.torokhov@gmail.com" , Michal Simek , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 1/4] firmware: xilinx: Add sysfs interface Message-ID: <20200215005235.GA32359@kroah.com> References: <20200124060339.GB2906795@kroah.com> <2D4B924A-D10C-4A90-A8E6-507BF6C30654@xilinx.com> <20200128062814.GA2097606@kroah.com> <4EF659A1-2844-46B9-9ED6-5A6A20401D9D@xilinx.com> <20200131061038.GA2180358@kroah.com> <20200131093646.GA2271937@kroah.com> <3ef20e9d-052f-665c-7fc8-69a1f8bc9bd2@xilinx.com> <20200214171005.GB4034785@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 14, 2020 at 04:37:16PM -0800, Jolly Shah wrote: > > Just make the direct call to the firmware driver, no need to muck around > > with tables of function pointers. In fact, with the spectre changes, > > you just made things slower than needed, and you can get back a bunch of > > throughput by removing that whole middle layer. > > > > arm,scpi is doing the same way and we thought this approach will be more > acceptable than direct function calls but happy to change as suggested. Just because one random tiny thing does it the wrong way does not mean to focus on that design pattern and ignore the thousands of other apis/interfaces in the kernel that do not do it that way :) > > So go do that first please, before adding any new stuff. > > > > Now for the ioctl, yeah, that's not a "normal" pattern either. But > > right now you only have 2 "different" ioctls that you call. So why not > > just turn those 2 into real function calls as well that then makes the > > "ioctl" call to the hardware? That makes things a lot more obvious on > > the kernel driver side exactly what is going on. > > > > Sure as i understand firmware driver will provide real function calls to be > used by user drivers and underneath it will call ioctl for desired > operation. Please correct if I misunderstood. You do not misunderstand. thanks, greg k-h