15 Feb, 2011

1 commit


23 Sep, 2010

1 commit


24 May, 2010

1 commit


01 Mar, 2010

1 commit


24 Nov, 2009

1 commit


08 Sep, 2009

1 commit


01 Sep, 2009

1 commit


24 Aug, 2009

2 commits

  • Signed-off-by: Stuart Menefy
    Signed-off-by: Paul Mundt

    Stuart Menefy
     
  • The SH instruction set has several instructions which accept an 8 bit
    immediate operand. For logical instructions this operand is zero extended,
    for arithmetic instructions the operand is sign extended. After adding an
    option to the assembler to check this, it was found that several pieces
    of assembly code were assuming this behaviour, and in one case
    getting it wrong.

    So this patch explicitly sign extends any immediate operands, which makes
    it obvious what is happening, and fixes the one case which got it wrong.

    Signed-off-by: Stuart Menefy
    Signed-off-by: Paul Mundt

    Stuart Menefy
     

27 Jul, 2009

2 commits


11 Jul, 2009

5 commits

  • Presently the STACK_CHECK() code is called in to multiple times, although
    it's only necessary from the mcount entry. The code still attempts to
    treat the nop case as an ftrace path resulting in superfluous code flow
    for the case where ftrace is disabled. And finally, this also fixes up
    references to a few undefined symbols when FUNCTION_TRACER=n.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Presently the closest reference to function_trace_stop is within a
    CONFIG_STACK_DEBUG block. When this is turned off, the build bails out
    with a pcrel too far error. Reorder things a bit to handle the various
    combinations.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • This adds a general CONFIG_MCOUNT in order to permit mcount generation
    without ftrace support. This is primarily for allowing platforms to
    enable aggressive stack overflow checking without having to enable ftrace
    support. Based on the sparc64 implementation.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Add both dynamic and static function graph tracer support for sh.

    Signed-off-by: Matt Fleming
    Signed-off-by: Paul Mundt

    Matt Fleming
     
  • Enable kernel stack checking code in both the dynamic ftrace and mcount
    code paths. Check the stack to see if it's overflowing and make sure
    that the stack pointer contains an address that's either in init_stack
    or after the bss.

    Signed-off-by: Matt Fleming
    Signed-off-by: Paul Mundt

    Matt Fleming
     

06 Jul, 2009

2 commits


29 Jan, 2009

1 commit

  • In rare circumstances csum_partial() can be called with data which is
    not 16 or 32 bit aligned. This is been observed with RPC calls for NFS
    file systems for example. Add support for handling this without resorting
    to the misaligned fixup code (which is why this hasn't been seen as a
    problem). This mimics the i386 version, which has had this support for
    some time.

    Signed-off-by: Stuart Menefy
    Signed-off-by: Paul Mundt

    Stuart Menefy
     

22 Dec, 2008

4 commits

  • We chan't share code for udivsi3 and udivsi3_i4, because they
    have a different clobber list. Copy udivsi3 from gcc-4.1.2.

    As shown in arch/sh/lib/udivsi3.S (and -Os.S),

    .global __udivsi3_i4i
    .global __udivsi3_i4
    .global __udivsi3
    __udivsi3_i4i:
    ...

    Three symbols are sharing one code, which is actually udivsi3_i4i.
    But, this results unwanted code with gcc 4.1.

    In gcc, these three are treated as pseudo instructions that have
    their own clobber list apart from the usual calling convention.

    According to sh's machine description. The clobber list is as
    follows:

    - udivsi3_i4i : t,r1,pr,mach,macl
    - udivsi3_i4 : t,r0,r1,r4,r5,pr,dr0,dr2,dr4
    - udivsi3 : t,r4,pr

    The caller of udivsi3 will be left with a broken r1 and mac*.

    gcc-4.1.x and older(at least to 3.4) generate udivsi3.
    ST's gcc-4.1.1 seems to be OK because it has _i4i.

    Signed-off-by: Takashi YOSHII
    Signed-off-by: Paul Mundt

    Takashi YOSHII
     
  • Needed by older compilers.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • This moves in the necessary libgcc bits for SUPERH32 and drops the
    libgcc linking for the regular targets. This in turn allows us to rip
    out quite a few hacks both in sh_ksyms_32 and arch/sh/Makefile.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • First cut at dynamic ftrace support.

    Signed-off-by: Matt Fleming
    Signed-off-by: Paul Mundt

    Matt Fleming
     

13 Nov, 2008

1 commit

  • The __copy_user function can corrupt the stack in the case of a
    non-trivial length of data, and either of the first two move instructions
    cause an exception. This is because the fixup for these two instructions
    is mapped to the no_pop case, but these instructions execute after the
    stack is pushed.

    This change creates an explicit NO_POP exception mapping macro, and uses
    it for the two instructions executed in the trivial case where no stack
    pushes occur.

    More information at ST Linux bugzilla:

    https://bugzilla.stlinux.com/show_bug.cgi?id=4824

    Signed-off-by: Dylan Reid
    Signed-off-by: Stuart Menefy
    Signed-off-by: Paul Mundt

    Stuart MENEFY
     

01 Oct, 2008

1 commit


08 Sep, 2008

1 commit


28 Jul, 2008

1 commit

  • EXPORT_SYMBOL's in lib-y considered harmful:

    ...
    MODPOST 1837 modules
    ERROR: "__raw_readsl" [drivers/ssb/ssb.ko] undefined!
    ERROR: "__raw_writesl" [drivers/ssb/ssb.ko] undefined!
    ERROR: "__raw_writesl" [drivers/net/smc91x.ko] undefined!
    ERROR: "__raw_readsl" [drivers/net/smc91x.ko] undefined!
    ERROR: "__raw_writesl" [drivers/net/3c59x.ko] undefined!
    ERROR: "__raw_readsl" [drivers/net/3c59x.ko] undefined!
    ...
    make[2]: *** [__modpost] Error 1

    Reported-by: Adrian Bunk
    Signed-off-by: Adrian Bunk
    Signed-off-by: Paul Mundt

    Adrian Bunk
     

16 May, 2008

1 commit


19 Apr, 2008

1 commit


28 Jan, 2008

4 commits


07 Nov, 2007

1 commit


13 Jul, 2007

1 commit


06 Jul, 2007

1 commit


09 May, 2007

1 commit


07 May, 2007

1 commit

  • Previously we've been handling udivdi3 references and wrapping
    them in to div64_32() automatically. This doesn't get a lot of
    use, however, and as akpm noted in the recent thread on l-k:

    http://lkml.org/lkml/2007/2/27/241

    we're better off simply ripping it out and going the do_div()
    route if there happen to be any places that need it.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

26 Apr, 2007

1 commit


27 Sep, 2006

1 commit