Merge tag 'zynqmp-soc-for-6.8' of https://github.com/Xilinx/linux-xlnx into soc/drivers

arm64: ZynqMP SoC changes for 6.8

power driver:
- Move to remove_new hook
- Report error around unsupported callback
- Fix long messages

event driver:
- Fix cpu_id handling
- Fix warning message

* tag 'zynqmp-soc-for-6.8' of https://github.com/Xilinx/linux-xlnx:
  soc: xilinx: Add error message for invalid payload received from IPI callback.
  soc: xilinx: fix unhandled SGI warning message
  soc: xilinx: fix quoted string split across lines
  soc: xilinx: Fix for call trace due to the usage of smp_processor_id()
  soc/xilinx: zynqmp_power: Convert to platform remove callback returning void

Link: https://lore.kernel.org/r/CAHTX3dJ=6y=vEgmH7Qqe=6TJZT=D-egKDmLLER4fS0=OHJRGZA@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann
2023-12-22 11:15:29 +00:00
2 changed files with 13 additions and 10 deletions
+5 -2
View File
@@ -477,7 +477,7 @@ static void xlnx_call_notify_cb_handler(const u32 *payload)
}
}
if (!is_callback_found)
pr_warn("Didn't find any registered callback for 0x%x 0x%x\n",
pr_warn("Unhandled SGI node 0x%x event 0x%x. Expected with Xen hypervisor\n",
payload[1], payload[2]);
}
@@ -555,7 +555,7 @@ static void xlnx_disable_percpu_irq(void *data)
static int xlnx_event_init_sgi(struct platform_device *pdev)
{
int ret = 0;
int cpu = smp_processor_id();
int cpu;
/*
* IRQ related structures are used for the following:
* for each SGI interrupt ensure its mapped by GIC IRQ domain
@@ -592,9 +592,12 @@ static int xlnx_event_init_sgi(struct platform_device *pdev)
sgi_fwspec.param[0] = sgi_num;
virq_sgi = irq_create_fwspec_mapping(&sgi_fwspec);
cpu = get_cpu();
per_cpu(cpu_number1, cpu) = cpu;
ret = request_percpu_irq(virq_sgi, xlnx_event_handler, "xlnx_event_mgmt",
&cpu_number1);
put_cpu();
WARN_ON(ret);
if (ret) {
irq_dispose_mapping(virq_sgi);
+8 -8
View File
@@ -83,9 +83,11 @@ static irqreturn_t zynqmp_pm_isr(int irq, void *data)
pm_suspend(PM_SUSPEND_MEM);
break;
default:
pr_err("%s Unsupported InitSuspendCb reason "
"code %d\n", __func__, payload[1]);
pr_err("%s Unsupported InitSuspendCb reason code %d\n",
__func__, payload[1]);
}
} else {
pr_err("%s() Unsupported Callback %d\n", __func__, payload[0]);
}
return IRQ_HANDLED;
@@ -252,8 +254,8 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
dev_name(&pdev->dev),
&pdev->dev);
if (ret) {
dev_err(&pdev->dev, "devm_request_threaded_irq '%d' "
"failed with %d\n", irq, ret);
dev_err(&pdev->dev, "devm_request_threaded_irq '%d' failed with %d\n",
irq, ret);
return ret;
}
} else {
@@ -275,7 +277,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
return 0;
}
static int zynqmp_pm_remove(struct platform_device *pdev)
static void zynqmp_pm_remove(struct platform_device *pdev)
{
sysfs_remove_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
if (event_registered)
@@ -283,8 +285,6 @@ static int zynqmp_pm_remove(struct platform_device *pdev)
if (!rx_chan)
mbox_free_channel(rx_chan);
return 0;
}
static const struct of_device_id pm_of_match[] = {
@@ -295,7 +295,7 @@ MODULE_DEVICE_TABLE(of, pm_of_match);
static struct platform_driver zynqmp_pm_platform_driver = {
.probe = zynqmp_pm_probe,
.remove = zynqmp_pm_remove,
.remove_new = zynqmp_pm_remove,
.driver = {
.name = "zynqmp_power",
.of_match_table = pm_of_match,