[SCSI] mpt2sas: Fix for system hang when discovery in progress
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / sparc / lib / hweight.S
blob95414e0a6808d596f85c4809c519914499c28d1d
1 #include <linux/linkage.h>
3         .text
4         .align  32
5 ENTRY(__arch_hweight8)
6         ba,pt   %xcc, __sw_hweight8
7          nop
8         nop
9 ENDPROC(__arch_hweight8)
10         .section        .popc_3insn_patch, "ax"
11         .word           __arch_hweight8
12         sllx            %o0, 64-8, %g1
13         retl
14          popc           %g1, %o0
15         .previous
17 ENTRY(__arch_hweight16)
18         ba,pt   %xcc, __sw_hweight16
19          nop
20         nop
21 ENDPROC(__arch_hweight16)
22         .section        .popc_3insn_patch, "ax"
23         .word           __arch_hweight16
24         sllx            %o0, 64-16, %g1
25         retl
26          popc           %g1, %o0
27         .previous
29 ENTRY(__arch_hweight32)
30         ba,pt   %xcc, __sw_hweight32
31          nop
32         nop
33 ENDPROC(__arch_hweight32)
34         .section        .popc_3insn_patch, "ax"
35         .word           __arch_hweight32
36         sllx            %o0, 64-32, %g1
37         retl
38          popc           %g1, %o0
39         .previous
41 ENTRY(__arch_hweight64)
42         ba,pt   %xcc, __sw_hweight64
43          nop
44         nop
45 ENDPROC(__arch_hweight64)
46         .section        .popc_3insn_patch, "ax"
47         .word           __arch_hweight64
48         retl
49          popc           %o0, %o0
50         nop
51         .previous