mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KY Srinivasan <kys@microsoft.com>
To: "H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"olaf@aepfle.de" <olaf@aepfle.de>,
	"apw@canonical.com" <apw@canonical.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"JBeulich@suse.com" <JBeulich@suse.com>
Subject: RE: [PATCH V1 1/1] X86: Probe for PIC and set legacy_pic appropriately
Date: Sat, 12 Apr 2014 02:46:23 +0000	[thread overview]
Message-ID: <4ffa16b7f32449d2b445054ce8a51d9e@BY2PR03MB299.namprd03.prod.outlook.com> (raw)
In-Reply-To: <534881DB.40901@zytor.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1499 bytes --]



> -----Original Message-----
> From: H. Peter Anvin [mailto:hpa@zytor.com]
> Sent: Friday, April 11, 2014 4:59 PM
> To: KY Srinivasan; x86@kernel.org; gregkh@linuxfoundation.org; linux-
> kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de;
> apw@canonical.com; jasowang@redhat.com; tglx@linutronix.de;
> JBeulich@suse.com
> Subject: Re: [PATCH V1 1/1] X86: Probe for PIC and set legacy_pic
> appropriately
> 
> On 04/11/2014 05:50 PM, K. Y. Srinivasan wrote:
> >
> > +	/*
> > +	 * Check to see if we have a PIC.
> > +	 * Mask all except the cascade and read
> > +	 * back the value we just wrote. If we don't
> > +	 * have a PIC, we will read 0xff as opposed to the
> > +	 * value we wrote.
> > +	 */
> > +	outb(probe_val, PIC_MASTER_IMR);
> > +	probe_val = inb(PIC_MASTER_IMR);
> > +	if (probe_val == 0xff) {
> > +		printk(KERN_INFO "Using NULL legacy PIC\n");
> > +		legacy_pic = &null_legacy_pic;
> > +		raw_spin_unlock_irqrestore(&i8259A_lock, flags);
> > +		return;
> > +	}
> > +
> >  	outb(0xff, PIC_MASTER_IMR);	/* mask all of 8259A-1 */
> >  	outb(0xff, PIC_SLAVE_IMR);	/* mask all of 8259A-2 */
> >
> 
> Again, I would do at least the slave masking above the probe.
> 
> Also, I would compare to make sure we get the probe_val back and compare
> with != instead of comparing with ==.

Will do.

Thanks,

K. Y

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

      reply	other threads:[~2014-04-12  2:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-12  0:50 K. Y. Srinivasan
2014-04-11 23:59 ` H. Peter Anvin
2014-04-12  2:46   ` KY Srinivasan [this message]

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=4ffa16b7f32449d2b445054ce8a51d9e@BY2PR03MB299.namprd03.prod.outlook.com \
    --to=kys@microsoft.com \
    --cc=JBeulich@suse.com \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®