Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111012373
D47185.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47185.diff
View Options
diff --git a/sys/x86/x86/legacy.c b/sys/x86/x86/legacy.c
--- a/sys/x86/x86/legacy.c
+++ b/sys/x86/x86/legacy.c
@@ -267,6 +267,8 @@
* cpufreq(4) hang off this.
*/
static void cpu_identify(driver_t *driver, device_t parent);
+static device_probe_t cpu_probe;
+static device_attach_t cpu_attach;
static int cpu_read_ivar(device_t dev, device_t child, int index,
uintptr_t *result);
static device_t cpu_add_child(device_t bus, u_int order, const char *name,
@@ -281,8 +283,8 @@
static device_method_t cpu_methods[] = {
/* Device interface */
DEVMETHOD(device_identify, cpu_identify),
- DEVMETHOD(device_probe, bus_generic_probe),
- DEVMETHOD(device_attach, bus_generic_attach),
+ DEVMETHOD(device_probe, cpu_probe),
+ DEVMETHOD(device_attach, cpu_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
@@ -330,6 +332,21 @@
}
}
+static int
+cpu_probe(device_t dev)
+{
+ device_set_desc(dev, "legacy CPU");
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+cpu_attach(device_t dev)
+{
+ bus_generic_probe(dev);
+ bus_generic_attach(dev);
+ return (0);
+}
+
static device_t
cpu_add_child(device_t bus, u_int order, const char *name, int unit)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 27, 5:04 AM (19 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16862843
Default Alt Text
D47185.diff (1 KB)
Attached To
Mode
D47185: legacy cpu: Add proper device_probe and device_attach routines
Attached
Detach File
Event Timeline
Log In to Comment