Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4437012ybb; Tue, 14 Apr 2020 07:19:05 -0700 (PDT) X-Google-Smtp-Source: APiQypKh3t4ip/3uGSnB1JwQpLlGSRESHaZzGiJ/iXRnyvT0PMfKzusXjlDyteyvnshck5aZqDnX X-Received: by 2002:aa7:ccd0:: with SMTP id y16mr21622335edt.36.1586873945672; Tue, 14 Apr 2020 07:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586873945; cv=none; d=google.com; s=arc-20160816; b=vgBisNa9dbYenXjAEUS/tG8UNEwQjYiXic3wVW/r/IZbiBSOWPiHa3qqf22bdm5dG7 34raGMKcbflHmTLXpZrhl2dr2QCQn3GOPwNMlbclg4Lixw8vnmJSNl5N1LGmezzf58Mz AL6Umy0aJWWJbhDPOhhVmnkc3F4UoNyKh93Pkp3ZevrLoNjeguugPFvyLkKhYhZ06Oqz j78WVQgCZzc29jAEf2KFGa8kkjcLrp/BZjt8dWbo3pZo3fadxnR3K5SjCL36jwmhFXfX xT8/nqv6GJfnpdQT89SGe281xt5+iQn2HJV2bK+N/ng6H/XG8e3PwkBE0QvAEa6DlDA6 m11A== 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=zQxtZrPiUOTkvGf3tDHQDr/6Gjm/HtW79v1lI4rr1aA=; b=nhd+kihnhzhJAj1cjodMJPhF7nmlKIzWRsgiFhMiaucZVebpd5n7Lh6K0HyAafBq/O vw3z30KAs7oLAmRszhbtXydKVIJx7WcLgdRwv5CyAxXIdiFt0352BGb24XGYYSrkStL1 LAF+RnAVc6bx5XcrzE8N5esC8vIw40UrBVbCfmhkT24vZPRzfytOm7RguG+DD5clUazM FS0EAo4kYl8RGcNyf10TIK+PhmMLqO1vJNlelXy6IMTtUOQ3N1QZRtyrHlamwjYf/1Ot LCHJ6SGeyqzQD8HYFjjAf0FB3y0c/dNjA+Eq06+cVIByqDyw92J88wWTJR2Co+9qY9v/ DJiQ== 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 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 i12si2450338edq.35.2020.04.14.07.18.41; Tue, 14 Apr 2020 07:19:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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: best guess record for 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 S1725857AbgDNEAe (ORCPT + 99 others); Tue, 14 Apr 2020 00:00:34 -0400 Received: from m17618.mail.qiye.163.com ([59.111.176.18]:13176 "EHLO m17618.mail.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbgDNEAe (ORCPT ); Tue, 14 Apr 2020 00:00:34 -0400 Received: from ubuntu.localdomain (unknown [58.251.74.227]) by m17618.mail.qiye.163.com (Hmail) with ESMTPA id 9C8F94E2131; Tue, 14 Apr 2020 12:00:17 +0800 (CST) From: Wang Wenhu To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: rdunlap@infradead.org, kernel@vivo.com, agross@kernel.org, bjorn.andersson@linaro.org, ohad@wizery.com, linux-remoteproc@vger.kernel.org, linux-arm-msm@vger.kernel.org, Wang Wenhu Subject: [PATCH v3,0/3] drivers: rpmon: new driver Remote Processor Monitor Date: Mon, 13 Apr 2020 20:59:46 -0700 Message-Id: <20200414035949.107225-1-wenhu.wang@vivo.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200412112405.24116-1-wenhu.wang@vivo.com> References: <20200412112405.24116-1-wenhu.wang@vivo.com> X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZSlVOQ05LS0tLSENKT01CTFlXWShZQU hPN1dZLVlBSVdZCQ4XHghZQVk1NCk2OjckKS43PlkG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NDo6SBw5PTgxQwoeVjMQPhoa TgwaCzdVSlVKTkNNQ0hNQ0lLSktMVTMWGhIXVQweFRMOVQwaFRw7DRINFFUYFBZFWVdZEgtZQVlO Q1VJTkpVTE9VSUlMWVdZCAFZQU9LQkw3Bg++ X-HM-Tid: 0a7176d848409376kuws9c8f94e2131 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 Changes since v2: - Added Cc list - Commit log typo fixing - Use the ARRAY_SIZE instead of calculations of multiple sizeof() - Use micros for qmi message tly_type fields 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 | 76 +++++ drivers/rpmon/rpmon_qmi_msg_v1.c | 258 ++++++++++++++++ include/linux/rpmon.h | 68 +++++ 9 files changed, 1399 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