kernel/x86: Fix some warnings.

This commit is contained in:
Augustin Cavalier
2019-01-15 17:08:18 -05:00
parent f3441f9702
commit 96bc0f463f
2 changed files with 4 additions and 2 deletions
@@ -52,6 +52,6 @@ arch_altcodepatch_replace(uint16 tag, void* newcodepatch, size_t length)
// disable write after patch // disable write after patch
set_area_protection(info->text_region.id, kernelProtection); set_area_protection(info->text_region.id, kernelProtection);
dprintf("arch_altcodepatch_replace found %d altcodepatches\n", count); dprintf("arch_altcodepatch_replace found %" B_PRIu32 " altcodepatches\n", count);
} }
+3 -1
View File
@@ -628,7 +628,7 @@ detect_amd_cache_topology(uint32 maxExtendedLeaf)
if (maxExtendedLeaf < 0x8000001d) if (maxExtendedLeaf < 0x8000001d)
return; return;
uint8 hierarchyLevels[CPU_MAX_CACHE_LEVEL]; uint8 hierarchyLevels[CPU_MAX_CACHE_LEVEL];
int maxCacheLevel = 0; int maxCacheLevel = 0;
@@ -1171,6 +1171,7 @@ arch_cpu_init(kernel_args* args)
} }
#ifdef __x86_64__
static void static void
enable_smap(void* dummy, int cpu) enable_smap(void* dummy, int cpu)
{ {
@@ -1183,6 +1184,7 @@ enable_smep(void* dummy, int cpu)
{ {
x86_write_cr4(x86_read_cr4() | IA32_CR4_SMEP); x86_write_cr4(x86_read_cr4() | IA32_CR4_SMEP);
} }
#endif
status_t status_t