From patchwork Wed Sep 16 13:59:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 53746 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 5227D22A0D for ; Wed, 16 Sep 2015 14:01:43 +0000 (UTC) Received: by lagj9 with SMTP id j9sf78550455lag.0 for ; Wed, 16 Sep 2015 07:01:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=u9gLURzD79ETn4Xr8zvDfMJy2w5nk/R6eTCl6Jit8no=; b=MVFI00Utaupx7pcCYIswnu+s0vqeFXseR6yta8Izgl+uWPz0JwHCw8kUTk01x4SuoX +dfz32wVcEatPUAGMaFw952apvC2GSb466X7eIx/isECtxh5mBT9pzWwwCCwZz8d4Ijh Uja7ioWP1oQIZp5TKKoDdknV5vKswf2MvB7bVmJZBPHTxiFArly2IBeFHAZGz1n9Br8e 70iil+uQTxnvIl6tb8p18XKXdhyHlu0dvhldS5b98FDlEBw4OHKK34L2PyO/fHGpQIXj 1qAFoPCbSWC9P6xDXZQowkJupsYymJyLuD3BZYSxGLIRhMxJq3JlbMMqX/poqNLto1Jb F4VQ== X-Gm-Message-State: ALoCoQkbNCHG+Ph2EWhdJLxOmZOMzKW6jdqoR4p9Rcoq1JdiaSF/HRTIJuuSAskcwPbL0O8jI5wG X-Received: by 10.180.89.104 with SMTP id bn8mr2010304wib.4.1442412102286; Wed, 16 Sep 2015 07:01:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.200 with SMTP id h8ls271101lae.48.gmail; Wed, 16 Sep 2015 07:01:41 -0700 (PDT) X-Received: by 10.112.181.162 with SMTP id dx2mr29316533lbc.75.1442412101958; Wed, 16 Sep 2015 07:01:41 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id p6si18301011lag.109.2015.09.16.07.01.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 07:01:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbcao8 with SMTP id ao8so103974083lbc.3 for ; Wed, 16 Sep 2015 07:01:41 -0700 (PDT) X-Received: by 10.112.135.9 with SMTP id po9mr24690251lbb.56.1442412101801; Wed, 16 Sep 2015 07:01:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2473295lbq; Wed, 16 Sep 2015 07:01:40 -0700 (PDT) X-Received: by 10.66.220.2 with SMTP id ps2mr59432590pac.128.1442412100749; Wed, 16 Sep 2015 07:01:40 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pz5si40921229pab.219.2015.09.16.07.01.39; Wed, 16 Sep 2015 07:01:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754176AbbIPOBi (ORCPT + 29 others); Wed, 16 Sep 2015 10:01:38 -0400 Received: from foss.arm.com ([217.140.101.70]:36573 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753835AbbIPN7e (ORCPT ); Wed, 16 Sep 2015 09:59:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BE4C15E9; Wed, 16 Sep 2015 06:59:33 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.207.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 17ADD3F23A; Wed, 16 Sep 2015 06:59:31 -0700 (PDT) From: Sudeep Holla To: linux-acpi@vger.kernel.org, "Rafael J. Wysocki" Cc: Sudeep Holla , linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, x86@kernel.org, Al Stone , Lorenzo Pieralisi , Mahesh Sivasubramanian , Ashwin Chaugule Subject: [PATCH v2 1/5] ACPI / processor : add support for ACPI0010 processor container Date: Wed, 16 Sep 2015 14:59:19 +0100 Message-Id: <1442411963-14398-2-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442411963-14398-1-git-send-email-sudeep.holla@arm.com> References: <1438710406-3822-1-git-send-email-sudeep.holla@arm.com> <1442411963-14398-1-git-send-email-sudeep.holla@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sudeep.holla@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , ACPI 6.0 adds support for optional processor container device which may contain child objects that are either processor devices or other processor containers. This allows representing hierarchical processor topologies. It is declared using the _HID of ACPI0010. It is an abstract container used to represent CPU topology and should not be used to hotplug purposes. This patch enables the support for these ACPI processor containers and ensures the generic container/module devices are not created for them. Cc: "Rafael J. Wysocki" Signed-off-by: Sudeep Holla --- drivers/acpi/acpi_processor.c | 17 +++++++++++++++++ include/acpi/processor.h | 1 + 2 files changed, 18 insertions(+) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 985b8a83184e..6df6c0270cb1 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -496,7 +496,24 @@ static struct acpi_scan_handler processor_handler = { }, }; +static int acpi_processor_container_attach(struct acpi_device *dev, + const struct acpi_device_id *id) +{ + return 1; +} + +static const struct acpi_device_id processor_container_ids[] = { + { ACPI_PROCESSOR_CONTAINER_HID, }, + { } +}; + +static struct acpi_scan_handler processor_container_handler = { + .ids = processor_container_ids, + .attach = acpi_processor_container_attach, +}; + void __init acpi_processor_init(void) { acpi_scan_add_handler_with_hotplug(&processor_handler, "processor"); + acpi_scan_add_handler(&processor_container_handler); } diff --git a/include/acpi/processor.h b/include/acpi/processor.h index ff5f135f16b1..51b61dcdbd9c 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -9,6 +9,7 @@ #define ACPI_PROCESSOR_CLASS "processor" #define ACPI_PROCESSOR_DEVICE_NAME "Processor" #define ACPI_PROCESSOR_DEVICE_HID "ACPI0007" +#define ACPI_PROCESSOR_CONTAINER_HID "ACPI0010" #define ACPI_PROCESSOR_BUSY_METRIC 10