public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Raghavendra D Prabhu <rprabhu@wnohang.net>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com, jeremy.fitzhardinge@citrix.com,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, Ian Campbell <ijc@hellion.org.uk>
Subject: Re: [Xen-devel] Re: [PATCH] Modpost section mismatch fix
Date: Fri, 8 Jul 2011 01:18:51 +0530	[thread overview]
Message-ID: <20110707194851.GB4394@Xye> (raw)
In-Reply-To: <20110707162454.GA8164@dumpdata.com>

[-- Attachment #1: Type: text/plain, Size: 2841 bytes --]

* On Thu, Jul 07, 2011 at 12:24:54PM -0400, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
>> Tested it. Works now.
>
>Ok, Stuck Tested-by on the patch. Hopefully Linus hasn't pulled it yet.
Ok.
>
>> Reviewed-by: Raghavendra Prabhu <rprabhu@wnohang.net>

>> Also,
>> The condition for acpi_gsi_to_irq can be removed since it always returns zero.
>
>The function might in the future return something that is non-zero
>and we should guard for it. Also you make 'irq' be unsigned which is not
>good as the IRQ 0 is a valid value - and with making it unsigned if it is
>set to -1 (the -1 is the invalid IRQ value) the check for 'irq != gsi'
>will be true and and we will pass in -1 casted to unsigned. That is a
>large value and not the right thing we want to pass to xen_register_gsi.

My rationale for the unsigned part was that acpi_gsi_to_irq always
assigns a positive value (>= 0) to the irq passed (as unsigned
argument). But even otherwise that shouldn't make much of difference I guess.

Also,
I had sent another change (oneline) for the file
arch/x86/xen/platform-pci-unplug.c for check_platform_magic, looks like that has not gone into
the pull request for Linus.
>
>
>> ============================================
>>  diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
>>  index f567965..3faa55b 100644
>>  --- a/arch/x86/pci/xen.c
>>  +++ b/arch/x86/pci/xen.c
>>  @@ -405,7 +405,7 @@ static __init void xen_setup_acpi_sci(void)
>>          int rc;
>>          int trigger, polarity;
>>          int gsi = acpi_sci_override_gsi;
>>  -       int irq = -1;
>>  +       unsigned int irq = 0u;
>>          int gsi_override = -1;

>>          if (!gsi)
>>  @@ -435,11 +435,10 @@ static __init void xen_setup_acpi_sci(void)
>>           * setup as we had setup IRQ 20 for it).
>>           */
>>          /* Check whether the GSI != IRQ */
>>  -       if (acpi_gsi_to_irq(gsi, &irq) == 0) {
>>  -               if (irq >= 0 && irq != gsi)
>>  -                       /* Bugger, we MUST have that IRQ. */
>>  -                       gsi_override = irq;
>>  -       }
>>  +       acpi_gsi_to_irq(gsi, &irq);
>>  +       if (irq != gsi)
>>  +               /* Bugger, we MUST have that IRQ. */
>>  +               gsi_override = irq;

>>          gsi = xen_register_gsi(gsi, gsi_override, trigger, polarity);
>>          printk(KERN_INFO "xen: acpi sci %d\n", gsi);


>> --------------------------
>> Raghavendra Prabhu
>> GPG Id : 0xD72BE977
>> Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
>> www: wnohang.net
>
>
>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>
--------------------------
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2011-07-07 19:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03 23:25 [PATCH] Modpost section mismatch fix Raghavendra D Prabhu
2011-07-04  8:49 ` Ian Campbell
2011-07-04 22:16   ` Raghavendra D Prabhu
2011-07-05 14:13     ` Konrad Rzeszutek Wilk
2011-07-05 14:27       ` [TOME] " Raghavendra D Prabhu
2011-07-05 14:48         ` Konrad Rzeszutek Wilk
2011-07-05 21:32           ` Konrad Rzeszutek Wilk
2011-07-06  8:30             ` [Xen-devel] " Ian Campbell
2011-07-07 15:46             ` Raghavendra D Prabhu
2011-07-07 16:24               ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-07-07 19:48                 ` Raghavendra D Prabhu [this message]
2011-07-07 20:09                   ` Konrad Rzeszutek Wilk
2011-07-07 21:04                     ` Raghavendra D Prabhu
2011-07-08 20:26                       ` [Xen-devel] Re: [PATCH] Modpost section mismatch fix (for platform-pci-unplug.c) Konrad Rzeszutek Wilk
2011-07-09 16:29                         ` [TOME] " Raghavendra D Prabhu
2011-07-11 10:47                         ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110707194851.GB4394@Xye \
    --to=rprabhu@wnohang.net \
    --cc=ijc@hellion.org.uk \
    --cc=jeremy.fitzhardinge@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox