summaryrefslogtreecommitdiff
path: root/cpus.h
blob: 062672677d73b72319e93f546a8c70f3899c7ad4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef CPUS_H
#define CPUS_H

#include <unistd.h>
#include "built_in.h"
#include "die.h"

static inline unsigned int get_number_cpus(void)
{
	int ret = sysconf(_SC_NPROCESSORS_CONF);

	if (unlikely(ret <= 0))
		panic("get_number_cpus error!\n");

	return ret;
}

static inline unsigned int get_number_cpus_online(void)
{
	int ret = sysconf(_SC_NPROCESSORS_ONLN);

	if (unlikely(ret <= 0))
		panic("get_number_cpus_online error!\n");

	return ret;
}

#endif /* CPUS_H */
/table>
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-04-29 22:40:18 +0200
committerShawn Guo <shawnguo@kernel.org>2016-05-03 20:58:01 +0800
commit154e80e21b764117ea19de74bc97863efabe192e (patch)
treee39b948f2c1a3e15704a21f03ceb97a735a10514 /Documentation/hwmon
parent2556247dea686d6fd21f1b4249ec527b9b285201 (diff)
ARM: imx_v6_v7_defconfig: add CONFIG_I2C_GPIO
The GPIO-based bitbanging I2C driver is required to make HDMI work on the Apalis iMX6 module plugged into a Ixora carrier board featuring a DDC channel to read a screen's EDID being hooked up to regular GPIOs. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'Documentation/hwmon')