gpu: nvgpu: Split as code to as IOCTL and common

Split as_gk20a.c into two parts:

common/linux/ioctl_as.c deals with as related devnodes and ioctls.
This file contains all the Linux specific parts of as_gk20a.c.

common/as.c deals with general as_gk20a maintenance and is Linux
independent.

JIRA NVGPU-16

Change-Id: I2d8541e0bd6ce159dc6e4de8e819dfcff0fa8f80
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1330803
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Terje Bergstrom
2017-03-23 12:49:58 -07:00
committed by mobile promotions
parent 660c9a9510
commit 1e355ca52e
8 changed files with 148 additions and 113 deletions

View File

@@ -24,9 +24,9 @@
#include "gk20a/dbg_gpu_gk20a.h"
#include "gk20a/ctxsw_trace_gk20a.h"
#include "gk20a/channel_gk20a.h"
#include "gk20a/as_gk20a.h"
#include "gk20a/tsg_gk20a.h"
#include "ioctl_ctrl.h"
#include "ioctl_as.h"
#define GK20A_NUM_CDEVS 7
@@ -167,9 +167,9 @@ void gk20a_user_deinit(struct device *dev, struct class *class)
cdev_del(&g->channel.cdev);
}
if (g->as.node) {
device_destroy(class, g->as.cdev.dev);
cdev_del(&g->as.cdev);
if (g->as_dev.node) {
device_destroy(class, g->as_dev.cdev.dev);
cdev_del(&g->as_dev.cdev);
}
if (g->ctrl.node) {
@@ -228,7 +228,7 @@ int gk20a_user_init(struct device *dev, const char *interface_name,
goto fail;
err = gk20a_create_device(dev, devno++, interface_name, "-as",
&g->as.cdev, &g->as.node,
&g->as_dev.cdev, &g->as_dev.node,
&gk20a_as_ops,
class);
if (err)