2009-01-04 09:04:22

by Milton Miller

[permalink] [raw]
Subject: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

In-Reply-To: <[email protected]>

Kamalesh Babulal wrote:
> config SCSI_IBMVSCSI
> tristate "IBM Virtual SCSI support"
> - depends on PPC_PSERIES || PPC_ISERIES
> + depends on (PPC_PSERIES || PPC_ISERIES) && VIOPATH
> select SCSI_SRP_ATTRS
> help
> This is the IBM POWER Virtual SCSI Client

As VIOPATH is iSeries code and is only used by the iSeries code, the
requirment should be

depends on PPC_PSERIES || (PPC_ISERIES && VIOPATH)

except VIOPATH isn't selectable:

arch/powerpc/platforms/iseries/Kconfig:

config VIOPATH
bool
depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
default y

so instead we should be adding

select VIOPATH if PPC_ISERIES

to SCSI_IBMVSCSI and just

select VIOPATH

to HVC_ISERIES as it depends on PPC_ISERIES

otherwise you have to enable one driver to get these other drivers.

milton


2009-01-04 12:12:20

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

Hi Milton,

On Sun, 4 Jan 2009 02:54:15 -0600 Milton Miller <[email protected]> wrote:
>
> As VIOPATH is iSeries code and is only used by the iSeries code, the
> requirment should be
>
> depends on PPC_PSERIES || (PPC_ISERIES && VIOPATH)
>
> except VIOPATH isn't selectable:
>
> arch/powerpc/platforms/iseries/Kconfig:
>
> config VIOPATH
> bool
> depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
> default y
>
> so instead we should be adding
>
> select VIOPATH if PPC_ISERIES
>
> to SCSI_IBMVSCSI and just
>
> select VIOPATH
>
> to HVC_ISERIES as it depends on PPC_ISERIES
>
> otherwise you have to enable one driver to get these other drivers.

You are completely correct. We didn't have "select" when those drivers
were added (at least I was not aware of it) so they should all be changed
to select VIOPATH and the dependency in VIOPATH should be dropped. This sort of thing is exactly what select is for.
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (1.03 kB)
(No filename) (197.00 B)
Download all attachments

2009-01-04 18:31:21

by Kamalesh Babulal

[permalink] [raw]
Subject: Re: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

* Milton Miller <[email protected]> [2009-01-04 02:54:15]:

> In-Reply-To: <[email protected]>
>
> Kamalesh Babulal wrote:
>> config SCSI_IBMVSCSI
>> tristate "IBM Virtual SCSI support"
>> - depends on PPC_PSERIES || PPC_ISERIES
>> + depends on (PPC_PSERIES || PPC_ISERIES) && VIOPATH
>> select SCSI_SRP_ATTRS
>> help
>> This is the IBM POWER Virtual SCSI Client
>
> As VIOPATH is iSeries code and is only used by the iSeries code, the
> requirment should be
>
> depends on PPC_PSERIES || (PPC_ISERIES && VIOPATH)
>
> except VIOPATH isn't selectable:
>
> arch/powerpc/platforms/iseries/Kconfig:
>
> config VIOPATH
> bool
> depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
> default y
>
> so instead we should be adding
>
> select VIOPATH if PPC_ISERIES
>
> to SCSI_IBMVSCSI and just
>
> select VIOPATH
>
> to HVC_ISERIES as it depends on PPC_ISERIES
>
> otherwise you have to enable one driver to get these other drivers.
>
> milton
>

Hi Milton,

Thanks for the review comments, I am resending the patch with the
changes you have recommended.

Signed-off-by: Kamalesh Babulal <[email protected]>
--
drivers/char/Kconfig | 1 +
drivers/scsi/Kconfig | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 1697043..b8da09a 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -616,6 +616,7 @@ config HVC_ISERIES
default y
select HVC_DRIVER
select HVC_IRQ
+ select VIOPATH
help
iSeries machines support a hypervisor virtual console.

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index b732297..256c7be 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -884,6 +884,7 @@ config SCSI_IBMVSCSI
tristate "IBM Virtual SCSI support"
depends on PPC_PSERIES || PPC_ISERIES
select SCSI_SRP_ATTRS
+ select VIOPATH if PPC_ISERIES
help
This is the IBM POWER Virtual SCSI Client

--
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

2009-01-05 13:26:51

by Milton Miller

[permalink] [raw]
Subject: Re: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

On Jan 4, 2009, at 12:24 PM, Kamalesh Babulal wrote:

> Hi Milton,
>
> Thanks for the review comments, I am resending the patch with the
> changes you have recommended.
>
> Signed-off-by: Kamalesh Babulal <[email protected]>

Better, but you didn't include the change log, nor did you respond to
Stephen's reply suggesting that all users be converted to select
viopath (versus the proposed 2 select and 5 get it via depends and
default y).

milton

2009-01-06 07:26:15

by Kamalesh Babulal

[permalink] [raw]
Subject: Re: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

* Milton Miller <[email protected]> [2009-01-05 07:33:32]:

> On Jan 4, 2009, at 12:24 PM, Kamalesh Babulal wrote:
>
>> Hi Milton,
>>
>> Thanks for the review comments, I am resending the patch with the
>> changes you have recommended.
>>
>> Signed-off-by: Kamalesh Babulal <[email protected]>
>
> Better, but you didn't include the change log, nor did you respond to
> Stephen's reply suggesting that all users be converted to select viopath
> (versus the proposed 2 select and 5 get it via depends and default y).
>
> milton
>

Hi Milton/Stephen,

Sorry for resending the patch before taking care of the response. Resending
the patch with changes made to other three drivers also.

Impact: Fix the VIOPATH dependency in the iSeries dependent drivers.

iSeries depend drivers build fails, when CONFIG_VIOPATH is disabled.
Removing the dependency of VIOPATH by selecting it, when the drivers
dependent on iSeries code.


Signed-off-by: Kamalesh Babulal <[email protected]>
---
arch/powerpc/platforms/iseries/Kconfig | 5 ++++-
drivers/char/Kconfig | 1 +
drivers/scsi/Kconfig | 1 +
3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
index ed3753d..5cb2320 100644
--- a/arch/powerpc/platforms/iseries/Kconfig
+++ b/arch/powerpc/platforms/iseries/Kconfig
@@ -10,18 +10,21 @@ menu "iSeries device drivers"
config VIODASD
tristate "iSeries Virtual I/O disk support"
depends on BLOCK
+ select VIOPATH
help
If you are running on an iSeries system and you want to use
virtual disks created and managed by OS/400, say Y.

config VIOCD
tristate "iSeries Virtual I/O CD support"
+ select VIOPATH
help
If you are running Linux on an IBM iSeries system and you want to
read a CD drive owned by OS/400, say Y here.

config VIOTAPE
tristate "iSeries Virtual Tape Support"
+ select VIOPATH
help
If you are running Linux on an iSeries system and you want Linux
to read and/or write a tape drive owned by OS/400, say Y here.
@@ -30,5 +33,5 @@ endmenu

config VIOPATH
bool
- depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
+ depends on PPC_ISERIES
default y
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 1697043..b8da09a 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -616,6 +616,7 @@ config HVC_ISERIES
default y
select HVC_DRIVER
select HVC_IRQ
+ select VIOPATH
help
iSeries machines support a hypervisor virtual console.

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index b732297..256c7be 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -884,6 +884,7 @@ config SCSI_IBMVSCSI
tristate "IBM Virtual SCSI support"
depends on PPC_PSERIES || PPC_ISERIES
select SCSI_SRP_ATTRS
+ select VIOPATH if PPC_ISERIES
help
This is the IBM POWER Virtual SCSI Client

--
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

2009-01-06 07:30:26

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

>
> Sorry for resending the patch before taking care of the response. Resending
> the patch with changes made to other three drivers also.
>
> Impact: Fix the VIOPATH dependency in the iSeries dependent drivers.
>
> iSeries depend drivers build fails, when CONFIG_VIOPATH is disabled.
> Removing the dependency of VIOPATH by selecting it, when the drivers
> dependent on iSeries code.
>
>
> Signed-off-by: Kamalesh Babulal <[email protected]>
> ---
> arch/powerpc/platforms/iseries/Kconfig | 5 ++++-
> drivers/char/Kconfig | 1 +
> drivers/scsi/Kconfig | 1 +
> 3 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
> index ed3753d..5cb2320 100644
> --- a/arch/powerpc/platforms/iseries/Kconfig
> +++ b/arch/powerpc/platforms/iseries/Kconfig
> @@ -10,18 +10,21 @@ menu "iSeries device drivers"
> config VIODASD
> tristate "iSeries Virtual I/O disk support"
> depends on BLOCK
> + select VIOPATH
> help
> If you are running on an iSeries system and you want to use
> virtual disks created and managed by OS/400, say Y.
>
> config VIOCD
> tristate "iSeries Virtual I/O CD support"
> + select VIOPATH
> help
> If you are running Linux on an IBM iSeries system and you want to
> read a CD drive owned by OS/400, say Y here.
>
> config VIOTAPE
> tristate "iSeries Virtual Tape Support"
> + select VIOPATH
> help
> If you are running Linux on an iSeries system and you want Linux
> to read and/or write a tape drive owned by OS/400, say Y here.
> @@ -30,5 +33,5 @@ endmenu
>
> config VIOPATH
> bool
> - depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
> + depends on PPC_ISERIES
> default y

VIOPATH is set using select so the "depends on" is effectively ignored.
If you think you need the "depends on" then you need to revisit the
symbol that will select VIOPATH and make sure _they_ have this dependency.

Sam

2009-01-06 09:39:09

by Kamalesh Babulal

[permalink] [raw]
Subject: Re: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

* Sam Ravnborg <[email protected]> [2009-01-06 08:31:49]:

> >
> > Sorry for resending the patch before taking care of the response. Resending
> > the patch with changes made to other three drivers also.
> >
> > Impact: Fix the VIOPATH dependency in the iSeries dependent drivers.
> >
> > iSeries depend drivers build fails, when CONFIG_VIOPATH is disabled.
> > Removing the dependency of VIOPATH by selecting it, when the drivers
> > dependent on iSeries code.
> >
> >
> > Signed-off-by: Kamalesh Babulal <[email protected]>
> > ---
> > arch/powerpc/platforms/iseries/Kconfig | 5 ++++-
> > drivers/char/Kconfig | 1 +
> > drivers/scsi/Kconfig | 1 +
> > 3 files changed, 6 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
> > index ed3753d..5cb2320 100644
> > --- a/arch/powerpc/platforms/iseries/Kconfig
> > +++ b/arch/powerpc/platforms/iseries/Kconfig
> > @@ -10,18 +10,21 @@ menu "iSeries device drivers"
> > config VIODASD


<snip>

>
> VIOPATH is set using select so the "depends on" is effectively ignored.
> If you think you need the "depends on" then you need to revisit the
> symbol that will select VIOPATH and make sure _they_ have this dependency.
>
> Sam

Hi Sam,

VIOPATH is used only by the PPC_ISERIES code. The symbols selecting
the VIOPATH are also dependent on the PPC_ISERIES. Should we make the
config VIOPATH as default n, because it being selected the dependent
drivers.

Impact: Fix the VIOPATH dependency in the iSeries dependent drivers.

iSeries depend drivers build fails, when CONFIG_VIOPATH is disabled.
Removing the dependency of VIOPATH by selecting it, when the drivers
dependent on iSeries code.

Signed-off-by: Kamalesh Babulal <[email protected]>
---
arch/powerpc/platforms/iseries/Kconfig | 6 ++++--
drivers/char/Kconfig | 1 +
drivers/scsi/Kconfig | 1 +
3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
index ed3753d..fd524cd 100644
--- a/arch/powerpc/platforms/iseries/Kconfig
+++ b/arch/powerpc/platforms/iseries/Kconfig
@@ -10,18 +10,21 @@ menu "iSeries device drivers"
config VIODASD
tristate "iSeries Virtual I/O disk support"
depends on BLOCK
+ select VIOPATH
help
If you are running on an iSeries system and you want to use
virtual disks created and managed by OS/400, say Y.

config VIOCD
tristate "iSeries Virtual I/O CD support"
+ select VIOPATH
help
If you are running Linux on an IBM iSeries system and you want to
read a CD drive owned by OS/400, say Y here.

config VIOTAPE
tristate "iSeries Virtual Tape Support"
+ select VIOPATH
help
If you are running Linux on an iSeries system and you want Linux
to read and/or write a tape drive owned by OS/400, say Y here.
@@ -30,5 +33,4 @@ endmenu

config VIOPATH
bool
- depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
- default y
+ default n
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 1697043..b8da09a 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -616,6 +616,7 @@ config HVC_ISERIES
default y
select HVC_DRIVER
select HVC_IRQ
+ select VIOPATH
help
iSeries machines support a hypervisor virtual console.

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index b732297..256c7be 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -884,6 +884,7 @@ config SCSI_IBMVSCSI
tristate "IBM Virtual SCSI support"
depends on PPC_PSERIES || PPC_ISERIES
select SCSI_SRP_ATTRS
+ select VIOPATH if PPC_ISERIES
help
This is the IBM POWER Virtual SCSI Client

--
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

2009-01-06 10:44:51

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

Hi Kamalesh

Looks good, small nit below.

> config VIOPATH
> bool
> - depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
> - default y
> + default n

As 'n' is default anyway this line is not needed and I suggest you
spin a final version of the patch with this removed.

Sam

2009-01-06 15:57:46

by Kamalesh Babulal

[permalink] [raw]
Subject: Re: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

* Sam Ravnborg <[email protected]> [2009-01-06 11:46:19]:

> Hi Kamalesh
>
> Looks good, small nit below.
>
> > config VIOPATH
> > bool
> > - depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
> > - default y
> > + default n
>
> As 'n' is default anyway this line is not needed and I suggest you
> spin a final version of the patch with this removed.
>
> Sam

Hi Sam,

Thanks for the review comments. I am resending the patch with the changes
you have recommended.

Impact: Fix the VIOPATH dependency in the iSeries dependent drivers.

iSeries depend drivers build fails, when CONFIG_VIOPATH is disabled.
Removing the dependency of VIOPATH by selecting it, when the drivers
dependent on iSeries code.

Signed-off-by: Kamalesh Babulal <[email protected]>
---
arch/powerpc/platforms/iseries/Kconfig | 5 +++--
drivers/char/Kconfig | 1 +
drivers/scsi/Kconfig | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
index ed3753d..7ddd0a2 100644
--- a/arch/powerpc/platforms/iseries/Kconfig
+++ b/arch/powerpc/platforms/iseries/Kconfig
@@ -10,18 +10,21 @@ menu "iSeries device drivers"
config VIODASD
tristate "iSeries Virtual I/O disk support"
depends on BLOCK
+ select VIOPATH
help
If you are running on an iSeries system and you want to use
virtual disks created and managed by OS/400, say Y.

config VIOCD
tristate "iSeries Virtual I/O CD support"
+ select VIOPATH
help
If you are running Linux on an IBM iSeries system and you want to
read a CD drive owned by OS/400, say Y here.

config VIOTAPE
tristate "iSeries Virtual Tape Support"
+ select VIOPATH
help
If you are running Linux on an iSeries system and you want Linux
to read and/or write a tape drive owned by OS/400, say Y here.
@@ -30,5 +33,3 @@ endmenu

config VIOPATH
bool
- depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
- default y
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 1697043..b8da09a 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -616,6 +616,7 @@ config HVC_ISERIES
default y
select HVC_DRIVER
select HVC_IRQ
+ select VIOPATH
help
iSeries machines support a hypervisor virtual console.

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index b732297..256c7be 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -884,6 +884,7 @@ config SCSI_IBMVSCSI
tristate "IBM Virtual SCSI support"
depends on PPC_PSERIES || PPC_ISERIES
select SCSI_SRP_ATTRS
+ select VIOPATH if PPC_ISERIES
help
This is the IBM POWER Virtual SCSI Client

--
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

2009-01-06 16:38:37

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH] 2.6.28-git4 - powerpc - drivers build fails with !CONFIG_VIOPATH

On Tue, Jan 06, 2009 at 09:27:24PM +0530, Kamalesh Babulal wrote:
> * Sam Ravnborg <[email protected]> [2009-01-06 11:46:19]:
>
> > Hi Kamalesh
> >
> > Looks good, small nit below.
> >
> > > config VIOPATH
> > > bool
> > > - depends on VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
> > > - default y
> > > + default n
> >
> > As 'n' is default anyway this line is not needed and I suggest you
> > spin a final version of the patch with this removed.
> >
> > Sam
>
> Hi Sam,
>
> Thanks for the review comments. I am resending the patch with the changes
> you have recommended.
>
> Impact: Fix the VIOPATH dependency in the iSeries dependent drivers.
>
> iSeries depend drivers build fails, when CONFIG_VIOPATH is disabled.
> Removing the dependency of VIOPATH by selecting it, when the drivers
> dependent on iSeries code.
>
> Signed-off-by: Kamalesh Babulal <[email protected]>
Reviewed-by: Sam Ravnborg <[email protected]>