From patchwork Tue Sep 8 11:07:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: lukasz.anaczkowski@intel.com X-Patchwork-Id: 7140161 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ED994BEEC1 for ; Tue, 8 Sep 2015 11:10:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23486206D6 for ; Tue, 8 Sep 2015 11:10:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47D8F206B5 for ; Tue, 8 Sep 2015 11:10:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754596AbbIHLIQ (ORCPT ); Tue, 8 Sep 2015 07:08:16 -0400 Received: from mga01.intel.com ([192.55.52.88]:4262 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753367AbbIHLIP (ORCPT ); Tue, 8 Sep 2015 07:08:15 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 08 Sep 2015 04:08:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,489,1437462000"; d="scan'208";a="557469554" Received: from gklab-125-033.igk.intel.com ([10.91.125.33]) by FMSMGA003.fm.intel.com with ESMTP; 08 Sep 2015 04:08:10 -0700 From: Lukasz Anaczkowski To: marc.zyngier@arm.com, lorenzo.pieralisi@arm.com, tomasz.nowicki@linaro.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, jason@lakedaemon.net Cc: rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Lukasz Anaczkowski Subject: [PATCH 1/4] acpi: rename acpi_table_parse_entries Date: Tue, 8 Sep 2015 13:07:57 +0200 Message-Id: <1441710480-17622-3-git-send-email-lukasz.anaczkowski@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1441710480-17622-2-git-send-email-lukasz.anaczkowski@intel.com> References: <20150827093738.GA21134@red-moon> <1441710480-17622-1-git-send-email-lukasz.anaczkowski@intel.com> <1441710480-17622-2-git-send-email-lukasz.anaczkowski@intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ACPI subtable parsing needs to be extended to allow two or more handlers to be run in the same ACPI table walk. This is needed to fix CPU enumeration when APIC/X2APIC entries are interleaved. Signed-off-by: Lukasz Anaczkowski --- drivers/acpi/tables.c | 13 ++++++++++++- include/linux/acpi.h | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 2e19189..aa8bcc6 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -277,7 +277,7 @@ acpi_parse_entries(char *id, unsigned long table_size, } int __init -acpi_table_parse_entries(char *id, +acpi_table_parse_entries_array(char *id, unsigned long table_size, int entry_id, acpi_tbl_entry_handler handler, @@ -311,6 +311,17 @@ acpi_table_parse_entries(char *id, } int __init +acpi_table_parse_entries(char *id, + unsigned long table_size, + int entry_id, + acpi_tbl_entry_handler handler, + unsigned int max_entries) +{ + return acpi_table_parse_entries_array(id, table_size, entry_id, + handler, max_entries); +} + +int __init acpi_table_parse_madt(enum acpi_madt_type id, acpi_tbl_entry_handler handler, unsigned int max_entries) { diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d2445fa..07fd1d1 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -153,6 +153,10 @@ int __init acpi_table_parse_entries(char *id, unsigned long table_size, int entry_id, acpi_tbl_entry_handler handler, unsigned int max_entries); +int __init acpi_table_parse_entries_array(char *id, unsigned long table_size, + int entry_id, + acpi_tbl_entry_handler handler, + unsigned int max_entries); int acpi_table_parse_madt(enum acpi_madt_type id, acpi_tbl_entry_handler handler, unsigned int max_entries);