All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@uclinux.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] m68k: math-emu: Fix dependencies of math emulation support
Date: Fri, 13 May 2022 09:23:11 +1000	[thread overview]
Message-ID: <db869491-142f-4360-0f3c-e4395563088b@uclinux.org> (raw)
In-Reply-To: <CAMuHMdW3BsuJOx6r1TmUJJYhqn_v5iDznTw0gnbayQAjBp2OYA@mail.gmail.com>

Hi Geert,

On 11/5/22 22:54, Geert Uytterhoeven wrote:
> On Wed, May 11, 2022 at 11:48 AM Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> If CONFIG_M54xx=y, CONFIG_MMU=y, and CONFIG_M68KFPU_EMU=y:
>>
>>      {standard input}:272: Error: invalid instruction for this architecture; needs 68000 or higher (68000 [68ec000, 68hc000, 68hc001, 68008, 68302, 68306, 68307, 68322, 68356], 68010, 68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060 [68ec060], cpu32 [68330, 68331, 68332, 68333, 68334, 68336, 68340, 68341, 68349, 68360], fidoa [fido]) -- statement `sub.b %d1,%d3' ignored
>>      {standard input}:609: Error: invalid instruction for this architecture; needs 68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060 [68ec060]) -- statement `bfextu 4(%a1){%d0,#8},%d0' ignored
>>      {standard input}:752: Error: operands mismatch -- statement `mulu.l 4(%a0),%d3:%d0' ignored
>>      {standard input}:1155: Error: operands mismatch -- statement `divu.l %d0,%d3:%d7' ignored
>>
>> The math emulation support code is intended for 68020 and higher, and
>> uses several instructions or instruction modes not available on coldfire
>> or 68000.
>>
>> Originally, the dependency of M68KFPU_EMU on MMU was fine, as MMU
>> support was only available on 68020 or higher.  But this assumption
>> was broken by the introduction of MMU support for M547x and M548x.
>>
>> Drop the dependency on MMU, as the code should work fine on 68020 and up
>> without MMU (which are not yet supported by Linux, though).
>> Add dependencies on M68K_CLASSIC (to rule out Coldfire) and FPU (to rule
>> out 68xxx below 68020).
>>
>> Fixes: 1f7034b9616e6f14 ("m68k: allow ColdFire 547x and 548x CPUs to be built with MMU enabled")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> ---
>> To be queued in the m68k for-v5.19 branch.
>>
>>   arch/m68k/Kconfig.cpu | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
>> index 16ea9a67723c09dc..9abddbbee819f1d3 100644
>> --- a/arch/m68k/Kconfig.cpu
>> +++ b/arch/m68k/Kconfig.cpu
>> @@ -327,7 +327,7 @@ comment "Processor Specific Options"
>>
>>   config M68KFPU_EMU
>>          bool "Math emulation support"
>> -       depends on MMU
>> +       depends on M68K_CLASSIC && FPU
>                        ^^^^^^^^^^^^
> Whoops, that's a silly typo...

Are you going to resend, or are you thinking of changing the way this is done?

I had thought that CONFIG_FPU enabled meant you had some type of
floating point support in the kernel - be it hardware or software emulated.
So I don't have a problem with this "as is".

Regards
Greg



  reply	other threads:[~2022-05-12 23:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  9:48 [PATCH] m68k: math-emu: Fix dependencies of math emulation support Geert Uytterhoeven
2022-05-11 10:26 ` Andreas Schwab
2022-05-11 12:02   ` Geert Uytterhoeven
2022-05-11 13:08     ` Andreas Schwab
2022-05-11 12:54 ` Geert Uytterhoeven
2022-05-12 23:23   ` Greg Ungerer [this message]
2022-05-13  6:56     ` Geert Uytterhoeven
2022-05-13  8:06       ` Greg Ungerer

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=db869491-142f-4360-0f3c-e4395563088b@uclinux.org \
    --to=gerg@uclinux.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=lkp@intel.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.