From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Mark Brown <broonie@kernel.org>
Cc: "Franklin S Cooper Jr." <fcooper@ti.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
david.s.gordon@intel.com, Jens Axboe <axboe@fb.com>,
Andrew Morton <akpm@linux-foundation.org>,
Ming Lin <ming.l@ssi.samsung.com>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-spi <linux-spi@vger.kernel.org>,
Sekhar Nori <nsekhar@ti.com>,
Peter Ujfalusi <peter.ujfalusi@ti.com>
Subject: Re: [RFC] [PATCH v2 1/3] scatterlist: Add support to clone scatterlist
Date: Tue, 12 Jul 2016 19:14:02 +0200 [thread overview]
Message-ID: <87vb0a3hk5.fsf@belgarion.home> (raw)
In-Reply-To: <20160708081844.GQ6247@sirena.org.uk> (Mark Brown's message of "Fri, 8 Jul 2016 10:18:44 +0200")
Mark Brown <broonie@kernel.org> writes:
> On Thu, Jul 07, 2016 at 07:43:25PM +0200, Robert Jarzmik wrote:
>
>> I'll try, but I don't trust much my chances of success, given that this tester :
>> - should compile and link in $(TOP)/lib/scatterlist.c, as this is where
>> sg_split() is defined
>> - this implies all its includes
>> - this implies at least these ones :
>> bug.h
>> mm.h
>> scatterlist.h
>> string.h
>> types.h
>> - this implies having page_to_phys and co. defined somewhere without
>> draining the whole include/linux and include/asm* trees
>
>> For the tester, I had created an apart include/linux tree where all the includes
>> were _manually_ filled in with minimal content.
>
>> I don't know if an existing selftest had already this kind of problem,
>> ie. having to compile and link a kernel .c file, and that makes me feel this
>> might be difficult to keep a nice standalone tester.
>
> Right, that's messy :( Could it be refactored as a boot/module load
> time test so it could be built in the kernel environment? Less
> convenient to use (though KVM/UML help) but easier to build.
Actually I thought a bit about it and I got a "messy" idea.
In order to keep things in userspace (for tests it really is more convenient),
I'm going to try this approach :
- make tools/testing/selftests/lib/sg_split.c, based on the tester
- make the Makefile generate a scatterlist_generated.c out of lib/scatterlist.c,
where all the includes will be 'grepped; out and replaced by a single "#include
sg_split.h" containing all the necessary defines
- create the sg_split.h as a concatenation of all the .h files I had to use for
the tester (I will reuse existing .h if it is applicable)
We'll see if that's feasible or not. As long as the "mess" is contained within
sg_split.h, and if it doesn't become a too ugly beast, it might work.
Cheers.
--
Robert
next prev parent reply other threads:[~2016-07-12 17:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-27 14:54 [RFC] [PATCH v2 0/3] scatterlist: Add support to clone sg_table Franklin S Cooper Jr
[not found] ` <1467039249-7816-1-git-send-email-fcooper-l0cyMroinI0@public.gmane.org>
2016-06-27 14:54 ` [RFC] [PATCH v2 1/3] scatterlist: Add support to clone scatterlist Franklin S Cooper Jr
[not found] ` <1467039249-7816-2-git-send-email-fcooper-l0cyMroinI0@public.gmane.org>
2016-07-05 14:49 ` Mark Brown
2016-07-05 16:47 ` Andy Shevchenko
2016-07-05 17:10 ` Andy Shevchenko
[not found] ` <CAHp75VfR=TKfVN=03jvGy5oZRA_-ASb8Vb_A4+x3OrkpZT6PoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-06 17:09 ` Franklin S Cooper Jr.
2016-07-06 17:46 ` Andy Shevchenko
[not found] ` <CAHp75VcPLV-483ihn_RmHnDOc0iFMSdYj5_SrNevyqrrpeWatQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-06 19:39 ` Franklin S Cooper Jr.
2016-07-06 22:04 ` Robert Jarzmik
[not found] ` <871t368lu6.fsf-4ty26DBLk+jEm7gnYqmdkQ@public.gmane.org>
2016-07-07 8:02 ` Mark Brown
[not found] ` <20160707080241.GE6247-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-07-07 17:43 ` Robert Jarzmik
[not found] ` <87twg1739e.fsf-4ty26DBLk+jEm7gnYqmdkQ@public.gmane.org>
2016-07-08 8:18 ` Mark Brown
2016-07-12 17:14 ` Robert Jarzmik [this message]
2016-07-07 15:58 ` Franklin S Cooper Jr.
2016-07-06 10:15 ` Sekhar Nori
[not found] ` <577CDA45.80408-l0cyMroinI0@public.gmane.org>
2016-07-06 17:20 ` Franklin S Cooper Jr.
2016-06-27 14:54 ` [RFC] [PATCH v2 2/3] spi: omap2-mcspi: Add comments for RX only DMA buffer workaround Franklin S Cooper Jr
2016-06-27 14:54 ` [RFC] [PATCH v2 3/3] spi: omap2-mcspi: Use the SPI framework to handle DMA mapping Franklin S Cooper Jr
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=87vb0a3hk5.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--cc=akpm@linux-foundation.org \
--cc=andy.shevchenko@gmail.com \
--cc=axboe@fb.com \
--cc=broonie@kernel.org \
--cc=david.s.gordon@intel.com \
--cc=fcooper@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=ming.l@ssi.samsung.com \
--cc=nsekhar@ti.com \
--cc=peter.ujfalusi@ti.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).