Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 699a3fa2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 4.19.174 into android-4.19-stable



Changes in 4.19.174
	net: dsa: bcm_sf2: put device node before return
	ibmvnic: Ensure that CRQ entry read are correctly ordered
	ACPI: thermal: Do not call acpi_thermal_check() directly
	sysctl: handle overflow in proc_get_long
	net_sched: gen_estimator: support large ewma log
	phy: cpcap-usb: Fix warning for missing regulator_disable
	platform/x86: touchscreen_dmi: Add swap-x-y quirk for Goodix touchscreen on Estar Beauty HD tablet
	platform/x86: intel-vbtn: Support for tablet mode on Dell Inspiron 7352
	x86: __always_inline __{rd,wr}msr()
	scsi: scsi_transport_srp: Don't block target in failfast state
	scsi: libfc: Avoid invoking response handler twice if ep is already completed
	mac80211: fix fast-rx encryption check
	scsi: ibmvfc: Set default timeout to avoid crash during migration
	selftests/powerpc: Only test lwm/stmw on big endian
	objtool: Don't fail on missing symbol table
	kthread: Extract KTHREAD_IS_PER_CPU
	workqueue: Restrict affinity change to rescuer
	Linux 4.19.174

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I97197c2b93cf098202c4cedbe80b86a1268a26c9
parents ba65a97a b6032ab6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
VERSION = 4
PATCHLEVEL = 19
PATCHLEVEL = 19
SUBLEVEL = 173
SUBLEVEL = 174
EXTRAVERSION =
EXTRAVERSION =
NAME = "People's Front"
NAME = "People's Front"


+2 −2
Original line number Original line Diff line number Diff line
@@ -88,7 +88,7 @@ static inline void do_trace_rdpmc(unsigned int msr, u64 val, int failed) {}
 * think of extending them - you will be slapped with a stinking trout or a frozen
 * think of extending them - you will be slapped with a stinking trout or a frozen
 * shark will reach you, wherever you are! You've been warned.
 * shark will reach you, wherever you are! You've been warned.
 */
 */
static inline unsigned long long notrace __rdmsr(unsigned int msr)
static __always_inline unsigned long long __rdmsr(unsigned int msr)
{
{
	DECLARE_ARGS(val, low, high);
	DECLARE_ARGS(val, low, high);


@@ -100,7 +100,7 @@ static inline unsigned long long notrace __rdmsr(unsigned int msr)
	return EAX_EDX_VAL(val, low, high);
	return EAX_EDX_VAL(val, low, high);
}
}


static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high)
static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high)
{
{
	asm volatile("1: wrmsr\n"
	asm volatile("1: wrmsr\n"
		     "2:\n"
		     "2:\n"
+38 −17
Original line number Original line Diff line number Diff line
@@ -188,6 +188,8 @@ struct acpi_thermal {
	int tz_enabled;
	int tz_enabled;
	int kelvin_offset;
	int kelvin_offset;
	struct work_struct thermal_check_work;
	struct work_struct thermal_check_work;
	struct mutex thermal_check_lock;
	refcount_t thermal_check_count;
};
};


/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
@@ -513,17 +515,6 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
	return 0;
	return 0;
}
}


static void acpi_thermal_check(void *data)
{
	struct acpi_thermal *tz = data;

	if (!tz->tz_enabled)
		return;

	thermal_zone_device_update(tz->thermal_zone,
				   THERMAL_EVENT_UNSPECIFIED);
}

/* sys I/F for generic thermal sysfs support */
/* sys I/F for generic thermal sysfs support */


static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
@@ -557,6 +548,8 @@ static int thermal_get_mode(struct thermal_zone_device *thermal,
	return 0;
	return 0;
}
}


static void acpi_thermal_check_fn(struct work_struct *work);

static int thermal_set_mode(struct thermal_zone_device *thermal,
static int thermal_set_mode(struct thermal_zone_device *thermal,
				enum thermal_device_mode mode)
				enum thermal_device_mode mode)
{
{
@@ -582,7 +575,7 @@ static int thermal_set_mode(struct thermal_zone_device *thermal,
		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
			"%s kernel ACPI thermal control\n",
			"%s kernel ACPI thermal control\n",
			tz->tz_enabled ? "Enable" : "Disable"));
			tz->tz_enabled ? "Enable" : "Disable"));
		acpi_thermal_check(tz);
		acpi_thermal_check_fn(&tz->thermal_check_work);
	}
	}
	return 0;
	return 0;
}
}
@@ -951,6 +944,12 @@ static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz)
                                 Driver Interface
                                 Driver Interface
   -------------------------------------------------------------------------- */
   -------------------------------------------------------------------------- */


static void acpi_queue_thermal_check(struct acpi_thermal *tz)
{
	if (!work_pending(&tz->thermal_check_work))
		queue_work(acpi_thermal_pm_queue, &tz->thermal_check_work);
}

static void acpi_thermal_notify(struct acpi_device *device, u32 event)
static void acpi_thermal_notify(struct acpi_device *device, u32 event)
{
{
	struct acpi_thermal *tz = acpi_driver_data(device);
	struct acpi_thermal *tz = acpi_driver_data(device);
@@ -961,17 +960,17 @@ static void acpi_thermal_notify(struct acpi_device *device, u32 event)


	switch (event) {
	switch (event) {
	case ACPI_THERMAL_NOTIFY_TEMPERATURE:
	case ACPI_THERMAL_NOTIFY_TEMPERATURE:
		acpi_thermal_check(tz);
		acpi_queue_thermal_check(tz);
		break;
		break;
	case ACPI_THERMAL_NOTIFY_THRESHOLDS:
	case ACPI_THERMAL_NOTIFY_THRESHOLDS:
		acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS);
		acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS);
		acpi_thermal_check(tz);
		acpi_queue_thermal_check(tz);
		acpi_bus_generate_netlink_event(device->pnp.device_class,
		acpi_bus_generate_netlink_event(device->pnp.device_class,
						  dev_name(&device->dev), event, 0);
						  dev_name(&device->dev), event, 0);
		break;
		break;
	case ACPI_THERMAL_NOTIFY_DEVICES:
	case ACPI_THERMAL_NOTIFY_DEVICES:
		acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES);
		acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES);
		acpi_thermal_check(tz);
		acpi_queue_thermal_check(tz);
		acpi_bus_generate_netlink_event(device->pnp.device_class,
		acpi_bus_generate_netlink_event(device->pnp.device_class,
						  dev_name(&device->dev), event, 0);
						  dev_name(&device->dev), event, 0);
		break;
		break;
@@ -1071,7 +1070,27 @@ static void acpi_thermal_check_fn(struct work_struct *work)
{
{
	struct acpi_thermal *tz = container_of(work, struct acpi_thermal,
	struct acpi_thermal *tz = container_of(work, struct acpi_thermal,
					       thermal_check_work);
					       thermal_check_work);
	acpi_thermal_check(tz);

	if (!tz->tz_enabled)
		return;
	/*
	 * In general, it is not sufficient to check the pending bit, because
	 * subsequent instances of this function may be queued after one of them
	 * has started running (e.g. if _TMP sleeps).  Avoid bailing out if just
	 * one of them is running, though, because it may have done the actual
	 * check some time ago, so allow at least one of them to block on the
	 * mutex while another one is running the update.
	 */
	if (!refcount_dec_not_one(&tz->thermal_check_count))
		return;

	mutex_lock(&tz->thermal_check_lock);

	thermal_zone_device_update(tz->thermal_zone, THERMAL_EVENT_UNSPECIFIED);

	refcount_inc(&tz->thermal_check_count);

	mutex_unlock(&tz->thermal_check_lock);
}
}


static int acpi_thermal_add(struct acpi_device *device)
static int acpi_thermal_add(struct acpi_device *device)
@@ -1103,6 +1122,8 @@ static int acpi_thermal_add(struct acpi_device *device)
	if (result)
	if (result)
		goto free_memory;
		goto free_memory;


	refcount_set(&tz->thermal_check_count, 3);
	mutex_init(&tz->thermal_check_lock);
	INIT_WORK(&tz->thermal_check_work, acpi_thermal_check_fn);
	INIT_WORK(&tz->thermal_check_work, acpi_thermal_check_fn);


	pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device),
	pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device),
@@ -1168,7 +1189,7 @@ static int acpi_thermal_resume(struct device *dev)
		tz->state.active |= tz->trips.active[i].flags.enabled;
		tz->state.active |= tz->trips.active[i].flags.enabled;
	}
	}


	queue_work(acpi_thermal_pm_queue, &tz->thermal_check_work);
	acpi_queue_thermal_check(tz);


	return AE_OK;
	return AE_OK;
}
}
+6 −2
Original line number Original line Diff line number Diff line
@@ -423,15 +423,19 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
	/* Find our integrated MDIO bus node */
	/* Find our integrated MDIO bus node */
	dn = of_find_compatible_node(NULL, NULL, "brcm,unimac-mdio");
	dn = of_find_compatible_node(NULL, NULL, "brcm,unimac-mdio");
	priv->master_mii_bus = of_mdio_find_bus(dn);
	priv->master_mii_bus = of_mdio_find_bus(dn);
	if (!priv->master_mii_bus)
	if (!priv->master_mii_bus) {
		of_node_put(dn);
		return -EPROBE_DEFER;
		return -EPROBE_DEFER;
	}


	get_device(&priv->master_mii_bus->dev);
	get_device(&priv->master_mii_bus->dev);
	priv->master_mii_dn = dn;
	priv->master_mii_dn = dn;


	priv->slave_mii_bus = devm_mdiobus_alloc(ds->dev);
	priv->slave_mii_bus = devm_mdiobus_alloc(ds->dev);
	if (!priv->slave_mii_bus)
	if (!priv->slave_mii_bus) {
		of_node_put(dn);
		return -ENOMEM;
		return -ENOMEM;
	}


	priv->slave_mii_bus->priv = priv;
	priv->slave_mii_bus->priv = priv;
	priv->slave_mii_bus->name = "sf2 slave mii";
	priv->slave_mii_bus->name = "sf2 slave mii";
+6 −0
Original line number Original line Diff line number Diff line
@@ -4434,6 +4434,12 @@ static void ibmvnic_tasklet(void *data)
	while (!done) {
	while (!done) {
		/* Pull all the valid messages off the CRQ */
		/* Pull all the valid messages off the CRQ */
		while ((crq = ibmvnic_next_crq(adapter)) != NULL) {
		while ((crq = ibmvnic_next_crq(adapter)) != NULL) {
			/* This barrier makes sure ibmvnic_next_crq()'s
			 * crq->generic.first & IBMVNIC_CRQ_CMD_RSP is loaded
			 * before ibmvnic_handle_crq()'s
			 * switch(gen_crq->first) and switch(gen_crq->cmd).
			 */
			dma_rmb();
			ibmvnic_handle_crq(crq, adapter);
			ibmvnic_handle_crq(crq, adapter);
			crq->generic.first = 0;
			crq->generic.first = 0;
		}
		}
Loading