diff mbox

[07/16] linux-user: fix struct target_epoll_event layout for MIPS

Message ID 1402849113-11402-8-git-send-email-paul@archlinuxmips.org
State New
Headers show

Commit Message

Paul Burton June 15, 2014, 4:18 p.m. UTC
MIPS requires the pad field to 64b-align the data field just as ARM
does.

Signed-off-by: Paul Burton <paul@archlinuxmips.org>
---
 linux-user/syscall_defs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Riku Voipio June 21, 2014, 11:02 a.m. UTC | #1
On Sun, Jun 15, 2014 at 05:18:24PM +0100, Paul Burton wrote:
> MIPS requires the pad field to 64b-align the data field just as ARM
> does.

Is this true for the 64bit mips also?

> Signed-off-by: Paul Burton <paul@archlinuxmips.org>
> ---
>  linux-user/syscall_defs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 69c3982..9fcb723 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2528,7 +2528,7 @@ typedef union target_epoll_data {
>  
>  struct target_epoll_event {
>      uint32_t events;
> -#ifdef TARGET_ARM
> +#if defined(TARGET_ARM) || defined(TARGET_MIPS)
>      uint32_t __pad;
>  #endif
>      target_epoll_data_t data;
> -- 
> 2.0.0
>
Paul Burton June 21, 2014, 6:04 p.m. UTC | #2
On Sat, Jun 21, 2014 at 02:02:55PM +0300, Riku Voipio wrote:
> On Sun, Jun 15, 2014 at 05:18:24PM +0100, Paul Burton wrote:
> > MIPS requires the pad field to 64b-align the data field just as ARM
> > does.
> 
> Is this true for the 64bit mips also?

It appears so, good catch :)

Paul

> > Signed-off-by: Paul Burton <paul@archlinuxmips.org>
> > ---
> >  linux-user/syscall_defs.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> > index 69c3982..9fcb723 100644
> > --- a/linux-user/syscall_defs.h
> > +++ b/linux-user/syscall_defs.h
> > @@ -2528,7 +2528,7 @@ typedef union target_epoll_data {
> >  
> >  struct target_epoll_event {
> >      uint32_t events;
> > -#ifdef TARGET_ARM
> > +#if defined(TARGET_ARM) || defined(TARGET_MIPS)
> >      uint32_t __pad;
> >  #endif
> >      target_epoll_data_t data;
> > -- 
> > 2.0.0
> >
diff mbox

Patch

diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 69c3982..9fcb723 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2528,7 +2528,7 @@  typedef union target_epoll_data {
 
 struct target_epoll_event {
     uint32_t events;
-#ifdef TARGET_ARM
+#if defined(TARGET_ARM) || defined(TARGET_MIPS)
     uint32_t __pad;
 #endif
     target_epoll_data_t data;