amd.c (aa5e5dc2a8878ecf1a94819d889939023fd576c9) amd.c (09dc68d958c67c76cf672ec78b7391af453010f8)
1#include <linux/export.h>
2#include <linux/init.h>
3#include <linux/bitops.h>
4#include <linux/elf.h>
5#include <linux/mm.h>
6
7#include <linux/io.h>
8#include <linux/sched.h>

--- 325 unchanged lines hidden (view full) ---

334 /* core id has to be in the [0 .. cores_per_node - 1] range */
335 c->cpu_core_id %= cores_per_node;
336 c->compute_unit_id %= cus_per_node;
337 }
338}
339#endif
340
341/*
1#include <linux/export.h>
2#include <linux/init.h>
3#include <linux/bitops.h>
4#include <linux/elf.h>
5#include <linux/mm.h>
6
7#include <linux/io.h>
8#include <linux/sched.h>

--- 325 unchanged lines hidden (view full) ---

334 /* core id has to be in the [0 .. cores_per_node - 1] range */
335 c->cpu_core_id %= cores_per_node;
336 c->compute_unit_id %= cus_per_node;
337 }
338}
339#endif
340
341/*
342 * On a AMD dual core setup the lower bits of the APIC id distinguish the cores.
342 * On a AMD dual core setup the lower bits of the APIC id distingush the cores.
343 * Assumes number of cores is a power of two.
344 */
345static void amd_detect_cmp(struct cpuinfo_x86 *c)
346{
347#ifdef CONFIG_X86_HT
348 unsigned bits;
349 int cpu = smp_processor_id();
350

--- 467 unchanged lines hidden (view full) ---

818
819 cpu_set_tlb_flushall_shift(c);
820}
821
822static const struct cpu_dev amd_cpu_dev = {
823 .c_vendor = "AMD",
824 .c_ident = { "AuthenticAMD" },
825#ifdef CONFIG_X86_32
343 * Assumes number of cores is a power of two.
344 */
345static void amd_detect_cmp(struct cpuinfo_x86 *c)
346{
347#ifdef CONFIG_X86_HT
348 unsigned bits;
349 int cpu = smp_processor_id();
350

--- 467 unchanged lines hidden (view full) ---

818
819 cpu_set_tlb_flushall_shift(c);
820}
821
822static const struct cpu_dev amd_cpu_dev = {
823 .c_vendor = "AMD",
824 .c_ident = { "AuthenticAMD" },
825#ifdef CONFIG_X86_32
826 .c_models = {
827 { .vendor = X86_VENDOR_AMD, .family = 4, .model_names =
826 .legacy_models = {
827 { .family = 4, .model_names =
828 {
829 [3] = "486 DX/2",
830 [7] = "486 DX/2-WB",
831 [8] = "486 DX/4",
832 [9] = "486 DX/4-WB",
833 [14] = "Am5x86-WT",
834 [15] = "Am5x86-WB"
835 }
836 },
837 },
828 {
829 [3] = "486 DX/2",
830 [7] = "486 DX/2-WB",
831 [8] = "486 DX/4",
832 [9] = "486 DX/4-WB",
833 [14] = "Am5x86-WT",
834 [15] = "Am5x86-WB"
835 }
836 },
837 },
838 .c_size_cache = amd_size_cache,
838 .legacy_cache_size = amd_size_cache,
839#endif
840 .c_early_init = early_init_amd,
841 .c_detect_tlb = cpu_detect_tlb_amd,
842 .c_bsp_init = bsp_init_amd,
843 .c_init = init_amd,
844 .c_x86_vendor = X86_VENDOR_AMD,
845};
846

--- 65 unchanged lines hidden ---
839#endif
840 .c_early_init = early_init_amd,
841 .c_detect_tlb = cpu_detect_tlb_amd,
842 .c_bsp_init = bsp_init_amd,
843 .c_init = init_amd,
844 .c_x86_vendor = X86_VENDOR_AMD,
845};
846

--- 65 unchanged lines hidden ---