22 Sep, 2014

1 commit


31 May, 2014

1 commit

  • This small update to the previous fix to __delay removes a conditional
    around the ABI-dependent subtraction operation within an inline asm in
    favor to the standard LONG_SUBU macro. No change in code
    produced.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/6703/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     

24 May, 2014

1 commit

  • Nobody is maintaining SMTC anymore and there also seems to be no userbase.
    Which is a pity - the SMTC technology primarily developed by Kevin D.
    Kissell is an ingenious demonstration for the MT
    ASE's power and elegance.

    Based on Markos Chandras patch
    https://patchwork.linux-mips.org/patch/6719/ which while very similar did
    no longer apply cleanly when I tried to merge it plus some additional
    post-SMTC cleanup - SMTC was a feature as tricky to remove as it was to
    merge once upon a time.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

13 May, 2014

3 commits

  • This change reverts most of commit
    60724ca59eda766a30be57aec6b49bc3e2bead91 [MIPS: IP checksums: Remove
    unncessary .set pseudos] that introduced warnings with the
    CPU_DADDI_WORKAROUNDS option set:

    arch/mips/lib/csum_partial.S: Assembler messages:
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3"
    [...]
    arch/mips/lib/csum_partial.S:577: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:577: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:577: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3"
    arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3"
    [and so on, and so on...]

    The warnings are benign and good code is produced regardless because no
    macros that'd use the assembler's temporary register are involved, however
    the `.set noat' directives removed by the commit referred are crucial to
    guarantee this is still going to be the case after any changes in the
    future. Therefore they need to be brought back to place which this
    change does.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/6686/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • This corrects assembler warnings and broken code generated in
    __strncpy_from_user_asm:

    arch/mips/lib/strncpy_user.S: Assembler messages:
    arch/mips/lib/strncpy_user.S:52: Warning: Macro instruction expanded into
    multiple instructions in a branch delay slot

    with the CPU_DADDI_WORKAROUNDS option set. The function schedules delay
    slots manually where there is really no need to as GAS is happy to do it
    all itself, so undo it all and remove `.set noreorder'.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/6685/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • With CPU_DADDI_WORKAROUNDS enabled __delay assembles with a macro in a
    branch delay slot:

    {standard input}: Assembler messages:
    {standard input}:18: Warning: Macro instruction expanded into multiple
    instructions in a branch delay slot

    and broken code results:

    0000000000000000 :
    0: 1480ffff bnez a0,0
    4: 24010001 li at,1
    8: 0081202f dsubu a0,a0,at
    c: 03e00008 jr ra
    10: 00000000 nop
    14: 00000000 nop

    Consequently the function loops indefinitely, showing up prominently as a
    hang in the delay loop calibration at bootstrap.

    This change corrects the problem by forcing the immediate 1 into a
    register while keeping code produced identical where CPU_DADDI_WORKAROUNDS
    is disabled.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/6669/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     

27 Mar, 2014

17 commits


25 Jan, 2014

1 commit

  • None of these files are actually using any __init type directives
    and hence don't need to include . Most are just a
    left over from __devinit and __cpuinit removal, or simply due to
    code getting copied from one driver to the next.

    Signed-off-by: Paul Gortmaker
    Signed-off-by: John Crispin
    Patchwork: http://patchwork.linux-mips.org/patch/6320/

    Paul Gortmaker
     

15 Jul, 2013

1 commit

  • commit 3747069b25e419f6b51395f48127e9812abc3596 upstream.

    The __cpuinit type of throwaway sections might have made sense
    some time ago when RAM was more constrained, but now the savings
    do not offset the cost and complications. For example, the fix in
    commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
    is a good example of the nasty type of bugs that can be created
    with improper use of the various __init prefixes.

    After a discussion on LKML[1] it was decided that cpuinit should go
    the way of devinit and be phased out. Once all the users are gone,
    we can then finally remove the macros themselves from linux/init.h.

    Note that some harmless section mismatch warnings may result, since
    notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
    and are flagged as __cpuinit -- so if we remove the __cpuinit from
    the arch specific callers, we will also get section mismatch warnings.
    As an intermediate step, we intend to turn the linux/init.h cpuinit
    related content into no-ops as early as possible, since that will get
    rid of these warnings. In any case, they are temporary and harmless.

    Here, we remove all the MIPS __cpuinit from C code and __CPUINIT
    from asm files. MIPS is interesting in this respect, because there
    are also uasm users hiding behind their own renamed versions of the
    __cpuinit macros.

    [1] https://lkml.org/lkml/2013/5/20/589

    [ralf@linux-mips.org: Folded in Paul's followup fix.]

    Signed-off-by: Paul Gortmaker
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5494/
    Patchwork: https://patchwork.linux-mips.org/patch/5495/
    Patchwork: https://patchwork.linux-mips.org/patch/5509/
    Signed-off-by: Ralf Baechle

    Paul Gortmaker
     

17 May, 2013

1 commit

  • This reverts commit d532f3d26716a39dfd4b88d687bd344fbe77e390.

    The original commit has several problems:

    1) Doesn't work with 64-bit kernels.

    2) Calls TLBMISS_HANDLER_SETUP() before the code is generated.

    3) Calls TLBMISS_HANDLER_SETUP() twice in per_cpu_trap_init() when
    only one call is needed.

    [ralf@linux-mips.org: Also revert the bits of the ASID patch which were
    hidden in the KVM merge.]

    Signed-off-by: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Cc: "Steven J. Hill"
    Cc: David Daney
    Patchwork: https://patchwork.linux-mips.org/patch/5242/
    Signed-off-by: Ralf Baechle

    David Daney
     

09 May, 2013

5 commits


08 May, 2013

3 commits


11 Apr, 2013

1 commit


13 Mar, 2013

1 commit

  • commit 92d11594f6 (MIPS: Remove irqflags.h dependency from bitops.h)
    factored some of the bitops code out into a separate file
    (arch/mips/lib/bitops.c). Unfortunately the logic converting a bit
    mask into a boolean result was lost in some of the functions. We had:

    int res;
    unsigned long shifted_result_bit;
    .
    .
    .
    res = shifted_result_bit;
    return res;

    Which truncates off the high 32 bits (thus yielding an incorrect
    value) on 64-bit systems.

    The manifestation of this is that a non-SMP 64-bit kernel will not
    boot as the bitmap operations in bootmem.c are all screwed up.

    Signed-off-by: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: Jim Quinlan
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/4965/
    Signed-off-by: Ralf Baechle

    David Daney
     

12 Mar, 2013

1 commit

  • The csum_partial implementation contain optimalizations for the MIPS R2
    instruction set. This optimization is never enabled however because the
    if directive uses the CPU_MIPSR2 constant which is not defined anywhere.

    Use the CONFIG_CPU_MIPSR2 constant instead.

    Signed-off-by: Gabor Juhos
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/4971/
    Signed-off-by: Ralf Baechle

    Gabor Juhos
     

01 Feb, 2013

1 commit

  • Having received another series of whitespace patches I decided to do this
    once and for all rather than dealing with this kind of patches trickling
    in forever.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

22 Jan, 2013

1 commit

  • When building a 32-bit kernel for RBTX4927 with gcc version 4.1.2 20061115
    (prerelease) (Ubuntu 4.1.1-21), I get:

    arch/mips/lib/delay.c:24:5: warning: "__SIZEOF_LONG__" is not defined

    As a consequence, __delay() always uses the 64-bit "dsubu" instruction.

    Replace the check for "__SIZEOF_LONG__ == 4" by "BITS_PER_LONG == 32" to
    fix this.

    Introduced by commit 5210edcd527773c227465ad18e416a894966324f [MIPS: Make
    __{,n,u}delay declarations match definitions and generic delay.h"]

    Signed-off-by: Geert Uytterhoeven
    Patchwork: https://patchwork.linux-mips.org/patch/4678/
    Acked-by: David Daney
    Signed-off-by: Ralf Baechle

    Geert Uytterhoeven
     

24 Nov, 2012

1 commit

  • A recent patch changed some irq routines from inlines to functions.
    These routines are called by the tracer code. Now that they're functions,
    if they are compiled for function tracing they will call the tracer
    and crash the system due to infinite recursion. The fix disables
    tracing in these functions by using "notrace" in the function
    definition.

    Signed-off-by: Al Cooper
    Reviewed-by: David Daney
    Pathchwork: https://patchwork.linux-mips.org/patch/4564/
    Signed-off-by: Ralf Baechle

    Al Cooper