]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Revert "powerpc/powernv/vas: Define vas_init() and vas_exit()"
authorSeth Forshee <seth.forshee@canonical.com>
Wed, 4 Oct 2017 21:15:31 +0000 (16:15 -0500)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 4 Oct 2017 21:17:54 +0000 (16:17 -0500)
BugLink: http://bugs.launchpad.net/bugs/1721391
This reverts commit 71369f7ee26394aef459f240f1386b84fe5bd903.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Documentation/devicetree/bindings/powerpc/ibm,vas.txt [deleted file]
MAINTAINERS
arch/powerpc/platforms/powernv/Kconfig
arch/powerpc/platforms/powernv/Makefile
arch/powerpc/platforms/powernv/vas-window.c [deleted file]
arch/powerpc/platforms/powernv/vas.c [deleted file]
arch/powerpc/platforms/powernv/vas.h

diff --git a/Documentation/devicetree/bindings/powerpc/ibm,vas.txt b/Documentation/devicetree/bindings/powerpc/ibm,vas.txt
deleted file mode 100644 (file)
index bf11d2f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-* 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>;
-       };
index f730e65c073706397e0aad4958a1e6865ff7c0fb..81cd8c26305a6d0b94f282f90f0fdef7a7817e4b 100644 (file)
@@ -6458,14 +6458,6 @@ 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
index 3e3bbe943980658598276f07499992f21e082612..6a6f4ef46b9e5e0123352e4c1c9f13a7a749c5e6 100644 (file)
@@ -30,17 +30,3 @@ config OPAL_PRD
        help
          This enables the opal-prd driver, a facility to run processor
          recovery diagnostics on OpenPower machines
-
-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.
index c2c45490172f8a65aa086e8ce0e566123e71ad6b..674ed1e8160aacd7d7184e5434131b198173d2ae 100644 (file)
@@ -13,4 +13,3 @@ obj-$(CONFIG_MEMORY_FAILURE)  += opal-memory-errors.o
 obj-$(CONFIG_TRACEPOINTS)      += opal-tracepoints.o
 obj-$(CONFIG_OPAL_PRD) += opal-prd.o
 obj-$(CONFIG_PERF_EVENTS) += opal-imc.o
-obj-$(CONFIG_PPC_VAS)  += vas.o vas-window.o
diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-window.c
deleted file mode 100644 (file)
index de21acb..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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;
-}
diff --git a/arch/powerpc/platforms/powernv/vas.c b/arch/powerpc/platforms/powernv/vas.c
deleted file mode 100644 (file)
index 565a487..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * 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.
- */
-
-#define pr_fmt(fmt) "vas: " fmt
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/export.h>
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <linux/platform_device.h>
-#include <linux/of_platform.h>
-#include <linux/of_address.h>
-#include <linux/of.h>
-
-#include "vas.h"
-
-static DEFINE_MUTEX(vas_mutex);
-static LIST_HEAD(vas_instances);
-
-static int init_vas_instance(struct platform_device *pdev)
-{
-       int rc, vasid;
-       struct resource *res;
-       struct vas_instance *vinst;
-       struct device_node *dn = pdev->dev.of_node;
-
-       rc = of_property_read_u32(dn, "ibm,vas-id", &vasid);
-       if (rc) {
-               pr_err("No ibm,vas-id property for %s?\n", pdev->name);
-               return -ENODEV;
-       }
-
-       if (pdev->num_resources != 4) {
-               pr_err("Unexpected DT configuration for [%s, %d]\n",
-                               pdev->name, vasid);
-               return -ENODEV;
-       }
-
-       vinst = kzalloc(sizeof(*vinst), GFP_KERNEL);
-       if (!vinst)
-               return -ENOMEM;
-
-       INIT_LIST_HEAD(&vinst->node);
-       ida_init(&vinst->ida);
-       mutex_init(&vinst->mutex);
-       vinst->vas_id = vasid;
-       vinst->pdev = pdev;
-
-       res = &pdev->resource[0];
-       vinst->hvwc_bar_start = res->start;
-
-       res = &pdev->resource[1];
-       vinst->uwc_bar_start = res->start;
-
-       res = &pdev->resource[2];
-       vinst->paste_base_addr = res->start;
-
-       res = &pdev->resource[3];
-       if (res->end > 62) {
-               pr_err("Bad 'paste_win_id_shift' in DT, %llx\n", res->end);
-               goto free_vinst;
-       }
-
-       vinst->paste_win_id_shift = 63 - res->end;
-
-       pr_devel("Initialized instance [%s, %d], paste_base 0x%llx, "
-                       "paste_win_id_shift 0x%llx\n", pdev->name, vasid,
-                       vinst->paste_base_addr, vinst->paste_win_id_shift);
-
-       mutex_lock(&vas_mutex);
-       list_add(&vinst->node, &vas_instances);
-       mutex_unlock(&vas_mutex);
-
-       dev_set_drvdata(&pdev->dev, vinst);
-
-       return 0;
-
-free_vinst:
-       kfree(vinst);
-       return -ENODEV;
-
-}
-
-/*
- * Although this is read/used multiple times, it is written to only
- * during initialization.
- */
-struct vas_instance *find_vas_instance(int vasid)
-{
-       struct list_head *ent;
-       struct vas_instance *vinst;
-
-       mutex_lock(&vas_mutex);
-       list_for_each(ent, &vas_instances) {
-               vinst = list_entry(ent, struct vas_instance, node);
-               if (vinst->vas_id == vasid) {
-                       mutex_unlock(&vas_mutex);
-                       return vinst;
-               }
-       }
-       mutex_unlock(&vas_mutex);
-
-       pr_devel("Instance %d not found\n", vasid);
-       return NULL;
-}
-
-static int vas_probe(struct platform_device *pdev)
-{
-       return init_vas_instance(pdev);
-}
-
-static const struct of_device_id powernv_vas_match[] = {
-       { .compatible = "ibm,vas",},
-       {},
-};
-
-static struct platform_driver vas_driver = {
-       .driver = {
-               .name = "vas",
-               .of_match_table = powernv_vas_match,
-       },
-       .probe = vas_probe,
-};
-
-static int __init vas_init(void)
-{
-       int found = 0;
-       struct device_node *dn;
-
-       platform_driver_register(&vas_driver);
-
-       for_each_compatible_node(dn, NULL, "ibm,vas") {
-               of_platform_device_create(dn, NULL, NULL);
-               found++;
-       }
-
-       if (!found)
-               return -ENODEV;
-
-       pr_devel("Found %d instances\n", found);
-
-       return 0;
-}
-device_initcall(vas_init);
index 650805d654acc9b7ed4495c25e065e651fb83a9a..abb545f97c77e8dd5fda7530b274f2d2ee90aff8 100644 (file)
@@ -379,6 +379,4 @@ struct vas_winctx {
        enum vas_notify_after_count notify_after_count;
 };
 
-extern struct vas_instance *find_vas_instance(int vasid);
-
 #endif /* _VAS_H */