diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-28 18:07:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-28 18:07:55 -0400 |
commit | cb28a1bbdb4790378e7366d6c9ee1d2340b84f92 (patch) | |
tree | 316436f77dac75335fd2c3ef5f109e71606c50d3 /arch/cris/arch-v32 | |
parent | b6d4f7e3ef25beb8c658c97867d98883e69dc544 (diff) | |
parent | f934fb19ef34730263e6afc01e8ec27a8a71470f (diff) |
Merge branch 'linus' into core/generic-dma-coherent
Conflicts:
arch/x86/Kconfig
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r-- | arch/cris/arch-v32/boot/Makefile | 1 | ||||
-rw-r--r-- | arch/cris/arch-v32/boot/compressed/Makefile | 6 | ||||
-rw-r--r-- | arch/cris/arch-v32/boot/compressed/misc.c | 39 | ||||
-rw-r--r-- | arch/cris/arch-v32/boot/rescue/Makefile | 3 | ||||
-rw-r--r-- | arch/cris/arch-v32/drivers/pcf8563.c | 2 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/kgdb.c | 60 | ||||
-rw-r--r-- | arch/cris/arch-v32/mm/init.c | 2 |
7 files changed, 20 insertions, 93 deletions
diff --git a/arch/cris/arch-v32/boot/Makefile b/arch/cris/arch-v32/boot/Makefile index 3f91349c5f12..99896ad60b30 100644 --- a/arch/cris/arch-v32/boot/Makefile +++ b/arch/cris/arch-v32/boot/Makefile | |||
@@ -2,7 +2,6 @@ | |||
2 | # arch/cris/arch-v32/boot/Makefile | 2 | # arch/cris/arch-v32/boot/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | OBJCOPY = objcopy-cris | ||
6 | OBJCOPYFLAGS = -O binary -R .note -R .comment | 5 | OBJCOPYFLAGS = -O binary -R .note -R .comment |
7 | 6 | ||
8 | subdir- := compressed rescue | 7 | subdir- := compressed rescue |
diff --git a/arch/cris/arch-v32/boot/compressed/Makefile b/arch/cris/arch-v32/boot/compressed/Makefile index 2c8c2c3039c5..d6335f26083b 100644 --- a/arch/cris/arch-v32/boot/compressed/Makefile +++ b/arch/cris/arch-v32/boot/compressed/Makefile | |||
@@ -2,14 +2,10 @@ | |||
2 | # arch/cris/arch-v32/boot/compressed/Makefile | 2 | # arch/cris/arch-v32/boot/compressed/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE) | ||
6 | asflags-y += -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch | 5 | asflags-y += -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch |
7 | ccflags-y += -O2 -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch | 6 | ccflags-y += -O2 -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch |
8 | LD = gcc-cris -mlinux -march=v32 -nostdlib | 7 | ldflags-y += -T $(srctree)/$(obj)/decompress.ld |
9 | ldflags-y += -T $(obj)/decompress.ld | ||
10 | obj-y = head.o misc.o | ||
11 | OBJECTS = $(obj)/head.o $(obj)/misc.o | 8 | OBJECTS = $(obj)/head.o $(obj)/misc.o |
12 | OBJCOPY = objcopy-cris | ||
13 | OBJCOPYFLAGS = -O binary --remove-section=.bss | 9 | OBJCOPYFLAGS = -O binary --remove-section=.bss |
14 | 10 | ||
15 | quiet_cmd_image = BUILD $@ | 11 | quiet_cmd_image = BUILD $@ |
diff --git a/arch/cris/arch-v32/boot/compressed/misc.c b/arch/cris/arch-v32/boot/compressed/misc.c index 55b2695c5d70..3595e16e82bc 100644 --- a/arch/cris/arch-v32/boot/compressed/misc.c +++ b/arch/cris/arch-v32/boot/compressed/misc.c | |||
@@ -89,20 +89,14 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
89 | 89 | ||
90 | static void flush_window(void); | 90 | static void flush_window(void); |
91 | static void error(char *m); | 91 | static void error(char *m); |
92 | static void gzip_mark(void **); | ||
93 | static void gzip_release(void **); | ||
94 | 92 | ||
95 | extern char *input_data; /* lives in head.S */ | 93 | extern char *input_data; /* lives in head.S */ |
96 | 94 | ||
97 | static long bytes_out = 0; | 95 | static long bytes_out; |
98 | static uch *output_data; | 96 | static uch *output_data; |
99 | static unsigned long output_ptr = 0; | 97 | static unsigned long output_ptr; |
100 | 98 | ||
101 | static void *malloc(int size); | ||
102 | static void free(void *where); | ||
103 | static void error(char *m); | 99 | static void error(char *m); |
104 | static void gzip_mark(void **); | ||
105 | static void gzip_release(void **); | ||
106 | 100 | ||
107 | static void puts(const char *); | 101 | static void puts(const char *); |
108 | 102 | ||
@@ -110,37 +104,10 @@ static void puts(const char *); | |||
110 | 104 | ||
111 | extern int _end; | 105 | extern int _end; |
112 | static long free_mem_ptr = (long)&_end; | 106 | static long free_mem_ptr = (long)&_end; |
107 | static long free_mem_end_ptr; | ||
113 | 108 | ||
114 | #include "../../../../../lib/inflate.c" | 109 | #include "../../../../../lib/inflate.c" |
115 | 110 | ||
116 | static void *malloc(int size) | ||
117 | { | ||
118 | void *p; | ||
119 | |||
120 | if (size <0) error("Malloc error"); | ||
121 | |||
122 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
123 | |||
124 | p = (void *)free_mem_ptr; | ||
125 | free_mem_ptr += size; | ||
126 | |||
127 | return p; | ||
128 | } | ||
129 | |||
130 | static void free(void *where) | ||
131 | { /* Don't care */ | ||
132 | } | ||
133 | |||
134 | static void gzip_mark(void **ptr) | ||
135 | { | ||
136 | *ptr = (void *) free_mem_ptr; | ||
137 | } | ||
138 | |||
139 | static void gzip_release(void **ptr) | ||
140 | { | ||
141 | free_mem_ptr = (long) *ptr; | ||
142 | } | ||
143 | |||
144 | /* decompressor info and error messages to serial console */ | 111 | /* decompressor info and error messages to serial console */ |
145 | 112 | ||
146 | static inline void | 113 | static inline void |
diff --git a/arch/cris/arch-v32/boot/rescue/Makefile b/arch/cris/arch-v32/boot/rescue/Makefile index c0987795dcb7..44ae0ad61f90 100644 --- a/arch/cris/arch-v32/boot/rescue/Makefile +++ b/arch/cris/arch-v32/boot/rescue/Makefile | |||
@@ -7,9 +7,8 @@ ccflags-y += -O2 -I $(srctree)/include/asm/arch/mach/ \ | |||
7 | -I $(srctree)/include/asm/arch | 7 | -I $(srctree)/include/asm/arch |
8 | asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch | 8 | asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch |
9 | LD = gcc-cris -mlinux -march=v32 -nostdlib | 9 | LD = gcc-cris -mlinux -march=v32 -nostdlib |
10 | ldflags-y += -T $(obj)/rescue.ld | 10 | ldflags-y += -T $(srctree)/$(obj)/rescue.ld |
11 | LDPOSTFLAGS = -lgcc | 11 | LDPOSTFLAGS = -lgcc |
12 | OBJCOPY = objcopy-cris | ||
13 | OBJCOPYFLAGS = -O binary --remove-section=.bss | 12 | OBJCOPYFLAGS = -O binary --remove-section=.bss |
14 | obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o | 13 | obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o |
15 | OBJECT := $(obj)/head.o | 14 | OBJECT := $(obj)/head.o |
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c index 53db3870ba04..f263ab571221 100644 --- a/arch/cris/arch-v32/drivers/pcf8563.c +++ b/arch/cris/arch-v32/drivers/pcf8563.c | |||
@@ -229,7 +229,7 @@ int pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
229 | 229 | ||
230 | if (copy_to_user((struct rtc_time *) arg, &tm, | 230 | if (copy_to_user((struct rtc_time *) arg, &tm, |
231 | sizeof tm)) { | 231 | sizeof tm)) { |
232 | spin_unlock(&rtc_lock); | 232 | mutex_unlock(&rtc_lock); |
233 | return -EFAULT; | 233 | return -EFAULT; |
234 | } | 234 | } |
235 | 235 | ||
diff --git a/arch/cris/arch-v32/kernel/kgdb.c b/arch/cris/arch-v32/kernel/kgdb.c index 4e2e2e271efb..8bd5a5bc0dc7 100644 --- a/arch/cris/arch-v32/kernel/kgdb.c +++ b/arch/cris/arch-v32/kernel/kgdb.c | |||
@@ -398,14 +398,6 @@ void putDebugChar(int val) | |||
398 | } | 398 | } |
399 | #endif | 399 | #endif |
400 | 400 | ||
401 | /* Returns the character equivalent of a nibble, bit 7, 6, 5, and 4 of a byte, | ||
402 | represented by int x. */ | ||
403 | static char highhex(int x); | ||
404 | |||
405 | /* Returns the character equivalent of a nibble, bit 3, 2, 1, and 0 of a byte, | ||
406 | represented by int x. */ | ||
407 | static char lowhex(int x); | ||
408 | |||
409 | /* Returns the integer equivalent of a hexadecimal character. */ | 401 | /* Returns the integer equivalent of a hexadecimal character. */ |
410 | static int hex(char ch); | 402 | static int hex(char ch); |
411 | 403 | ||
@@ -464,9 +456,6 @@ void breakpoint(void); | |||
464 | /* Run-length encoding maximum length. Send 64 at most. */ | 456 | /* Run-length encoding maximum length. Send 64 at most. */ |
465 | #define RUNLENMAX 64 | 457 | #define RUNLENMAX 64 |
466 | 458 | ||
467 | /* Definition of all valid hexadecimal characters */ | ||
468 | static const char hexchars[] = "0123456789abcdef"; | ||
469 | |||
470 | /* The inbound/outbound buffers used in packet I/O */ | 459 | /* The inbound/outbound buffers used in packet I/O */ |
471 | static char input_buffer[BUFMAX]; | 460 | static char input_buffer[BUFMAX]; |
472 | static char output_buffer[BUFMAX]; | 461 | static char output_buffer[BUFMAX]; |
@@ -550,8 +539,8 @@ gdb_cris_strtol(const char *s, char **endptr, int base) | |||
550 | char *sd; | 539 | char *sd; |
551 | int x = 0; | 540 | int x = 0; |
552 | 541 | ||
553 | for (s1 = (char*)s; (sd = gdb_cris_memchr(hexchars, *s1, base)) != NULL; ++s1) | 542 | for (s1 = (char*)s; (sd = gdb_cris_memchr(hex_asc, *s1, base)) != NULL; ++s1) |
554 | x = x * base + (sd - hexchars); | 543 | x = x * base + (sd - hex_asc); |
555 | 544 | ||
556 | if (endptr) { | 545 | if (endptr) { |
557 | /* Unconverted suffix is stored in endptr unless endptr is NULL. */ | 546 | /* Unconverted suffix is stored in endptr unless endptr is NULL. */ |
@@ -655,22 +644,6 @@ read_register(char regno, unsigned int *valptr) | |||
655 | } | 644 | } |
656 | 645 | ||
657 | /********************************** Packet I/O ******************************/ | 646 | /********************************** Packet I/O ******************************/ |
658 | /* Returns the character equivalent of a nibble, bit 7, 6, 5, and 4 of a byte, | ||
659 | represented by int x. */ | ||
660 | static inline char | ||
661 | highhex(int x) | ||
662 | { | ||
663 | return hexchars[(x >> 4) & 0xf]; | ||
664 | } | ||
665 | |||
666 | /* Returns the character equivalent of a nibble, bit 3, 2, 1, and 0 of a byte, | ||
667 | represented by int x. */ | ||
668 | static inline char | ||
669 | lowhex(int x) | ||
670 | { | ||
671 | return hexchars[x & 0xf]; | ||
672 | } | ||
673 | |||
674 | /* Returns the integer equivalent of a hexadecimal character. */ | 647 | /* Returns the integer equivalent of a hexadecimal character. */ |
675 | static int | 648 | static int |
676 | hex(char ch) | 649 | hex(char ch) |
@@ -704,8 +677,7 @@ mem2hex(char *buf, unsigned char *mem, int count) | |||
704 | /* Valid mem address. */ | 677 | /* Valid mem address. */ |
705 | for (i = 0; i < count; i++) { | 678 | for (i = 0; i < count; i++) { |
706 | ch = *mem++; | 679 | ch = *mem++; |
707 | *buf++ = highhex (ch); | 680 | buf = pack_hex_byte(buf, ch); |
708 | *buf++ = lowhex (ch); | ||
709 | } | 681 | } |
710 | } | 682 | } |
711 | /* Terminate properly. */ | 683 | /* Terminate properly. */ |
@@ -723,8 +695,7 @@ mem2hex_nbo(char *buf, unsigned char *mem, int count) | |||
723 | mem += count - 1; | 695 | mem += count - 1; |
724 | for (i = 0; i < count; i++) { | 696 | for (i = 0; i < count; i++) { |
725 | ch = *mem--; | 697 | ch = *mem--; |
726 | *buf++ = highhex (ch); | 698 | buf = pack_hex_byte(buf, ch); |
727 | *buf++ = lowhex (ch); | ||
728 | } | 699 | } |
729 | 700 | ||
730 | /* Terminate properly. */ | 701 | /* Terminate properly. */ |
@@ -862,8 +833,8 @@ putpacket(char *buffer) | |||
862 | } | 833 | } |
863 | } | 834 | } |
864 | putDebugChar('#'); | 835 | putDebugChar('#'); |
865 | putDebugChar(highhex (checksum)); | 836 | putDebugChar(hex_asc_hi(checksum)); |
866 | putDebugChar(lowhex (checksum)); | 837 | putDebugChar(hex_asc_lo(checksum)); |
867 | } while(kgdb_started && (getDebugChar() != '+')); | 838 | } while(kgdb_started && (getDebugChar() != '+')); |
868 | } | 839 | } |
869 | 840 | ||
@@ -909,8 +880,7 @@ stub_is_stopped(int sigval) | |||
909 | /* Send trap type (converted to signal) */ | 880 | /* Send trap type (converted to signal) */ |
910 | 881 | ||
911 | *ptr++ = 'T'; | 882 | *ptr++ = 'T'; |
912 | *ptr++ = highhex(sigval); | 883 | ptr = pack_hex_byte(ptr, sigval); |
913 | *ptr++ = lowhex(sigval); | ||
914 | 884 | ||
915 | if (((reg.exs & 0xff00) >> 8) == 0xc) { | 885 | if (((reg.exs & 0xff00) >> 8) == 0xc) { |
916 | 886 | ||
@@ -1018,30 +988,26 @@ stub_is_stopped(int sigval) | |||
1018 | } | 988 | } |
1019 | /* Only send PC, frame and stack pointer. */ | 989 | /* Only send PC, frame and stack pointer. */ |
1020 | read_register(PC, ®_cont); | 990 | read_register(PC, ®_cont); |
1021 | *ptr++ = highhex(PC); | 991 | ptr = pack_hex_byte(PC); |
1022 | *ptr++ = lowhex(PC); | ||
1023 | *ptr++ = ':'; | 992 | *ptr++ = ':'; |
1024 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[PC]); | 993 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[PC]); |
1025 | *ptr++ = ';'; | 994 | *ptr++ = ';'; |
1026 | 995 | ||
1027 | read_register(R8, ®_cont); | 996 | read_register(R8, ®_cont); |
1028 | *ptr++ = highhex(R8); | 997 | ptr = pack_hex_byte(R8); |
1029 | *ptr++ = lowhex(R8); | ||
1030 | *ptr++ = ':'; | 998 | *ptr++ = ':'; |
1031 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[R8]); | 999 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[R8]); |
1032 | *ptr++ = ';'; | 1000 | *ptr++ = ';'; |
1033 | 1001 | ||
1034 | read_register(SP, ®_cont); | 1002 | read_register(SP, ®_cont); |
1035 | *ptr++ = highhex(SP); | 1003 | ptr = pack_hex_byte(SP); |
1036 | *ptr++ = lowhex(SP); | ||
1037 | *ptr++ = ':'; | 1004 | *ptr++ = ':'; |
1038 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[SP]); | 1005 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[SP]); |
1039 | *ptr++ = ';'; | 1006 | *ptr++ = ';'; |
1040 | 1007 | ||
1041 | /* Send ERP as well; this will save us an entire register fetch in some cases. */ | 1008 | /* Send ERP as well; this will save us an entire register fetch in some cases. */ |
1042 | read_register(ERP, ®_cont); | 1009 | read_register(ERP, ®_cont); |
1043 | *ptr++ = highhex(ERP); | 1010 | ptr = pack_hex_byte(ERP); |
1044 | *ptr++ = lowhex(ERP); | ||
1045 | *ptr++ = ':'; | 1011 | *ptr++ = ':'; |
1046 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[ERP]); | 1012 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[ERP]); |
1047 | *ptr++ = ';'; | 1013 | *ptr++ = ';'; |
@@ -1533,8 +1499,8 @@ handle_exception(int sigval) | |||
1533 | Success: SAA, where AA is the signal number. | 1499 | Success: SAA, where AA is the signal number. |
1534 | Failure: void. */ | 1500 | Failure: void. */ |
1535 | output_buffer[0] = 'S'; | 1501 | output_buffer[0] = 'S'; |
1536 | output_buffer[1] = highhex(sigval); | 1502 | output_buffer[1] = hex_asc_hi(sigval); |
1537 | output_buffer[2] = lowhex(sigval); | 1503 | output_buffer[2] = hex_asc_lo(sigval); |
1538 | output_buffer[3] = 0; | 1504 | output_buffer[3] = 0; |
1539 | break; | 1505 | break; |
1540 | 1506 | ||
diff --git a/arch/cris/arch-v32/mm/init.c b/arch/cris/arch-v32/mm/init.c index 5a9ac5834647..8a34b8b74293 100644 --- a/arch/cris/arch-v32/mm/init.c +++ b/arch/cris/arch-v32/mm/init.c | |||
@@ -162,7 +162,7 @@ paging_init(void) | |||
162 | * substantially higher than 0, like us (we start at PAGE_OFFSET). This | 162 | * substantially higher than 0, like us (we start at PAGE_OFFSET). This |
163 | * saves space in the mem_map page array. | 163 | * saves space in the mem_map page array. |
164 | */ | 164 | */ |
165 | free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0); | 165 | free_area_init_node(0, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0); |
166 | 166 | ||
167 | mem_map = contig_page_data.node_mem_map; | 167 | mem_map = contig_page_data.node_mem_map; |
168 | } | 168 | } |