lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACxGe6sKzDzxKUxs2ZVNpf07bzaJSsJ8m+3mdPkU+4mf3EajdQ@mail.gmail.com>
Date:	Thu, 16 Feb 2012 06:23:50 -0700
From:	Grant Likely <grant.likely@...retlab.ca>
To:	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	devicetree-discuss@...ts.ozlabs.org,
	linux-arm-kernel@...ts.infradead.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Milton Miller <miltonm@....com>,
	Rob Herring <rob.herring@...xeda.com>
Cc:	Grant Likely <grant.likely@...retlab.ca>
Subject: Re: [PATCH v5 08/27] irq_domain: Move irq_domain code from powerpc to kernel/irq

On Thu, Feb 16, 2012 at 2:09 AM, Grant Likely <grant.likely@...retlab.ca> wrote:
> This patch only moves the code.  It doesn't make any changes, and the
> code is still only compiled for powerpc.  Follow-on patches will generalize
> the code for other architectures.
>
> Signed-off-by: Grant Likely <grant.likely@...retlab.ca>
> Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Milton Miller <miltonm@....com>
> Tested-by: Olof Johansson <olof@...om.net>
> ---
> +unsigned int irq_find_mapping(struct irq_domain *host,
> +                             irq_hw_number_t hwirq)
> +{
> +       unsigned int i;
> +       unsigned int hint = hwirq % irq_virq_count;
> +
> +       /* Look for default host if nececssary */
> +       if (host == NULL)
> +               host = irq_default_host;
> +       if (host == NULL)
> +               return NO_IRQ;
> +
> +       /* legacy -> bail early */
> +       if (host->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
> +               return hwirq;
> +
> +       /* Slow path does a linear search of the map */
> +       if (hint == 0)
> +               hint = 1;
> +       i = hint;
> +       do {
> +               struct irq_data *data = irq_get_irq_data(i);
> +               if (data && (data->domain == host) && (data->hwirq == hwirq))
> +                       return i;
> +               i++;
> +               if (i >= irq_virq_count)
> +                       i = 1

Typo on this line; missing semicolon.  Fixed in my tree now.

g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ