From: Hanjun Guo <hanjun.guo@linaro.org>
To: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: linaro-acpi@lists.linaro.org, linux-acpi@vger.kernel.org,
rjw@rjwysocki.net, lenb@kernel.org
Subject: Re: [Linaro-acpi] [RFC] ACPI: Add new function to get table entries
Date: Thu, 20 Mar 2014 16:25:45 +0800 [thread overview]
Message-ID: <532AA609.8050400@linaro.org> (raw)
In-Reply-To: <1395270568-30021-1-git-send-email-ashwin.chaugule@linaro.org>
Hi Ashwin,
On 2014-3-20 7:09, Ashwin Chaugule wrote:
> The acpi_table_parse() function has a callback that
> passes a pointer to a table_header. Add a new function
> which takes this pointer and parses its entries. This
> eliminates the need to re-traverse all the tables for
> each call. e.g. as in acpi_table_parse_madt() which is
> normally called after acpi_table_parse().
>
> Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
> ---
> drivers/acpi/tables.c | 69 +++++++++++++++++++++++++++++++++++----------------
> include/linux/acpi.h | 4 +++
> 2 files changed, 51 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
> index 5837f85..b7bd6a3 100644
> --- a/drivers/acpi/tables.c
> +++ b/drivers/acpi/tables.c
> @@ -199,19 +199,15 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
> }
> }
>
> -
> int __init
> -acpi_table_parse_entries(char *id,
> - unsigned long table_size,
> - int entry_id,
> - acpi_tbl_entry_handler handler,
> - unsigned int max_entries)
> +acpi_parse_entries(unsigned long table_size,
> + acpi_tbl_entry_handler handler,
> + struct acpi_table_header *table_header,
> + int entry_id, unsigned int max_entries)
> {
> - struct acpi_table_header *table_header = NULL;
> struct acpi_subtable_header *entry;
> unsigned int count = 0;
> unsigned long table_end;
> - acpi_size tbl_size;
>
> if (acpi_disabled)
> return -ENODEV;
> @@ -219,16 +215,14 @@ acpi_table_parse_entries(char *id,
> if (!handler)
> return -EINVAL;
>
> - if (strncmp(id, ACPI_SIG_MADT, 4) == 0)
> - acpi_get_table_with_size(id, acpi_apic_instance, &table_header, &tbl_size);
> - else
> - acpi_get_table_with_size(id, 0, &table_header, &tbl_size);
> -
> if (!table_header) {
> - printk(KERN_WARNING PREFIX "%4.4s not present\n", id);
> + pr_warn(PREFIX "Table header not present\n");
Can you rebase this patch on the branch of linux-next of linux-pm tree?
PREFIX was removed by me and I used pr_fmt() instead.
Thanks
Hanjun
next prev parent reply other threads:[~2014-03-20 8:25 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 ` Hanjun Guo [this message]
2014-03-20 13:17 ` [Linaro-acpi] " 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
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=532AA609.8050400@linaro.org \
--to=hanjun.guo@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.