Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2371856ybb; Sun, 12 Apr 2020 04:25:25 -0700 (PDT) X-Google-Smtp-Source: APiQypKfzHPbuc2yKa8AsVMdYTldBAg169qDhUg/7TLGbpfuDZ3utA/z1jGhlikBNaSW7OU/W+v+ X-Received: by 2002:a37:63d4:: with SMTP id x203mr686195qkb.391.1586690725279; Sun, 12 Apr 2020 04:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586690725; cv=none; d=google.com; s=arc-20160816; b=L176VSbRAWbwuhuFBJgY7L+bff0So+bAnke6yUBgjh+94T0OpXiQDRvWGk78px9hLH 3osM3aSm6nlinCPUiV1tvrWWs7bdryl3L8lL29+txzmk56389VuI2dWx49lksqoHeU0M vCafhHmYa4x/xtw6PSgkUww0xYHDZWhoD/VNCWfCCuM0e8GVPvDzKO1rGcMuZaRQ7qyC EpfnhyiBZOwM52sOUNBukZW0hQXu2Z1kkPwqXtT42szTzTScFsAa/nEyVLAvJHLBlfYZ icESYSCN/GEp9EazxrNTo/qukkq4GPLG+TVA7rVo+QS/KcfRi6gDXscFVXedggu+NvuA Zg8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=PXt6ldfdgTBBz+Ovz4aKtjca6cFR9HfAUfqGizJCNE4=; b=xVHMNuIOVtdwJZORCX8jQOyoUWDXFOuhfoL7DmVSeJEzAS5gUtPMYS8/sE0jIqqW8j LREkryFzYiYI1P/fMgaZMpugqpkOjmiNk8w+xbWWsTgPG21uGgJtshwgSVE9rBnlVmsT 7VuSyskxQu5peomGdw0P5DuRN4YKV0kfB+QCThrrpqATpCigWN1hwnuy7Z/BBcgIyJ6J zik3xxlkdNgo9V3Dq2UFEgR50VCLUohfUHd4+JcnVRUxeSqWgY3SmWYFU+5qZJvhNGwH lfhx9UnS7WZr1lZ4n5ABnqFTP/mWEYbZTM9n6pnSEY35Hey59CxeFcsKCn6IqNiB3G6l I/6Q== ARC-Authentication-Results: i=1; mx.google.com; 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 l203si4652433qke.210.2020.04.12.04.25.10; Sun, 12 Apr 2020 04:25:25 -0700 (PDT) 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; 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 S1726982AbgDLLY2 (ORCPT + 99 others); Sun, 12 Apr 2020 07:24:28 -0400 Received: from m17618.mail.qiye.163.com ([59.111.176.18]:7259 "EHLO m17618.mail.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbgDLLY2 (ORCPT ); Sun, 12 Apr 2020 07:24:28 -0400 Received: from ubuntu.localdomain (unknown [58.251.74.227]) by m17618.mail.qiye.163.com (Hmail) with ESMTPA id 58C9C4E1659; Sun, 12 Apr 2020 19:24:23 +0800 (CST) From: Wang Wenhu To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: rdunlap@infradead.org, kernel@vivo.com, Wang Wenhu Subject: [PATCH v2,0/3] drivers: rpmon: new driver Remote Processor Monitor Date: Sun, 12 Apr 2020 04:24:02 -0700 Message-Id: <20200412112405.24116-1-wenhu.wang@vivo.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200411095301.18780-1-wenhu.wang@vivo.com> References: <20200411095301.18780-1-wenhu.wang@vivo.com> X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZSFVJT0lLS0tKS0lCQk1DSFlXWShZQU hPN1dZLVlBSVdZCQ4XHghZQVk1NCk2OjckKS43PlkG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MiI6Eww5Hjg2TxQpMSwiNDcP NRdPFCJVSlVKTkNNTUJLTU1OTU9OVTMWGhIXVQweFRMOVQwaFRw7DRINFFUYFBZFWVdZEgtZQVlO Q1VJTkpVTE9VSUlMWVdZCAFZQUhNT0w3Bg++ X-HM-Tid: 0a716e2224699376kuws58c9c4e1659 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RPMON is a driver framework. It supports remote processor monitor from user level. The basic components are a character device with sysfs interfaces for user space communication and different kinds of message drivers introduced modularly, which are used to communicate with remote processors. As for user space, one can get notifications of different events of remote processors, like their registrations, through standard file read operation of the file descriptors related to the exported character devices. Actions can also be taken into account via standard write operations to the devices. Besides, the sysfs class attributes could be accessed conveniently. Message drivers act as engines to communicate with remote processors. Currently RPMON_QMI is available which uses QMI infrastructures on Qualcomm SoC Platforms. RPMON_QMI implements a kind of communication routine for RPMON to communicate with remote processors through QMI infrastructure. RPMON_QMI itself is designed as a modular framework that would introduce different kind of message sets which are binding to different services. RPMON_QMI creates a device of rpmon_device type for each remote processor endpoint. All the endpoint devices share an unique set of QMI suite. RPMON_QMI_MSG_V01 implements a RPMON_QMI message set for connection check. RPMON_QMI defines its message types modularly. Each rpmon service binds to a message set and introduced as a module. This version 1.0 message set could be used for connection checking of remote processors. RPMON_QMI messages depend on QCOM_QMI_HELPERS and should be updated together with QMI related modules. Changes since v1: - Addressed review comments from Randy Wang Wenhu (3): driver: rpmon: new driver Remote Processor Monitor driver: rpmon: qmi message version 01 driver: rpmon: add rpmon_qmi driver drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/rpmon/Kconfig | 54 ++++ drivers/rpmon/Makefile | 3 + drivers/rpmon/rpmon.c | 506 +++++++++++++++++++++++++++++++ drivers/rpmon/rpmon_qmi.c | 431 ++++++++++++++++++++++++++ drivers/rpmon/rpmon_qmi.h | 77 +++++ drivers/rpmon/rpmon_qmi_msg_v1.c | 242 +++++++++++++++ include/linux/rpmon.h | 68 +++++ 9 files changed, 1384 insertions(+) create mode 100644 drivers/rpmon/Kconfig create mode 100644 drivers/rpmon/Makefile create mode 100644 drivers/rpmon/rpmon.c create mode 100644 drivers/rpmon/rpmon_qmi.c create mode 100644 drivers/rpmon/rpmon_qmi.h create mode 100644 drivers/rpmon/rpmon_qmi_msg_v1.c create mode 100644 include/linux/rpmon.h -- 2.17.1