From: Christoffer Dall <christoffer.dall@linaro.org>
To: Andrew Jones <drjones@redhat.com>
Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Subject: Re: [PATCH v4 10/19] Introduce asm-generic/*.h files
Date: Fri, 6 Jun 2014 20:39:09 +0200 [thread overview]
Message-ID: <20140606183909.GN3994@lvm> (raw)
In-Reply-To: <1397149020-3501-11-git-send-email-drjones@redhat.com>
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@redhat.com>
> ---
> 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?
> +fi
> +ln -s $asm lib/asm
> +
> +# create the config
> cat <<EOF > config.mak
> PREFIX=$prefix
> KERNELDIR=$(readlink -f $kerneldir)
[...]
-Christoffer
next prev parent reply other threads:[~2014-06-06 18:39 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 16:56 [PATCH v4 00/19] kvm-unit-tests/arm: initial drop Andrew Jones
2014-04-10 16:56 ` [PATCH v4 01/19] remove unused files Andrew Jones
2014-06-06 18:37 ` Christoffer Dall
2014-06-09 8:11 ` Andrew Jones
2014-06-25 12:14 ` Alexander Graf
2014-04-10 16:56 ` [PATCH v4 02/19] makefile and run_tests tweaks Andrew Jones
2014-06-06 18:37 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 03/19] clean root dir of all x86-ness Andrew Jones
2014-06-06 18:37 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 04/19] add distclean target and gitignore more Andrew Jones
2014-06-06 18:37 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 05/19] add 'make cscope' support Andrew Jones
2014-06-06 18:38 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 07/19] libfdt: get libfdt to build Andrew Jones
2014-06-06 18:38 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 08/19] add support for Linux device trees Andrew Jones
2014-06-06 18:38 ` Christoffer Dall
2014-06-09 10:18 ` Andrew Jones
2014-06-09 10:45 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 09/19] libcflat: add abort() and assert() Andrew Jones
2014-06-06 18:38 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 10/19] Introduce asm-generic/*.h files Andrew Jones
2014-06-06 18:39 ` Christoffer Dall [this message]
2014-06-09 8:23 ` Andrew Jones
2014-06-09 9:08 ` Christoffer Dall
2014-06-09 9:54 ` Andrew Jones
2014-06-09 11:39 ` Andrew Jones
2014-06-09 12:34 ` Christoffer Dall
2014-06-09 13:52 ` Andrew Jones
2014-06-09 15:34 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 11/19] add minimal virtio support for devtree virtio-mmio Andrew Jones
2014-06-06 18:39 ` Christoffer Dall
2014-06-09 9:02 ` Andrew Jones
2014-06-09 9:14 ` Christoffer Dall
2014-06-09 10:21 ` Andrew Jones
2014-04-10 16:56 ` [PATCH v4 12/19] Introduce virtio-testdev Andrew Jones
2014-06-06 18:39 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 13/19] libcflat: clean up libcflat.h and add string.h Andrew Jones
2014-06-06 18:39 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 14/19] printf: support field padding Andrew Jones
2014-06-06 18:39 ` Christoffer Dall
2014-04-10 16:56 ` [PATCH v4 15/19] arm: initial drop Andrew Jones
2014-06-06 18:39 ` Christoffer Dall
2014-06-09 9:44 ` Andrew Jones
2014-04-10 16:56 ` [PATCH v4 16/19] arm: Add spinlock implementation Andrew Jones
2014-04-10 16:56 ` [PATCH v4 17/19] arm: Add IO accessors to avoid register-writeback Andrew Jones
2014-04-10 16:56 ` [PATCH v4 18/19] arm: add useful headers from the Linux kernel Andrew Jones
2014-06-06 18:40 ` Christoffer Dall
2014-04-10 16:57 ` [PATCH v4 19/19] arm: vectors support Andrew Jones
2014-06-06 18:40 ` Christoffer Dall
[not found] ` <1397149020-3501-7-git-send-email-drjones@redhat.com>
2014-06-06 18:38 ` [PATCH v4 06/19] libfdt: Import libfdt source Christoffer Dall
2014-06-06 18:41 ` [PATCH v4 00/19] kvm-unit-tests/arm: initial drop Christoffer Dall
2014-06-09 9:51 ` Andrew Jones
2014-06-09 9:57 ` Christoffer Dall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140606183909.GN3994@lvm \
--to=christoffer.dall@linaro.org \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox