From patchwork Thu Jan 9 23:51:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 309019 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id A80882C03BF for ; Fri, 10 Jan 2014 10:52:18 +1100 (EST) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1lp0152.outbound.protection.outlook.com [207.46.163.152]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A352F2C00AB for ; Fri, 10 Jan 2014 10:51:49 +1100 (EST) Received: from home.buserror.net (2601:2:5800:3f7:12bf:48ff:fe84:c9a0) by BY2PR03MB396.namprd03.prod.outlook.com (10.141.141.26) with Microsoft SMTP Server (TLS) id 15.0.847.13; Thu, 9 Jan 2014 23:51:41 +0000 Date: Thu, 9 Jan 2014 17:51:34 -0600 From: Scott Wood To: Dongsheng Wang Subject: Re: [v6, 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle Message-ID: <20140109235134.GA24262@home.buserror.net> References: <1387268222-9703-4-git-send-email-dongsheng.wang@freescale.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1387268222-9703-4-git-send-email-dongsheng.wang@freescale.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [2601:2:5800:3f7:12bf:48ff:fe84:c9a0] X-ClientProxiedBy: BLUPR08CA010.namprd08.prod.outlook.com (10.255.219.178) To BY2PR03MB396.namprd03.prod.outlook.com (10.141.141.26) X-Forefront-PRVS: 008663486A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009001)(24454002)(51704005)(189002)(199002)(46102001)(74366001)(80022001)(65816001)(87976001)(23726002)(77096001)(85306002)(4396001)(47736001)(47976001)(50986001)(59766001)(49866001)(54316002)(51856001)(79102001)(53806001)(33656001)(42186004)(87266001)(56776001)(54356001)(76482001)(47776003)(63696002)(31966008)(74662001)(69226001)(76796001)(81342001)(81686001)(74502001)(47446002)(77982001)(85852003)(19580395003)(53416003)(83072002)(80976001)(83322001)(19580405001)(74706001)(46406003)(50466002)(83506001)(74876001)(76786001)(81542001)(92566001)(81816001)(56816005)(90146001)(92726001)(211663006)(3826001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB396; H:home.buserror.net; CLIP:2601:2:5800:3f7:12bf:48ff:fe84:c9a0; FPR:; RD:InfoNoRecords; MX:1; A:1; LANG:en; X-OriginatorOrg: freescale.com Cc: Bharat.Bhushan@freescale.com, linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Dec 17, 2013 at 04:17:02PM +0800, Dongsheng Wang wrote: > From: Wang Dongsheng > > Add a sys interface to enable/diable pw20 state or altivec idle, and > control the wait entry time. > > Enable/Disable interface: > 0, disable. 1, enable. > /sys/devices/system/cpu/cpuX/pw20_state > /sys/devices/system/cpu/cpuX/altivec_idle > > Set wait time interface:(Nanosecond) > /sys/devices/system/cpu/cpuX/pw20_wait_time > /sys/devices/system/cpu/cpuX/altivec_idle_wait_time > Example: Base on TBfreq is 41MHZ. > 1~48(ns): TB[63] > 49~97(ns): TB[62] > 98~195(ns): TB[61] > 196~390(ns): TB[60] > 391~780(ns): TB[59] > 781~1560(ns): TB[58] > ... > > Signed-off-by: Wang Dongsheng This causes ppc6xx_defconfig to fail to build: CC arch/powerpc/kernel/sysfs.o /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c: In function 'show_pw20_state': /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:125:11: error: 'PWRMGTCR0_PW20_WAIT' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:125:11: note: each undeclared identifier is reported only once for each function it appears in /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c: In function 'do_store_pw20_state': /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:138:17: error: 'PWRMGTCR0_PW20_WAIT' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c: In function 'show_pw20_wait_time': /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:174:20: error: 'PWRMGTCR0_PW20_ENT' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:175:6: error: 'PWRMGTCR0_PW20_ENT_SHIFT' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c: In function 'set_pw20_wait_entry_bit': /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:204:16: error: 'PWRMGTCR0_PW20_ENT' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:207:33: error: 'PWRMGTCR0_PW20_ENT_SHIFT' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c: In function 'show_altivec_idle': /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:247:11: error: 'PWRMGTCR0_AV_IDLE_PD_EN' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c: In function 'do_store_altivec_idle': /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:260:19: error: 'PWRMGTCR0_AV_IDLE_PD_EN' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c: In function 'show_altivec_idle_wait_time': /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:296:20: error: 'PWRMGTCR0_AV_IDLE_CNT' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:297:6: error: 'PWRMGTCR0_AV_IDLE_CNT_SHIFT' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c: In function 'set_altivec_idle_wait_entry_bit': /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:326:19: error: 'PWRMGTCR0_AV_IDLE_CNT' undeclared (first use in this function) /home/scott/fsl/git/linux/upstream/arch/powerpc/kernel/sysfs.c:329:36: error: 'PWRMGTCR0_AV_IDLE_CNT_SHIFT' undeclared (first use in this function) make[2]: *** [arch/powerpc/kernel/sysfs.o] Error 1 make[1]: *** [arch/powerpc/kernel] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [sub-make] Error 2 I'll fix when applying with this: -Scott diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 9af9e37..d4a43e6 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c @@ -86,7 +86,7 @@ __setup("smt-snooze-delay=", setup_smt_snooze_delay); #endif /* CONFIG_PPC64 */ -#ifdef CONFIG_FSL_SOC +#ifdef CONFIG_PPC_FSL_BOOK3E #define MAX_BIT 63 static u64 pw20_wt; @@ -723,7 +723,7 @@ static void register_cpu_online(unsigned int cpu) device_create_file(s, &dev_attr_pir); #endif /* CONFIG_PPC64 */ -#ifdef CONFIG_FSL_SOC +#ifdef CONFIG_PPC_FSL_BOOK3E if (PVR_VER(cur_cpu_spec->pvr_value) == PVR_VER_E6500) { device_create_file(s, &dev_attr_pw20_state); device_create_file(s, &dev_attr_pw20_wait_time); @@ -804,7 +804,7 @@ static void unregister_cpu_online(unsigned int cpu) device_remove_file(s, &dev_attr_pir); #endif /* CONFIG_PPC64 */ -#ifdef CONFIG_FSL_SOC +#ifdef CONFIG_PPC_FSL_BOOK3E if (PVR_VER(cur_cpu_spec->pvr_value) == PVR_VER_E6500) { device_remove_file(s, &dev_attr_pw20_state); device_remove_file(s, &dev_attr_pw20_wait_time);