From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6876 Path: news.gmane.org!not-for-mail From: Andy Lutomirski Newsgroups: gmane.linux.lib.musl.general Subject: Re: Custom __set_thread_area for ARM Date: Wed, 21 Jan 2015 17:45:56 -0800 Message-ID: <54C05654.7000204@amacapital.net> References: <20150114030946.GL4574@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1421891176 14189 80.91.229.3 (22 Jan 2015 01:46:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2015 01:46:16 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6889-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jan 22 02:46:16 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YE6qc-0005Wl-Vg for gllmg-musl@m.gmane.org; Thu, 22 Jan 2015 02:46:15 +0100 Original-Received: (qmail 16050 invoked by uid 550); 22 Jan 2015 01:46:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 16039 invoked from network); 22 Jan 2015 01:46:11 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CrKZoza41QlH+D73v5cG4gLYt+TJSmqgcxRrwgLAlmk=; b=aUPS7pcRlXiL5sFcYdy2TBqmRtSJsQ3cAZQEXP2EkfF83VRJo585MEqjSZdK175o6g 9SOgsbEQwGGzoXQ6bRPAzekqOw7FxirYrcur5q54oeO46rpfggynnHjdA/YpSSaKO/Wn i64Yb8HQMVNH4hWlkWuBaQ16SVZyAoZCL8fSfvFLuCb0yNYJjDuN4C+sFvwxQaY/pXzX 56pZs2SXNE1TNcb0/BNTMGXq/yZM8eo/9ljWickxWzD5BOwfgSxW+VcrqqTi9MvYevJB Z5E8YIqo+g9glt8NQGM6nR5iW77hJRsmGspXQni0AppXZqKaxNTAIsd7GD5odCmGdR4A jgkQ== X-Gm-Message-State: ALoCoQlxSwadvaiTSG4kpsgbkx3HaKaBY57xH/xgZi/DBJAoCaPZETa30ITJjwAfbFf131+PCfkD X-Received: by 10.68.132.229 with SMTP id ox5mr67563634pbb.94.1421891160115; Wed, 21 Jan 2015 17:46:00 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: <20150114030946.GL4574@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:6876 Archived-At: On 01/13/2015 07:09 PM, Rich Felker wrote: > On Tue, Jan 13, 2015 at 11:19:44PM +0300, Oleg Ranevskyy wrote: >> Dear community, >> >> Musl has a generic implementation of the __set_thread_area function in >> src/thread/__set_thread_area.c. It is not used for ARM though. There is a >> custom ARM implementation in src/thread/arm/__set_thread_area.s. >> >> Would you be able to clarify the following question please? >> Why musl doesn't define SYS_set_thread_area for ARM to utilize the generic >> function and uses custom __set_thread_area instead? > > The ARM kernel does not implement SYS_set_thread_area. Instead it > provides an ARM-specific syscall. The asm file you're looking at uses > that instead. > > BTW, this code is replaced in git master and the pending 1.1.6 > release. It's part of the ARM atomics/TLS access overhaul. As the sort-of-maintainer of the kernel side of this on x86, I have to ask: why is the i386 __set_thread_area function written in assembly? --Andy