GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / sparc / include / asm / xor_64.h
blob9b56d6974b4c6bbe2b0b28c9c2396ab8c1ddfb28
1 /*
2 * include/asm/xor.h
4 * High speed xor_block operation for RAID4/5 utilizing the
5 * UltraSparc Visual Instruction Set and Niagara block-init
6 * twin-load instructions.
8 * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz)
9 * Copyright (C) 2006 David S. Miller <davem@davemloft.net>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
14 * any later version.
16 * You should have received a copy of the GNU General Public License
17 * (for example /usr/src/linux/COPYING); if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include <asm/spitfire.h>
23 extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
24 extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
25 unsigned long *);
26 extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
27 unsigned long *, unsigned long *);
28 extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
29 unsigned long *, unsigned long *, unsigned long *);
32 static struct xor_block_template xor_block_VIS = {
33 .name = "VIS",
34 .do_2 = xor_vis_2,
35 .do_3 = xor_vis_3,
36 .do_4 = xor_vis_4,
37 .do_5 = xor_vis_5,
40 extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
41 extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
42 unsigned long *);
43 extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
44 unsigned long *, unsigned long *);
45 extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
46 unsigned long *, unsigned long *, unsigned long *);
48 static struct xor_block_template xor_block_niagara = {
49 .name = "Niagara",
50 .do_2 = xor_niagara_2,
51 .do_3 = xor_niagara_3,
52 .do_4 = xor_niagara_4,
53 .do_5 = xor_niagara_5,
56 #undef XOR_TRY_TEMPLATES
57 #define XOR_TRY_TEMPLATES \
58 do { \
59 xor_speed(&xor_block_VIS); \
60 xor_speed(&xor_block_niagara); \
61 } while (0)
63 /* For VIS for everything except Niagara. */
64 #define XOR_SELECT_TEMPLATE(FASTEST) \
65 ((tlb_type == hypervisor && \
66 (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 || \
67 sun4v_chip_type == SUN4V_CHIP_NIAGARA2)) ? \
68 &xor_block_niagara : \
69 &xor_block_VIS)