Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Mar 2017 10:07:57 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Michal Meloun <mmel@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r315974 - in head: lib/libthread_db/arch/arm sys/arm/arm sys/arm/include
Message-ID:  <1579704.6DjZ3RBGJe@ralph.baldwin.cx>
In-Reply-To: <201703260836.v2Q8auoU069005@repo.freebsd.org>
References:  <201703260836.v2Q8auoU069005@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, March 26, 2017 08:36:56 AM Michal Meloun wrote:
> Author: mmel
> Date: Sun Mar 26 08:36:56 2017
> New Revision: 315974
> URL: https://svnweb.freebsd.org/changeset/base/315974
> 
> Log:
>   Preserve VFP state across signal delivery.
>   
>   We don't have enouch space to store full VFP context within mcontext
>   stucture. Due to this:
>    - follow i386/amd64 way and store VFP state outside of the mcontext_t
>      but point to it. Use the size of VFP state structure as an 'magic'
>      indicator of the saved VFP state presence.
>    - teach set_mcontext() about this external storage.
>    - for signal delivery, store VFP state to expanded 'struct sigframe'.
>   
>   Submited by:	Andrew Gierth (initial version)
>   PR:		217611
>   MFC after:	2 weeks
> 
> Modified:
>   head/lib/libthread_db/arch/arm/libpthread_md.c
>   head/sys/arm/arm/machdep.c
>   head/sys/arm/include/frame.h
>   head/sys/arm/include/ucontext.h
> 
> Modified: head/lib/libthread_db/arch/arm/libpthread_md.c
> ==============================================================================
> --- head/lib/libthread_db/arch/arm/libpthread_md.c	Sun Mar 26 08:36:20 2017	(r315973)
> +++ head/lib/libthread_db/arch/arm/libpthread_md.c	Sun Mar 26 08:36:56 2017	(r315974)
> @@ -90,7 +90,9 @@ pt_fpreg_to_ucontext(const struct fpreg 
>  	mcontext_t *mc = &uc->uc_mcontext;
>  
>  	/* XXX */
> -	memset(&mc->mc_spare, 0, sizeof(mc->mc_spare));
> +	mc->mc_vfp_size = 0;
> +	mc->mc_vfp_ptr = NULL;
> +	memset(mc->mc_spare, 0, sizeof(mc->mc_spare));
>  }

I suspect you don't need this bit?  Has FreeBSD/arm ever supported VFP on a release
that also shipped libkse?  (i.e. not libthr but the other thread library)

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1579704.6DjZ3RBGJe>