Re: [PATCH RFC 12/15] Factor out generic architecture code

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

 



On Fri, Apr 22, 2016 at 05:40:04PM +0200, Andrew Jones wrote:
> On Thu, Apr 14, 2016 at 09:50:38AM +0200, Thomas Huth wrote:
> > On 11.04.2016 13:04, Alexander Gordeev wrote:
> > > This rework is a prerequisite for the forthcoming pci-testdev
> > > implementation. Basically, only generic port IO accessors are
> > > needed, but it turned out touching io/smp/mm files is needed.
> > > This update should likely be more comprehensive and split into
> > > several commits.
> > > 
> > > Cc: Thomas Huth <thuth@xxxxxxxxxx>
> > > Cc: Andrew Jones <drjones@xxxxxxxxxx>
> > > Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
> > > ---
> > >  lib/asm-generic/io.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++----
> > >  lib/x86/asm/page.h   |  1 +
> > >  lib/x86/io.h         | 36 ++++++++++++++++++++++------------
> > >  lib/x86/smp.h        |  4 ----
> > >  lib/x86/vm.c         |  1 -
> > >  lib/x86/vm.h         | 12 +-----------
> > >  x86/eventinj.c       |  7 +------
> > >  x86/kvmclock.c       |  1 +
> > >  8 files changed, 79 insertions(+), 38 deletions(-)
> > >  create mode 100644 lib/x86/asm/page.h
> > > 
> > > diff --git a/lib/asm-generic/io.h b/lib/asm-generic/io.h
> > > index 49283d6eb020..bd78f3586b9e 100644
> > > --- a/lib/asm-generic/io.h
> > > +++ b/lib/asm-generic/io.h
> > > @@ -127,6 +127,9 @@ static inline u64 __bswap64(u64 x)
> > >  	({ u64 __r = !__cpu_is_be() ? __bswap64(x) : ((u64)x); __r; })
> > >  #define cpu_to_be64 be64_to_cpu
> > >  
> > > +#ifndef mb
> > > +#define mb() do { } while (0)
> > > +#endif
> > 
> > I think it would be better to at least use a
> >  asm volatile ("":::"memory")
> > here to make sure that the compiler does not try to optimize memory
> > access before and behind the barrier?
> 
> Agreed, but we should do it as a separate patch.

Basically, the series a posted earlier this week "x86: Cleanup
low-level arch code" is *this* update implemented in a a proper
way (well, apart from those embarrassing flaws you spotted).

> thanks,
> drew
> 
> > 
> >  Thomas
> > 
> > --
> > 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
--
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