Skip to content

Commit

Permalink
Merge tag 'v4.9.218' into ten
Browse files Browse the repository at this point in the history
This is the 4.9.218 stable release

Signed-off-by: PainKiller3 <[email protected]>
  • Loading branch information
PainKiller3 committed Apr 3, 2020
2 parents 9867c64 + a5ad06f commit 65b16b4
Show file tree
Hide file tree
Showing 102 changed files with 676 additions and 300 deletions.
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/powerpc/fsl/fman.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ PROPERTIES
Usage: required
Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt

- fsl,erratum-a050385
Usage: optional
Value type: boolean
Definition: A boolean property. Indicates the presence of the
erratum A050385 which indicates that DMA transactions that are
split can result in a FMan lock.

=============================================================================
FMan MURAM Node

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 217
SUBLEVEL = 218
EXTRAVERSION =
NAME = Roaring Lionus

Expand Down
3 changes: 3 additions & 0 deletions arch/arm/boot/dts/dra7.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x0 0x0 0xc0000000>;
dma-ranges = <0x80000000 0x0 0x80000000 0x80000000>;
ti,hwmods = "l3_main_1", "l3_main_2";
reg = <0x0 0x44000000 0x0 0x1000000>,
<0x0 0x45000000 0x0 0x1000>;
Expand Down Expand Up @@ -282,6 +283,7 @@
device_type = "pci";
ranges = <0x81000000 0 0 0x03000 0 0x00010000
0x82000000 0 0x20013000 0x13000 0 0xffed000>;
dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>;
bus-range = <0x00 0xff>;
#interrupt-cells = <1>;
num-lanes = <1>;
Expand Down Expand Up @@ -319,6 +321,7 @@
device_type = "pci";
ranges = <0x81000000 0 0 0x03000 0 0x00010000
0x82000000 0 0x30013000 0x13000 0 0xffed000>;
dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>;
bus-range = <0x00 0xff>;
#interrupt-cells = <1>;
num-lanes = <1>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0 0 0xc0000000>;
dma-ranges = <0x80000000 0x0 0x80000000 0x80000000>;
ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
reg = <0 0x44000000 0 0x2000>,
<0 0x44800000 0 0x3000>,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/alternative.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ alternative_endif

.macro user_alt, label, oldinstr, newinstr, cond
9999: alternative_insn "\oldinstr", "\newinstr", \cond
_ASM_EXTABLE 9999b, \label
_asm_extable 9999b, \label
.endm

/*
Expand Down
13 changes: 12 additions & 1 deletion arch/arm64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,11 +1014,22 @@ void tick_broadcast(const struct cpumask *mask)
}
#endif

/*
* The number of CPUs online, not counting this CPU (which may not be
* fully online and so not counted in num_online_cpus()).
*/
static inline unsigned int num_other_online_cpus(void)
{
unsigned int this_cpu_online = cpu_online(smp_processor_id());

return num_online_cpus() - this_cpu_online;
}

void smp_send_stop(void)
{
unsigned long timeout;

if (num_online_cpus() > 1) {
if (num_other_online_cpus()) {
cpumask_t mask;

cpumask_copy(&mask, cpu_online_mask);
Expand Down
6 changes: 6 additions & 0 deletions arch/powerpc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ SECTIONS
*(.branch_lt)
}

#ifdef CONFIG_DEBUG_INFO_BTF
.BTF : AT(ADDR(.BTF) - LOAD_OFFSET) {
*(.BTF)
}
#endif

.opd : AT(ADDR(.opd) - LOAD_OFFSET) {
*(.opd)
}
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -6564,8 +6564,8 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu)
return 1;
}
else
return x86_emulate_instruction(vcpu, gpa, EMULTYPE_SKIP,
NULL, 0) == EMULATE_DONE;
return emulate_instruction(vcpu, EMULTYPE_SKIP) ==
EMULATE_DONE;
}

ret = kvm_mmu_page_fault(vcpu, gpa, PFERR_RSVD_MASK, NULL, 0);
Expand Down
26 changes: 24 additions & 2 deletions arch/x86/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
return pmd_k;
}

void vmalloc_sync_all(void)
static void vmalloc_sync(void)
{
unsigned long address;

Expand All @@ -312,6 +312,16 @@ void vmalloc_sync_all(void)
}
}

void vmalloc_sync_mappings(void)
{
vmalloc_sync();
}

void vmalloc_sync_unmappings(void)
{
vmalloc_sync();
}

/*
* 32-bit:
*
Expand Down Expand Up @@ -406,11 +416,23 @@ static void dump_pagetable(unsigned long address)

#else /* CONFIG_X86_64: */

void vmalloc_sync_all(void)
void vmalloc_sync_mappings(void)
{
/*
* 64-bit mappings might allocate new p4d/pud pages
* that need to be propagated to all tasks' PGDs.
*/
sync_global_pgds(VMALLOC_START & PGDIR_MASK, VMALLOC_END, 0);
}

void vmalloc_sync_unmappings(void)
{
/*
* Unmappings never allocate or free p4d/pud pages.
* No work is required here.
*/
}

/*
* 64-bit:
*
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/apei/ghes.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static int ghes_estatus_pool_expand(unsigned long len)
* New allocation must be visible in all pgd before it can be found by
* an NMI allocating from the pool.
*/
vmalloc_sync_all();
vmalloc_sync_mappings();

return gen_pool_add(ghes_estatus_pool, addr, PAGE_ALIGN(len), -1);
}
Expand Down
15 changes: 2 additions & 13 deletions drivers/gpu/drm/drm_dp_mst_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,20 +980,9 @@ static struct drm_dp_mst_port *drm_dp_mst_get_port_ref_locked(struct drm_dp_mst_
static struct drm_dp_mst_port *drm_dp_get_validated_port_ref(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port)
{
struct drm_dp_mst_port *rport = NULL;

mutex_lock(&mgr->lock);
/*
* Port may or may not be 'valid' but we don't care about that when
* destroying the port and we are guaranteed that the port pointer
* will be valid until we've finished
*/
if (current_work() == &mgr->destroy_connector_work) {
kref_get(&port->kref);
rport = port;
} else if (mgr->mst_primary) {
rport = drm_dp_mst_get_port_ref_locked(mgr->mst_primary,
port);
}
if (mgr->mst_primary)
rport = drm_dp_mst_get_port_ref_locked(mgr->mst_primary, port);
mutex_unlock(&mgr->lock);
return rport;
}
Expand Down
12 changes: 7 additions & 5 deletions drivers/gpu/drm/exynos/exynos_drm_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,8 +1775,9 @@ static int exynos_dsi_probe(struct platform_device *pdev)
ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(dsi->supplies),
dsi->supplies);
if (ret) {
dev_info(dev, "failed to get regulators: %d\n", ret);
return -EPROBE_DEFER;
if (ret != -EPROBE_DEFER)
dev_info(dev, "failed to get regulators: %d\n", ret);
return ret;
}

dsi->clks = devm_kzalloc(dev,
Expand All @@ -1789,9 +1790,10 @@ static int exynos_dsi_probe(struct platform_device *pdev)
dsi->clks[i] = devm_clk_get(dev, clk_names[i]);
if (IS_ERR(dsi->clks[i])) {
if (strcmp(clk_names[i], "sclk_mipi") == 0) {
strcpy(clk_names[i], OLD_SCLK_MIPI_CLK_NAME);
i--;
continue;
dsi->clks[i] = devm_clk_get(dev,
OLD_SCLK_MIPI_CLK_NAME);
if (!IS_ERR(dsi->clks[i]))
continue;
}

dev_info(dev, "failed to get the clock: %s\n",
Expand Down
6 changes: 3 additions & 3 deletions drivers/hwtracing/intel_th/msu.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ static int msc_configure(struct msc *msc)
lockdep_assert_held(&msc->buf_mutex);

if (msc->mode > MSC_MODE_MULTI)
return -ENOTSUPP;
return -EINVAL;

if (msc->mode == MSC_MODE_MULTI)
msc_buffer_clear_hw_header(msc);
Expand Down Expand Up @@ -948,7 +948,7 @@ static int msc_buffer_alloc(struct msc *msc, unsigned long *nr_pages,
} else if (msc->mode == MSC_MODE_MULTI) {
ret = msc_buffer_multi_alloc(msc, nr_pages, nr_wins);
} else {
ret = -ENOTSUPP;
ret = -EINVAL;
}

if (!ret) {
Expand Down Expand Up @@ -1171,7 +1171,7 @@ static ssize_t intel_th_msc_read(struct file *file, char __user *buf,
if (ret >= 0)
*ppos = iter->offset;
} else {
ret = -ENOTSUPP;
ret = -EINVAL;
}

put_count:
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-hix5hd2.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ static int hix5hd2_i2c_remove(struct platform_device *pdev)
i2c_del_adapter(&priv->adap);
pm_runtime_disable(priv->dev);
pm_runtime_set_suspended(priv->dev);
clk_disable_unprepare(priv->clk);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/magnetometer/ak8974.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ static int ak8974_read_raw(struct iio_dev *indio_dev,
* We read all axes and discard all but one, for optimized
* reading, use the triggered buffer.
*/
*val = le16_to_cpu(hw_values[chan->address]);
*val = (s16)le16_to_cpu(hw_values[chan->address]);

ret = IIO_VAL_INT;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/input/touchscreen/raydium_i2c_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ static int raydium_i2c_write_object(struct i2c_client *client,
return 0;
}

static bool raydium_i2c_boot_trigger(struct i2c_client *client)
static int raydium_i2c_boot_trigger(struct i2c_client *client)
{
static const u8 cmd[7][6] = {
{ 0x08, 0x0C, 0x09, 0x00, 0x50, 0xD7 },
Expand Down Expand Up @@ -469,7 +469,7 @@ static bool raydium_i2c_boot_trigger(struct i2c_client *client)
return 0;
}

static bool raydium_i2c_fw_trigger(struct i2c_client *client)
static int raydium_i2c_fw_trigger(struct i2c_client *client)
{
static const u8 cmd[5][11] = {
{ 0, 0x09, 0x71, 0x0C, 0x09, 0x00, 0x50, 0xD7, 0, 0, 0 },
Expand Down
6 changes: 3 additions & 3 deletions drivers/media/usb/b2c2/flexcop-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb)
return ret;
}

if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints < 1)
return -ENODEV;

switch (fc_usb->udev->speed) {
case USB_SPEED_LOW:
err("cannot handle USB speed because it is too slow.");
Expand Down Expand Up @@ -544,9 +547,6 @@ static int flexcop_usb_probe(struct usb_interface *intf,
struct flexcop_device *fc = NULL;
int ret;

if (intf->cur_altsetting->desc.bNumEndpoints < 1)
return -ENODEV;

if ((fc = flexcop_device_kmalloc(sizeof(struct flexcop_usb))) == NULL) {
err("out of memory\n");
return -ENOMEM;
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/usb/dvb-usb/dib0700_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ int dib0700_rc_setup(struct dvb_usb_device *d, struct usb_interface *intf)

/* Starting in firmware 1.20, the RC info is provided on a bulk pipe */

if (intf->altsetting[0].desc.bNumEndpoints < rc_ep + 1)
if (intf->cur_altsetting->desc.bNumEndpoints < rc_ep + 1)
return -ENODEV;

purb = usb_alloc_urb(0, GFP_KERNEL);
Expand All @@ -832,7 +832,7 @@ int dib0700_rc_setup(struct dvb_usb_device *d, struct usb_interface *intf)
* Some devices like the Hauppauge NovaTD model 52009 use an interrupt
* endpoint, while others use a bulk one.
*/
e = &intf->altsetting[0].endpoint[rc_ep].desc;
e = &intf->cur_altsetting->endpoint[rc_ep].desc;
if (usb_endpoint_dir_in(e)) {
if (usb_endpoint_xfer_bulk(e)) {
pipe = usb_rcvbulkpipe(d->udev, rc_ep);
Expand Down
10 changes: 10 additions & 0 deletions drivers/media/usb/gspca/ov519.c
Original file line number Diff line number Diff line change
Expand Up @@ -3482,6 +3482,11 @@ static void ov511_mode_init_regs(struct sd *sd)
return;
}

if (alt->desc.bNumEndpoints < 1) {
sd->gspca_dev.usb_err = -ENODEV;
return;
}

packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
reg_w(sd, R51x_FIFO_PSIZE, packet_size >> 5);

Expand Down Expand Up @@ -3607,6 +3612,11 @@ static void ov518_mode_init_regs(struct sd *sd)
return;
}

if (alt->desc.bNumEndpoints < 1) {
sd->gspca_dev.usb_err = -ENODEV;
return;
}

packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
ov518_reg_w32(sd, R51x_FIFO_PSIZE, packet_size & ~7, 2);

Expand Down
19 changes: 18 additions & 1 deletion drivers/media/usb/gspca/stv06xx/stv06xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ static int stv06xx_start(struct gspca_dev *gspca_dev)
return -EIO;
}

if (alt->desc.bNumEndpoints < 1)
return -ENODEV;

packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
err = stv06xx_write_bridge(sd, STV_ISO_SIZE_L, packet_size);
if (err < 0)
Expand All @@ -317,11 +320,21 @@ static int stv06xx_start(struct gspca_dev *gspca_dev)

static int stv06xx_isoc_init(struct gspca_dev *gspca_dev)
{
struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;

intfc = gspca_dev->dev->actconfig->intf_cache[0];

if (intfc->num_altsetting < 2)
return -ENODEV;

alt = &intfc->altsetting[1];

if (alt->desc.bNumEndpoints < 1)
return -ENODEV;

/* Start isoc bandwidth "negotiation" at max isoc bandwidth */
alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1];
alt->endpoint[0].desc.wMaxPacketSize =
cpu_to_le16(sd->sensor->max_packet_size[gspca_dev->curr_mode]);

Expand All @@ -334,6 +347,10 @@ static int stv06xx_isoc_nego(struct gspca_dev *gspca_dev)
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;

/*
* Existence of altsetting and endpoint was verified in
* stv06xx_isoc_init()
*/
alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1];
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
min_packet_size = sd->sensor->min_packet_size[gspca_dev->curr_mode];
Expand Down
4 changes: 4 additions & 0 deletions drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ static int pb0100_start(struct sd *sd)
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
if (!alt)
return -ENODEV;

if (alt->desc.bNumEndpoints < 1)
return -ENODEV;

packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);

/* If we don't have enough bandwidth use a lower framerate */
Expand Down
Loading

0 comments on commit 65b16b4

Please sign in to comment.