Skip to content

Commit

Permalink
Automatic merge of 'next-test' into merge-test (2024-04-12 22:18)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpe committed Apr 12, 2024
2 parents e4c505f + 676abf7 commit c5c9f7c
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 34 deletions.
3 changes: 2 additions & 1 deletion arch/powerpc/Kbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror -Wa,--fatal-warnings
subdir-asflags-$(CONFIG_PPC_WERROR) := -Wa,--fatal-warnings

obj-y += kernel/
obj-y += mm/
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ static void __init cpu_init_thread_core_maps(int tpc)
cpumask_set_cpu(i, &threads_core_mask);

printk(KERN_INFO "CPU maps initialized for %d thread%s per core\n",
tpc, tpc > 1 ? "s" : "");
tpc, str_plural(tpc));
printk(KERN_DEBUG " (thread shift is %d)\n", threads_shift);
}

Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/platforms/52xx/mpc52xx_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@

#undef DEBUG

#include <linux/gpio.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/of_gpio.h>
#include <linux/export.h>
#include <asm/io.h>
#include <asm/mpc52xx.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/52xx/mpc52xx_gpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
* the output mode. This driver does not change the output mode setting.
*/

#include <linux/gpio/driver.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/io.h>
Expand All @@ -56,7 +57,6 @@
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_gpio.h>
#include <linux/platform_device.h>
#include <linux/kernel.h>
#include <linux/property.h>
Expand Down
61 changes: 32 additions & 29 deletions arch/powerpc/platforms/ps3/device-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,49 +770,51 @@ static struct task_struct *probe_task;

static int ps3_probe_thread(void *data)
{
struct ps3_notification_device dev;
struct {
struct ps3_notification_device dev;
u8 buf[512];
} *local;
struct ps3_notify_cmd *notify_cmd;
struct ps3_notify_event *notify_event;
int res;
unsigned int irq;
u64 lpar;
void *buf;
struct ps3_notify_cmd *notify_cmd;
struct ps3_notify_event *notify_event;

pr_debug(" -> %s:%u: kthread started\n", __func__, __LINE__);

buf = kzalloc(512, GFP_KERNEL);
if (!buf)
local = kzalloc(sizeof(*local), GFP_KERNEL);
if (!local)
return -ENOMEM;

lpar = ps3_mm_phys_to_lpar(__pa(buf));
notify_cmd = buf;
notify_event = buf;
lpar = ps3_mm_phys_to_lpar(__pa(&local->buf));
notify_cmd = (struct ps3_notify_cmd *)&local->buf;
notify_event = (struct ps3_notify_event *)&local->buf;

/* dummy system bus device */
dev.sbd.bus_id = (u64)data;
dev.sbd.dev_id = PS3_NOTIFICATION_DEV_ID;
dev.sbd.interrupt_id = PS3_NOTIFICATION_INTERRUPT_ID;
local->dev.sbd.bus_id = (u64)data;
local->dev.sbd.dev_id = PS3_NOTIFICATION_DEV_ID;
local->dev.sbd.interrupt_id = PS3_NOTIFICATION_INTERRUPT_ID;

res = lv1_open_device(dev.sbd.bus_id, dev.sbd.dev_id, 0);
res = lv1_open_device(local->dev.sbd.bus_id, local->dev.sbd.dev_id, 0);
if (res) {
pr_err("%s:%u: lv1_open_device failed %s\n", __func__,
__LINE__, ps3_result(res));
goto fail_free;
}

res = ps3_sb_event_receive_port_setup(&dev.sbd, PS3_BINDING_CPU_ANY,
&irq);
res = ps3_sb_event_receive_port_setup(&local->dev.sbd,
PS3_BINDING_CPU_ANY, &irq);
if (res) {
pr_err("%s:%u: ps3_sb_event_receive_port_setup failed %d\n",
__func__, __LINE__, res);
goto fail_close_device;
}

spin_lock_init(&dev.lock);
rcuwait_init(&dev.wait);
spin_lock_init(&local->dev.lock);
rcuwait_init(&local->dev.wait);

res = request_irq(irq, ps3_notification_interrupt, 0,
"ps3_notification", &dev);
"ps3_notification", &local->dev);
if (res) {
pr_err("%s:%u: request_irq failed %d\n", __func__, __LINE__,
res);
Expand All @@ -823,7 +825,7 @@ static int ps3_probe_thread(void *data)
notify_cmd->operation_code = 0; /* must be zero */
notify_cmd->event_mask = 1UL << notify_region_probe;

res = ps3_notification_read_write(&dev, lpar, 1);
res = ps3_notification_read_write(&local->dev, lpar, 1);
if (res)
goto fail_free_irq;

Expand All @@ -834,36 +836,37 @@ static int ps3_probe_thread(void *data)

memset(notify_event, 0, sizeof(*notify_event));

res = ps3_notification_read_write(&dev, lpar, 0);
res = ps3_notification_read_write(&local->dev, lpar, 0);
if (res)
break;

pr_debug("%s:%u: notify event type 0x%llx bus id %llu dev id %llu"
" type %llu port %llu\n", __func__, __LINE__,
notify_event->event_type, notify_event->bus_id,
notify_event->dev_id, notify_event->dev_type,
notify_event->dev_port);
notify_event->event_type, notify_event->bus_id,
notify_event->dev_id, notify_event->dev_type,
notify_event->dev_port);

if (notify_event->event_type != notify_region_probe ||
notify_event->bus_id != dev.sbd.bus_id) {
notify_event->bus_id != local->dev.sbd.bus_id) {
pr_warn("%s:%u: bad notify_event: event %llu, dev_id %llu, dev_type %llu\n",
__func__, __LINE__, notify_event->event_type,
notify_event->dev_id, notify_event->dev_type);
continue;
}

ps3_find_and_add_device(dev.sbd.bus_id, notify_event->dev_id);
ps3_find_and_add_device(local->dev.sbd.bus_id,
notify_event->dev_id);

} while (!kthread_should_stop());

fail_free_irq:
free_irq(irq, &dev);
free_irq(irq, &local->dev);
fail_sb_event_receive_port_destroy:
ps3_sb_event_receive_port_destroy(&dev.sbd, irq);
ps3_sb_event_receive_port_destroy(&local->dev.sbd, irq);
fail_close_device:
lv1_close_device(dev.sbd.bus_id, dev.sbd.dev_id);
lv1_close_device(local->dev.sbd.bus_id, local->dev.sbd.dev_id);
fail_free:
kfree(buf);
kfree(local);

probe_task = NULL;

Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/sysdev/fsl_msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,12 @@ static const struct fsl_msi_feature ipic_msi_feature = {
.msiir_offset = 0x38,
};

#ifdef CONFIG_EPAPR_PARAVIRT
static const struct fsl_msi_feature vmpic_msi_feature = {
.fsl_pic_ip = FSL_PIC_IP_VMPIC,
.msiir_offset = 0,
};
#endif

static const struct of_device_id fsl_of_msi_ids[] = {
{
Expand Down

0 comments on commit c5c9f7c

Please sign in to comment.