linux-mips
[Top] [All Lists]

Re: 4.0-rc1 breakage in FPE?

To: David Daney <ddaney.cavm@gmail.com>
Subject: Re: 4.0-rc1 breakage in FPE?
From: Måns Rullgård <mans@mansr.com>
Date: Wed, 25 Feb 2015 21:48:04 +0000
Cc: Paul Martin <paul.martin@codethink.co.uk>, linux-mips@linux-mips.org
In-reply-to: <54EE4134.2050501@gmail.com> (David Daney's message of "Wed, 25 Feb 2015 13:40:04 -0800")
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20150225182048.GC31062@paulmartin.codethink.co.uk> <yw1xh9u97k5c.fsf@unicorn.mansr.com> <54EE4134.2050501@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
David Daney <ddaney.cavm@gmail.com> writes:

> On 02/25/2015 01:31 PM, Måns Rullgård wrote:
>> Paul Martin <paul.martin@codethink.co.uk> writes:
>>
>>> Some change between 3.19 and 4.0-rc1 has broken the FPE such that some
>>> code running on an Octeon II is subtly not working.
>>>
>
> Can you say where your userspace comes from, so we can try to
> reproduce the issue?
>
>>> eg.
>>>
>>>    $ echo "1 2" | gawk '{ print $1 }'
>>>    1 2
>>>
>>> which should output (and does output on 3.19)
>>>
>>>    $ echo "1 2" | gawk '{ print $1 }'
>>>    1
>>>
>>> I'm going to try bisecting this over the next few days.
>>
>> Are you running a 32-bit userland?  If so, enabling
>> MIPS_O32_FP64_SUPPORT should fix this.
>
> ??
>
> 32-bit userland (Debian for instance) typically shouldn't need special
> "Exprimental" config options enabled.

Indeed, it should not.  Someone made a mistake.

> If we can identify the offending patch, we should revert it.

The offending patch is 46490b57 "MIPS: kernel: elf: Improve the overall
ABI and FPU mode checks"

There is no need for a full revert.  This is enough to make things work:

diff --git a/arch/mips/kernel/elf.c b/arch/mips/kernel/elf.c
index d2c09f6..57f0353 100644
--- a/arch/mips/kernel/elf.c
+++ b/arch/mips/kernel/elf.c
@@ -148,9 +148,6 @@ int arch_check_elf(void *_ehdr, bool has_interpreter,
        struct mode_req prog_req, interp_req;
        int fp_abi, interp_fp_abi, abi0, abi1, max_abi;
 
-       if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
-               return 0;
-
        fp_abi = get_fp_abi(state->fp_abi);
 
        if (has_interpreter) {
@@ -245,9 +242,6 @@ void mips_set_personality_fp(struct arch_elf_state *state)
         * not be worried about N32/N64 binaries.
         */
 
-       if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
-               return;
-
        switch (state->overall_fp_mode) {
        case FP_FRE:
                set_thread_fp_mode(1, 0);

-- 
Måns Rullgård
mans@mansr.com

<Prev in Thread] Current Thread [Next in Thread>