1 /* 2 * Test the known dependencies for facilities 3 * 4 * Copyright 2019 IBM Corp. 5 * 6 * Authors: 7 * Christian Borntraeger <borntraeger@de.ibm.com> 8 * 9 * This code is free software; you can redistribute it and/or modify it 10 * under the terms of the GNU Library General Public License version 2. 11 */ 12 13 #include <asm/facility.h> 14 15 static int dep[][2] = { 16 /* from SA22-7832-11 4-98 facility indications */ 17 { 4, 3 }, 18 { 5, 3 }, 19 { 5, 4 }, 20 { 19, 18 }, 21 { 37, 42 }, 22 { 43, 42 }, 23 { 73, 49 }, 24 { 134, 129 }, 25 { 135, 129 }, 26 { 139, 25 }, 27 { 139, 28 }, 28 { 146, 76 }, 29 /* indirectly documented in description */ 30 { 78, 8 }, /* EDAT */ 31 /* new dependencies from gen15 */ 32 { 61, 45 }, 33 { 148, 129 }, 34 { 148, 135 }, 35 { 152, 129 }, 36 { 152, 134 }, 37 { 155, 76 }, 38 { 155, 77 }, 39 }; 40 41 int main(void) 42 { 43 int i; 44 45 report_prefix_push("cpumodel"); 46 47 report_prefix_push("dependency"); 48 for (i = 0; i < ARRAY_SIZE(dep); i++) { 49 if (test_facility(dep[i][0])) { 50 report("%d implies %d", test_facility(dep[i][1]), 51 dep[i][0], dep[i][1]); 52 } else { 53 report_skip("facility %d not present", dep[i][0]); 54 } 55 } 56 report_prefix_pop(); 57 58 report_prefix_pop(); 59 return report_summary(); 60 } 61