From: Emil Velikov <emil.l.velikov@gmail.com>
To: "Stéphane Marchesin" <stephane.marchesin@gmail.com>
Cc: Chih-Wei Huang <cwhuang@android-x86.org>,
emil.l.velikov@gmail.com,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/6] libdrm: fix the Android 64bit build
Date: Thu, 29 Jan 2015 19:22:12 +0000 [thread overview]
Message-ID: <54CA8864.5040306@gmail.com> (raw)
In-Reply-To: <CACP_E+KxncNS7ojwO=qm0SVq4gMdbKgzRW4DmCZBwRio6Rai6g@mail.gmail.com>
On 29/01/15 19:00, Stéphane Marchesin wrote:
> On Thu, Jan 29, 2015 at 10:47 AM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>> With 64bit bionic mmap now handles 64bit offset, thus we no longer
>> need the __mmap2 trick.
>>
>> Fix from Chih-Wei Huang, over at the google forums.
>>
>> Cc: Chih-Wei Huang <cwhuang@android-x86.org>
>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>> ---
>> libdrm.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libdrm.h b/libdrm.h
>> index acfada5..6c3cd59 100644
>> --- a/libdrm.h
>> +++ b/libdrm.h
>> @@ -45,7 +45,7 @@
>>
>> #include <sys/mman.h>
>>
>> -#if defined(ANDROID)
>> +#if defined(ANDROID) && !defined(__LP64__)
>> #include <errno.h> /* for EINVAL */
>>
>> extern void *__mmap2(void *, size_t, int, int, int, size_t);
>
> It seems like you're be better off just using mmap64 instead of __mpap2?
>
I was thinking about that but decided against it due to:
- For 64bit platforms - mmap64 maps directly to mmap [1].
- For other platforms (kitkat at least) mmap64 does a costly (according
to the man page) syscall (don't recall the name).
- Some systems may be lacking mmap64.
Quite a noobie on the topic so I might be completely wrong :)
Thanks
Emil
[1]
https://android.googlesource.com/platform/bionic.git/+/38fcbbb35a40c46e96b4df10d670d1c132910854%5E2%5E!/
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-01-29 19:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 18:47 [PATH 0/6] Misc build fixes Emil Velikov
2015-01-29 18:47 ` [PATCH 1/6] util: add WARN_CFLAGS, rename the c*flags vars Emil Velikov
2015-01-29 18:47 ` [PATCH 2/6] modetest: move includes into AM_CPPFLAGS Emil Velikov
2015-01-29 18:47 ` [PATCH 3/6] libdrm: fix the Android 64bit build Emil Velikov
2015-01-29 19:00 ` Stéphane Marchesin
2015-01-29 19:22 ` Emil Velikov [this message]
2015-01-29 18:47 ` [PATCH 4/6] drmOpenDevice: silence compiler warning Emil Velikov
2015-01-29 18:47 ` [PATCH 5/6] drmGetStats: " Emil Velikov
2015-01-29 18:47 ` [PATCH 6/6] android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES Emil Velikov
2015-02-06 19:42 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
2015-02-06 19:42 ` [PATCH 2/2] util: silence pointer arithmetic warnings Emil Velikov
2015-02-06 19:54 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
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=54CA8864.5040306@gmail.com \
--to=emil.l.velikov@gmail.com \
--cc=cwhuang@android-x86.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=stephane.marchesin@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.