Commit df3eebb1 authored by Hirokazu Takata's avatar Hirokazu Takata Committed by Linus Torvalds

[PATCH] m32r: upgrade for recent kernel changes

This patch is for upgrading m32r's code to the 2.6.9-rc1-mm5 source as well as
the other architectures.

* arch/m32r/Makefile: Replace assigment to CHECK with assignment to CHECKFLAGS

* arch/m32r/kernel/vmlinux.lds.S:
	- out-of-line locks / m32r; Include LOCK_TEXT to .text section.
	- Move param section out of init area, for export of built-in
	  module params

* arch/m32r/mm/ioremap.c (__ioremap):
	Add __iomem modifier to the return value type of __ioremap()
	for much stricter type-checking.

* include/asm-m32r/resource.h:
	- rlimit-based mlocks for unprivileged users
	- Increase per-user mlock limit default to 32k	

* include/asm-m32r/socket.h:
	- [NET]: Move SOCK_foo types into linux/net.h

* include/asm-m32r/unistd.h:
  Add system calls; taken from asm-i386/unistd.h.
    - [PATCH][2/6] perfctr-2.7.3 for 2.6.7-rc1-mm1: i386  (05/31/2004)
    - [PATCH] Make key management use syscalls not prctls (09/06/2004)
Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 854e7031
......@@ -25,7 +25,7 @@ aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -Wa,-no-bitinst
CFLAGS += $(cflags-y)
AFLAGS += $(aflags-y)
CHECK := $(CHECK) -D__m32r__=1
CHECKFLAGS := $(CHECK) -D__m32r__=1
head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
......
......@@ -27,6 +27,7 @@ SECTIONS
.text : {
*(.text)
SCHED_TEXT
LOCK_TEXT
*(.fixup)
*(.gnu.warning)
} = 0x9090
......@@ -81,9 +82,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -122,9 +122,9 @@ static int remap_area_pages(unsigned long address, unsigned long phys_addr,
#define IS_LOW512(addr) (!((unsigned long)(addr) & ~0x1fffffffUL))
void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
{
void * addr;
void __iomem * addr;
struct vm_struct * area;
unsigned long offset, last_addr;
......@@ -169,13 +169,13 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag
if (!area)
return NULL;
area->phys_addr = phys_addr;
addr = area->addr;
addr = (void __iomem *) area->addr;
if (remap_area_pages((unsigned long)addr, phys_addr, size, flags)) {
vunmap(addr);
vunmap((void __force *) addr);
return NULL;
}
return (void *) (offset + (char *)addr);
return (void __iomem *) (offset + (char __iomem *)addr);
}
#define IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == KSEG1)
......
......@@ -43,7 +43,7 @@
{ RLIM_INFINITY, RLIM_INFINITY }, \
{ 0, 0 }, \
{ INR_OPEN, INR_OPEN }, \
{ RLIM_INFINITY, RLIM_INFINITY }, \
{ MLOCK_LIMIT, MLOCK_LIMIT }, \
{ RLIM_INFINITY, RLIM_INFINITY }, \
{ RLIM_INFINITY, RLIM_INFINITY }, \
{ MAX_SIGPENDING, MAX_SIGPENDING }, \
......
#ifndef _ASM_M32R_SOCKET_H
#define _ASM_M32R_SOCKET_H
/* $Id$ */
/* orig : i386 2.4.18 */
#include <asm/sockios.h>
/* For setsockoptions(2) */
......@@ -51,20 +47,4 @@
#define SO_PEERSEC 31
/* Nasty libc5 fixup - bletch */
#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
/* Socket types. */
#define SOCK_STREAM 1 /* stream (connection) socket */
#define SOCK_DGRAM 2 /* datagram (conn.less) socket */
#define SOCK_RAW 3 /* raw socket */
#define SOCK_RDM 4 /* reliably-delivered message */
#define SOCK_SEQPACKET 5 /* sequential packet socket */
#define SOCK_PACKET 10 /* linux specific way of */
/* getting packets at the dev */
/* level. For writing rarp and */
/* other similar things on the */
/* user level. */
#define SOCK_MAX (SOCK_PACKET+1)
#endif
#endif /* _ASM_M32R_SOCKET_H */
......@@ -292,15 +292,27 @@
#define __NR_mq_timedreceive (__NR_mq_open+3)
#define __NR_mq_notify (__NR_mq_open+4)
#define __NR_mq_getsetattr (__NR_mq_open+5)
#define __NR_kexec_load 283
#define __NR_sys_kexec_load 283
#define __NR_waitid 284
#define __NR_perfctr_info 285
#define __NR_vperfctr_open (__NR_perfctr_info+1)
#define __NR_vperfctr_control (__NR_perfctr_info+2)
#define __NR_vperfctr_unlink (__NR_perfctr_info+3)
#define __NR_vperfctr_iresume (__NR_perfctr_info+4)
#define __NR_vperfctr_read (__NR_perfctr_info+5)
#define __NR_add_key 291
#define __NR_request_key 292
#define __NR_keyctl 293
#define NR_syscalls 284
#define NR_syscalls 294
/* user-visible error numbers are in the range -1 - -124: see <asm-m32r/errno.h> */
/* user-visible error numbers are in the range -1 - -128: see
* <asm-m32r/errno.h>
*/
#define __syscall_return(type, res) \
do { \
if ((unsigned long)(res) >= (unsigned long)(-125)) { \
if ((unsigned long)(res) >= (unsigned long)(-(128 + 1))) { \
/* Avoid using "res" which is declared to be in register r0; \
errno might expand to a function call and clobber it. */ \
int __err = -(res); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment