From patchwork Fri Jul 10 13:39:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 11656701 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1CC0D13B4 for ; Fri, 10 Jul 2020 13:41:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 E5A152063A for ; Fri, 10 Jul 2020 13:41:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="esciTGOP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5A152063A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=73Gb/ctjpjMXMI56ccRXSDeD0Nxe2pUpgnTsLZeLZAw=; b=esciTGOP+a1C1CQY9ul+95RLTt 9k65S0YHH+Py/stKC6dHia4nbbMx4c2Jb/wSU6l8/VzbcWxMZDTMD4Gd8pzeHREDgs3rz/WxCBEH9 h0osTfzbSeEDIweXdszo68a1DayHI5nF7scxZdlRcsuQH39AtG5Wqxi9kJ5RfLxuouj4trKwBpvq3 Shl1JE2Fjq8woGyVLjle0s/0GWwq0BcaBRUfWZ2ysXBqg6ohallJvkD6ZEGZJE1fb/l72L0gYKYbB gatFYIyElteQe8RHT7OnstNSSjW9vicdtfgHE6h0v8mYzixFzAORr2OH0x1MccuMQOUlH0azIFX+I xh6opVPw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jttFs-000807-3f; Fri, 10 Jul 2020 13:39:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jttFp-0007yc-CR for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 13:39:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B0B211FB; Fri, 10 Jul 2020 06:39:50 -0700 (PDT) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D38F03F8C6; Fri, 10 Jul 2020 06:39:49 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] firmware: arm_scmi: Remove zero-length array in SCMI Notifications Date: Fri, 10 Jul 2020 14:39:17 +0100 Message-Id: <20200710133919.39792-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200710_093953_484002_2B43F704 X-CRM114-Status: GOOD ( 10.23 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, cristian.marussi@arm.com, sudeep.holla@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Substitute zero-length array defined in scmi_base_error_report with a flexible length array definition. Signed-off-by: Cristian Marussi --- include/linux/scmi_protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 46d98be92466..7d4348fb7330 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -421,7 +421,7 @@ struct scmi_base_error_report { u32 agent_id; bool fatal; u16 cmd_count; - u64 reports[0]; + u64 reports[]; }; #endif /* _LINUX_SCMI_PROTOCOL_H */ From patchwork Fri Jul 10 13:39:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 11656703 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C36F13B6 for ; Fri, 10 Jul 2020 13:41:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 3A16A207BB for ; Fri, 10 Jul 2020 13:41:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="yrffjunv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A16A207BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=anG+Ye1PhJFDq3bWlYQM3DvmyDgpsQAi0K6v0h+31Ik=; b=yrffjunvoPZH0Mtsj2uJqs4LY7 0BJuIq770rMOGX7BJmYv4iDsbiQtY2EaLi3tpQrZylMvG9f9ic17qHrH4WJvUGoY1X1x89FK8RRRx I0XqIACUCQbybxCLbxRbIyZFpJplIyAz5aLgz34KcpA4PpdypDUuPk0cF17TtNe/lH5ZJ2cTkJrtv A06xeyGj+L2puJbJ2qHZKS7m3FOTjLUJxWofQi3zobZHXCTZBLRJMm5JHBDCRolbyw5SlJJPLt2Dn 6F8t/unZ1uZ0Nn6MnuoPpoJ5TxVcaSC8pc58daa3XwO3AV1zN1vfjiiDjk7sFE5DAjD0uTh2cXksw KIxBf7aw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jttG0-00082g-Kb; Fri, 10 Jul 2020 13:40:04 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jttFp-0007ye-N1 for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 13:39:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BCF20106F; Fri, 10 Jul 2020 06:39:51 -0700 (PDT) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E30673F8C6; Fri, 10 Jul 2020 06:39:50 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] firmware: arm_scmi: Remove unneeded __packed attribute Date: Fri, 10 Jul 2020 14:39:18 +0100 Message-Id: <20200710133919.39792-2-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200710133919.39792-1-cristian.marussi@arm.com> References: <20200710133919.39792-1-cristian.marussi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200710_093953_815228_B2B9887E X-CRM114-Status: GOOD ( 10.10 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, cristian.marussi@arm.com, sudeep.holla@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Remove __packed attribute from struct scmi_event_header. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c index c4d006cfde88..752415367305 100644 --- a/drivers/firmware/arm_scmi/notify.c +++ b/drivers/firmware/arm_scmi/notify.c @@ -258,7 +258,7 @@ struct scmi_event_header { u8 evt_id; size_t payld_sz; u8 payld[]; -} __packed; +}; struct scmi_registered_event; From patchwork Fri Jul 10 13:39:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 11656705 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7383114F6 for ; Fri, 10 Jul 2020 13:41:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2AB1C2063A for ; Fri, 10 Jul 2020 13:41:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CfeoR1wB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AB1C2063A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UssBOJYhADz/QAw1O2YriYorvxPtWYKmMjMKHB4JdQA=; b=CfeoR1wBLMAJgAeQ4XMd9qUjJc 7l5a0OUCUd8cwcTDTW8axbRw85URadiuKOqM4r80kex5B/zmGOZ56qDEs2ZRKI/xQuiX+TE/KrSGN HO21Iv+CcSkFjR5rYxw1oUIn9ThLHVSm3jdRC162bmHz+L1RgeoqnyF89Tmhgv/GPP5A3VyqKwFvU dZa0AtbxBKwefMzzGlxTbGbG0gVhGusrzBl6fZm6Esx5Rmsl3ofNlCRNobJjOgOtl4dZpfPdOh7CF +LqqMBIzcCd6mGN5HDBXOPRHb6wYixNq6lY5ztf3R9mQQGq/B0Wgkr4kpkfydv9o6FiWOK/RAWQUp TZJMTeWQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jttFv-000813-9Z; Fri, 10 Jul 2020 13:39:59 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jttFp-0007yi-CR for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 13:39:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C2F3E11B3; Fri, 10 Jul 2020 06:39:52 -0700 (PDT) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F19C23F8C6; Fri, 10 Jul 2020 06:39:51 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] firmware: arm_scmi: Remove fixed size fields from reports/scmi_event_header Date: Fri, 10 Jul 2020 14:39:19 +0100 Message-Id: <20200710133919.39792-3-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200710133919.39792-1-cristian.marussi@arm.com> References: <20200710133919.39792-1-cristian.marussi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200710_093953_552249_2E26408C X-CRM114-Status: GOOD ( 18.38 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, cristian.marussi@arm.com, sudeep.holla@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Event reports are used to convey information describing events to the registered user-callbacks: they are necessarily derived from the underlying raw SCMI events' messages but they are not meant to expose or directly mirror any of those messages data layout, which belong to the protocol layer. Using fixed size types for report fields, mirroring messages structure, is at odd with this: get rid of them using more generic, equivalent, typing. Substitute scmi_event_header fixed size fields with generic types too and shuffle around fields definitions to minimize implicit padding while adapting involved functions. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/base.c | 2 +- drivers/firmware/arm_scmi/driver.c | 4 +-- drivers/firmware/arm_scmi/notify.c | 15 +++++---- drivers/firmware/arm_scmi/notify.h | 8 +++-- drivers/firmware/arm_scmi/perf.c | 2 +- drivers/firmware/arm_scmi/power.c | 2 +- drivers/firmware/arm_scmi/reset.c | 2 +- drivers/firmware/arm_scmi/sensors.c | 2 +- include/linux/scmi_protocol.h | 52 ++++++++++++++--------------- 9 files changed, 46 insertions(+), 43 deletions(-) diff --git a/drivers/firmware/arm_scmi/base.c b/drivers/firmware/arm_scmi/base.c index 54f378e946f1..9853bd3c4d45 100644 --- a/drivers/firmware/arm_scmi/base.c +++ b/drivers/firmware/arm_scmi/base.c @@ -273,7 +273,7 @@ static int scmi_base_set_notify_enabled(const struct scmi_handle *handle, } static void *scmi_base_fill_custom_report(const struct scmi_handle *handle, - u8 evt_id, u64 timestamp, + u8 evt_id, ktime_t timestamp, const void *payld, size_t payld_sz, void *report, u32 *src_id) { diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 19a4287fc0f7..03ec74242c14 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -205,13 +205,13 @@ __scmi_xfer_put(struct scmi_xfers_info *minfo, struct scmi_xfer *xfer) static void scmi_handle_notification(struct scmi_chan_info *cinfo, u32 msg_hdr) { - u64 ts; struct scmi_xfer *xfer; struct device *dev = cinfo->dev; struct scmi_info *info = handle_to_scmi_info(cinfo->handle); struct scmi_xfers_info *minfo = &info->rx_minfo; + ktime_t ts; - ts = ktime_get_boottime_ns(); + ts = ktime_get_boottime(); xfer = scmi_xfer_get(cinfo->handle, minfo); if (IS_ERR(xfer)) { dev_err(dev, "failed to get free message slot (%ld)\n", diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c index 752415367305..4731daaacd19 100644 --- a/drivers/firmware/arm_scmi/notify.c +++ b/drivers/firmware/arm_scmi/notify.c @@ -80,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -246,18 +247,18 @@ struct events_queue { * struct scmi_event_header - A utility header * @timestamp: The timestamp, in nanoseconds (boottime), which was associated * to this event as soon as it entered the SCMI RX ISR - * @evt_id: Event ID (corresponds to the Event MsgID for this Protocol) * @payld_sz: Effective size of the embedded message payload which follows + * @evt_id: Event ID (corresponds to the Event MsgID for this Protocol) * @payld: A reference to the embedded event payload * * This header is prepended to each received event message payload before * queueing it on the related &struct events_queue. */ struct scmi_event_header { - u64 timestamp; - u8 evt_id; - size_t payld_sz; - u8 payld[]; + ktime_t timestamp; + size_t payld_sz; + unsigned char evt_id; + unsigned char payld[]; }; struct scmi_registered_event; @@ -572,7 +573,7 @@ static void scmi_events_dispatcher(struct work_struct *work) * Return: 0 on Success */ int scmi_notify(const struct scmi_handle *handle, u8 proto_id, u8 evt_id, - const void *buf, size_t len, u64 ts) + const void *buf, size_t len, ktime_t ts) { struct scmi_registered_event *r_evt; struct scmi_event_header eh; @@ -595,7 +596,7 @@ int scmi_notify(const struct scmi_handle *handle, u8 proto_id, u8 evt_id, if (kfifo_avail(&r_evt->proto->equeue.kfifo) < sizeof(eh) + len) { dev_warn(handle->dev, "queue full, dropping proto_id:%d evt_id:%d ts:%lld\n", - proto_id, evt_id, ts); + proto_id, evt_id, ktime_to_ns(ts)); return -ENOMEM; } diff --git a/drivers/firmware/arm_scmi/notify.h b/drivers/firmware/arm_scmi/notify.h index 3791bb7aa79b..3485f20fa70e 100644 --- a/drivers/firmware/arm_scmi/notify.h +++ b/drivers/firmware/arm_scmi/notify.h @@ -10,6 +10,7 @@ #define _SCMI_NOTIFY_H #include +#include #include #define SCMI_PROTO_QUEUE_SZ 4096 @@ -48,8 +49,9 @@ struct scmi_event_ops { int (*set_notify_enabled)(const struct scmi_handle *handle, u8 evt_id, u32 src_id, bool enabled); void *(*fill_custom_report)(const struct scmi_handle *handle, - u8 evt_id, u64 timestamp, const void *payld, - size_t payld_sz, void *report, u32 *src_id); + u8 evt_id, ktime_t timestamp, + const void *payld, size_t payld_sz, + void *report, u32 *src_id); }; int scmi_notification_init(struct scmi_handle *handle); @@ -61,6 +63,6 @@ int scmi_register_protocol_events(const struct scmi_handle *handle, const struct scmi_event *evt, int num_events, int num_sources); int scmi_notify(const struct scmi_handle *handle, u8 proto_id, u8 evt_id, - const void *buf, size_t len, u64 ts); + const void *buf, size_t len, ktime_t ts); #endif /* _SCMI_NOTIFY_H */ diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 8bcad96e06ca..3e1e87012c95 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -780,7 +780,7 @@ static int scmi_perf_set_notify_enabled(const struct scmi_handle *handle, } static void *scmi_perf_fill_custom_report(const struct scmi_handle *handle, - u8 evt_id, u64 timestamp, + u8 evt_id, ktime_t timestamp, const void *payld, size_t payld_sz, void *report, u32 *src_id) { diff --git a/drivers/firmware/arm_scmi/power.c b/drivers/firmware/arm_scmi/power.c index 4f6757980739..46f213644c49 100644 --- a/drivers/firmware/arm_scmi/power.c +++ b/drivers/firmware/arm_scmi/power.c @@ -227,7 +227,7 @@ static int scmi_power_set_notify_enabled(const struct scmi_handle *handle, } static void *scmi_power_fill_custom_report(const struct scmi_handle *handle, - u8 evt_id, u64 timestamp, + u8 evt_id, ktime_t timestamp, const void *payld, size_t payld_sz, void *report, u32 *src_id) { diff --git a/drivers/firmware/arm_scmi/reset.c b/drivers/firmware/arm_scmi/reset.c index fb7cb517900b..3691bafca057 100644 --- a/drivers/firmware/arm_scmi/reset.c +++ b/drivers/firmware/arm_scmi/reset.c @@ -240,7 +240,7 @@ static int scmi_reset_set_notify_enabled(const struct scmi_handle *handle, } static void *scmi_reset_fill_custom_report(const struct scmi_handle *handle, - u8 evt_id, u64 timestamp, + u8 evt_id, ktime_t timestamp, const void *payld, size_t payld_sz, void *report, u32 *src_id) { diff --git a/drivers/firmware/arm_scmi/sensors.c b/drivers/firmware/arm_scmi/sensors.c index 2120ac4787c9..1af0ad362e82 100644 --- a/drivers/firmware/arm_scmi/sensors.c +++ b/drivers/firmware/arm_scmi/sensors.c @@ -296,7 +296,7 @@ static int scmi_sensor_set_notify_enabled(const struct scmi_handle *handle, } static void *scmi_sensor_fill_custom_report(const struct scmi_handle *handle, - u8 evt_id, u64 timestamp, + u8 evt_id, ktime_t timestamp, const void *payld, size_t payld_sz, void *report, u32 *src_id) { diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 7d4348fb7330..7e5dd7d1e221 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -381,47 +381,47 @@ enum scmi_notification_events { }; struct scmi_power_state_changed_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 power_state; + ktime_t timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int power_state; }; struct scmi_perf_limits_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 range_max; - u32 range_min; + ktime_t timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int range_max; + unsigned int range_min; }; struct scmi_perf_level_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 performance_level; + ktime_t timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int performance_level; }; struct scmi_sensor_trip_point_report { - u64 timestamp; - u32 agent_id; - u32 sensor_id; - u32 trip_point_desc; + ktime_t timestamp; + unsigned int agent_id; + unsigned int sensor_id; + unsigned int trip_point_desc; }; struct scmi_reset_issued_report { - u64 timestamp; - u32 agent_id; - u32 domain_id; - u32 reset_state; + ktime_t timestamp; + unsigned int agent_id; + unsigned int domain_id; + unsigned int reset_state; }; struct scmi_base_error_report { - u64 timestamp; - u32 agent_id; - bool fatal; - u16 cmd_count; - u64 reports[]; + ktime_t timestamp; + unsigned int agent_id; + bool fatal; + unsigned int cmd_count; + unsigned long long reports[]; }; #endif /* _LINUX_SCMI_PROTOCOL_H */