diff options
author | Justus Winter <justus@gnupg.org> | 2016-02-25 18:59:06 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-02-25 18:59:06 +0100 |
commit | a9d7ef2c7960c871d68e03f1ce1a8958911d1024 (patch) | |
tree | 73fa9c63ee7165441f548e72702bd4d1c51634be /debian/patches/700002-Disable-disabling-the-irq-via-device_intr_enable.patch | |
parent | 0b7beacb64f9cefae6b379ed7d3a34d0de4899cd (diff) |
add patch series
Diffstat (limited to 'debian/patches/700002-Disable-disabling-the-irq-via-device_intr_enable.patch')
-rw-r--r-- | debian/patches/700002-Disable-disabling-the-irq-via-device_intr_enable.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/debian/patches/700002-Disable-disabling-the-irq-via-device_intr_enable.patch b/debian/patches/700002-Disable-disabling-the-irq-via-device_intr_enable.patch new file mode 100644 index 0000000..108b127 --- /dev/null +++ b/debian/patches/700002-Disable-disabling-the-irq-via-device_intr_enable.patch @@ -0,0 +1,65 @@ +From 70e7ce4879aa1b742f4abeb72ce5936e7baa0bf6 Mon Sep 17 00:00:00 2001 +From: Justus Winter <justus@gnupg.org> +Date: Thu, 25 Feb 2016 18:56:43 +0100 +Subject: [PATCH gnumach 2/2] Disable disabling the irq via device_intr_enable + +--- + device/ds_routines.c | 9 ++++----- + include/mach/experimental.defs | 17 ++++++++++------- + 2 files changed, 14 insertions(+), 12 deletions(-) + +diff --git a/device/ds_routines.c b/device/ds_routines.c +index 4f6b345..9d399ee 100644 +--- a/device/ds_routines.c ++++ b/device/ds_routines.c +@@ -1844,11 +1844,10 @@ experimental_device_intr_enable(ipc_port_t master_port, int line, char status) + if (master_port != master_device_port) + return D_INVALID_OPERATION; + +- if (status) +- /* TODO: better name for generic-to-arch-specific call */ +- enable_irq (line); +- else +- disable_irq (line); ++ if (! status) ++ return D_INVALID_OPERATION; ++ ++ enable_irq (line); + return 0; + #endif /* MACH_XEN */ + } +diff --git a/include/mach/experimental.defs b/include/mach/experimental.defs +index ca1eb92..8f5ae18 100644 +--- a/include/mach/experimental.defs ++++ b/include/mach/experimental.defs +@@ -54,17 +54,20 @@ routine device_intr_register( + ); + + /* +- * enable/disable the specified line. ++ * enable the specified line. ++ */ ++/* Is the disable part actually used at all? -- No. */ ++/* AIUI, the kernel IRQ handler should always disable the line; and ++ * the userspace driver only has to reenable it, after acknowledging ++ * and handling the interrupt... ++ * ++ * -- Indeed, and we should change the interface so that the irq is ++ * also re-enabled if the driver crashes. + */ +-/* XXX: Naming a function taht can disable something "xxx_enable" is confusing. */ +-/* Is the disable part actually used at all? AIUI, the kernel IRQ handler +-should always disable the line; and the userspace driver only has to +-reenable it, after acknowledging and handling the interrupt... +-*/ + routine device_intr_enable( + master_port : mach_port_t; + line : int; +- status : char); ++ status : char /* MUST be true-ish */); + + /* + * This routine is created for allocating DMA buffers. +-- +2.1.4 + |