]> Git Repo - linux.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
authorLinus Torvalds <[email protected]>
Wed, 23 May 2012 16:01:41 +0000 (09:01 -0700)
committerLinus Torvalds <[email protected]>
Wed, 23 May 2012 16:01:41 +0000 (09:01 -0700)
Pull UML updates from Richard Weinberger:
 "Most changes are bug fixes and cleanups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: missing checks of __put_user()/__get_user() return values
  um: stub_rt_sigsuspend isn't needed these days anymore
  um/x86: merge (and trim) 32- and 64-bit variants of ptrace.h
  irq: Remove irq_chip->release()
  um: Remove CONFIG_IRQ_RELEASE_METHOD
  um: Remove usage of irq_chip->release()
  um: Implement um_free_irq()
  um: Fix __swp_type()
  um: Implement a custom pte_same() function
  um: Add BUG() to do_ops()'s error path
  um: Remove unused variables
  um: bury unused _TIF_RESTORE_SIGMASK
  um: wrong sigmask saved in case of multiple sigframes
  um: add TIF_NOTIFY_RESUME
  um: ->restart_block.fn needs to be reset on sigreturn

1  2 
kernel/irq/manage.c

diff --combined kernel/irq/manage.c
index 585f6381f8e45367b48c321d2b183890ab3befb5,9b7f68a00e5ebd45ce5514ac43521c1c53f98fdb..bb32326afe8796be6ebbf240fbd3ef4bb1fc8cbe
@@@ -565,8 -565,8 +565,8 @@@ int __irq_set_trigger(struct irq_desc *
                 * IRQF_TRIGGER_* but the PIC does not support multiple
                 * flow-types?
                 */
 -              pr_debug("No set_type function for IRQ %d (%s)\n", irq,
 -                              chip ? (chip->name ? : "unknown") : "unknown");
 +              pr_debug("genirq: No set_type function for IRQ %d (%s)\n", irq,
 +                       chip ? (chip->name ? : "unknown") : "unknown");
                return 0;
        }
  
                ret = 0;
                break;
        default:
 -              pr_err("setting trigger mode %lu for irq %u failed (%pF)\n",
 +              pr_err("genirq: Setting trigger mode %lu for irq %u failed (%pF)\n",
                       flags, irq, chip->irq_set_type);
        }
        if (unmask)
@@@ -837,7 -837,8 +837,7 @@@ void exit_irq_thread(void
  
        action = kthread_data(tsk);
  
 -      printk(KERN_ERR
 -             "exiting task \"%s\" (%d) is an active IRQ thread (irq %d)\n",
 +      pr_err("genirq: exiting task \"%s\" (%d) is an active IRQ thread (irq %d)\n",
               tsk->comm ? tsk->comm : "", tsk->pid, action->irq);
  
        desc = irq_to_desc(action->irq);
@@@ -877,6 -878,7 +877,6 @@@ static in
  __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
  {
        struct irqaction *old, **old_ptr;
 -      const char *old_name = NULL;
        unsigned long flags, thread_mask = 0;
        int ret, nested, shared = 0;
        cpumask_var_t mask;
                 */
                if (!((old->flags & new->flags) & IRQF_SHARED) ||
                    ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) ||
 -                  ((old->flags ^ new->flags) & IRQF_ONESHOT)) {
 -                      old_name = old->name;
 +                  ((old->flags ^ new->flags) & IRQF_ONESHOT))
                        goto mismatch;
 -              }
  
                /* All handlers must agree on per-cpuness */
                if ((old->flags & IRQF_PERCPU) !=
                 * all existing action->thread_mask bits.
                 */
                new->thread_mask = 1 << ffz(thread_mask);
 +
 +      } else if (new->handler == irq_default_primary_handler) {
 +              /*
 +               * The interrupt was requested with handler = NULL, so
 +               * we use the default primary handler for it. But it
 +               * does not have the oneshot flag set. In combination
 +               * with level interrupts this is deadly, because the
 +               * default primary handler just wakes the thread, then
 +               * the irq lines is reenabled, but the device still
 +               * has the level irq asserted. Rinse and repeat....
 +               *
 +               * While this works for edge type interrupts, we play
 +               * it safe and reject unconditionally because we can't
 +               * say for sure which type this interrupt really
 +               * has. The type flags are unreliable as the
 +               * underlying chip implementation can override them.
 +               */
 +              pr_err("genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq %d\n",
 +                     irq);
 +              ret = -EINVAL;
 +              goto out_mask;
        }
  
        if (!shared) {
  
                if (nmsk != omsk)
                        /* hope the handler works with current  trigger mode */
 -                      pr_warning("IRQ %d uses trigger mode %u; requested %u\n",
 +                      pr_warning("genirq: irq %d uses trigger mode %u; requested %u\n",
                                   irq, nmsk, omsk);
        }
  
        return 0;
  
  mismatch:
 -#ifdef CONFIG_DEBUG_SHIRQ
        if (!(new->flags & IRQF_PROBE_SHARED)) {
 -              printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq);
 -              if (old_name)
 -                      printk(KERN_ERR "current handler: %s\n", old_name);
 +              pr_err("genirq: Flags mismatch irq %d. %08x (%s) vs. %08x (%s)\n",
 +                     irq, new->flags, new->name, old->flags, old->name);
 +#ifdef CONFIG_DEBUG_SHIRQ
                dump_stack();
 -      }
  #endif
 +      }
        ret = -EBUSY;
  
  out_mask:
@@@ -1220,12 -1204,6 +1220,6 @@@ static struct irqaction *__free_irq(uns
        /* Found it - now remove it from the list of entries: */
        *action_ptr = action->next;
  
-       /* Currently used only by UML, might disappear one day: */
- #ifdef CONFIG_IRQ_RELEASE_METHOD
-       if (desc->irq_data.chip->release)
-               desc->irq_data.chip->release(irq, dev_id);
- #endif
        /* If this was the last handler, shut down the IRQ line: */
        if (!desc->action)
                irq_shutdown(desc);
This page took 0.101311 seconds and 4 git commands to generate.