public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Evan Green <evan@rivosinc.com>
Cc: libc-alpha@sourceware.org,  vineetg@rivosinc.com,
	 palmer@rivosinc.com, slewis@rivosinc.com
Subject: Re: [PATCH v3 1/3] riscv: Add Linux hwprobe syscall support
Date: Wed, 28 Jun 2023 07:13:38 +0200	[thread overview]
Message-ID: <87y1k42mpp.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20230407230711.2621614-2-evan@rivosinc.com> (Evan Green's message of "Fri, 7 Apr 2023 16:07:08 -0700")

* Evan Green:

> diff --git a/sysdeps/unix/sysv/linux/riscv/sys/hwprobe.h b/sysdeps/unix/sysv/linux/riscv/sys/hwprobe.h
> new file mode 100644
> index 0000000000..49e27ee855

> +__BEGIN_DECLS
> +
> +#ifdef __USE_GNU
> +int
> +__riscv_hwprobe (struct riscv_hwprobe *pairs, size_t pair_count,
> +  size_t cpu_count, unsigned long *cpus, unsigned int flags);
> +#endif
> +
> +__END_DECLS

This isn't a standard header, so you don't need to use __USE_GNU, you
can declare the function unconditionally.  I suspect some of the
arguments can't be null pointers, so maybe use __nonnull, and probably
the access attributes as well.  I also expect that the function can be
_THROW (it's not a cancellation point or planned to be in the future).

There are some style issues (“long” instead of “long int”, the
indentation in the quoted declaration, unusual (for glibc) comment
formatting, but the committer can clean those up before committing.

Thanks,
Florian


  parent reply	other threads:[~2023-06-28  5:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-07 23:07 [PATCH v3 0/3] RISC-V: ifunced memcpy using new kernel hwprobe interface Evan Green
2023-04-07 23:07 ` [PATCH v3 1/3] riscv: Add Linux hwprobe syscall support Evan Green
2023-06-28  0:20   ` Palmer Dabbelt
2023-06-28  5:13   ` Florian Weimer [this message]
2023-04-07 23:07 ` [PATCH v3 2/3] riscv: Add hwprobe vdso call support Evan Green
2023-04-07 23:07 ` [PATCH v3 3/3] riscv: Add and use alignment-ignorant memcpy Evan Green

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=87y1k42mpp.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=evan@rivosinc.com \
    --cc=libc-alpha@sourceware.org \
    --cc=palmer@rivosinc.com \
    --cc=slewis@rivosinc.com \
    --cc=vineetg@rivosinc.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 read-only IMAP folder(s) and NNTP newsgroup(s).