Adapt to new attach world order

This commit is contained in:
martin 2014-07-04 08:33:08 +00:00
parent ae2c055efb
commit b99d8c4997

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.c,v 1.8 2014/03/31 11:25:49 martin Exp $ */
/* $NetBSD: cpu.c,v 1.9 2014/07/04 08:33:08 martin Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@ -26,24 +26,24 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.8 2014/03/31 11:25:49 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.9 2014/07/04 08:33:08 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <machine/autoconf.h>
static int cpumatch(struct device *, struct cfdata *, void *);
static void cpuattach(struct device *, struct device *, void *);
static int cpumatch(device_t, cfdata_t, void *);
static void cpuattach(device_t, device_t, void *);
CFATTACH_DECL(cpu, sizeof (struct device),
cpumatch, cpuattach, NULL, NULL);
CFATTACH_DECL_NEW(cpu, 0, cpumatch, cpuattach, NULL, NULL);
extern struct cfdriver cpu_cd;
static int __attached; /* PlayStation 2 has only one CPU */
static int
cpumatch(struct device *parent, struct cfdata *cf, void *aux)
cpumatch(device_t parent, cfdata_t cf, void *aux)
{
struct mainbus_attach_args *ma = aux;
@ -55,11 +55,11 @@ cpumatch(struct device *parent, struct cfdata *cf, void *aux)
}
static void
cpuattach(struct device *parent, struct device *dev, void *aux)
cpuattach(struct device *parent, struct device *self, void *aux)
{
printf(": ");
__attached = 1;
cpu_identify();
cpu_identify(self);
}