* [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST
@ 2015-10-14 21:13 Luis de Bethencourt
2015-10-14 22:25 ` Randy Dunlap
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Luis de Bethencourt @ 2015-10-14 21:13 UTC (permalink / raw)
To: linux-kernel; +Cc: JBottomley, linux-scsi, Luis de Bethencourt
These drivers only have runtime but no build time dependencies, so they can
be built for testing purposes if the Kconfig COMPILE_TEST option is enabled.
This is useful to have more build coverage and make sure that drivers are
not affected by changes that could cause build regressions.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
---
drivers/scsi/Kconfig | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index d2f480b..0d8ee16 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -416,7 +416,7 @@ config SCSI_ACARD
config SCSI_AHA152X
tristate "Adaptec AHA152X/2825 support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE_TEST) && SCSI
select SCSI_SPI_ATTRS
select CHECK_SIGNATURE
---help---
@@ -509,7 +509,7 @@ config SCSI_ADVANSYS
config SCSI_IN2000
tristate "Always IN2000 SCSI support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE_TEST) && SCSI
help
This is support for an ISA bus SCSI host adapter. You'll find more
information in <file:Documentation/scsi/in2000.txt>. If it doesn't work
@@ -657,7 +657,7 @@ config SCSI_DMX3191D
config SCSI_DTC3280
tristate "DTC3180/3280 SCSI support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE_TEST) && SCSI
select SCSI_SPI_ATTRS
select CHECK_SIGNATURE
help
@@ -776,7 +776,7 @@ config SCSI_ISCI
config SCSI_GENERIC_NCR5380
tristate "Generic NCR5380/53c400 SCSI PIO support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE_TEST) && SCSI
select SCSI_SPI_ATTRS
---help---
This is a driver for the old NCR 53c80 series of SCSI controllers
@@ -796,7 +796,7 @@ config SCSI_GENERIC_NCR5380
config SCSI_GENERIC_NCR5380_MMIO
tristate "Generic NCR5380/53c400 SCSI MMIO support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE_TEST) && SCSI
select SCSI_SPI_ATTRS
---help---
This is a driver for the old NCR 53c80 series of SCSI controllers
@@ -970,7 +970,7 @@ config SCSI_IZIP_SLOW_CTR
config SCSI_NCR53C406A
tristate "NCR53c406a SCSI support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE_TEST) && SCSI
help
This is support for the NCR53c406a SCSI host adapter. For user
configurable parameters, check out <file:drivers/scsi/NCR53c406a.c>
@@ -1238,7 +1238,7 @@ config SCSI_NCR53C8XX_NO_DISCONNECT
config SCSI_PAS16
tristate "PAS16 SCSI support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE) && SCSI
select SCSI_SPI_ATTRS
---help---
This is support for a SCSI host adapter. It is explained in section
@@ -1252,7 +1252,7 @@ config SCSI_PAS16
config SCSI_QLOGIC_FAS
tristate "Qlogic FAS SCSI support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE_TEST) && SCSI
---help---
This is a driver for the ISA, VLB, and PCMCIA versions of the Qlogic
FastSCSI! cards as well as any other card based on the FASXX chip
@@ -1321,7 +1321,7 @@ config SCSI_SIM710
config SCSI_SYM53C416
tristate "Symbios 53c416 SCSI support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE_TEST) && SCSI
---help---
This is support for the sym53c416 SCSI host adapter, the SCSI
adapter that comes with some HP scanners. This driver requires that
@@ -1372,7 +1372,7 @@ config SCSI_AM53C974
config SCSI_T128
tristate "Trantor T128/T128F/T228 SCSI support"
- depends on ISA && SCSI
+ depends on (ISA || COMPILE_TEST) && SCSI
select SCSI_SPI_ATTRS
select CHECK_SIGNATURE
---help---
--
2.5.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST
2015-10-14 21:13 [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST Luis de Bethencourt
@ 2015-10-14 22:25 ` Randy Dunlap
2015-10-14 22:42 ` James Bottomley
2015-10-15 1:11 ` kbuild test robot
2 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2015-10-14 22:25 UTC (permalink / raw)
To: Luis de Bethencourt, linux-kernel; +Cc: JBottomley, linux-scsi
On 10/14/15 14:13, Luis de Bethencourt wrote:
> These drivers only have runtime but no build time dependencies, so they can
> be built for testing purposes if the Kconfig COMPILE_TEST option is enabled.
>
> This is useful to have more build coverage and make sure that drivers are
> not affected by changes that could cause build regressions.
>
> Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
> ---
> drivers/scsi/Kconfig | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
> index d2f480b..0d8ee16 100644
> --- a/drivers/scsi/Kconfig
> +++ b/drivers/scsi/Kconfig
> @@ -1238,7 +1238,7 @@ config SCSI_NCR53C8XX_NO_DISCONNECT
>
> config SCSI_PAS16
> tristate "PAS16 SCSI support"
> - depends on ISA && SCSI
> + depends on (ISA || COMPILE) && SCSI
COMPILE_TEST
> select SCSI_SPI_ATTRS
> ---help---
> This is support for a SCSI host adapter. It is explained in section
--
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST
2015-10-14 21:13 [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST Luis de Bethencourt
2015-10-14 22:25 ` Randy Dunlap
@ 2015-10-14 22:42 ` James Bottomley
2015-10-14 23:30 ` Luis de Bethencourt
2015-10-15 1:11 ` kbuild test robot
2 siblings, 1 reply; 7+ messages in thread
From: James Bottomley @ 2015-10-14 22:42 UTC (permalink / raw)
To: Luis de Bethencourt; +Cc: linux-kernel, linux-scsi
On Wed, 2015-10-14 at 22:13 +0100, Luis de Bethencourt wrote:
> These drivers only have runtime but no build time dependencies, so they can
> be built for testing purposes if the Kconfig COMPILE_TEST option is enabled.
>
> This is useful to have more build coverage and make sure that drivers are
> not affected by changes that could cause build regressions.
I don't think I understand the purpose. If the object is to build a
load of old ISA drivers, why not just turn on CONFIG_ISA in the test
build? That's how I build test SCSI on my systems.
James
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST
2015-10-14 22:42 ` James Bottomley
@ 2015-10-14 23:30 ` Luis de Bethencourt
2015-10-14 23:39 ` James Bottomley
0 siblings, 1 reply; 7+ messages in thread
From: Luis de Bethencourt @ 2015-10-14 23:30 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-kernel, linux-scsi
On 14/10/15 23:42, James Bottomley wrote:
> On Wed, 2015-10-14 at 22:13 +0100, Luis de Bethencourt wrote:
>> These drivers only have runtime but no build time dependencies, so they can
>> be built for testing purposes if the Kconfig COMPILE_TEST option is enabled.
>>
>> This is useful to have more build coverage and make sure that drivers are
>> not affected by changes that could cause build regressions.
>
> I don't think I understand the purpose. If the object is to build a
> load of old ISA drivers, why not just turn on CONFIG_ISA in the test
> build? That's how I build test SCSI on my systems.
>
> James
>
>
Hi James,
The idea is that the more drivers are built with make allyesconfig, the better.
I added COMPILE_TEST to all the drivers that can be built without having ISA,
since they depend on runtime and not in build time. I understand your point,
which raises the question of why isn't CONFIG_ISA set to Y in make allyesconfig.
Would this be possible?
Thanks for the review,
Luis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST
2015-10-14 23:30 ` Luis de Bethencourt
@ 2015-10-14 23:39 ` James Bottomley
2015-10-16 13:08 ` Luis de Bethencourt
0 siblings, 1 reply; 7+ messages in thread
From: James Bottomley @ 2015-10-14 23:39 UTC (permalink / raw)
To: Luis de Bethencourt; +Cc: linux-kernel, linux-scsi
On Thu, 2015-10-15 at 00:30 +0100, Luis de Bethencourt wrote:
> On 14/10/15 23:42, James Bottomley wrote:
> > On Wed, 2015-10-14 at 22:13 +0100, Luis de Bethencourt wrote:
> >> These drivers only have runtime but no build time dependencies, so they can
> >> be built for testing purposes if the Kconfig COMPILE_TEST option is enabled.
> >>
> >> This is useful to have more build coverage and make sure that drivers are
> >> not affected by changes that could cause build regressions.
> >
> > I don't think I understand the purpose. If the object is to build a
> > load of old ISA drivers, why not just turn on CONFIG_ISA in the test
> > build? That's how I build test SCSI on my systems.
> >
> > James
> >
> >
>
> Hi James,
>
> The idea is that the more drivers are built with make allyesconfig, the better.
>
> I added COMPILE_TEST to all the drivers that can be built without having ISA,
> since they depend on runtime and not in build time. I understand your point,
> which raises the question of why isn't CONFIG_ISA set to Y in make allyesconfig.
>
> Would this be possible?
It happens today, but it depends on architecture. An allyesconfig on
ia32 should have it set and possibly a few others. There's no reason an
x86-64 couldn't have it set, it's just that x86-64 was the architecture
break where ISA was discontinued, so there's no real point building that
configuration.
James
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST
2015-10-14 21:13 [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST Luis de Bethencourt
2015-10-14 22:25 ` Randy Dunlap
2015-10-14 22:42 ` James Bottomley
@ 2015-10-15 1:11 ` kbuild test robot
2 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2015-10-15 1:11 UTC (permalink / raw)
To: Luis de Bethencourt
Cc: kbuild-all, linux-kernel, JBottomley, linux-scsi,
Luis de Bethencourt
Hi Luis,
[auto build test WARNING on scsi/for-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
url: https://github.com/0day-ci/linux/commits/Luis-de-Bethencourt/scsi-kconfig-When-possible-compile-drivers-with-COMPILE_TEST/20151015-051558
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/NCR5380.c:1751:9: sparse: context imbalance in 'NCR5380_transfer_dma' - unexpected unlock
vim +/NCR5380_transfer_dma +1751 drivers/scsi/NCR5380.c
^1da177e Linus Torvalds 2005-04-16 1735 NCR5380_setup(instance);
^1da177e Linus Torvalds 2005-04-16 1736
^1da177e Linus Torvalds 2005-04-16 1737 if ((tmp = (NCR5380_read(STATUS_REG) & PHASE_MASK)) != p) {
^1da177e Linus Torvalds 2005-04-16 1738 *phase = tmp;
^1da177e Linus Torvalds 2005-04-16 1739 return -1;
^1da177e Linus Torvalds 2005-04-16 1740 }
^1da177e Linus Torvalds 2005-04-16 1741 #if defined(REAL_DMA) || defined(REAL_DMA_POLL)
^1da177e Linus Torvalds 2005-04-16 1742 #ifdef READ_OVERRUNS
^1da177e Linus Torvalds 2005-04-16 1743 if (p & SR_IO) {
^1da177e Linus Torvalds 2005-04-16 1744 c -= 2;
^1da177e Linus Torvalds 2005-04-16 1745 }
^1da177e Linus Torvalds 2005-04-16 1746 #endif
52a6a1cb Finn Thain 2014-03-18 1747 dprintk(NDEBUG_DMA, "scsi%d : initializing DMA channel %d for %s, %d bytes %s %0x\n", instance->host_no, instance->dma_channel, (p & SR_IO) ? "reading" : "writing", c, (p & SR_IO) ? "to" : "from", (unsigned) d);
^1da177e Linus Torvalds 2005-04-16 1748 hostdata->dma_len = (p & SR_IO) ? NCR5380_dma_read_setup(instance, d, c) : NCR5380_dma_write_setup(instance, d, c);
^1da177e Linus Torvalds 2005-04-16 1749 #endif
^1da177e Linus Torvalds 2005-04-16 1750
^1da177e Linus Torvalds 2005-04-16 @1751 NCR5380_write(TARGET_COMMAND_REG, PHASE_SR_TO_TCR(p));
^1da177e Linus Torvalds 2005-04-16 1752
^1da177e Linus Torvalds 2005-04-16 1753 #ifdef REAL_DMA
^1da177e Linus Torvalds 2005-04-16 1754 NCR5380_write(MODE_REG, MR_BASE | MR_DMA_MODE | MR_ENABLE_EOP_INTR | MR_MONITOR_BSY);
^1da177e Linus Torvalds 2005-04-16 1755 #elif defined(REAL_DMA_POLL)
^1da177e Linus Torvalds 2005-04-16 1756 NCR5380_write(MODE_REG, MR_BASE | MR_DMA_MODE);
^1da177e Linus Torvalds 2005-04-16 1757 #else
^1da177e Linus Torvalds 2005-04-16 1758 /*
^1da177e Linus Torvalds 2005-04-16 1759 * Note : on my sample board, watch-dog timeouts occurred when interrupts
:::::: The code at line 1751 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST
2015-10-14 23:39 ` James Bottomley
@ 2015-10-16 13:08 ` Luis de Bethencourt
0 siblings, 0 replies; 7+ messages in thread
From: Luis de Bethencourt @ 2015-10-16 13:08 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-kernel, linux-scsi
On 15/10/15 00:39, James Bottomley wrote:
> On Thu, 2015-10-15 at 00:30 +0100, Luis de Bethencourt wrote:
>> On 14/10/15 23:42, James Bottomley wrote:
>>> On Wed, 2015-10-14 at 22:13 +0100, Luis de Bethencourt wrote:
>>>> These drivers only have runtime but no build time dependencies, so they can
>>>> be built for testing purposes if the Kconfig COMPILE_TEST option is enabled.
>>>>
>>>> This is useful to have more build coverage and make sure that drivers are
>>>> not affected by changes that could cause build regressions.
>>>
>>> I don't think I understand the purpose. If the object is to build a
>>> load of old ISA drivers, why not just turn on CONFIG_ISA in the test
>>> build? That's how I build test SCSI on my systems.
>>>
>>> James
>>>
>>>
>>
>> Hi James,
>>
>> The idea is that the more drivers are built with make allyesconfig, the better.
>>
>> I added COMPILE_TEST to all the drivers that can be built without having ISA,
>> since they depend on runtime and not in build time. I understand your point,
>> which raises the question of why isn't CONFIG_ISA set to Y in make allyesconfig.
>>
>> Would this be possible?
>
> It happens today, but it depends on architecture. An allyesconfig on
> ia32 should have it set and possibly a few others. There's no reason an
> x86-64 couldn't have it set, it's just that x86-64 was the architecture
> break where ISA was discontinued, so there's no real point building that
> configuration.
>
> James
>
>
Hi James,
That makes sense.
Thanks for the information, I understand this a lot better now.
Luis
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-16 13:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 21:13 [PATCH] scsi: kconfig: When possible, compile drivers with COMPILE_TEST Luis de Bethencourt
2015-10-14 22:25 ` Randy Dunlap
2015-10-14 22:42 ` James Bottomley
2015-10-14 23:30 ` Luis de Bethencourt
2015-10-14 23:39 ` James Bottomley
2015-10-16 13:08 ` Luis de Bethencourt
2015-10-15 1:11 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox