qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
	qemu-devel@nongnu.org
Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com,
	bmeng@tinylab.org, liweiwei@iscas.ac.cn,
	zhiwei_liu@linux.alibaba.com,
	Andrew Jones <ajones@ventanamicro.com>
Subject: Re: [PATCH v5 2/9] target/riscv: introduce riscv_cpu_cfg()
Date: Thu, 16 Feb 2023 09:12:18 -1000	[thread overview]
Message-ID: <ca726eda-6df8-bcc0-15ca-3a38b8360d5a@linaro.org> (raw)
In-Reply-To: <20230216162126.809482-3-dbarboza@ventanamicro.com>

On 2/16/23 06:21, Daniel Henrique Barboza wrote:
> +static inline RISCVCPUConfig riscv_cpu_cfg(CPURISCVState *env)
> +{
> +    return env_archcpu(env)->cfg;
> +}

This structure is 144 bytes.  I don't think you want to be copying it around like that. 
Better to return a const pointer.


r~


  reply	other threads:[~2023-02-16 19:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 16:21 [PATCH v5 0/9] make write_misa a no-op and FEATURE_* cleanups Daniel Henrique Barboza
2023-02-16 16:21 ` [PATCH v5 1/9] target/riscv: turn write_misa() into an official no-op Daniel Henrique Barboza
2023-02-16 16:21 ` [PATCH v5 2/9] target/riscv: introduce riscv_cpu_cfg() Daniel Henrique Barboza
2023-02-16 19:12   ` Richard Henderson [this message]
2023-02-16 16:21 ` [PATCH v5 3/9] target/riscv: remove RISCV_FEATURE_DEBUG Daniel Henrique Barboza
2023-02-16 16:21 ` [PATCH v5 4/9] target/riscv/cpu.c: error out if EPMP is enabled without PMP Daniel Henrique Barboza
2023-02-16 16:21 ` [PATCH v5 5/9] target/riscv: remove RISCV_FEATURE_EPMP Daniel Henrique Barboza
2023-02-16 16:21 ` [PATCH v5 6/9] target/riscv: remove RISCV_FEATURE_PMP Daniel Henrique Barboza
2023-02-16 16:21 ` [PATCH v5 7/9] hw/riscv/virt.c: do not use RISCV_FEATURE_MMU in create_fdt_socket_cpus() Daniel Henrique Barboza
2023-02-16 16:21 ` [PATCH v5 8/9] target/riscv: remove RISCV_FEATURE_MMU Daniel Henrique Barboza
2023-02-16 16:21 ` [PATCH v5 9/9] target/riscv/cpu: remove CPUArchState::features and friends Daniel Henrique Barboza

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=ca726eda-6df8-bcc0-15ca-3a38b8360d5a@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=ajones@ventanamicro.com \
    --cc=alistair.francis@wdc.com \
    --cc=bmeng@tinylab.org \
    --cc=dbarboza@ventanamicro.com \
    --cc=liweiwei@iscas.ac.cn \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=zhiwei_liu@linux.alibaba.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).