Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1439996

Re: [PATCH V2 04/10] firmware: tegra: add IVC library

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject Re: [PATCH V2 04/10] firmware: tegra: add IVC library
Date 2016-07-10 01:50 +0200
Message-ID <rTaat-16A-7@gated-at.bofh.it> (permalink)
References <rRuwF-MJ-15@gated-at.bofh.it> <rRuwG-MJ-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jul 5, 2016 at 5:04 AM, Joseph Lo <josephl@nvidia.com> wrote:
> The Inter-VM communication (IVC) is a communication protocol, which is
> designed for interprocessor communication (IPC) or the communication
> between the hypervisor and the virtual machine with a guest OS on it. So
> it can be translated as inter-virtual memory or inter-virtual machine
> communication. The message channels are maintained on the DRAM or SRAM
> and the data coherency should be considered. Or the data could be
> corrupted or out of date when the remote client checking it.
>
> Inside the IVC, it maintains memory-based descriptors for the TX/RX
> channels and the coherency issue of the counter and payloads. So the
> clients can use it to send/receive messages to/from remote ones.
>
> We introduce it as a library for the firmware drivers, which can use it
> for IPC.
>
> Based-on-the-work-by:
> Peter Newman <pnewman@nvidia.com>
>
> Signed-off-by: Joseph Lo <josephl@nvidia.com>
> ---
> Changes in V2:
> - None
> ---
>  drivers/firmware/Kconfig        |   1 +
>  drivers/firmware/Makefile       |   1 +
>  drivers/firmware/tegra/Kconfig  |  13 +
>  drivers/firmware/tegra/Makefile |   1 +
>  drivers/firmware/tegra/ivc.c    | 659 ++++++++++++++++++++++++++++++++++++++++
>  include/soc/tegra/ivc.h         | 102 +++++++
>  6 files changed, 777 insertions(+)
>  create mode 100644 drivers/firmware/tegra/Kconfig
>  create mode 100644 drivers/firmware/tegra/Makefile
>  create mode 100644 drivers/firmware/tegra/ivc.c
>  create mode 100644 include/soc/tegra/ivc.h
>
> diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
> index 5e618058defe..bbd64ae8c4c6 100644
> --- a/drivers/firmware/Kconfig
> +++ b/drivers/firmware/Kconfig
> @@ -200,5 +200,6 @@ config HAVE_ARM_SMCCC
>  source "drivers/firmware/broadcom/Kconfig"
>  source "drivers/firmware/google/Kconfig"
>  source "drivers/firmware/efi/Kconfig"
> +source "drivers/firmware/tegra/Kconfig"
>
>  endmenu
> diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
> index 474bada56fcd..9a4df8171cc4 100644
> --- a/drivers/firmware/Makefile
> +++ b/drivers/firmware/Makefile
> @@ -24,3 +24,4 @@ obj-y                         += broadcom/
>  obj-$(CONFIG_GOOGLE_FIRMWARE)  += google/
>  obj-$(CONFIG_EFI)              += efi/
>  obj-$(CONFIG_UEFI_CPER)                += efi/
> +obj-y                          += tegra/
> diff --git a/drivers/firmware/tegra/Kconfig b/drivers/firmware/tegra/Kconfig
> new file mode 100644
> index 000000000000..1fa3e4e136a5
> --- /dev/null
> +++ b/drivers/firmware/tegra/Kconfig
> @@ -0,0 +1,13 @@
> +menu "Tegra firmware driver"
> +
> +config TEGRA_IVC
> +       bool "Tegra IVC protocol"

If this driver is not tristate, then why does the driver include the
module.h header below?

> +       depends on ARCH_TEGRA
> +       help
> +         IVC (Inter-VM Communication) protocol is part of the IPC
> +         (Inter Processor Communication) framework on Tegra. It maintains the
> +         data and the different commuication channels in SysRAM or RAM and
> +         keeps the content is synchronization between host CPU and remote
> +         processors.
> +
> +endmenu
> diff --git a/drivers/firmware/tegra/Makefile b/drivers/firmware/tegra/Makefile
> new file mode 100644
> index 000000000000..92e2153e8173
> --- /dev/null
> +++ b/drivers/firmware/tegra/Makefile
> @@ -0,0 +1 @@
> +obj-$(CONFIG_TEGRA_IVC)                += ivc.o
> diff --git a/drivers/firmware/tegra/ivc.c b/drivers/firmware/tegra/ivc.c
> new file mode 100644
> index 000000000000..3e736bb9915a
> --- /dev/null
> +++ b/drivers/firmware/tegra/ivc.c
> @@ -0,0 +1,659 @@
> +/*
> + * Copyright (c) 2014-2016, NVIDIA CORPORATION.  All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope it will be useful, but WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> + * more details.
> + */
> +
> +#include <linux/module.h>
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I'm sure it "works" since module.h includes nearly everything else,
but that is less than ideal for exactly the same reason.

Thanks,
Paul.
--

> +
> +#include <soc/tegra/ivc.h>
> +
> +#define IVC_ALIGN 64
> +

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 00/10] arm64: tegra: add BPMP support Joseph Lo <josephl@nvidia.com> - 2016-07-05 11:10 +0200
  [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware Synchronization Primitives) driver Joseph Lo <josephl@nvidia.com> - 2016-07-05 11:10 +0200
    Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Alexandre Courbot <gnurou@gmail.com> - 2016-07-06 09:10 +0200
      Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Joseph Lo <josephl@nvidia.com> - 2016-07-06 11:10 +0200
        Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Alexandre Courbot <gnurou@gmail.com> - 2016-07-06 14:30 +0200
          Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Joseph Lo <josephl@nvidia.com> - 2016-07-07 08:40 +0200
            Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Sivaram Nair <sivaramn@nvidia.com> - 2016-07-07 23:40 +0200
              Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Joseph Lo <josephl@nvidia.com> - 2016-07-18 11:00 +0200
        Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Stephen Warren <swarren@wwwdotorg.org> - 2016-07-06 19:00 +0200
          Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Joseph Lo <josephl@nvidia.com> - 2016-07-07 08:50 +0200
    Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Sivaram Nair <sivaramn@nvidia.com> - 2016-07-07 23:20 +0200
      Re: [PATCH V2 02/10] mailbox: tegra-hsp: Add HSP(Hardware  Synchronization Primitives) driver Joseph Lo <josephl@nvidia.com> - 2016-07-18 11:00 +0200
  [PATCH V2 07/10] arm64: defconfig: Enable Tegra186 SoC Joseph Lo <josephl@nvidia.com> - 2016-07-05 11:10 +0200
  [PATCH V2 09/10] arm64: dts: tegra: Add NVIDIA Tegra186 P3310 main board support Joseph Lo <josephl@nvidia.com> - 2016-07-05 11:10 +0200
  [PATCH V2 10/10] arm64: dts: tegra: Add NVIDIA P2771 board support Joseph Lo <josephl@nvidia.com> - 2016-07-05 11:10 +0200
  [PATCH V2 04/10] firmware: tegra: add IVC library Joseph Lo <josephl@nvidia.com> - 2016-07-05 11:10 +0200
    Re: [PATCH V2 04/10] firmware: tegra: add IVC library Alexandre Courbot <gnurou@gmail.com> - 2016-07-07 13:20 +0200
    Re: [PATCH V2 04/10] firmware: tegra: add IVC library Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-10 01:50 +0200
  [PATCH V2 08/10] arm64: dts: tegra: Add Tegra186 support Joseph Lo <josephl@nvidia.com> - 2016-07-05 11:10 +0200
  [PATCH V2 06/10] soc/tegra: Add Tegra186 support Joseph Lo <josephl@nvidia.com> - 2016-07-05 11:10 +0200
  Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra: add  bindings of the BPMP Alexandre Courbot <gnurou@gmail.com> - 2016-07-06 13:50 +0200
    Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra: add  bindings of the BPMP Joseph Lo <josephl@nvidia.com> - 2016-07-07 08:30 +0200
  Re: [PATCH V2 05/10] firmware: tegra: add BPMP support Alexandre Courbot <gnurou@gmail.com> - 2016-07-06 14:00 +0200
    Re: [PATCH V2 05/10] firmware: tegra: add BPMP support Stephen Warren <swarren@wwwdotorg.org> - 2016-07-06 18:50 +0200
    Re: [PATCH V2 05/10] firmware: tegra: add BPMP support Matt Longnecker <mlongnecker@nvidia.com> - 2016-07-06 18:50 +0200
      Re: [PATCH V2 05/10] firmware: tegra: add BPMP support Alexandre Courbot <gnurou@gmail.com> - 2016-07-07 04:30 +0200
    Re: [PATCH V2 05/10] firmware: tegra: add BPMP support Joseph Lo <josephl@nvidia.com> - 2016-07-07 10:20 +0200
      Re: [PATCH V2 05/10] firmware: tegra: add BPMP support Alexandre Courbot <gnurou@gmail.com> - 2016-07-07 12:20 +0200
        Re: [PATCH V2 05/10] firmware: tegra: add BPMP support Stephen Warren <swarren@wwwdotorg.org> - 2016-07-07 22:00 +0200
        Re: [PATCH V2 05/10] firmware: tegra: add BPMP support Sivaram Nair <sivaramn@nvidia.com> - 2016-07-08 22:30 +0200
  Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra: add  bindings of the BPMP Stephen Warren <swarren@wwwdotorg.org> - 2016-07-06 19:10 +0200
    Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra: add  bindings of the BPMP Joseph Lo <josephl@nvidia.com> - 2016-07-07 08:30 +0200
  Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra:  add bindings of the BPMP Rob Herring <robh@kernel.org> - 2016-07-11 16:30 +0200
    Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra: add  bindings of the BPMP Stephen Warren <swarren@wwwdotorg.org> - 2016-07-11 18:10 +0200
      Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra: add  bindings of the BPMP Joseph Lo <josephl@nvidia.com> - 2016-07-18 09:50 +0200
        Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra: add  bindings of the BPMP Stephen Warren <swarren@wwwdotorg.org> - 2016-07-18 18:20 +0200
  Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra: add  bindings of the BPMP Stephen Warren <swarren@wwwdotorg.org> - 2016-07-13 21:50 +0200
    Re: [PATCH V2 03/10] Documentation: dt-bindings: firmware: tegra: add  bindings of the BPMP Joseph Lo <josephl@nvidia.com> - 2016-07-18 08:50 +0200

csiph-web