Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31c997ca authored by Ingo Molnar's avatar Ingo Molnar
Browse files

x86: Fix cpu_devs[] initialization in early_cpu_init()



Yinghai Lu noticed that this commit:

  0388423d: x86: Minimise printk spew from per-vendor init code

mistakenly left out the initialization of cpu_devs[] in the
!PROCESSOR_SELECT case. Fix it.

Reported-by: default avatarYinghai Lu <yinghai@kernel.org>
Cc: Dave Jones <davej@redhat.com>
LKML-Reference: <20091113203000.GA19160@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b01c845f
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -651,20 +651,25 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)

void __init early_cpu_init(void)
{
#ifdef PROCESSOR_SELECT
	const struct cpu_dev *const *cdev;
	int count = 0;

#ifdef PROCESSOR_SELECT
	printk(KERN_INFO "KERNEL supported cpus:\n");
#endif

	for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
		const struct cpu_dev *cpudev = *cdev;
		unsigned int j;

		if (count >= X86_VENDOR_NUM)
			break;
		cpu_devs[count] = cpudev;
		count++;

#ifdef PROCESSOR_SELECT
		{
			unsigned int j;

			for (j = 0; j < 2; j++) {
				if (!cpudev->c_ident[j])
					continue;
@@ -673,6 +678,7 @@ void __init early_cpu_init(void)
			}
		}
#endif
	}
	early_identify_cpu(&boot_cpu_data);
}