LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [PATCH #upstream] libata: implement libata.force module parameter
       [not found] <47A3375F.80101@gmail.com>
@ 2008-02-01 17:28 ` Jeff Garzik
  2008-02-01 17:46   ` Bartlomiej Zolnierkiewicz
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jeff Garzik @ 2008-02-01 17:28 UTC (permalink / raw)
  To: Tejun Heo
  Cc: IDE/ATA development list, Mark Lord, Alan Cox, Sam Ravnborg,
	Andrew Morton, LKML

Tejun Heo wrote:
> This patch implements libata.force module parameter which can
> selectively override ATA port, link and device configurations
> including cable type, SATA PHY SPD limit, transfer mode and NCQ.
> 
> For example, you can say "use 1.5Gbps for all fan-out ports attached
> to the second port but allow 3.0Gbps for the PMP device itself, oh,
> the device attached to the third fan-out port chokes on NCQ and
> shouldn't go over UDMA4" by the following.
> 
>  libata.force=2:1.5g,2.15:3.0g,2.03:noncq,udma4
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> I guess it's about time we add something like this.  More than
> anything else this should help debugging and can serve as a last
> resort to work around problems.
> 
> Thanks.
> 
>  Documentation/kernel-parameters.txt |   35 +++
>  drivers/ata/libata-core.c           |  375 +++++++++++++++++++++++++++++++++++-
>  drivers/ata/libata-eh.c             |    8 
>  drivers/ata/libata.h                |    1 
>  4 files changed, 415 insertions(+), 4 deletions(-)

ACK, but it breaks the build due to section type conflicts:

drivers/ata/libata-core.c:108: error: ata_force_param_buf causes a 
section type conflict

Given that the data is marked __initdata and the code is marked __init, 
I cannot see the problem.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH #upstream] libata: implement libata.force module parameter
  2008-02-01 17:28 ` [PATCH #upstream] libata: implement libata.force module parameter Jeff Garzik
@ 2008-02-01 17:46   ` Bartlomiej Zolnierkiewicz
  2008-02-01 18:36   ` Sam Ravnborg
  2008-02-12  9:07   ` Tejun Heo
  2 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-01 17:46 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Tejun Heo, IDE/ATA development list, Mark Lord, Alan Cox,
	Sam Ravnborg, Andrew Morton, LKML

On Feb 1, 2008 6:28 PM, Jeff Garzik <jeff@garzik.org> wrote:
> Tejun Heo wrote:
> > This patch implements libata.force module parameter which can
> > selectively override ATA port, link and device configurations
> > including cable type, SATA PHY SPD limit, transfer mode and NCQ.
> >
> > For example, you can say "use 1.5Gbps for all fan-out ports attached
> > to the second port but allow 3.0Gbps for the PMP device itself, oh,
> > the device attached to the third fan-out port chokes on NCQ and
> > shouldn't go over UDMA4" by the following.
> >
> >  libata.force=2:1.5g,2.15:3.0g,2.03:noncq,udma4
> >
> > Signed-off-by: Tejun Heo <htejun@gmail.com>
> > ---
> > I guess it's about time we add something like this.  More than
> > anything else this should help debugging and can serve as a last
> > resort to work around problems.
> >
> > Thanks.
> >
> >  Documentation/kernel-parameters.txt |   35 +++
> >  drivers/ata/libata-core.c           |  375 +++++++++++++++++++++++++++++++++++-
> >  drivers/ata/libata-eh.c             |    8
> >  drivers/ata/libata.h                |    1
> >  4 files changed, 415 insertions(+), 4 deletions(-)
>
> ACK, but it breaks the build due to section type conflicts:
>
> drivers/ata/libata-core.c:108: error: ata_force_param_buf causes a
> section type conflict
>
> Given that the data is marked __initdata and the code is marked __init,
> I cannot see the problem.

the data is marked as "const"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH #upstream] libata: implement libata.force module parameter
  2008-02-01 17:28 ` [PATCH #upstream] libata: implement libata.force module parameter Jeff Garzik
  2008-02-01 17:46   ` Bartlomiej Zolnierkiewicz
@ 2008-02-01 18:36   ` Sam Ravnborg
  2008-02-08  4:18     ` Tejun Heo
  2008-02-12  9:07   ` Tejun Heo
  2 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2008-02-01 18:36 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Tejun Heo, IDE/ATA development list, Mark Lord, Alan Cox,
	Andrew Morton, LKML

On Fri, Feb 01, 2008 at 12:28:35PM -0500, Jeff Garzik wrote:
> Tejun Heo wrote:
> >This patch implements libata.force module parameter which can
> >selectively override ATA port, link and device configurations
> >including cable type, SATA PHY SPD limit, transfer mode and NCQ.
> >
> >For example, you can say "use 1.5Gbps for all fan-out ports attached
> >to the second port but allow 3.0Gbps for the PMP device itself, oh,
> >the device attached to the third fan-out port chokes on NCQ and
> >shouldn't go over UDMA4" by the following.
> >
> > libata.force=2:1.5g,2.15:3.0g,2.03:noncq,udma4
> >
> >Signed-off-by: Tejun Heo <htejun@gmail.com>
> >---
> >I guess it's about time we add something like this.  More than
> >anything else this should help debugging and can serve as a last
> >resort to work around problems.
> >
> >Thanks.
> >
> > Documentation/kernel-parameters.txt |   35 +++
> > drivers/ata/libata-core.c           |  375 
> > +++++++++++++++++++++++++++++++++++-
> > drivers/ata/libata-eh.c             |    8 
> > drivers/ata/libata.h                |    1 
> > 4 files changed, 415 insertions(+), 4 deletions(-)
> 
> ACK, but it breaks the build due to section type conflicts:
> 
> drivers/ata/libata-core.c:108: error: ata_force_param_buf causes a 
> section type conflict
> 
> Given that the data is marked __initdata and the code is marked __init, 
> I cannot see the problem.

I have lost the actual patch.
But what you see is what happens when you mix const and non-const data
in the same section.

Look for use of __initdata for const data and replace it with __initconst.

And modpost cannot warn about it as gcc errors out before we look at the
.o file with modpost.

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH #upstream] libata: implement libata.force module parameter
  2008-02-01 18:36   ` Sam Ravnborg
@ 2008-02-08  4:18     ` Tejun Heo
  2008-02-12  0:24       ` Tejun Heo
  0 siblings, 1 reply; 6+ messages in thread
From: Tejun Heo @ 2008-02-08  4:18 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Jeff Garzik, IDE/ATA development list, Mark Lord, Alan Cox,
	Andrew Morton, LKML

Sam Ravnborg wrote:
> I have lost the actual patch.
> But what you see is what happens when you mix const and non-const data
> in the same section.
> 
> Look for use of __initdata for const data and replace it with __initconst.
> 
> And modpost cannot warn about it as gcc errors out before we look at the
> .o file with modpost.

OIC, thanks.  Hmmm... in init.h, I see __{dev|cpu|mem}initconst but no
__initconst.  The data structure in question is used from module init
function tagged properly with __init.  What should be done here?


-- 
tejun


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH #upstream] libata: implement libata.force module parameter
  2008-02-08  4:18     ` Tejun Heo
@ 2008-02-12  0:24       ` Tejun Heo
  0 siblings, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2008-02-12  0:24 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Jeff Garzik, IDE/ATA development list, Mark Lord, Alan Cox,
	Andrew Morton, LKML

Tejun Heo wrote:
> Sam Ravnborg wrote:
>> I have lost the actual patch.
>> But what you see is what happens when you mix const and non-const data
>> in the same section.
>>
>> Look for use of __initdata for const data and replace it with __initconst.
>>
>> And modpost cannot warn about it as gcc errors out before we look at the
>> .o file with modpost.
> 
> OIC, thanks.  Hmmm... in init.h, I see __{dev|cpu|mem}initconst but no
> __initconst.  The data structure in question is used from module init
> function tagged properly with __init.  What should be done here?

PING.

-- 
tejun

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH #upstream] libata: implement libata.force module parameter
  2008-02-01 17:28 ` [PATCH #upstream] libata: implement libata.force module parameter Jeff Garzik
  2008-02-01 17:46   ` Bartlomiej Zolnierkiewicz
  2008-02-01 18:36   ` Sam Ravnborg
@ 2008-02-12  9:07   ` Tejun Heo
  2 siblings, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2008-02-12  9:07 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: IDE/ATA development list, Mark Lord, Alan Cox, Sam Ravnborg,
	Andrew Morton, LKML, Sam Ravnborg

Jeff Garzik wrote:
> Tejun Heo wrote:
>> This patch implements libata.force module parameter which can
>> selectively override ATA port, link and device configurations
>> including cable type, SATA PHY SPD limit, transfer mode and NCQ.
>>
>> For example, you can say "use 1.5Gbps for all fan-out ports attached
>> to the second port but allow 3.0Gbps for the PMP device itself, oh,
>> the device attached to the third fan-out port chokes on NCQ and
>> shouldn't go over UDMA4" by the following.
>>
>>  libata.force=2:1.5g,2.15:3.0g,2.03:noncq,udma4
>>
>> Signed-off-by: Tejun Heo <htejun@gmail.com>
>> ---
>> I guess it's about time we add something like this.  More than
>> anything else this should help debugging and can serve as a last
>> resort to work around problems.
>>
>> Thanks.
>>
>>  Documentation/kernel-parameters.txt |   35 +++
>>  drivers/ata/libata-core.c           |  375
>> +++++++++++++++++++++++++++++++++++-
>>  drivers/ata/libata-eh.c             |    8
>>  drivers/ata/libata.h                |    1  4 files changed, 415
>> insertions(+), 4 deletions(-)
> 
> ACK, but it breaks the build due to section type conflicts:
> 
> drivers/ata/libata-core.c:108: error: ata_force_param_buf causes a
> section type conflict
> 
> Given that the data is marked __initdata and the code is marked __init,
> I cannot see the problem.

Jeff, this no longer causes build failure whether libata is configured
built-in or as a module.  I have no idea what's going on but there
doesn't seem to be a proper solution on the horizon yet.  I think we can
go ahead and commit this one and convert it to __initdataconst when it
becomes available.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-12  9:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <47A3375F.80101@gmail.com>
2008-02-01 17:28 ` [PATCH #upstream] libata: implement libata.force module parameter Jeff Garzik
2008-02-01 17:46   ` Bartlomiej Zolnierkiewicz
2008-02-01 18:36   ` Sam Ravnborg
2008-02-08  4:18     ` Tejun Heo
2008-02-12  0:24       ` Tejun Heo
2008-02-12  9:07   ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).