From patchwork Tue Jul 29 03:27:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 34446 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f199.google.com (mail-ig0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A2741202E4 for ; Tue, 29 Jul 2014 03:28:35 +0000 (UTC) Received: by mail-ig0-f199.google.com with SMTP id l13sf1286542iga.6 for ; Mon, 28 Jul 2014 20:28:35 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=DmljHngv18UNc00RIPmXlb2rC28A6PKgzmsbKhp26yk=; b=humeZYP9FsvgccNxMoHPKIh1ITQoIjQ3JnSaQKqY3qUycd2f2N9U823K473W84/JaW VykU5qKcCaXHeVoRWuyiIJUu0QZH5Kgzq16b6s9maXDMGKqE6izWgPyjmo4VDAWqicFq 46j+e86N487yw8j9EyQTr1ozer8CbihM4dlNJa5UpLeBmCykHxuvzA43U4pXSZ7/joxp b7Q/m5PsZwLfPzwU+SM3cMJOVEphtODrmDLPa0THgLwlDuyQnrNgJOJLpml5Pf1QjW7x WOiGkixYksnSRUOTIRLQppUlSQSm6zwlduRpueyZKd2c4s/J4XHkoBLac4/zHR6S4get 2YDg== X-Gm-Message-State: ALoCoQn73Z+cqcy2tpWgdQVDyD3g5c+g0JH4pXsDLyOBEyzzm3Vproulbh/Bkry6+Ycv9tISptq6 X-Received: by 10.50.73.168 with SMTP id m8mr12546380igv.7.1406604514890; Mon, 28 Jul 2014 20:28:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.226 with SMTP id r89ls2285219qgd.44.gmail; Mon, 28 Jul 2014 20:28:34 -0700 (PDT) X-Received: by 10.53.5.163 with SMTP id cn3mr1144325vdd.3.1406604514689; Mon, 28 Jul 2014 20:28:34 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id 7si13880792vcu.41.2014.07.28.20.28.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 20:28:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id lf12so12447903vcb.40 for ; Mon, 28 Jul 2014 20:28:34 -0700 (PDT) X-Received: by 10.52.116.194 with SMTP id jy2mr1114131vdb.39.1406604514381; Mon, 28 Jul 2014 20:28:34 -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.221.37.5 with SMTP id tc5csp213494vcb; Mon, 28 Jul 2014 20:28:33 -0700 (PDT) X-Received: by 10.66.189.66 with SMTP id gg2mr43435789pac.103.1406604513442; Mon, 28 Jul 2014 20:28:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mk6si19781497pab.91.2014.07.28.20.28.32 for ; Mon, 28 Jul 2014 20:28:33 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752497AbaG2D2T (ORCPT + 26 others); Mon, 28 Jul 2014 23:28:19 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:58973 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751730AbaG2D2R (ORCPT ); Mon, 28 Jul 2014 23:28:17 -0400 Received: by mail-pd0-f174.google.com with SMTP id fp1so10941971pdb.19 for ; Mon, 28 Jul 2014 20:28:17 -0700 (PDT) X-Received: by 10.69.17.230 with SMTP id gh6mr43075673pbd.0.1406604496887; Mon, 28 Jul 2014 20:28:16 -0700 (PDT) Received: from localhost ([183.247.163.231]) by mx.google.com with ESMTPSA id c5sm26716348pdh.93.2014.07.28.20.28.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 28 Jul 2014 20:28:16 -0700 (PDT) From: Hanjun Guo To: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Hanjun Guo Subject: [PATCH] ACPI / processor: Make it possible to get local x2apic id via _MAT Date: Tue, 29 Jul 2014 11:27:50 +0800 Message-Id: <1406604470-4800-1-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 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: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) smtp.mail=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: , Logical processors with APIC ID values of 255 and greater are required to have a Processor Device object and must convey the processor's APIC information to OSPM using the Processor Local X2APIC structure, but not until ACPI 5.1, X2APIC structure was not supported in _MAT method. _MAT is needed for CPU hotplug and system with more than 255 CPUs will definitely need X2APIC structure, so add its support in map_mat_entry() to make it possible to get local x2apic id via _MAT based on ACPI 5.1. Signed-off-by: Hanjun Guo --- drivers/acpi/processor_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 00f48d1..e32321c 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -129,6 +129,8 @@ static int map_mat_entry(acpi_handle handle, int type, u32 acpi_id) map_lapic_id(header, acpi_id, &apic_id); } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) { map_lsapic_id(header, type, acpi_id, &apic_id); + } else if (header->type == ACPI_MADT_TYPE_LOCAL_X2APIC) { + map_x2apic_id(header, type, acpi_id, &apic_id); } exit: