Skip to content

Commit 25c43bf

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2 parents a2f0fad + c8d17b4 commit 25c43bf

File tree

38 files changed

+201
-89
lines changed

38 files changed

+201
-89
lines changed

Documentation/kernel-parameters.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
14811481
By default, super page will be supported if Intel IOMMU
14821482
has the capability. With this option, super page will
14831483
not be supported.
1484+
ecs_off [Default Off]
1485+
By default, extended context tables will be supported if
1486+
the hardware advertises that it has support both for the
1487+
extended tables themselves, and also PASID support. With
1488+
this option set, extended tables will not be used even
1489+
on hardware which claims to support them.
14841490

14851491
intel_idle.max_cstate= [KNL,HW,ACPI,X86]
14861492
0 disables intel_idle and fall back on acpi_idle.

Documentation/networking/udplite.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
files/UDP-Lite-HOWTO.txt
2121

2222
o The Wireshark UDP-Lite WiKi (with capture files):
23-
http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol
23+
https://wiki.wireshark.org/Lightweight_User_Datagram_Protocol
2424

2525
o The Protocol Spec, RFC 3828, http://www.ietf.org/rfc/rfc3828.txt
2626

arch/blackfin/include/asm/io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/compiler.h>
1111
#include <linux/types.h>
1212
#include <asm/byteorder.h>
13+
#include <asm/def_LPBlackfin.h>
1314

1415
#define __raw_readb bfin_read8
1516
#define __raw_readw bfin_read16

arch/score/lib/string.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ ENTRY(__clear_user)
175175
br r3
176176

177177
.section .fixup, "ax"
178+
99:
178179
br r3
179180
.previous
180181
.section __ex_table, "a"
181182
.align 2
182-
99:
183183
.word 0b, 99b
184184
.previous

arch/x86/kvm/mmu.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4215,13 +4215,13 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
42154215
u64 entry, gentry, *spte;
42164216
int npte;
42174217
bool remote_flush, local_flush, zap_page;
4218-
union kvm_mmu_page_role mask = (union kvm_mmu_page_role) {
4219-
.cr0_wp = 1,
4220-
.cr4_pae = 1,
4221-
.nxe = 1,
4222-
.smep_andnot_wp = 1,
4223-
.smap_andnot_wp = 1,
4224-
};
4218+
union kvm_mmu_page_role mask = { };
4219+
4220+
mask.cr0_wp = 1;
4221+
mask.cr4_pae = 1;
4222+
mask.nxe = 1;
4223+
mask.smep_andnot_wp = 1;
4224+
mask.smap_andnot_wp = 1;
42254225

42264226
/*
42274227
* If we don't have indirect shadow pages, it means no page is

block/blk-mq.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,7 @@ static int blk_mq_hctx_notify(void *data, unsigned long action,
16001600
return NOTIFY_OK;
16011601
}
16021602

1603+
/* hctx->ctxs will be freed in queue's release handler */
16031604
static void blk_mq_exit_hctx(struct request_queue *q,
16041605
struct blk_mq_tag_set *set,
16051606
struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx)
@@ -1618,7 +1619,6 @@ static void blk_mq_exit_hctx(struct request_queue *q,
16181619

16191620
blk_mq_unregister_cpu_notifier(&hctx->cpu_notifier);
16201621
blk_free_flush_queue(hctx->fq);
1621-
kfree(hctx->ctxs);
16221622
blk_mq_free_bitmap(&hctx->ctx_map);
16231623
}
16241624

@@ -1891,8 +1891,12 @@ void blk_mq_release(struct request_queue *q)
18911891
unsigned int i;
18921892

18931893
/* hctx kobj stays in hctx */
1894-
queue_for_each_hw_ctx(q, hctx, i)
1894+
queue_for_each_hw_ctx(q, hctx, i) {
1895+
if (!hctx)
1896+
continue;
1897+
kfree(hctx->ctxs);
18951898
kfree(hctx);
1899+
}
18961900

18971901
kfree(q->queue_hw_ctx);
18981902

block/genhd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)
422422
/* allocate ext devt */
423423
idr_preload(GFP_KERNEL);
424424

425-
spin_lock(&ext_devt_lock);
425+
spin_lock_bh(&ext_devt_lock);
426426
idx = idr_alloc(&ext_devt_idr, part, 0, NR_EXT_DEVT, GFP_NOWAIT);
427-
spin_unlock(&ext_devt_lock);
427+
spin_unlock_bh(&ext_devt_lock);
428428

429429
idr_preload_end();
430430
if (idx < 0)
@@ -449,9 +449,9 @@ void blk_free_devt(dev_t devt)
449449
return;
450450

451451
if (MAJOR(devt) == BLOCK_EXT_MAJOR) {
452-
spin_lock(&ext_devt_lock);
452+
spin_lock_bh(&ext_devt_lock);
453453
idr_remove(&ext_devt_idr, blk_mangle_minor(MINOR(devt)));
454-
spin_unlock(&ext_devt_lock);
454+
spin_unlock_bh(&ext_devt_lock);
455455
}
456456
}
457457

@@ -690,13 +690,13 @@ struct gendisk *get_gendisk(dev_t devt, int *partno)
690690
} else {
691691
struct hd_struct *part;
692692

693-
spin_lock(&ext_devt_lock);
693+
spin_lock_bh(&ext_devt_lock);
694694
part = idr_find(&ext_devt_idr, blk_mangle_minor(MINOR(devt)));
695695
if (part && get_disk(part_to_disk(part))) {
696696
*partno = part->partno;
697697
disk = part_to_disk(part);
698698
}
699-
spin_unlock(&ext_devt_lock);
699+
spin_unlock_bh(&ext_devt_lock);
700700
}
701701

702702
return disk;

drivers/block/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ config BLK_DEV_RAM_DAX
406406

407407
config BLK_DEV_PMEM
408408
tristate "Persistent memory block device support"
409+
depends on HAS_IOMEM
409410
help
410411
Saying Y here will allow you to use a contiguous range of reserved
411412
memory as one or more persistent block devices.

drivers/block/zram/zram_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,9 @@ static void zram_reset_device(struct zram *zram)
805805
memset(&zram->stats, 0, sizeof(zram->stats));
806806
zram->disksize = 0;
807807
zram->max_comp_streams = 1;
808+
808809
set_capacity(zram->disk, 0);
810+
part_stat_set_all(&zram->disk->part0, 0);
809811

810812
up_write(&zram->init_lock);
811813
/* I/O operation under all of CPU are done so let's free */

drivers/gpu/drm/i915/intel_i2c.c

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
435435
struct intel_gmbus,
436436
adapter);
437437
struct drm_i915_private *dev_priv = bus->dev_priv;
438-
int i, reg_offset;
438+
int i = 0, inc, try = 0, reg_offset;
439439
int ret = 0;
440440

441441
intel_aux_display_runtime_get(dev_priv);
@@ -448,12 +448,14 @@ gmbus_xfer(struct i2c_adapter *adapter,
448448

449449
reg_offset = dev_priv->gpio_mmio_base;
450450

451+
retry:
451452
I915_WRITE(GMBUS0 + reg_offset, bus->reg0);
452453

453-
for (i = 0; i < num; i++) {
454+
for (; i < num; i += inc) {
455+
inc = 1;
454456
if (gmbus_is_index_read(msgs, i, num)) {
455457
ret = gmbus_xfer_index_read(dev_priv, &msgs[i]);
456-
i += 1; /* set i to the index of the read xfer */
458+
inc = 2; /* an index read is two msgs */
457459
} else if (msgs[i].flags & I2C_M_RD) {
458460
ret = gmbus_xfer_read(dev_priv, &msgs[i], 0);
459461
} else {
@@ -525,6 +527,18 @@ gmbus_xfer(struct i2c_adapter *adapter,
525527
adapter->name, msgs[i].addr,
526528
(msgs[i].flags & I2C_M_RD) ? 'r' : 'w', msgs[i].len);
527529

530+
/*
531+
* Passive adapters sometimes NAK the first probe. Retry the first
532+
* message once on -ENXIO for GMBUS transfers; the bit banging algorithm
533+
* has retries internally. See also the retry loop in
534+
* drm_do_probe_ddc_edid, which bails out on the first -ENXIO.
535+
*/
536+
if (ret == -ENXIO && i == 0 && try++ == 0) {
537+
DRM_DEBUG_KMS("GMBUS [%s] NAK on first message, retry\n",
538+
adapter->name);
539+
goto retry;
540+
}
541+
528542
goto out;
529543

530544
timeout:

drivers/gpu/drm/i915/intel_sdvo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2550,7 +2550,7 @@ intel_sdvo_analog_init(struct intel_sdvo *intel_sdvo, int device)
25502550

25512551
DRM_DEBUG_KMS("initialising analog device %d\n", device);
25522552

2553-
intel_sdvo_connector = kzalloc(sizeof(*intel_sdvo_connector), GFP_KERNEL);
2553+
intel_sdvo_connector = intel_sdvo_connector_alloc();
25542554
if (!intel_sdvo_connector)
25552555
return false;
25562556

drivers/gpu/drm/radeon/atombios_crtc.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,6 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
580580
else
581581
radeon_crtc->pll_flags |= RADEON_PLL_PREFER_LOW_REF_DIV;
582582

583-
/* if there is no audio, set MINM_OVER_MAXP */
584-
if (!drm_detect_monitor_audio(radeon_connector_edid(connector)))
585-
radeon_crtc->pll_flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
586583
if (rdev->family < CHIP_RV770)
587584
radeon_crtc->pll_flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
588585
/* use frac fb div on APUs */
@@ -1798,9 +1795,7 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc)
17981795
if ((crtc->mode.clock == test_crtc->mode.clock) &&
17991796
(adjusted_clock == test_adjusted_clock) &&
18001797
(radeon_crtc->ss_enabled == test_radeon_crtc->ss_enabled) &&
1801-
(test_radeon_crtc->pll_id != ATOM_PPLL_INVALID) &&
1802-
(drm_detect_monitor_audio(radeon_connector_edid(test_radeon_crtc->connector)) ==
1803-
drm_detect_monitor_audio(radeon_connector_edid(radeon_crtc->connector))))
1798+
(test_radeon_crtc->pll_id != ATOM_PPLL_INVALID))
18041799
return test_radeon_crtc->pll_id;
18051800
}
18061801
}

drivers/gpu/drm/radeon/radeon_device.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,21 @@ int radeon_device_init(struct radeon_device *rdev,
14631463
if (r)
14641464
DRM_ERROR("ib ring test failed (%d).\n", r);
14651465

1466+
/*
1467+
* Turks/Thames GPU will freeze whole laptop if DPM is not restarted
1468+
* after the CP ring have chew one packet at least. Hence here we stop
1469+
* and restart DPM after the radeon_ib_ring_tests().
1470+
*/
1471+
if (rdev->pm.dpm_enabled &&
1472+
(rdev->pm.pm_method == PM_METHOD_DPM) &&
1473+
(rdev->family == CHIP_TURKS) &&
1474+
(rdev->flags & RADEON_IS_MOBILITY)) {
1475+
mutex_lock(&rdev->pm.mutex);
1476+
radeon_dpm_disable(rdev);
1477+
radeon_dpm_enable(rdev);
1478+
mutex_unlock(&rdev->pm.mutex);
1479+
}
1480+
14661481
if ((radeon_testing & 1)) {
14671482
if (rdev->accel_working)
14681483
radeon_test_moves(rdev);

drivers/gpu/drm/radeon/radeon_vm.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,14 +458,16 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
458458
/* make sure object fit at this offset */
459459
eoffset = soffset + size;
460460
if (soffset >= eoffset) {
461-
return -EINVAL;
461+
r = -EINVAL;
462+
goto error_unreserve;
462463
}
463464

464465
last_pfn = eoffset / RADEON_GPU_PAGE_SIZE;
465466
if (last_pfn > rdev->vm_manager.max_pfn) {
466467
dev_err(rdev->dev, "va above limit (0x%08X > 0x%08X)\n",
467468
last_pfn, rdev->vm_manager.max_pfn);
468-
return -EINVAL;
469+
r = -EINVAL;
470+
goto error_unreserve;
469471
}
470472

471473
} else {
@@ -486,7 +488,8 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
486488
"(bo %p 0x%010lx 0x%010lx)\n", bo_va->bo,
487489
soffset, tmp->bo, tmp->it.start, tmp->it.last);
488490
mutex_unlock(&vm->mutex);
489-
return -EINVAL;
491+
r = -EINVAL;
492+
goto error_unreserve;
490493
}
491494
}
492495

@@ -497,7 +500,8 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
497500
tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL);
498501
if (!tmp) {
499502
mutex_unlock(&vm->mutex);
500-
return -ENOMEM;
503+
r = -ENOMEM;
504+
goto error_unreserve;
501505
}
502506
tmp->it.start = bo_va->it.start;
503507
tmp->it.last = bo_va->it.last;
@@ -555,7 +559,6 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
555559
r = radeon_vm_clear_bo(rdev, pt);
556560
if (r) {
557561
radeon_bo_unref(&pt);
558-
radeon_bo_reserve(bo_va->bo, false);
559562
return r;
560563
}
561564

@@ -575,6 +578,10 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
575578

576579
mutex_unlock(&vm->mutex);
577580
return 0;
581+
582+
error_unreserve:
583+
radeon_bo_unreserve(bo_va->bo);
584+
return r;
578585
}
579586

580587
/**

drivers/input/mouse/synaptics.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ static const struct min_max_quirk min_max_pnpid_table[] = {
150150
{ANY_BOARD_ID, 2961},
151151
1024, 5112, 2024, 4832
152152
},
153+
{
154+
(const char * const []){"LEN2000", NULL},
155+
{ANY_BOARD_ID, ANY_BOARD_ID},
156+
1024, 5113, 2021, 4832
157+
},
153158
{
154159
(const char * const []){"LEN2001", NULL},
155160
{ANY_BOARD_ID, ANY_BOARD_ID},
@@ -191,7 +196,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
191196
"LEN0045",
192197
"LEN0047",
193198
"LEN0049",
194-
"LEN2000",
199+
"LEN2000", /* S540 */
195200
"LEN2001", /* Edge E431 */
196201
"LEN2002", /* Edge E531 */
197202
"LEN2003",

drivers/iommu/intel-iommu.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,14 @@ static int dmar_map_gfx = 1;
422422
static int dmar_forcedac;
423423
static int intel_iommu_strict;
424424
static int intel_iommu_superpage = 1;
425+
static int intel_iommu_ecs = 1;
426+
427+
/* We only actually use ECS when PASID support (on the new bit 40)
428+
* is also advertised. Some early implementations — the ones with
429+
* PASID support on bit 28 — have issues even when we *only* use
430+
* extended root/context tables. */
431+
#define ecs_enabled(iommu) (intel_iommu_ecs && ecap_ecs(iommu->ecap) && \
432+
ecap_pasid(iommu->ecap))
425433

426434
int intel_iommu_gfx_mapped;
427435
EXPORT_SYMBOL_GPL(intel_iommu_gfx_mapped);
@@ -465,6 +473,10 @@ static int __init intel_iommu_setup(char *str)
465473
printk(KERN_INFO
466474
"Intel-IOMMU: disable supported super page\n");
467475
intel_iommu_superpage = 0;
476+
} else if (!strncmp(str, "ecs_off", 7)) {
477+
printk(KERN_INFO
478+
"Intel-IOMMU: disable extended context table support\n");
479+
intel_iommu_ecs = 0;
468480
}
469481

470482
str += strcspn(str, ",");
@@ -669,7 +681,7 @@ static inline struct context_entry *iommu_context_addr(struct intel_iommu *iommu
669681
struct context_entry *context;
670682
u64 *entry;
671683

672-
if (ecap_ecs(iommu->ecap)) {
684+
if (ecs_enabled(iommu)) {
673685
if (devfn >= 0x80) {
674686
devfn -= 0x80;
675687
entry = &root->hi;
@@ -806,7 +818,7 @@ static void free_context_table(struct intel_iommu *iommu)
806818
if (context)
807819
free_pgtable_page(context);
808820

809-
if (!ecap_ecs(iommu->ecap))
821+
if (!ecs_enabled(iommu))
810822
continue;
811823

812824
context = iommu_context_addr(iommu, i, 0x80, 0);
@@ -1141,7 +1153,7 @@ static void iommu_set_root_entry(struct intel_iommu *iommu)
11411153
unsigned long flag;
11421154

11431155
addr = virt_to_phys(iommu->root_entry);
1144-
if (ecap_ecs(iommu->ecap))
1156+
if (ecs_enabled(iommu))
11451157
addr |= DMA_RTADDR_RTT;
11461158

11471159
raw_spin_lock_irqsave(&iommu->register_lock, flag);

0 commit comments

Comments
 (0)