On Tue, 2006-04-25 at 21:59 +1000, Stephen Rothwell wrote: > As an added bonus, since every vio_dev now has a device_node > associated with it, hotplug now works. > > Signed-off-by: Stephen Rothwell > diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c > index 9ce2afc..af5609a 100644 > --- a/arch/powerpc/platforms/iseries/setup.c > +++ b/arch/powerpc/platforms/iseries/setup.c > @@ -54,6 +54,7 @@ #include > #include > #include > #include > +#include > #include > #include > > @@ -939,6 +940,7 @@ void dt_vdevices(struct iseries_flat_dt > dt_end_node(dt); > reg++; > > + vio_first_vlan_unit = reg; > vlan_map = HvLpConfig_getVirtualLanIndexMap(); > for (i = 0; i < HVMAXARCHITECTEDVIRTUALLANS; i++) { > unsigned char mac_addr[6]; > @@ -964,6 +966,7 @@ void dt_vdevices(struct iseries_flat_dt > } > reg += HVMAXARCHITECTEDVIRTUALLANS; > > + vio_first_viodasd_unit = reg; > for (i = 0; i < HVMAXARCHITECTEDVIRTUALDISKS; i++) { > snprintf(buf, 32, "viodasd@%08x", reg + i); > dt_start_node(dt, buf); > @@ -973,6 +976,7 @@ void dt_vdevices(struct iseries_flat_dt > dt_end_node(dt); > } > reg += HVMAXARCHITECTEDVIRTUALDISKS; > + vio_first_viocd_unit = reg; > for (i = 0; i < HVMAXARCHITECTEDVIRTUALCDROMS; i++) { > snprintf(buf, 32, "viocd@%08x", reg + i); > dt_start_node(dt, buf); > @@ -982,6 +986,7 @@ void dt_vdevices(struct iseries_flat_dt > dt_end_node(dt); > } > reg += HVMAXARCHITECTEDVIRTUALCDROMS; > + vio_first_viotape_unit = reg; > for (i = 0; i < HVMAXARCHITECTEDVIRTUALTAPES; i++) { > snprintf(buf, 32, "viotape@%08x", reg + i); > dt_start_node(dt, buf); > diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c > index 22045a2..5cd197b 100644 > --- a/arch/powerpc/platforms/iseries/vio.c > +++ b/arch/powerpc/platforms/iseries/vio.c > @@ -24,6 +24,15 @@ #include > > #include "iommu.h" > > +int vio_first_vlan_unit; > +EXPORT_SYMBOL(vio_first_vlan_unit); > +int vio_first_viodasd_unit; > +EXPORT_SYMBOL(vio_first_viodasd_unit); > +int vio_first_viocd_unit; > +EXPORT_SYMBOL(vio_first_viocd_unit); > +int vio_first_viotape_unit; > +EXPORT_SYMBOL(vio_first_viotape_unit); Why do we need these guys? If we have to have them then I'd rather they were in the device tree, rather than have the "bootloader" passing info to the kernel via globals. cheers -- Michael Ellerman IBM OzLabs wwweb: http://michael.ellerman.id.au phone: +61 2 6212 1183 (tie line 70 21183) We do not inherit the earth from our ancestors, we borrow it from our children. - S.M.A.R.T Person