From patchwork Thu Apr 11 20:42:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16050 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8A829238FF for ; Thu, 11 Apr 2013 20:43:23 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id p7sf2654317qcq.2 for ; Thu, 11 Apr 2013 13:43:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references: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=9wxM7Q2/6fKPWIyrG42n3pLDISYZ4Vzg2vLg8DVBGso=; b=I4B2dqOV2gZ8Q4eegKEmtq8rX/TchOEUSJmis/QKehgieV631aF5VSqXyktD2lfWef r/VJScKf7Xd97TNLs+2wVz2r2VjioAHLW0sZ81Pd78k2M79Lt4uCH0VplmyN+ZG9XcyH MpMoyqXm1/RmIE1uYZXZjdEYM0X8x3AvtVTrfutipZuOSrK+Itxy+t+/NQsS9uEqzGfH NOWqAhmWCveDjxerY4v/EgBEEfNnvEwifS2lh2hJk8tsvh9/GCcXL93pDsiOXSE5pcHI YDF3KHmDtzsiaguDn65BQ3zFVC9HV10xzMVtHpz8GsGXKlcO0DqVVOeVvORL29juEiTA 2s6g== X-Received: by 10.236.31.100 with SMTP id l64mr4038271yha.32.1365712981561; Thu, 11 Apr 2013 13:43:01 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.98.101 with SMTP id eh5ls1076627qeb.95.gmail; Thu, 11 Apr 2013 13:43:01 -0700 (PDT) X-Received: by 10.220.248.200 with SMTP id mh8mr6286043vcb.51.1365712981394; Thu, 11 Apr 2013 13:43:01 -0700 (PDT) Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [2607:f8b0:400c:c02::22e]) by mx.google.com with ESMTPS id oy17si4379645vcb.56.2013.04.11.13.43.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:01 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22e; Received: by mail-vb0-f46.google.com with SMTP id 11so1578547vbe.19 for ; Thu, 11 Apr 2013 13:43:01 -0700 (PDT) X-Received: by 10.220.214.6 with SMTP id gy6mr6318431vcb.8.1365712980986; Thu, 11 Apr 2013 13:43:00 -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.58.127.98 with SMTP id nf2csp38009veb; Thu, 11 Apr 2013 13:43:00 -0700 (PDT) X-Received: by 10.194.89.234 with SMTP id br10mr13332554wjb.43.1365712979730; Thu, 11 Apr 2013 13:42:59 -0700 (PDT) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [2a00:1450:400c:c03::233]) by mx.google.com with ESMTPS id o4si2145686wjo.79.2013.04.11.13.42.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:42:59 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::233 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c03::233; Received: by mail-we0-f179.google.com with SMTP id p43so1530472wea.38 for ; Thu, 11 Apr 2013 13:42:59 -0700 (PDT) X-Received: by 10.180.82.33 with SMTP id f1mr36449984wiy.13.1365712979272; Thu, 11 Apr 2013 13:42:59 -0700 (PDT) Received: from mai.home (AToulouse-654-1-501-244.w83-205.abo.wanadoo.fr. [83.205.84.244]) by mx.google.com with ESMTPS id fv2sm5794029wib.6.2013.04.11.13.42.56 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:42:58 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Cc: linus.walleij@linaro.org, jason@lakedaemon.net, andrew@lunn.ch, kernel@pengutronix.de, swarren@wwwdotorg.org, santosh.shilimkar@ti.com, nicolas.ferre@atmel.com, plagnioj@jcrosoft.com, linux@maxim.org.za, rob.herring@calxeda.com, nsekhar@ti.com, horms@verge.net.au, magnus.damm@gmail.com, deepthi@linux.vnet.ibm.com, lethal@linux-sh.org, jkosina@suse.cz, kgene.kim@samsung.com, khilman@deeprootsystems.com, tony@atomide.com, linux-pm@vger.kernel.org, patches@linaro.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, josephl@nvidia.com Subject: [V2 patch 02/19] ARM: OMAP3: remove cpuidle_wrap_enter Date: Thu, 11 Apr 2013 22:42:32 +0200 Message-Id: <1365712969-7541-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365712969-7541-1-git-send-email-daniel.lezcano@linaro.org> References: <1365712969-7541-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQkxnZXgCWhQ1lMswge17EbplDWPfJlkp6gMvMvLcZdubmTpNNQC7Lmk2i+53NdoJblvsf7x X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22e 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: , In a previous commit the en_core_tk_irqen flag has been added but we missed the cpuidle_wrap_enter which was doing the job to measure the time for the 'omap3_enter_idle' function. Actually, I don't see any reason to use this wrapper in the code. In the better case, the time computation is not correctly done because of the different operations done in omap3_enter_idle_bm which were not taken into account before the en_core_tk_irqen flag was set. As the time is reflected for the state overridden by the omap3_enter_idle_bm, using the wrapper is pointless now, so removing it. Signed-off-by: Daniel Lezcano --- arch/arm/mach-omap2/cpuidle34xx.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 4f67a5b..a56310a 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -99,11 +99,15 @@ static struct omap3_idle_statedata omap3_idle_data[] = { }, }; -/* Private functions */ - -static int __omap3_enter_idle(struct cpuidle_device *dev, - struct cpuidle_driver *drv, - int index) +/** + * omap3_enter_idle - Programs OMAP3 to enter the specified state + * @dev: cpuidle device + * @drv: cpuidle driver + * @index: the index of state to be entered + */ +static int omap3_enter_idle(struct cpuidle_device *dev, + struct cpuidle_driver *drv, + int index) { struct omap3_idle_statedata *cx = &omap3_idle_data[index]; @@ -149,22 +153,6 @@ return_sleep_time: } /** - * omap3_enter_idle - Programs OMAP3 to enter the specified state - * @dev: cpuidle device - * @drv: cpuidle driver - * @index: the index of state to be entered - * - * Called from the CPUidle framework to program the device to the - * specified target state selected by the governor. - */ -static inline int omap3_enter_idle(struct cpuidle_device *dev, - struct cpuidle_driver *drv, - int index) -{ - return cpuidle_wrap_enter(dev, drv, index, __omap3_enter_idle); -} - -/** * next_valid_state - Find next valid C-state * @dev: cpuidle device * @drv: cpuidle driver