SUPERH platform development
 help / color / mirror / Atom feed
* [PATCH] sh: kernel: cpu: provide 'NULL' parameter for calling cpuidle_register().
@ 2013-07-31  7:23 Chen Gang
  2013-07-31  7:35 ` Daniel Lezcano
  2013-07-31  8:37 ` Chen Gang
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Gang @ 2013-07-31  7:23 UTC (permalink / raw)
  To: linux-sh

Need provide additional parameter for calling cpuidle_register() just
like some of another architectures have done, or can not pass compiling.

The related error (with kfr2r09_defconfig):

    CC      arch/sh/kernel/cpu/shmobile/cpuidle.o
  arch/sh/kernel/cpu/shmobile/cpuidle.c: In function 'sh_mobile_setup_cpuidle':
  arch/sh/kernel/cpu/shmobile/cpuidle.c:102:2: error: too few arguments to function 'cpuidle_register'
    return cpuidle_register(&cpuidle_driver);
    ^
  In file included from arch/sh/kernel/cpu/shmobile/cpuidle.c:16:0:
  include/linux/cpuidle.h:130:12: note: declared here
   extern int cpuidle_register(struct cpuidle_driver *drv,
            ^

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/sh/kernel/cpu/shmobile/cpuidle.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
index d306225..5f88393 100644
--- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
+++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
@@ -99,5 +99,5 @@ int __init sh_mobile_setup_cpuidle(void)
 	if (sh_mobile_sleep_supported & SUSP_SH_STANDBY)
 		cpuidle_driver.states[2].disabled = false;
 
-	return cpuidle_register(&cpuidle_driver);
+	return cpuidle_register(&cpuidle_driver, NULL);
 }
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sh: kernel: cpu: provide 'NULL' parameter for calling cpuidle_register().
  2013-07-31  7:23 [PATCH] sh: kernel: cpu: provide 'NULL' parameter for calling cpuidle_register() Chen Gang
@ 2013-07-31  7:35 ` Daniel Lezcano
  2013-07-31  8:37 ` Chen Gang
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2013-07-31  7:35 UTC (permalink / raw)
  To: linux-sh

On 07/31/2013 09:23 AM, Chen Gang wrote:
> Need provide additional parameter for calling cpuidle_register() just
> like some of another architectures have done, or can not pass compiling.
> 
> The related error (with kfr2r09_defconfig):
> 
>     CC      arch/sh/kernel/cpu/shmobile/cpuidle.o
>   arch/sh/kernel/cpu/shmobile/cpuidle.c: In function 'sh_mobile_setup_cpuidle':
>   arch/sh/kernel/cpu/shmobile/cpuidle.c:102:2: error: too few arguments to function 'cpuidle_register'
>     return cpuidle_register(&cpuidle_driver);
>     ^
>   In file included from arch/sh/kernel/cpu/shmobile/cpuidle.c:16:0:
>   include/linux/cpuidle.h:130:12: note: declared here
>    extern int cpuidle_register(struct cpuidle_driver *drv,
>             ^
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---

Thanks for the patch.

I have the same fix in my tree sent by Geert Uytterhoeven

  -- Daniel


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sh: kernel: cpu: provide 'NULL' parameter for calling cpuidle_register().
  2013-07-31  7:23 [PATCH] sh: kernel: cpu: provide 'NULL' parameter for calling cpuidle_register() Chen Gang
  2013-07-31  7:35 ` Daniel Lezcano
@ 2013-07-31  8:37 ` Chen Gang
  2013-07-31  9:04   ` [PATCH] scripts/recordmcount.pl: remove "-m32" for sh architecture Chen Gang
  1 sibling, 1 reply; 4+ messages in thread
From: Chen Gang @ 2013-07-31  8:37 UTC (permalink / raw)
  To: linux-sh

On 07/31/2013 03:35 PM, Daniel Lezcano wrote:
> On 07/31/2013 09:23 AM, Chen Gang wrote:
>> Need provide additional parameter for calling cpuidle_register() just
>> like some of another architectures have done, or can not pass compiling.
>>
>> The related error (with kfr2r09_defconfig):
>>
>>     CC      arch/sh/kernel/cpu/shmobile/cpuidle.o
>>   arch/sh/kernel/cpu/shmobile/cpuidle.c: In function 'sh_mobile_setup_cpuidle':
>>   arch/sh/kernel/cpu/shmobile/cpuidle.c:102:2: error: too few arguments to function 'cpuidle_register'
>>     return cpuidle_register(&cpuidle_driver);
>>     ^
>>   In file included from arch/sh/kernel/cpu/shmobile/cpuidle.c:16:0:
>>   include/linux/cpuidle.h:130:12: note: declared here
>>    extern int cpuidle_register(struct cpuidle_driver *drv,
>>             ^
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> ---
> 
> Thanks for the patch.
> 
> I have the same fix in my tree sent by Geert Uytterhoeven
> 
>   -- Daniel
> 
> 

OK, thanks, and I will send another patches.

:-)

-- 
Chen Gang

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] scripts/recordmcount.pl: remove "-m32" for sh architecture
  2013-07-31  8:37 ` Chen Gang
@ 2013-07-31  9:04   ` Chen Gang
  0 siblings, 0 replies; 4+ messages in thread
From: Chen Gang @ 2013-07-31  9:04 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Paul Mundt, rafael.j.wysocki, horms+renesas, khilman,
	Linux-sh list, Geert Uytterhoeven, linux-kernel@vger.kernel.org

'allmodconfig' will report error for "-m32", Now "-m32" is useless for
latest compiler and neither can find "-m32" in "arch/sh" directory, so
just remove it is OK.

The related error:

    CC      init/main.o
  sh3-gchen-linux-gnu-gcc: error: unrecognized command line option '-m32'
  sh3-gchen-linux-gnu-ld: cannot find init/.tmp_mc_main.o: No such file or directory
  sh3-gchen-linux-gnu-objcopy: 'init/.tmp_mx_main.o': No such file
  rm: cannot remove `init/.tmp_mx_main.o': No such file or directory
  rm: cannot remove `init/.tmp_mc_main.o': No such file or directory
    CHK     include/generated/compile.h
    CC      init/version.o
    CC      init/do_mounts.o
  sh3-gchen-linux-gnu-gcc: error: unrecognized command line option '-m32'
  sh3-gchen-linux-gnu-ld: cannot find init/.tmp_mc_do_mounts.o: No such file or directory
  mv: cannot stat `init/.tmp_mx_do_mounts.o': No such file or directory
  rm: cannot remove `init/.tmp_mc_do_mounts.o': No such file or directory
    CC      init/do_mounts_initrd.o
    LD      init/mounts.o
    CC      init/initramfs.o
    CC      init/init_task.o
    LD      init/built-in.o
  sh3-gchen-linux-gnu-ld: cannot find init/main.o: No such file or directory
  make[1]: *** [init/built-in.o] Error 1
  make: *** [init] Error 2

The related compiler information:

  [root@dhcp122 linux-next]# sh3-gchen-linux-gnu-gcc -v
  Using built-in specs.
  COLLECT_GCC=sh3-gchen-linux-gnu-gcc
  COLLECT_LTO_WRAPPER=/home/gchen/x-tools/sh3-gchen-linux-gnu/bin/../libexec/gcc/sh3-gchen-linux-gnu/4.8.0/lto-wrapper
  Target: sh3-gchen-linux-gnu
  Configured with: /root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/src/gcc-4.8.0/configure --build=x86_64-build_unknown-linux-gnu --host=x86_64-build_unknown-linux-gnu --target=sh3-gchen-linux-gnu --prefix=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-local-prefix=/home/gchen/x-tools/sh3-gchen-linux-gnu/sh3-gchen-linux-gnu/sysroot --disable-libmudflap --with-sysroot=/home/gchen/x-tools/sh3-gchen-linux-gnu/sh3-gchen-linux-gnu/sysroot --enable-shared --with-pkgversion='crosstool-NG hg+unknown-20130731.103227' --enable-__cxa_atexit --with-gmp=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-mpfr=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-mpc=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-isl=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with
 -cloog=/r
oot/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-libelf=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --enable-lto --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-nls --disable-multilib --enable-languages=c
  Thread model: posix
  gcc version 4.8.0 (crosstool-NG hg+unknown-20130731.103227) 


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 scripts/recordmcount.pl |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 858966a..679218b 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -262,7 +262,6 @@ if ($arch eq "x86_64") {
     # force flags for this arch
     $ld .= " -m shlelf_linux";
     $objcopy .= " -O elf32-sh-linux";
-    $cc .= " -m32";
 
 } elsif ($arch eq "powerpc") {
     $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)";
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-31  9:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31  7:23 [PATCH] sh: kernel: cpu: provide 'NULL' parameter for calling cpuidle_register() Chen Gang
2013-07-31  7:35 ` Daniel Lezcano
2013-07-31  8:37 ` Chen Gang
2013-07-31  9:04   ` [PATCH] scripts/recordmcount.pl: remove "-m32" for sh architecture Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox