Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362177
b: refs/heads/master
c: 8164f7a
h: refs/heads/master
i:
  362175: a7c7ebf
v: v3
  • Loading branch information
Stephen Boyd authored and Russell King committed Mar 22, 2013
1 parent 83188f1 commit 1730780
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c40e3641670eb6ebfdb71d4b0c775416ef95f4f0
refs/heads/master: 8164f7af88d9ad3a757bd14f634b23997ee77f6b
20 changes: 20 additions & 0 deletions trunk/arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,23 @@ void __init early_print(const char *str, ...)
printk("%s", buf);
}

static void __init cpuid_init_hwcaps(void)
{
unsigned int divide_instrs;

if (cpu_architecture() < CPU_ARCH_ARMv7)
return;

divide_instrs = (read_cpuid_ext(CPUID_EXT_ISAR0) & 0x0f000000) >> 24;

switch (divide_instrs) {
case 2:
elf_hwcap |= HWCAP_IDIVA;
case 1:
elf_hwcap |= HWCAP_IDIVT;
}
}

static void __init feat_v6_fixup(void)
{
int id = read_cpuid_id();
Expand Down Expand Up @@ -483,6 +500,9 @@ static void __init setup_processor(void)
snprintf(elf_platform, ELF_PLATFORM_SIZE, "%s%c",
list->elf_name, ENDIANNESS);
elf_hwcap = list->elf_hwcap;

cpuid_init_hwcaps();

#ifndef CONFIG_ARM_THUMB
elf_hwcap &= ~(HWCAP_THUMB | HWCAP_IDIVT);
#endif
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mm/proc-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ __v7_pj4b_proc_info:
__v7_ca7mp_proc_info:
.long 0x410fc070
.long 0xff0ffff0
__v7_proc __v7_ca7mp_setup, hwcaps = HWCAP_IDIV
__v7_proc __v7_ca7mp_setup
.size __v7_ca7mp_proc_info, . - __v7_ca7mp_proc_info

/*
Expand All @@ -430,7 +430,7 @@ __v7_ca7mp_proc_info:
__v7_ca15mp_proc_info:
.long 0x410fc0f0
.long 0xff0ffff0
__v7_proc __v7_ca15mp_setup, hwcaps = HWCAP_IDIV
__v7_proc __v7_ca15mp_setup
.size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info

/*
Expand Down

0 comments on commit 1730780

Please sign in to comment.