diff options
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/Kconfig | 4 | ||||
-rw-r--r-- | arch/xtensa/kernel/module.c | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/pci-dma.c | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/pci.c | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/syscalls.c | 24 | ||||
-rw-r--r-- | arch/xtensa/kernel/time.c | 13 | ||||
-rw-r--r-- | arch/xtensa/lib/pci-auto.c | 2 | ||||
-rw-r--r-- | arch/xtensa/lib/usercopy.S | 4 | ||||
-rw-r--r-- | arch/xtensa/mm/pgtable.c | 2 | ||||
-rw-r--r-- | arch/xtensa/mm/tlb.c | 2 | ||||
-rw-r--r-- | arch/xtensa/platform-iss/console.c | 2 |
12 files changed, 37 insertions, 24 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 848f173db25..c1e69a1f92a 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -206,7 +206,7 @@ source "drivers/pci/hotplug/Kconfig" endmenu -menu "Exectuable file formats" +menu "Executable file formats" # only elf supported config KCORE_ELF @@ -241,7 +241,7 @@ menu "Xtensa initrd options" bool "Embed root filesystem ramdisk into the kernel" config EMBEDDED_RAMDISK_IMAGE - string "Filename of gziped ramdisk image" + string "Filename of gzipped ramdisk image" depends on EMBEDDED_RAMDISK default "ramdisk.gz" help diff --git a/arch/xtensa/kernel/module.c b/arch/xtensa/kernel/module.c index d1683cfa19a..2ea1755a085 100644 --- a/arch/xtensa/kernel/module.c +++ b/arch/xtensa/kernel/module.c @@ -1,5 +1,5 @@ /* - * arch/xtensa/kernel/platform.c + * arch/xtensa/kernel/module.c * * Module support. * diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c index 1ff82268e8e..6648fa9d919 100644 --- a/arch/xtensa/kernel/pci-dma.c +++ b/arch/xtensa/kernel/pci-dma.c @@ -1,5 +1,5 @@ /* - * arch/xtensa/pci-dma.c + * arch/xtensa/kernel/pci-dma.c * * DMA coherent memory allocation. * diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index 8709f8249d0..45571ccb72d 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c @@ -1,5 +1,5 @@ /* - * arch/xtensa/pcibios.c + * arch/xtensa/kernel/pci.c * * PCI bios-type initialisation for PCI machines * diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 82684d05910..c99ab72b41b 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -1,5 +1,5 @@ /* - * arch/xtensa/setup.c + * arch/xtensa/kernel/setup.c * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive diff --git a/arch/xtensa/kernel/syscalls.c b/arch/xtensa/kernel/syscalls.c index 4688ba2db84..f49cb239e60 100644 --- a/arch/xtensa/kernel/syscalls.c +++ b/arch/xtensa/kernel/syscalls.c @@ -1,5 +1,5 @@ /* - * arch/xtensa/kernel/syscall.c + * arch/xtensa/kernel/syscalls.c * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -128,7 +128,7 @@ out: int sys_uname(struct old_utsname * name) { - if (name && !copy_to_user(name, &system_utsname, sizeof (*name))) + if (name && !copy_to_user(name, utsname(), sizeof (*name))) return 0; return -EFAULT; } @@ -266,3 +266,23 @@ void system_call (struct pt_regs *regs) regs->areg[2] = res; do_syscall_trace(); } + +/* + * Do a system call from kernel instead of calling sys_execve so we + * end up with proper pt_regs. + */ +int kernel_execve(const char *filename, char *const argv[], char *const envp[]) +{ + long __res; + asm volatile ( + " mov a5, %2 \n" + " mov a4, %4 \n" + " mov a3, %3 \n" + " movi a2, %1 \n" + " syscall \n" + " mov %0, a2 \n" + : "=a" (__res) + : "i" (__NR_execve), "a" (filename), "a" (argv), "a" (envp) + : "a2", "a3", "a4", "a5"); + return __res; +} diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 241db201f40..37347e36998 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c @@ -26,8 +26,6 @@ #include <asm/platform.h> -extern volatile unsigned long wall_jiffies; - DEFINE_SPINLOCK(rtc_lock); EXPORT_SYMBOL(rtc_lock); @@ -110,7 +108,6 @@ int do_settimeofday(struct timespec *tv) */ ccount = get_ccount(); nsec -= (ccount - last_ccount_stamp) * CCOUNT_NSEC; - nsec -= (jiffies - wall_jiffies) * CCOUNT_PER_JIFFY * CCOUNT_NSEC; wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); @@ -129,7 +126,7 @@ EXPORT_SYMBOL(do_settimeofday); void do_gettimeofday(struct timeval *tv) { unsigned long flags; - unsigned long sec, usec, delta, lost, seq; + unsigned long sec, usec, delta, seq; do { seq = read_seqbegin_irqsave(&xtime_lock, flags); @@ -137,12 +134,9 @@ void do_gettimeofday(struct timeval *tv) delta = get_ccount() - last_ccount_stamp; sec = xtime.tv_sec; usec = (xtime.tv_nsec / NSEC_PER_USEC); - - lost = jiffies - wall_jiffies; - } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); - usec += lost * (1000000UL/HZ) + (delta * CCOUNT_NSEC) / NSEC_PER_USEC; + usec += (delta * CCOUNT_NSEC) / NSEC_PER_USEC; for (; usec >= 1000000; sec++, usec -= 1000000) ; @@ -179,8 +173,7 @@ again: if (ntp_synced() && xtime.tv_sec - last_rtc_update >= 659 && - abs((xtime.tv_nsec/1000)-(1000000-1000000/HZ))<5000000/HZ && - jiffies - wall_jiffies == 1) { + abs((xtime.tv_nsec/1000)-(1000000-1000000/HZ))<5000000/HZ) { if (platform_set_rtc_time(xtime.tv_sec+1) == 0) last_rtc_update = xtime.tv_sec+1; diff --git a/arch/xtensa/lib/pci-auto.c b/arch/xtensa/lib/pci-auto.c index 90c790f6123..a71733ae119 100644 --- a/arch/xtensa/lib/pci-auto.c +++ b/arch/xtensa/lib/pci-auto.c @@ -1,5 +1,5 @@ /* - * arch/xtensa/kernel/pci-auto.c + * arch/xtensa/lib/pci-auto.c * * PCI autoconfiguration library * diff --git a/arch/xtensa/lib/usercopy.S b/arch/xtensa/lib/usercopy.S index 265db2693cb..4641ef510f0 100644 --- a/arch/xtensa/lib/usercopy.S +++ b/arch/xtensa/lib/usercopy.S @@ -5,10 +5,10 @@ * * DO NOT COMBINE this function with <arch/xtensa/lib/hal/memcopy.S>. * It needs to remain separate and distinct. The hal files are part - * of the the Xtensa link-time HAL, and those files may differ per + * of the Xtensa link-time HAL, and those files may differ per * processor configuration. Patching the kernel for another * processor configuration includes replacing the hal files, and we - * could loose the special functionality for accessing user-space + * could lose the special functionality for accessing user-space * memory during such a patch. We sacrifice a little code space here * in favor to simplify code maintenance. * diff --git a/arch/xtensa/mm/pgtable.c b/arch/xtensa/mm/pgtable.c index 7d28914d11c..69799273820 100644 --- a/arch/xtensa/mm/pgtable.c +++ b/arch/xtensa/mm/pgtable.c @@ -1,5 +1,5 @@ /* - * arch/xtensa/mm/fault.c + * arch/xtensa/mm/pgtable.c * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive diff --git a/arch/xtensa/mm/tlb.c b/arch/xtensa/mm/tlb.c index d3bd3bfc3b3..0fefb866687 100644 --- a/arch/xtensa/mm/tlb.c +++ b/arch/xtensa/mm/tlb.c @@ -1,5 +1,5 @@ /* - * arch/xtensa/mm/mmu.c + * arch/xtensa/mm/tlb.c * * Logic that manipulates the Xtensa MMU. Derived from MIPS. * diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c index 22d3c571a7b..5c947cae752 100644 --- a/arch/xtensa/platform-iss/console.c +++ b/arch/xtensa/platform-iss/console.c @@ -191,7 +191,7 @@ static int rs_read_proc(char *page, char **start, off_t off, int count, } -static struct tty_operations serial_ops = { +static const struct tty_operations serial_ops = { .open = rs_open, .close = rs_close, .write = rs_write, |