Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1047805ybz; Thu, 16 Apr 2020 01:39:51 -0700 (PDT) X-Google-Smtp-Source: APiQypJ1pBRVJkx2WGM+9/ItzY2cHghnAYAkGsvcyCJpP5YcqVt4O27xDrS9Qxpwac0YpeA+y3kG X-Received: by 2002:a17:906:7d1:: with SMTP id m17mr8408984ejc.247.1587026391146; Thu, 16 Apr 2020 01:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587026391; cv=none; d=google.com; s=arc-20160816; b=DxhVcUesoo2qrkTlRFMRAN/JsUlCGd9EhMeqQ8ngzCfM/+UW0HCWTwuQaGPiHUdHUl psBB3Ql4W3Flxl8fziOAnZREY8nVLhr5Y2VC/la7ylAZN+oClonDM7HcJWS3iiYKODZk Z7g6VjdvinjVnXu1jHQhFAwxfA3sm/Q4cF8Wt7j6vIbQBaIKKP1B3pDmGTbARyfi3xWW XWRRVPwwcb217dYx9STAn71YlSAoHN+3wz6uZS8sG8BUgizvrabeJS1LYa6WT/uFQmAc 3YDGlcrUVqFZ7vWpwHqPIIcf/CUoLR6QWCfwd5qjgSttArcrF/1ILktR9QoAAckpx7FV LmMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=lH5dvh9P/oVghaP7adAAhPAtPezTk4QnnIcGZYakNfM=; b=VizbhgDj+GMxA4v2UkDpTOFZQh5yaQm/HiaZ0/c7xd9kSuzZOJLSQ2cn5qdwfqbD4G PCQFaZFHxiFGmMrFP12mddehdW0myZ1hpvE4FiTM5NfrcAWIb/1xg3vs6KyOhQHsLf+9 0Edqdwz13LSoC1MuWh2can85KmQv5FbmMk4GyLSIzj8iS1LNxSaCd+ygbttduJfampQ+ Ef7p40lLbp+lM1teKqV0KpWNp6xwa6X+QUlniDfRHLkHfF6gyLcEM5o1B+mlR94Bow+K EMXQr11SSosLviK587MfcwyXq6W8XcQyVD9QfcOZK0AK5Nffzxm+LaxB6ydPzNQ8CmOZ 2IGQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si3891394edu.268.2020.04.16.01.39.28; Thu, 16 Apr 2020 01:39:51 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502510AbgDPIh4 (ORCPT + 99 others); Thu, 16 Apr 2020 04:37:56 -0400 Received: from m17618.mail.qiye.163.com ([59.111.176.18]:8303 "EHLO m17618.mail.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441103AbgDPIfR (ORCPT ); Thu, 16 Apr 2020 04:35:17 -0400 Received: from ubuntu.localdomain (unknown [58.251.74.226]) by m17618.mail.qiye.163.com (Hmail) with ESMTPA id 1F3624E47E6; Thu, 16 Apr 2020 15:49:29 +0800 (CST) From: Wang Wenhu To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, oss@buserror.net, christophe.leroy@c-s.fr, linuxppc-dev@lists.ozlabs.org Cc: kernel@vivo.com, Wang Wenhu Subject: [PATCH v3,0/4] drivers: uio: new driver uio_fsl_85xx_cache_sram Date: Thu, 16 Apr 2020 00:49:14 -0700 Message-Id: <20200416074918.3617-1-wenhu.wang@vivo.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200415152442.122873-1-wenhu.wang@vivo.com> References: <20200415152442.122873-1-wenhu.wang@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZSFVCTkNLS0tKQ0hKS05PTFlXWShZQU hPN1dZLVlBSVdZCQ4XHghZQVk1NCk2OjckKS43PlkG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OhQ6Ohw6CzgrQwghHRM5MzgY DiMwCihVSlVKTkNMS0lISExKTktKVTMWGhIXVQweFRMOVQwaFRw7DRINFFUYFBZFWVdZEgtZQVlO Q1VJTkpVTE9VSUlNWVdZCAFZQUhKSks3Bg++ X-HM-Tid: 0a7181f6d4a19376kuws1f3624e47e6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series add a new uio driver for freescale 85xx platforms to access the Cache-Sram form user level. This is extremely helpful for the user-space applications that require high performance memory accesses. It fixes the compile errors and warning of the hardware level drivers and implements the uio driver in uio_fsl_85xx_cache_sram.c. Changes since v1: * Addressed comments from Greg K-H * Moved kfree(info->name) into uio_info_free_internal() Changes since v2: * Drop the patch that modifies Kconfigs of arch/powerpc/platforms and modified the sequence of patches: 01:dropped, 02->03, 03->02, 04->01, 05->04 * Addressed comments from Greg, Scott and Christophe * Use "uiomem->internal_addr" as if condition for sram memory free, and memset the uiomem entry * Modified of_match_table make the driver apart from Cache-Sram HW info which belong to the HW level driver fsl_85xx_cache_sram to match * Use roundup_pow_of_two for align calc(really learned a lot from Christophe) * Remove useless clear block of uiomem entries. * Use UIO_INFO_VER micro for info->version, and define it as "devicetree,pseudo", meaning this is pseudo device and probed from device tree configuration * Select FSL_85XX_CACHE_SRAM rather than depends on it Wang Wenhu (4): powerpc: sysdev: fix compile error for fsl_85xx_l2ctlr powerpc: sysdev: fix compile error for fsl_85xx_cache_sram powerpc: sysdev: fix compile warning for fsl_85xx_cache_sram drivers: uio: new driver for fsl_85xx_cache_sram arch/powerpc/sysdev/fsl_85xx_cache_sram.c | 3 +- arch/powerpc/sysdev/fsl_85xx_l2ctlr.c | 1 + drivers/uio/Kconfig | 9 ++ drivers/uio/Makefile | 1 + drivers/uio/uio_fsl_85xx_cache_sram.c | 158 ++++++++++++++++++++++ 5 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 drivers/uio/uio_fsl_85xx_cache_sram.c -- 2.17.1