Source
1
1
// SPDX-License-Identifier: GPL-2.0+
2
2
/*
3
3
* driver/base/topology.c - Populate sysfs with cpu topology information
4
4
*
5
5
* Written by: Zhang Yanmin, Intel Corporation
6
6
*
7
7
* Copyright (C) 2006, Intel Corp.
8
8
*
9
9
* All rights reserved.
10
-
*
11
-
* This program is free software; you can redistribute it and/or modify
12
-
* it under the terms of the GNU General Public License as published by
13
-
* the Free Software Foundation; either version 2 of the License, or
14
-
* (at your option) any later version.
15
-
*
16
-
* This program is distributed in the hope that it will be useful, but
17
-
* WITHOUT ANY WARRANTY; without even the implied warranty of
18
-
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
19
-
* NON INFRINGEMENT. See the GNU General Public License for more
20
-
* details.
21
-
*
22
-
* You should have received a copy of the GNU General Public License
23
-
* along with this program; if not, write to the Free Software
24
-
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
-
*
26
10
*/
27
11
#include <linux/mm.h>
28
12
#include <linux/cpu.h>
29
13
#include <linux/module.h>
30
14
#include <linux/hardirq.h>
31
15
#include <linux/topology.h>
32
16
​
33
17
#define define_id_show_func(name) \
34
18
static ssize_t name##_show(struct device *dev, \
35
19
struct device_attribute *attr, char *buf) \