1 /*
2  * Contains CPU feature definitions
3  *
4  * Copyright (C) 2015 ARM Ltd.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #include <xen/types.h>
20 #include <xen/init.h>
21 #include <xen/smp.h>
22 #include <asm/cpufeature.h>
23 
24 DECLARE_BITMAP(cpu_hwcaps, ARM_NCAPS);
25 
update_cpu_capabilities(const struct arm_cpu_capabilities * caps,const char * info)26 void update_cpu_capabilities(const struct arm_cpu_capabilities *caps,
27                              const char *info)
28 {
29     int i;
30 
31     for ( i = 0; caps[i].matches; i++ )
32     {
33         if ( !caps[i].matches(&caps[i]) )
34             continue;
35 
36         if ( !cpus_have_cap(caps[i].capability) && caps[i].desc )
37             printk(XENLOG_INFO "%s: %s\n", info, caps[i].desc);
38         cpus_set_cap(caps[i].capability);
39     }
40 }
41 
42 /*
43  * Local variables:
44  * mode: C
45  * c-file-style: "BSD"
46  * c-basic-offset: 4
47  * indent-tabs-mode: nil
48  * End:
49  */
50