From patchwork Mon Jul 29 13:42:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 18635 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 851DA2395F for ; Mon, 29 Jul 2013 13:42:20 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id a11sf2702964qen.3 for ; Mon, 29 Jul 2013 06:42:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=MK9oXnMGS8TV8RLKdyLSbUHvGMVfcKzkC8k7R5GGhg0=; b=BZVPRCwRAjfoDlOP17j16m4m4m+SF9tJEBAUSJ4XnrQeIcjtag/8CC8OwoHkb+HWvn AtOMbdwzD4pfXLwVFiWnL0D0aMNWS5G1fAAFmJN8MWZ73fmBmQP2A5ZPnt9IGBGW7NKg vigqosxWxnwOf5E3WkGBRn/Aix//10QWEVU9/m6f45Jnu1TGp4JkNccBmUcttmGOt1IU nk9LRPckvea1XP7Ch8exWMuYm1OalFcaUZNAjAlCLRzjmPE9Gh1Op5iojaAgXqiv5EEc /YJFXOn8i0tOksGMaIcwAG3gt/TTfM+ZG4+3HPiU4W4liviJCHExBl0SFSf2prxUXqgc OC8g== X-Received: by 10.236.93.113 with SMTP id k77mr30287582yhf.25.1375105339974; Mon, 29 Jul 2013 06:42:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.25.164 with SMTP id d4ls2112523qeg.34.gmail; Mon, 29 Jul 2013 06:42:19 -0700 (PDT) X-Received: by 10.221.51.206 with SMTP id vj14mr291558vcb.17.1375105339842; Mon, 29 Jul 2013 06:42:19 -0700 (PDT) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by mx.google.com with ESMTPS id fa1si17634857ved.89.2013.07.29.06.42.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 06:42:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.46 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.46; Received: by mail-vb0-f46.google.com with SMTP id p13so304923vbe.5 for ; Mon, 29 Jul 2013 06:42:19 -0700 (PDT) X-Received: by 10.52.180.229 with SMTP id dr5mr1374513vdc.20.1375105339755; Mon, 29 Jul 2013 06:42:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.11.8 with SMTP id pc8csp117036vcb; Mon, 29 Jul 2013 06:42:19 -0700 (PDT) X-Received: by 10.194.84.205 with SMTP id b13mr42416852wjz.92.1375105338729; Mon, 29 Jul 2013 06:42:18 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id ld6si27765527wjb.101.2013.07.29.06.42.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 06:42:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.212.172; Received: by mail-wi0-f172.google.com with SMTP id hj13so878605wib.11 for ; Mon, 29 Jul 2013 06:42:18 -0700 (PDT) X-Received: by 10.194.19.3 with SMTP id a3mr44617723wje.54.1375105338199; Mon, 29 Jul 2013 06:42:18 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id s19sm22605587wik.11.2013.07.29.06.42.16 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 06:42:17 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org, ian.campbell@citrix.com Cc: stefano.stabellini@eu.citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH v2] xen/arm: Clean up identify processor call for secondary cpus Date: Mon, 29 Jul 2013 14:42:13 +0100 Message-Id: <1375105333-15696-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQmxVW4BfxuvKgD3CsSYNVnZhtRJVRLEKxWX5bSqAMistsrDSCENLfgknIHuGj47ovuboRSn X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.46 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The smp_processor_id() is set at the beginning of start_secondary. We don't need to compute ourself the offset of the cpu data. Signed-off-by: Julien Grall --- Changes in v2: - Initalize the current cpu data with boot cpu data --- xen/arch/arm/smpboot.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index 5895178..b6aea63 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -137,15 +137,13 @@ void __cpuinit start_secondary(unsigned long boot_phys_offset, unsigned long fdt_paddr, unsigned long cpuid) { - struct cpuinfo_arm *c = cpu_data + cpuid; - memset(get_cpu_info(), 0, sizeof (struct cpu_info)); /* TODO: handle boards where CPUIDs are not contiguous */ set_processor_id(cpuid); - *c = boot_cpu_data; - identify_cpu(c); + current_cpu_data = boot_cpu_data; + identify_cpu(¤t_cpu_data); init_traps();