[asterisk-bugs] [DAHDI-linux 0013500]: [patch] safer MMX support for echo canceller

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Nov 9 13:51:42 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=13500 
====================================================================== 
Reported By:                tzafrir
Assigned To:                kpfleming
====================================================================== 
Project:                    DAHDI-linux
Issue ID:                   13500
Category:                   dahdi (the module)
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     closed
Target Version:             2.3.0
JIRA:                        
Reviewboard Link:            
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-09-17 04:38 CDT
Last Modified:              2009-11-09 13:51 CST
====================================================================== 
Summary:                    [patch] safer MMX support for echo canceller
Description: 
ZAPTEL_CONFIG_MMX has had a reputation for being a nice performance
improvement (e.g: by 50% and more), but OTOH also for causing "strange
things". This is because the the floating point context is not properly
saved and using MMX (uses the floating point registers) in an interrupt
context may result in corrupting them to processes.

This patch aims to properly fix that. It does so in an ugly and
i386-specific way (will not even work on x86_64), but it should be a good
starting point. It replaces not only kernel_fpu_begin but also
kernel_fpu_end .

There is some legacy 2.4-only reimplementation of kernel_fpu_begin() which
I chose not to touch.

I also added a compilation warning for the case of using CONFIG_ZAPTEL_MMX
without this fix, as I suspect it is not safe.

The initial patch is vs. zaptel, as I have no relevant EC to test this
with on DAHDI. A dahdi-linux patch is also included, but not actually
tested.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0015167 echo cancellers sec, kb1 and mg2 fail t...
====================================================================== 

---------------------------------------------------------------------- 
 (0113450) svnbot (reporter) - 2009-11-09 13:51
 https://issues.asterisk.org/view.php?id=13500#c113450 
---------------------------------------------------------------------- 
Repository: dahdi
Revision: 7541

_U  linux/branches/2.2/

------------------------------------------------------------------------
r7541 | sruffell | 2009-11-09 13:51:41 -0600 (Mon, 09 Nov 2009) | 48 lines

Blocked revisions 6791,6794,6797,6926,6967 via svnmerge

........
  r6791 | kpfleming | 2009-06-29 15:05:43 -0500 (Mon, 29 Jun 2009) | 12
lines
  
  Improve MMX safety for DAHDI echo cancellers on 32-bit x86 systems.
  
  Replaces the standard kernel FPU save/restore operations with custom
written
  versions for 32-bit x86 CPUs, which have been tested to be reliable and
safe
  to use.
  
  (closes issue https://issues.asterisk.org/view.php?id=13500)
  Reported by: tzafrir
  Patches:
        dahdi_mmx_fix.diff uploaded by tzafrir (license 46)
........
  r6794 | sruffell | 2009-06-29 15:56:07 -0500 (Mon, 29 Jun 2009) | 9
lines
  
  dahdi-base: Enable DAHDI to manage the reference counts for the board
drivers.
  
  Adds a struct module 'owner' member to the dahdi_span structure and
updates
  all the board drivers to set this member before registering the span. 
This
  allows the core of dahdi to maintain the reference counts on the
channels
  itself.
  
  (closes issue https://issues.asterisk.org/view.php?id=10601)
  Reported by: Matti
........
  r6797 | sruffell | 2009-06-29 17:44:54 -0500 (Mon, 29 Jun 2009) | 3
lines
  
  wcte11xp: Set the owner field of the dahdi_span before registration.
  
  (related to issue https://issues.asterisk.org/view.php?id=10601)
........
  r6926 | sruffell | 2009-08-04 11:22:17 -0500 (Tue, 04 Aug 2009) | 1 line
  
  wctdm24xxp: We no longer need to keep our own reference count.
........
  r6967 | tzafrir | 2009-08-11 23:49:47 -0500 (Tue, 11 Aug 2009) | 7 lines
  
  xpp: Don't check for the 'owner' field too soon
  
  The owner field should only tested after the low-level driver 
  pre-registration method is called.
  
  xpp rev: 7287
........

------------------------------------------------------------------------

http://svn.digium.com/view/dahdi?view=rev&revision=7541 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-11-09 13:51 svnbot         Note Added: 0113450                          
======================================================================




More information about the asterisk-bugs mailing list