Skip to content

Commit

Permalink
Changes representative of linux-3.10.0-1160.15.2.el7.tar.xz
Browse files Browse the repository at this point in the history
  • Loading branch information
da-x committed Jan 21, 2021
1 parent 8212174 commit 7e1cd70
Show file tree
Hide file tree
Showing 40 changed files with 272 additions and 195 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EXTRAVERSION =
NAME = Unicycling Gorilla
RHEL_MAJOR = 7
RHEL_MINOR = 9
RHEL_RELEASE = 1160.11.1
RHEL_RELEASE = 1160.15.2

#
# DRM backport version
Expand Down
70 changes: 0 additions & 70 deletions arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,76 +887,6 @@ int cpu_to_chip_id(int cpu)
}
EXPORT_SYMBOL(cpu_to_chip_id);

#ifdef CONFIG_PPC_PSERIES
/*
* Fix up the uninitialized fields in a new device node:
* name, type and pci-specific fields
*/

static int of_finish_dynamic_node(struct device_node *node)
{
struct device_node *parent = of_get_parent(node);
int err = 0;
const __be32 *ibm_phandle;

node->name = of_get_property(node, "name", NULL);
node->type = of_get_property(node, "device_type", NULL);

if (!node->name)
node->name = "<NULL>";
if (!node->type)
node->type = "<NULL>";

if (!parent) {
err = -ENODEV;
goto out;
}

/* We don't support that function on PowerMac, at least
* not yet
*/
if (machine_is(powermac))
return -ENODEV;

/* fix up new node's phandle field */
if ((ibm_phandle = of_get_property(node, "ibm,phandle", NULL)))
node->phandle = be32_to_cpup(ibm_phandle);

out:
of_node_put(parent);
return err;
}

static int prom_reconfig_notifier(struct notifier_block *nb,
unsigned long action, void *node)
{
int err;

switch (action) {
case OF_RECONFIG_ATTACH_NODE:
err = of_finish_dynamic_node(node);
if (err < 0)
printk(KERN_ERR "finish_node returned %d\n", err);
break;
default:
err = 0;
break;
}
return notifier_from_errno(err);
}

static struct notifier_block prom_reconfig_nb = {
.notifier_call = prom_reconfig_notifier,
.priority = 10, /* This one needs to run first */
};

static int __init prom_reconfig_setup(void)
{
return of_reconfig_notifier_register(&prom_reconfig_nb);
}
__initcall(prom_reconfig_setup);
#endif

bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
{
return (int)phys_id == get_hard_smp_processor_id(cpu);
Expand Down
15 changes: 13 additions & 2 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2536,13 +2536,19 @@ void blk_account_io_done(struct request *req)
const int rw = rq_data_dir(req);
struct hd_struct *part;
int cpu;
bool is_mq = !!req->q->mq_ops;

cpu = part_stat_lock();
part = req->part;

if (is_mq)
update_io_ticks(part, jiffies, cpu, true);
part_stat_inc(cpu, part, ios[rw]);
part_stat_add(cpu, part, ticks[rw], duration);
part_round_stats(req->q, cpu, part);
if (!is_mq)
part_round_stats(req->q, cpu, part);
else
part_stat_add(cpu, part, time_in_queue, duration);
part_dec_in_flight(req->q, part, rw);

hd_struct_put(part);
Expand Down Expand Up @@ -2577,6 +2583,7 @@ void blk_account_io_start(struct request *rq, bool new_io)
struct hd_struct *part;
int rw = rq_data_dir(rq);
int cpu;
bool is_mq = !!rq->q->mq_ops;

if (!blk_do_io_stat(rq))
return;
Expand All @@ -2600,11 +2607,15 @@ void blk_account_io_start(struct request *rq, bool new_io)
part = &rq->rq_disk->part0;
hd_struct_get(part);
}
part_round_stats(rq->q, cpu, part);
if (!is_mq)
part_round_stats(rq->q, cpu, part);
part_inc_in_flight(rq->q, part, rw);
rq->part = part;
}

if (is_mq)
update_io_ticks(part, jiffies, cpu, false);

part_stat_unlock();
}

Expand Down
3 changes: 2 additions & 1 deletion block/blk-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ static void blk_account_io_merge(struct request *req)
cpu = part_stat_lock();
part = req->part;

part_round_stats(req->q, cpu, part);
if (!req->q->mq_ops)
part_round_stats(req->q, cpu, part);
part_dec_in_flight(req->q, part, rq_data_dir(req));

hd_struct_put(part);
Expand Down
10 changes: 7 additions & 3 deletions block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1296,9 +1296,13 @@ static int diskstats_show(struct seq_file *seqf, void *v)

disk_part_iter_init(&piter, gp, DISK_PITER_INCL_EMPTY_PART0);
while ((hd = disk_part_iter_next(&piter))) {
cpu = part_stat_lock();
part_round_stats(gp->queue, cpu, hd);
part_stat_unlock();

if (!gp->queue->mq_ops) {
cpu = part_stat_lock();
part_round_stats(gp->queue, cpu, hd);
part_stat_unlock();
}

part_in_flight(gp->queue, hd, inflight);
seq_printf(seqf, "%4d %7d %s %lu %lu %lu "
"%u %lu %lu %lu %u %u %u %u\n",
Expand Down
9 changes: 6 additions & 3 deletions block/partition-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,12 @@ ssize_t part_stat_show(struct device *dev,
unsigned int inflight[2];
int cpu;

cpu = part_stat_lock();
part_round_stats(q, cpu, p);
part_stat_unlock();
if (!q->mq_ops) {
cpu = part_stat_lock();
part_round_stats(q, cpu, p);
part_stat_unlock();
}

part_in_flight(q, p, inflight);
return sprintf(buf,
"%8lu %8lu %8llu %8u "
Expand Down
22 changes: 4 additions & 18 deletions drivers/block/drbd/drbd_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,15 @@ static bool drbd_may_do_local_read(struct drbd_conf *mdev, sector_t sector, int
/* Update disk stats at start of I/O request */
static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req)
{
const int rw = bio_data_dir(req->master_bio);
int cpu;
cpu = part_stat_lock();
part_round_stats(cpu, &mdev->vdisk->part0);
part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], req->i.size >> 9);
(void) cpu; /* The macro invocations above want the cpu argument, I do not like
the compiler warning about cpu only assigned but never used... */
part_inc_in_flight(&mdev->vdisk->part0, rw);
part_stat_unlock();
generic_start_io_acct(mdev->rq_queue, bio_data_dir(req->master_bio), req->i.size >> 9,
&mdev->vdisk->part0);
}

/* Update disk stats when completing request upwards */
static void _drbd_end_io_acct(struct drbd_conf *mdev, struct drbd_request *req)
{
int rw = bio_data_dir(req->master_bio);
unsigned long duration = jiffies - req->start_time;
int cpu;
cpu = part_stat_lock();
part_stat_add(cpu, &mdev->vdisk->part0, ticks[rw], duration);
part_round_stats(cpu, &mdev->vdisk->part0);
part_dec_in_flight(&mdev->vdisk->part0, rw);
part_stat_unlock();
generic_end_io_acct(mdev->rq_queue, bio_data_dir(req->master_bio),
&mdev->vdisk->part0, req->start_time);
}

static struct drbd_request *drbd_req_new(struct drbd_conf *mdev,
Expand Down
29 changes: 4 additions & 25 deletions drivers/block/rsxx/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,37 +112,16 @@ static const struct block_device_operations rsxx_fops = {

static void disk_stats_start(struct rsxx_cardinfo *card, struct bio *bio)
{
struct hd_struct *part0 = &card->gendisk->part0;
int rw = bio_data_dir(bio);
int cpu;

cpu = part_stat_lock();

part_round_stats(card->queue, cpu, part0);
part_inc_in_flight(card->queue, part0, rw);

part_stat_unlock();
generic_start_io_acct(card->queue, bio_data_dir(bio), bio_sectors(bio),
&card->gendisk->part0);
}

static void disk_stats_complete(struct rsxx_cardinfo *card,
struct bio *bio,
unsigned long start_time)
{
struct hd_struct *part0 = &card->gendisk->part0;
unsigned long duration = jiffies - start_time;
int rw = bio_data_dir(bio);
int cpu;

cpu = part_stat_lock();

part_stat_add(cpu, part0, sectors[rw], bio_sectors(bio));
part_stat_inc(cpu, part0, ios[rw]);
part_stat_add(cpu, part0, ticks[rw], duration);

part_round_stats(card->queue, cpu, part0);
part_dec_in_flight(card->queue, part0, rw);

part_stat_unlock();
generic_end_io_acct(card->queue, bio_data_dir(bio), &card->gendisk->part0,
start_time);
}

static void bio_dma_done_cb(struct rsxx_cardinfo *card,
Expand Down
6 changes: 5 additions & 1 deletion drivers/hid/hid-plantronics.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Plantronics USB HID Driver
*
* Copyright (c) 2014 JD Cole <[email protected]>
* Copyright (c) 2015 Terry Junge <[email protected]>
* Copyright (c) 2015-2018 Terry Junge <[email protected]>
*/

/*
Expand Down Expand Up @@ -48,6 +48,10 @@ static int plantronics_input_mapping(struct hid_device *hdev,
unsigned short mapped_key;
unsigned long plt_type = (unsigned long)hid_get_drvdata(hdev);

/* special case for PTT products */
if (field->application == HID_GD_JOYSTICK)
goto defaulted;

/* handle volume up/down mapping */
/* non-standard types or multi-HID interfaces - plt_type is PID */
if (!(plt_type & HID_USAGE_PAGE)) {
Expand Down
7 changes: 5 additions & 2 deletions drivers/hv/channel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ static void vmbus_wait_for_unload(void)
void *page_addr;
struct hv_message *msg;
struct vmbus_channel_message_header *hdr;
u32 message_type;
u32 message_type, i;

/*
* CHANNELMSG_UNLOAD_RESPONSE is always delivered to the CPU which was
Expand All @@ -782,8 +782,11 @@ static void vmbus_wait_for_unload(void)
* functional and vmbus_unload_response() will complete
* vmbus_connection.unload_event. If not, the last thing we can do is
* read message pages for all CPUs directly.
*
* Wait no more than 10 seconds so that the panic path can't get
* hung forever in case the response message isn't seen.
*/
while (1) {
for (i = 0; i < 1000; i++) {
if (completion_done(&vmbus_connection.unload_event))
break;

Expand Down
22 changes: 5 additions & 17 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,16 +505,14 @@ static void start_io_acct(struct dm_io *io)
{
struct mapped_device *md = io->md;
struct bio *bio = io->bio;
int cpu;
int rw = bio_data_dir(bio);

io->start_time = jiffies;

cpu = part_stat_lock();
part_round_stats(md->queue, cpu, &dm_disk(md)->part0);
part_stat_unlock();
generic_start_io_acct(md->queue, rw, bio_sectors(bio), &dm_disk(md)->part0);

atomic_set(&dm_disk(md)->part0.in_flight[rw],
atomic_inc_return(&md->pending[rw]));
atomic_inc_return(&md->pending[rw]));

if (unlikely(dm_stats_used(&md->stats)))
dm_stats_account_io(&md->stats, bio->bi_rw, bio->bi_sector,
Expand All @@ -526,13 +524,10 @@ static void end_io_acct(struct dm_io *io)
struct mapped_device *md = io->md;
struct bio *bio = io->bio;
unsigned long duration = jiffies - io->start_time;
int pending, cpu;
int pending;
int rw = bio_data_dir(bio);

cpu = part_stat_lock();
part_round_stats(md->queue, cpu, &dm_disk(md)->part0);
part_stat_add(cpu, &dm_disk(md)->part0, ticks[rw], duration);
part_stat_unlock();
generic_end_io_acct(md->queue, rw, &dm_disk(md)->part0, io->start_time);

if (unlikely(dm_stats_used(&md->stats)))
dm_stats_account_io(&md->stats, bio->bi_rw, bio->bi_sector,
Expand Down Expand Up @@ -1594,19 +1589,12 @@ static int dm_merge_bvec(struct request_queue *q,
*/
static void dm_make_request(struct request_queue *q, struct bio *bio)
{
int rw = bio_data_dir(bio);
struct mapped_device *md = q->queuedata;
int cpu;
int srcu_idx;
struct dm_table *map;

map = dm_get_live_table(md, &srcu_idx);

cpu = part_stat_lock();
part_stat_inc(cpu, &dm_disk(md)->part0, ios[rw]);
part_stat_add(cpu, &dm_disk(md)->part0, sectors[rw], bio_sectors(bio));
part_stat_unlock();

/* if we're suspended, we have to queue this io for later */
if (unlikely(test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags))) {
dm_put_live_table(md, srcu_idx);
Expand Down
6 changes: 1 addition & 5 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ static void md_make_request(struct request_queue *q, struct bio *bio)
{
const int rw = bio_data_dir(bio);
struct mddev *mddev = q->queuedata;
int cpu;
unsigned int sectors;

if (mddev == NULL || mddev->pers == NULL) {
Expand All @@ -336,10 +335,7 @@ static void md_make_request(struct request_queue *q, struct bio *bio)
bio->bi_rw &= ~REQ_NOMERGE;
md_handle_request(mddev, bio);

cpu = part_stat_lock();
part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]);
part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], sectors);
part_stat_unlock();
generic_start_io_acct(q, rw, sectors, &mddev->gendisk->part0);
}

/* mddev_suspend makes sure no new requests are submitted
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ static int mlx5e_get_module_info(struct net_device *netdev,
break;
case MLX5_MODULE_ID_SFP:
modinfo->type = ETH_MODULE_SFF_8472;
modinfo->eeprom_len = MLX5_EEPROM_PAGE_LENGTH;
modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
break;
default:
netdev_err(priv->netdev, "%s: cable type not recognized:0x%x\n",
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ int mlx5_query_module_eeprom(struct mlx5_core_dev *dev,
size -= offset + size - MLX5_EEPROM_PAGE_LENGTH;

i2c_addr = MLX5_I2C_ADDR_LOW;
if (offset >= MLX5_EEPROM_PAGE_LENGTH) {
i2c_addr = MLX5_I2C_ADDR_HIGH;
offset -= MLX5_EEPROM_PAGE_LENGTH;
}

MLX5_SET(mcia_reg, in, l, 0);
MLX5_SET(mcia_reg, in, module, module_num);
Expand Down
Loading

0 comments on commit 7e1cd70

Please sign in to comment.