public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Yinghai Lu <yinghai@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	the arch/x86 maintainers <x86@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Borislav Petkov <bp@alien8.de>
Subject: Re: [patch 4/4] acpi: ioapic: Respect the resource flags
Date: Wed, 17 Dec 2014 13:44:03 +0800	[thread overview]
Message-ID: <54911823.3030602@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1412121241200.16494@nanos>

Hi Thomas,
	Should I keep the development history or start from scratch
for this ACPI resource patch set?
Thanks!
Gerry

On 2014/12/12 19:43, Thomas Gleixner wrote:
> On Fri, 12 Dec 2014, Jiang Liu wrote:
>> On 2014/12/12 15:53, Thomas Gleixner wrote:
>>> On Thu, 11 Dec 2014, Yinghai Lu wrote:
>>>> On Thu, Dec 11, 2014 at 11:48 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>>>>> +static inline bool is_valid_mem_resource(struct resource *res)
>>>>> +{
>>>>> +       return !(res->flags & IORESOURCE_DISABLED) &&
>>>>> +               (res->flags & IORESOURCE_MEM);
>>>>> +}
>>>>> +
>>>> There is minor problem about mem pref handling, original code will ignore them.
>>>
>>> Bah. I missed that in that well documented function...
>>>
>>>> with this patch will let it follow through.
>>>>
>>>> should change is_valid_mem_resource to is_valid_mem_nonpref_resource()...
>>>>
>>>> +static inline bool is_valid_mem_nonpref_resource(struct resource *res)
>>>>  {
>>>>         return !(res->flags & IORESOURCE_DISABLED) &&
>>>> -               (res->flags & IORESOURCE_MEM);
>>>> +               (res->flags & IORESOURCE_MEM) &&
>>>> +               !(res->flags & IORESOURCE_PREFETCH);
>>>>  }
>>>
>>> Unfortunately that does not help, because nothing sets the
>>> IORESOURCE_PREFETCH flag. Will fix it proper.
>>>
>>> I still have no explanation why the translation offset needs to be
>>> applied here.
>> Hi Thomas,
>> 	I have read related section in ACPI spec, seems the addition
>> of translation_offset is redundant here.
>>
>> Quotation from ACPI spec 5a, 6.4.3.5.1
>> For bridges that translate addresses across the bridge, this is the
>> offset that must be added to the address on the secondary side to
>> obtain the address on the primary side. Non-bridge devices must list
>> 0 for all Address Translation offset bits.
>>
>> Quotation from ACPI spec 5, 9.17 I/O APIC Device:
>> It must also contain a _CRS object that reports the base address of the
>> I/O APIC device. The _CRS object is required to contain only one
>> resource, a memory resource pointing to the I/O APIC register base.
>>
>> IO APIC is not a bridge, so translation_offset should always be zero.
> 
> Right and we really need a proper interface for this on the acpi side,
> so we can avoid all that dance in the usage sites.
> 
> Thanks,
> 
> 	tglx
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

  reply	other threads:[~2014-12-17  5:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11 19:48 [patch 0/4] x86: Fix the ACPI resource handling and range checking Thomas Gleixner
2014-12-11 19:48 ` [patch 1/4] x86, pci, acpi: Redo sanity checks for root brigde probing Thomas Gleixner
2014-12-12 11:33   ` Borislav Petkov
2014-12-11 19:48 ` [patch 2/4] x86: pci: acpi: Respect ioresource flags Thomas Gleixner
2014-12-12 13:39   ` Borislav Petkov
2014-12-11 19:48 ` [patch 3/4] x86: pci: acpi: Fix the range check for IO resources Thomas Gleixner
2014-12-12 14:56   ` Borislav Petkov
2014-12-11 19:48 ` [patch 4/4] acpi: ioapic: Respect the resource flags Thomas Gleixner
2014-12-12  2:44   ` Yinghai Lu
2014-12-12  7:53     ` Thomas Gleixner
2014-12-12  8:24       ` Yinghai Lu
2014-12-12  8:46       ` Jiang Liu
2014-12-12 11:43         ` Thomas Gleixner
2014-12-17  5:44           ` Jiang Liu [this message]
2014-12-17  8:55             ` Thomas Gleixner
2014-12-12 11:39     ` Thomas Gleixner

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=54911823.3030602@linux.intel.com \
    --to=jiang.liu@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yinghai@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