- 16 Oct, 2012 1 commit
-
-
David Daney authored
At some recent point arch/mips/include/asm/delay.h has started being included into csrc-octeon.c where the __?delay() functions are defined. This causes a compile failure due to conflicting declarations and definitions of the functions. It turns out that the generic definitions in arch/mips/lib/delay.c also conflict. Proposed fix: Declare the functions to take unsigned long parameters just like asm-generic (and x86) does. Update __delay to agree (__ndelay and __udelay need no change). Bonus: Get rid of 'inline' from __delay() definition, as it is globally visible, and the compiler should be making this decision itself (it does in fact inline the function without being told to). Signed-off-by:
David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/4354/ Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 17 Sep, 2009 1 commit
-
-
Ralf Baechle authored
<asm/delay.h> will break if HZ isn't defined. In 2.6.26 and later we're usually lucky ... Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 17 Jun, 2009 1 commit
-
-
Ralf Baechle authored
Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 08 Jun, 2009 1 commit
-
-
Ralf Baechle authored
Outlining fixes the issue were on certain CPUs such as the R10000 family the delay loop would need an extra cycle if it overlaps a cacheline boundary. The rewrite also fixes build errors with GCC 4.4 which was changed in way incompatible with the kernel's inline assembly. Relying on pure C for computation of the delay value removes the need for explicit. The price we pay is a slight slowdown of the computation - to be fixed on another day. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 11 Oct, 2008 1 commit
-
-
Ralf Baechle authored
Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 29 Jan, 2008 2 commits
-
-
Maciej W. Rozycki authored
This complements the generic R4000/R4400 errata workaround code and adds bits for the daddiu problem. In most places it just modifies handwritten assembly code so that the assembler is allowed to use a temporary register as daddiu may now be treated as a macro that expands to a sequence of li and daddu. It is the AT register or, where AT is unavailable or used explicitly for another purpose, an explicitly-named register is selected, using the .set at=<reg> feature added recently to gas. This feature is only used if CONFIG_CPU_DADDI_WORKAROUNDS has been set, so if the workaround remains disabled, the required version of binutils stays unchanged. Similarly, daddiu instructions put in branch delay slots in noreorder fragments are now taken out of them and the assembler is allowed to reorder them itself as possible (which it does making the whole idea of scheduling them into delay slots manually questionable). Also in the very few places where such a simple conversion was not possible, a handcoded longer sequence is implemented. Other than that there are changes to code responsible for building the TLB fault and page clear/copy handlers to avoid daddiu as appropriate. These are only effective if the erratum is verified to be present at the run time. Finally there is a trivial update to __delay(), because it uses daddiu in a branch delay slot. Signed-off-by:
Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Maciej W. Rozycki authored
This is the gereric part of R4000/R4400 errata workarounds. They include compiler and assembler support as well as some source code modifications to address the problems with some combinations of multiply/divide+shift instructions as well as the daddi and daddiu instructions. Changes included are as follows: 1. New Kconfig options to select workarounds by platforms as necessary. 2. Arch top-level Makefile to pass necessary options to the compiler; also incompatible configurations are detected (-mno-sym32 unsupported as horribly intrusive for little gain). 3. Bug detection updated and shuffled -- the multiply/divide+shift problem is lethal enough that if not worked around it makes the kernel crash in time_init() because of a division by zero; the daddiu erratum might also trigger early potentially, though I have not observed it. On the other hand the daddi detection code requires the exception subsystem to have been initialised (and is there mainly for information). 4. r4k_daddiu_bug() added so that the existence of the erratum can be queried by code at the run time as necessary; useful for generated code like TLB fault and copy/clear page handlers. 5. __udelay() updated as it uses multiplication in inline assembly. Note that -mdaddi requires modified toolchain (which has been maintained by myself and available from my site for ~4years now -- versions covered are GCC 2.95.4 - 4.1.2 and binutils from 2.13 onwards). The -mfix-r4000 and -mfix-r4400 have been standard for a while though. Signed-off-by:
Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 11 Oct, 2007 1 commit
-
-
Ralf Baechle authored
Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 24 Mar, 2007 1 commit
-
-
Deepak Saxena authored
Signed-off-by:
Manish Lachwani <mlachwani@mvista.com> Signed-off-by:
Deepak Saxena <dsaxena@mvista.com> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 05 Jun, 2006 1 commit
-
-
Ralf Baechle authored
Increase alignment of BogoMIPS loop to 8 bytes. Having the delay loop overlap cache line boundaries may cause instable delays. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 26 Apr, 2006 1 commit
-
-
David Woodhouse authored
Signed-off-by:
David Woodhouse <dwmw2@infradead.org>
-
- 10 Jan, 2006 1 commit
-
-
Atsushi Nemoto authored
mdelay(1) (i.e. udelay(1000)) does not work correctly due to overflow. 1000 * 0x004189374BC6A7f0 = 0x10000000000000180 (>= 2**64) 0x004189374BC6A7ef (0x004189374BC6A7f0 - 1) is OK and it is exactly same as catchall case (0x8000000000000000UL / (500000 / HZ)). Signed-off-by:
Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 07 Nov, 2005 1 commit
-
-
Atsushi Nemoto authored
If HZ was 1000, mdelay(2) cause overflow on multiplication in __udelay. We should define MAX_UDELAY_MS properly to prevent this. Signed-off-by:
Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 29 Oct, 2005 2 commits
-
-
Ralf Baechle authored
Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Ralf Baechle authored
Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- 05 Sep, 2005 1 commit
-
-
Ralf Baechle authored
Start cleaning 32-bit vs. 64-bit configuration. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 16 Apr, 2005 1 commit
-
-
Linus Torvalds authored
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
-