Skip to content

Commit 606c2cf

Browse files
committed
Merge tag 'powerpc-6.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Madhavan Srinivasan: - Merge two CONFIG_POWERPC64_CPU entries in Kconfig.cputype - Replace extra-y to always-y in Makefile - Cleanup to use dev_fwnode helper - Fix misleading comment in kvmppc_prepare_to_enter() - misc cleanup and fixes Thanks to Amit Machhiwal, Andrew Donnellan, Christophe Leroy, Gautam Menghani, Jiri Slaby (SUSE), Masahiro Yamada, Shrikanth Hegde, Stephen Rothwell, Venkat Rao Bagalkote, and Xichao Zhao * tag 'powerpc-6.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/boot/install.sh: Fix shellcheck warnings powerpc/prom_init: Fix shellcheck warnings powerpc/kvm: Fix ifdef to remove build warning powerpc: unify two CONFIG_POWERPC64_CPU entries in the same choice block powerpc: use always-y instead of extra-y in Makefiles powerpc/64: Drop unnecessary 'rc' variable powerpc: Use dev_fwnode() KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()
2 parents ebf2bfe + 8763d22 commit 606c2cf

File tree

10 files changed

+34
-42
lines changed

10 files changed

+34
-42
lines changed

arch/powerpc/boot/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ $(obj)/wrapper.a: $(obj-wlib) FORCE
243243
hostprogs := addnote hack-coff mktree
244244

245245
targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) zImage.lds
246-
extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
246+
always-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
247247
$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
248248

249249
dtstree := $(src)/dts
250250

251251
wrapper := $(src)/wrapper
252-
wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
252+
wrapperbits := $(always-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
253253
$(wrapper) FORCE
254254

255255
#############
@@ -456,7 +456,7 @@ WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
456456
WRAPPER_BINDIR := /usr/sbin
457457
INSTALL := install
458458

459-
extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
459+
extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(always-y))
460460
hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs))
461461
wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
462462
dts-installed := $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts))

arch/powerpc/boot/install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
set -e
2020

2121
# this should work for both the pSeries zImage and the iSeries vmlinux.sm
22-
image_name=`basename $2`
22+
image_name=$(basename "$2")
2323

2424

2525
echo "Warning: '${INSTALLKERNEL}' command not available... Copying" \
2626
"directly to $4/$image_name-$1" >&2
2727

28-
if [ -f $4/$image_name-$1 ]; then
29-
mv $4/$image_name-$1 $4/$image_name-$1.old
28+
if [ -f "$4"/"$image_name"-"$1" ]; then
29+
mv "$4"/"$image_name"-"$1" "$4"/"$image_name"-"$1".old
3030
fi
3131

32-
if [ -f $4/System.map-$1 ]; then
33-
mv $4/System.map-$1 $4/System-$1.old
32+
if [ -f "$4"/System.map-"$1" ]; then
33+
mv "$4"/System.map-"$1" "$4"/System-"$1".old
3434
fi
3535

36-
cat $2 > $4/$image_name-$1
37-
cp $3 $4/System.map-$1
36+
cat "$2" > "$4"/"$image_name"-"$1"
37+
cp "$3" "$4"/System.map-"$1"

arch/powerpc/kernel/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ obj-$(CONFIG_ALTIVEC) += vector.o
199199

200200
obj-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init.o
201201
obj64-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_entry_64.o
202-
extra-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init_check
202+
ifdef KBUILD_BUILTIN
203+
always-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init_check
204+
endif
203205

204206
obj-$(CONFIG_PPC64) += $(obj64-y)
205207
obj-$(CONFIG_PPC32) += $(obj32-y)

arch/powerpc/kernel/kvm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,28 +632,28 @@ static void __init kvm_check_ins(u32 *inst, u32 features)
632632
#endif
633633
}
634634

635-
switch (inst_no_rt & ~KVM_MASK_RB) {
636635
#ifdef CONFIG_PPC_BOOK3S_32
636+
switch (inst_no_rt & ~KVM_MASK_RB) {
637637
case KVM_INST_MTSRIN:
638638
if (features & KVM_MAGIC_FEAT_SR) {
639639
u32 inst_rb = _inst & KVM_MASK_RB;
640640
kvm_patch_ins_mtsrin(inst, inst_rt, inst_rb);
641641
}
642642
break;
643-
#endif
644643
}
644+
#endif
645645

646-
switch (_inst) {
647646
#ifdef CONFIG_BOOKE
647+
switch (_inst) {
648648
case KVM_INST_WRTEEI_0:
649649
kvm_patch_ins_wrteei_0(inst);
650650
break;
651651

652652
case KVM_INST_WRTEEI_1:
653653
kvm_patch_ins_wrtee(inst, 0, 1);
654654
break;
655-
#endif
656655
}
656+
#endif
657657
}
658658

659659
extern u32 kvm_template_start[];

arch/powerpc/kernel/prom_init_check.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
has_renamed_memintrinsics()
1717
{
18-
grep -q "^CONFIG_KASAN=y$" ${KCONFIG_CONFIG} && \
19-
! grep -q "^CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX=y" ${KCONFIG_CONFIG}
18+
grep -q "^CONFIG_KASAN=y$" "${KCONFIG_CONFIG}" && \
19+
! grep -q "^CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX=y" "${KCONFIG_CONFIG}"
2020
}
2121

2222
if has_renamed_memintrinsics
@@ -42,15 +42,15 @@ check_section()
4242
{
4343
file=$1
4444
section=$2
45-
size=$(objdump -h -j $section $file 2>/dev/null | awk "\$2 == \"$section\" {print \$3}")
45+
size=$(objdump -h -j "$section" "$file" 2>/dev/null | awk "\$2 == \"$section\" {print \$3}")
4646
size=${size:-0}
47-
if [ $size -ne 0 ]; then
47+
if [ "$size" -ne 0 ]; then
4848
ERROR=1
4949
echo "Error: Section $section not empty in prom_init.c" >&2
5050
fi
5151
}
5252

53-
for UNDEF in $($NM -u $OBJ | awk '{print $2}')
53+
for UNDEF in $($NM -u "$OBJ" | awk '{print $2}')
5454
do
5555
# On 64-bit nm gives us the function descriptors, which have
5656
# a leading . on the name, so strip it off here.
@@ -87,8 +87,8 @@ do
8787
fi
8888
done
8989

90-
check_section $OBJ .data
91-
check_section $OBJ .bss
92-
check_section $OBJ .init.data
90+
check_section "$OBJ" .data
91+
check_section "$OBJ" .bss
92+
check_section "$OBJ" .init.data
9393

9494
exit $ERROR

arch/powerpc/kernel/setup_64.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,7 @@ void __init check_smt_enabled(void)
141141
smt_enabled_at_boot = 0;
142142
else {
143143
int smt;
144-
int rc;
145-
146-
rc = kstrtoint(smt_enabled_cmdline, 10, &smt);
147-
if (!rc)
144+
if (!kstrtoint(smt_enabled_cmdline, 10, &smt))
148145
smt_enabled_at_boot =
149146
min(threads_per_core, smt);
150147
}

arch/powerpc/kvm/powerpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
6969

7070
/*
7171
* Common checks before entering the guest world. Call with interrupts
72-
* disabled.
72+
* enabled.
7373
*
7474
* returns:
7575
*

arch/powerpc/platforms/8xx/cpm1-ic.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ static int cpm_pic_probe(struct platform_device *pdev)
110110

111111
out_be32(&data->reg->cpic_cimr, 0);
112112

113-
data->host = irq_domain_create_linear(of_fwnode_handle(dev->of_node),
114-
64, &cpm_pic_host_ops, data);
113+
data->host = irq_domain_create_linear(dev_fwnode(dev), 64, &cpm_pic_host_ops, data);
115114
if (!data->host)
116115
return -ENODEV;
117116

arch/powerpc/platforms/Kconfig.cputype

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,11 @@ choice
122122
If unsure, select Generic.
123123

124124
config POWERPC64_CPU
125-
bool "Generic (POWER5 and PowerPC 970 and above)"
126-
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
127-
select PPC_64S_HASH_MMU
128-
129-
config POWERPC64_CPU
130-
bool "Generic (POWER8 and above)"
131-
depends on PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
132-
select ARCH_HAS_FAST_MULTIPLIER
125+
bool "Generic 64 bits powerpc"
126+
depends on PPC_BOOK3S_64
127+
select ARCH_HAS_FAST_MULTIPLIER if CPU_LITTLE_ENDIAN
133128
select PPC_64S_HASH_MMU
134-
select PPC_HAS_LBARX_LHARX
129+
select PPC_HAS_LBARX_LHARX if CPU_LITTLE_ENDIAN
135130

136131
config POWERPC_CPU
137132
bool "Generic 32 bits powerpc"

arch/powerpc/sysdev/fsl_msi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,8 @@ static int fsl_of_msi_probe(struct platform_device *dev)
412412
}
413413
platform_set_drvdata(dev, msi);
414414

415-
msi->irqhost = irq_domain_create_linear(of_fwnode_handle(dev->dev.of_node),
416-
NR_MSI_IRQS_MAX, &fsl_msi_host_ops, msi);
417-
415+
msi->irqhost = irq_domain_create_linear(dev_fwnode(&dev->dev), NR_MSI_IRQS_MAX,
416+
&fsl_msi_host_ops, msi);
418417
if (msi->irqhost == NULL) {
419418
dev_err(&dev->dev, "No memory for MSI irqhost\n");
420419
err = -ENOMEM;

0 commit comments

Comments
 (0)