From: Michael Ellerman <michael@ellerman.id.au>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: ppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: [RFC 2/2] powerpc: use the device tree for the iSeries vio bus probe
Date: Tue, 25 Apr 2006 23:22:46 +1000 [thread overview]
Message-ID: <1145971366.11392.9.camel@localhost.localdomain> (raw)
In-Reply-To: <20060425215950.36c01f2b.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 2909 bytes --]
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 <sfr@canb.auug.org.au>
> 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 <asm/iseries/mf.h>
> #include <asm/iseries/it_exp_vpd_panel.h>
> #include <asm/iseries/hv_lp_event.h>
> #include <asm/iseries/lpar_map.h>
> +#include <asm/iseries/vio.h>
> #include <asm/udbg.h>
> #include <asm/irq.h>
>
> @@ -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 <asm/iseries/hv_call_xm.h>
>
> #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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
next prev parent reply other threads:[~2006-04-25 13:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 11:54 [RFC 1/2] powerpc: add all the iSeries virtual devices to the device tree Stephen Rothwell
2006-04-25 11:59 ` [RFC 2/2] powerpc: use the device tree for the iSeries vio bus probe Stephen Rothwell
2006-04-25 13:22 ` Michael Ellerman [this message]
2006-04-25 13:17 ` [RFC 1/2] powerpc: add all the iSeries virtual devices to the device tree Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1145971366.11392.9.camel@localhost.localdomain \
--to=michael@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox