From 9738c7dc6f643afc6575c261a7c573ea83b398a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=99=88=E4=BA=AE?= Date: Wed, 27 Aug 2014 18:39:34 -0700 Subject: [PATCH] rockchip: optimize pvtm test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈亮 --- arch/arm/mach-rockchip/pvtm.c | 2 +- arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/pvtm.c b/arch/arm/mach-rockchip/pvtm.c index 8bfbd814e262..0a514f054c07 100644 --- a/arch/arm/mach-rockchip/pvtm.c +++ b/arch/arm/mach-rockchip/pvtm.c @@ -155,5 +155,5 @@ static int __init pvtm_init(void) return 0; } -fs_initcall(pvtm_init); +core_initcall(pvtm_init); diff --git a/arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c b/arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c index c9ea7d21306a..beee2020ae8e 100644 --- a/arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c +++ b/arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c @@ -22,8 +22,8 @@ extern int rockchip_tsadc_get_temp(int chn); extern void rk29_wdt_keepalive(void); extern u32 pvtm_get_value(u32 ch, u32 time_us); -extern char *pvtm_buf; +char *pvtm_buf; static const char pi_result[] = "3141592653589793238462643383279528841971693993751058209749445923078164062862089986280348253421170679821480865132823664709384469555822317253594081284811174502841270193852115559644622948954930381964428810975665933446128475648233786783165271201991456485669234634861045432664821339360726024914127372458706606315588174881520920962829254917153643678925903611330530548820466521384146951941511609433057273657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566438602139494639522473719070217986943702770539217176293176752384674818467669451320005681271452635608277857713427577896091736371787214684409012249534301465495853710579227968925892354201995611212902196864344181598136297747713099605187072113499999983729780499510597317328160963185"; int calc_pi(void) { @@ -407,3 +407,11 @@ ssize_t pvtm_store(struct kobject *kobj, struct kobj_attribute *attr, { return n; } + +int pvtm_buf_init(void) +{ + pvtm_buf = (char *)__get_free_pages(GFP_KERNEL, 8); + + return 0; +} +fs_initcall(pvtm_buf_init); -- 2.34.1