@@ -2000,19 +2000,19 @@ void __init enable_IR_x2apic(void)
2000
2000
* On AMD64 we trust the BIOS - if it says no APIC it is likely
2001
2001
* not correctly set up (usually the APIC timer won't work etc.)
2002
2002
*/
2003
- static int __init detect_init_APIC (void )
2003
+ static bool __init detect_init_APIC (void )
2004
2004
{
2005
2005
if (!boot_cpu_has (X86_FEATURE_APIC )) {
2006
2006
pr_info ("No local APIC present\n" );
2007
- return -1 ;
2007
+ return false ;
2008
2008
}
2009
2009
2010
2010
mp_lapic_addr = APIC_DEFAULT_PHYS_BASE ;
2011
- return 0 ;
2011
+ return true ;
2012
2012
}
2013
2013
#else
2014
2014
2015
- static int __init apic_verify (void )
2015
+ static bool __init apic_verify (void )
2016
2016
{
2017
2017
u32 features , h , l ;
2018
2018
@@ -2023,7 +2023,7 @@ static int __init apic_verify(void)
2023
2023
features = cpuid_edx (1 );
2024
2024
if (!(features & (1 << X86_FEATURE_APIC ))) {
2025
2025
pr_warn ("Could not enable APIC!\n" );
2026
- return -1 ;
2026
+ return false ;
2027
2027
}
2028
2028
set_cpu_cap (& boot_cpu_data , X86_FEATURE_APIC );
2029
2029
mp_lapic_addr = APIC_DEFAULT_PHYS_BASE ;
@@ -2036,15 +2036,15 @@ static int __init apic_verify(void)
2036
2036
}
2037
2037
2038
2038
pr_info ("Found and enabled local APIC!\n" );
2039
- return 0 ;
2039
+ return true ;
2040
2040
}
2041
2041
2042
- int __init apic_force_enable (unsigned long addr )
2042
+ bool __init apic_force_enable (unsigned long addr )
2043
2043
{
2044
2044
u32 h , l ;
2045
2045
2046
2046
if (apic_is_disabled )
2047
- return -1 ;
2047
+ return false ;
2048
2048
2049
2049
/*
2050
2050
* Some BIOSes disable the local APIC in the APIC_BASE
@@ -2067,11 +2067,11 @@ int __init apic_force_enable(unsigned long addr)
2067
2067
/*
2068
2068
* Detect and initialize APIC
2069
2069
*/
2070
- static int __init detect_init_APIC (void )
2070
+ static bool __init detect_init_APIC (void )
2071
2071
{
2072
2072
/* Disabled by kernel option? */
2073
2073
if (apic_is_disabled )
2074
- return -1 ;
2074
+ return false ;
2075
2075
2076
2076
switch (boot_cpu_data .x86_vendor ) {
2077
2077
case X86_VENDOR_AMD :
@@ -2098,22 +2098,22 @@ static int __init detect_init_APIC(void)
2098
2098
if (!force_enable_local_apic ) {
2099
2099
pr_info ("Local APIC disabled by BIOS -- "
2100
2100
"you can enable it with \"lapic\"\n" );
2101
- return -1 ;
2101
+ return false ;
2102
2102
}
2103
- if (apic_force_enable (APIC_DEFAULT_PHYS_BASE ))
2104
- return -1 ;
2103
+ if (! apic_force_enable (APIC_DEFAULT_PHYS_BASE ))
2104
+ return false ;
2105
2105
} else {
2106
- if (apic_verify ())
2107
- return -1 ;
2106
+ if (! apic_verify ())
2107
+ return false ;
2108
2108
}
2109
2109
2110
2110
apic_pm_activate ();
2111
2111
2112
- return 0 ;
2112
+ return true ;
2113
2113
2114
2114
no_apic :
2115
2115
pr_info ("No local APIC present or hardware disabled\n" );
2116
- return -1 ;
2116
+ return false ;
2117
2117
}
2118
2118
#endif
2119
2119
@@ -2129,7 +2129,7 @@ void __init init_apic_mappings(void)
2129
2129
return ;
2130
2130
2131
2131
/* If no local APIC can be found return early */
2132
- if (!smp_found_config && detect_init_APIC ()) {
2132
+ if (!smp_found_config && ! detect_init_APIC ()) {
2133
2133
/* lets NOP'ify apic operations */
2134
2134
pr_info ("APIC: disable apic facility\n" );
2135
2135
apic_disable ();
0 commit comments