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 */
'/>
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2016-11-30 11:47:44 +0100
committerMark Brown <broonie@kernel.org>2016-11-30 16:22:46 +0000
commit73482910587444c5600c9d6851ec056fc2ad38c0 (patch)
tree5679b784a8d0c8dd87cb091ffbedf9b4d8e97192 /Documentation/i2c
parent1001354ca34179f3db924eb66672442a173147dc (diff)
spi: orion: fix comment to mention MVEBU
MVEBU chips (Armada XP, Armada 370 and others) are supported by this driver. Mention this in the help text to make more obvious what is already specified in the dependencies of this symbol. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/i2c')