Skip to content

Commit

Permalink
Merge remote-tracking branch 'stable/linux-6.6.y' into rpi-6.6.y
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Jun 6, 2024
2 parents 085e8b4 + 91de249 commit 5882bc5
Show file tree
Hide file tree
Showing 88 changed files with 3,907 additions and 1,722 deletions.
10 changes: 10 additions & 0 deletions Documentation/ABI/stable/sysfs-block
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ Description:
devices that support receiving integrity metadata.


What: /sys/block/<disk>/partscan
Date: May 2024
Contact: Christoph Hellwig <[email protected]>
Description:
The /sys/block/<disk>/partscan files reports if partition
scanning is enabled for the disk. It returns "1" if partition
scanning is enabled, or "0" if not. The value type is a 32-bit
unsigned integer, but only "0" and "1" are valid values.


What: /sys/block/<disk>/<partition>/alignment_offset
Date: April 2009
Contact: Martin K. Petersen <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions Documentation/admin-guide/hw-vuln/core-scheduling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ arg4:
will be performed for all tasks in the task group of ``pid``.

arg5:
userspace pointer to an unsigned long for storing the cookie returned by
``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands.
userspace pointer to an unsigned long long for storing the cookie returned
by ``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands.

In order for a process to push a cookie to, or pull a cookie from a process, it
is required to have the ptrace access mode: `PTRACE_MODE_READ_REALCREDS` to the
Expand Down
2 changes: 1 addition & 1 deletion Documentation/admin-guide/mm/damon/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ pages of all memory cgroups except ``/having_care_already``.::
# # further filter out all cgroups except one at '/having_care_already'
echo memcg > 1/type
echo /having_care_already > 1/memcg_path
echo N > 1/matching
echo Y > 1/matching

Note that ``anon`` and ``memcg`` filters are currently supported only when
``paddr`` `implementation <sysfs_contexts>` is being used.
Expand Down
1 change: 0 additions & 1 deletion Documentation/sphinx/kernel_include.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def _run(self):
# HINT: this is the only line I had to change / commented out:
#path = utils.relative_path(None, path)

path = nodes.reprunicode(path)
encoding = self.options.get(
'encoding', self.state.document.settings.input_encoding)
e_handler=self.state.document.settings.input_encoding_error_handler
Expand Down
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 = 6
SUBLEVEL = 31
SUBLEVEL = 32
EXTRAVERSION =
NAME = Hurr durr I'ma ninja sloth

Expand Down
15 changes: 10 additions & 5 deletions block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ int disk_scan_partitions(struct gendisk *disk, blk_mode_t mode)
struct block_device *bdev;
int ret = 0;

if (disk->flags & (GENHD_FL_NO_PART | GENHD_FL_HIDDEN))
return -EINVAL;
if (test_bit(GD_SUPPRESS_PART_SCAN, &disk->state))
if (!disk_has_partscan(disk))
return -EINVAL;
if (disk->open_partitions)
return -EBUSY;
Expand Down Expand Up @@ -503,8 +501,7 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
goto out_unregister_bdi;

/* Make sure the first partition scan will be proceed */
if (get_capacity(disk) && !(disk->flags & GENHD_FL_NO_PART) &&
!test_bit(GD_SUPPRESS_PART_SCAN, &disk->state))
if (get_capacity(disk) && disk_has_partscan(disk))
set_bit(GD_NEED_PART_SCAN, &disk->state);

bdev_add(disk->part0, ddev->devt);
Expand Down Expand Up @@ -1040,6 +1037,12 @@ static ssize_t diskseq_show(struct device *dev,
return sprintf(buf, "%llu\n", disk->diskseq);
}

static ssize_t partscan_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%u\n", disk_has_partscan(dev_to_disk(dev)));
}

static DEVICE_ATTR(range, 0444, disk_range_show, NULL);
static DEVICE_ATTR(ext_range, 0444, disk_ext_range_show, NULL);
static DEVICE_ATTR(removable, 0444, disk_removable_show, NULL);
Expand All @@ -1053,6 +1056,7 @@ static DEVICE_ATTR(stat, 0444, part_stat_show, NULL);
static DEVICE_ATTR(inflight, 0444, part_inflight_show, NULL);
static DEVICE_ATTR(badblocks, 0644, disk_badblocks_show, disk_badblocks_store);
static DEVICE_ATTR(diskseq, 0444, diskseq_show, NULL);
static DEVICE_ATTR(partscan, 0444, partscan_show, NULL);

#ifdef CONFIG_FAIL_MAKE_REQUEST
ssize_t part_fail_show(struct device *dev,
Expand Down Expand Up @@ -1099,6 +1103,7 @@ static struct attribute *disk_attrs[] = {
&dev_attr_events_async.attr,
&dev_attr_events_poll_msecs.attr,
&dev_attr_diskseq.attr,
&dev_attr_partscan.attr,
#ifdef CONFIG_FAIL_MAKE_REQUEST
&dev_attr_fail.attr,
#endif
Expand Down
5 changes: 1 addition & 4 deletions block/partitions/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,7 @@ static int blk_add_partitions(struct gendisk *disk)
struct parsed_partitions *state;
int ret = -EAGAIN, p;

if (disk->flags & GENHD_FL_NO_PART)
return 0;

if (test_bit(GD_SUPPRESS_PART_SCAN, &disk->state))
if (!disk_has_partscan(disk))
return 0;

state = check_partition(disk);
Expand Down
2 changes: 1 addition & 1 deletion drivers/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -5368,7 +5368,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
goto err;
break;
case BINDER_SET_MAX_THREADS: {
int max_threads;
u32 max_threads;

if (copy_from_user(&max_threads, ubuf,
sizeof(max_threads))) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/android/binder_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ struct binder_proc {
struct list_head todo;
struct binder_stats stats;
struct list_head delivered_death;
int max_threads;
u32 max_threads;
int requested_threads;
int requested_threads_started;
int tmp_ref;
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,9 @@ int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
if (!obj)
return -EINVAL;

if (!info || info->head.block == AMDGPU_RAS_BLOCK_COUNT)
return -EINVAL;

if (info->head.block == AMDGPU_RAS_BLOCK__UMC) {
amdgpu_ras_get_ecc_info(adev, &err_data);
} else {
Expand Down
7 changes: 6 additions & 1 deletion drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,12 @@ static bool setup_dsc_config(
if (!is_dsc_possible)
goto done;

dsc_cfg->num_slices_v = pic_height/slice_height;
if (slice_height > 0) {
dsc_cfg->num_slices_v = pic_height / slice_height;
} else {
is_dsc_possible = false;
goto done;
}

if (target_bandwidth_kbps > 0) {
is_dsc_possible = decide_dsc_target_bpp_x16(
Expand Down
9 changes: 7 additions & 2 deletions drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1819,8 +1819,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,

if (err)
goto free_card;

} else if (!mmc_card_hs400es(card)) {
} else if (mmc_card_hs400es(card)) {
if (host->ops->execute_hs400_tuning) {
err = host->ops->execute_hs400_tuning(host, card);
if (err)
goto free_card;
}
} else {
/* Select the desired bus width optionally */
err = mmc_select_bus_width(card);
if (err > 0 && mmc_card_hs(card)) {
Expand Down
22 changes: 10 additions & 12 deletions drivers/net/ethernet/intel/ice/ice_virtchnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,17 +547,15 @@ bool ice_vc_isvalid_vsi_id(struct ice_vf *vf, u16 vsi_id)

/**
* ice_vc_isvalid_q_id
* @vf: pointer to the VF info
* @vsi_id: VSI ID
* @vsi: VSI to check queue ID against
* @qid: VSI relative queue ID
*
* check for the valid queue ID
*/
static bool ice_vc_isvalid_q_id(struct ice_vf *vf, u16 vsi_id, u8 qid)
static bool ice_vc_isvalid_q_id(struct ice_vsi *vsi, u8 qid)
{
struct ice_vsi *vsi = ice_find_vsi(vf->pf, vsi_id);
/* allocated Tx and Rx queues should be always equal for VF VSI */
return (vsi && (qid < vsi->alloc_txq));
return qid < vsi->alloc_txq;
}

/**
Expand Down Expand Up @@ -1257,7 +1255,7 @@ static int ice_vc_ena_qs_msg(struct ice_vf *vf, u8 *msg)
*/
q_map = vqs->rx_queues;
for_each_set_bit(vf_q_id, &q_map, ICE_MAX_RSS_QS_PER_VF) {
if (!ice_vc_isvalid_q_id(vf, vqs->vsi_id, vf_q_id)) {
if (!ice_vc_isvalid_q_id(vsi, vf_q_id)) {
v_ret = VIRTCHNL_STATUS_ERR_PARAM;
goto error_param;
}
Expand All @@ -1279,7 +1277,7 @@ static int ice_vc_ena_qs_msg(struct ice_vf *vf, u8 *msg)

q_map = vqs->tx_queues;
for_each_set_bit(vf_q_id, &q_map, ICE_MAX_RSS_QS_PER_VF) {
if (!ice_vc_isvalid_q_id(vf, vqs->vsi_id, vf_q_id)) {
if (!ice_vc_isvalid_q_id(vsi, vf_q_id)) {
v_ret = VIRTCHNL_STATUS_ERR_PARAM;
goto error_param;
}
Expand Down Expand Up @@ -1384,7 +1382,7 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)
q_map = vqs->tx_queues;

for_each_set_bit(vf_q_id, &q_map, ICE_MAX_RSS_QS_PER_VF) {
if (!ice_vc_isvalid_q_id(vf, vqs->vsi_id, vf_q_id)) {
if (!ice_vc_isvalid_q_id(vsi, vf_q_id)) {
v_ret = VIRTCHNL_STATUS_ERR_PARAM;
goto error_param;
}
Expand All @@ -1410,7 +1408,7 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)
bitmap_zero(vf->rxq_ena, ICE_MAX_RSS_QS_PER_VF);
} else if (q_map) {
for_each_set_bit(vf_q_id, &q_map, ICE_MAX_RSS_QS_PER_VF) {
if (!ice_vc_isvalid_q_id(vf, vqs->vsi_id, vf_q_id)) {
if (!ice_vc_isvalid_q_id(vsi, vf_q_id)) {
v_ret = VIRTCHNL_STATUS_ERR_PARAM;
goto error_param;
}
Expand Down Expand Up @@ -1466,7 +1464,7 @@ ice_cfg_interrupt(struct ice_vf *vf, struct ice_vsi *vsi, u16 vector_id,
for_each_set_bit(vsi_q_id_idx, &qmap, ICE_MAX_RSS_QS_PER_VF) {
vsi_q_id = vsi_q_id_idx;

if (!ice_vc_isvalid_q_id(vf, vsi->vsi_num, vsi_q_id))
if (!ice_vc_isvalid_q_id(vsi, vsi_q_id))
return VIRTCHNL_STATUS_ERR_PARAM;

q_vector->num_ring_rx++;
Expand All @@ -1480,7 +1478,7 @@ ice_cfg_interrupt(struct ice_vf *vf, struct ice_vsi *vsi, u16 vector_id,
for_each_set_bit(vsi_q_id_idx, &qmap, ICE_MAX_RSS_QS_PER_VF) {
vsi_q_id = vsi_q_id_idx;

if (!ice_vc_isvalid_q_id(vf, vsi->vsi_num, vsi_q_id))
if (!ice_vc_isvalid_q_id(vsi, vsi_q_id))
return VIRTCHNL_STATUS_ERR_PARAM;

q_vector->num_ring_tx++;
Expand Down Expand Up @@ -1629,7 +1627,7 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg)
qpi->txq.headwb_enabled ||
!ice_vc_isvalid_ring_len(qpi->txq.ring_len) ||
!ice_vc_isvalid_ring_len(qpi->rxq.ring_len) ||
!ice_vc_isvalid_q_id(vf, qci->vsi_id, qpi->txq.queue_id)) {
!ice_vc_isvalid_q_id(vsi, qpi->txq.queue_id)) {
goto error_param;
}

Expand Down
3 changes: 0 additions & 3 deletions drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ ice_vc_fdir_param_check(struct ice_vf *vf, u16 vsi_id)
if (!(vf->driver_caps & VIRTCHNL_VF_OFFLOAD_FDIR_PF))
return -EINVAL;

if (vsi_id != vf->lan_vsi_num)
return -EINVAL;

if (!ice_vc_isvalid_vsi_id(vf, vsi_id))
return -EINVAL;

Expand Down
18 changes: 1 addition & 17 deletions drivers/net/ethernet/micrel/ks8851_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,32 +328,24 @@ static irqreturn_t ks8851_irq(int irq, void *_ks)
{
struct ks8851_net *ks = _ks;
struct sk_buff_head rxq;
unsigned handled = 0;
unsigned long flags;
unsigned int status;
struct sk_buff *skb;

ks8851_lock(ks, &flags);

status = ks8851_rdreg16(ks, KS_ISR);
ks8851_wrreg16(ks, KS_ISR, status);

netif_dbg(ks, intr, ks->netdev,
"%s: status 0x%04x\n", __func__, status);

if (status & IRQ_LCI)
handled |= IRQ_LCI;

if (status & IRQ_LDI) {
u16 pmecr = ks8851_rdreg16(ks, KS_PMECR);
pmecr &= ~PMECR_WKEVT_MASK;
ks8851_wrreg16(ks, KS_PMECR, pmecr | PMECR_WKEVT_LINK);

handled |= IRQ_LDI;
}

if (status & IRQ_RXPSI)
handled |= IRQ_RXPSI;

if (status & IRQ_TXI) {
unsigned short tx_space = ks8851_rdreg16(ks, KS_TXMIR);

Expand All @@ -365,20 +357,12 @@ static irqreturn_t ks8851_irq(int irq, void *_ks)
if (netif_queue_stopped(ks->netdev))
netif_wake_queue(ks->netdev);
spin_unlock(&ks->statelock);

handled |= IRQ_TXI;
}

if (status & IRQ_RXI)
handled |= IRQ_RXI;

if (status & IRQ_SPIBEI) {
netdev_err(ks->netdev, "%s: spi bus error\n", __func__);
handled |= IRQ_SPIBEI;
}

ks8851_wrreg16(ks, KS_ISR, handled);

if (status & IRQ_RXI) {
/* the datasheet says to disable the rx interrupt during
* packet read-out, however we're masking the interrupt
Expand Down
Loading

0 comments on commit 5882bc5

Please sign in to comment.