[PATCH] More Sanity checks for DMAR

2007-11-19 Thread Fenghua Yu
check is not accurate and execution can pass when haw is less than one page size 4KB. This patch changes the haw sanity check to validate if haw is less than 4KB. 2. Add dmar_rmrr_units verification. 3. Add parse_dmar_table() verification. Thanks. -Fenghua Signed-off-by: Fenghua Yu [EMAIL PROTECTED

[PATCH] Fix incorrect comment on show_available_freqs() in freq_table.c

2007-10-17 Thread Fenghua Yu
In freq_table.c, show_available_freqs()'s comment is oberviously wrong. Change the comment to a new one to avoid confusion. Please apply it. Signed-off-by: Fenghua Yu [EMAIL PROTECTED] --- freq_table.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq

[PATCH v9 03/12] x86, topology: Don't offline CPU0 if any PIC irq can not be migrated out of it

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled by default. If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug feature

[PATCH v9 06/12] x86-64, hotplug: Add start_cpu0() entry point to head_64.S

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com start_cpu0() is defined in head_64.S for 64-bit. The function sets up stack and jumps to start_secondary() for CPU0 wake up. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_64.S | 15 +++ 1 files changed, 15 insertions

[PATCH v9 01/12] doc: Add x86 CPU0 online/offline feature

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise, by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables CPU0 online/offline feature. The documentations point out two known CPU0 dependencies. First, resume

[PATCH v9 11/12] x86/i387.c: Initialize thread xstate only on CPU0 only once

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com init_thread_xstate() is only called once to avoid overriding xstate_size during boot time or during CPU hotplug. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/i387.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff

[PATCH v9 10/12] x86, hotplug: The first online processor saves the MTRR state

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Ask the first online CPU to save mtrr instead of asking BSP. BSP could be offline when mtrr_save_state() is called. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/cpu/mtrr/main.c |9 +++-- 1 files changed, 7 insertions(+), 2

[PATCH v9 08/12] x86, hotplug: Wake up CPU0 via NMI instead of INIT, SIPI, SIPI

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap code which is not a desired behavior for waking up BSP. To avoid the boot-strap code, wake up CPU0 by NMI instead. This works to wake up soft offlined CPU0 only. If CPU0 is hard

[PATCH v9 09/12] x86, hotplug: During CPU0 online, enable x2apic, set_numa_node.

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Previously these functions were not run on the BSP (CPU 0, the boot processor) since the boot processor init would only be executed before this functionality was initialized. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/cpu/common.c

[PATCH v9 07/12] x86-32, hotplug: Add start_cpu0() entry point to head_32.S

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com start_cpu0() is defined in head_32.S for 32-bit. The function sets up stack and jumps to start_secondary() for CPU0 wake up. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_32.S | 12 1 files changed, 12 insertions

[PATCH v9 12/12] x86, topology: Debug CPU00 hotplug

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com CONFIG_DEBUG_HOTPLUG_CPU0 is for debugging the CPU0 hotplug feature. The switch offlines CPU0 as soon as possible and boots userspace up with CPU0 offlined. User can online CPU0 back after boot time. The default value of the switch is off. To debug CPU0

[PATCH v9 05/12] x86, hotplug, suspend: Online CPU0 for suspend or hibernate

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Because x86 BIOS requires CPU0 to resume from sleep, suspend or hibernate can't be executed if CPU0 is detected offline. To make suspend or hibernate and further resume succeed, CPU0 must be online. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch

[PATCH v9 02/12] x86, Kconfig: Add config switch for CPU0 hotplug

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether the CPU0 hotplug is on or off. If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug feature can still be turned on by kernel parameter cpu0_hotplug

[PATCH v9 0/12] x86: Arbitrary CPU hot(un)plug support

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com CPU0 or BSP (Bootstrap Processor) has been the last processor that can not be hot removed on x86. This patchset implements CPU0 or BSP online and offline and removes this obstacle to CPU hotplug. RAS needs the feature. If socket0 needs to be hotplugged

[PATCH v9 04/12] x86, hotplug: Support functions for CPU0 online/offline

2012-10-12 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Add smp_store_boot_cpu_info() to store cpu info for BSP during boot time. Now smp_store_cpu_info() stores cpu info for bringing up BSP or AP after it's offline. Continue to online CPU0 in native_cpu_up(). Continue to offline CPU0 in native_cpu_disable

[PATCH v10 08/14] x86-32, hotplug: Add start_cpu0() entry point to head_32.S

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com start_cpu0() is defined in head_32.S for 32-bit. The function sets up stack and jumps to start_secondary() for CPU0 wake up. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_32.S | 13 + 1 files changed, 13 insertions

[PATCH v10 14/14] x86, topology: Debug CPU00 hotplug

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com CONFIG_DEBUG_HOTPLUG_CPU0 is for debugging the CPU0 hotplug feature. The switch offlines CPU0 as soon as possible and boots userspace up with CPU0 offlined. User can online CPU0 back after boot time. The default value of the switch is off. To debug CPU0

[PATCH v10 05/14] x86, hotplug, suspend: Online CPU0 for suspend or hibernate

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Because x86 BIOS requires CPU0 to resume from sleep, suspend or hibernate can't be executed if CPU0 is detected offline. To make suspend or hibernate and further resume succeed, CPU0 must be online. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch

[PATCH v10 13/14] x86/i387.c: Initialize thread xstate only on CPU0 only once

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com init_thread_xstate() is only called once to avoid overriding xstate_size during boot time or during CPU hotplug. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/i387.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff

[PATCH v10 12/14] x86, hotplug: Handle retrigger irq by the first available CPU

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com The first cpu in irq cfg-domain is likely to be CPU 0 and may not be available when CPU 0 is offline. Instead of using CPU 0 to handle retriggered irq, we use first available CPU which is online and in this irq's domain. Signed-off-by: Fenghua Yu fenghua

[PATCH v10 10/14] x86, hotplug: During CPU0 online, enable x2apic, set_numa_node.

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Previously these functions were not run on the BSP (CPU 0, the boot processor) since the boot processor init would only be executed before this functionality was initialized. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/cpu/common.c

[PATCH v10 11/14] x86, hotplug: The first online processor saves the MTRR state

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Ask the first online CPU to save mtrr instead of asking BSP. BSP could be offline when mtrr_save_state() is called. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/cpu/mtrr/main.c |9 +++-- 1 files changed, 7 insertions(+), 2

[PATCH v10 01/14] doc: Add x86 CPU0 online/offline feature

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise, by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables CPU0 online/offline feature. The documentations point out two known CPU0 dependencies. First, resume

[PATCH v10 02/14] x86, Kconfig: Add config switch for CPU0 hotplug

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether the CPU0 hotplug is on or off. If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug feature can still be turned on by kernel parameter cpu0_hotplug

[PATCH v10 09/14] x86, hotplug: Wake up CPU0 via NMI instead of INIT, SIPI, SIPI

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap code which is not a desired behavior for waking up BSP. To avoid the boot-strap code, wake up CPU0 by NMI instead. This works to wake up soft offlined CPU0 only. If CPU0 is hard

[PATCH v10 07/14] x86-64, hotplug: Add start_cpu0() entry point to head_64.S

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com start_cpu0() is defined in head_64.S for 64-bit. The function sets up stack and jumps to start_secondary() for CPU0 wake up. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_64.S | 16 1 files changed, 16 insertions

[PATCH v10 06/14] kernel/cpu.c: Add comment for priority in cpu_hotplug_pm_callback

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com cpu_hotplug_pm_callback should have higher priority than bsp_pm_callback which depends on cpu_hotplug_pm_callback to disable cpu hotplug to avoid race during bsp online checking. This is to hightlight the priorities between the two callbacks in case people

[PATCH v10 0/14] x86: Arbitrary CPU hot(un)plug support

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com CPU0 or BSP (Bootstrap Processor) has been the last processor that can not be hot removed on x86. This patchset implements CPU0 or BSP online and offline and removes this obstacle to CPU hotplug. RAS needs the feature. If socket0 needs to be hotplugged

[PATCH v10 04/14] x86, hotplug: Support functions for CPU0 online/offline

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Add smp_store_boot_cpu_info() to store cpu info for BSP during boot time. Now smp_store_cpu_info() stores cpu info for bringing up BSP or AP after it's offline. Continue to online CPU0 in native_cpu_up(). Continue to offline CPU0 in native_cpu_disable

[PATCH v10 03/14] x86, topology: Don't offline CPU0 if any PIC irq can not be migrated out of it

2012-11-13 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled by default. If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug feature

[PATCH] Fix uninitialized local variable covered in i386 acpi-cpufreq driver

2007-07-26 Thread Fenghua Yu
The local variable covered is used without initialization in i386 acpi-cpufreq driver. The initial value of covered should be 0. The bug will cause memory leak when hit. The following patch fixes this bug. Signed-off-by: Fenghua Yu [EMAIL PROTECTED] --- arch/i386/kernel/cpu/cpufreq/acpi

Re:[PATCH] Fix uninitialized local variable covered in i386 acpi-cpufreq driver

2007-07-26 Thread Fenghua Yu
Updated patch: Use CPU_MASK_NONE for initil value. Signed-off-by: Fenghua Yu [EMAIL PROTECTED] --- arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq

[PATCH] Fix some x86/x86-64 acpi-cpufreq driver issues

2007-08-02 Thread Fenghua Yu
load driver in acpi_cpufreq_early_init() failure case. 3. Add __init for acpi_cpufreq_early_init(). Thanks. -Fenghua Signed-off-by: Fenghua Yu [EMAIL PROTECTED] --- arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 39 ++-- drivers/acpi/processor_perflib.c

[PATCH] x86/microcode_intel_early.c: Get 32-bit physical address by __pa_nodebug()

2013-03-19 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com In 32-bit, __pa_symbol() in CONFIG_DEBUG_VIRTUAL accesses kernel data (e.g. max_low_pfn) that haven't been setup yet in such early boot phase. To fix the issue, __pa_nodebug() replaces __pa_symbol() to get a global symbol's physical address. Signed-off

[PATCH v2 04/10] x86/microcode_intel_lib.c: Early update ucode on Intel's CPU

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define interfaces microcode_sanity_check() and get_matching_microcode(). They are called both in early boot time and in microcode Intel driver. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/microcode_intel_lib.c | 174

[PATCH v2 06/10] x86/head_32.S: Early update ucode in 32-bit

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This updates ucode in 32-bit kernel. At this point, there is no paging and no virtual address yet. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_32.S |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git

[PATCH v2 03/10] x86/microcode_core_early.c: Define interfaces for early loading ucode

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and AP in early boot time. These are generic interfaces. Internally they call vendor specific implementations. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/include

[PATCH v2 09/10] x86/mm/init.c: Copy ucode from initrd image to memory

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Before initrd image is freed, copy valid ucode patches from initrd image to kernel virtual memory. The saved ucode will be used to update AP in resume. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/mm/init.c | 10 ++ 1 files changed

[PATCH v2 10/10] x86/Kconfig: Configurations to enable/disable the feature

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com MICROCODE_INTEL_LIB, MICROCODE_INTEL_EARLY, and MICROCODE_EARLY are three new configurations to enable or disable the feature. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/Kconfig | 18 ++ 1 files changed, 18 insertions

[PATCH v2 00/11] x86/microcode: Early load microcode

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com The problem in current microcode loading method is that we load a microcode way, way too late; ideally we should load it before turning paging on. This may only be practical on 32 bits since we can't get to 64-bit mode without paging on, but we should still

[PATCH v2 08/10] x86/smpboot.c: Early update ucode on AP

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This updates ucode on AP. At this point, BSP should store some valid ucode patches in memory if it finds the ucode patches in initrd. AP searches the stored ucode and uploads the ucode. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel

[PATCH v2 05/10] x86/microcode_intel_early.c: Early update ucode on Intel's CPU

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Implementation of early update ucode on Intel's CPU. load_ucode_intel_bsp() scans ucode in initrd image file which is a cpio format ucode followed by ordinary initrd image file. The binary ucode file is stored in kernel/x86/microcode/GenuineIntel

[PATCH v2 02/10] x86/microcode_intel.h: Define functions and macros for early loading ucode

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define some functions and macros that will be used in early loading ucode. Some of them are moved from microcode_intel.c driver in order to be called in early boot phase before module can be called. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch

[PATCH v2 01/10] Documentation/x86: Early load microcode

2012-11-30 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Documenation for early loading microcode methodology. Signed-off-by: Fenghua Yu fenghua...@intel.com --- Documentation/x86/early-microcode.txt | 43 + 1 files changed, 43 insertions(+), 0 deletions(-) create mode 100644

[PATCH v7 0/12] x86: Arbitrary CPU hot(un)plug support

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com CPU0 or BSP (Bootstrap Processor) has been the last processor that can not be hot removed on x86. This patch set implements CPU0 or BSP online and offline and removes this obstacle to CPU hotplug. RAS needs the feature. If socket0 needs to be hotplugged

[PATCH v7 01/12] Documentations/cpu-hotplug.tx, kernel-parameters.txt: Add x86 CPU0 online/offline feature

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise, by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables CPU0 online/offline feature. The documentations point out two known CPU0 dependencies. First, resume

[PATCH v7 04/12] Don't offline CPU0 if any PIC irq can not be migrated out of it.

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Change smp_store_cpu_info() to store cpu info for a CPU when it's brought up. This includes bringing up CPU0 or AP after it's offline. But don't store cpu info when BSP first boots during boot time. Continue to online CPU0 in native_cpu_up(). Signed-off

[PATCH v7 10/12] Ask the first online CPU to save mtrr instead of asking BSP. BSP could be offline when mtrr_save_state() is called.

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/cpu/mtrr/main.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 6b96110..e4c1a41

[PATCH v7 08/12] Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap code which is not a desired behavior for waking up BSP. To avoid the boot-strap code, wake up CPU0 by

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This works to wake up soft offlined CPU0 only. If CPU0 is hard offlined (i.e. physically hot removed and then hot added), NMI won't wake it up. We'll change this code in the future to wake up hard offlined CPU0 if real platform and request are available. AP

[PATCH v7 11/12] x86/i387.c: Thread xstate is initialized only on CPU0 once

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com init_thread_xstate() is only called once to avoid overriding xstate_size during boot time or during CPU hotplug. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/i387.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff

[PATCH v7 12/12] x86/topology.c: debug CPU0 hotplug

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com CONFIG_DEBUG_HOTPLUG_CPU0 is for debuging the CPU0 hotplug feature. The switch offlines CPU0 as soon as possible and boots userspace up with CPU0 offlined. User can online CPU0 back after boot time. The default value of the switch is off. To debug CPU0

[PATCH v7 09/12] During CPU0 online, enable x2apic, set_numa_node.

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/cpu/common.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 2ea24da..ce8b772 100644 --- a/arch

[PATCH v7 02/12] x86/Kconfig: Add config switch for CPU0 hotplug

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether the CPU0 hotplug is on or off. If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug feature can still be turned on by kernel parameter cpu0_hotplug

[PATCH v7 03/12] x86/topology.c: Support functions for CPU0 online/offline

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled by default. If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug feature

[PATCH v7 07/12] start_cpu0() is defined in head_32.S for 32-bit. The function sets up stack and jumps to start_secondary() for CPU0 wake up.

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_32.S | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index d42ab17..964f87a 100644 --- a/arch

[PATCH v7 06/12] start_cpu0() is defined in head_64.S for 64-bit. The function sets up stack and jumps to start_secondary() for CPU0 wake up.

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_64.S | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 94bf9cc..3faac8a 100644

[PATCH v7 05/12] Because x86 BIOS requires CPU0 to resume from sleep, suspend or hibernate can't be executed if CPU0 is detected offline. To make suspend or hibernate and further resume succeed, CPU0

2012-08-23 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/power/cpu.c | 44 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 218cdb1..3338609

[PATCH v8 0/12] x86: Arbitrary CPU hot(un)plug support

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com CPU0 or BSP (Bootstrap Processor) has been the last processor that can not be hot removed on x86. This patchset implements CPU0 or BSP online and offline and removes this obstacle to CPU hotplug. RAS needs the feature. If socket0 needs to be hotplugged

[PATCH v8 01/12] doc: Add x86 CPU0 online/offline feature

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise, by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables CPU0 online/offline feature. The documentations point out two known CPU0 dependencies. First, resume

[PATCH v8 05/12] x86, hotplug, suspend: Online CPU0 for suspend or hibernate

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Because x86 BIOS requires CPU0 to resume from sleep, suspend or hibernate can't be executed if CPU0 is detected offline. To make suspend or hibernate and further resume succeed, CPU0 must be online. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch

[PATCH v8 02/12] x86, Kconfig: Add config switch for CPU0 hotplug

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether the CPU0 hotplug is on or off. If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug feature can still be turned on by kernel parameter cpu0_hotplug

[PATCH v8 12/12] x86, topology: Debug CPU00 hotplug

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com CONFIG_DEBUG_HOTPLUG_CPU0 is for debugging the CPU0 hotplug feature. The switch offlines CPU0 as soon as possible and boots userspace up with CPU0 offlined. User can online CPU0 back after boot time. The default value of the switch is off. To debug CPU0

[PATCH v8 11/12] x86/i387.c: Initialize thread xstate only on CPU0 only once

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com init_thread_xstate() is only called once to avoid overriding xstate_size during boot time or during CPU hotplug. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/i387.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff

[PATCH v8 10/12] x86, hotplug: The first online processor saves the MTRR state

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Ask the first online CPU to save mtrr instead of asking BSP. BSP could be offline when mtrr_save_state() is called. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/cpu/mtrr/main.c |9 +++-- 1 files changed, 7 insertions(+), 2

[PATCH v8 08/12] x86, hotplug: Wake up CPU0 via NMI instead of INIT, SIPI, SIPI

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap code which is not a desired behavior for waking up BSP. To avoid the boot-strap code, wake up CPU0 by NMI instead. This works to wake up soft offlined CPU0 only. If CPU0 is hard

[PATCH v8 09/12] x86, hotplug: During CPU0 online, enable x2apic, set_numa_node.

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Previously these functions were not run on the BSP (CPU 0, the boot processor) since the boot processor init would only be executed before this functionality was initialized. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/cpu/common.c

[PATCH v8 07/12] x86-32, hotplug: Add start_cpu0() entry point to head_32.S

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com start_cpu0() is defined in head_32.S for 32-bit. The function sets up stack and jumps to start_secondary() for CPU0 wake up. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_32.S | 12 1 files changed, 12 insertions

[PATCH v8 06/12] x86-64, hotplug: Add start_cpu0() entry point to head_64.S

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com start_cpu0() is defined in head_64.S for 64-bit. The function sets up stack and jumps to start_secondary() for CPU0 wake up. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_64.S | 15 +++ 1 files changed, 15 insertions

[PATCH v8 04/12] x86, hotplug: Support functions for CPU0 online/offline

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Add smp_store_boot_cpu_info() to store cpu info for BSP during boot time. Now smp_store_cpu_info() stores cpu info for bringing up BSP or AP after it's offline. Continue to online CPU0 in native_cpu_up(). Continue to offline CPU0 in native_cpu_disable

[PATCH v8 03/12] x86, topology: Don't offline CPU0 if any PIC irq can not be migrated out of it

2012-08-25 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled by default. If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug feature

[PATCH 00/11] x86/microcode: Early load microcode

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com The problem in current microcode loading method is that we load a microcode way, way too late; ideally we should load it before turning paging on. This may only be practical on 32 bits since we can't get to 64-bit mode without paging on, but we should still

[PATCH 03/11] x86/microcode_intel.h: Define functions and macros for early load ucode

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define some functions and macros that will be used in early load ucode. Some of them are moved from microcode_intel.c driver in order to be called in early boot phase before module can be called. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86

[PATCH 09/11] x86/smpboot.c: Early update ucode on AP

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This updates ucode on AP. At this point, BSP should store some valid ucode patches in memory if it finds the ucode patches in initrd. AP searches the stored ucode and uploads the ucode. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel

[PATCH 10/11] x86/mm/init.c: Copy ucode from initrd image to memory

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Before initrd image is freed, copy valid ucode patches from initrd image to kernel virtual memory. The saved ucode will be used to update AP in resume. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/mm/init.c | 10 ++ 1 files changed

[PATCH 11/11] x86/Kconfig: Configurations to enable/disable the feature

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com MICROCODE_INTEL_LIB, MICROCODE_INTEL_EARLY, and MICROCODE_EARLY are three new configurations to enable or disable the feature. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/Kconfig | 22 ++ 1 files changed, 22 insertions

[PATCH 01/11] Documentation/x86: Early load microcode

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Documenation for early load microcode methodology. Signed-off-by: Fenghua Yu fenghua...@intel.com --- Documentation/x86/earlyucode.txt | 43 ++ 1 files changed, 43 insertions(+), 0 deletions(-) create mode 100644

[PATCH 02/11] x86/lib/cpio.c: Find cpio data by its file name

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Given a file's name, find its starting point in a cpio formated area. This will be used to find microcode in combined initrd image. But this function is generic and could be used in other places. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86

[PATCH 06/11] x86/microcode_intel_early.c: Early update ucode on Intel's CPU

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Implementation of early update ucode on Intel's CPU. load_ucode_intel_bsp() scans ucode in initrd image file which is a cpio format ucode followed by ordinary initrd image file. The binary ucode file is stored in kernel/x86/microcode/GenuineIntel

[PATCH 08/11] x86/head64.c: Early update ucode in 64-bit

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This updates ucode in 64-bit mode. Paging and virtual address are working now. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head64.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/head64.c

[PATCH 05/11] x86/microcode_intel_lib.c: Early update ucode on Intel's CPU

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define interfaces microcode_sanity_check() and get_matching_microcode(). They are called both in early boot time and in microcode Intel driver. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/microcode_intel_lib.c | 163

[PATCH 04/11] x86/microcode_core_early.c: Define interfaces for early load ucode

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and AP in early boot time. These are generic interfaces. Internally they call vendor specific implementations. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/include

[PATCH 07/11] x86/head_32.S: Early update ucode in 32-bit

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This updates ucode in 32-bit kernel. At this point, there is no paging and no virtual address yet. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_32.S |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git

[PATCH v4 00/11] x86/microcode: Early load microcode

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com The problem in current microcode loading method is that we load a microcode way, way too late; ideally we should load it before turning paging on. This may only be practical on 32 bits since we can't get to 64-bit mode without paging on, but we should still

[PATCH v4 01/11] Documentation/x86: Early load microcode

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Documenation for early loading microcode methodology. Signed-off-by: Fenghua Yu fenghua...@intel.com --- Documentation/x86/early-microcode.txt | 43 +++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/x86

[PATCH v4 08/11] x86/head_32.S: Early update ucode in 32-bit

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This updates ucode in 32-bit kernel. At this point, there is no paging and no virtual address yet. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head_32.S | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86/kernel

[PATCH v4 07/11] x86/microcode_intel_early.c: Early update ucode on Intel's CPU

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Implementation of early update ucode on Intel's CPU. load_ucode_intel_bsp() scans ucode in initrd image file which is a cpio format ucode followed by ordinary initrd image file. The binary ucode file is stored in kernel/x86/microcode/GenuineIntel.bin

[PATCH v4 10/11] x86/mm/init.c: Copy ucode from initrd image to kernel memory

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Before initrd image is freed, copy valid ucode patches from initrd image to kernel memory. The saved ucode will be used to update AP in resume or hotplug. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/mm/init.c | 10 ++ 1 file changed

[PATCH v4 11/11] x86/Kconfig: Configurations to enable/disable the feature

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com MICROCODE_INTEL_LIB, MICROCODE_INTEL_EARLY, and MICROCODE_EARLY are three new configurations to enable or disable the feature. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/Kconfig | 18 ++ 1 file changed, 18 insertions

[PATCH v4 09/11] x86/head64.c: Early update ucode in 64-bit

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This updates ucode on BSP in 64-bit mode. Paging and virtual address are working now. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/head64.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kernel/head64.c b/arch/x86

[PATCH v4 05/11] x86/microcode_intel_lib.c: Early update ucode on Intel's CPU

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define interfaces microcode_sanity_check() and get_matching_microcode(). They are called both in early boot time and in microcode Intel driver. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/kernel/microcode_intel_lib.c | 174

[PATCH v4 06/11] x86/tlbflush.h: Define __native_flush_tlb_global_irq_disabled()

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This function is called in __native_flush_tlb_global() and after apply_microcode_early(). Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/include/asm/tlbflush.h | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff

[PATCH v4 04/11] x86/microcode_core_early.c: Define interfaces for early loading ucode

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and AP in early boot time. These are generic interfaces. Internally they call vendor specific implementations. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/include

[PATCH v4 02/11] x86/microcode_intel.h: Define functions and macros for early loading ucode

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define some functions and macros that will be used in early loading ucode. Some of them are moved from microcode_intel.c driver in order to be called in early boot phase before module can be called. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch

[PATCH v4 03/11] x86/common.c: Make have_cpuid_p() a global function and load ucode or show ucode loading info on AP

2012-12-20 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Remove static declaration in have_cpuid_p() to make it a global function. The function will be called in early loading microcode. In 64 bit, load ucode on AP in cpu_init(). In 32 bit, show ucode loading info on AP in cpu_init(). Signed-off-by: Fenghua Yu

[PATCH v5 00/12] x86/microcode: Early load microcode

2012-12-21 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com The problem in current microcode loading method is that we load a microcode way, way too late; ideally we should load it before turning paging on. This may only be practical on 32 bits since we can't get to 64-bit mode without paging on, but we should still

[PATCH v5 01/12] Documentation/x86: Early load microcode

2012-12-21 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Documenation for early loading microcode methodology. Signed-off-by: Fenghua Yu fenghua...@intel.com --- Documentation/x86/early-microcode.txt | 43 +++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/x86

[PATCH v5 04/12] x86/common.c: load ucode in 64 bit or show loading ucode info in 32 bit on AP

2012-12-21 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com In 64 bit, load ucode on AP in cpu_init(). In 32 bit, show ucode loading info on AP in cpu_init(). Microcode has been loaded earlier before paging. Now it is safe to show the loading microcode info on this AP. Signed-off-by: Fenghua Yu fenghua...@intel.com

[PATCH v5 07/12] x86/tlbflush.h: Define __native_flush_tlb_global_irq_disabled()

2012-12-21 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com This function is called in __native_flush_tlb_global() and after apply_microcode_early(). Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/include/asm/tlbflush.h | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff

[PATCH v5 03/12] x86/common.c: Make have_cpuid_p() a global function

2012-12-21 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Remove static declaration in have_cpuid_p() to make it a global function. The function will be called in early loading microcode. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/include/asm/processor.h | 8 arch/x86/kernel/cpu/common.c

[PATCH v5 05/12] x86/microcode_core_early.c: Define interfaces for early loading ucode

2012-12-21 Thread Fenghua Yu
From: Fenghua Yu fenghua...@intel.com Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and AP in early boot time. These are generic interfaces. Internally they call vendor specific implementations. Signed-off-by: Fenghua Yu fenghua...@intel.com --- arch/x86/include

  1   2   3   4   5   6   7   8   9   10   >