hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/lib/raid6/Makefile
....@@ -10,11 +10,7 @@
1010 raid6_pq-$(CONFIG_KERNEL_MODE_NEON) += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o
1111 raid6_pq-$(CONFIG_S390) += s390vx8.o recov_s390xc.o
1212
13
-hostprogs-y += mktables
14
-
15
-quiet_cmd_unroll = UNROLL $@
16
- cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \
17
- < $< > $@ || ( rm -f $@ && exit 1 )
13
+hostprogs += mktables
1814
1915 ifeq ($(CONFIG_ALTIVEC),y)
2016 altivec_flags := -maltivec $(call cc-option,-mabi=altivec)
....@@ -26,7 +22,6 @@
2622 CFLAGS_REMOVE_altivec1.o += -msoft-float
2723 CFLAGS_REMOVE_altivec2.o += -msoft-float
2824 CFLAGS_REMOVE_altivec4.o += -msoft-float
29
-CFLAGS_REMOVE_altivec8.o += -msoft-float
3025 CFLAGS_REMOVE_altivec8.o += -msoft-float
3126 CFLAGS_REMOVE_vpermxor1.o += -msoft-float
3227 CFLAGS_REMOVE_vpermxor2.o += -msoft-float
....@@ -52,115 +47,43 @@
5247 endif
5348 endif
5449
55
-targets += int1.c
56
-$(obj)/int1.c: UNROLL := 1
57
-$(obj)/int1.c: $(src)/int.uc $(src)/unroll.awk FORCE
58
- $(call if_changed,unroll)
50
+quiet_cmd_unroll = UNROLL $@
51
+ cmd_unroll = $(AWK) -v N=$* -f $(srctree)/$(src)/unroll.awk < $< > $@
5952
60
-targets += int2.c
61
-$(obj)/int2.c: UNROLL := 2
62
-$(obj)/int2.c: $(src)/int.uc $(src)/unroll.awk FORCE
63
- $(call if_changed,unroll)
64
-
65
-targets += int4.c
66
-$(obj)/int4.c: UNROLL := 4
67
-$(obj)/int4.c: $(src)/int.uc $(src)/unroll.awk FORCE
68
- $(call if_changed,unroll)
69
-
70
-targets += int8.c
71
-$(obj)/int8.c: UNROLL := 8
72
-$(obj)/int8.c: $(src)/int.uc $(src)/unroll.awk FORCE
73
- $(call if_changed,unroll)
74
-
75
-targets += int16.c
76
-$(obj)/int16.c: UNROLL := 16
77
-$(obj)/int16.c: $(src)/int.uc $(src)/unroll.awk FORCE
78
- $(call if_changed,unroll)
79
-
80
-targets += int32.c
81
-$(obj)/int32.c: UNROLL := 32
82
-$(obj)/int32.c: $(src)/int.uc $(src)/unroll.awk FORCE
53
+targets += int1.c int2.c int4.c int8.c int16.c int32.c
54
+$(obj)/int%.c: $(src)/int.uc $(src)/unroll.awk FORCE
8355 $(call if_changed,unroll)
8456
8557 CFLAGS_altivec1.o += $(altivec_flags)
86
-targets += altivec1.c
87
-$(obj)/altivec1.c: UNROLL := 1
88
-$(obj)/altivec1.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
89
- $(call if_changed,unroll)
90
-
9158 CFLAGS_altivec2.o += $(altivec_flags)
92
-targets += altivec2.c
93
-$(obj)/altivec2.c: UNROLL := 2
94
-$(obj)/altivec2.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
95
- $(call if_changed,unroll)
96
-
9759 CFLAGS_altivec4.o += $(altivec_flags)
98
-targets += altivec4.c
99
-$(obj)/altivec4.c: UNROLL := 4
100
-$(obj)/altivec4.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
101
- $(call if_changed,unroll)
102
-
10360 CFLAGS_altivec8.o += $(altivec_flags)
104
-targets += altivec8.c
105
-$(obj)/altivec8.c: UNROLL := 8
106
-$(obj)/altivec8.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
61
+targets += altivec1.c altivec2.c altivec4.c altivec8.c
62
+$(obj)/altivec%.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
10763 $(call if_changed,unroll)
10864
10965 CFLAGS_vpermxor1.o += $(altivec_flags)
110
-targets += vpermxor1.c
111
-$(obj)/vpermxor1.c: UNROLL := 1
112
-$(obj)/vpermxor1.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
113
- $(call if_changed,unroll)
114
-
11566 CFLAGS_vpermxor2.o += $(altivec_flags)
116
-targets += vpermxor2.c
117
-$(obj)/vpermxor2.c: UNROLL := 2
118
-$(obj)/vpermxor2.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
119
- $(call if_changed,unroll)
120
-
12167 CFLAGS_vpermxor4.o += $(altivec_flags)
122
-targets += vpermxor4.c
123
-$(obj)/vpermxor4.c: UNROLL := 4
124
-$(obj)/vpermxor4.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
125
- $(call if_changed,unroll)
126
-
12768 CFLAGS_vpermxor8.o += $(altivec_flags)
128
-targets += vpermxor8.c
129
-$(obj)/vpermxor8.c: UNROLL := 8
130
-$(obj)/vpermxor8.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
69
+targets += vpermxor1.c vpermxor2.c vpermxor4.c vpermxor8.c
70
+$(obj)/vpermxor%.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
13171 $(call if_changed,unroll)
13272
13373 CFLAGS_neon1.o += $(NEON_FLAGS)
134
-targets += neon1.c
135
-$(obj)/neon1.c: UNROLL := 1
136
-$(obj)/neon1.c: $(src)/neon.uc $(src)/unroll.awk FORCE
137
- $(call if_changed,unroll)
138
-
13974 CFLAGS_neon2.o += $(NEON_FLAGS)
140
-targets += neon2.c
141
-$(obj)/neon2.c: UNROLL := 2
142
-$(obj)/neon2.c: $(src)/neon.uc $(src)/unroll.awk FORCE
143
- $(call if_changed,unroll)
144
-
14575 CFLAGS_neon4.o += $(NEON_FLAGS)
146
-targets += neon4.c
147
-$(obj)/neon4.c: UNROLL := 4
148
-$(obj)/neon4.c: $(src)/neon.uc $(src)/unroll.awk FORCE
149
- $(call if_changed,unroll)
150
-
15176 CFLAGS_neon8.o += $(NEON_FLAGS)
152
-targets += neon8.c
153
-$(obj)/neon8.c: UNROLL := 8
154
-$(obj)/neon8.c: $(src)/neon.uc $(src)/unroll.awk FORCE
77
+targets += neon1.c neon2.c neon4.c neon8.c
78
+$(obj)/neon%.c: $(src)/neon.uc $(src)/unroll.awk FORCE
15579 $(call if_changed,unroll)
15680
15781 targets += s390vx8.c
158
-$(obj)/s390vx8.c: UNROLL := 8
159
-$(obj)/s390vx8.c: $(src)/s390vx.uc $(src)/unroll.awk FORCE
82
+$(obj)/s390vx%.c: $(src)/s390vx.uc $(src)/unroll.awk FORCE
16083 $(call if_changed,unroll)
16184
16285 quiet_cmd_mktable = TABLE $@
163
- cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 )
86
+ cmd_mktable = $(obj)/mktables > $@
16487
16588 targets += tables.c
16689 $(obj)/tables.c: $(obj)/mktables FORCE