• Robert Richter's avatar
    x86: fix: make PCI ECS for AMD CPUs hotplug capable · 91ede005
    Robert Richter authored
    Until now, PCI ECS setup was performed at boot time only and for cpus
    that are enabled then. This patch fixes this and adds cpu hotplug.
    
    Tests sequence (check if ECS bit is set when bringing cpu online again):
    
     # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
     00000008 00404010
     # ( perl -e 'sysseek(STDOUT, 0xC001001F, 0); print pack "l*", 8, 0x00400010' ) > /dev/cpu/1/msr
     # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
     00000008 00400010
     # echo 0 > /sys/devices/system/cpu/cpu1/online
     # echo 1 > /sys/devices/system/cpu/cpu1/online
     # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
     00000008 00404010
    Reported-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
    Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    91ede005
amd_bus.c 13.4 KB