From patchwork Mon Jul 29 16:06:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 18646 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 49F1E2486F for ; Mon, 29 Jul 2013 16:06:14 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oz10sf5052993veb.11 for ; Mon, 29 Jul 2013 09:06:13 -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=jt5OJWwyP5tcJ9Uig4ny8E2OMGeJAVHwItVc7Yn2Fr8=; b=RUPfD820f38dbYvwQb7yHjg1w+6CKOlkA8ZxlrQ7OHK/6s3X6bGx83vPwPXvcmqfqW F1bgsxuG1pZjPTV1yhuXAOkZjZ5G2jYf+84+TrbjGGvF0vqVgwyCUsh25fCrzIEsSEm+ Hh2l8IeadyP6XcgqYPHXXdFGTaGalJ2yJlbLgM1SOXjoIASn8uEVIZ90dj+JeexcP4nG PK+66+5S/WhBzoZet+rHZKXQZQHH1uYiFdjbifgq6vUuA43Hv966kFtq7bUsDo4zYaHY rYei6FdL5ffu7cGlN9eNn9NyF9/swm+2lcrSESqzUDjGKuleUp3pNTNfRPuHoW4Yuc/n sz3A== X-Received: by 10.58.28.243 with SMTP id e19mr6260609veh.5.1375113973816; Mon, 29 Jul 2013 09:06:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.59.111 with SMTP id y15ls1882268qeq.96.gmail; Mon, 29 Jul 2013 09:06:13 -0700 (PDT) X-Received: by 10.52.121.7 with SMTP id lg7mr21664866vdb.68.1375113973659; Mon, 29 Jul 2013 09:06:13 -0700 (PDT) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id u9si5731043vcl.29.2013.07.29.09.06.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 09:06:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.47 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.47; Received: by mail-vb0-f47.google.com with SMTP id h10so2852582vbh.6 for ; Mon, 29 Jul 2013 09:06:13 -0700 (PDT) X-Received: by 10.52.109.69 with SMTP id hq5mr8204442vdb.85.1375113973576; Mon, 29 Jul 2013 09:06:13 -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 pc8csp123870vcb; Mon, 29 Jul 2013 09:06:13 -0700 (PDT) X-Received: by 10.180.104.10 with SMTP id ga10mr7617468wib.35.1375113972532; Mon, 29 Jul 2013 09:06:12 -0700 (PDT) Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by mx.google.com with ESMTPS id cr3si6938355wib.14.2013.07.29.09.06.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 09:06:12 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.179 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.179; Received: by mail-we0-f179.google.com with SMTP id t57so4058601wes.24 for ; Mon, 29 Jul 2013 09:06:12 -0700 (PDT) X-Received: by 10.180.13.43 with SMTP id e11mr2478058wic.21.1375113971903; Mon, 29 Jul 2013 09:06:11 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id z2sm23398962wiv.11.2013.07.29.09.06.09 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 09:06:10 -0700 (PDT) From: Julien Grall To: stefano.stabellini@eu.citrix.com Cc: ian.campbell@citrix.com, patches@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xen-devel@lists.xen.org, Julien Grall Subject: [PATCH] xen/arm: missing put_cpu in xen_percpu_init Date: Mon, 29 Jul 2013 17:06:05 +0100 Message-Id: <1375113966-2859-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQm8sO/zk34zoprc+HoZDyZs+SqRUjXNgr/T1uKENnE0EYLPtZZ1E6wyo+H1OJRJQ1iLvLVd X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.47 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: , When CONFIG_PREEMPT is enabled, Linux will not be able to boot and warn: [ 4.127825] ------------[ cut here ]------------ [ 4.133376] WARNING: at init/main.c:699 do_one_initcall+0x150/0x158() [ 4.140738] initcall xen_init_events+0x0/0x10c returned with preemption imbalance This is because xen_percpu_init uses get_cpu but doesn't have the corresponding put_cpu. Signed-off-by: Julien Grall --- arch/arm/xen/enlighten.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index f71c37e..dc9f284 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -170,6 +170,7 @@ static void __init xen_percpu_init(void *unused) per_cpu(xen_vcpu, cpu) = vcpup; enable_percpu_irq(xen_events_irq, 0); + put_cpu(); } static void xen_restart(char str, const char *cmd)