Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6:
xtensa: Fix linker script to include .literal sections
xtensa: update s6105_defconfig for ccount calibration
xtensa: implement ccount calibration for s6000
xtensa: fix wrong extern declaration renamed in code using it
xtensa: register gpio chip before use
xtensa: always use correct stack pointer for stack traces
xtensa: Fix checksum header file
xtensa: Fix architecture specific Kconfig

+81 -20
+3 -4
arch/xtensa/Kconfig
··· 80 80 bool "s6000 - Stretch software configurable processor" 81 81 select VARIANT_IRQ_SWITCH 82 82 select ARCH_REQUIRE_GPIOLIB 83 + select XTENSA_CALIBRATE_CCOUNT 83 84 endchoice 84 85 85 86 config XTENSA_UNALIGNED_USER ··· 138 137 139 138 source "drivers/pci/Kconfig" 140 139 140 + endmenu 141 + 141 142 menu "Platform options" 142 143 143 144 choice ··· 156 153 157 154 config XTENSA_PLATFORM_XT2000 158 155 bool "XT2000" 159 - select XTENSA_CALIBRATE_CCOUNT 160 - select PCI 161 156 help 162 157 XT2000 is the name of Tensilica's feature-rich emulation platform. 163 158 This hardware is capable of running a full Linux distribution. ··· 192 191 memory size and the root device (e.g., mem=64M root=/dev/nfs). 193 192 194 193 source "mm/Kconfig" 195 - 196 - endmenu 197 194 198 195 config HOTPLUG 199 196 bool "Support for hot-pluggable devices"
+1 -2
arch/xtensa/configs/s6105_defconfig
··· 115 115 CONFIG_PREEMPT=y 116 116 # CONFIG_MATH_EMULATION is not set 117 117 # CONFIG_HIGHMEM is not set 118 - # CONFIG_XTENSA_CALIBRATE_CCOUNT is not set 118 + CONFIG_XTENSA_CALIBRATE_CCOUNT=y 119 119 CONFIG_SERIAL_CONSOLE=y 120 120 # CONFIG_XTENSA_ISS_NETWORK is not set 121 121 ··· 131 131 # CONFIG_XTENSA_PLATFORM_ISS is not set 132 132 # CONFIG_XTENSA_PLATFORM_XT2000 is not set 133 133 CONFIG_XTENSA_PLATFORM_S6105=y 134 - CONFIG_XTENSA_CPU_CLOCK=300 135 134 CONFIG_GENERIC_CALIBRATE_DELAY=y 136 135 CONFIG_CMDLINE_BOOL=y 137 136 CONFIG_CMDLINE="console=ttyS1,38400 debug bootmem_debug loglevel=7"
+4 -2
arch/xtensa/include/asm/checksum.h
··· 113 113 are modified, we must also specify them as outputs, or gcc 114 114 will assume they contain their original values. */ 115 115 : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), "=&r" (endaddr) 116 - : "1" (iph), "2" (ihl)); 116 + : "1" (iph), "2" (ihl) 117 + : "memory"); 117 118 118 119 return csum_fold(sum); 119 120 } ··· 228 227 "1:\t" 229 228 : "=r" (sum), "=&r" (__dummy) 230 229 : "r" (saddr), "r" (daddr), 231 - "r" (htonl(len)), "r" (htonl(proto)), "0" (sum)); 230 + "r" (htonl(len)), "r" (htonl(proto)), "0" (sum) 231 + : "memory"); 232 232 233 233 return csum_fold(sum); 234 234 }
+2 -2
arch/xtensa/include/asm/timex.h
··· 39 39 40 40 #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 41 41 extern unsigned long ccount_per_jiffy; 42 - extern unsigned long ccount_nsec; 42 + extern unsigned long nsec_per_ccount; 43 43 #define CCOUNT_PER_JIFFY ccount_per_jiffy 44 - #define NSEC_PER_CCOUNT ccount_nsec 44 + #define NSEC_PER_CCOUNT nsec_per_ccount 45 45 #else 46 46 #define CCOUNT_PER_JIFFY (CONFIG_XTENSA_CPU_CLOCK*(1000000UL/HZ)) 47 47 #define NSEC_PER_CCOUNT (1000UL / CONFIG_XTENSA_CPU_CLOCK)
+18 -3
arch/xtensa/kernel/Makefile
··· 4 4 5 5 extra-y := head.o vmlinux.lds 6 6 7 - 8 7 obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o \ 9 8 setup.o signal.o syscall.o time.o traps.o vectors.o platform.o \ 10 9 pci-dma.o init_task.o io.o 11 - 12 - ## windowspill.o 13 10 14 11 obj-$(CONFIG_KGDB) += xtensa-stub.o 15 12 obj-$(CONFIG_PCI) += pci.o 16 13 obj-$(CONFIG_MODULES) += xtensa_ksyms.o module.o 17 14 15 + # In the Xtensa architecture, assembly generates literals which must always 16 + # precede the L32R instruction with a relative offset less than 256 kB. 17 + # Therefore, the .text and .literal section must be combined in parenthesis 18 + # in the linker script, such as: *(.literal .text). 19 + # 20 + # We need to post-process the generated vmlinux.lds scripts to convert 21 + # *(xxx.text) to *(xxx.literal xxx.text) for the following text sections: 22 + # .text .ref.text .*init.text .*exit.text .text.* 23 + # 24 + # Replicate rules in scripts/Makefile.build 18 25 26 + sed-y = -e 's/(\(\.[a-z]*it\|\.ref\|\)\.text)/(\1.literal \1.text)/g' \ 27 + -e 's/(\(\.text\.[a-z]*\))/(\1.literal \1)/g' 28 + 29 + quiet_cmd__cpp_lds_S = LDS $@ 30 + cmd__cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ $< | sed $(sed-y) >$@ 31 + 32 + $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE 33 + $(call if_changed_dep,_cpp_lds_S)
+14 -2
arch/xtensa/kernel/traps.c
··· 369 369 regs->syscall); 370 370 } 371 371 372 + static __always_inline unsigned long *stack_pointer(struct task_struct *task) 373 + { 374 + unsigned long *sp; 375 + 376 + if (!task || task == current) 377 + __asm__ __volatile__ ("mov %0, a1\n" : "=a"(sp)); 378 + else 379 + sp = (unsigned long *)task->thread.sp; 380 + 381 + return sp; 382 + } 383 + 372 384 void show_trace(struct task_struct *task, unsigned long *sp) 373 385 { 374 386 unsigned long a0, a1, pc; ··· 389 377 if (sp) 390 378 a1 = (unsigned long)sp; 391 379 else 392 - a1 = task->thread.sp; 380 + a1 = (unsigned long)stack_pointer(task); 393 381 394 382 sp_start = a1 & ~(THREAD_SIZE-1); 395 383 sp_end = sp_start + THREAD_SIZE; ··· 432 420 unsigned long *stack; 433 421 434 422 if (!sp) 435 - sp = (unsigned long *)task->thread.sp; 423 + sp = stack_pointer(task); 436 424 stack = sp; 437 425 438 426 printk("\nStack: ");
+1 -3
arch/xtensa/kernel/vmlinux.lds.S
··· 87 87 { 88 88 /* The HEAD_TEXT section must be the first section! */ 89 89 HEAD_TEXT 90 - *(.literal .text) 90 + TEXT_TEXT 91 91 VMLINUX_SYMBOL(__sched_text_start) = .; 92 92 *(.sched.literal .sched.text) 93 93 VMLINUX_SYMBOL(__sched_text_end) = .; ··· 139 139 __init_begin = .; 140 140 .init.text : { 141 141 _sinittext = .; 142 - *(.init.literal) *(.cpuinit.literal) 143 - *(.devinit.literal) *(.meminit.literal) 144 142 INIT_TEXT 145 143 _einittext = .; 146 144 }
+3
arch/xtensa/platforms/s6105/setup.c
··· 10 10 #include <asm/bootparam.h> 11 11 12 12 #include <variant/hardware.h> 13 + #include <variant/gpio.h> 14 + 13 15 #include <platform/gpio.h> 14 16 15 17 void platform_halt(void) ··· 49 47 50 48 void __init platform_init(bp_tag_t *first) 51 49 { 50 + s6_gpio_init(); 52 51 gpio_request(GPIO_LED1_NGREEN, "led1_green"); 53 52 gpio_request(GPIO_LED1_RED, "led1_red"); 54 53 gpio_direction_output(GPIO_LED1_NGREEN, 1);
+1
arch/xtensa/variants/s6000/Makefile
··· 1 1 # s6000 Makefile 2 2 3 3 obj-y += irq.o gpio.o 4 + obj-$(CONFIG_XTENSA_CALIBRATE_CCOUNT) += delay.o
+27
arch/xtensa/variants/s6000/delay.c
··· 1 + #include <asm/delay.h> 2 + #include <asm/timex.h> 3 + #include <asm/io.h> 4 + #include <variant/hardware.h> 5 + 6 + #define LOOPS 10 7 + void platform_calibrate_ccount(void) 8 + { 9 + u32 uninitialized_var(a); 10 + u32 uninitialized_var(u); 11 + u32 b; 12 + u32 tstamp = S6_REG_GREG1 + S6_GREG1_GLOBAL_TIMER; 13 + int i = LOOPS+1; 14 + do { 15 + u32 t = u; 16 + asm volatile( 17 + "1: l32i %0, %2, 0 ;" 18 + " beq %0, %1, 1b ;" 19 + : "=&a"(u) : "a"(t), "a"(tstamp)); 20 + b = xtensa_get_ccount(); 21 + if (i == LOOPS) 22 + a = b; 23 + } while (--i >= 0); 24 + b -= a; 25 + nsec_per_ccount = (LOOPS * 10000) / b; 26 + ccount_per_jiffy = b * (100000UL / (LOOPS * HZ)); 27 + }
+1 -2
arch/xtensa/variants/s6000/gpio.c
··· 64 64 .exported = 0, /* no exporting to userspace */ 65 65 }; 66 66 67 - static int gpio_init(void) 67 + int s6_gpio_init(void) 68 68 { 69 69 return gpiochip_add(&gpiochip); 70 70 } 71 - device_initcall(gpio_init);
+6
arch/xtensa/variants/s6000/include/variant/gpio.h
··· 1 + #ifndef _XTENSA_VARIANT_S6000_GPIO_H 2 + #define _XTENSA_VARIANT_S6000_GPIO_H 3 + 4 + extern int s6_gpio_init(void); 5 + 6 + #endif /* _XTENSA_VARIANT_S6000_GPIO_H */