mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qinxin Xia <xiaqinxin@huawei.com>
To: Barry Song <21cnbao@gmail.com>
Cc: <m.szyprowski@samsung.com>, <robin.murphy@arm.com>,
	<jonathan.cameron@huawei.com>, <prime.zeng@huawei.com>,
	<fanghao11@huawei.com>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>, <yangyicong@huawei.com>
Subject: Re: [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma
Date: Wed, 27 Aug 2025 20:07:28 +0800	[thread overview]
Message-ID: <e0584468-ca8e-4a3e-944d-c0bff8569a83@huawei.com> (raw)
In-Reply-To: <CAGsJ_4yTOPoO98TTh3oQ4t6rag==yqeYP8HQ1wKvYdvg4e1RTQ@mail.gmail.com>



On 2025/8/22 09:12:07, Barry Song <21cnbao@gmail.com> wrote:
>>
>> Does usr/include have header files? Did you run make headers_install
>> before make?
>> [xiaqinxin@localhost linux]$ make headers_install
>>     HOSTCC  scripts/basic/fixdep
>>     HOSTCC  scripts/unifdef
>>     WRAP    arch/arm64/include/generated/uapi/asm/socket.h
>>     SYSHDR  arch/arm64/include/generated/uapi/asm/unistd_64.h
>>     HDRINST usr/include/asm-generic/mman.h
>>     HDRINST usr/include/asm-generic/stat.h
>>     HDRINST usr/include/asm-generic/ucontext.h
>>     HDRINST usr/include/asm-generic/int-ll64.h
>>     HDRINST usr/include/asm-generic/unistd.h
>>     HDRINST usr/include/asm-generic/kvm_para.h
>>     HDRINST usr/include/asm-generic/types.h
>>     HDRINST usr/include/asm-generic/ipcbuf.h
>>     HDRINST usr/include/asm-generic/termbits-common.h
>> ...
>> [xiaqinxin@localhost linux]$ cd tools/dma/
>> [xiaqinxin@localhost dma]$ make
>> cc -I../../usr/include -I../../include dma_map_benchmark.c -o
>> dma_map_benchmark
> 
> This is really frustrating. Why do other parts not need this, but
> dma_map_benchmark does? It is also not acceptable to hardcode the
> path to usr/include.
> 
> It is also not good practice to access a kernel header directly from a
> userspace tool - such as -I../../include.
> 
> Shouldn't map_benchmark.h be a proper UAPI header that gets installed
> into the toolchain like the others?
> 
Hello Barry :

This include file is inherited from the original version, and there are 
similar

method in other parts :

pcmcia/Makefile:CFLAGS := -I../../usr/include
laptop/dslm/Makefile:CFLAGS := -I../../usr/include
accounting/Makefile:CFLAGS := -I../../usr/include

During compilation, the system searches for header files from 
../../usr/include first.

If no header file is found in ../../usr/include, the system attempts to 
get header files

from the system directory of the compilation environment. So maybe in 
some compilation

environments, compiling these modules might have the same problem...

'struct map_benchmark' is defined in map_benchmark.h which is used by 
map_benchmark.c

Do we need to define them separately in the kernel and uapi header files?>>
>> My test is ok.
> 
> 
> Thanks
> Barry


  reply	other threads:[~2025-08-27 12:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 13:35 [PATCH 0/2] " Qinxin Xia
2025-08-14 13:35 ` [PATCH 1/2] tools/dma: " Qinxin Xia
2025-08-15 10:03   ` Barry Song
2025-08-18  2:53     ` Qinxin Xia
2025-08-21  3:39       ` Barry Song
2025-08-21  3:55         ` Qinxin Xia
2025-08-22  1:12           ` Barry Song
2025-08-27 12:07             ` Qinxin Xia [this message]
2025-08-28 21:22               ` Barry Song
2025-09-02  4:08                 ` Qinxin Xia
2025-09-02  4:45                   ` Barry Song
2025-08-14 13:35 ` [PATCH 2/2] MAINTAINERS: add myself and Barry to dma_map_benchmark maintainers Qinxin Xia
2025-08-15  9:28   ` Barry Song
2025-08-15  9:37     ` Qinxin Xia
  -- strict thread matches above, loose matches on Subject: below --
2025-07-24  8:55 [PATCH 0/2] dma-mapping: benchmark: modify the dma_map_benchmark directory Qinxin Xia
2025-07-24  8:55 ` [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma Qinxin Xia
2025-07-24  9:25   ` Barry Song
2025-07-24  9:33     ` Qinxin Xia

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=e0584468-ca8e-4a3e-944d-c0bff8569a83@huawei.com \
    --to=xiaqinxin@huawei.com \
    --cc=21cnbao@gmail.com \
    --cc=fanghao11@huawei.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=m.szyprowski@samsung.com \
    --cc=prime.zeng@huawei.com \
    --cc=robin.murphy@arm.com \
    --cc=yangyicong@huawei.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

all inboxes | Powered by JetHome®