[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210915120017.a694a43cf7464b4010b39927@kernel.org>
Date: Wed, 15 Sep 2021 12:00:17 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Mike Rapoport <rppt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>, Linux-MM <linux-mm@...ck.org>,
Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [PATCH v2 5/5] tools/bootconfig: Define memblock_free_ptr() to
fix build error
On Tue, 14 Sep 2021 18:57:34 -0700
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> On Tue, Sep 14, 2021 at 6:47 PM Masami Hiramatsu <mhiramat@...nel.org> wrote:
> >
> > Hmm, OK. Let me copy lib/bootconfig.c itself into tools/bootconfig
> > as a user-space code.
>
> Well, or we need to have some really good way to mark these shared files.
>
> Normally I don't think we share any *.c files with tooling, and
> tooling copies over the *.h files it needs. Is this the only one?
What I need to share is lib/bootconfig.c and include/linux/bootconfig.h.
Those provides bootconfig APIs and parser.
But since bootconfig.c uses some kernel APIs, I made wrapper
header files. If I can add #ifdefs to split the parser and APIs
from those part (as you can see 90% of code doesn't need kernel
APIs), I think I don't need any wrappers to include the file
(instead of copying bootconfig.c).
> So yes, copying the *.c file in this case would match what we do for
> the header files, but particularly if there are others, maybe we could
> have something like the "uapi" directory that allows people to
> explicialy share files with the tools.
OK.
> But it would need to be very explicit in the pathname, so that people
> would have that big warning sign of "hey, now you're editing a file
> that is shared with tooling".
>
> That has worked at least _somewhat_ with include/uapi/ and arch/*/include/uapi/.
Hmm, what about lib/uapi/bootconfig.c ?
Thank you,
>
> Linus
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists