Re: [PATCH kvm-unit-tests 09/17] pci: add pci_config_write[wb]()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 05, 2016 at 06:06:49PM +0100, Alexander Gordeev wrote:
> On Wed, Oct 26, 2016 at 03:47:12PM +0800, Peter Xu wrote:
> > We have writel() for 4 bytes but still missing 2/1 bytes accessors.
> > 
> > Signed-off-by: Peter Xu <peterx@xxxxxxxxxx>
> > ---
> >  lib/pci-host-generic.c | 12 ++++++++++++
> >  lib/x86/asm/pci.h      | 14 ++++++++++++++
> >  2 files changed, 26 insertions(+)
> > 
> > diff --git a/lib/pci-host-generic.c b/lib/pci-host-generic.c
> > index be3f9e7..c04e4f5 100644
> > --- a/lib/pci-host-generic.c
> > +++ b/lib/pci-host-generic.c
> > @@ -291,6 +291,18 @@ u32 pci_config_readl(pcidevaddr_t dev, u8 off)
> >  	return readl(conf + off);
> >  }
> >  
> > +void pci_config_writeb(pcidevaddr_t dev, u8 off, u8 val)
> > +{
> > +	void __iomem *conf = pci_get_dev_conf(pci_host_bridge, dev);
> > +	writeb(val, conf + off);
> > +}
> > +
> > +void pci_config_writew(pcidevaddr_t dev, u8 off, u16 val)
> > +{
> > +	void __iomem *conf = pci_get_dev_conf(pci_host_bridge, dev);
> > +	writew(val, conf + off);
> > +}
> > +
> 
> The two above need to be declared in lib/asm-generic/pci-host-bridge.h

Will add them. Thanks,

-- peterx
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux