public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* Re: [v2 PATCH 1/2] Add new uio device for dynamic memory allocation
       [not found] ` <1348553352-14334-2-git-send-email-dhobsong@igel.co.jp>
@ 2012-11-04 13:20   ` Geert Uytterhoeven
  2012-11-05  2:34     ` Damian Hobson-Garcia
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2012-11-04 13:20 UTC (permalink / raw)
  To: Damian Hobson-Garcia
  Cc: hjk, gregkh, magnus.damm, horms, linux-kernel, linux-sh, hdk,
	Linux-Next, Linux-Arch

On Tue, Sep 25, 2012 at 8:09 AM, Damian Hobson-Garcia
<dhobsong@igel•co.jp> wrote:
> are holding the device file open, the address returned to userspace is
> DMA_ERROR_CODE.

Only a small subset of the architectures
(arm/ia64/microblaze/openrisc/powerpc/sparc/x86)
seem to define DMA_ERROR_CODE, causing everywhere else:

drivers/uio/uio_dmem_genirq.c: In function ‘uio_dmem_genirq_release’:
drivers/uio/uio_dmem_genirq.c:95: error: ‘DMA_ERROR_CODE’ undeclared
(first use in this function)
drivers/uio/uio_dmem_genirq.c:95: error: (Each undeclared identifier
is reported only once
drivers/uio/uio_dmem_genirq.c:95: error: for each function it appears in.)
drivers/uio/uio_dmem_genirq.c: In function ‘uio_dmem_genirq_probe’:
drivers/uio/uio_dmem_genirq.c:238: error: ‘DMA_ERROR_CODE’ undeclared
(first use in this function)
make[1]: *** [drivers/uio/uio_dmem_genirq.o] Error 1
make: *** [drivers/uio/] Error 2

(e.g. http://kisskb.ellerman.id.au/kisskb/buildresult/7462173/)

Furthermore, none of them define it in <uapi/...>, so DMA_ERROR_CODE is not
part of the userspace API (yet), while it is architecture-specific (some use 0,
others ~0).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k•org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [v2 PATCH 1/2] Add new uio device for dynamic memory allocation
  2012-11-04 13:20   ` [v2 PATCH 1/2] Add new uio device for dynamic memory allocation Geert Uytterhoeven
@ 2012-11-05  2:34     ` Damian Hobson-Garcia
  0 siblings, 0 replies; 2+ messages in thread
From: Damian Hobson-Garcia @ 2012-11-05  2:34 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: hjk, gregkh, magnus.damm, horms, linux-kernel, linux-sh, hdk,
	Linux-Next, Linux-Arch

Hi Geert,

On 2012/11/04 22:20, Geert Uytterhoeven wrote:
> On Tue, Sep 25, 2012 at 8:09 AM, Damian Hobson-Garcia
> <dhobsong@igel•co.jp> wrote:
>> are holding the device file open, the address returned to userspace is
>> DMA_ERROR_CODE.
> 
> Only a small subset of the architectures
> (arm/ia64/microblaze/openrisc/powerpc/sparc/x86)
> seem to define DMA_ERROR_CODE, causing everywhere else:
> 
> drivers/uio/uio_dmem_genirq.c: In function ‘uio_dmem_genirq_release’:
> drivers/uio/uio_dmem_genirq.c:95: error: ‘DMA_ERROR_CODE’ undeclared
> (first use in this function)
> drivers/uio/uio_dmem_genirq.c:95: error: (Each undeclared identifier
> is reported only once
> drivers/uio/uio_dmem_genirq.c:95: error: for each function it appears in.)
> drivers/uio/uio_dmem_genirq.c: In function ‘uio_dmem_genirq_probe’:
> drivers/uio/uio_dmem_genirq.c:238: error: ‘DMA_ERROR_CODE’ undeclared
> (first use in this function)
> make[1]: *** [drivers/uio/uio_dmem_genirq.o] Error 1
> make: *** [drivers/uio/] Error 2
> 
> (e.g. http://kisskb.ellerman.id.au/kisskb/buildresult/7462173/)
> 
> Furthermore, none of them define it in <uapi/...>, so DMA_ERROR_CODE is not
> part of the userspace API (yet), while it is architecture-specific (some use 0,
> others ~0).
> 
Good points, thank you.  In that case, does fixing the value to
something like ~0 sound like a better (more portable) solution?

Damian

-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-05  2:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1348553352-14334-1-git-send-email-dhobsong@igel.co.jp>
     [not found] ` <1348553352-14334-2-git-send-email-dhobsong@igel.co.jp>
2012-11-04 13:20   ` [v2 PATCH 1/2] Add new uio device for dynamic memory allocation Geert Uytterhoeven
2012-11-05  2:34     ` Damian Hobson-Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox