lkml.org 
[lkml]   [2014]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 4/4] acpi: ioapic: Respect the resource flags
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.

Thanks,

tglx



\
 
 \ /
  Last update: 2014-12-12 09:21    [W:0.071 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site