Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review/opal irq #185

Closed
wants to merge 28 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
202648a
powerpc: Constify irq_domain_ops
krzk Apr 27, 2015
2222ce0
powerpc/pseries: Fix possible leaked device node reference
nfont Apr 30, 2015
f1e7c20
powerpc: Make STRICT_MM_TYPECHECKS a config option
mpe Mar 25, 2015
5af7a6f
powerpc/pasemi: Only the build the pasemi MSI code for PASEMI=y
mpe Apr 10, 2015
5c0aebf
powerpc: Show utsname->machine in boot-up banner
mpe Apr 15, 2015
e79c838
powerpc: Don't do gcc version checks if we're building with clang
mpe Apr 21, 2015
60e065f
powerpc: Reject binutils 2.24 when building little endian
mpe Apr 23, 2015
63da88d
powerpc/vdso: Remove unused debug code
mpe Apr 22, 2015
6e5c077
powerpc/vdso: Combine start/size variables
mpe Apr 22, 2015
e0d0059
powerpc/vdso: Disable building the 32-bit VDSO on little endian
mpe May 11, 2015
a14ab6b
powerpc/cell: Drop cbe-oss-dev mailing list from MAINTAINERS
mpe May 1, 2015
38c0488
powerpc/powernv: Silence SYSPARAM warning on boot
shenki Apr 30, 2015
ed3e81f
powerpc/eeh: Move PE state constants around
Mar 26, 2015
ec33d36
powerpc/eeh: Introduce eeh_pe_inject_err()
Mar 26, 2015
68cbbc3
drivers/vfio: Support EEH error injection
Mar 26, 2015
3721352
powerpc/eeh: fix start/end/flags type in struct pci_io_addr_range{}
Apr 27, 2015
2ac3990
powerpc/eeh: fix comment for wait_state()
Apr 27, 2015
e17866d
powerpc/eeh: fix powernv_eeh_wait_state delay logic
Apr 27, 2015
f77ceb7
powerpc/eeh: remove unused macro IS_BRIDGE
Apr 27, 2015
636f0ca
powerpc/powernv: Reorder OPAL subsystem initialisation
apopple May 15, 2015
48d4d6a
powerpc/powernv: Add a virtual irqchip for opal events
apopple May 15, 2015
982209d
ipmi/powernv: Convert to irq event interface
apopple May 15, 2015
581db24
hvc: Convert to using interrupts instead of opal events
apopple May 15, 2015
d08367d
powernv/eeh: Update the EEH code to use the opal irq domain
apopple May 15, 2015
b43cd82
powernv/opal: Convert opal message events to opal irq domain
apopple May 15, 2015
f363354
powernv/elog: Convert elog to opal irq domain
apopple May 15, 2015
6afa005
powernv/opal-dump: Convert to irq domain
apopple May 15, 2015
ab7937e
opal: Remove events notifier
apopple May 15, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hvc: Convert to using interrupts instead of opal events
Convert the opal hvc driver to use the new irqchip to register for
opal events. As older firmware versions may not have device tree
bindings for the interrupt parent we just use a hardcoded hwirq based
on the event number.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
apopple authored and mpe committed May 20, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 581db24a97062188b3fffe2a510b6694f0f0f7b6
33 changes: 10 additions & 23 deletions drivers/tty/hvc/hvc_opal.c
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/export.h>
#include <linux/interrupt.h>

#include <asm/hvconsole.h>
#include <asm/prom.h>
@@ -61,7 +62,6 @@ static struct hvc_opal_priv *hvc_opal_privs[MAX_NR_HVC_CONSOLES];
/* For early boot console */
static struct hvc_opal_priv hvc_opal_boot_priv;
static u32 hvc_opal_boot_termno;
static bool hvc_opal_event_registered;

static const struct hv_ops hvc_opal_raw_ops = {
.get_chars = opal_get_chars,
@@ -162,28 +162,15 @@ static const struct hv_ops hvc_opal_hvsi_ops = {
.tiocmset = hvc_opal_hvsi_tiocmset,
};

static int hvc_opal_console_event(struct notifier_block *nb,
unsigned long events, void *change)
{
if (events & OPAL_EVENT_CONSOLE_INPUT)
hvc_kick();
return 0;
}

static struct notifier_block hvc_opal_console_nb = {
.notifier_call = hvc_opal_console_event,
};

static int hvc_opal_probe(struct platform_device *dev)
{
const struct hv_ops *ops;
struct hvc_struct *hp;
struct hvc_opal_priv *pv;
hv_protocol_t proto;
unsigned int termno, boot = 0;
unsigned int termno, irq, boot = 0;
const __be32 *reg;


if (of_device_is_compatible(dev->dev.of_node, "ibm,opal-console-raw")) {
proto = HV_PROTOCOL_RAW;
ops = &hvc_opal_raw_ops;
@@ -227,18 +214,18 @@ static int hvc_opal_probe(struct platform_device *dev)
dev->dev.of_node->full_name,
boot ? " (boot console)" : "");

/* We don't do IRQ ... */
hp = hvc_alloc(termno, 0, ops, MAX_VIO_PUT_CHARS);
irq = opal_event_request(ilog2(OPAL_EVENT_CONSOLE_INPUT));
if (!irq) {
pr_err("hvc_opal: Unable to map interrupt for device %s\n",
dev->dev.of_node->full_name);
return irq;
}

hp = hvc_alloc(termno, irq, ops, MAX_VIO_PUT_CHARS);
if (IS_ERR(hp))
return PTR_ERR(hp);
dev_set_drvdata(&dev->dev, hp);

/* ... but we use OPAL event to kick the console */
if (!hvc_opal_event_registered) {
opal_notifier_register(&hvc_opal_console_nb);
hvc_opal_event_registered = true;
}

return 0;
}