Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#5774 closed defect (fixed)

024-mips_disable_fpu.patch can cause confusion

Reported by: jim@… Owned by: florian
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: FPU Cc:


For people that may try to run code which uses the FPU emulator (chrooting a Debian or running an executable from an older system), the disabling patch causes confusion.

The current patch causes an infinite loop at the first CFC1 opcode with no hint to the user.

This could be improved two ways:

1) Make the MIPS_FPU_EMU configuration option appear in a menu when the kernel is configured. This can serve as a clue and provide a nice way to turn it on.

2) Emit a message and cause a SIGILL (illegal instruction) if code attempts to use the FPU emulator.

For instance, modifying fpu_emulator_cop1Handler to look something like this would be spiffy.

int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
        int has_fpu)
        static char warned = 0;
        if ( !warned) {
          printk(KERN_INFO "Attempt to use kernel floating point emulator which has been deselected by MIPS_FPU_EMU=n\n");
          warned = 1;
        return SIGILL;
#endif /* CONFIG_MIPS_FPU_EMU */

That will result in a boot that look likes this instead of a hang...

Freeing unused kernel memory: 140k freed
Attempt to use kernel floating point emulator which has been deselected by MIPS_FPU_EMU=n
Kernel panic - not syncing: Attempted to kill init!

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by florian

  • Owner changed from developers to florian
  • Status changed from new to assigned

Sounds good to warn the user about that, will cook up a patch.

comment:2 Changed 8 years ago by florian

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [17794].

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.