android_kernel_oneplus_msm8998/arch/x86
Samuel Neves 24cdc06fcf x86/topology: Update the 'cpu cores' field in /proc/cpuinfo correctly across CPU hotplug operations
[ Upstream commit 4596749339e06dc7a424fc08a15eded850ed78b7 ]

Without this fix, /proc/cpuinfo will display an incorrect amount
of CPU cores, after bringing them offline and online again, as
exemplified below:

  $ cat /proc/cpuinfo | grep cores
  cpu cores	: 4
  cpu cores	: 8
  cpu cores	: 8
  cpu cores	: 20
  cpu cores	: 4
  cpu cores	: 3
  cpu cores	: 2
  cpu cores	: 2

This patch fixes this by always zeroing the booted_cores variable
upon turning off a logical CPU.

Tested-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Signed-off-by: Samuel Neves <sneves@dei.uc.pt>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: jgross@suse.com
Cc: luto@kernel.org
Cc: prarit@redhat.com
Cc: vkuznets@redhat.com
Link: http://lkml.kernel.org/r/20180221205036.5244-1-sneves@dei.uc.pt
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:49:01 +02:00
..
boot efi: Avoid potential crashes, fix the 'struct efi_pci_io_protocol_32' definition for mixed mode 2018-05-26 08:48:56 +02:00
configs kconfig: tinyconfig: provide whole choice blocks to avoid warnings 2016-09-24 10:07:42 +02:00
crypto crypto: x86/cast5-avx - fix ECB encryption when long sg follows short one 2018-04-08 11:52:00 +02:00
entry x86/entry/64: Don't use IST entry for #BP stack 2018-03-28 18:40:16 +02:00
ia32 Merge branch 'x86-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-11-03 21:05:40 -08:00
include futex: Remove duplicated code and fix undefined behaviour 2018-05-26 08:48:50 +02:00
kernel x86/topology: Update the 'cpu cores' field in /proc/cpuinfo correctly across CPU hotplug operations 2018-05-30 07:49:01 +02:00
kvm kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl 2018-05-30 07:48:52 +02:00
lguest x86/paravirt: Prevent rtc_cmos platform device init on PV guests 2015-12-19 21:35:13 +01:00
lib x86/hweight: Don't clobber %rdi 2018-04-24 09:32:04 +02:00
math-emu x86/fpu/math-emu: Fix possible uninitialized variable use 2018-02-25 11:03:43 +01:00
mm x86/mm: implement free pmd/pte page interfaces 2018-03-28 18:40:14 +02:00
net bpf, x64: increase number of passes 2018-03-28 18:40:17 +02:00
oprofile x86/oprofile: Fix bogus GCC-8 warning in nmi_setup() 2018-02-28 10:17:22 +01:00
pci x86/PCI: Make broadcom_postcore_init() check acpi_disabled 2017-12-16 10:33:48 +01:00
platform x86/platform/olpc: Fix resume handler build warning 2018-02-25 11:03:47 +01:00
power x86/power: Fix swsusp_arch_resume prototype 2018-05-30 07:48:55 +02:00
purgatory x86/kexec: add -fno-PIE 2016-11-26 09:54:52 +01:00
ras x86/ras/mce_amd_inj: Inject bank 4 errors on the NBC 2015-10-12 16:15:48 +02:00
realmode x86/pti/efi: broken conversion from efi to kernel page table 2018-01-17 09:35:29 +01:00
tools x86: Treat R_X86_64_PLT32 as R_X86_64_PC32 2018-03-18 11:17:52 +01:00
um um: Use POSIX ucontext_t instead of struct ucontext 2018-04-24 09:32:08 +02:00
video
xen tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all} 2018-05-26 08:48:54 +02:00
.gitignore x86/build: Add arch/x86/purgatory/ make generated files to gitignore 2014-10-09 09:29:46 +02:00
Kbuild x86/asm/entry, x86/vdso: Move the vDSO code to arch/x86/entry/vdso/ 2015-06-03 18:51:37 +02:00
Kconfig x86/hweight: Get rid of the special calling convention 2018-04-24 09:32:04 +02:00
Kconfig.cpu x86/Kconfig/cpus: Fix/complete CPU type help texts 2015-10-21 11:12:56 +02:00
Kconfig.debug x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG 2018-02-25 11:03:43 +01:00
Makefile x86/build/64: Force the linker to use 2MB page size 2018-03-28 18:40:16 +02:00
Makefile.um kbuild: use relative path more to include Makefile 2015-04-02 16:42:08 +02:00
Makefile_32.cpu