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 */
td class='ctrl'>
authorDave Airlie <airlied@redhat.com>2017-01-26 06:44:03 +1000
committerDave Airlie <airlied@redhat.com>2017-01-26 06:44:03 +1000
commit54a07c7bb0da0343734c78212bbe9f3735394962 (patch)
tree714efff4608ddc0dda7dc85ca82ae98e2c58b52c /arch/sh/boards
parent932790109f62aa52bdb4bb62aa66653c0b51bc75 (diff)
Revert "drm/probe-helpers: Drop locking from poll_enable"
This reverts commit 3846fd9b86001bea171943cc3bb9222cb6da6b42. There were some precursor commits missing for this around connector locking, we should probably merge Lyude's nouveau avoid the problem patch.
Diffstat (limited to 'arch/sh/boards')