mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: xili_gchen_5257@hotmail.com
Cc: jespern@axis.com, starvik@axis.com, linux-kernel@vger.kernel.org,
	linux-cris-kernel@axis.com
Subject: Re: [Consult] cris: arch-v10: About $dtp0 register
Date: Tue, 7 Jul 2015 14:05:20 +0200	[thread overview]
Message-ID: <201507071205.t67C5Ktk007837@ignucius.se.axis.com> (raw)
In-Reply-To: <BLU437-SMTP10680483B958037ECFE4D84B9950@phx.gbl> (message from Chen Gang on Sun, 5 Jul 2015 00:30:48 +0200)

> From: Chen Gang <xili_gchen_5257@hotmail.com>
> Date: Sun, 5 Jul 2015 00:30:48 +0200

> Hello Maintainers:
> 
> I want to consult, whether arch-v10 supports $dtp0 register:

Use your favorite search engine for "Axis ETRAX 100 LX
programmers manual".  I just did and got the good news that the
inteded PDF was the top item found.  This document has all the
details you'll ever need for CRIS up to and including CRIS v10
(yes, that's the canonical spelling, not "CRISv10").  In chapter
"1.1 Registers", the special registers are listed.  Neither DTP0
nor DTP1 are mentioned there.  There is an appendix titled "The
ETRAX 4", listing details to a predecessor version.  The DTP0
register is mentioned there in "7.2 Special Registers"; it's
special register P12.

To cut the story short for most, this is an ETRAX 4 register
connected to DMA logic, not supported by ETRAX 100 LX.  If you
for some reason need to refer to the special register *as such*,
it can be accessed by the name P12, but the issue here is
actually with BAR, the breakpoint address register.

>  - Kernel has already used it in arch/cris/arch-v10/kernel/kgdb.c.

If you also read the comment there, at both uses (assuming you
read the same as the downstream I read), it says "P12, register
BAR, assembler might not know BAR".  It apparently alludes to
special register BAR not being accessible in the assembler at
that time (possibly by speculation rather than inspection; I
guess that's the case).  So, IMHO a better question for your
intentions would have focused on the code in kgdb.c, not asking
about the DTP0 register as such.

If you change the $dtp0 to $bar or $p12, I believe you will get
the intended result.  The "$bar" name has worked for at least 11
years, probably 15, with the -march=v10 option but likely also
without it.  Cf. opcodes/cris-opc.c in the shared gdb and
binutils git for history.  (Yes, the CVS history *was* carried
over at the git conversion.)

> 
>  - But upstream gas 2.25.51 can not recognize it for arch-v10, for the
>    same kgdb.s file which contents $dtp0:
> 
>      "/upstream/release-cris/bin/cris-gchen-linux-as ./kgdb.s -o kgdb.o" will be ok.
>      "/upstream/release-cris/bin/cris-gchen-linux-as --march=v10 ./kgdb.s -o kgdb.o" will cause "Error: Illegal operands".

I'm guessing "recent" changes (later than the last ten years ;-)
somehow added an -march=v10 directly or indirectly, such that
$dtp0 was no longer accepted (as it isn't "supported" for CRIS v10).

> For me, I guess, it is upstream toolchain's issue, but I have no the
> related ISA documentations (common ISA and v10 special ISA), so at
> present I can not be sure about it (related informations are welcomed).

It's a downstream use issue, which could be fixed without prior
knowledge using only web resources.  More things are, than people
usually believe.

> And after this issue, excluding warnings, the cris next-20150702 can
> pass allmodconfig with the current latest upstream master branch
> toolchain. :-)
> 
> 
> Welcome any ideas, suggestions and completions.

As a collateral, can I have an "upstream" GIT (slug and) commit
id I can use to compile a CRIS v10 kernel, possibly modulo this
issue?  I need to use the kernel as a test-case for a gcc issue.
I'll use Segher Boessenkool "buildall" kernelbuild scripts, but
I'm missing a compilable kernel commit-id.  (No, I haven't
actually followed my own advice but by your email I'm guessing
CRIS v10 isn't currently compilable.)

> 
> Thanks.
> -- 
> Chen Gang
> 
> Open, share, and attitude like air, water, and life which God blessed
> 

brgds, H-P

  reply	other threads:[~2015-07-07 12:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-04 22:30 Chen Gang
2015-07-07 12:05 ` Hans-Peter Nilsson [this message]
2015-07-09  0:44   ` Chen Gang
2015-07-20 21:32     ` Chen Gang
2015-08-05  4:32       ` Hans-Peter Nilsson
2015-08-05 14:39         ` Chen Gang
2015-08-05 16:56           ` Hans-Peter Nilsson
2015-08-04 14:45     ` Hans-Peter Nilsson

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=201507071205.t67C5Ktk007837@ignucius.se.axis.com \
    --to=hans-peter.nilsson@axis.com \
    --cc=jespern@axis.com \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=starvik@axis.com \
    --cc=xili_gchen_5257@hotmail.com \
    /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

Powered by JetHome