mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: <linux-kernel@vger.kernel.org>
Cc: James Hogan <james.hogan@imgtec.com>
Subject: [PATCH 3/3] metag: add exported <asm/ech.h> for extended context handling
Date: Wed, 27 Mar 2013 14:35:14 +0000	[thread overview]
Message-ID: <1364394914-21257-4-git-send-email-james.hogan@imgtec.com> (raw)
In-Reply-To: <1364394914-21257-1-git-send-email-james.hogan@imgtec.com>

Add an exported header file <asm/ech.h> containing the definitions of
some bits which can be set in D0.8 to indicate to the kernel that
certain DSP state should be preserved. The definitions have the same
names and values as the ones in the kernel-internal <asm/tbx.h>, to
make it easier for DSP assembly code to be compatible between Linux and
non-Linux operating systems.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
---
 arch/metag/include/uapi/asm/Kbuild |  1 +
 arch/metag/include/uapi/asm/ech.h  | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 arch/metag/include/uapi/asm/ech.h

diff --git a/arch/metag/include/uapi/asm/Kbuild b/arch/metag/include/uapi/asm/Kbuild
index 876c71f..84e09fe 100644
--- a/arch/metag/include/uapi/asm/Kbuild
+++ b/arch/metag/include/uapi/asm/Kbuild
@@ -2,6 +2,7 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 header-y += byteorder.h
+header-y += ech.h
 header-y += ptrace.h
 header-y += resource.h
 header-y += sigcontext.h
diff --git a/arch/metag/include/uapi/asm/ech.h b/arch/metag/include/uapi/asm/ech.h
new file mode 100644
index 0000000..ac94d1c
--- /dev/null
+++ b/arch/metag/include/uapi/asm/ech.h
@@ -0,0 +1,15 @@
+#ifndef _UAPI_METAG_ECH_H
+#define _UAPI_METAG_ECH_H
+
+/*
+ * These bits can be set in the top half of the D0.8 register when DSP context
+ * switching is enabled, in order to support partial DSP context save/restore.
+ */
+
+#define TBICTX_XEXT_BIT	0x1000	/* Enable extended context save */
+#define TBICTX_XTDP_BIT	0x0800	/* DSP accumulators/RAM/templates */
+#define TBICTX_XHL2_BIT	0x0400	/* Hardware loops */
+#define TBICTX_XAXX_BIT	0x0200	/* Extended AX registers (A*.4-7) */
+#define TBICTX_XDX8_BIT	0x0100	/* Extended DX registers (D*.8-15) */
+
+#endif /* _UAPI_METAG_ECH_H */
-- 
1.8.1.2



      parent reply	other threads:[~2013-03-27 14:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 14:35 [PATCH 0/3] metag: misc improvements James Hogan
2013-03-27 14:35 ` [PATCH 1/3] metag: ptrace: Implement NT_METAG_TLS James Hogan
2013-03-27 14:35 ` [PATCH 2/3] metag: export _metag_da_present and cpu_2_hwthread_id James Hogan
2013-03-27 14:35 ` James Hogan [this message]

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=1364394914-21257-4-git-send-email-james.hogan@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®