linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: export constants from shpc.h?
@ 2012-02-16 14:54 Michael S. Tsirkin
  2012-02-23 16:50 ` Jesse Barnes
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2012-02-16 14:54 UTC (permalink / raw)
  To: jbarnes; +Cc: linux-pci, linux-kernel

I've implemented an shpc controller emulator
in qemu, so I needed a bunch of constants
similar to what drivers/pci/hotplug/shpc.h has.

Any objections to adding a PCI_SHPC_XXXX prefix
so these and moving them to pci_regs.h?
PCI utilities can then use them from /usr/include/linux.

One can see how a utility that looks at slot LED and MRL
states might be useful
(we'd need to export the base offset through sysfs
to make it possible to use such in parallel with shpc).

-- 
MST


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

* Re: RFC: export constants from shpc.h?
  2012-02-16 14:54 RFC: export constants from shpc.h? Michael S. Tsirkin
@ 2012-02-23 16:50 ` Jesse Barnes
  2012-02-23 19:50   ` Michael S. Tsirkin
  0 siblings, 1 reply; 4+ messages in thread
From: Jesse Barnes @ 2012-02-23 16:50 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: linux-pci, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

On Thu, 16 Feb 2012 16:54:49 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> I've implemented an shpc controller emulator
> in qemu, so I needed a bunch of constants
> similar to what drivers/pci/hotplug/shpc.h has.
> 
> Any objections to adding a PCI_SHPC_XXXX prefix
> so these and moving them to pci_regs.h?
> PCI utilities can then use them from /usr/include/linux.
> 
> One can see how a utility that looks at slot LED and MRL
> states might be useful
> (we'd need to export the base offset through sysfs
> to make it possible to use such in parallel with shpc).

pci_regs.h is generally reserved for architected regs, but maybe a
separate header file makes sense.  Or just patch libpciaccess or
pci-utils with your tool.

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: RFC: export constants from shpc.h?
  2012-02-23 16:50 ` Jesse Barnes
@ 2012-02-23 19:50   ` Michael S. Tsirkin
  2012-02-23 20:01     ` Jesse Barnes
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2012-02-23 19:50 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-pci, linux-kernel

On Thu, Feb 23, 2012 at 08:50:04AM -0800, Jesse Barnes wrote:
> On Thu, 16 Feb 2012 16:54:49 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > I've implemented an shpc controller emulator
> > in qemu, so I needed a bunch of constants
> > similar to what drivers/pci/hotplug/shpc.h has.
> > 
> > Any objections to adding a PCI_SHPC_XXXX prefix
> > so these and moving them to pci_regs.h?
> > PCI utilities can then use them from /usr/include/linux.
> > 
> > One can see how a utility that looks at slot LED and MRL
> > states might be useful
> > (we'd need to export the base offset through sysfs
> > to make it possible to use such in parallel with shpc).
> 
> pci_regs.h is generally reserved for architected regs,
> but maybe a
> separate header file makes sense.  Or just patch libpciaccess or
> pci-utils with your tool.
> 
> -- 
> Jesse Barnes, Intel Open Source Technology Center

Fair enough, but out of curiosity,
could you pls clarify what is meant by 'architected'?
SHPC is a PCI-SIG spec after all, not a vecor-specific interface...



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

* Re: RFC: export constants from shpc.h?
  2012-02-23 19:50   ` Michael S. Tsirkin
@ 2012-02-23 20:01     ` Jesse Barnes
  0 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2012-02-23 20:01 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: linux-pci, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]

On Thu, 23 Feb 2012 21:50:54 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Thu, Feb 23, 2012 at 08:50:04AM -0800, Jesse Barnes wrote:
> > On Thu, 16 Feb 2012 16:54:49 +0200
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > 
> > > I've implemented an shpc controller emulator
> > > in qemu, so I needed a bunch of constants
> > > similar to what drivers/pci/hotplug/shpc.h has.
> > > 
> > > Any objections to adding a PCI_SHPC_XXXX prefix
> > > so these and moving them to pci_regs.h?
> > > PCI utilities can then use them from /usr/include/linux.
> > > 
> > > One can see how a utility that looks at slot LED and MRL
> > > states might be useful
> > > (we'd need to export the base offset through sysfs
> > > to make it possible to use such in parallel with shpc).
> > 
> > pci_regs.h is generally reserved for architected regs,
> > but maybe a
> > separate header file makes sense.  Or just patch libpciaccess or
> > pci-utils with your tool.
> > 
> > -- 
> > Jesse Barnes, Intel Open Source Technology Center
> 
> Fair enough, but out of curiosity,
> could you pls clarify what is meant by 'architected'?
> SHPC is a PCI-SIG spec after all, not a vecor-specific interface...

Sorry that's what I meant; I was thinking it was one of the vendor
ones.  Putting the SHPC reg definitions in pci_regs.h is fine.

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-02-23 20:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-16 14:54 RFC: export constants from shpc.h? Michael S. Tsirkin
2012-02-23 16:50 ` Jesse Barnes
2012-02-23 19:50   ` Michael S. Tsirkin
2012-02-23 20:01     ` Jesse Barnes

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).