Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1509051ybz; Thu, 16 Apr 2020 10:23:00 -0700 (PDT) X-Google-Smtp-Source: APiQypKNWkVBT0kK1aIvE2N8ofouvyioFybosidSGyAhpV3WgRVCU+htrZv7Rht5enJ8nMof9PrI X-Received: by 2002:a50:baa6:: with SMTP id x35mr16853961ede.54.1587057780215; Thu, 16 Apr 2020 10:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587057780; cv=none; d=google.com; s=arc-20160816; b=B7OrmKRsrrI6wTxAZLmHSQ4dUnEQMr/B02NodfFYeJC7CGg6xpxfevzcmbQvvL9c+z xP+VnUMqY9LCwu0tmBatA6h34CE37pOTEp9LaY0wU3BocQRqLOKQplg0Yz9rt/+gfhln 5QNpzCTtQ1OU5YrMzZuAXuZNzvJWtmYL/g2tBUwDPrAaPkvR4ML8L08wq84MSyU7Ggox S7Q/wMan5Wag7Jh6IMwGoF9mzCTbp7ujLMERQrztNgTAczfZ4RyBY+gNUo0g9qXP3x0R bbMUI68CsSDesDojbZLAOU5xEz+MvSyFqckoVlNxSCoKYsNfMw8CvrbhpJqbwqSOQPPd lTRQ== 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 :message-id:date:subject:cc:to:from; bh=lH5dvh9P/oVghaP7adAAhPAtPezTk4QnnIcGZYakNfM=; b=DlSPpzx5HzNbswqavo4VFez538Hcj1aifrvU3dYkNTY3S28ovWiyESXVMfLfs0NvDf TK4ybYq0Q2PjeynzbuE0naYjhfEpd8jPTmdGcaxAeNdF1mp2XhPBdKnLmVinqwT1FXzx EkBiOpy/Wl4y5HF/w90Vkx3eOHXTIV475Bh8kXZp3bKYqaeC0AO8OO8uOTn7dxiSzwYC 7znU4T/3+RVY3tRflhUfv+MiTXKW9ofdmdVhBNfnoDbfBkYSJXgsZKiS/LLJwod/1cEb UyXMH5JWDAQ62tBmdnFNpn64DdcdoWHzl9OYYylvvV2SSDNxA0hXuGYM28MM0bXL45r0 Wtfw== 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 w20si4061991ejq.91.2020.04.16.10.22.36; Thu, 16 Apr 2020 10:23:00 -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 S2633219AbgDPL1m (ORCPT + 99 others); Thu, 16 Apr 2020 07:27:42 -0400 Received: from m177134.mail.qiye.163.com ([123.58.177.134]:58079 "EHLO m177134.mail.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506183AbgDPLQn (ORCPT ); Thu, 16 Apr 2020 07:16:43 -0400 Received: from ubuntu.localdomain (unknown [58.251.74.226]) by mail-m127101.qiye.163.com (Hmail) with ESMTPA id 9752248233; Thu, 16 Apr 2020 19:16:35 +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 RESEND,v3,0/4] drivers: uio: new driver uio_fsl_85xx_cache_sram Date: Thu, 16 Apr 2020 04:16:05 -0700 Message-Id: <20200416111609.4191-1-wenhu.wang@vivo.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUlXWQgYFAkeWUFZTFVJSENCQkJDT0hOQkxPSllXWShZQU hPN1dZLVlBSVdZCQ4XHghZQVk1NCk2OjckKS43PlkG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OUk6Fjo6GjgwFg8iLw4LMxke KBEwCjFVSlVKTkNMS0hOTEJDS0tOVTMWGhIXVQweFRMOVQwaFRw7DRINFFUYFBZFWVdZEgtZQVlO Q1VJTkpVTE9VSUlNWVdZCAFZQUlCSk43Bg++ X-HM-Tid: 0a7182b471ac9865kuuu9752248233 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