aboutsummaryrefslogtreecommitdiff
path: root/arch/mn10300/include/asm/uaccess.h
AgeCommit message (Collapse)Author
2013-06-28mn10300: Allow to pass array name to get_user()Akira Takeuchi
This fixes the following compile error: CC block/scsi_ioctl.o block/scsi_ioctl.c: In function 'sg_scsi_ioctl': block/scsi_ioctl.c:449: error: invalid initializer Signed-off-by: David Howells <dhowells@redhat.com>
2011-06-21MN10300: asm/uaccess.h needs to #include linux/kernel.h for might_sleep()David Howells
MN10300's asm/uaccess.h needs to #include linux/kernel.h to get might_sleep() otherwise it fails to build on MN10300 allyesconfig. This fails in a few places with messages like the following: In file included from security/keys/trusted.c:14: include/linux/uaccess.h: In function '__copy_from_user_nocache': include/linux/uaccess.h:52: error: implicit declaration of function 'might_sleep' Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-14MN10300: Proper use of macros get_user() in the case of incremented pointersTkhai Kirill
Using __get_user_check(x, ptr++, size) leads to double increment of pointer. This macro uses the macro get_user directly, which itself is used in this way (get_user(x, ptr++)) in some functions of the kernel. The patch fixes the error. Reported-by: Tkhai Kirill <tkhai@yandex.ru> Signed-off-by: David Howells <dhowells@redhat.com>
2010-10-27MN10300: Save frame pointer in thread_info struct rather than global varDavid Howells
Save the current exception frame pointer in the thread_info struct rather than in a global variable as the latter makes SMP tricky, especially when preemption is also enabled. This also replaces __frame with current_frame() and rearranges header file inclusions to make it all compile. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
2010-10-27MN10300: And Panasonic AM34 subarch and implement SMPAkira Takeuchi
Implement the Panasonic MN10300 AM34 CPU subarch and implement SMP support for MN10300. Also implement support for the MN2WS0060 processor and the ASB2364 evaluation board which are AM34 based. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com>
2010-01-11mn10300: add cc clobbers to asm statementsMark Salter
gcc 4.2.1 for MN10300 is more agressive than the older gcc in reordering/moving other insns between an insn that sets flags and an insn that uses those flags. This leads to trouble with asm statements which are missing an explicit "cc" clobber. This patch adds the explicit "cc" clobber to asm statements which do indeed clobber the condition flags. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01mn10300: fix kernel build failures when using gcc-4.xMark Salter
Fix some build failures when using gcc-4.x for MN10300. Firstly, __get_user() fails to build because the pointer points to a const and __gu_val ends up being read-only: In file included from include/linux/mempolicy.h:62, from init/main.c:50: include/linux/pagemap.h: In function 'fault_in_pages_readable': include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output make[1]: *** [init/main.o] Error 1 Secondly, gcc-4 doesn't allow casts of lvalues: UPD include/linux/compile.h arch/mn10300/kernel/rtc.c: In function 'calibrate_clock': arch/mn10300/kernel/rtc.c:170: error: lvalue required as left operand of assignment arch/mn10300/kernel/rtc.c:172: error: lvalue required as left operand of assignment make[1]: *** [arch/mn10300/kernel/rtc.o] Error 1 These are seen with gcc 4.2.1. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-10Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/.David Howells
Signed-off-by: David Howells <dhowells@redhat.com>