Skip to content

Commit

Permalink
Merge tag 'xtensa-next-20121018' of git://github.com/czankel/xtensa-l…
Browse files Browse the repository at this point in the history
…inux

Pull Xtensa patchset from Chris Zankel:
 "These are all limited to the xtensa subtree and include some important
  changes (adding long missing system calls for newer libc versions and
  other fixes) and the UAPI changes"

* tag 'xtensa-next-20121018' of git://github.com/czankel/xtensa-linux:
  xtensa: add missing system calls to the syscall table
  xtensa: minor compiler warning fix
  xtensa: Use Kbuild infrastructure to handle asm-generic headers
  UAPI: (Scripted) Disintegrate arch/xtensa/include/asm
  xtensa: fix unaligned usermode access
  xtensa: reorganize SR referencing
  xtensa: fix boot parameters parsing
  xtensa: fix missing return in do_page_fault for SIGBUS case
  xtensa: copy_thread with CLONE_VM must not copy live parent AR windows
  xtensa: fix memmove(), bcopy(), and memcpy().
  xtensa: ISS: fix rs_put_char
  xtensa: ISS: fix specific simcalls
  • Loading branch information
Linus Torvalds committed Oct 19, 2012
2 parents b05e585 + 7216cab commit 17dbe27
Show file tree
Hide file tree
Showing 82 changed files with 1,677 additions and 1,620 deletions.
8 changes: 4 additions & 4 deletions arch/xtensa/boot/boot-redboot/bootstrap.S
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ _start:
/* 'reset' window registers */

movi a4, 1
wsr a4, PS
wsr a4, ps
rsync

rsr a5, WINDOWBASE
rsr a5, windowbase
ssl a5
sll a4, a4
wsr a4, WINDOWSTART
wsr a4, windowstart
rsync

movi a4, 0x00040000
wsr a4, PS
wsr a4, ps
rsync

/* copy the loader to its address
Expand Down
28 changes: 26 additions & 2 deletions arch/xtensa/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
include include/asm-generic/Kbuild.asm

generic-y += bitsperlong.h
generic-y += bug.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += device.h
generic-y += div64.h
generic-y += emergency-restart.h
generic-y += errno.h
generic-y += exec.h
generic-y += fcntl.h
generic-y += futex.h
generic-y += hardirq.h
generic-y += ioctl.h
generic-y += irq_regs.h
generic-y += kdebug.h
generic-y += kmap_types.h
generic-y += kvm_para.h
generic-y += local.h
generic-y += local64.h
generic-y += percpu.h
generic-y += resource.h
generic-y += scatterlist.h
generic-y += sections.h
generic-y += siginfo.h
generic-y += statfs.h
generic-y += termios.h
generic-y += topology.h
generic-y += xor.h
12 changes: 6 additions & 6 deletions arch/xtensa/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static inline void atomic_add(int i, atomic_t * v)
"l32i %0, %2, 0 \n\t"
"add %0, %0, %1 \n\t"
"s32i %0, %2, 0 \n\t"
"wsr a15, "__stringify(PS)" \n\t"
"wsr a15, ps \n\t"
"rsync \n"
: "=&a" (vval)
: "a" (i), "a" (v)
Expand All @@ -97,7 +97,7 @@ static inline void atomic_sub(int i, atomic_t *v)
"l32i %0, %2, 0 \n\t"
"sub %0, %0, %1 \n\t"
"s32i %0, %2, 0 \n\t"
"wsr a15, "__stringify(PS)" \n\t"
"wsr a15, ps \n\t"
"rsync \n"
: "=&a" (vval)
: "a" (i), "a" (v)
Expand All @@ -118,7 +118,7 @@ static inline int atomic_add_return(int i, atomic_t * v)
"l32i %0, %2, 0 \n\t"
"add %0, %0, %1 \n\t"
"s32i %0, %2, 0 \n\t"
"wsr a15, "__stringify(PS)" \n\t"
"wsr a15, ps \n\t"
"rsync \n"
: "=&a" (vval)
: "a" (i), "a" (v)
Expand All @@ -137,7 +137,7 @@ static inline int atomic_sub_return(int i, atomic_t * v)
"l32i %0, %2, 0 \n\t"
"sub %0, %0, %1 \n\t"
"s32i %0, %2, 0 \n\t"
"wsr a15, "__stringify(PS)" \n\t"
"wsr a15, ps \n\t"
"rsync \n"
: "=&a" (vval)
: "a" (i), "a" (v)
Expand Down Expand Up @@ -260,7 +260,7 @@ static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
"xor %1, %4, %3 \n\t"
"and %0, %0, %4 \n\t"
"s32i %0, %2, 0 \n\t"
"wsr a15, "__stringify(PS)" \n\t"
"wsr a15, ps \n\t"
"rsync \n"
: "=&a" (vval), "=a" (mask)
: "a" (v), "a" (all_f), "1" (mask)
Expand All @@ -277,7 +277,7 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
"l32i %0, %2, 0 \n\t"
"or %0, %0, %1 \n\t"
"s32i %0, %2, 0 \n\t"
"wsr a15, "__stringify(PS)" \n\t"
"wsr a15, ps \n\t"
"rsync \n"
: "=&a" (vval)
: "a" (mask), "a" (v)
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/include/asm/bitsperlong.h

This file was deleted.

18 changes: 0 additions & 18 deletions arch/xtensa/include/asm/bug.h

This file was deleted.

2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ extern void copy_from_user_page(struct vm_area_struct*, struct page*,
static inline u32 xtensa_get_cacheattr(void)
{
u32 r;
asm volatile(" rsr %0, CACHEATTR" : "=a"(r));
asm volatile(" rsr %0, cacheattr" : "=a"(r));
return r;
}

Expand Down
4 changes: 2 additions & 2 deletions arch/xtensa/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ __cmpxchg_u32(volatile int *p, int old, int new)
"bne %0, %2, 1f \n\t"
"s32i %3, %1, 0 \n\t"
"1: \n\t"
"wsr a15, "__stringify(PS)" \n\t"
"wsr a15, ps \n\t"
"rsync \n\t"
: "=&a" (old)
: "a" (p), "a" (old), "r" (new)
Expand Down Expand Up @@ -97,7 +97,7 @@ static inline unsigned long xchg_u32(volatile int * m, unsigned long val)
__asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t"
"l32i %0, %1, 0 \n\t"
"s32i %2, %1, 0 \n\t"
"wsr a15, "__stringify(PS)" \n\t"
"wsr a15, ps \n\t"
"rsync \n\t"
: "=&a" (tmp)
: "a" (m), "a" (val)
Expand Down
5 changes: 2 additions & 3 deletions arch/xtensa/include/asm/coprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,10 @@
#if XCHAL_HAVE_CP

#define RSR_CPENABLE(x) do { \
__asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \
__asm__ __volatile__("rsr %0, cpenable" : "=a" (x)); \
} while(0);
#define WSR_CPENABLE(x) do { \
__asm__ __volatile__("wsr %0," __stringify(CPENABLE) "; rsync" \
:: "a" (x)); \
__asm__ __volatile__("wsr %0, cpenable; rsync" :: "a" (x)); \
} while(0);

#endif /* XCHAL_HAVE_CP */
Expand Down
6 changes: 0 additions & 6 deletions arch/xtensa/include/asm/cputime.h

This file was deleted.

2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static inline void __delay(unsigned long loops)
static __inline__ u32 xtensa_get_ccount(void)
{
u32 ccount;
asm volatile ("rsr %0, 234; # CCOUNT\n" : "=r" (ccount));
asm volatile ("rsr %0, ccount\n" : "=r" (ccount));
return ccount;
}

Expand Down
7 changes: 0 additions & 7 deletions arch/xtensa/include/asm/device.h

This file was deleted.

16 changes: 0 additions & 16 deletions arch/xtensa/include/asm/div64.h

This file was deleted.

6 changes: 0 additions & 6 deletions arch/xtensa/include/asm/emergency-restart.h

This file was deleted.

16 changes: 0 additions & 16 deletions arch/xtensa/include/asm/errno.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/xtensa/include/asm/fcntl.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/xtensa/include/asm/futex.h

This file was deleted.

16 changes: 0 additions & 16 deletions arch/xtensa/include/asm/hardirq.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/xtensa/include/asm/ioctl.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/xtensa/include/asm/irq_regs.h

This file was deleted.

4 changes: 2 additions & 2 deletions arch/xtensa/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
static inline unsigned long arch_local_save_flags(void)
{
unsigned long flags;
asm volatile("rsr %0,"__stringify(PS) : "=a" (flags));
asm volatile("rsr %0, ps" : "=a" (flags));
return flags;
}

Expand All @@ -41,7 +41,7 @@ static inline void arch_local_irq_enable(void)

static inline void arch_local_irq_restore(unsigned long flags)
{
asm volatile("wsr %0, "__stringify(PS)" ; rsync"
asm volatile("wsr %0, ps; rsync"
:: "a" (flags) : "memory");
}

Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/include/asm/kdebug.h

This file was deleted.

6 changes: 0 additions & 6 deletions arch/xtensa/include/asm/kmap_types.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/xtensa/include/asm/kvm_para.h

This file was deleted.

16 changes: 0 additions & 16 deletions arch/xtensa/include/asm/local.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/xtensa/include/asm/local64.h

This file was deleted.

4 changes: 2 additions & 2 deletions arch/xtensa/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ extern unsigned long asid_cache;

static inline void set_rasid_register (unsigned long val)
{
__asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t"
__asm__ __volatile__ (" wsr %0, rasid\n\t"
" isync\n" : : "a" (val));
}

static inline unsigned long get_rasid_register (void)
{
unsigned long tmp;
__asm__ __volatile__ (" rsr %0,"__stringify(RASID)"\n\t" : "=a" (tmp));
__asm__ __volatile__ (" rsr %0, rasid\n\t" : "=a" (tmp));
return tmp;
}

Expand Down
20 changes: 2 additions & 18 deletions arch/xtensa/include/asm/param.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,12 @@
*
* Copyright (C) 2001 - 2005 Tensilica Inc.
*/

#ifndef _XTENSA_PARAM_H
#define _XTENSA_PARAM_H

#ifdef __KERNEL__
#include <uapi/asm/param.h>

# define HZ CONFIG_HZ /* internal timer frequency */
# define USER_HZ 100 /* for user interfaces in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */
#else
# define HZ 100
#endif

#define EXEC_PAGESIZE 4096

#ifndef NGROUPS
#define NGROUPS 32
#endif

#ifndef NOGROUP
#define NOGROUP (-1)
#endif

#define MAXHOSTNAMELEN 64 /* max length of hostname */

#endif /* _XTENSA_PARAM_H */
16 changes: 0 additions & 16 deletions arch/xtensa/include/asm/percpu.h

This file was deleted.

Loading

0 comments on commit 17dbe27

Please sign in to comment.