Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Issue seen while Porting to Linux 2.6

    We have just ported to linux 2.6 from Linux 2.4 for our application
    We are facing an unprecedented issue

    We were originally using the following macro

    SET_WORD(ETM3_TXCOM_TU_CONF_REG(vtNo.k_val,vtNo.l_ val,vtNo.m_val),val);

    which sets a register in the hardware with val. The macro ETM3_TXCOM_TU_CONF_REG uses k,l,m values to calculate the address in the foloowing format

    #define ETM3_TXCOM_TU_CONF_REG(k,l,m) (0x18500/2 + ETM3_KLM_TO_VC(k,l,m))

    With the 2.6 kernel this SET_WORD is giving me an error and the address that is being printed is incorrect. If i put a log in my code and print the address evaluated by ETM3_TXCOM_TU_CONF_REG then it is printed as C280 which is correct.

    However, when used in the macro somehow the address gets screwed and we are getting problems

    This particular code has being working in the 2.4 kernel for the past 4 years

    Can somebody help me regarding this ???

  2. #2

    Issue solved

    This issue was resolved
    The issue wa because of gcc4.1 which is a new compiler that wee using.

    Some optimizations by the compiler was causing the problem.

    The issue was resolved by making the variables volatile.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts