From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDCE0C433E0 for ; Wed, 17 Jun 2020 08:56:22 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D01C208B3 for ; Wed, 17 Jun 2020 08:56:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="ZqUFyN7D"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GCLah6Bb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D01C208B3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.93) (envelope-from ) id 1jlTrI-0002W1-7b; Wed, 17 Jun 2020 04:55:48 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jlTrF-0002Vu-UE for kernelnewbies@kernelnewbies.org; Wed, 17 Jun 2020 04:55:46 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 638FC5C00F1; Wed, 17 Jun 2020 04:55:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 17 Jun 2020 04:55:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=2ovW/x6dDoINPNbCFgWd+GfvrgF 5h8YakDQmlc+leS8=; b=ZqUFyN7DjZ3HjznU3Bm5DxHB+3PzW8NhVGKXfzrTOHZ 7bjYKQbh/CWMmYLMbN4JtfDUL05SoBCKY/pwGdlm+GYixLotPH+04UrAE81DTeu9 ad5A7c+K5DP1eyuPntTr/RmPol6SacmQXRnaTZso8rLXYgbx8UwWot73PiYfUB+v HGnaHJKDXPiuARSjP040X7SbT+p/4dyp/s9sKwS7OR3wrSXXYri+/5ZFTPv8p3e4 IZKtMSRs7UBpGe28s0w46s7I6tl91REpnk2EPACViVHW28UdnYFd+pX/6epN7Y6A ptKYX6i2ozask6f2OaOxf/vC8F44CcDSKLuZ8tL4HnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=2ovW/x 6dDoINPNbCFgWd+GfvrgF5h8YakDQmlc+leS8=; b=GCLah6BbIIIfmZ1gGgquPW z7CVOD+W8waQFjaw2lT0BIiUVBg6TMbSE8XfpMv8U3nC5XMNmW0k9tuMwX5P6GPv sZ97hy9jpNXe73p02oTsNwcVvzFg9bYggUk7G1x1s4u4yEgKwl/XuVxqYYk9wJ8q GvzvCScQm5+ecJm9m7RISmGEfOqgj3TSel95oS2dNFIRRxLP0QIsIaVIWrZTBQ8L RBeTSA8hgorseOGE55mbAH1VqkQFm2pQj1ZKjZvfOcha0LNYS5RKb1/hGOovS72v GNF1OAktKhLOrz/yeCe1nUrsf+hxXMpW9p/JeBU2VBPUR6M+372V1P8ibswYpOUw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejvddgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevueehje fgfffgiedvudekvdektdelleelgefhleejieeugeegveeuuddukedvteenucfkphepkeef rdekiedrkeelrddutdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 889D23280060; Wed, 17 Jun 2020 04:55:40 -0400 (EDT) Date: Wed, 17 Jun 2020 10:55:34 +0200 From: Greg KH To: Tomek The Messenger Subject: Re: the cost of EXPORT_SYMBOL_GPL Message-ID: <20200617085534.GA1732069@kroah.com> References: <20200616132714.GA4019625@kroah.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Wed, Jun 17, 2020 at 09:58:03AM +0200, Tomek The Messenger wrote: > Hi > Thanks for reply. > We make some proxy layer in linux /sys. So for example we have directories: > /sys/resets > /sys/routers Really? That's a total abuse of sysfs, don't do that. Seriously, that's not ok at all. > etc. > So if user wants to get to know what is the reset reason he doesn't use > devmem 0xfff...., he just read the file in /sys/resets/.. > If user wants to know some routing path he doesn't read registers via > devmem, he only reads some file in /sys/routers which gives him output. > So this is in order to facilitate reading/writing to registers. Instead of > searching in documentation concrete registers users have some helper proxy > layer in sysfs. And for each directory in /sys there is separate kernel > module. Division is based on some functionalities like resets, routing etc. > And the problem is should this 6th kernel module perform role of getting > access to all registers or only to parts which are used by more than one > kernel module? Now I am using second approach but when I am looking at the > code it looks terrible. For example #define for register X and function to > access it, is in module A, for egister Y in module B, for register Z in 6th > kernel module. There is mess I think and maybe better approach is to put > all API to 6th kernel module? I really do not understand at all, sorry. Why are you using sysfs for something that it is not designed for? And sysfs directory structure has nothing to do with kernel module names/structures. Do you have a pointer to your code somewhere so that we can review it and suggest the correct apis you should be using instead? thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies