From patchwork Wed Mar 26 00:36:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 27091 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 34F8920539 for ; Wed, 26 Mar 2014 00:36:49 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf4663940iec.8 for ; Tue, 25 Mar 2014 17:36:49 -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=p/UukxPj7P+g19lkjtQepJuj7neBLCR8xl3WQS6LGj0=; b=YSG4P5QsoWbLn8n/7pIDe2pl4rE7wvR5Qemg14qe4mIf3QtQs2emjQMDRO0o1Trjsm DeTjvdSiE31DCieC+4nWYy4ZlIGtMCrNdpTBa7Hsn+R+ZSZQbYFcYsO7SZp5MN3O2p07 FXWg241hVxU9XZfKHUjXF5w+rDI794UUTfjOX8mY5LyyI5aWwfyiO/XEb/bRP7qHak0C bL8VPDyNaxbkXGvdHFf5Maz9UiZuT3h6WZesGZv+Weqz+ybF9JODYGq+z6rmWz/PwzMk aln/gUuA/BEHlLpaBvQ8G93BmFJ+3rE5rs3HE1FuA9w+8kFqu4TPykYgqxlXoOlqAI+H OCaw== X-Gm-Message-State: ALoCoQkLEwT2Frstr6geieaxq68deGwzW+6+OXO9mcn/18z0a+oH0uUaU53vIcwZzY4CipdrGKWP X-Received: by 10.182.28.99 with SMTP id a3mr5628071obh.40.1395794209358; Tue, 25 Mar 2014 17:36:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.233 with SMTP id l96ls414255qgl.90.gmail; Tue, 25 Mar 2014 17:36:49 -0700 (PDT) X-Received: by 10.58.201.5 with SMTP id jw5mr55785821vec.6.1395794209273; Tue, 25 Mar 2014 17:36:49 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id j5si918424veb.21.2014.03.25.17.36.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Mar 2014 17:36:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so1554062vcb.35 for ; Tue, 25 Mar 2014 17:36:49 -0700 (PDT) X-Received: by 10.59.9.38 with SMTP id dp6mr9122718ved.24.1395794209196; Tue, 25 Mar 2014 17:36:49 -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.220.78.9 with SMTP id i9csp5419vck; Tue, 25 Mar 2014 17:36:46 -0700 (PDT) X-Received: by 10.66.140.104 with SMTP id rf8mr871072pab.107.1395794206356; Tue, 25 Mar 2014 17:36:46 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be5si12351651pab.404.2014.03.25.17.36.45; Tue, 25 Mar 2014 17:36:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-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 S1753358AbaCZAgo (ORCPT + 8 others); Tue, 25 Mar 2014 20:36:44 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:57785 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753126AbaCZAgn (ORCPT ); Tue, 25 Mar 2014 20:36:43 -0400 Received: by mail-pd0-f172.google.com with SMTP id p10so1156281pdj.3 for ; Tue, 25 Mar 2014 17:36:43 -0700 (PDT) X-Received: by 10.66.65.204 with SMTP id z12mr870061pas.60.1395794203483; Tue, 25 Mar 2014 17:36:43 -0700 (PDT) Received: from localhost ([39.182.23.90]) by mx.google.com with ESMTPSA id gj9sm50385134pbc.7.2014.03.25.17.36.40 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Mar 2014 17:36:42 -0700 (PDT) From: Hanjun Guo To: "Rafael J. Wysocki" Cc: Catalin Marinas , Sudeep Holla , linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH] Revert "ACPI / processor: Make it possible to get APIC ID via GIC" Date: Wed, 26 Mar 2014 08:36:23 +0800 Message-Id: <1395794183-28098-1-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@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=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , This reverts commit df86f5df79d8c2035a88fb985925e49475c0cdca. APIC ID refers the hardware ID of the CPU, which means MPIDR on ARM/ARM64, but in ACPI 5.0, GIC ID feild in GIC structure have no explicit definition and may not refer to the MPIDR. This patch just assume gic->gic_id as MPIDR which is not suitable, revert it for now and wait for the explicit definition of GIC structure is ready. Signed-off-by: Hanjun Guo --- drivers/acpi/processor_core.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 86d73d5..71e2065 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -70,28 +70,6 @@ static int map_lsapic_id(struct acpi_subtable_header *entry, return 0; } -static int map_gic_id(struct acpi_subtable_header *entry, - int device_declaration, u32 acpi_id, int *apic_id) -{ - struct acpi_madt_generic_interrupt *gic = - (struct acpi_madt_generic_interrupt *)entry; - - if (!(gic->flags & ACPI_MADT_ENABLED)) - return -ENODEV; - - /* - * In the GIC interrupt model, logical processors are - * required to have a Processor Device object in the DSDT, - * so we should check device_declaration here - */ - if (device_declaration && (gic->uid == acpi_id)) { - *apic_id = gic->gic_id; - return 0; - } - - return -EINVAL; -} - static int map_madt_entry(int type, u32 acpi_id) { unsigned long madt_end, entry; @@ -127,9 +105,6 @@ static int map_madt_entry(int type, u32 acpi_id) } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) { if (!map_lsapic_id(header, type, acpi_id, &apic_id)) break; - } else if (header->type == ACPI_MADT_TYPE_GENERIC_INTERRUPT) { - if (!map_gic_id(header, type, acpi_id, &apic_id)) - break; } entry += header->length; } @@ -160,8 +135,6 @@ 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_GENERIC_INTERRUPT) { - map_gic_id(header, type, acpi_id, &apic_id); } exit: