bionic: Update mechanism to detect number of CPU's for msm targets
msm targets use CPU hotplug for power management, which results in
/proc/cpuinfo and /proc/stat to return back incorrect number of
available CPUs for msm configuration.
Use /sys/devices/system/cpu/present instead when indicating total
number of CPUs to userspace processes and let system power
management take care of when to swich CPUs between online/offline
states.
Only 0-N format is supported for detecting number of CPUs.
0-N,M format for detecting number of CPUs is not supported, and is
currently not a valid configuration on msm targets.
ifdef for QCOM_HARDWARE
Change-Id: I40ab2f79ca67cdbf7f1bf87d52007f822ee76269
diff --git a/libc/Android.mk b/libc/Android.mk
index 82ef6ec..59d0065 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -487,6 +487,10 @@
-DPOSIX_MISTAKE \
-DLOG_ON_HEAP_ERROR \
+ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
+libc_common_cflags += -DQCOM_HARDWARE
+endif
+
# these macro definitions are required to implement the
# 'timezone' and 'daylight' global variables, as well as
# properly update the 'tm_gmtoff' field in 'struct tm'.