Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4dea2d1a authored by Sukadev Bhattiprolu's avatar Sukadev Bhattiprolu Committed by Michael Ellerman
Browse files

powerpc/powernv/vas: Define vas_init() and vas_exit()



Implement vas_init() and vas_exit() functions for a new VAS module.
This VAS module is essentially a library for other device drivers
and kernel users of the NX coprocessors like NX-842 and NX-GZIP.
In the future this will be extended to add support for user space
to access the NX coprocessors.

VAS is currently only supported with 64K page size.

Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent b6622a33
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
* IBM Powerpc Virtual Accelerator Switchboard (VAS)

VAS is a hardware mechanism that allows kernel subsystems and user processes
to directly submit compression and other requests to Nest accelerators (NX)
or other coprocessors functions.

Required properties:
- compatible : should be "ibm,vas".
- ibm,vas-id : A unique identifier for each instance of VAS in the system
- reg : Should contain 4 pairs of 64-bit fields specifying the Hypervisor
  window context start and length, OS/User window context start and length,
  "Paste address" start and length, "Paste window id" start bit and number
  of bits)

Example:

	vas@6019100000000 {
		compatible = "ibm,vas", "ibm,power9-vas";
		reg = <0x6019100000000 0x2000000 0x6019000000000 0x100000000 0x8000000000000 0x100000000 0x20 0x10>;
		name = "vas";
		ibm,vas-id = <0x1>;
	};
+8 −0
Original line number Diff line number Diff line
@@ -6429,6 +6429,14 @@ L: netdev@vger.kernel.org
S:	Supported
F:	drivers/net/ethernet/ibm/ibmvnic.*

IBM Power Virtual Accelerator Switchboard
M:	Sukadev Bhattiprolu
L:	linuxppc-dev@lists.ozlabs.org
S:	Supported
F:	arch/powerpc/platforms/powernv/vas*
F:	arch/powerpc/include/asm/vas.h
F:	arch/powerpc/include/uapi/asm/vas.h

IBM Power Virtual Ethernet Device Driver
M:	Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
L:	netdev@vger.kernel.org
+14 −0
Original line number Diff line number Diff line
@@ -38,3 +38,17 @@ config PPC_MEMTRACE
	help
	  Enabling this option allows for the removal of memory (RAM)
	  from the kernel mappings to be used for hardware tracing.

config PPC_VAS
	bool "IBM Virtual Accelerator Switchboard (VAS)"
	depends on PPC_POWERNV && PPC_64K_PAGES
	default y
	help
	  This enables support for IBM Virtual Accelerator Switchboard (VAS).

	  VAS allows accelerators in co-processors like NX-GZIP and NX-842
	  to be accessible to kernel subsystems and user processes.

	  VAS adapters are found in POWER9 based systems.

	  If unsure, say N.
+1 −0
Original line number Diff line number Diff line
@@ -14,3 +14,4 @@ obj-$(CONFIG_TRACEPOINTS) += opal-tracepoints.o
obj-$(CONFIG_OPAL_PRD)	+= opal-prd.o
obj-$(CONFIG_PERF_EVENTS) += opal-imc.o
obj-$(CONFIG_PPC_MEMTRACE)	+= memtrace.o
obj-$(CONFIG_PPC_VAS)	+= vas.o vas-window.o
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright 2016-17 IBM Corp.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */

#include <linux/types.h>
#include <linux/mutex.h>

#include "vas.h"

/* stub for now */
int vas_win_close(struct vas_window *window)
{
	return -1;
}
Loading