lkml.org 
[lkml]   [2023]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/4] tools: riscv: Add header file csr.h
On Thu, Aug 3, 2023 at 3:44 PM Andrew Jones <ajones@ventanamicro.com> wrote:
>
> On Wed, Aug 02, 2023 at 11:13:34PM -0400, Guo Ren wrote:
> > On Wed, Aug 02, 2023 at 10:05:00AM +0800, Haibo Xu wrote:
> > > On Fri, Jul 28, 2023 at 5:43 PM Andrew Jones <ajones@ventanamicro.com> wrote:
> > > >
> > > > On Thu, Jul 27, 2023 at 03:20:05PM +0800, Haibo Xu wrote:
> > > > > Borrow some of the csr definitions and operations from kernel's
> > > > > arch/riscv/include/asm/csr.h to tools/ for riscv.
> > > >
> > > > You should copy the entire file verbatim.
> > > >
> > >
> > > Ok, will copy all the definitions in the original csr.h
> > Why not include the original one? Maintain the one csr.h is more
> > comfortable.
>
> selftests and other userspace tools can't always compile when including a
> kernel header without modifying the header in some way. Rather than
> polluting headers with #ifdeffery, the practice has been to copy necessary
> headers to tools/include and modify if necessary.
Okay, got it.

>
> Thanks,
> drew



--
Best Regards
Guo Ren

\
 
 \ /
  Last update: 2023-08-05 03:32    [W:0.035 / U:1.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site