diff options
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r-- | arch/arm/kernel/setup.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index f9c863911038..e55408e96559 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -657,10 +657,13 @@ int __init arm_add_memory(u64 start, u64 size) | |||
657 | 657 | ||
658 | /* | 658 | /* |
659 | * Ensure that start/size are aligned to a page boundary. | 659 | * Ensure that start/size are aligned to a page boundary. |
660 | * Size is appropriately rounded down, start is rounded up. | 660 | * Size is rounded down, start is rounded up. |
661 | */ | 661 | */ |
662 | size -= start & ~PAGE_MASK; | ||
663 | aligned_start = PAGE_ALIGN(start); | 662 | aligned_start = PAGE_ALIGN(start); |
663 | if (aligned_start > start + size) | ||
664 | size = 0; | ||
665 | else | ||
666 | size -= aligned_start - start; | ||
664 | 667 | ||
665 | #ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT | 668 | #ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT |
666 | if (aligned_start > ULONG_MAX) { | 669 | if (aligned_start > ULONG_MAX) { |
@@ -1046,6 +1049,15 @@ static int c_show(struct seq_file *m, void *v) | |||
1046 | seq_printf(m, "model name\t: %s rev %d (%s)\n", | 1049 | seq_printf(m, "model name\t: %s rev %d (%s)\n", |
1047 | cpu_name, cpuid & 15, elf_platform); | 1050 | cpu_name, cpuid & 15, elf_platform); |
1048 | 1051 | ||
1052 | #if defined(CONFIG_SMP) | ||
1053 | seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", | ||
1054 | per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ), | ||
1055 | (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100); | ||
1056 | #else | ||
1057 | seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", | ||
1058 | loops_per_jiffy / (500000/HZ), | ||
1059 | (loops_per_jiffy / (5000/HZ)) % 100); | ||
1060 | #endif | ||
1049 | /* dump out the processor features */ | 1061 | /* dump out the processor features */ |
1050 | seq_puts(m, "Features\t: "); | 1062 | seq_puts(m, "Features\t: "); |
1051 | 1063 | ||