From e5fd91f1ef340da553f7a79da9540c3db711c937 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 8 Sep 2015 01:01:14 -0300 Subject: Linux-libre 4.2-gnu --- drivers/staging/unisys/visorutil/visorkmodutils.c | 71 ----------------------- 1 file changed, 71 deletions(-) delete mode 100644 drivers/staging/unisys/visorutil/visorkmodutils.c (limited to 'drivers/staging/unisys/visorutil/visorkmodutils.c') diff --git a/drivers/staging/unisys/visorutil/visorkmodutils.c b/drivers/staging/unisys/visorutil/visorkmodutils.c deleted file mode 100644 index 62f0f7046..000000000 --- a/drivers/staging/unisys/visorutil/visorkmodutils.c +++ /dev/null @@ -1,71 +0,0 @@ -/* timskmodutils.c - * - * Copyright (C) 2010 - 2013 UNISYS CORPORATION - * All rights reserved. - * - * 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. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or - * NON INFRINGEMENT. See the GNU General Public License for more - * details. - */ - -#include "timskmod.h" - -#define MYDRVNAME "timskmodutils" - -/* s-Par uses the Intel processor's VT-X features to separate groups of - * processors into partitions. The firmware sets the hypervisor bit and - * reports an ID in the HV capabilities leaf so that the partition's OS - * knows s-Par is present and managing the processors. - */ - -#define UNISYS_SPAR_LEAF_ID 0x40000000 - -/* The s-Par leaf ID returns "UnisysSpar64" encoded across ebx, ecx, edx */ -#define UNISYS_SPAR_ID_EBX 0x73696e55 -#define UNISYS_SPAR_ID_ECX 0x70537379 -#define UNISYS_SPAR_ID_EDX 0x34367261 - -int unisys_spar_platform; -EXPORT_SYMBOL_GPL(unisys_spar_platform); - -static __init uint32_t visorutil_spar_detect(void) -{ - unsigned int eax, ebx, ecx, edx; - - if (cpu_has_hypervisor) { - /* check the ID */ - cpuid(UNISYS_SPAR_LEAF_ID, &eax, &ebx, &ecx, &edx); - return (ebx == UNISYS_SPAR_ID_EBX) && - (ecx == UNISYS_SPAR_ID_ECX) && - (edx == UNISYS_SPAR_ID_EDX); - } else { - return 0; - } -} - -static __init int visorutil_mod_init(void) -{ - if (visorutil_spar_detect()) { - unisys_spar_platform = TRUE; - return 0; - } else { - return -ENODEV; - } -} - -static __exit void -visorutil_mod_exit(void) -{ -} - -module_init(visorutil_mod_init); -module_exit(visorutil_mod_exit); - -MODULE_LICENSE("GPL"); -- cgit v1.2.3-54-g00ecf