From patchwork Mon Feb 4 14:22:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 157429 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3974274jaa; Mon, 4 Feb 2019 06:24:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN5W9MqDG3PqK8TYu4ltt+BW9WAzrS29GZdvTcKQQRPjIugtDep3Bjf/vbdlkaHIpv/U/6XR X-Received: by 2002:a62:6ec8:: with SMTP id j191mr51449188pfc.198.1549290286375; Mon, 04 Feb 2019 06:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549290286; cv=none; d=google.com; s=arc-20160816; b=sYIw5MSCe0CFIybcCrRRo8g7CJACN87lFq2fiiHN/7kuhP83NcpjFPYH7Q7ENFsr+1 RH7O0fgpBpeoHfwLJoy344awFrEBIrDJPtEyU1UiDS3Xt5KSV2q1iUb0gBCrBtBH+4CU 66nrvNh8aRLy3LMnOyMrLxzZ71JxnHVMFesKB3IMqrtgdcVo8wrrqjRGE/irF5bVylw1 wuB0/eljJUiOIne+3Ff7RTJa6J1xp3LQroS//Zk7NlhBzrDxiMnM0ZHnwIJKk93tZkla dHbJ3ntWfvKimbAak6ZldnRr0u+6vTdjoyJfGIXGJ1iZt2VwxNImPRZah0xzCGwMdGZN 7IKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=93dULJjujpSqIrNJQ463PFFgzThrUMl392hE2ZPf+UI=; b=aya7QhHStS074i8WrkZg6owlpOMa7So+hLVNwFl6zMANXBmej2beQqfcrJtEvUuiTz VM1H+D9hYad0BnPhwjVDpalAe8l3aJDVTp5IFwrA3gr0MAyxQ0K9VqHC3tiTuCVJPEW9 ZchMZ5dcFBPXpN9I/Dh1/PlUZLigN0tT7Xx50z1cHDmclSdP7BKc88R+5J4HjZk7OPc1 K90MmZ07d1CiZTprZ9e/tzYZxDdjWBkRkFT4WExAw44Nts6Q63HZQME93ydZbOPAQ28b qWSCmuMtBI9b1Wkl5n12vH7zJ9iMrnkjBDaaN3lt7KC/HzjyfSqM8QBLZZg4BFdiB8M9 EJOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KqxgWaCz; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si174845plp.18.2019.02.04.06.24.45; Mon, 04 Feb 2019 06:24:46 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KqxgWaCz; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730391AbfBDOYo (ORCPT + 31 others); Mon, 4 Feb 2019 09:24:44 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:59694 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730110AbfBDOYj (ORCPT ); Mon, 4 Feb 2019 09:24:39 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x14ENlHC092552; Mon, 4 Feb 2019 08:23:47 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1549290227; bh=93dULJjujpSqIrNJQ463PFFgzThrUMl392hE2ZPf+UI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=KqxgWaCzRjdSVy5taTeA6JWQ2J15STPlHjTxqFKjeXRjNGCSMZGEXjWiXhmRnhAxO 7Om4R/nozEgq5HXTzSJZk3i3EN2OmMxXCV3w8+0GfHKENWoVV9bYfYZTKlFsrvXRGA gzx0suTuBCuiHU8W+kL90ztARRkjj6Pi73qh6g9c= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x14ENlBS010485 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Feb 2019 08:23:47 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 4 Feb 2019 08:23:47 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 4 Feb 2019 08:23:46 -0600 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x14EMoKl012232; Mon, 4 Feb 2019 08:23:43 -0600 From: Roger Quadros To: , , CC: , , , , , , , , , , , , Subject: [PATCH v2 13/14] rpmsg: virtio_rpmsg_bus: move back rpmsg_hdr into a public header Date: Mon, 4 Feb 2019 16:22:46 +0200 Message-ID: <1549290167-876-14-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549290167-876-1-git-send-email-rogerq@ti.com> References: <1549290167-876-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suman Anna Commit e88dae5da46d ("rpmsg: Move virtio specifics from public header") has moved the struct rpmsg_hdr definition from the public rpmsg.h and made it private to virtio_rpmsg_bus module. This structure is a common header used in all virtio rpmsg messages, and used by various virtio rpmsg bus drivers. So, move this back into the virtio_rpmsg specific public header to make it visible to various rpmsg drivers. Signed-off-by: Suman Anna Signed-off-by: Roger Quadros --- drivers/rpmsg/virtio_rpmsg_bus.c | 21 +-------------------- include/linux/rpmsg/virtio_rpmsg.h | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 include/linux/rpmsg/virtio_rpmsg.h -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 664f957..f654923 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "rpmsg_internal.h" @@ -73,26 +74,6 @@ struct virtproc_info { #define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */ /** - * struct rpmsg_hdr - common header for all rpmsg messages - * @src: source address - * @dst: destination address - * @reserved: reserved for future use - * @len: length of payload (in bytes) - * @flags: message flags - * @data: @len bytes of message payload data - * - * Every message sent(/received) on the rpmsg bus begins with this header. - */ -struct rpmsg_hdr { - u32 src; - u32 dst; - u32 reserved; - u16 len; - u16 flags; - u8 data[0]; -} __packed; - -/** * struct rpmsg_ns_msg - dynamic name service announcement message * @name: name of remote service that is published * @addr: address of remote service that is published diff --git a/include/linux/rpmsg/virtio_rpmsg.h b/include/linux/rpmsg/virtio_rpmsg.h new file mode 100644 index 0000000..cf5f820 --- /dev/null +++ b/include/linux/rpmsg/virtio_rpmsg.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _LINUX_RPMSG_VIRTIO_RPMSG_H +#define _LINUX_RPMSG_VIRTIO_RPMSG_H + +/** + * struct rpmsg_hdr - common header for all virtio rpmsg messages + * @src: source address + * @dst: destination address + * @reserved: reserved for future use + * @len: length of payload (in bytes) + * @flags: message flags + * @data: @len bytes of message payload data + * + * Every message sent(/received) on the rpmsg bus begins with this header. + */ +struct rpmsg_hdr { + u32 src; + u32 dst; + u32 reserved; + u16 len; + u16 flags; + u8 data[0]; +} __packed; + +#endif