This is the 6.1.38 stable release

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmSlqDYACgkQONu9yGCS
 aT6bohAA2JQgHaer+7xCnxp21yqBDFGKUXTKc0yeFx8R0uGGv0evGgsJD2/U4EeW
 076gpANsR4Qks5sLzF/tjS5+wWztZkj/j1GgQ6uRSSk7qBrzCIpi8yod/IrTkXlO
 DHVO5BX7WJ0DKjCWAlebtn+hYgEaqH6DXiTzWLLu/4h8v3uT4yzQzZCtfEqxKF+Y
 UWPg+nih6Q/cwNNzQr1va+Wdqo60H8ajlJ8255Mcho4lrTLyGvBN7DV84u2R4LTv
 mK3SuiGwwOcxD6tSpRDqoDs/q/SrgTODmOOx0oYXRnUaadKvcHhDP/xTMJg0klHE
 gemmfIGvInG9NAJO/W8QvdZkMlh4o4akIPkRgSyWhGKXynJEX1b1vA5wGK+lw9er
 Yc1tEi1gNYo7vfenNiPjhM2SIhzxoMxCBCjfj+NnfRvK4Is/lLi9qu5x2DYGipVX
 FJ8H+igI/sivEgqMkB1J/hgWzH6cLneYSh83B4DXK3NjZlgR+g2QwEd3gFH0kf+/
 luzQtF06MFaCgQFEchOLOT1kWest/GW/KQEgzkxP60ZxyoqfaOeuMO/qqrSCbGwp
 JvZXw016ff1fmJQrbfCaORG0HRMByop74uie1zQqpcGU16pVWmXgUTMuQArzXttT
 y/mnE1p/5bZg/6xKal/sLIL4tY1+rAi6lhpIS47NusB20+cGjKQ=
 =yu08
 -----END PGP SIGNATURE-----

Merge 6.1.38 into android14-6.1-lts

Changes in 6.1.38
	xtensa: fix lock_mm_and_find_vma in case VMA not found
	drm/amd/display: Remove optimization for VRR updates
	drm/amd/display: Do not update DRR while BW optimizations pending
	PCI/ACPI: Validate acpi_pci_set_power_state() parameter
	PCI/ACPI: Call _REG when transitioning D-states
	execve: always mark stack as growing down during early stack setup
	nubus: Partially revert proc_create_single_data() conversion
	perf symbols: Symbol lookup with kcore can fail if multiple segments match stext
	scripts/tags.sh: Resolve gtags empty index generation
	docs: Set minimal gtags / GNU GLOBAL version to 6.6.5
	drm/amdgpu: Validate VM ioctl flags.
	drm/amd/display: Ensure vmin and vmax adjust for DCE
	Linux 6.1.38

Change-Id: I17bf08393a16d6b23541c445d7395f3e966d99b4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-09-02 11:24:06 +00:00
commit 79ad050bdd
9 changed files with 124 additions and 44 deletions

View File

@ -60,6 +60,7 @@ openssl & libcrypto 1.0.0 openssl version
bc 1.06.95 bc --version
Sphinx\ [#f1]_ 1.7 sphinx-build --version
cpio any cpio --version
gtags (optional) 6.6.5 gtags --version
====================== =============== ========================================
.. [#f1] Sphinx is needed only to build the Kernel documentation
@ -174,6 +175,12 @@ You will need openssl to build kernels 3.7 and higher if module signing is
enabled. You will also need openssl development packages to build kernels 4.3
and higher.
gtags / GNU GLOBAL (optional)
-----------------------------
The kernel build requires GNU GLOBAL version 6.6.5 or later to generate
tag files through ``make gtags``. This is due to its use of the gtags
``-C (--directory)`` flag.
System utilities
****************

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 1
SUBLEVEL = 37
SUBLEVEL = 38
EXTRAVERSION =
NAME = Curry Ramen

View File

@ -2363,6 +2363,10 @@ int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
long timeout = msecs_to_jiffies(2000);
int r;
/* No valid flags defined yet */
if (args->in.flags)
return -EINVAL;
switch (args->in.op) {
case AMDGPU_VM_OP_RESERVE_VMID:
/* We only have requirement to reserve vmid from gfxhub */

View File

@ -401,8 +401,13 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,
{
int i;
if (memcmp(adjust, &stream->adjust, sizeof(struct dc_crtc_timing_adjust)) == 0)
return true;
/*
* Don't adjust DRR while there's bandwidth optimizations pending to
* avoid conflicting with firmware updates.
*/
if (dc->ctx->dce_version > DCE_VERSION_MAX)
if (dc->optimized_required || dc->wm_optimized_required)
return false;
stream->adjust.v_total_max = adjust->v_total_max;
stream->adjust.v_total_mid = adjust->v_total_mid;
@ -2024,10 +2029,15 @@ void dc_post_update_surfaces_to_stream(struct dc *dc)
post_surface_trace(dc);
if (dc->ctx->dce_version >= DCE_VERSION_MAX)
TRACE_DCN_CLOCK_STATE(&context->bw_ctx.bw.dcn.clk);
else
/*
* Only relevant for DCN behavior where we can guarantee the optimization
* is safe to apply - retain the legacy behavior for DCE.
*/
if (dc->ctx->dce_version < DCE_VERSION_MAX)
TRACE_DCE_CLOCK_STATE(&context->bw_ctx.bw.dce);
else {
TRACE_DCN_CLOCK_STATE(&context->bw_ctx.bw.dcn.clk);
if (is_flip_pending_in_pipes(dc, context))
return;
@ -2045,6 +2055,7 @@ void dc_post_update_surfaces_to_stream(struct dc *dc)
if (dc->debug.enable_double_buffered_dsc_pg_support)
dc->hwss.update_dsc_pg(dc, context, true);
}
dc->optimized_required = false;
dc->wm_optimized_required = false;
@ -3869,12 +3880,9 @@ void dc_commit_updates_for_stream(struct dc *dc,
if (new_pipe->plane_state && new_pipe->plane_state != old_pipe->plane_state)
new_pipe->plane_state->force_full_update = true;
}
} else if (update_type == UPDATE_TYPE_FAST && dc_ctx->dce_version >= DCE_VERSION_MAX) {
} else if (update_type == UPDATE_TYPE_FAST) {
/*
* Previous frame finished and HW is ready for optimization.
*
* Only relevant for DCN behavior where we can guarantee the optimization
* is safe to apply - retain the legacy behavior for DCE.
*/
dc_post_update_surfaces_to_stream(dc);
}

View File

@ -137,6 +137,18 @@ static int nubus_proc_rsrc_show(struct seq_file *m, void *v)
return 0;
}
static int nubus_rsrc_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, nubus_proc_rsrc_show, inode);
}
static const struct proc_ops nubus_rsrc_proc_ops = {
.proc_open = nubus_rsrc_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = single_release,
};
void nubus_proc_add_rsrc_mem(struct proc_dir_entry *procdir,
const struct nubus_dirent *ent,
unsigned int size)
@ -152,8 +164,8 @@ void nubus_proc_add_rsrc_mem(struct proc_dir_entry *procdir,
pded = nubus_proc_alloc_pde_data(nubus_dirptr(ent), size);
else
pded = NULL;
proc_create_single_data(name, S_IFREG | 0444, procdir,
nubus_proc_rsrc_show, pded);
proc_create_data(name, S_IFREG | 0444, procdir,
&nubus_rsrc_proc_ops, pded);
}
void nubus_proc_add_rsrc(struct proc_dir_entry *procdir,
@ -166,8 +178,8 @@ void nubus_proc_add_rsrc(struct proc_dir_entry *procdir,
return;
snprintf(name, sizeof(name), "%x", ent->type);
proc_create_single_data(name, S_IFREG | 0444, procdir,
nubus_proc_rsrc_show,
proc_create_data(name, S_IFREG | 0444, procdir,
&nubus_rsrc_proc_ops,
nubus_proc_alloc_pde_data(data, 0));
}

View File

@ -1043,6 +1043,16 @@ bool acpi_pci_bridge_d3(struct pci_dev *dev)
return false;
}
static void acpi_pci_config_space_access(struct pci_dev *dev, bool enable)
{
int val = enable ? ACPI_REG_CONNECT : ACPI_REG_DISCONNECT;
int ret = acpi_evaluate_reg(ACPI_HANDLE(&dev->dev),
ACPI_ADR_SPACE_PCI_CONFIG, val);
if (ret)
pci_dbg(dev, "ACPI _REG %s evaluation failed (%d)\n",
enable ? "connect" : "disconnect", ret);
}
int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
{
struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
@ -1053,32 +1063,49 @@ int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
[PCI_D3hot] = ACPI_STATE_D3_HOT,
[PCI_D3cold] = ACPI_STATE_D3_COLD,
};
int error = -EINVAL;
int error;
/* If the ACPI device has _EJ0, ignore the device */
if (!adev || acpi_has_method(adev->handle, "_EJ0"))
return -ENODEV;
switch (state) {
case PCI_D3cold:
if (dev_pm_qos_flags(&dev->dev, PM_QOS_FLAG_NO_POWER_OFF) ==
PM_QOS_FLAGS_ALL) {
error = -EBUSY;
break;
}
fallthrough;
case PCI_D0:
case PCI_D1:
case PCI_D2:
case PCI_D3hot:
error = acpi_device_set_power(adev, state_conv[state]);
case PCI_D3cold:
break;
default:
return -EINVAL;
}
if (!error)
if (state == PCI_D3cold) {
if (dev_pm_qos_flags(&dev->dev, PM_QOS_FLAG_NO_POWER_OFF) ==
PM_QOS_FLAGS_ALL)
return -EBUSY;
/* Notify AML lack of PCI config space availability */
acpi_pci_config_space_access(dev, false);
}
error = acpi_device_set_power(adev, state_conv[state]);
if (error)
return error;
pci_dbg(dev, "power state changed by ACPI to %s\n",
acpi_power_state_string(adev->power.state));
return error;
/*
* Notify AML of PCI config space availability. Config space is
* accessible in all states except D3cold; the only transitions
* that change availability are transitions to D3cold and from
* D3cold to D0.
*/
if (state == PCI_D0)
acpi_pci_config_space_access(dev, true);
return 0;
}
pci_power_t acpi_pci_get_power_state(struct pci_dev *dev)

View File

@ -382,7 +382,7 @@ extern unsigned int kobjsize(const void *objp);
#endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */
/* Bits set in the VMA until the stack is in its final location */
#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ)
#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ | VM_STACK_EARLY)
#define TASK_EXEC ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0)
@ -404,8 +404,10 @@ extern unsigned int kobjsize(const void *objp);
#ifdef CONFIG_STACK_GROWSUP
#define VM_STACK VM_GROWSUP
#define VM_STACK_EARLY VM_GROWSDOWN
#else
#define VM_STACK VM_GROWSDOWN
#define VM_STACK_EARLY 0
#endif
#define VM_STACK_FLAGS (VM_STACK | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)

View File

@ -25,6 +25,13 @@ else
tree=${srctree}/
fi
# gtags(1) refuses to index any file outside of its current working dir.
# If gtags indexing is requested and the build output directory is not
# the kernel source tree, index all files in absolute-path form.
if [[ "$1" == "gtags" && -n "${tree}" ]]; then
tree=$(realpath "$tree")/
fi
# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
if [ "${ALLSOURCE_ARCHS}" = "" ]; then
ALLSOURCE_ARCHS=${SRCARCH}
@ -124,7 +131,7 @@ docscope()
dogtags()
{
all_target_sources | gtags -i -f -
all_target_sources | gtags -i -C "${tree:-.}" -f - "$PWD"
}
# Basic regular expressions with an optional /kind-spec/ for ctags and

View File

@ -1368,10 +1368,23 @@ static int dso__load_kcore(struct dso *dso, struct map *map,
/* Find the kernel map using the '_stext' symbol */
if (!kallsyms__get_function_start(kallsyms_filename, "_stext", &stext)) {
u64 replacement_size = 0;
list_for_each_entry(new_map, &md.maps, node) {
if (stext >= new_map->start && stext < new_map->end) {
u64 new_size = new_map->end - new_map->start;
if (!(stext >= new_map->start && stext < new_map->end))
continue;
/*
* On some architectures, ARM64 for example, the kernel
* text can get allocated inside of the vmalloc segment.
* Select the smallest matching segment, in case stext
* falls within more than one in the list.
*/
if (!replacement_map || new_size < replacement_size) {
replacement_map = new_map;
break;
replacement_size = new_size;
}
}
}