From ea24da728faf381a0204c424ee055a0572774e76 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 11 Apr 2017 14:33:22 -0700 Subject: gpu: nvgpu: Add wrapper nvgpu/bsearch.h Add wrapper header file nvgpu/bsearch.h. It #includes on Linux. JIRA NVGPU-13 Change-Id: I5893f91f2e1bcda99c68f94d9298d87ad4591c8f Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1461543 Reviewed-by: svccoveritychecker Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 2 +- drivers/gpu/nvgpu/gk20a/regops_gk20a.c | 2 +- drivers/gpu/nvgpu/gm20b/regops_gm20b.c | 3 ++- drivers/gpu/nvgpu/gp106/regops_gp106.c | 3 ++- drivers/gpu/nvgpu/gp10b/regops_gp10b.c | 3 ++- drivers/gpu/nvgpu/include/nvgpu/bsearch.h | 20 ++++++++++++++++++++ 6 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 drivers/gpu/nvgpu/include/nvgpu/bsearch.h diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 06374fb7..96ec7f6e 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -34,6 +33,7 @@ #include #include #include +#include #include "gk20a.h" #include "kind_gk20a.h" diff --git a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c index b19b16d7..128c00b5 100644 --- a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c @@ -17,7 +17,6 @@ */ #include -#include #include #include "gk20a.h" @@ -26,6 +25,7 @@ #include "regops_gk20a.h" #include +#include static int regop_bsearch_range_cmp(const void *pkey, const void *pelem) { diff --git a/drivers/gpu/nvgpu/gm20b/regops_gm20b.c b/drivers/gpu/nvgpu/gm20b/regops_gm20b.c index 1a6e6d7c..e06ee869 100644 --- a/drivers/gpu/nvgpu/gm20b/regops_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/regops_gm20b.c @@ -17,7 +17,6 @@ */ #include -#include #include #include "gk20a/gk20a.h" @@ -25,6 +24,8 @@ #include "gk20a/regops_gk20a.h" #include "regops_gm20b.h" +#include + static const struct regop_offset_range gm20b_global_whitelist_ranges[] = { { 0x00001a00, 3 }, { 0x0000259c, 1 }, diff --git a/drivers/gpu/nvgpu/gp106/regops_gp106.c b/drivers/gpu/nvgpu/gp106/regops_gp106.c index 9de1d3a3..0d90977d 100644 --- a/drivers/gpu/nvgpu/gp106/regops_gp106.c +++ b/drivers/gpu/nvgpu/gp106/regops_gp106.c @@ -17,7 +17,6 @@ */ #include -#include #include #include "gk20a/gk20a.h" @@ -25,6 +24,8 @@ #include "gk20a/regops_gk20a.h" #include "regops_gp106.h" +#include + static const struct regop_offset_range gp106_global_whitelist_ranges[] = { { 0x000004f0, 1}, { 0x00001a00, 3}, diff --git a/drivers/gpu/nvgpu/gp10b/regops_gp10b.c b/drivers/gpu/nvgpu/gp10b/regops_gp10b.c index b880fda1..33e331a4 100644 --- a/drivers/gpu/nvgpu/gp10b/regops_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/regops_gp10b.c @@ -17,7 +17,6 @@ */ #include -#include #include #include "gk20a/gk20a.h" @@ -25,6 +24,8 @@ #include "gk20a/regops_gk20a.h" #include "regops_gp10b.h" +#include + static const struct regop_offset_range gp10b_global_whitelist_ranges[] = { { 0x000004f0, 1}, { 0x00001a00, 3}, diff --git a/drivers/gpu/nvgpu/include/nvgpu/bsearch.h b/drivers/gpu/nvgpu/include/nvgpu/bsearch.h new file mode 100644 index 00000000..6140be26 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/bsearch.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017, 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. + */ +#ifndef __NVGPU_BSEARCH_H__ +#define __NVGPU_BSEARCH_H__ + +#ifdef __KERNEL__ +#include +#endif + +#endif -- cgit v1.2.2