[BK PATCH] Representing System devices and CPUs

Patrick Mochel (mochel@osdl.org)
Wed, 18 Sep 2002 13:40:05 -0700 (PDT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--346834433-165056036-1032381605=:968
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hey there.

The changelogs are below, but this is the executive summary.

This beefs up the support for system devices. It introduces the following
structures:

struct sys_root {
u32 id;
struct device dev;
struct device sysdev;
};

struct sys_device {
char * name;
u32 id;
struct sys_root * root;
struct device dev;
};

The former is intended for multi-board systems (e.g. NUMA-like) so they
can accurately represent their topology. The latter is for basic
description of system-level devices, like CPUs, PICs, etc.

The idea is that the enumerators for multi-board systems will register
each board (aka 'node') on boot. They should also know what board each
system device is on, and set that in the sys_device structure.

Without ->root set, system devices will be added as a child of a pseudo
bus: 'sys'. They appear in driverfs in the root/sys/ directory. Each
alternative root gets a directory under root/, and each gets a 'sys'
subdirectory. System devices appear as children of the root's 'sysdev'.
struct sys_root::dev can be used to parent other devices and buses
discovered on that board; e.g. PCI buses on that board.

I've taken the liberty to also implement a CPU device class, and a generic
cpu structure. The device class is registered on boot, which exports all
CPUs in a common place in driverfs in class/cpu/.

For ia32, I've created a simple CPU device driver and a static array of
cpu devices of size NR_CPUS, which are manually registered on boot. The
cpus get directories under root/sys/ in driverfs, like this:

`-- root
`-- sys
|-- cpu0
|-- cpu1
...

And get symlinks in the class directory like this:

|-- class
| |-- cpu
| | |-- devices
| | | |-- 0 -> ../../../root/sys/cpu0
| | | |-- 1 -> ../../../root/sys/cpu1
...

When the CPUs are registered, driverfs files may now be created for them.
I recommend creating device interfaces for various CPU features and
registering them with the device class. When the device is registered with
the class, it will also be registered with all of the interfaces of the
class. More documentation about this is available in the
Documentation/driver-model/ directory (which is now updated!)

Pending approval/comments of the CPU device code, I will be working on
converting some of the interfaces over to use it.

Please apply,

-pat

p.s. the patch is attached for non-BK users.

Please pull from

bk://ldm.bkbits.net/linux-2.5

This will update the following files:

arch/i386/kernel/cpu/common.c | 34 +++++++++
arch/i386/kernel/i8259.c | 16 ++--
arch/i386/kernel/time.c | 15 ++--
drivers/acpi/bus.c | 120 -----------------------------------
drivers/base/Makefile | 5 -
drivers/base/core.c | 36 ++++++++--
drivers/base/cpu.c | 28 ++++++++
drivers/base/driver.c | 11 +++
drivers/base/sys.c | 144 +++++++++++++++++++++++++++++++++++++-----
include/linux/cpu.h | 28 ++++++++
include/linux/device.h | 31 ++++++---
11 files changed, 303 insertions(+), 165 deletions(-)

through these ChangeSets:

<mochel@osdl.org> (02/09/18 1.553)
driver model: add CPU device support

Declare a CPU device class, which gives CPUs a directory in driverfs under class/cpu/.

Define a generic 'struct cpu' for basic defintion of CPU devices. Declare a static array
of size NR_CPUS for ia32 and manually register each one on boot.

Declare an archtecture specific (ia32 only for now) cpu device driver for handling generic
device operations.

<mochel@osdl.org> (02/09/18 1.551)
driver model: strengthen system device support.

Introduce struct sys_root (to describe alternative system roots in multi-
board (NUMA-like) systems; and struct sys_device to better describe system
level devices.

Implement registration functions for alternative system roots (for multi-
board systems; e.g. NUMA-like systems)

Beef-up system device registration functions so it registers the device in
the root it belongs to and so it sets the bus type. It also sets the device's
bus_id based on the fields in struct sys_device.

Add a system_bus_type, so we have place to group the devices and drivers..

<mochel@osdl.org> (02/09/18 1.550)
driver model: Handle devices that have ->driver set on registration.

If a device is registered, and its driver is set, we call found_match() immediately
(and don't walk through the list of drivers of the bus).

We also handle the case where the driver hasn't been registered yet, so if we a NULL
driver from get_driver() in device_attach(), we assume the driver is awaiting a
driver_register().

<mochel@osdl.org> (02/09/18 1.549)
ACPI: get rid of the silly acpi_bus_driver, since it didn't do anything,
and won't ever do anything.

--346834433-165056036-1032381605=:968
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="system-device-sep18.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0209181340050.968@cherise.pdx.osdl.net>
Content-Description:
Content-Disposition: attach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QorZXh0ZXJuIHN0cnVj
dCBidXNfdHlwZSBzeXN0ZW1fYnVzX3R5cGU7DQogDQogLyogZHJpdmVycy9i
YXNlL3BsYXRmb3JtLmMgKi8NCiBleHRlcm4gc3RydWN0IGJ1c190eXBlIHBs
YXRmb3JtX2J1czsNCg==
--346834433-165056036-1032381605=:968--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/