Re: [PATCH v4 10/19] Introduce asm-generic/*.h files

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

 



On Fri, Jun 06, 2014 at 08:39:09PM +0200, Christoffer Dall wrote:
> On Thu, Apr 10, 2014 at 06:56:51PM +0200, Andrew Jones wrote:
> > Architecture neutral code may need to call low-level io accessors,
> > or use spinlocks. Create a generic io.h to ensure those accessors
> > are defined, and a generic spinlock.h that complains when included,
> > as we can't write a generic spinlock. These files can be overridden
> > or extended by architecture specific versions placed in
> > lib/$ARCH/asm/.
> > 
> > Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> > ---
> > v4: introduce lib/asm symlink to get rid of #ifdef __arm__,
> >     add spinlock.h too
> > v3: wrt to io.h (was libio.[ch]) only
> >     - get rid of CONFIG_64BIT, replace with asserts
> >     - get rid of {read,write}_len() [libio.c]
> >     - fix bad *64_to_cpu macros
> > ---
> >  .gitignore                 |   1 +
> >  Makefile                   |   6 +-
> >  configure                  |  11 ++++
> >  lib/asm-generic/io.h       | 154 +++++++++++++++++++++++++++++++++++++++++++++
> >  lib/asm-generic/spinlock.h |   4 ++
> >  5 files changed, 173 insertions(+), 3 deletions(-)
> >  create mode 100644 lib/asm-generic/io.h
> >  create mode 100644 lib/asm-generic/spinlock.h
> > 
> > diff --git a/.gitignore b/.gitignore
> > index 775d0dfd8263e..e21939a8771e9 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -9,6 +9,7 @@ patches
> >  .stgit-*
> >  cscope.*
> >  *.swp
> > +/lib/asm
> >  /config.mak
> >  /*-run
> >  /test.log
> > diff --git a/Makefile b/Makefile
> > index fba58e36f272f..51cacdac00615 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -76,11 +76,11 @@ libfdt_clean:
> >  	$(LIBFDT_objdir)/.*.d
> >  
> >  distclean: clean libfdt_clean
> > -	$(RM) config.mak $(TEST_DIR)-run test.log msr.out cscope.*
> > +	$(RM) lib/asm config.mak $(TEST_DIR)-run test.log msr.out cscope.*
> >  
> > -cscope: common_dirs = lib lib/libfdt
> > +cscope: common_dirs = lib lib/libfdt lib/asm lib/asm-generic
> >  cscope:
> >  	$(RM) ./cscope.*
> > -	find $(TEST_DIR) lib/$(TEST_DIR) $(common_dirs) -maxdepth 1 \
> > +	find -L $(TEST_DIR) lib/$(TEST_DIR) $(common_dirs) -maxdepth 1 \
> >  		-name '*.[chsS]' -print | sed 's,^\./,,' > ./cscope.files
> >  	cscope -bk
> > diff --git a/configure b/configure
> > index 6cfc64943f6e6..8a81bf92e27b7 100755
> > --- a/configure
> > +++ b/configure
> > @@ -95,6 +95,17 @@ if [ $exit -eq 0 ]; then
> >  fi
> >  rm -f lib_test.c
> >  
> > +# link lib/asm for the architecture
> > +rm -f lib/asm
> > +asm=asm-generic
> > +if [ -d lib/$arch/asm ]; then
> > +	asm=$arch/asm
> > +elif [ -d lib/$testdir/asm ]; then
> > +	asm=$testdir/asm
> 
> why do you need this elif?  can you not make sure arch is always set?

arch is always set, but there's a chance some arch may not add it's own
lib/$arch dir. It's a pretty small chance... but the elif shouldn't hurt.

drew
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux