Skip to content

Commit

Permalink
Merge tag 'v6.1.115' into 6.1-main
Browse files Browse the repository at this point in the history
This is the 6.1.115 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmckJzMACgkQONu9yGCS
# aT7HOQ/8DFCJv+qHFaOujVD60FxOuNegbm3NDqZrFDQatuizL908Ernfo1I4LHgr
# YZwHPlPn1O45k4QgdM2cJyLNS8kxI1aRbck6/3a1j/RxWMBeIepmUYPnzNKIgQCS
# Z1mog42B7c5UbZVhSC21HmVZl6d0buAoHDNMG8XEM1brBf2MDcoy071nH0w7oQLl
# OSNKRkC0ED7w6qrfT9q2ZwrZm1MntxDHalm7a0KOngfQYAY61jr03p7H8gJ4qeA4
# rNMBj0AQch+clYrEvWWX3SO6QMAXfgqXcLglvy2xQJ5ZLaZie+sfokfyGOcNB1t6
# ANeYVNjU2g7moz7EuZ+iutiBlOmRuv4rpa93QwFNQFJxfpRB4avUWs7uNtyYSbX/
# tJqfIJ9Hpepjd6czv0tTw5CnnpiwKNWMSZkxaNp9r4I+CDVv5/+eCO9os/MF/hdT
# 2+m1Q/BN6HWRQceUAulLGguLitTAPlRNa06psci1lVc4y0Eb1S5eSEsR0S+be1qR
# xgViV6I2ZPClkFP+tKpNbRCsgkVSiwrVR/TmNm2VQnQql7+ZWsufXHAMzPgmPpV/
# 6EOsBFdD6piC6wMLx6YVg2sHLGIq0/z5v4PNqhRRkQvb0iL6PwXmYzABr9CUse0I
# Zp9nvZhKnjBwuM+KoYp+FCwC9Bm4eDTG6dRTXBhyozB4tMAJl5c=
# =9IYd
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Nov  1 01:56:19 2024 CET
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
  • Loading branch information
frank-w committed Dec 6, 2024
2 parents ee05752 + 7c15117 commit eb8db29
Show file tree
Hide file tree
Showing 154 changed files with 1,985 additions and 1,067 deletions.
18 changes: 9 additions & 9 deletions Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,21 @@ properties:
default: 2

interrupts:
anyOf:
- minItems: 1
items:
- description: TX interrupt
- description: RX interrupt
- items:
- description: common/combined interrupt
minItems: 1
maxItems: 2

interrupt-names:
oneOf:
- minItems: 1
- description: TX interrupt
const: tx
- description: RX interrupt
const: rx
- description: TX and RX interrupts
items:
- const: tx
- const: rx
- const: common
- description: Common/combined interrupt
const: common

fck_parent:
$ref: /schemas/types.yaml#/definitions/string
Expand Down
97 changes: 62 additions & 35 deletions Documentation/networking/driver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
Softnet Driver Issues
=====================

Transmit path guidelines:
Transmit path guidelines
========================

1) The ndo_start_xmit method must not return NETDEV_TX_BUSY under
any normal circumstances. It is considered a hard error unless
there is no way your device can tell ahead of time when its
transmit function will become busy.
Stop queues in advance
----------------------

Instead it must maintain the queue properly. For example,
for a driver implementing scatter-gather this means::
The ndo_start_xmit method must not return NETDEV_TX_BUSY under
any normal circumstances. It is considered a hard error unless
there is no way your device can tell ahead of time when its
transmit function will become busy.

Instead it must maintain the queue properly. For example,
for a driver implementing scatter-gather this means::

static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
Expand Down Expand Up @@ -42,56 +46,79 @@ Transmit path guidelines:
return NETDEV_TX_OK;
}

And then at the end of your TX reclamation event handling::
And then at the end of your TX reclamation event handling::

if (netif_queue_stopped(dp->dev) &&
TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1))
netif_wake_queue(dp->dev);

For a non-scatter-gather supporting card, the three tests simply become::
For a non-scatter-gather supporting card, the three tests simply become::

/* This is a hard error log it. */
if (TX_BUFFS_AVAIL(dp) <= 0)

and::
and::

if (TX_BUFFS_AVAIL(dp) == 0)

and::
and::

if (netif_queue_stopped(dp->dev) &&
TX_BUFFS_AVAIL(dp) > 0)
netif_wake_queue(dp->dev);

2) An ndo_start_xmit method must not modify the shared parts of a
cloned SKB.
Lockless queue stop / wake helper macros
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. kernel-doc:: include/net/netdev_queues.h
:doc: Lockless queue stopping / waking helpers.

No exclusive ownership
----------------------

An ndo_start_xmit method must not modify the shared parts of a
cloned SKB.

Timely completions
------------------

3) Do not forget that once you return NETDEV_TX_OK from your
ndo_start_xmit method, it is your driver's responsibility to free
up the SKB and in some finite amount of time.
Do not forget that once you return NETDEV_TX_OK from your
ndo_start_xmit method, it is your driver's responsibility to free
up the SKB and in some finite amount of time.

For example, this means that it is not allowed for your TX
mitigation scheme to let TX packets "hang out" in the TX
ring unreclaimed forever if no new TX packets are sent.
This error can deadlock sockets waiting for send buffer room
to be freed up.
For example, this means that it is not allowed for your TX
mitigation scheme to let TX packets "hang out" in the TX
ring unreclaimed forever if no new TX packets are sent.
This error can deadlock sockets waiting for send buffer room
to be freed up.

If you return NETDEV_TX_BUSY from the ndo_start_xmit method, you
must not keep any reference to that SKB and you must not attempt
to free it up.
If you return NETDEV_TX_BUSY from the ndo_start_xmit method, you
must not keep any reference to that SKB and you must not attempt
to free it up.

Probing guidelines:
Probing guidelines
==================

Address validation
------------------

Any hardware layer address you obtain for your device should
be verified. For example, for ethernet check it with
linux/etherdevice.h:is_valid_ether_addr()

Close/stop guidelines
=====================

1) Any hardware layer address you obtain for your device should
be verified. For example, for ethernet check it with
linux/etherdevice.h:is_valid_ether_addr()
Quiescence
----------

Close/stop guidelines:
After the ndo_stop routine has been called, the hardware must
not receive or transmit any data. All in flight packets must
be aborted. If necessary, poll or wait for completion of
any reset commands.

1) After the ndo_stop routine has been called, the hardware must
not receive or transmit any data. All in flight packets must
be aborted. If necessary, poll or wait for completion of
any reset commands.
Auto-close
----------

2) The ndo_stop routine will be called by unregister_netdevice
if device is still UP.
The ndo_stop routine will be called by unregister_netdevice
if device is still UP.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 1
SUBLEVEL = 114
SUBLEVEL = 115
EXTRAVERSION =
NAME = Curry Ramen

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
};

&hdmi {
hpd-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
hpd-gpios = <&expgpio 0 GPIO_ACTIVE_LOW>;
power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
status = "okay";
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# Copyright (C) 1995-2001 by Russell King

LDFLAGS_vmlinux :=--no-undefined -X
LDFLAGS_vmlinux :=--no-undefined -X --pic-veneer

ifeq ($(CONFIG_RELOCATABLE), y)
# Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour
Expand Down
12 changes: 5 additions & 7 deletions arch/arm64/include/asm/uprobes.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,19 @@
#include <asm/insn.h>
#include <asm/probes.h>

#define MAX_UINSN_BYTES AARCH64_INSN_SIZE

#define UPROBE_SWBP_INSN BRK64_OPCODE_UPROBES
#define UPROBE_SWBP_INSN cpu_to_le32(BRK64_OPCODE_UPROBES)
#define UPROBE_SWBP_INSN_SIZE AARCH64_INSN_SIZE
#define UPROBE_XOL_SLOT_BYTES MAX_UINSN_BYTES
#define UPROBE_XOL_SLOT_BYTES AARCH64_INSN_SIZE

typedef u32 uprobe_opcode_t;
typedef __le32 uprobe_opcode_t;

struct arch_uprobe_task {
};

struct arch_uprobe {
union {
u8 insn[MAX_UINSN_BYTES];
u8 ixol[MAX_UINSN_BYTES];
__le32 insn;
__le32 ixol;
};
struct arch_probe_insn api;
bool simulate;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/kernel/probes/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
else if (!IS_ALIGNED(addr, AARCH64_INSN_SIZE))
return -EINVAL;

insn = *(probe_opcode_t *)(&auprobe->insn[0]);
insn = le32_to_cpu(auprobe->insn);

switch (arm_probe_decode_insn(insn, &auprobe->api)) {
case INSN_REJECTED:
Expand Down Expand Up @@ -108,7 +108,7 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
if (!auprobe->simulate)
return false;

insn = *(probe_opcode_t *)(&auprobe->insn[0]);
insn = le32_to_cpu(auprobe->insn);
addr = instruction_pointer(regs);

if (auprobe->api.handler)
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/kvm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,9 @@ static int kvm_vcpu_suspend(struct kvm_vcpu *vcpu)
static int check_vcpu_requests(struct kvm_vcpu *vcpu)
{
if (kvm_request_pending(vcpu)) {
if (kvm_check_request(KVM_REQ_VM_DEAD, vcpu))
return -EIO;

if (kvm_check_request(KVM_REQ_SLEEP, vcpu))
kvm_vcpu_sleep(vcpu);

Expand Down
6 changes: 3 additions & 3 deletions arch/arm64/kvm/vgic/vgic-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,10 @@ int kvm_vgic_map_resources(struct kvm *kvm)
out:
mutex_unlock(&kvm->arch.config_lock);
out_slots:
mutex_unlock(&kvm->slots_lock);

if (ret)
kvm_vgic_destroy(kvm);
kvm_vm_dead(kvm);

mutex_unlock(&kvm->slots_lock);

return ret;
}
Expand Down
1 change: 1 addition & 0 deletions arch/loongarch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ config LOONGARCH
select GENERIC_SCHED_CLOCK
select GENERIC_SMP_IDLE_THREAD
select GENERIC_TIME_VSYSCALL
select GENERIC_VDSO_TIME_NS
select GPIOLIB
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_MMAP_RND_BITS if MMU
Expand Down
4 changes: 4 additions & 0 deletions arch/loongarch/include/asm/bootinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ struct loongson_board_info {
const char *board_vendor;
};

/*
* The "core" of cores_per_node and cores_per_package stands for a
* logical core, which means in a SMT system it stands for a thread.
*/
struct loongson_system_configuration {
int nr_cpus;
int nr_nodes;
Expand Down
1 change: 1 addition & 0 deletions arch/loongarch/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))

#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
#define sym_to_pfn(x) __phys_to_pfn(__pa_symbol(x))

#ifdef CONFIG_FLATMEM

Expand Down
9 changes: 8 additions & 1 deletion arch/loongarch/include/asm/vdso/gettimeofday.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,16 @@ static inline bool loongarch_vdso_hres_capable(void)

static __always_inline const struct vdso_data *__arch_get_vdso_data(void)
{
return get_vdso_data();
return (const struct vdso_data *)get_vdso_data();
}

#ifdef CONFIG_TIME_NS
static __always_inline
const struct vdso_data *__arch_get_timens_vdso_data(const struct vdso_data *vd)
{
return (const struct vdso_data *)(get_vdso_data() + VVAR_TIMENS_PAGE_OFFSET * PAGE_SIZE);
}
#endif
#endif /* !__ASSEMBLY__ */

#endif /* __ASM_VDSO_GETTIMEOFDAY_H */
32 changes: 27 additions & 5 deletions arch/loongarch/include/asm/vdso/vdso.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,33 @@ struct vdso_pcpu_data {

struct loongarch_vdso_data {
struct vdso_pcpu_data pdata[NR_CPUS];
struct vdso_data data[CS_BASES]; /* Arch-independent data */
};

#define VDSO_DATA_SIZE PAGE_ALIGN(sizeof(struct loongarch_vdso_data))
/*
* The layout of vvar:
*
* high
* +---------------------+--------------------------+
* | loongarch vdso data | LOONGARCH_VDSO_DATA_SIZE |
* +---------------------+--------------------------+
* | time-ns vdso data | PAGE_SIZE |
* +---------------------+--------------------------+
* | generic vdso data | PAGE_SIZE |
* +---------------------+--------------------------+
* low
*/
#define LOONGARCH_VDSO_DATA_SIZE PAGE_ALIGN(sizeof(struct loongarch_vdso_data))
#define LOONGARCH_VDSO_DATA_PAGES (LOONGARCH_VDSO_DATA_SIZE >> PAGE_SHIFT)

enum vvar_pages {
VVAR_GENERIC_PAGE_OFFSET,
VVAR_TIMENS_PAGE_OFFSET,
VVAR_LOONGARCH_PAGES_START,
VVAR_LOONGARCH_PAGES_END = VVAR_LOONGARCH_PAGES_START + LOONGARCH_VDSO_DATA_PAGES - 1,
VVAR_NR_PAGES,
};

#define VVAR_SIZE (VVAR_NR_PAGES << PAGE_SHIFT)

static inline unsigned long get_vdso_base(void)
{
Expand All @@ -34,10 +57,9 @@ static inline unsigned long get_vdso_base(void)
return addr;
}

static inline const struct vdso_data *get_vdso_data(void)
static inline unsigned long get_vdso_data(void)
{
return (const struct vdso_data *)(get_vdso_base()
- VDSO_DATA_SIZE + SMP_CACHE_BYTES * NR_CPUS);
return get_vdso_base() - VVAR_SIZE;
}

#endif /* __ASSEMBLY__ */
16 changes: 9 additions & 7 deletions arch/loongarch/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,15 @@ unsigned long stack_top(void)
{
unsigned long top = TASK_SIZE & PAGE_MASK;

/* Space for the VDSO & data page */
top -= PAGE_ALIGN(current->thread.vdso->size);
top -= PAGE_SIZE;

/* Space to randomize the VDSO base */
if (current->flags & PF_RANDOMIZE)
top -= VDSO_RANDOMIZE_SIZE;
if (current->thread.vdso) {
/* Space for the VDSO & data page */
top -= PAGE_ALIGN(current->thread.vdso->size);
top -= VVAR_SIZE;

/* Space to randomize the VDSO base */
if (current->flags & PF_RANDOMIZE)
top -= VDSO_RANDOMIZE_SIZE;
}

return top;
}
Expand Down
3 changes: 2 additions & 1 deletion arch/loongarch/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#define SMBIOS_FREQHIGH_OFFSET 0x17
#define SMBIOS_FREQLOW_MASK 0xFF
#define SMBIOS_CORE_PACKAGE_OFFSET 0x23
#define SMBIOS_THREAD_PACKAGE_OFFSET 0x25
#define LOONGSON_EFI_ENABLE (1 << 3)

struct screen_info screen_info __section(".data");
Expand Down Expand Up @@ -115,7 +116,7 @@ static void __init parse_cpu_table(const struct dmi_header *dm)
cpu_clock_freq = freq_temp * 1000000;

loongson_sysconf.cpuname = (void *)dmi_string_parse(dm, dmi_data[16]);
loongson_sysconf.cores_per_package = *(dmi_data + SMBIOS_CORE_PACKAGE_OFFSET);
loongson_sysconf.cores_per_package = *(dmi_data + SMBIOS_THREAD_PACKAGE_OFFSET);

pr_info("CpuClock = %llu\n", cpu_clock_freq);
}
Expand Down
Loading

0 comments on commit eb8db29

Please sign in to comment.