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 29E6BC433E0 for ; Wed, 17 Jun 2020 13:32:38 +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 E90BF21532 for ; Wed, 17 Jun 2020 13:32:36 +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="JsKpOiA4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ZfrngbR8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E90BF21532 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 1jlYAe-0001LE-3E; Wed, 17 Jun 2020 09:32:04 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jlYAa-0001Ky-JQ for kernelnewbies@kernelnewbies.org; Wed, 17 Jun 2020 09:32:01 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 036025C009C for ; Wed, 17 Jun 2020 09:31:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 17 Jun 2020 09:31:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=88BLoiYBeMQi5mAC6irRi69OpeW ZmmvjTXZhdePAsk4=; b=JsKpOiA4hjQC9jg/esL7QinDKRS7jq1Vro2JAP9EHCV ueWMTyNfaldDmF1HCLWw1gSdlDm62zIvBnkgiRrX4qMMeoFCbJvDVK9x3a5jVEnG 5lFlQy1eJlxv3svoSFyzvY1DMfZ+7h01w4Quz/6r9yQu9lzmScphBgEFU2E53ude 8MaLLCf8IbPWKUDYP0sH2PnOlKk1jXfCK0Rizk7Lr9biSVy1bX1XLiR1XI8EBeu5 MLOJJwltCTJUH2Cp6OtIglamkdQl2WtkcBKxk4wk6tDnZZisNdVQnvnUwT4iNH8y zJG+kkBeG+epfgC9yiO1asYIfEp5208jxjXq2pUvfRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=88BLoi YBeMQi5mAC6irRi69OpeWZmmvjTXZhdePAsk4=; b=ZfrngbR8lP+0r6P12tB6fA UPbTn6U9EXkjJxNXEkdECle0wf/0DZI4I6GNRb0u4eu+tCtA2EJFELyO6CMVKli3 dwfkJpuuo9cIfaMuuOZB483NDW8xM3dBE23P33HbblLpkLXlKAAFqoPnLXzt0DzR 79lxbdDcotMy5K5k8jkaWcjxFfk4wAdBbWVRmt95Fwd+3dLyTcJ4JFcAlF4DcF32 fQhudhdu60GX1QBo9pA6IofK/bNCvZt7DBoAeUM37uT97k074x8iSnGQAfzDRfyb 0BqSGVT6pneqowxzHaPL972iFIHyCGqpSSeqehQKVgX+JCy1icOARg2G978pnuiw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejvddgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre dttddtvdenucfhrhhomhepifhrvghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheq necuggftrfgrthhtvghrnhepveeuheejgfffgfeivddukedvkedtleelleeghfeljeeiue eggeevueduudekvdetnecukfhppeekfedrkeeirdekledruddtjeenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtg homh 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 6AFDC3280059; Wed, 17 Jun 2020 09:31:57 -0400 (EDT) Date: Wed, 17 Jun 2020 15:31:48 +0200 From: Greg KH To: kernelnewbies@kernelnewbies.org Subject: Re: the cost of EXPORT_SYMBOL_GPL Message-ID: <20200617133148.GA2314715@kroah.com> References: <20200616132714.GA4019625@kroah.com> <20200617085534.GA1732069@kroah.com> <20200617094119.GA1940079@kroah.com> <20200617123528.vyxryhhfh7n5f33p@viti.kaiser.cx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200617123528.vyxryhhfh7n5f33p@viti.kaiser.cx> 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 02:35:28PM +0200, Martin Kaiser wrote: > Hello Greg and all, > > Thus wrote Greg KH (greg@kroah.com): > > > Please do not do that. There are valid kernel apis to grant access to > > registers easily, > > the most simple case would be a "reset reason" register within the > chip's address space. A hand-crafted driver would ioremap the region and > implement a sysfs show method that reads the register. No, that's not what sysfs is for. You would export this in the proper way that "reset reason" expects. > What do you recommend for providing read access to such a register > via sysfs? Is this a job for the userspace I/O (UIO) subsystem? If all you want is direct memory access to userspace for stuff like this, what's wrong with /dev/mem ? If you want access to memory and interrupts to do it all in userspace, then yes, that's what UIO is for, use that please. thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies