Unverified Commit 74435c13 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3276 linux-4.19.y inclusion

parents 597258b1 bb678e50
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -164,8 +164,8 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
		return 0;

	len = snprintf(modalias, size, "acpi:");
	if (len <= 0)
		return len;
	if (len >= size)
		return -ENOMEM;

	size -= len;

@@ -218,8 +218,10 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
	len = snprintf(modalias, size, "of:N%sT", (char *)buf.pointer);
	ACPI_FREE(buf.pointer);

	if (len <= 0)
		return len;
	if (len >= size)
		return -ENOMEM;

	size -= len;

	of_compatible = acpi_dev->data.of_compatible;
	if (of_compatible->type == ACPI_TYPE_PACKAGE) {
+6 −1
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger,
		      int polarity)
{
	struct irq_fwspec fwspec;
	unsigned int irq;

	if (WARN_ON(!acpi_gsi_domain_id)) {
		pr_warn("GSI: No registered irqchip, giving up\n");
@@ -66,7 +67,11 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger,
	fwspec.param[1] = acpi_dev_get_irq_type(trigger, polarity);
	fwspec.param_count = 2;

	return irq_create_fwspec_mapping(&fwspec);
	irq = irq_create_fwspec_mapping(&fwspec);
	if (!irq)
		return -EINVAL;

	return irq;
}
EXPORT_SYMBOL_GPL(acpi_register_gsi);

+8 −4
Original line number Diff line number Diff line
@@ -140,13 +140,14 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv,
	 * executing it contains RCU usage regarded as invalid in the idle
	 * context, so tell RCU about that.
	 */
	RCU_NONIDLE(tick_freeze());
	tick_freeze();
	/*
	 * The state used here cannot be a "coupled" one, because the "coupled"
	 * cpuidle mechanism enables interrupts and doing that with timekeeping
	 * suspended is generally unsafe.
	 */
	stop_critical_timings();
	rcu_idle_enter();
	drv->states[index].enter_s2idle(dev, drv, index);
	if (WARN_ON_ONCE(!irqs_disabled()))
		local_irq_disable();
@@ -155,7 +156,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv,
	 * first CPU executing it calls functions containing RCU read-side
	 * critical sections, so tell RCU about that.
	 */
	RCU_NONIDLE(tick_unfreeze());
	rcu_idle_exit();
	tick_unfreeze();
	start_critical_timings();

	time_end = ns_to_ktime(local_clock());
@@ -224,16 +226,18 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
	/* Take note of the planned idle state. */
	sched_idle_set_state(target_state);

	trace_cpu_idle_rcuidle(index, dev->cpu);
	trace_cpu_idle(index, dev->cpu);
	time_start = ns_to_ktime(local_clock());

	stop_critical_timings();
	rcu_idle_enter();
	entered_state = target_state->enter(dev, drv, index);
	rcu_idle_exit();
	start_critical_timings();

	sched_clock_idle_wakeup_event();
	time_end = ns_to_ktime(local_clock());
	trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
	trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu);

	/* The cpu is no longer idle or about to enter idle. */
	sched_idle_set_state(NULL);
+3 −7
Original line number Diff line number Diff line
@@ -390,17 +390,13 @@ EXPORT_SYMBOL_GPL(mcb_free_dev);

static int __mcb_bus_add_devices(struct device *dev, void *data)
{
	struct mcb_device *mdev = to_mcb_device(dev);
	int retval;

	if (mdev->is_added)
		return 0;

	retval = device_attach(dev);
	if (retval < 0)
	if (retval < 0) {
		dev_err(dev, "Error adding device (%d)\n", retval);

	mdev->is_added = true;
		return retval;
	}

	return 0;
}
+0 −2
Original line number Diff line number Diff line
@@ -98,8 +98,6 @@ static int chameleon_parse_gdd(struct mcb_bus *bus,
	mdev->mem.end = mdev->mem.start + size - 1;
	mdev->mem.flags = IORESOURCE_MEM;

	mdev->is_added = false;

	ret = mcb_device_register(bus, mdev);
	if (ret < 0)
		goto err;
Loading