Skip to content

Commit

Permalink
Automatic merge of 'master' into merge-test (2023-10-22 12:35)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpe committed Oct 22, 2023
2 parents dbcb0dd + d537ae4 commit d218b84
Show file tree
Hide file tree
Showing 292 changed files with 2,443 additions and 1,080 deletions.
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ properties:
maxItems: 4

clocks:
minItems: 3
minItems: 2
items:
- description: Main peripheral bus clock, PCLK/HCLK - AHB Bus clock
- description: SDC MMC clock, MCLK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ properties:
description:
Current at which the headset micbias sense clamp will engage, 0 to
disable.
enum: [ 0, 14, 23, 41, 50, 60, 68, 86, 95 ]
enum: [ 0, 14, 24, 43, 52, 61, 71, 90, 99 ]
default: 0

cirrus,bias-ramp-ms:
Expand Down
18 changes: 9 additions & 9 deletions Documentation/netlink/specs/devlink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ operations:
- dev-name
- sb-index
reply: &sb-get-reply
value: 11
value: 13
attributes: *sb-id-attrs
dump:
request:
Expand All @@ -350,7 +350,7 @@ operations:
- sb-index
- sb-pool-index
reply: &sb-pool-get-reply
value: 15
value: 17
attributes: *sb-pool-id-attrs
dump:
request:
Expand Down Expand Up @@ -378,7 +378,7 @@ operations:
- sb-index
- sb-pool-index
reply: &sb-port-pool-get-reply
value: 19
value: 21
attributes: *sb-port-pool-id-attrs
dump:
request:
Expand Down Expand Up @@ -407,7 +407,7 @@ operations:
- sb-pool-type
- sb-tc-index
reply: &sb-tc-pool-bind-get-reply
value: 23
value: 25
attributes: *sb-tc-pool-bind-id-attrs
dump:
request:
Expand Down Expand Up @@ -538,7 +538,7 @@ operations:
- dev-name
- trap-name
reply: &trap-get-reply
value: 61
value: 63
attributes: *trap-id-attrs
dump:
request:
Expand All @@ -564,7 +564,7 @@ operations:
- dev-name
- trap-group-name
reply: &trap-group-get-reply
value: 65
value: 67
attributes: *trap-group-id-attrs
dump:
request:
Expand All @@ -590,7 +590,7 @@ operations:
- dev-name
- trap-policer-id
reply: &trap-policer-get-reply
value: 69
value: 71
attributes: *trap-policer-id-attrs
dump:
request:
Expand All @@ -617,7 +617,7 @@ operations:
- port-index
- rate-node-name
reply: &rate-get-reply
value: 74
value: 76
attributes: *rate-id-attrs
dump:
request:
Expand All @@ -643,7 +643,7 @@ operations:
- dev-name
- linecard-index
reply: &linecard-get-reply
value: 78
value: 80
attributes: *linecard-id-attrs
dump:
request:
Expand Down
8 changes: 5 additions & 3 deletions Documentation/networking/representors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ How are representors identified?
The representor netdevice should *not* directly refer to a PCIe device (e.g.
through ``net_dev->dev.parent`` / ``SET_NETDEV_DEV()``), either of the
representee or of the switchdev function.
Instead, it should implement the ``ndo_get_devlink_port()`` netdevice op, which
the kernel uses to provide the ``phys_switch_id`` and ``phys_port_name`` sysfs
nodes. (Some legacy drivers implement ``ndo_get_port_parent_id()`` and
Instead, the driver should use the ``SET_NETDEV_DEVLINK_PORT`` macro to
assign a devlink port instance to the netdevice before registering the
netdevice; the kernel uses the devlink port to provide the ``phys_switch_id``
and ``phys_port_name`` sysfs nodes.
(Some legacy drivers implement ``ndo_get_port_parent_id()`` and
``ndo_get_phys_port_name()`` directly, but this is deprecated.) See
:ref:`Documentation/networking/devlink/devlink-port.rst <devlink_port>` for the
details of this API.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/rust/general-information.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ target with the same invocation used for compilation, e.g.::

To read the docs locally in your web browser, run e.g.::

xdg-open rust/doc/kernel/index.html
xdg-open Documentation/output/rust/rustdoc/kernel/index.html

To learn about how to write the documentation, please see coding-guidelines.rst.

Expand Down
8 changes: 6 additions & 2 deletions Documentation/trace/fprobe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ The prototype of the entry/exit callback function are as follows:

.. code-block:: c
int entry_callback(struct fprobe *fp, unsigned long entry_ip, struct pt_regs *regs, void *entry_data);
int entry_callback(struct fprobe *fp, unsigned long entry_ip, unsigned long ret_ip, struct pt_regs *regs, void *entry_data);
void exit_callback(struct fprobe *fp, unsigned long entry_ip, struct pt_regs *regs, void *entry_data);
void exit_callback(struct fprobe *fp, unsigned long entry_ip, unsigned long ret_ip, struct pt_regs *regs, void *entry_data);
Note that the @entry_ip is saved at function entry and passed to exit handler.
If the entry callback function returns !0, the corresponding exit callback will be cancelled.
Expand All @@ -108,6 +108,10 @@ If the entry callback function returns !0, the corresponding exit callback will
Note that this may not be the actual entry address of the function but
the address where the ftrace is instrumented.

@ret_ip
This is the return address that the traced function will return to,
somewhere in the caller. This can be used at both entry and exit.

@regs
This is the `pt_regs` data structure at the entry and exit. Note that
the instruction pointer of @regs may be different from the @entry_ip
Expand Down
3 changes: 2 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ F: drivers/acpi/viot.c
F: include/linux/acpi_viot.h

ACPI WMI DRIVER
M: Armin Wolf <[email protected]>
L: [email protected]
S: Orphan
S: Maintained
F: Documentation/driver-api/wmi.rst
F: Documentation/wmi/
F: drivers/platform/x86/wmi.c
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ endif # CONFIG_MODULES
# Directories & files removed with 'make clean'
CLEAN_FILES += vmlinux.symvers modules-only.symvers \
modules.builtin modules.builtin.modinfo modules.nsdeps \
compile_commands.json .thinlto-cache rust/test rust/doc \
compile_commands.json .thinlto-cache rust/test \
rust-project.json .vmlinux.objs .vmlinux.export.c

# Directories & files removed with 'make mrproper'
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/include/asm/kvm_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,14 @@
*/
#define __HFGRTR_EL2_RES0 (GENMASK(63, 56) | GENMASK(53, 51))
#define __HFGRTR_EL2_MASK GENMASK(49, 0)
#define __HFGRTR_EL2_nMASK (GENMASK(55, 54) | BIT(50))
#define __HFGRTR_EL2_nMASK (GENMASK(58, 57) | GENMASK(55, 54) | BIT(50))

#define __HFGWTR_EL2_RES0 (GENMASK(63, 56) | GENMASK(53, 51) | \
BIT(46) | BIT(42) | BIT(40) | BIT(28) | \
GENMASK(26, 25) | BIT(21) | BIT(18) | \
GENMASK(15, 14) | GENMASK(10, 9) | BIT(2))
#define __HFGWTR_EL2_MASK GENMASK(49, 0)
#define __HFGWTR_EL2_nMASK (GENMASK(55, 54) | BIT(50))
#define __HFGWTR_EL2_nMASK (GENMASK(58, 57) | GENMASK(55, 54) | BIT(50))

#define __HFGITR_EL2_RES0 GENMASK(63, 57)
#define __HFGITR_EL2_MASK GENMASK(54, 0)
Expand Down
13 changes: 3 additions & 10 deletions arch/arm64/kvm/arch_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ static struct irq_ops arch_timer_irq_ops = {
.get_input_level = kvm_arch_timer_get_input_level,
};

static bool has_cntpoff(void)
{
return (has_vhe() && cpus_have_final_cap(ARM64_HAS_ECV_CNTPOFF));
}

static int nr_timers(struct kvm_vcpu *vcpu)
{
if (!vcpu_has_nv(vcpu))
Expand Down Expand Up @@ -180,7 +175,7 @@ u64 kvm_phys_timer_read(void)
return timecounter->cc->read(timecounter->cc);
}

static void get_timer_map(struct kvm_vcpu *vcpu, struct timer_map *map)
void get_timer_map(struct kvm_vcpu *vcpu, struct timer_map *map)
{
if (vcpu_has_nv(vcpu)) {
if (is_hyp_ctxt(vcpu)) {
Expand Down Expand Up @@ -548,8 +543,7 @@ static void timer_save_state(struct arch_timer_context *ctx)
timer_set_ctl(ctx, read_sysreg_el0(SYS_CNTP_CTL));
cval = read_sysreg_el0(SYS_CNTP_CVAL);

if (!has_cntpoff())
cval -= timer_get_offset(ctx);
cval -= timer_get_offset(ctx);

timer_set_cval(ctx, cval);

Expand Down Expand Up @@ -636,8 +630,7 @@ static void timer_restore_state(struct arch_timer_context *ctx)
cval = timer_get_cval(ctx);
offset = timer_get_offset(ctx);
set_cntpoff(offset);
if (!has_cntpoff())
cval += offset;
cval += offset;
write_sysreg_el0(cval, SYS_CNTP_CVAL);
isb();
write_sysreg_el0(timer_get_ctl(ctx), SYS_CNTP_CTL);
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/kvm/emulate-nested.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,8 @@ enum fg_filter_id {

static const struct encoding_to_trap_config encoding_to_fgt[] __initconst = {
/* HFGRTR_EL2, HFGWTR_EL2 */
SR_FGT(SYS_PIR_EL1, HFGxTR, nPIR_EL1, 0),
SR_FGT(SYS_PIRE0_EL1, HFGxTR, nPIRE0_EL1, 0),
SR_FGT(SYS_TPIDR2_EL0, HFGxTR, nTPIDR2_EL0, 0),
SR_FGT(SYS_SMPRI_EL1, HFGxTR, nSMPRI_EL1, 0),
SR_FGT(SYS_ACCDATA_EL1, HFGxTR, nACCDATA_EL1, 0),
Expand Down
44 changes: 44 additions & 0 deletions arch/arm64/kvm/hyp/vhe/switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ static void __activate_traps(struct kvm_vcpu *vcpu)

___activate_traps(vcpu);

if (has_cntpoff()) {
struct timer_map map;

get_timer_map(vcpu, &map);

/*
* We're entrering the guest. Reload the correct
* values from memory now that TGE is clear.
*/
if (map.direct_ptimer == vcpu_ptimer(vcpu))
val = __vcpu_sys_reg(vcpu, CNTP_CVAL_EL0);
if (map.direct_ptimer == vcpu_hptimer(vcpu))
val = __vcpu_sys_reg(vcpu, CNTHP_CVAL_EL2);

if (map.direct_ptimer) {
write_sysreg_el0(val, SYS_CNTP_CVAL);
isb();
}
}

val = read_sysreg(cpacr_el1);
val |= CPACR_ELx_TTA;
val &= ~(CPACR_EL1_ZEN_EL0EN | CPACR_EL1_ZEN_EL1EN |
Expand Down Expand Up @@ -77,6 +97,30 @@ static void __deactivate_traps(struct kvm_vcpu *vcpu)

write_sysreg(HCR_HOST_VHE_FLAGS, hcr_el2);

if (has_cntpoff()) {
struct timer_map map;
u64 val, offset;

get_timer_map(vcpu, &map);

/*
* We're exiting the guest. Save the latest CVAL value
* to memory and apply the offset now that TGE is set.
*/
val = read_sysreg_el0(SYS_CNTP_CVAL);
if (map.direct_ptimer == vcpu_ptimer(vcpu))
__vcpu_sys_reg(vcpu, CNTP_CVAL_EL0) = val;
if (map.direct_ptimer == vcpu_hptimer(vcpu))
__vcpu_sys_reg(vcpu, CNTHP_CVAL_EL2) = val;

offset = read_sysreg_s(SYS_CNTPOFF_EL2);

if (map.direct_ptimer && offset) {
write_sysreg_el0(val + offset, SYS_CNTP_CVAL);
isb();
}
}

/*
* ARM errata 1165522 and 1530923 require the actual execution of the
* above before we can switch to the EL2/EL0 translation regime used by
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/kvm/pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void kvm_set_pmu_events(u32 set, struct perf_event_attr *attr)
{
struct kvm_pmu_events *pmu = kvm_get_pmu_events();

if (!kvm_arm_support_pmu_v3() || !pmu || !kvm_pmu_switch_needed(attr))
if (!kvm_arm_support_pmu_v3() || !kvm_pmu_switch_needed(attr))
return;

if (!attr->exclude_host)
Expand All @@ -55,7 +55,7 @@ void kvm_clr_pmu_events(u32 clr)
{
struct kvm_pmu_events *pmu = kvm_get_pmu_events();

if (!kvm_arm_support_pmu_v3() || !pmu)
if (!kvm_arm_support_pmu_v3())
return;

pmu->events_host &= ~clr;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/kvm/sys_regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2122,8 +2122,8 @@ static const struct sys_reg_desc sys_reg_descs[] = {
{ SYS_DESC(SYS_PMMIR_EL1), trap_raz_wi },

{ SYS_DESC(SYS_MAIR_EL1), access_vm_reg, reset_unknown, MAIR_EL1 },
{ SYS_DESC(SYS_PIRE0_EL1), access_vm_reg, reset_unknown, PIRE0_EL1 },
{ SYS_DESC(SYS_PIR_EL1), access_vm_reg, reset_unknown, PIR_EL1 },
{ SYS_DESC(SYS_PIRE0_EL1), NULL, reset_unknown, PIRE0_EL1 },
{ SYS_DESC(SYS_PIR_EL1), NULL, reset_unknown, PIR_EL1 },
{ SYS_DESC(SYS_AMAIR_EL1), access_vm_reg, reset_amair_el1, AMAIR_EL1 },

{ SYS_DESC(SYS_LORSA_EL1), trap_loregion },
Expand Down
5 changes: 2 additions & 3 deletions arch/loongarch/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size,
* @offset: bus address of the memory
* @size: size of the resource to map
*/
extern pgprot_t pgprot_wc;

#define ioremap_wc(offset, size) \
ioremap_prot((offset), (size), pgprot_val(pgprot_wc))
ioremap_prot((offset), (size), \
pgprot_val(wc_enabled ? PAGE_KERNEL_WUC : PAGE_KERNEL_SUC))

#define ioremap_cache(offset, size) \
ioremap_prot((offset), (size), pgprot_val(PAGE_KERNEL))
Expand Down
8 changes: 8 additions & 0 deletions arch/loongarch/include/asm/linkage.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,12 @@
.cfi_endproc; \
SYM_END(name, SYM_T_FUNC)

#define SYM_CODE_START(name) \
SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) \
.cfi_startproc;

#define SYM_CODE_END(name) \
.cfi_endproc; \
SYM_END(name, SYM_T_NONE)

#endif
4 changes: 3 additions & 1 deletion arch/loongarch/include/asm/pgtable-bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,15 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot)
return __pgprot(prot);
}

extern bool wc_enabled;

#define pgprot_writecombine pgprot_writecombine

static inline pgprot_t pgprot_writecombine(pgprot_t _prot)
{
unsigned long prot = pgprot_val(_prot);

prot = (prot & ~_CACHE_MASK) | _CACHE_WUC;
prot = (prot & ~_CACHE_MASK) | (wc_enabled ? _CACHE_WUC : _CACHE_SUC);

return __pgprot(prot);
}
Expand Down
4 changes: 2 additions & 2 deletions arch/loongarch/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.text
.cfi_sections .debug_frame
.align 5
SYM_FUNC_START(handle_syscall)
SYM_CODE_START(handle_syscall)
csrrd t0, PERCPU_BASE_KS
la.pcrel t1, kernelsp
add.d t1, t1, t0
Expand Down Expand Up @@ -71,7 +71,7 @@ SYM_FUNC_START(handle_syscall)
bl do_syscall

RESTORE_ALL_AND_RET
SYM_FUNC_END(handle_syscall)
SYM_CODE_END(handle_syscall)
_ASM_NOKPROBE(handle_syscall)

SYM_CODE_START(ret_from_fork)
Expand Down
Loading

0 comments on commit d218b84

Please sign in to comment.