From: Nick Kossifidis <mick@ics.forth.gr>
To: Christoph Hellwig <hch@lst.de>
Cc: Nick Kossifidis <mick@ics.forth.gr>,
linux-riscv@lists.infradead.org,
Palmer Dabbelt <palmer@sifive.com>
Subject: Re: [PATCH 7/9] riscv: remove duplicate macros from ptrace.h
Date: Thu, 11 Apr 2019 19:38:51 +0300 [thread overview]
Message-ID: <f9004d5de641d2ce060409dd6c3ce7f2@mailhost.ics.forth.gr> (raw)
In-Reply-To: <20190411161706.GA25465@lst.de>
Στις 2019-04-11 19:17, Christoph Hellwig έγραψε:
> On Thu, Apr 11, 2019 at 07:03:48PM +0300, Nick Kossifidis wrote:
>> I'm sorry I added the Reviewed-by tag too soon, I'm all in for the
>> cleanup
>> but I
>> believe it's much simpler, all of these are re-defined on
>> include/asm-generic/ptrace.h anyway, all we have to do is define
>> GET_FP and
>> GET_USP
>> (or rename regs->sp to regs->usp).
>
> We don't use include/asm-generic/ptrace.h on RISC-V, and I don't really
> see a good reason to start using it. Quite to the contrary, I think we
> can remove that file and apply a similar cleanup as in this patch to
> the
> few architectures currently using it.
I think the point is to avoid code-duplication and enforce a standard
way
of accessing these registers (these static inline functions are also
used
outside arch/, e.g. on syscall.c, signal.c uprobes etc). I agree that at
this point what we have is not good, IMHO we should just have define
macros
for the register names on the arch-specific ptrace.h instead of GET/SET
macros + the static inline functions should have get_ an set_ prefixes
because e.g. frame_pointer can also be a variable.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2019-04-11 16:38 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 11:56 misc cleanups Christoph Hellwig
2019-04-11 11:56 ` [PATCH 1/9] riscv: use asm-generic/extable.h Christoph Hellwig
2019-04-25 19:00 ` Paul Walmsley
2019-04-11 11:56 ` [PATCH 2/9] riscv: remove dead big endian code Christoph Hellwig
2019-04-11 15:40 ` Nick Kossifidis
2019-04-11 15:47 ` Christoph Hellwig
2019-04-11 16:08 ` Nick Kossifidis
2019-04-11 16:31 ` Christoph Hellwig
2019-04-11 16:47 ` Nick Kossifidis
2019-04-12 6:07 ` Christoph Hellwig
2019-04-11 11:56 ` [PATCH 3/9] riscv: remove CONFIG_RISCV_ISA_A Christoph Hellwig
2019-04-11 12:21 ` Andreas Schwab
2019-04-12 1:23 ` Palmer Dabbelt
2019-04-12 5:51 ` Christoph Hellwig
2019-04-11 11:56 ` [PATCH 4/9] riscv: turn mm_segment_t into a struct Christoph Hellwig
2019-04-11 11:56 ` [PATCH 5/9] riscv: simplify stack pointer setup in head.S Christoph Hellwig
2019-04-11 20:54 ` Atish Patra
2019-04-11 11:56 ` [PATCH 6/9] riscv: also clear all pending interrupts when booting Christoph Hellwig
2019-04-11 15:43 ` Nick Kossifidis
2019-04-11 18:52 ` Atish Patra
2019-04-11 11:56 ` [PATCH 7/9] riscv: remove duplicate macros from ptrace.h Christoph Hellwig
2019-04-11 15:46 ` Nick Kossifidis
2019-04-11 15:55 ` Nick Kossifidis
2019-04-11 16:03 ` Nick Kossifidis
2019-04-11 16:17 ` Christoph Hellwig
2019-04-11 16:38 ` Nick Kossifidis [this message]
2019-04-11 16:06 ` Christoph Hellwig
2019-04-25 19:13 ` Paul Walmsley
2019-04-25 19:54 ` Christoph Hellwig
2019-04-25 20:05 ` Paul Walmsley
2019-04-11 11:56 ` [PATCH 8/9] riscv: print the unexpected interrupt cause Christoph Hellwig
2019-04-11 15:52 ` Nick Kossifidis
2019-04-11 15:54 ` Christoph Hellwig
2019-04-25 18:59 ` Paul Walmsley
2019-04-11 11:56 ` [PATCH 9/9] riscv: call pm_power_off from machine_halt / machine_power_off Christoph Hellwig
2019-04-11 18:53 ` Atish Patra
2019-04-25 19:57 ` Paul Walmsley
2019-05-21 10:33 ` Andreas Schwab
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=f9004d5de641d2ce060409dd6c3ce7f2@mailhost.ics.forth.gr \
--to=mick@ics.forth.gr \
--cc=hch@lst.de \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@sifive.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;
as well as URLs for NNTP newsgroup(s).