Skip to content

Commit 4a710a0

Browse files
committed
regulator: mt6358: Remove bogus regulators and
Merge series from Chen-Yu Tsai <wenst@chromium.org>: Hi, This is v3 of the remainder of the MT6358 regulator driver cleanup and improvement series. v1 can be found here [1]; v2 is here [2]. Changes since v2: - Merged patches dropped - Fixed up pickable linear ranges' selector values - Collected tags - Patch adding missing regulator definitions squashed into patch using the definitions; recommended by Krzysztof on my MT6366 series. - Remaining dts patch split out to be sent separately Changes since v1: - Merged patches dropped - Added patch to move VCN33 regulator status sync after ID check - Added patch to fix VCN33 sync fail error message - Added patch to add missing register definitions Various discrepancies were found while preparing to upstream MT8186 device trees, which utilize the MT6366 PMIC, that is also covered by this driver. Patches 1~3 should go through the regulator tree, and patch 4 through the soc/mediatek tree. ** Note: patch 2 needs an ack from Lee for the mfd header change. This v3 series can be seen as two parts. v1 had three parts, but one part was fully merged, and then v2 gained another cleanup. v3 drops the "fixing bogus regulators" part: driver changes are fully merged and device tree change will be sent separately. Part 1 - Robust chip ID checking (patch 1) Angelo suggested making the driver fail to probe if an unexpected chip ID was found. Patch 1 implements this. Part 2 - Output voltage fine tuning support (patches 2, 3) Many of the LDOs on these PMIC support an extra level of output voltage fine tuning. Most default to no offset, but a couple have a non-zero offset by default. Previously this was unaccounted for in the driver and device tree constraints. On the outputs with non-zero offset, this ends up becoming a discrepancy between the device tree and actual hardware. These two patches adds support for this second level of tuning, modeled as bunch of linear ranges. While it's unlikely we need this level of control, it's nice to be able to read back the accurate hardware settings. Please have a look. Thanks ChenYu [1] https://lore.kernel.org/linux-arm-kernel/20230609083009.2822259-1-wenst@chromium.org/ [2] https://lore.kernel.org/linux-mediatek/20230721082903.2038975-1-wenst@chromium.org/ Chen-Yu Tsai (3): regulator: mt6358: Fail probe on unknown chip ID regulator: mt6358: Add output voltage fine tuning to fixed regulators regulator: mt6358: Add output voltage fine tuning to variable LDOs drivers/regulator/mt6358-regulator.c | 304 ++++++++++++--------------- include/linux/mfd/mt6358/registers.h | 6 + 2 files changed, 144 insertions(+), 166 deletions(-) -- 2.42.0.283.g2d96d420d3-goog
2 parents 66af368 + 017c665 commit 4a710a0

File tree

746 files changed

+6266
-3653
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

746 files changed

+6266
-3653
lines changed

Documentation/arch/arm64/cpu-feature-registers.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ infrastructure:
175175
+------------------------------+---------+---------+
176176
| Name | bits | visible |
177177
+------------------------------+---------+---------+
178+
| SME | [27-24] | y |
179+
+------------------------------+---------+---------+
178180
| MTE | [11-8] | y |
179181
+------------------------------+---------+---------+
180182
| SSBS | [7-4] | y |
@@ -288,8 +290,18 @@ infrastructure:
288290
+------------------------------+---------+---------+
289291
| Name | bits | visible |
290292
+------------------------------+---------+---------+
293+
| CSSC | [55-52] | y |
294+
+------------------------------+---------+---------+
295+
| RPRFM | [51-48] | y |
296+
+------------------------------+---------+---------+
297+
| BC | [23-20] | y |
298+
+------------------------------+---------+---------+
291299
| MOPS | [19-16] | y |
292300
+------------------------------+---------+---------+
301+
| APA3 | [15-12] | y |
302+
+------------------------------+---------+---------+
303+
| GPA3 | [11-8] | y |
304+
+------------------------------+---------+---------+
293305
| RPRES | [7-4] | y |
294306
+------------------------------+---------+---------+
295307
| WFXT | [3-0] | y |

Documentation/arch/arm64/elf_hwcaps.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ HWCAP2_SMEF16F16
305305
HWCAP2_MOPS
306306
Functionality implied by ID_AA64ISAR2_EL1.MOPS == 0b0001.
307307

308+
HWCAP2_HBC
309+
Functionality implied by ID_AA64ISAR2_EL1.BC == 0b0001.
310+
308311
4. Unused AT_HWCAP bits
309312
-----------------------
310313

Documentation/arch/loongarch/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,9 @@ Documentation of LoongArch ISA:
381381

382382
Documentation of LoongArch ELF psABI:
383383

384-
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.00-CN.pdf (in Chinese)
384+
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.01-CN.pdf (in Chinese)
385385

386-
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.00-EN.pdf (in English)
386+
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.01-EN.pdf (in English)
387387

388388
Linux kernel repository of Loongson and LoongArch:
389389

Documentation/filesystems/btrfs.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ For more information please refer to the documentation site or wiki
3737

3838
https://btrfs.readthedocs.io
3939

40-
https://btrfs.wiki.kernel.org
4140

4241
that maintains information about administration tasks, frequently asked
4342
questions, use cases, mount options, comprehensible changelogs, features,

Documentation/networking/ax25.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ AX.25
77
To use the amateur radio protocols within Linux you will need to get a
88
suitable copy of the AX.25 Utilities. More detailed information about
99
AX.25, NET/ROM and ROSE, associated programs and utilities can be
10-
found on http://www.linux-ax25.org.
10+
found on https://linux-ax25.in-berlin.de.
1111

12-
There is an active mailing list for discussing Linux amateur radio matters
12+
There is a mailing list for discussing Linux amateur radio matters
1313
called linux-hams@vger.kernel.org. To subscribe to it, send a message to
1414
majordomo@vger.kernel.org with the words "subscribe linux-hams" in the body
1515
of the message, the subject field is ignored. You don't need to be

Documentation/process/embargoed-hardware-issues.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ an involved disclosed party. The current ambassadors list:
251251
IBM Z Christian Borntraeger <borntraeger@de.ibm.com>
252252
Intel Tony Luck <tony.luck@intel.com>
253253
Qualcomm Trilok Soni <tsoni@codeaurora.org>
254+
RISC-V Palmer Dabbelt <palmer@dabbelt.com>
254255
Samsung Javier González <javier.gonz@samsung.com>
255256

256257
Microsoft James Morris <jamorris@linux.microsoft.com>

Documentation/sound/designs/midi-2.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ topology based on those information. When the device is older and
7474
doesn't respond to the new UMP inquiries, the driver falls back and
7575
builds the topology based on Group Terminal Block (GTB) information
7676
from the USB descriptor. Some device might be screwed up by the
77-
unexpected UMP command; in such a case, pass `midi2_probe=0` option to
78-
snd-usb-audio driver for skipping the UMP v1.1 inquiries.
77+
unexpected UMP command; in such a case, pass `midi2_ump_probe=0`
78+
option to snd-usb-audio driver for skipping the UMP v1.1 inquiries.
7979

8080
When the MIDI 2.0 device is probed, the kernel creates a rawmidi
8181
device for each UMP Endpoint of the device. Its device name is

Documentation/translations/zh_CN/arch/loongarch/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,9 @@ LoongArch指令集架构的文档:
344344

345345
LoongArch的ELF psABI文档:
346346

347-
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.00-CN.pdf (中文版)
347+
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.01-CN.pdf (中文版)
348348

349-
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.00-EN.pdf (英文版)
349+
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.01-EN.pdf (英文版)
350350

351351
Loongson与LoongArch的Linux内核源码仓库:
352352

MAINTAINERS

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ F: arch/arm*/include/asm/perf_event.h
16621662
F: arch/arm*/kernel/hw_breakpoint.c
16631663
F: arch/arm*/kernel/perf_*
16641664
F: drivers/perf/
1665-
F: include/linux/perf/arm_pmu.h
1665+
F: include/linux/perf/arm_pmu*.h
16661666

16671667
ARM PORT
16681668
M: Russell King <linux@armlinux.org.uk>
@@ -1855,7 +1855,7 @@ F: Documentation/devicetree/bindings/phy/amlogic*
18551855
F: arch/arm/boot/dts/amlogic/
18561856
F: arch/arm/mach-meson/
18571857
F: arch/arm64/boot/dts/amlogic/
1858-
F: drivers/genpd/amlogic/
1858+
F: drivers/pmdomain/amlogic/
18591859
F: drivers/mmc/host/meson*
18601860
F: drivers/phy/amlogic/
18611861
F: drivers/pinctrl/meson/
@@ -1918,7 +1918,7 @@ F: drivers/bluetooth/hci_bcm4377.c
19181918
F: drivers/clk/clk-apple-nco.c
19191919
F: drivers/cpufreq/apple-soc-cpufreq.c
19201920
F: drivers/dma/apple-admac.c
1921-
F: drivers/genpd/apple/
1921+
F: drivers/pmdomain/apple/
19221922
F: drivers/i2c/busses/i2c-pasemi-core.c
19231923
F: drivers/i2c/busses/i2c-pasemi-platform.c
19241924
F: drivers/iommu/apple-dart.c
@@ -2435,7 +2435,7 @@ F: arch/arm/mach-ux500/
24352435
F: drivers/clk/clk-nomadik.c
24362436
F: drivers/clocksource/clksrc-dbx500-prcmu.c
24372437
F: drivers/dma/ste_dma40*
2438-
F: drivers/genpd/st/ste-ux500-pm-domain.c
2438+
F: drivers/pmdomain/st/ste-ux500-pm-domain.c
24392439
F: drivers/hwspinlock/u8500_hsem.c
24402440
F: drivers/i2c/busses/i2c-nomadik.c
24412441
F: drivers/iio/adc/ab8500-gpadc.c
@@ -2598,7 +2598,7 @@ F: arch/arm/include/debug/renesas-scif.S
25982598
F: arch/arm/mach-shmobile/
25992599
F: arch/arm64/boot/dts/renesas/
26002600
F: arch/riscv/boot/dts/renesas/
2601-
F: drivers/genpd/renesas/
2601+
F: drivers/pmdomain/renesas/
26022602
F: drivers/soc/renesas/
26032603
F: include/linux/soc/renesas/
26042604
K: \brenesas,
@@ -3344,7 +3344,7 @@ AX.25 NETWORK LAYER
33443344
M: Ralf Baechle <ralf@linux-mips.org>
33453345
L: linux-hams@vger.kernel.org
33463346
S: Maintained
3347-
W: http://www.linux-ax25.org/
3347+
W: https://linux-ax25.in-berlin.de
33483348
F: include/net/ax25.h
33493349
F: include/uapi/linux/ax25.h
33503350
F: net/ax25/
@@ -4026,7 +4026,7 @@ F: arch/mips/kernel/*bmips*
40264026
F: drivers/irqchip/irq-bcm63*
40274027
F: drivers/irqchip/irq-bcm7*
40284028
F: drivers/irqchip/irq-brcmstb*
4029-
F: drivers/genpd/bcm/bcm63xx-power.c
4029+
F: drivers/pmdomain/bcm/bcm63xx-power.c
40304030
F: include/linux/bcm963xx_nvram.h
40314031
F: include/linux/bcm963xx_tag.h
40324032

@@ -4248,7 +4248,7 @@ R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
42484248
L: linux-pm@vger.kernel.org
42494249
S: Maintained
42504250
T: git https://github.com/broadcom/stblinux.git
4251-
F: drivers/genpd/bcm/bcm-pmb.c
4251+
F: drivers/pmdomain/bcm/bcm-pmb.c
42524252
F: include/dt-bindings/soc/bcm-pmb.h
42534253

42544254
BROADCOM SPECIFIC AMBA DRIVER (BCMA)
@@ -4378,7 +4378,6 @@ M: David Sterba <dsterba@suse.com>
43784378
L: linux-btrfs@vger.kernel.org
43794379
S: Maintained
43804380
W: https://btrfs.readthedocs.io
4381-
W: https://btrfs.wiki.kernel.org/
43824381
Q: https://patchwork.kernel.org/project/linux-btrfs/list/
43834382
C: irc://irc.libera.chat/btrfs
43844383
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git
@@ -6646,7 +6645,6 @@ F: Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml
66466645
F: drivers/gpu/drm/panel/panel-novatek-nt36672a.c
66476646

66486647
DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS
6649-
M: Ben Skeggs <bskeggs@redhat.com>
66506648
M: Karol Herbst <kherbst@redhat.com>
66516649
M: Lyude Paul <lyude@redhat.com>
66526650
L: dri-devel@lists.freedesktop.org
@@ -8729,7 +8727,7 @@ M: Ulf Hansson <ulf.hansson@linaro.org>
87298727
L: linux-pm@vger.kernel.org
87308728
S: Supported
87318729
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git
8732-
F: drivers/genpd/
8730+
F: drivers/pmdomain/
87338731

87348732
GENERIC RESISTIVE TOUCHSCREEN ADC DRIVER
87358733
M: Eugen Hristev <eugen.hristev@microchip.com>
@@ -8875,7 +8873,7 @@ F: drivers/gpio/gpio-mockup.c
88758873
F: tools/testing/selftests/gpio/
88768874

88778875
GPIO REGMAP
8878-
R: Michael Walle <michael@walle.cc>
8876+
M: Michael Walle <michael@walle.cc>
88798877
S: Maintained
88808878
F: drivers/gpio/gpio-regmap.c
88818879
F: include/linux/gpio/regmap.h
@@ -13617,6 +13615,7 @@ F: drivers/net/ethernet/mellanox/mlxfw/
1361713615

1361813616
MELLANOX HARDWARE PLATFORM SUPPORT
1361913617
M: Hans de Goede <hdegoede@redhat.com>
13618+
M: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1362013619
M: Mark Gross <markgross@kernel.org>
1362113620
M: Vadim Pasternak <vadimp@nvidia.com>
1362213621
L: platform-driver-x86@vger.kernel.org
@@ -14211,6 +14210,7 @@ F: drivers/platform/surface/surface_gpe.c
1421114210

1421214211
MICROSOFT SURFACE HARDWARE PLATFORM SUPPORT
1421314212
M: Hans de Goede <hdegoede@redhat.com>
14213+
M: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1421414214
M: Mark Gross <markgross@kernel.org>
1421514215
M: Maximilian Luz <luzmaximilian@gmail.com>
1421614216
L: platform-driver-x86@vger.kernel.org
@@ -14757,7 +14757,7 @@ NETROM NETWORK LAYER
1475714757
M: Ralf Baechle <ralf@linux-mips.org>
1475814758
L: linux-hams@vger.kernel.org
1475914759
S: Maintained
14760-
W: http://www.linux-ax25.org/
14760+
W: https://linux-ax25.in-berlin.de
1476114761
F: include/net/netrom.h
1476214762
F: include/uapi/linux/netrom.h
1476314763
F: net/netrom/
@@ -17680,7 +17680,7 @@ L: linux-pm@vger.kernel.org
1768017680
L: linux-arm-msm@vger.kernel.org
1768117681
S: Maintained
1768217682
F: Documentation/devicetree/bindings/power/avs/qcom,cpr.yaml
17683-
F: drivers/genpd/qcom/cpr.c
17683+
F: drivers/pmdomain/qcom/cpr.c
1768417684

1768517685
QUALCOMM CPUFREQ DRIVER MSM8996/APQ8096
1768617686
M: Ilia Lin <ilia.lin@kernel.org>
@@ -18608,7 +18608,7 @@ ROSE NETWORK LAYER
1860818608
M: Ralf Baechle <ralf@linux-mips.org>
1860918609
L: linux-hams@vger.kernel.org
1861018610
S: Maintained
18611-
W: http://www.linux-ax25.org/
18611+
W: https://linux-ax25.in-berlin.de
1861218612
F: include/net/rose.h
1861318613
F: include/uapi/linux/rose.h
1861418614
F: net/rose/
@@ -20514,7 +20514,7 @@ STARFIVE JH71XX PMU CONTROLLER DRIVER
2051420514
M: Walker Chen <walker.chen@starfivetech.com>
2051520515
S: Supported
2051620516
F: Documentation/devicetree/bindings/power/starfive*
20517-
F: drivers/genpd/starfive/jh71xx-pmu.c
20517+
F: drivers/pmdomain/starfive/jh71xx-pmu.c
2051820518
F: include/dt-bindings/power/starfive,jh7110-pmu.h
2051920519

2052020520
STARFIVE SOC DRIVERS
@@ -21339,7 +21339,7 @@ F: drivers/irqchip/irq-ti-sci-inta.c
2133921339
F: drivers/irqchip/irq-ti-sci-intr.c
2134021340
F: drivers/reset/reset-ti-sci.c
2134121341
F: drivers/soc/ti/ti_sci_inta_msi.c
21342-
F: drivers/genpd/ti/ti_sci_pm_domains.c
21342+
F: drivers/pmdomain/ti/ti_sci_pm_domains.c
2134321343
F: include/dt-bindings/soc/ti,sci_pm_domain.h
2134421344
F: include/linux/soc/ti/ti_sci_inta_msi.h
2134521345
F: include/linux/soc/ti/ti_sci_protocol.h
@@ -21581,7 +21581,7 @@ L: linux-kernel@vger.kernel.org
2158121581
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
2158221582
S: Maintained
2158321583
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
21584-
F: drivers/genpd/ti/omap_prm.c
21584+
F: drivers/pmdomain/ti/omap_prm.c
2158521585
F: drivers/soc/ti/*
2158621586

2158721587
TI LM49xxx FAMILY ASoC CODEC DRIVERS
@@ -23424,9 +23424,11 @@ F: drivers/platform/x86/x86-android-tablets/
2342423424

2342523425
X86 PLATFORM DRIVERS
2342623426
M: Hans de Goede <hdegoede@redhat.com>
23427+
M: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2342723428
M: Mark Gross <markgross@kernel.org>
2342823429
L: platform-driver-x86@vger.kernel.org
2342923430
S: Maintained
23431+
Q: https://patchwork.kernel.org/project/platform-driver-x86/list/
2343023432
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
2343123433
F: drivers/platform/olpc/
2343223434
F: drivers/platform/x86/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
VERSION = 6
33
PATCHLEVEL = 6
44
SUBLEVEL = 0
5-
EXTRAVERSION = -rc1
5+
EXTRAVERSION = -rc3
66
NAME = Hurr durr I'ma ninja sloth
77

88
# *DOCUMENTATION*

arch/arm/xen/enlighten.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static void xen_power_off(void)
207207

208208
static irqreturn_t xen_arm_callback(int irq, void *arg)
209209
{
210-
xen_hvm_evtchn_do_upcall();
210+
xen_evtchn_do_upcall();
211211
return IRQ_HANDLED;
212212
}
213213

arch/arm64/include/asm/cpufeature.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ static inline bool supports_clearbhb(int scope)
663663
isar2 = read_sanitised_ftr_reg(SYS_ID_AA64ISAR2_EL1);
664664

665665
return cpuid_feature_extract_unsigned_field(isar2,
666-
ID_AA64ISAR2_EL1_BC_SHIFT);
666+
ID_AA64ISAR2_EL1_CLRBHB_SHIFT);
667667
}
668668

669669
const struct cpumask *system_32bit_el0_cpumask(void);

arch/arm64/include/asm/kvm_hyp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void deactivate_traps_vhe_put(struct kvm_vcpu *vcpu);
118118

119119
u64 __guest_enter(struct kvm_vcpu *vcpu);
120120

121-
bool kvm_host_psci_handler(struct kvm_cpu_context *host_ctxt);
121+
bool kvm_host_psci_handler(struct kvm_cpu_context *host_ctxt, u32 func_id);
122122

123123
#ifdef __KVM_NVHE_HYPERVISOR__
124124
void __noreturn __hyp_do_panic(struct kvm_cpu_context *host_ctxt, u64 spsr,

arch/arm64/kernel/cpufeature.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ static const struct arm64_ftr_bits ftr_id_aa64isar1[] = {
222222
static const struct arm64_ftr_bits ftr_id_aa64isar2[] = {
223223
ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_CSSC_SHIFT, 4, 0),
224224
ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_RPRFM_SHIFT, 4, 0),
225-
ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_HIGHER_SAFE, ID_AA64ISAR2_EL1_BC_SHIFT, 4, 0),
225+
ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_CLRBHB_SHIFT, 4, 0),
226+
ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_BC_SHIFT, 4, 0),
226227
ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_MOPS_SHIFT, 4, 0),
227228
ARM64_FTR_BITS(FTR_VISIBLE_IF_IS_ENABLED(CONFIG_ARM64_PTR_AUTH),
228229
FTR_STRICT, FTR_EXACT, ID_AA64ISAR2_EL1_APA3_SHIFT, 4, 0),

arch/arm64/kvm/hyp/include/nvhe/ffa.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
#define FFA_MAX_FUNC_NUM 0x7F
1313

1414
int hyp_ffa_init(void *pages);
15-
bool kvm_host_ffa_handler(struct kvm_cpu_context *host_ctxt);
15+
bool kvm_host_ffa_handler(struct kvm_cpu_context *host_ctxt, u32 func_id);
1616

1717
#endif /* __KVM_HYP_FFA_H */

arch/arm64/kvm/hyp/nvhe/ffa.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,8 @@ static bool do_ffa_features(struct arm_smccc_res *res,
634634
return true;
635635
}
636636

637-
bool kvm_host_ffa_handler(struct kvm_cpu_context *host_ctxt)
637+
bool kvm_host_ffa_handler(struct kvm_cpu_context *host_ctxt, u32 func_id)
638638
{
639-
DECLARE_REG(u64, func_id, host_ctxt, 0);
640639
struct arm_smccc_res res;
641640

642641
/*

arch/arm64/kvm/hyp/nvhe/hyp-init.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ __do_hyp_init:
5757
cmp x0, #HVC_STUB_HCALL_NR
5858
b.lo __kvm_handle_stub_hvc
5959

60+
bic x0, x0, #ARM_SMCCC_CALL_HINTS
6061
mov x3, #KVM_HOST_SMCCC_FUNC(__kvm_hyp_init)
6162
cmp x0, x3
6263
b.eq 1f

arch/arm64/kvm/hyp/nvhe/hyp-main.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ static void handle_host_hcall(struct kvm_cpu_context *host_ctxt)
368368
if (static_branch_unlikely(&kvm_protected_mode_initialized))
369369
hcall_min = __KVM_HOST_SMCCC_FUNC___pkvm_prot_finalize;
370370

371+
id &= ~ARM_SMCCC_CALL_HINTS;
371372
id -= KVM_HOST_SMCCC_ID(0);
372373

373374
if (unlikely(id < hcall_min || id >= ARRAY_SIZE(host_hcall)))
@@ -392,11 +393,14 @@ static void default_host_smc_handler(struct kvm_cpu_context *host_ctxt)
392393

393394
static void handle_host_smc(struct kvm_cpu_context *host_ctxt)
394395
{
396+
DECLARE_REG(u64, func_id, host_ctxt, 0);
395397
bool handled;
396398

397-
handled = kvm_host_psci_handler(host_ctxt);
399+
func_id &= ~ARM_SMCCC_CALL_HINTS;
400+
401+
handled = kvm_host_psci_handler(host_ctxt, func_id);
398402
if (!handled)
399-
handled = kvm_host_ffa_handler(host_ctxt);
403+
handled = kvm_host_ffa_handler(host_ctxt, func_id);
400404
if (!handled)
401405
default_host_smc_handler(host_ctxt);
402406

arch/arm64/kvm/hyp/nvhe/psci-relay.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,8 @@ static unsigned long psci_1_0_handler(u64 func_id, struct kvm_cpu_context *host_
273273
}
274274
}
275275

276-
bool kvm_host_psci_handler(struct kvm_cpu_context *host_ctxt)
276+
bool kvm_host_psci_handler(struct kvm_cpu_context *host_ctxt, u32 func_id)
277277
{
278-
DECLARE_REG(u64, func_id, host_ctxt, 0);
279278
unsigned long ret;
280279

281280
switch (kvm_host_psci_config.version) {

0 commit comments

Comments
 (0)