All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
To: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: "linaro-acpi@lists.linaro.org" <linaro-acpi@lists.linaro.org>,
	linux-acpi@vger.kernel.org, rjw@rjwysocki.net,
	Len Brown <lenb@kernel.org>
Subject: Re: [Linaro-acpi] [RFC] ACPI: Add new function to get table entries
Date: Thu, 20 Mar 2014 15:59:46 +0100	[thread overview]
Message-ID: <532B0262.3040708@linaro.org> (raw)
In-Reply-To: <CAJ5Y-ebvg=Y0n9FUt2zx+ryCoqTD7kRnNy0A_55NCxaY9zKenA@mail.gmail.com>



On 20.03.2014 15:39, Ashwin Chaugule wrote:
> On 20 March 2014 10:06, Tomasz Nowicki <tomasz.nowicki@linaro.org> wrote:
>> On 20.03.2014 14:27, Ashwin Chaugule wrote:
>>>
>>> On 20 March 2014 06:16, Tomasz Nowicki <tomasz.nowicki@linaro.org> wrote:
>>>
>>>>>> +    return acpi_parse_entries(table_header->length, handler,
>>>>>> table_header,
>>>>>> +            entry_id, max_entries);
>>>>
>>>>
>>>> Also, first argument of acpi_parse_entries() expect subtable start point
>>>> offset, but now it points to the end of table.
>>>>
>>>
>>>
>>> Not sure what you mean. First arg of acpi_parse_entries expects
>>> table_size, not an offset.
>>
>>
>> As I mentioned in previous mail, first args of acpi_parse_entries will lead
>> us to first MADT entry list. By passing table_header->length we will get at
>> the end of MADT entry list. IMO, we should use table_size (snd argument of
>> acpi_table_parse_entries()) instead of table_header->length.
>>
>
> Right. I get the difference between tbl_size and table_header->length.
> But we need to rethink this apci_parse_entries() function and its use
> case again. If the caller is expected to pass tbl_size, then we're
> back full circle to using acpi_get_table_with_size() in the caller,
> which is kinda self defeating. :)

I believe that the most useful case for apci_parse_entries() is when you 
already get table pointer and want to do many things on entries. Then 
you don't have to traverse all ACPI tables list and do map/unmap dance 
over and over again :) and that's what your changelog is saying too :)

Tomasz

  reply	other threads:[~2014-03-20 14:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 23:09 [RFC] ACPI: Add new function to get table entries Ashwin Chaugule
2014-03-20  8:25 ` [Linaro-acpi] " Hanjun Guo
2014-03-20 13:17   ` Ashwin Chaugule
2014-03-20 10:05 ` Tomasz Nowicki
2014-03-20 10:16   ` Tomasz Nowicki
2014-03-20 13:27     ` Ashwin Chaugule
2014-03-20 14:06       ` Tomasz Nowicki
2014-03-20 14:39         ` Ashwin Chaugule
2014-03-20 14:59           ` Tomasz Nowicki [this message]
2014-03-20 13:25   ` Ashwin Chaugule
2014-03-20 13:48     ` Tomasz Nowicki
2014-03-20 13:53       ` Ashwin Chaugule
2014-03-20 14:06         ` Tomasz Nowicki

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=532B0262.3040708@linaro.org \
    --to=tomasz.nowicki@linaro.org \
    --cc=ashwin.chaugule@linaro.org \
    --cc=lenb@kernel.org \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.